aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--COPYING.BSD28
-rw-r--r--COPYRIGHT2
-rw-r--r--NEWS4
-rw-r--r--audio/decoders/wave.cpp7
-rw-r--r--audio/softsynth/mt32.cpp186
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Analog.cpp48
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Analog.h15
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/BReverbModel.cpp107
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/BReverbModel.h42
-rwxr-xr-xaudio/softsynth/mt32/Enumerations.h155
-rwxr-xr-xaudio/softsynth/mt32/File.cpp73
-rwxr-xr-xaudio/softsynth/mt32/File.h73
-rwxr-xr-xaudio/softsynth/mt32/FileStream.cpp83
-rwxr-xr-xaudio/softsynth/mt32/FileStream.h46
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/LA32FloatWaveGenerator.cpp41
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/LA32FloatWaveGenerator.h22
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/LA32Ramp.cpp10
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/LA32Ramp.h9
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/LA32WaveGenerator.cpp34
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/LA32WaveGenerator.h24
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/MemoryRegion.h18
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/MidiEventQueue.h10
-rwxr-xr-xaudio/softsynth/mt32/MidiStreamParser.cpp289
-rwxr-xr-xaudio/softsynth/mt32/MidiStreamParser.h124
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Part.cpp62
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Part.h16
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Partial.cpp27
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Partial.h26
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/PartialManager.cpp15
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/PartialManager.h15
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Poly.cpp12
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Poly.h19
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/ROMInfo.cpp90
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/ROMInfo.h52
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Structures.h41
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Synth.cpp739
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Synth.h388
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/TVA.cpp44
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/TVA.h16
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/TVF.cpp24
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/TVF.h15
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/TVP.cpp44
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/TVP.h17
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Tables.cpp30
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Tables.h11
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/Types.h10
-rwxr-xr-xaudio/softsynth/mt32/c_interface/c_interface.cpp624
-rwxr-xr-xaudio/softsynth/mt32/c_interface/c_interface.h362
-rwxr-xr-xaudio/softsynth/mt32/c_interface/c_types.h298
-rwxr-xr-xaudio/softsynth/mt32/c_interface/cpp_interface.h436
-rw-r--r--audio/softsynth/mt32/config.h28
-rwxr-xr-xaudio/softsynth/mt32/globals.h119
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/internals.h67
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/mmath.h15
-rw-r--r--audio/softsynth/mt32/module.mk7
-rwxr-xr-x[-rw-r--r--]audio/softsynth/mt32/mt32emu.h96
-rwxr-xr-xaudio/softsynth/mt32/sha1/sha1.cpp185
-rwxr-xr-xaudio/softsynth/mt32/sha1/sha1.h49
-rw-r--r--backends/cloud/box/boxstorage.cpp40
-rw-r--r--backends/cloud/box/boxstorage.h2
-rw-r--r--backends/cloud/cloudmanager.cpp2
-rw-r--r--backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp4
-rw-r--r--backends/cloud/dropbox/dropboxinforequest.cpp8
-rw-r--r--backends/cloud/googledrive/googledrivestorage.cpp32
-rw-r--r--backends/cloud/googledrive/googledrivestorage.h2
-rw-r--r--backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp4
-rw-r--r--backends/cloud/onedrive/onedrivestorage.cpp22
-rw-r--r--backends/cloud/storagefile.cpp8
-rw-r--r--backends/cloud/storagefile.h2
-rw-r--r--backends/fs/abstract-fs.h4
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp2
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.h2
-rw-r--r--backends/fs/chroot/chroot-fs.cpp2
-rw-r--r--backends/fs/chroot/chroot-fs.h2
-rw-r--r--backends/fs/ds/ds-fs.cpp8
-rw-r--r--backends/fs/ds/ds-fs.h6
-rw-r--r--backends/fs/n64/n64-fs.cpp2
-rw-r--r--backends/fs/n64/n64-fs.h2
-rw-r--r--backends/fs/posix/posix-fs.cpp10
-rw-r--r--backends/fs/posix/posix-fs.h2
-rw-r--r--backends/fs/ps2/ps2-fs.cpp2
-rw-r--r--backends/fs/ps2/ps2-fs.h2
-rw-r--r--backends/fs/psp/psp-fs.cpp2
-rw-r--r--backends/fs/psp/psp-fs.h2
-rw-r--r--backends/fs/symbian/symbian-fs.cpp2
-rw-r--r--backends/fs/symbian/symbian-fs.h2
-rw-r--r--backends/fs/wii/wii-fs.cpp2
-rw-r--r--backends/fs/wii/wii-fs.h2
-rw-r--r--backends/fs/windows/windows-fs.cpp10
-rw-r--r--backends/fs/windows/windows-fs.h2
-rw-r--r--backends/networking/curl/networkreadstream.cpp18
-rw-r--r--backends/networking/curl/networkreadstream.h2
-rw-r--r--backends/platform/symbian/README2
-rw-r--r--backends/platform/symbian/S60/ScummVM_S60.mmp.in2
-rw-r--r--backends/platform/symbian/S60/ScummVM_S60_App.mmp2
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in2
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in2
-rw-r--r--backends/platform/symbian/S80/ScummVM_S80.mmp.in2
-rw-r--r--backends/platform/symbian/S80/ScummVM_S80_App.mmp2
-rw-r--r--backends/platform/symbian/S90/Scummvm_S90.mmp.in2
-rw-r--r--backends/platform/symbian/S90/Scummvm_S90_App.mmp2
-rw-r--r--backends/platform/symbian/UIQ2/ScummVM.rss2
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM.rss2
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_A0000658.rss2
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in2
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in2
-rw-r--r--backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss2
-rw-r--r--backends/platform/symbian/mmp/config.mmh2
-rw-r--r--backends/platform/symbian/mmp/scummvm_access.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_agi.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_agos.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_avalanche.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_base.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_bbvs.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_cge.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_cge2.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_cine.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_composer.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_cruise.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_draci.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_drascula.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_dreamweb.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_fullpipe.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_gob.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_groovie.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_hopkins.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_hugo.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_kyra.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_lure.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_m4.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_made.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_mads.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_mohawk.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_mortevielle.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_neverhood.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_parallaction.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_pegasus.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_prince.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_queen.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_saga.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_sci.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_scumm.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_sherlock.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_sky.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_sword1.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_sword2.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_sword25.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_teenagent.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_testbed.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_tinsel.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_toltecs.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_tony.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_toon.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_touche.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_tsage.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_tucker.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_voyeur.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_wintermute.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_zvision.mmp.in2
-rw-r--r--backends/platform/symbian/res/ScummVmAif.rss2
-rw-r--r--backends/platform/symbian/res/scummvm.rss2
-rw-r--r--backends/platform/symbian/res/scummvm_A0000658.rss2
-rw-r--r--backends/platform/symbian/src/ScummVm.hrh2
-rw-r--r--common/EventMapper.cpp1
-rw-r--r--common/debug-channels.h2
-rw-r--r--common/debug.cpp8
-rw-r--r--common/debug.h1
-rw-r--r--common/json.cpp8
-rw-r--r--common/safe-bool.h65
-rw-r--r--common/scummsys.h12
-rw-r--r--common/span.h995
-rw-r--r--common/str.cpp7
-rw-r--r--common/str.h11
-rw-r--r--common/type-traits.h34
-rw-r--r--devtools/create_project/create_project.cpp7
-rw-r--r--devtools/create_project/msbuild.cpp4
-rw-r--r--devtools/create_project/visualstudio.cpp4
-rw-r--r--devtools/create_titanic/create_titanic_dat.cpp21
-rw-r--r--dists/debian/copyright2
-rw-r--r--dists/macosx/Info.plist4
-rw-r--r--dists/macosx/Info.plist.in4
-rw-r--r--dists/macosx/dockplugin/Info.plist2
-rw-r--r--dists/macosx/dockplugin/Info.plist.in2
-rw-r--r--dists/scummvm.rc2
-rw-r--r--dists/scummvm.rc.in2
-rw-r--r--dists/win32/ScummVM.iss2
-rw-r--r--dists/win32/migration.bat2
-rw-r--r--engines/access/POTFILES1
-rw-r--r--engines/access/resources.cpp12
-rw-r--r--engines/adl/adl.cpp374
-rw-r--r--engines/adl/adl.h45
-rw-r--r--engines/adl/adl_v2.cpp75
-rw-r--r--engines/adl/adl_v2.h4
-rw-r--r--engines/adl/adl_v3.cpp14
-rw-r--r--engines/adl/adl_v3.h1
-rw-r--r--engines/adl/adl_v4.cpp609
-rw-r--r--engines/adl/adl_v4.h61
-rw-r--r--engines/adl/adl_v5.cpp246
-rw-r--r--engines/adl/adl_v5.h73
-rw-r--r--engines/adl/console.cpp95
-rw-r--r--engines/adl/console.h3
-rw-r--r--engines/adl/detection.cpp24
-rw-r--r--engines/adl/disk.cpp75
-rw-r--r--engines/adl/display.cpp6
-rw-r--r--engines/adl/hires1.cpp7
-rw-r--r--engines/adl/hires2.cpp4
-rw-r--r--engines/adl/hires5.cpp288
-rw-r--r--engines/adl/hires6.cpp10
-rw-r--r--engines/adl/module.mk1
-rw-r--r--engines/advancedDetector.cpp4
-rw-r--r--engines/bladerunner/item.cpp8
-rw-r--r--engines/bladerunner/item.h2
-rw-r--r--engines/bladerunner/items.cpp8
-rw-r--r--engines/bladerunner/items.h2
-rw-r--r--engines/bladerunner/vqa_decoder.cpp19
-rw-r--r--engines/chewy/console.cpp15
-rw-r--r--engines/chewy/console.h1
-rw-r--r--engines/chewy/cursor.cpp34
-rw-r--r--engines/chewy/events.cpp3
-rw-r--r--engines/chewy/scene.cpp150
-rw-r--r--engines/chewy/scene.h9
-rw-r--r--engines/chewy/text.cpp2
-rw-r--r--engines/cruise/font.cpp6
-rw-r--r--engines/director/archive.cpp52
-rw-r--r--engines/director/archive.h16
-rw-r--r--engines/director/cast.cpp42
-rw-r--r--engines/director/cast.h10
-rw-r--r--engines/director/detection.cpp2
-rw-r--r--engines/director/detection_tables.h15
-rw-r--r--engines/director/director.cpp7
-rw-r--r--engines/director/director.h11
-rw-r--r--engines/director/frame.cpp534
-rw-r--r--engines/director/frame.h16
-rw-r--r--engines/director/graphics.cpp155
-rw-r--r--engines/director/images.cpp148
-rw-r--r--engines/director/images.h20
-rw-r--r--engines/director/lingo/lingo-builtins.cpp439
-rw-r--r--engines/director/lingo/lingo-code.cpp171
-rw-r--r--engines/director/lingo/lingo-codegen.cpp72
-rw-r--r--engines/director/lingo/lingo-funcs.cpp44
-rw-r--r--engines/director/lingo/lingo-gr.cpp1901
-rw-r--r--engines/director/lingo/lingo-gr.h258
-rw-r--r--engines/director/lingo/lingo-gr.y93
-rw-r--r--engines/director/lingo/lingo-lex.cpp964
-rw-r--r--engines/director/lingo/lingo-lex.l94
-rw-r--r--engines/director/lingo/lingo-the.cpp71
-rw-r--r--engines/director/lingo/lingo-the.h117
-rw-r--r--engines/director/lingo/lingo.cpp40
-rw-r--r--engines/director/lingo/lingo.h84
-rw-r--r--engines/director/lingo/tests/arrays.lingo2
-rw-r--r--engines/director/lingo/tests/events.lingo12
-rw-r--r--engines/director/lingo/tests/mci.lingo7
-rw-r--r--engines/director/lingo/tests/the.lingo5
-rw-r--r--engines/director/module.mk1
-rw-r--r--engines/director/resource.cpp4
-rw-r--r--engines/director/score.cpp123
-rw-r--r--engines/director/score.h7
-rw-r--r--engines/director/sound.cpp10
-rw-r--r--engines/director/sound.h4
-rw-r--r--engines/director/sprite.cpp2
-rw-r--r--engines/director/sprite.h3
-rw-r--r--engines/drascula/POTFILES1
-rw-r--r--engines/drascula/animation.cpp2
-rw-r--r--engines/drascula/drascula.cpp12
-rw-r--r--engines/drascula/graphics.cpp2
-rw-r--r--engines/fullpipe/constants.h7
-rw-r--r--engines/fullpipe/detection.cpp14
-rw-r--r--engines/fullpipe/fullpipe.cpp23
-rw-r--r--engines/fullpipe/fullpipe.h11
-rw-r--r--engines/fullpipe/gameloader.cpp10
-rw-r--r--engines/fullpipe/gameloader.h4
-rw-r--r--engines/fullpipe/gfx.cpp25
-rw-r--r--engines/fullpipe/gfx.h6
-rw-r--r--engines/fullpipe/init.cpp5
-rw-r--r--engines/fullpipe/input.cpp3
-rw-r--r--engines/fullpipe/messagehandlers.cpp10
-rw-r--r--engines/fullpipe/messages.cpp11
-rw-r--r--engines/fullpipe/messages.h4
-rw-r--r--engines/fullpipe/modal.cpp601
-rw-r--r--engines/fullpipe/modal.h53
-rw-r--r--engines/fullpipe/module.mk1
-rw-r--r--engines/fullpipe/objectnames.h1
-rw-r--r--engines/fullpipe/scene.cpp5
-rw-r--r--engines/fullpipe/scenes.cpp32
-rw-r--r--engines/fullpipe/scenes.h4
-rw-r--r--engines/fullpipe/scenes/scene04.cpp4
-rw-r--r--engines/fullpipe/scenes/scene06.cpp4
-rw-r--r--engines/fullpipe/scenes/scene08.cpp16
-rw-r--r--engines/fullpipe/scenes/scene09.cpp18
-rw-r--r--engines/fullpipe/scenes/scene11.cpp2
-rw-r--r--engines/fullpipe/scenes/scene13.cpp6
-rw-r--r--engines/fullpipe/scenes/scene14.cpp4
-rw-r--r--engines/fullpipe/scenes/scene18and19.cpp2
-rw-r--r--engines/fullpipe/scenes/scene21.cpp2
-rw-r--r--engines/fullpipe/scenes/scene22.cpp2
-rw-r--r--engines/fullpipe/scenes/scene26.cpp5
-rw-r--r--engines/fullpipe/scenes/scene27.cpp4
-rw-r--r--engines/fullpipe/scenes/scene28.cpp2
-rw-r--r--engines/fullpipe/scenes/scene32.cpp2
-rw-r--r--engines/fullpipe/scenes/scene33.cpp2
-rw-r--r--engines/fullpipe/scenes/scene34.cpp2
-rw-r--r--engines/fullpipe/scenes/scene35.cpp2
-rw-r--r--engines/fullpipe/scenes/scene37.cpp2
-rw-r--r--engines/fullpipe/scenes/sceneIntroDemo.cpp94
-rw-r--r--engines/fullpipe/sound.cpp4
-rw-r--r--engines/fullpipe/sound.h1
-rw-r--r--engines/fullpipe/stateloader.cpp27
-rw-r--r--engines/fullpipe/statics.cpp6
-rw-r--r--engines/hugo/POTFILES1
-rw-r--r--engines/hugo/hugo.cpp12
-rw-r--r--engines/kyra/staticres.cpp2
-rw-r--r--engines/lure/POTFILES1
-rw-r--r--engines/lure/lure.cpp7
-rw-r--r--engines/macventure/gui.cpp2
-rw-r--r--engines/mads/screen.cpp2
-rw-r--r--engines/mads/screen.h4
-rw-r--r--engines/mohawk/cursors.cpp9
-rw-r--r--engines/mohawk/myst.cpp19
-rw-r--r--engines/mohawk/myst.h1
-rw-r--r--engines/mohawk/myst_graphics.cpp11
-rw-r--r--engines/mortevielle/POTFILES1
-rw-r--r--engines/mortevielle/mortevielle.cpp18
-rw-r--r--engines/queen/display.cpp4
-rw-r--r--engines/sci/console.cpp29
-rw-r--r--engines/sci/detection.cpp15
-rw-r--r--engines/sci/detection_tables.h284
-rw-r--r--engines/sci/engine/features.h17
-rw-r--r--engines/sci/engine/file.cpp33
-rw-r--r--engines/sci/engine/file.h2
-rw-r--r--engines/sci/engine/kernel.cpp6
-rw-r--r--engines/sci/engine/kernel.h6
-rw-r--r--engines/sci/engine/kernel_tables.h37
-rw-r--r--engines/sci/engine/kfile.cpp33
-rw-r--r--engines/sci/engine/kgraphics32.cpp80
-rw-r--r--engines/sci/engine/klists.cpp136
-rw-r--r--engines/sci/engine/kscripts.cpp19
-rw-r--r--engines/sci/engine/ksound.cpp4
-rw-r--r--engines/sci/engine/kstring.cpp4
-rw-r--r--engines/sci/engine/savegame.cpp24
-rw-r--r--engines/sci/engine/savegame.h3
-rw-r--r--engines/sci/engine/script_patches.cpp116
-rw-r--r--engines/sci/engine/scriptdebug.cpp20
-rw-r--r--engines/sci/engine/seg_manager.cpp12
-rw-r--r--engines/sci/engine/seg_manager.h10
-rw-r--r--engines/sci/engine/segment.h64
-rw-r--r--engines/sci/engine/selector.cpp17
-rw-r--r--engines/sci/engine/selector.h9
-rw-r--r--engines/sci/engine/vm.cpp4
-rw-r--r--engines/sci/engine/vm.h4
-rw-r--r--engines/sci/engine/workarounds.cpp84
-rw-r--r--engines/sci/engine/workarounds.h5
-rw-r--r--engines/sci/graphics/celobj32.cpp24
-rw-r--r--engines/sci/graphics/celobj32.h12
-rw-r--r--engines/sci/graphics/cursor32.cpp1
-rw-r--r--engines/sci/graphics/frameout.cpp44
-rw-r--r--engines/sci/graphics/paint32.cpp6
-rw-r--r--engines/sci/graphics/palette.cpp1
-rw-r--r--engines/sci/graphics/picture.cpp24
-rw-r--r--engines/sci/graphics/plane32.cpp42
-rw-r--r--engines/sci/graphics/plane32.h18
-rw-r--r--engines/sci/graphics/screen_item32.cpp70
-rw-r--r--engines/sci/graphics/screen_item32.h39
-rw-r--r--engines/sci/graphics/text32.cpp4
-rw-r--r--engines/sci/graphics/transitions32.cpp81
-rw-r--r--engines/sci/graphics/transitions32.h25
-rw-r--r--engines/sci/graphics/video32.cpp49
-rw-r--r--engines/sci/graphics/video32.h14
-rw-r--r--engines/sci/resource.cpp2
-rw-r--r--engines/sci/resource.h2
-rw-r--r--engines/sci/resource_audio.cpp59
-rw-r--r--engines/sci/sci.h2
-rw-r--r--engines/sci/sound/audio32.cpp10
-rw-r--r--engines/sci/sound/decoders/sol.cpp72
-rw-r--r--engines/sci/sound/decoders/sol.h4
-rw-r--r--engines/sci/sound/music.cpp3
-rw-r--r--engines/sci/video/robot_decoder.cpp12
-rw-r--r--engines/sky/compact.cpp12
-rw-r--r--engines/sky/logic.cpp128
-rw-r--r--engines/sky/logic.h2
-rw-r--r--engines/teenagent/resources.cpp5
-rw-r--r--engines/titanic/carry/arm.cpp6
-rw-r--r--engines/titanic/carry/auditory_centre.cpp2
-rw-r--r--engines/titanic/carry/bowl_ear.cpp2
-rw-r--r--engines/titanic/carry/bridge_piece.cpp2
-rw-r--r--engines/titanic/carry/carry.cpp16
-rw-r--r--engines/titanic/carry/carry.h2
-rw-r--r--engines/titanic/carry/carry_parrot.cpp65
-rw-r--r--engines/titanic/carry/carry_parrot.h2
-rw-r--r--engines/titanic/carry/crushed_tv.cpp2
-rw-r--r--engines/titanic/carry/ear.cpp2
-rw-r--r--engines/titanic/carry/eye.cpp5
-rw-r--r--engines/titanic/carry/fruit.cpp2
-rw-r--r--engines/titanic/carry/hammer.cpp2
-rw-r--r--engines/titanic/carry/head_piece.cpp2
-rw-r--r--engines/titanic/carry/key.cpp2
-rw-r--r--engines/titanic/carry/liftbot_head.cpp4
-rw-r--r--engines/titanic/carry/long_stick.cpp2
-rw-r--r--engines/titanic/carry/maitred_right_arm.cpp2
-rw-r--r--engines/titanic/carry/phonograph_ear.cpp2
-rw-r--r--engines/titanic/carry/photograph.cpp2
-rw-r--r--engines/titanic/carry/speech_centre.cpp2
-rw-r--r--engines/titanic/carry/vision_centre.cpp6
-rw-r--r--engines/titanic/continue_save_dialog.h4
-rw-r--r--engines/titanic/core/background.cpp10
-rw-r--r--engines/titanic/core/background.h2
-rw-r--r--engines/titanic/core/drop_target.cpp15
-rw-r--r--engines/titanic/core/drop_target.h2
-rw-r--r--engines/titanic/core/game_object.cpp59
-rw-r--r--engines/titanic/core/game_object.h134
-rw-r--r--engines/titanic/core/mail_man.cpp10
-rw-r--r--engines/titanic/core/mail_man.h4
-rw-r--r--engines/titanic/core/project_item.cpp6
-rw-r--r--engines/titanic/core/saveable_object.cpp3
-rw-r--r--engines/titanic/core/turn_on_turn_off.cpp18
-rw-r--r--engines/titanic/core/turn_on_turn_off.h2
-rw-r--r--engines/titanic/core/view_item.cpp2
-rw-r--r--engines/titanic/events.cpp2
-rw-r--r--engines/titanic/game/announce.cpp13
-rw-r--r--engines/titanic/game/announce.h2
-rw-r--r--engines/titanic/game/broken_pell_base.cpp4
-rw-r--r--engines/titanic/game/broken_pell_base.h4
-rw-r--r--engines/titanic/game/broken_pellerator.cpp30
-rw-r--r--engines/titanic/game/broken_pellerator.h4
-rw-r--r--engines/titanic/game/broken_pellerator_froz.cpp18
-rw-r--r--engines/titanic/game/cage.cpp8
-rw-r--r--engines/titanic/game/cell_point_button.cpp70
-rw-r--r--engines/titanic/game/cell_point_button.h22
-rw-r--r--engines/titanic/game/fan_control.cpp47
-rw-r--r--engines/titanic/game/fan_control.h6
-rw-r--r--engines/titanic/game/get_lift_eye2.cpp3
-rw-r--r--engines/titanic/game/hammer_dispensor.cpp30
-rw-r--r--engines/titanic/game/hammer_dispensor.h4
-rw-r--r--engines/titanic/game/hammer_dispensor_button.cpp67
-rw-r--r--engines/titanic/game/hammer_dispensor_button.h11
-rw-r--r--engines/titanic/game/maitred/maitred_arm_holder.cpp2
-rw-r--r--engines/titanic/game/missiveomat.cpp234
-rw-r--r--engines/titanic/game/missiveomat.h22
-rw-r--r--engines/titanic/game/missiveomat_button.cpp2
-rw-r--r--engines/titanic/game/missiveomat_button.h5
-rw-r--r--engines/titanic/game/music_system_lock.cpp6
-rw-r--r--engines/titanic/game/nose_holder.cpp25
-rw-r--r--engines/titanic/game/nose_holder.h2
-rw-r--r--engines/titanic/game/parrot/parrot_nut_eater.cpp1
-rw-r--r--engines/titanic/game/parrot/parrot_perch_holder.cpp6
-rw-r--r--engines/titanic/game/parrot/player_meets_parrot.cpp2
-rw-r--r--engines/titanic/game/pet/pet_sounds.cpp2
-rw-r--r--engines/titanic/game/phonograph_lid.cpp8
-rw-r--r--engines/titanic/game/pickup/pick_up_hose.cpp8
-rw-r--r--engines/titanic/game/restaurant_cylinder_holder.cpp4
-rw-r--r--engines/titanic/game/start_action.cpp7
-rw-r--r--engines/titanic/game/sweet_bowl.cpp2
-rw-r--r--engines/titanic/game/television.cpp2
-rw-r--r--engines/titanic/game/tow_parrot_nav.cpp2
-rw-r--r--engines/titanic/game/transport/lift.cpp56
-rw-r--r--engines/titanic/game/transport/lift.h4
-rw-r--r--engines/titanic/game/transport/lift_indicator.cpp2
-rw-r--r--engines/titanic/game_manager.cpp5
-rw-r--r--engines/titanic/game_state.cpp10
-rw-r--r--engines/titanic/game_state.h14
-rw-r--r--engines/titanic/gfx/edit_control.cpp113
-rw-r--r--engines/titanic/gfx/edit_control.h5
-rw-r--r--engines/titanic/gfx/text_control.cpp (renamed from engines/titanic/pet_control/pet_text.cpp)115
-rw-r--r--engines/titanic/gfx/text_control.h (renamed from engines/titanic/pet_control/pet_text.h)10
-rw-r--r--engines/titanic/input_handler.cpp18
-rw-r--r--engines/titanic/input_handler.h2
-rw-r--r--engines/titanic/messages/messages.h33
-rw-r--r--engines/titanic/module.mk2
-rw-r--r--engines/titanic/moves/enter_exit_first_class_state.cpp13
-rw-r--r--engines/titanic/moves/enter_exit_first_class_state.h2
-rw-r--r--engines/titanic/moves/enter_sec_class_state.cpp2
-rw-r--r--engines/titanic/moves/restaurant_pan_handler.cpp4
-rw-r--r--engines/titanic/npcs/bilge_succubus.cpp138
-rw-r--r--engines/titanic/npcs/bilge_succubus.h8
-rw-r--r--engines/titanic/npcs/parrot.cpp101
-rw-r--r--engines/titanic/npcs/parrot.h16
-rw-r--r--engines/titanic/npcs/parrot_succubus.cpp2
-rw-r--r--engines/titanic/npcs/starlings.cpp17
-rw-r--r--engines/titanic/npcs/starlings.h3
-rw-r--r--engines/titanic/npcs/succubus.cpp199
-rw-r--r--engines/titanic/npcs/succubus.h38
-rw-r--r--engines/titanic/npcs/summon_bots.cpp4
-rw-r--r--engines/titanic/pet_control/pet_control.cpp12
-rw-r--r--engines/titanic/pet_control/pet_control.h18
-rw-r--r--engines/titanic/pet_control/pet_conversations.cpp27
-rw-r--r--engines/titanic/pet_control/pet_conversations.h10
-rw-r--r--engines/titanic/pet_control/pet_drag_chev.cpp1
-rw-r--r--engines/titanic/pet_control/pet_glyphs.cpp2
-rw-r--r--engines/titanic/pet_control/pet_glyphs.h4
-rw-r--r--engines/titanic/pet_control/pet_inventory.cpp9
-rw-r--r--engines/titanic/pet_control/pet_inventory.h7
-rw-r--r--engines/titanic/pet_control/pet_inventory_glyphs.cpp12
-rw-r--r--engines/titanic/pet_control/pet_inventory_glyphs.h2
-rw-r--r--engines/titanic/pet_control/pet_load.cpp2
-rw-r--r--engines/titanic/pet_control/pet_load.h2
-rw-r--r--engines/titanic/pet_control/pet_load_save.h4
-rw-r--r--engines/titanic/pet_control/pet_quit.cpp2
-rw-r--r--engines/titanic/pet_control/pet_quit.h8
-rw-r--r--engines/titanic/pet_control/pet_real_life.h6
-rw-r--r--engines/titanic/pet_control/pet_remote.cpp14
-rw-r--r--engines/titanic/pet_control/pet_remote.h6
-rw-r--r--engines/titanic/pet_control/pet_remote_glyphs.cpp40
-rw-r--r--engines/titanic/pet_control/pet_remote_glyphs.h36
-rw-r--r--engines/titanic/pet_control/pet_rooms.cpp16
-rw-r--r--engines/titanic/pet_control/pet_rooms.h10
-rw-r--r--engines/titanic/pet_control/pet_rooms_glyphs.cpp16
-rw-r--r--engines/titanic/pet_control/pet_rooms_glyphs.h2
-rw-r--r--engines/titanic/pet_control/pet_save.cpp2
-rw-r--r--engines/titanic/pet_control/pet_save.h2
-rw-r--r--engines/titanic/pet_control/pet_section.cpp4
-rw-r--r--engines/titanic/pet_control/pet_section.h4
-rw-r--r--engines/titanic/pet_control/pet_sound.cpp2
-rw-r--r--engines/titanic/pet_control/pet_sound.h12
-rw-r--r--engines/titanic/pet_control/pet_starfield.h4
-rw-r--r--engines/titanic/pet_control/pet_translation.cpp4
-rw-r--r--engines/titanic/pet_control/pet_translation.h8
-rw-r--r--engines/titanic/room_flags.cpp46
-rw-r--r--engines/titanic/room_flags.h4
-rw-r--r--engines/titanic/sound/auto_music_player_base.cpp2
-rw-r--r--engines/titanic/sound/season_noises.cpp19
-rw-r--r--engines/titanic/sound/season_noises.h2
-rw-r--r--engines/titanic/sound/sound_manager.cpp2
-rw-r--r--engines/titanic/support/avi_surface.cpp24
-rw-r--r--engines/titanic/support/mouse_cursor.cpp8
-rw-r--r--engines/titanic/support/mouse_cursor.h11
-rw-r--r--engines/titanic/support/screen_manager.cpp5
-rw-r--r--engines/titanic/support/screen_manager.h5
-rw-r--r--engines/titanic/support/strings.h4
-rw-r--r--engines/titanic/titanic.cpp14
-rw-r--r--engines/titanic/titanic.h1
-rw-r--r--engines/titanic/true_talk/barbot_script.cpp9
-rw-r--r--engines/titanic/true_talk/true_talk_manager.cpp5
-rw-r--r--engines/titanic/true_talk/tt_concept.cpp16
-rw-r--r--engines/titanic/true_talk/tt_npc_script.cpp13
-rw-r--r--engines/titanic/true_talk/tt_npc_script.h6
-rw-r--r--engines/titanic/true_talk/tt_sentence.cpp6
-rw-r--r--engines/titanic/true_talk/tt_string_node.cpp3
-rw-r--r--engines/titanic/true_talk/tt_synonym.cpp8
-rw-r--r--engines/titanic/true_talk/tt_synonym.h5
-rw-r--r--engines/tony/POTFILES1
-rw-r--r--engines/tony/tony.cpp14
-rw-r--r--engines/toon/toon.cpp11
-rw-r--r--engines/wage/detection_tables.h7
-rw-r--r--engines/wintermute/base/base_game.cpp6
-rw-r--r--engines/wintermute/base/base_game.h3
-rw-r--r--engines/wintermute/base/file/base_disk_file.cpp4
-rw-r--r--engines/wintermute/base/gfx/osystem/render_ticket.cpp15
-rw-r--r--engines/wintermute/dctypes.h3
-rw-r--r--engines/wintermute/detection.cpp13
-rw-r--r--engines/wintermute/detection_tables.h13
-rw-r--r--engines/wintermute/utils/path_util.cpp48
-rw-r--r--engines/wintermute/utils/path_util.h15
-rw-r--r--engines/xeen/worldofxeen/clouds_cutscenes.cpp3
-rw-r--r--graphics/macgui/macfontmanager.h9
-rw-r--r--graphics/macgui/mactext.cpp158
-rw-r--r--graphics/macgui/mactext.h66
-rw-r--r--graphics/macgui/macwindowmanager.cpp92
-rw-r--r--graphics/macgui/macwindowmanager.h19
-rw-r--r--graphics/module.mk1
-rw-r--r--graphics/transparent_surface.cpp384
-rw-r--r--graphics/transparent_surface.h12
-rw-r--r--gui/KeysDialog.cpp18
-rw-r--r--gui/ThemeEngine.cpp2
-rw-r--r--gui/about.cpp2
-rw-r--r--gui/options.cpp4
-rw-r--r--gui/themes/translations.datbin600528 -> 610560 bytes
-rw-r--r--image/codecs/codec.cpp2
-rw-r--r--image/codecs/indeo/indeo.cpp7
-rw-r--r--image/codecs/indeo3.cpp17
-rw-r--r--image/codecs/indeo3.h2
-rw-r--r--image/codecs/indeo4.cpp4
-rw-r--r--image/codecs/indeo5.cpp2
-rw-r--r--image/tga.cpp17
-rw-r--r--po/be_BY.po193
-rw-r--r--po/ca_ES.po148
-rw-r--r--po/cs_CZ.po148
-rw-r--r--po/da_DK.po190
-rw-r--r--po/de_DE.po188
-rw-r--r--po/el.po4515
-rw-r--r--po/es_ES.po343
-rw-r--r--po/eu.po145
-rw-r--r--po/fi_FI.po1045
-rw-r--r--po/fr_FR.po173
-rw-r--r--po/gl_ES.po150
-rw-r--r--po/hu_HU.po166
-rw-r--r--po/it_IT.po699
-rw-r--r--po/nb_NO.po234
-rw-r--r--po/nl_NL.po168
-rw-r--r--po/nn_NO.po191
-rw-r--r--po/pl_PL.po265
-rw-r--r--po/pt_BR.po214
-rw-r--r--po/pt_PT.po4288
-rw-r--r--po/ru_RU.po236
-rw-r--r--po/scummvm.pot107
-rw-r--r--po/sv_SE.po248
-rw-r--r--po/uk_UA.po175
-rw-r--r--po/zh-Latn_CN.po259
-rw-r--r--test/common/span.h789
-rw-r--r--test/common/str.h23
-rw-r--r--test/engines/wintermute/path_utils.h236
-rw-r--r--test/module.mk5
-rw-r--r--video/avi_decoder.cpp19
-rw-r--r--video/coktel_decoder.cpp2
603 files changed, 28841 insertions, 8107 deletions
diff --git a/COPYING.BSD b/COPYING.BSD
index e67b79359a..a46bb675ce 100644
--- a/COPYING.BSD
+++ b/COPYING.BSD
@@ -91,3 +91,31 @@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
BASIS, AND BROWN UNIVERSITY HAS NO OBLIGATION TO PROVIDE MAINTENANCE,
SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+
+Parts of the MT-32 emulator use the following license:
+
+ Copyright (c) 2011, Micael Hildenborg
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of Micael Hildenborg nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY Micael Hildenborg ''AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL Micael Hildenborg BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/COPYRIGHT b/COPYRIGHT
index 5ac5822799..531606a93e 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
ScummVM
-Copyright (C) 2001-2016 by the following:
+Copyright (C) 2001-2017 by the following:
If you have contributed to this project then you deserve to be on this
list. Contact us (see: AUTHORS) and we'll add you.
diff --git a/NEWS b/NEWS
index f1650f0b7e..c7e96789e8 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ For a more comprehensive changelog of the latest experimental code, see:
the current or a specified directory.
- Many options in GUI could be applied without closing the dialog.
- On-the-fly language switching was implemented.
+ - Updated Munt MT-32 emulation code to version 2.0.1pre.
AGOS:
- Fixed subtitle speed setting in the Hebrew version of Simon the Sorcerer 1.
@@ -19,6 +20,9 @@ For a more comprehensive changelog of the latest experimental code, see:
- Added bilinear filtering option for SDL2 fullscreen mode.
- Fixed a bug that caused a crash in the options dialog of the GUI.
+ Drascula:
+ - Fixed bug that made it impossible to talk to the drunkard more than once in the inn.
+
Kyra:
- Fixed a buffer overflow in Lands of Lore.
diff --git a/audio/decoders/wave.cpp b/audio/decoders/wave.cpp
index 803bdf3cf0..55c7034df6 100644
--- a/audio/decoders/wave.cpp
+++ b/audio/decoders/wave.cpp
@@ -61,6 +61,13 @@ bool loadWAVFromStream(Common::SeekableReadStream &stream, int &size, int &rate,
}
stream.read(buf, 4);
+ if (memcmp(buf, "fact", 4) == 0) {
+ // Initial fact chunk, so skip over it
+ uint32 factLen = stream.readUint32LE();
+ stream.skip(factLen);
+ stream.read(buf, 4);
+ }
+
if (memcmp(buf, "fmt ", 4) != 0) {
warning("getWavInfo: No 'fmt' header");
return false;
diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index aaf95b65da..38978b8edf 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -25,9 +25,6 @@
#ifdef USE_MT32EMU
-#include "audio/softsynth/mt32/mt32emu.h"
-#include "audio/softsynth/mt32/ROMInfo.h"
-
#include "audio/softsynth/emumidi.h"
#include "audio/musicplugin.h"
#include "audio/mpu401.h"
@@ -52,16 +49,16 @@
#include "gui/message.h"
-namespace MT32Emu {
-
-class ReportHandlerScummVM : public ReportHandler {
-friend class Synth;
+// prevents load of unused FileStream API because it includes a standard library
+// include, per _sev
+#define MT32EMU_FILE_STREAM_H
-public:
- virtual ~ReportHandlerScummVM() {}
+#include "audio/softsynth/mt32/c_interface/cpp_interface.h"
-protected:
+namespace MT32Emu {
+class ScummVMReportHandler : public MT32Emu::IReportHandler {
+public:
// Callback for debug messages, in vprintf() format
void printDebug(const char *fmt, va_list list) {
Common::String out = Common::String::vformat(fmt, list);
@@ -70,18 +67,32 @@ protected:
// Callbacks for reporting various errors and information
void onErrorControlROM() {
- GUI::MessageDialog dialog("MT32emu: Init Error - Missing or invalid Control ROM image", "OK");
+ GUI::MessageDialog dialog("MT32Emu: Init Error - Missing or invalid Control ROM image", "OK");
dialog.runModal();
error("MT32emu: Init Error - Missing or invalid Control ROM image");
}
void onErrorPCMROM() {
- GUI::MessageDialog dialog("MT32emu: Init Error - Missing PCM ROM image", "OK");
+ GUI::MessageDialog dialog("MT32Emu: Init Error - Missing PCM ROM image", "OK");
dialog.runModal();
error("MT32emu: Init Error - Missing PCM ROM image");
}
void showLCDMessage(const char *message) {
Common::OSDMessageQueue::instance().addMessage(message);
}
+
+ // Unused callbacks
+ virtual void onMIDIMessagePlayed() {}
+ virtual bool onMIDIQueueOverflow() { return false; }
+ virtual void onMIDISystemRealtime(Bit8u /* system_realtime */) {}
+ virtual void onDeviceReset() {}
+ virtual void onDeviceReconfig() {}
+ virtual void onNewReverbMode(Bit8u /* mode */) {}
+ virtual void onNewReverbTime(Bit8u /* time */) {}
+ virtual void onNewReverbLevel(Bit8u /* level */) {}
+ virtual void onPolyStateChanged(Bit8u /* part_num */) {}
+ virtual void onProgramChanged(Bit8u /* part_num */, const char * /* sound_group_name */, const char * /* patch_name */) {}
+
+ virtual ~ScummVMReportHandler() {}
};
} // end of namespace MT32Emu
@@ -95,11 +106,10 @@ class MidiDriver_MT32 : public MidiDriver_Emulated {
private:
MidiChannel_MT32 _midiChannels[16];
uint16 _channelMask;
- MT32Emu::Synth *_synth;
- MT32Emu::ReportHandlerScummVM *_reportHandler;
- const MT32Emu::ROMImage *_controlROM, *_pcmROM;
- Common::File *_controlFile, *_pcmFile;
- void deleteMuntStructures();
+ MT32Emu::Service _service;
+ MT32Emu::ScummVMReportHandler _reportHandler;
+ byte *_controlData, *_pcmData;
+ Common::Mutex _mutex;
int _outputRate;
@@ -107,15 +117,13 @@ protected:
void generateSamples(int16 *buf, int len);
public:
- bool _initializing;
-
MidiDriver_MT32(Audio::Mixer *mixer);
virtual ~MidiDriver_MT32();
int open();
void close();
void send(uint32 b);
- void setPitchBendRange (byte channel, uint range);
+ void setPitchBendRange(byte channel, uint range);
void sysEx(const byte *msg, uint16 length);
uint32 property(int prop, uint32 param);
@@ -139,48 +147,19 @@ MidiDriver_MT32::MidiDriver_MT32(Audio::Mixer *mixer) : MidiDriver_Emulated(mixe
for (i = 0; i < ARRAYSIZE(_midiChannels); ++i) {
_midiChannels[i].init(this, i);
}
- _reportHandler = NULL;
- _synth = NULL;
_outputRate = 0;
- _initializing = false;
-
- // Initialized in open()
- _controlROM = NULL;
- _pcmROM = NULL;
- _controlFile = NULL;
- _pcmFile = NULL;
+ _controlData = nullptr;
+ _pcmData = nullptr;
}
MidiDriver_MT32::~MidiDriver_MT32() {
- deleteMuntStructures();
-}
-
-void MidiDriver_MT32::deleteMuntStructures() {
- delete _synth;
- _synth = NULL;
- delete _reportHandler;
- _reportHandler = NULL;
-
- if (_controlROM)
- MT32Emu::ROMImage::freeROMImage(_controlROM);
- _controlROM = NULL;
- if (_pcmROM)
- MT32Emu::ROMImage::freeROMImage(_pcmROM);
- _pcmROM = NULL;
-
- delete _controlFile;
- _controlFile = NULL;
- delete _pcmFile;
- _pcmFile = NULL;
+ close();
}
int MidiDriver_MT32::open() {
if (_isOpen)
return MERR_ALREADY_OPEN;
- _reportHandler = new MT32Emu::ReportHandlerScummVM();
- _synth = new MT32Emu::Synth(_reportHandler);
-
Graphics::PixelFormat screenFormat = g_system->getScreenFormat();
if (screenFormat.bytesPerPixel == 1) {
@@ -193,43 +172,54 @@ int MidiDriver_MT32::open() {
g_system->getPaletteManager()->setPalette(dummy_palette, 0, 3);
}
- _initializing = true;
debug(4, _s("Initializing MT-32 Emulator"));
- _controlFile = new Common::File();
- if (!_controlFile->open("CM32L_CONTROL.ROM") && !_controlFile->open("MT32_CONTROL.ROM"))
- error("Error opening MT32_CONTROL.ROM / CM32L_CONTROL.ROM");
- _pcmFile = new Common::File();
- if (!_pcmFile->open("CM32L_PCM.ROM") && !_pcmFile->open("MT32_PCM.ROM"))
- error("Error opening MT32_PCM.ROM / CM32L_PCM.ROM");
- _controlROM = MT32Emu::ROMImage::makeROMImage(_controlFile);
- _pcmROM = MT32Emu::ROMImage::makeROMImage(_pcmFile);
- if (!_synth->open(*_controlROM, *_pcmROM))
+
+ Common::File controlFile;
+ if (!controlFile.open("CM32L_CONTROL.ROM") && !controlFile.open("MT32_CONTROL.ROM"))
+ error("Error opening MT32_CONTROL.ROM / CM32L_CONTROL.ROM. Check that your Extra Path in Paths settings is set to the correct directory");
+
+ Common::File pcmFile;
+ if (!pcmFile.open("CM32L_PCM.ROM") && !pcmFile.open("MT32_PCM.ROM"))
+ error("Error opening MT32_PCM.ROM / CM32L_PCM.ROM. Check that your Extra Path in Paths settings is set to the correct directory");
+
+ _controlData = new byte[controlFile.size()];
+ controlFile.read(_controlData, controlFile.size());
+ _pcmData = new byte[pcmFile.size()];
+ pcmFile.read(_pcmData, pcmFile.size());
+
+ _service.createContext(_reportHandler);
+
+ if (_service.addROMData(_controlData, controlFile.size()) != MT32EMU_RC_ADDED_CONTROL_ROM) {
+ error("Adding control ROM failed. Check that your control ROM is valid");
+ }
+
+ controlFile.close();
+
+ if (_service.addROMData(_pcmData, pcmFile.size()) != MT32EMU_RC_ADDED_PCM_ROM) {
+ error("Adding PCM ROM failed. Check that your PCM ROM is valid");
+ }
+
+ pcmFile.close();
+
+ if (_service.openSynth() != MT32EMU_RC_OK)
return MERR_DEVICE_NOT_AVAILABLE;
double gain = (double)ConfMan.getInt("midi_gain") / 100.0;
- _synth->setOutputGain(1.0f * gain);
- _synth->setReverbOutputGain(0.68f * gain);
+ _service.setOutputGain(1.0f * gain);
+ _service.setReverbOutputGain(1.0f * gain);
// We let the synthesizer play MIDI messages immediately. Our MIDI
// handling is synchronous to sample generation. This makes delaying MIDI
// events result in odd sound output in some cases. For example, the
// shattering window in the Indiana Jones and the Fate of Atlantis intro
// will sound like a bell if we use any delay here.
// Bug #6242 "AUDIO: Built-In MT-32 MUNT Produces Wrong Sounds".
- _synth->setMIDIDelayMode(MT32Emu::MIDIDelayMode_IMMEDIATE);
+ _service.setMIDIDelayMode(MT32Emu::MIDIDelayMode_IMMEDIATE);
// We need to report the sample rate MUNT renders at as sample rate of our
// AudioStream.
- _outputRate = _synth->getStereoOutputSampleRate();
- MidiDriver_Emulated::open();
-
- _initializing = false;
+ _outputRate = _service.getActualStereoOutputSamplerate();
- if (screenFormat.bytesPerPixel > 1)
- g_system->fillScreen(screenFormat.RGBToColor(0, 0, 0));
- else
- g_system->fillScreen(0);
-
- g_system->updateScreen();
+ MidiDriver_Emulated::open();
_mixer->playStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
@@ -237,31 +227,37 @@ int MidiDriver_MT32::open() {
}
void MidiDriver_MT32::send(uint32 b) {
- _synth->playMsg(b);
+ Common::StackLock lock(_mutex);
+ _service.playMsg(b);
}
+// Indiana Jones and the Fate of Atlantis (including the demo) uses
+// setPitchBendRange, if you need a game for testing purposes
void MidiDriver_MT32::setPitchBendRange(byte channel, uint range) {
if (range > 24) {
warning("setPitchBendRange() called with range > 24: %d", range);
}
- byte benderRangeSysex[9];
- benderRangeSysex[0] = 0x41; // Roland
- benderRangeSysex[1] = channel;
- benderRangeSysex[2] = 0x16; // MT-32
- benderRangeSysex[3] = 0x12; // Write
- benderRangeSysex[4] = 0x00;
- benderRangeSysex[5] = 0x00;
- benderRangeSysex[6] = 0x04;
- benderRangeSysex[7] = (byte)range;
- benderRangeSysex[8] = MT32Emu::Synth::calcSysexChecksum(&benderRangeSysex[4], 4, 0);
- sysEx(benderRangeSysex, 9);
+ byte benderRangeSysex[4] = { 0, 0, 4, (uint8)range };
+ Common::StackLock lock(_mutex);
+ _service.writeSysex(channel, benderRangeSysex, 4);
}
void MidiDriver_MT32::sysEx(const byte *msg, uint16 length) {
if (msg[0] == 0xf0) {
- _synth->playSysex(msg, length);
+ Common::StackLock lock(_mutex);
+ _service.playSysex(msg, length);
} else {
- _synth->playSysexWithoutFraming(msg, length);
+ enum {
+ SYSEX_CMD_DT1 = 0x12,
+ SYSEX_CMD_DAT = 0x42
+ };
+
+ if (msg[3] == SYSEX_CMD_DT1 || msg[3] == SYSEX_CMD_DAT) {
+ Common::StackLock lock(_mutex);
+ _service.writeSysex(msg[1], msg + 4, length - 5);
+ } else {
+ warning("Unused sysEx command %d", msg[3]);
+ }
}
}
@@ -275,12 +271,18 @@ void MidiDriver_MT32::close() {
// Detach the mixer callback handler
_mixer->stopHandle(_mixerSoundHandle);
- _synth->close();
- deleteMuntStructures();
+ Common::StackLock lock(_mutex);
+ _service.closeSynth();
+ _service.freeContext();
+ delete[] _controlData;
+ _controlData = nullptr;
+ delete[] _pcmData;
+ _pcmData = nullptr;
}
void MidiDriver_MT32::generateSamples(int16 *data, int len) {
- _synth->render(data, len);
+ Common::StackLock lock(_mutex);
+ _service.renderBit16s(data, len);
}
uint32 MidiDriver_MT32::property(int prop, uint32 param) {
diff --git a/audio/softsynth/mt32/Analog.cpp b/audio/softsynth/mt32/Analog.cpp
index 8ac28e401a..31e88561c4 100644..100755
--- a/audio/softsynth/mt32/Analog.cpp
+++ b/audio/softsynth/mt32/Analog.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,8 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-//#include <cstring>
+#include <cstring>
+
+#include "internals.h"
+
#include "Analog.h"
+#include "Synth.h"
namespace MT32Emu {
@@ -106,7 +110,6 @@ static const Bit32u ACCURATE_LPF_DELTAS_OVERSAMPLED[][ACCURATE_LPF_NUMBER_OF_PHA
class AbstractLowPassFilter {
public:
static AbstractLowPassFilter &createLowPassFilter(AnalogOutputMode mode, bool oldMT32AnalogLPF);
- static void muteRingBuffer(SampleEx *ringBuffer, unsigned int length);
virtual ~AbstractLowPassFilter() {}
virtual SampleEx process(SampleEx sample) = 0;
@@ -152,9 +155,9 @@ public:
void addPositionIncrement(unsigned int positionIncrement);
};
-Analog::Analog(const AnalogOutputMode mode, const ControlROMFeatureSet *controlROMFeatures) :
- leftChannelLPF(AbstractLowPassFilter::createLowPassFilter(mode, controlROMFeatures->isOldMT32AnalogLPF())),
- rightChannelLPF(AbstractLowPassFilter::createLowPassFilter(mode, controlROMFeatures->isOldMT32AnalogLPF())),
+Analog::Analog(const AnalogOutputMode mode, const bool oldMT32AnalogLPF) :
+ leftChannelLPF(AbstractLowPassFilter::createLowPassFilter(mode, oldMT32AnalogLPF)),
+ rightChannelLPF(AbstractLowPassFilter::createLowPassFilter(mode, oldMT32AnalogLPF)),
synthGain(0),
reverbGain(0)
{}
@@ -164,7 +167,7 @@ Analog::~Analog() {
delete &rightChannelLPF;
}
-void Analog::process(Sample **outStream, const Sample *nonReverbLeft, const Sample *nonReverbRight, const Sample *reverbDryLeft, const Sample *reverbDryRight, const Sample *reverbWetLeft, const Sample *reverbWetRight, Bit32u outLength) {
+void Analog::process(Sample *outStream, const Sample *nonReverbLeft, const Sample *nonReverbRight, const Sample *reverbDryLeft, const Sample *reverbDryRight, const Sample *reverbWetLeft, const Sample *reverbWetRight, Bit32u outLength) {
if (outStream == NULL) {
leftChannelLPF.addPositionIncrement(outLength);
rightChannelLPF.addPositionIncrement(outLength);
@@ -179,8 +182,8 @@ void Analog::process(Sample **outStream, const Sample *nonReverbLeft, const Samp
outSampleL = leftChannelLPF.process(0);
outSampleR = rightChannelLPF.process(0);
} else {
- SampleEx inSampleL = ((SampleEx)*(nonReverbLeft++) + (SampleEx)*(reverbDryLeft++)) * synthGain + (SampleEx)*(reverbWetLeft++) * reverbGain;
- SampleEx inSampleR = ((SampleEx)*(nonReverbRight++) + (SampleEx)*(reverbDryRight++)) * synthGain + (SampleEx)*(reverbWetRight++) * reverbGain;
+ SampleEx inSampleL = (SampleEx(*(nonReverbLeft++)) + SampleEx(*(reverbDryLeft++))) * synthGain + SampleEx(*(reverbWetLeft++)) * reverbGain;
+ SampleEx inSampleR = (SampleEx(*(nonReverbRight++)) + SampleEx(*(reverbDryRight++))) * synthGain + SampleEx(*(reverbWetRight++)) * reverbGain;
#if !MT32EMU_USE_FLOAT_SAMPLES
inSampleL >>= OUTPUT_GAIN_FRACTION_BITS;
@@ -191,8 +194,8 @@ void Analog::process(Sample **outStream, const Sample *nonReverbLeft, const Samp
outSampleR = rightChannelLPF.process(inSampleR);
}
- *((*outStream)++) = Synth::clipSampleEx(outSampleL);
- *((*outStream)++) = Synth::clipSampleEx(outSampleR);
+ *(outStream++) = Synth::clipSampleEx(outSampleL);
+ *(outStream++) = Synth::clipSampleEx(outSampleR);
}
}
@@ -236,23 +239,6 @@ AbstractLowPassFilter &AbstractLowPassFilter::createLowPassFilter(AnalogOutputMo
}
}
-void AbstractLowPassFilter::muteRingBuffer(SampleEx *ringBuffer, unsigned int length) {
-
-#if MT32EMU_USE_FLOAT_SAMPLES
-
- SampleEx *p = ringBuffer;
- while (length--) {
- *(p++) = 0.0f;
- }
-
-#else
-
- memset(ringBuffer, 0, length * sizeof(SampleEx));
-
-#endif
-
-}
-
bool AbstractLowPassFilter::hasNextSample() const {
return false;
}
@@ -273,7 +259,7 @@ CoarseLowPassFilter::CoarseLowPassFilter(bool oldMT32AnalogLPF) :
LPF_TAPS(oldMT32AnalogLPF ? COARSE_LPF_TAPS_MT32 : COARSE_LPF_TAPS_CM32L),
ringBufferPosition(0)
{
- muteRingBuffer(ringBuffer, COARSE_LPF_DELAY_LINE_LENGTH);
+ Synth::muteSampleBuffer(ringBuffer, COARSE_LPF_DELAY_LINE_LENGTH);
}
SampleEx CoarseLowPassFilter::process(const SampleEx inSample) {
@@ -303,7 +289,7 @@ AccurateLowPassFilter::AccurateLowPassFilter(const bool oldMT32AnalogLPF, const
ringBufferPosition(0),
phase(0)
{
- muteRingBuffer(ringBuffer, ACCURATE_LPF_DELAY_LINE_LENGTH);
+ Synth::muteSampleBuffer(ringBuffer, ACCURATE_LPF_DELAY_LINE_LENGTH);
}
SampleEx AccurateLowPassFilter::process(const SampleEx inSample) {
@@ -345,4 +331,4 @@ void AccurateLowPassFilter::addPositionIncrement(const unsigned int positionIncr
phase = (phase + positionIncrement * phaseIncrement) % ACCURATE_LPF_NUMBER_OF_PHASES;
}
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/Analog.h b/audio/softsynth/mt32/Analog.h
index a48db72485..ee642f280d 100644..100755
--- a/audio/softsynth/mt32/Analog.h
+++ b/audio/softsynth/mt32/Analog.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,7 +18,10 @@
#ifndef MT32EMU_ANALOG_H
#define MT32EMU_ANALOG_H
-#include "mt32emu.h"
+#include "globals.h"
+#include "internals.h"
+#include "Types.h"
+#include "Enumerations.h"
namespace MT32Emu {
@@ -35,9 +38,9 @@ class AbstractLowPassFilter;
*/
class Analog {
public:
- Analog(AnalogOutputMode mode, const ControlROMFeatureSet *controlROMFeatures);
+ Analog(const AnalogOutputMode mode, const bool oldMT32AnalogLPF);
~Analog();
- void process(Sample **outStream, const Sample *nonReverbLeft, const Sample *nonReverbRight, const Sample *reverbDryLeft, const Sample *reverbDryRight, const Sample *reverbWetLeft, const Sample *reverbWetRight, const Bit32u outLength);
+ void process(Sample *outStream, const Sample *nonReverbLeft, const Sample *nonReverbRight, const Sample *reverbDryLeft, const Sample *reverbDryRight, const Sample *reverbWetLeft, const Sample *reverbWetRight, Bit32u outLength);
unsigned int getOutputSampleRate() const;
Bit32u getDACStreamsLength(Bit32u outputLength) const;
void setSynthOutputGain(float synthGain);
@@ -52,6 +55,6 @@ private:
Analog(Analog &);
};
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_ANALOG_H
diff --git a/audio/softsynth/mt32/BReverbModel.cpp b/audio/softsynth/mt32/BReverbModel.cpp
index 5e02db8f99..2be1b418a2 100644..100755
--- a/audio/softsynth/mt32/BReverbModel.cpp
+++ b/audio/softsynth/mt32/BReverbModel.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,9 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-//#include <cstring>
-#include "mt32emu.h"
+#include <cstddef>
+
+#include "internals.h"
+
#include "BReverbModel.h"
+#include "Synth.h"
// Analysing of state of reverb RAM address lines gives exact sizes of the buffers of filters used. This also indicates that
// the reverb model implemented in the real devices consists of three series allpass filters preceded by a non-feedback comb (or a delay with a LPF)
@@ -43,14 +46,14 @@ const BReverbSettings &BReverbModel::getCM32L_LAPCSettings(const ReverbMode mode
static const Bit32u MODE_0_COMBS[] = {705 + PROCESS_DELAY, 2349, 2839, 3632};
static const Bit32u MODE_0_OUTL[] = {2349, 141, 1960};
static const Bit32u MODE_0_OUTR[] = {1174, 1570, 145};
- static const Bit32u MODE_0_COMB_FACTOR[] = {0xA0, 0x60, 0x60, 0x60};
- static const Bit32u MODE_0_COMB_FEEDBACK[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ static const Bit8u MODE_0_COMB_FACTOR[] = {0xA0, 0x60, 0x60, 0x60};
+ static const Bit8u MODE_0_COMB_FEEDBACK[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x28, 0x48, 0x60, 0x78, 0x80, 0x88, 0x90, 0x98,
0x28, 0x48, 0x60, 0x78, 0x80, 0x88, 0x90, 0x98,
0x28, 0x48, 0x60, 0x78, 0x80, 0x88, 0x90, 0x98};
- static const Bit32u MODE_0_DRY_AMP[] = {0xA0, 0xA0, 0xA0, 0xA0, 0xB0, 0xB0, 0xB0, 0xD0};
- static const Bit32u MODE_0_WET_AMP[] = {0x10, 0x30, 0x50, 0x70, 0x90, 0xC0, 0xF0, 0xF0};
- static const Bit32u MODE_0_LPF_AMP = 0x60;
+ static const Bit8u MODE_0_DRY_AMP[] = {0xA0, 0xA0, 0xA0, 0xA0, 0xB0, 0xB0, 0xB0, 0xD0};
+ static const Bit8u MODE_0_WET_AMP[] = {0x10, 0x30, 0x50, 0x70, 0x90, 0xC0, 0xF0, 0xF0};
+ static const Bit8u MODE_0_LPF_AMP = 0x60;
static const Bit32u MODE_1_NUMBER_OF_ALLPASSES = 3;
static const Bit32u MODE_1_ALLPASSES[] = {1324, 809, 176};
@@ -58,14 +61,14 @@ const BReverbSettings &BReverbModel::getCM32L_LAPCSettings(const ReverbMode mode
static const Bit32u MODE_1_COMBS[] = {961 + PROCESS_DELAY, 2619, 3545, 4519};
static const Bit32u MODE_1_OUTL[] = {2618, 1760, 4518};
static const Bit32u MODE_1_OUTR[] = {1300, 3532, 2274};
- static const Bit32u MODE_1_COMB_FACTOR[] = {0x80, 0x60, 0x60, 0x60};
- static const Bit32u MODE_1_COMB_FEEDBACK[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ static const Bit8u MODE_1_COMB_FACTOR[] = {0x80, 0x60, 0x60, 0x60};
+ static const Bit8u MODE_1_COMB_FEEDBACK[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x28, 0x48, 0x60, 0x70, 0x78, 0x80, 0x90, 0x98,
0x28, 0x48, 0x60, 0x78, 0x80, 0x88, 0x90, 0x98,
0x28, 0x48, 0x60, 0x78, 0x80, 0x88, 0x90, 0x98};
- static const Bit32u MODE_1_DRY_AMP[] = {0xA0, 0xA0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xE0};
- static const Bit32u MODE_1_WET_AMP[] = {0x10, 0x30, 0x50, 0x70, 0x90, 0xC0, 0xF0, 0xF0};
- static const Bit32u MODE_1_LPF_AMP = 0x60;
+ static const Bit8u MODE_1_DRY_AMP[] = {0xA0, 0xA0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xE0};
+ static const Bit8u MODE_1_WET_AMP[] = {0x10, 0x30, 0x50, 0x70, 0x90, 0xC0, 0xF0, 0xF0};
+ static const Bit8u MODE_1_LPF_AMP = 0x60;
static const Bit32u MODE_2_NUMBER_OF_ALLPASSES = 3;
static const Bit32u MODE_2_ALLPASSES[] = {969, 644, 157};
@@ -73,25 +76,25 @@ const BReverbSettings &BReverbModel::getCM32L_LAPCSettings(const ReverbMode mode
static const Bit32u MODE_2_COMBS[] = {116 + PROCESS_DELAY, 2259, 2839, 3539};
static const Bit32u MODE_2_OUTL[] = {2259, 718, 1769};
static const Bit32u MODE_2_OUTR[] = {1136, 2128, 1};
- static const Bit32u MODE_2_COMB_FACTOR[] = {0, 0x20, 0x20, 0x20};
- static const Bit32u MODE_2_COMB_FEEDBACK[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ static const Bit8u MODE_2_COMB_FACTOR[] = {0, 0x20, 0x20, 0x20};
+ static const Bit8u MODE_2_COMB_FEEDBACK[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x30, 0x58, 0x78, 0x88, 0xA0, 0xB8, 0xC0, 0xD0,
0x30, 0x58, 0x78, 0x88, 0xA0, 0xB8, 0xC0, 0xD0,
0x30, 0x58, 0x78, 0x88, 0xA0, 0xB8, 0xC0, 0xD0};
- static const Bit32u MODE_2_DRY_AMP[] = {0xA0, 0xA0, 0xB0, 0xB0, 0xB0, 0xB0, 0xC0, 0xE0};
- static const Bit32u MODE_2_WET_AMP[] = {0x10, 0x30, 0x50, 0x70, 0x90, 0xC0, 0xF0, 0xF0};
- static const Bit32u MODE_2_LPF_AMP = 0x80;
+ static const Bit8u MODE_2_DRY_AMP[] = {0xA0, 0xA0, 0xB0, 0xB0, 0xB0, 0xB0, 0xC0, 0xE0};
+ static const Bit8u MODE_2_WET_AMP[] = {0x10, 0x30, 0x50, 0x70, 0x90, 0xC0, 0xF0, 0xF0};
+ static const Bit8u MODE_2_LPF_AMP = 0x80;
static const Bit32u MODE_3_NUMBER_OF_ALLPASSES = 0;
static const Bit32u MODE_3_NUMBER_OF_COMBS = 1;
static const Bit32u MODE_3_DELAY[] = {16000 + MODE_3_FEEDBACK_DELAY + PROCESS_DELAY + MODE_3_ADDITIONAL_DELAY};
static const Bit32u MODE_3_OUTL[] = {400, 624, 960, 1488, 2256, 3472, 5280, 8000};
static const Bit32u MODE_3_OUTR[] = {800, 1248, 1920, 2976, 4512, 6944, 10560, 16000};
- static const Bit32u MODE_3_COMB_FACTOR[] = {0x68};
- static const Bit32u MODE_3_COMB_FEEDBACK[] = {0x68, 0x60};
- static const Bit32u MODE_3_DRY_AMP[] = {0x20, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50,
+ static const Bit8u MODE_3_COMB_FACTOR[] = {0x68};
+ static const Bit8u MODE_3_COMB_FEEDBACK[] = {0x68, 0x60};
+ static const Bit8u MODE_3_DRY_AMP[] = {0x20, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50,
0x20, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50};
- static const Bit32u MODE_3_WET_AMP[] = {0x18, 0x18, 0x28, 0x40, 0x60, 0x80, 0xA8, 0xF8};
+ static const Bit8u MODE_3_WET_AMP[] = {0x18, 0x18, 0x28, 0x40, 0x60, 0x80, 0xA8, 0xF8};
static const BReverbSettings REVERB_MODE_0_SETTINGS = {MODE_0_NUMBER_OF_ALLPASSES, MODE_0_ALLPASSES, MODE_0_NUMBER_OF_COMBS, MODE_0_COMBS, MODE_0_OUTL, MODE_0_OUTR, MODE_0_COMB_FACTOR, MODE_0_COMB_FEEDBACK, MODE_0_DRY_AMP, MODE_0_WET_AMP, MODE_0_LPF_AMP};
static const BReverbSettings REVERB_MODE_1_SETTINGS = {MODE_1_NUMBER_OF_ALLPASSES, MODE_1_ALLPASSES, MODE_1_NUMBER_OF_COMBS, MODE_1_COMBS, MODE_1_OUTL, MODE_1_OUTR, MODE_1_COMB_FACTOR, MODE_1_COMB_FEEDBACK, MODE_1_DRY_AMP, MODE_1_WET_AMP, MODE_1_LPF_AMP};
@@ -112,14 +115,14 @@ const BReverbSettings &BReverbModel::getMT32Settings(const ReverbMode mode) {
static const Bit32u MODE_0_COMBS[] = {575 + PROCESS_DELAY, 2040, 2752, 3629};
static const Bit32u MODE_0_OUTL[] = {2040, 687, 1814};
static const Bit32u MODE_0_OUTR[] = {1019, 2072, 1};
- static const Bit32u MODE_0_COMB_FACTOR[] = {0xB0, 0x60, 0x60, 0x60};
- static const Bit32u MODE_0_COMB_FEEDBACK[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ static const Bit8u MODE_0_COMB_FACTOR[] = {0xB0, 0x60, 0x60, 0x60};
+ static const Bit8u MODE_0_COMB_FEEDBACK[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x28, 0x48, 0x60, 0x70, 0x78, 0x80, 0x90, 0x98,
0x28, 0x48, 0x60, 0x78, 0x80, 0x88, 0x90, 0x98,
0x28, 0x48, 0x60, 0x78, 0x80, 0x88, 0x90, 0x98};
- static const Bit32u MODE_0_DRY_AMP[] = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80};
- static const Bit32u MODE_0_WET_AMP[] = {0x10, 0x20, 0x30, 0x40, 0x50, 0x70, 0xA0, 0xE0};
- static const Bit32u MODE_0_LPF_AMP = 0x80;
+ static const Bit8u MODE_0_DRY_AMP[] = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80};
+ static const Bit8u MODE_0_WET_AMP[] = {0x10, 0x20, 0x30, 0x40, 0x50, 0x70, 0xA0, 0xE0};
+ static const Bit8u MODE_0_LPF_AMP = 0x80;
static const Bit32u MODE_1_NUMBER_OF_ALLPASSES = 3;
static const Bit32u MODE_1_ALLPASSES[] = {1324, 809, 176};
@@ -127,14 +130,14 @@ const BReverbSettings &BReverbModel::getMT32Settings(const ReverbMode mode) {
static const Bit32u MODE_1_COMBS[] = {961 + PROCESS_DELAY, 2619, 3545, 4519};
static const Bit32u MODE_1_OUTL[] = {2618, 1760, 4518};
static const Bit32u MODE_1_OUTR[] = {1300, 3532, 2274};
- static const Bit32u MODE_1_COMB_FACTOR[] = {0x90, 0x60, 0x60, 0x60};
- static const Bit32u MODE_1_COMB_FEEDBACK[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ static const Bit8u MODE_1_COMB_FACTOR[] = {0x90, 0x60, 0x60, 0x60};
+ static const Bit8u MODE_1_COMB_FEEDBACK[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x28, 0x48, 0x60, 0x70, 0x78, 0x80, 0x90, 0x98,
0x28, 0x48, 0x60, 0x78, 0x80, 0x88, 0x90, 0x98,
0x28, 0x48, 0x60, 0x78, 0x80, 0x88, 0x90, 0x98};
- static const Bit32u MODE_1_DRY_AMP[] = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80};
- static const Bit32u MODE_1_WET_AMP[] = {0x10, 0x20, 0x30, 0x40, 0x50, 0x70, 0xA0, 0xE0};
- static const Bit32u MODE_1_LPF_AMP = 0x80;
+ static const Bit8u MODE_1_DRY_AMP[] = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80};
+ static const Bit8u MODE_1_WET_AMP[] = {0x10, 0x20, 0x30, 0x40, 0x50, 0x70, 0xA0, 0xE0};
+ static const Bit8u MODE_1_LPF_AMP = 0x80;
static const Bit32u MODE_2_NUMBER_OF_ALLPASSES = 3;
static const Bit32u MODE_2_ALLPASSES[] = {969, 644, 157};
@@ -142,25 +145,25 @@ const BReverbSettings &BReverbModel::getMT32Settings(const ReverbMode mode) {
static const Bit32u MODE_2_COMBS[] = {116 + PROCESS_DELAY, 2259, 2839, 3539};
static const Bit32u MODE_2_OUTL[] = {2259, 718, 1769};
static const Bit32u MODE_2_OUTR[] = {1136, 2128, 1};
- static const Bit32u MODE_2_COMB_FACTOR[] = {0, 0x60, 0x60, 0x60};
- static const Bit32u MODE_2_COMB_FEEDBACK[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ static const Bit8u MODE_2_COMB_FACTOR[] = {0, 0x60, 0x60, 0x60};
+ static const Bit8u MODE_2_COMB_FEEDBACK[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x28, 0x48, 0x60, 0x70, 0x78, 0x80, 0x90, 0x98,
0x28, 0x48, 0x60, 0x78, 0x80, 0x88, 0x90, 0x98,
0x28, 0x48, 0x60, 0x78, 0x80, 0x88, 0x90, 0x98};
- static const Bit32u MODE_2_DRY_AMP[] = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80};
- static const Bit32u MODE_2_WET_AMP[] = {0x10, 0x20, 0x30, 0x40, 0x50, 0x70, 0xA0, 0xE0};
- static const Bit32u MODE_2_LPF_AMP = 0x80;
+ static const Bit8u MODE_2_DRY_AMP[] = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80};
+ static const Bit8u MODE_2_WET_AMP[] = {0x10, 0x20, 0x30, 0x40, 0x50, 0x70, 0xA0, 0xE0};
+ static const Bit8u MODE_2_LPF_AMP = 0x80;
static const Bit32u MODE_3_NUMBER_OF_ALLPASSES = 0;
static const Bit32u MODE_3_NUMBER_OF_COMBS = 1;
static const Bit32u MODE_3_DELAY[] = {16000 + MODE_3_FEEDBACK_DELAY + PROCESS_DELAY + MODE_3_ADDITIONAL_DELAY};
static const Bit32u MODE_3_OUTL[] = {400, 624, 960, 1488, 2256, 3472, 5280, 8000};
static const Bit32u MODE_3_OUTR[] = {800, 1248, 1920, 2976, 4512, 6944, 10560, 16000};
- static const Bit32u MODE_3_COMB_FACTOR[] = {0x68};
- static const Bit32u MODE_3_COMB_FEEDBACK[] = {0x68, 0x60};
- static const Bit32u MODE_3_DRY_AMP[] = {0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ static const Bit8u MODE_3_COMB_FACTOR[] = {0x68};
+ static const Bit8u MODE_3_COMB_FEEDBACK[] = {0x68, 0x60};
+ static const Bit8u MODE_3_DRY_AMP[] = {0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x10, 0x20, 0x20, 0x10, 0x20, 0x10, 0x20, 0x10};
- static const Bit32u MODE_3_WET_AMP[] = {0x08, 0x18, 0x28, 0x40, 0x60, 0x80, 0xA8, 0xF8};
+ static const Bit8u MODE_3_WET_AMP[] = {0x08, 0x18, 0x28, 0x40, 0x60, 0x80, 0xA8, 0xF8};
static const BReverbSettings REVERB_MODE_0_SETTINGS = {MODE_0_NUMBER_OF_ALLPASSES, MODE_0_ALLPASSES, MODE_0_NUMBER_OF_COMBS, MODE_0_COMBS, MODE_0_OUTL, MODE_0_OUTR, MODE_0_COMB_FACTOR, MODE_0_COMB_FEEDBACK, MODE_0_DRY_AMP, MODE_0_WET_AMP, MODE_0_LPF_AMP};
static const BReverbSettings REVERB_MODE_1_SETTINGS = {MODE_1_NUMBER_OF_ALLPASSES, MODE_1_ALLPASSES, MODE_1_NUMBER_OF_COMBS, MODE_1_COMBS, MODE_1_OUTL, MODE_1_OUTR, MODE_1_COMB_FACTOR, MODE_1_COMB_FEEDBACK, MODE_1_DRY_AMP, MODE_1_WET_AMP, MODE_1_LPF_AMP};
@@ -189,7 +192,7 @@ static Sample weirdMul(Sample a, Bit8u addMask, Bit8u carryMask) {
}
return res;
#else
- return Sample(((Bit32s)a * addMask) >> 8);
+ return Sample((Bit32s(a) * addMask) >> 8);
#endif
}
@@ -252,7 +255,7 @@ Sample AllpassFilter::process(const Sample in) {
#endif
}
-CombFilter::CombFilter(const Bit32u useSize, const Bit32u useFilterFactor) : RingBuffer(useSize), filterFactor(useFilterFactor) {}
+CombFilter::CombFilter(const Bit32u useSize, const Bit8u useFilterFactor) : RingBuffer(useSize), filterFactor(useFilterFactor) {}
void CombFilter::process(const Sample in) {
// This model corresponds to the comb filter implementation of the real CM-32L device
@@ -271,11 +274,11 @@ Sample CombFilter::getOutputAt(const Bit32u outIndex) const {
return buffer[(size + index - outIndex) % size];
}
-void CombFilter::setFeedbackFactor(const Bit32u useFeedbackFactor) {
+void CombFilter::setFeedbackFactor(const Bit8u useFeedbackFactor) {
feedbackFactor = useFeedbackFactor;
}
-DelayWithLowPassFilter::DelayWithLowPassFilter(const Bit32u useSize, const Bit32u useFilterFactor, const Bit32u useAmp)
+DelayWithLowPassFilter::DelayWithLowPassFilter(const Bit32u useSize, const Bit8u useFilterFactor, const Bit8u useAmp)
: CombFilter(useSize, useFilterFactor), amp(useAmp) {}
void DelayWithLowPassFilter::process(const Sample in) {
@@ -292,7 +295,7 @@ void DelayWithLowPassFilter::process(const Sample in) {
buffer[index] = weirdMul(lpfOut, amp, 0xFF);
}
-TapDelayCombFilter::TapDelayCombFilter(const Bit32u useSize, const Bit32u useFilterFactor) : CombFilter(useSize, useFilterFactor) {}
+TapDelayCombFilter::TapDelayCombFilter(const Bit32u useSize, const Bit8u useFilterFactor) : CombFilter(useSize, useFilterFactor) {}
void TapDelayCombFilter::process(const Sample in) {
// the previously stored value
@@ -430,7 +433,7 @@ bool BReverbModel::isMT32Compatible(const ReverbMode mode) const {
return &currentSettings == &getMT32Settings(mode);
}
-void BReverbModel::process(const Sample *inLeft, const Sample *inRight, Sample *outLeft, Sample *outRight, unsigned long numSamples) {
+void BReverbModel::process(const Sample *inLeft, const Sample *inRight, Sample *outLeft, Sample *outRight, Bit32u numSamples) {
if (combs == NULL) {
Synth::muteSampleBuffer(outLeft, numSamples);
Synth::muteSampleBuffer(outRight, numSamples);
@@ -501,9 +504,9 @@ void BReverbModel::process(const Sample *inLeft, const Sample *inRight, Sample *
* Analysing of the algorithm suggests that the overflow is most probable when the combs output is added below.
* So, despite this isn't actually accurate, we only add the check here for performance reasons.
*/
- Sample outSample = Synth::clipSampleEx(Synth::clipSampleEx(Synth::clipSampleEx(Synth::clipSampleEx((SampleEx)outL1 + SampleEx(outL1 >> 1)) + (SampleEx)outL2) + SampleEx(outL2 >> 1)) + (SampleEx)outL3);
+ Sample outSample = Synth::clipSampleEx(Synth::clipSampleEx(Synth::clipSampleEx(Synth::clipSampleEx(SampleEx(outL1) + (SampleEx(outL1) >> 1)) + SampleEx(outL2)) + (SampleEx(outL2) >> 1)) + SampleEx(outL3));
#else
- Sample outSample = Synth::clipSampleEx((SampleEx)outL1 + SampleEx(outL1 >> 1) + (SampleEx)outL2 + SampleEx(outL2 >> 1) + (SampleEx)outL3);
+ Sample outSample = Synth::clipSampleEx(SampleEx(outL1) + (SampleEx(outL1) >> 1) + SampleEx(outL2) + (SampleEx(outL2) >> 1) + SampleEx(outL3));
#endif
*(outLeft++) = weirdMul(outSample, wetLevel, 0xFF);
}
@@ -515,9 +518,9 @@ void BReverbModel::process(const Sample *inLeft, const Sample *inRight, Sample *
Sample outSample = 1.5f * (outR1 + outR2) + outR3;
#elif MT32EMU_BOSS_REVERB_PRECISE_MODE
// See the note above for the left channel output.
- Sample outSample = Synth::clipSampleEx(Synth::clipSampleEx(Synth::clipSampleEx(Synth::clipSampleEx((SampleEx)outR1 + SampleEx(outR1 >> 1)) + (SampleEx)outR2) + SampleEx(outR2 >> 1)) + (SampleEx)outR3);
+ Sample outSample = Synth::clipSampleEx(Synth::clipSampleEx(Synth::clipSampleEx(Synth::clipSampleEx(SampleEx(outR1) + (SampleEx(outR1) >> 1)) + SampleEx(outR2)) + (SampleEx(outR2) >> 1)) + SampleEx(outR3));
#else
- Sample outSample = Synth::clipSampleEx((SampleEx)outR1 + SampleEx(outR1 >> 1) + (SampleEx)outR2 + SampleEx(outR2 >> 1) + (SampleEx)outR3);
+ Sample outSample = Synth::clipSampleEx(SampleEx(outR1) + (SampleEx(outR1) >> 1) + SampleEx(outR2) + (SampleEx(outR2) >> 1) + SampleEx(outR3));
#endif
*(outRight++) = weirdMul(outSample, wetLevel, 0xFF);
}
@@ -525,4 +528,4 @@ void BReverbModel::process(const Sample *inLeft, const Sample *inRight, Sample *
}
}
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/BReverbModel.h b/audio/softsynth/mt32/BReverbModel.h
index 764daf1a9e..8cfc5da8a3 100644..100755
--- a/audio/softsynth/mt32/BReverbModel.h
+++ b/audio/softsynth/mt32/BReverbModel.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,6 +18,10 @@
#ifndef MT32EMU_B_REVERB_MODEL_H
#define MT32EMU_B_REVERB_MODEL_H
+#include "globals.h"
+#include "internals.h"
+#include "Types.h"
+
namespace MT32Emu {
struct BReverbSettings {
@@ -27,11 +31,11 @@ struct BReverbSettings {
const Bit32u * const combSizes;
const Bit32u * const outLPositions;
const Bit32u * const outRPositions;
- const Bit32u * const filterFactors;
- const Bit32u * const feedbackFactors;
- const Bit32u * const dryAmps;
- const Bit32u * const wetLevels;
- const Bit32u lpfAmp;
+ const Bit8u * const filterFactors;
+ const Bit8u * const feedbackFactors;
+ const Bit8u * const dryAmps;
+ const Bit8u * const wetLevels;
+ const Bit8u lpfAmp;
};
class RingBuffer {
@@ -56,23 +60,23 @@ public:
class CombFilter : public RingBuffer {
protected:
- const Bit32u filterFactor;
- Bit32u feedbackFactor;
+ const Bit8u filterFactor;
+ Bit8u feedbackFactor;
public:
- CombFilter(const Bit32u size, const Bit32u useFilterFactor);
+ CombFilter(const Bit32u size, const Bit8u useFilterFactor);
virtual void process(const Sample in);
Sample getOutputAt(const Bit32u outIndex) const;
- void setFeedbackFactor(const Bit32u useFeedbackFactor);
+ void setFeedbackFactor(const Bit8u useFeedbackFactor);
};
class DelayWithLowPassFilter : public CombFilter {
- Bit32u amp;
+ Bit8u amp;
public:
- DelayWithLowPassFilter(const Bit32u useSize, const Bit32u useFilterFactor, const Bit32u useAmp);
+ DelayWithLowPassFilter(const Bit32u useSize, const Bit8u useFilterFactor, const Bit8u useAmp);
void process(const Sample in);
- void setFeedbackFactor(const Bit32u) {}
+ void setFeedbackFactor(const Bit8u) {}
};
class TapDelayCombFilter : public CombFilter {
@@ -80,7 +84,7 @@ class TapDelayCombFilter : public CombFilter {
Bit32u outR;
public:
- TapDelayCombFilter(const Bit32u useSize, const Bit32u useFilterFactor);
+ TapDelayCombFilter(const Bit32u useSize, const Bit8u useFilterFactor);
void process(const Sample in);
Sample getLeftOutput() const;
Sample getRightOutput() const;
@@ -93,8 +97,8 @@ class BReverbModel {
const BReverbSettings &currentSettings;
const bool tapDelayMode;
- Bit32u dryAmp;
- Bit32u wetLevel;
+ Bit8u dryAmp;
+ Bit8u wetLevel;
static const BReverbSettings &getCM32L_LAPCSettings(const ReverbMode mode);
static const BReverbSettings &getMT32Settings(const ReverbMode mode);
@@ -108,11 +112,11 @@ public:
void close();
void mute();
void setParameters(Bit8u time, Bit8u level);
- void process(const Sample *inLeft, const Sample *inRight, Sample *outLeft, Sample *outRight, unsigned long numSamples);
+ void process(const Sample *inLeft, const Sample *inRight, Sample *outLeft, Sample *outRight, Bit32u numSamples);
bool isActive() const;
bool isMT32Compatible(const ReverbMode mode) const;
};
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_B_REVERB_MODEL_H
diff --git a/audio/softsynth/mt32/Enumerations.h b/audio/softsynth/mt32/Enumerations.h
new file mode 100755
index 0000000000..9b0a35d0bf
--- /dev/null
+++ b/audio/softsynth/mt32/Enumerations.h
@@ -0,0 +1,155 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Using two guards since this file may be included twice with different MT32EMU_C_ENUMERATIONS define. */
+
+#if (!defined MT32EMU_CPP_ENUMERATIONS_H && !defined MT32EMU_C_ENUMERATIONS) || (!defined MT32EMU_C_ENUMERATIONS_H && defined MT32EMU_C_ENUMERATIONS)
+
+#ifdef MT32EMU_C_ENUMERATIONS
+
+#define MT32EMU_C_ENUMERATIONS_H
+
+#define MT32EMU_DAC_INPUT_MODE_NAME mt32emu_dac_input_mode
+#define MT32EMU_DAC_INPUT_MODE(ident) MT32EMU_DAC_##ident
+
+#define MT32EMU_MIDI_DELAY_MODE_NAME mt32emu_midi_delay_mode
+#define MT32EMU_MIDI_DELAY_MODE(ident) MT32EMU_MDM_##ident
+
+#define MT32EMU_ANALOG_OUTPUT_MODE_NAME mt32emu_analog_output_mode
+#define MT32EMU_ANALOG_OUTPUT_MODE(ident) MT32EMU_AOM_##ident
+
+#define MT32EMU_PARTIAL_STATE_NAME mt32emu_partial_state
+#define MT32EMU_PARTIAL_STATE(ident) MT32EMU_PS_##ident
+
+#else /* #ifdef MT32EMU_C_ENUMERATIONS */
+
+#define MT32EMU_CPP_ENUMERATIONS_H
+
+#define MT32EMU_DAC_INPUT_MODE_NAME DACInputMode
+#define MT32EMU_DAC_INPUT_MODE(ident) DACInputMode_##ident
+
+#define MT32EMU_MIDI_DELAY_MODE_NAME MIDIDelayMode
+#define MT32EMU_MIDI_DELAY_MODE(ident) MIDIDelayMode_##ident
+
+#define MT32EMU_ANALOG_OUTPUT_MODE_NAME AnalogOutputMode
+#define MT32EMU_ANALOG_OUTPUT_MODE(ident) AnalogOutputMode_##ident
+
+#define MT32EMU_PARTIAL_STATE_NAME PartialState
+#define MT32EMU_PARTIAL_STATE(ident) PartialState_##ident
+
+namespace MT32Emu {
+
+#endif /* #ifdef MT32EMU_C_ENUMERATIONS */
+
+/**
+ * Methods for emulating the connection between the LA32 and the DAC, which involves
+ * some hacks in the real devices for doubling the volume.
+ * See also http://en.wikipedia.org/wiki/Roland_MT-32#Digital_overflow
+ */
+enum MT32EMU_DAC_INPUT_MODE_NAME {
+ /**
+ * Produces samples at double the volume, without tricks.
+ * Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)
+ * Higher quality than the real devices
+ */
+ MT32EMU_DAC_INPUT_MODE(NICE),
+
+ /**
+ * Produces samples that exactly match the bits output from the emulated LA32.
+ * Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)
+ * Much less likely to overdrive than any other mode.
+ * Half the volume of any of the other modes.
+ * Output gain is ignored for both LA32 and reverb output.
+ * Perfect for developers while debugging :)
+ */
+ MT32EMU_DAC_INPUT_MODE(PURE),
+
+ /**
+ * Re-orders the LA32 output bits as in early generation MT-32s (according to Wikipedia).
+ * Bit order at DAC (where each number represents the original LA32 output bit number, and XX means the bit is always low):
+ * 15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 XX
+ */
+ MT32EMU_DAC_INPUT_MODE(GENERATION1),
+
+ /**
+ * Re-orders the LA32 output bits as in later generations (personally confirmed on my CM-32L - KG).
+ * Bit order at DAC (where each number represents the original LA32 output bit number):
+ * 15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 14
+ */
+ MT32EMU_DAC_INPUT_MODE(GENERATION2)
+};
+
+/** Methods for emulating the effective delay of incoming MIDI messages introduced by a MIDI interface. */
+enum MT32EMU_MIDI_DELAY_MODE_NAME {
+ /** Process incoming MIDI events immediately. */
+ MT32EMU_MIDI_DELAY_MODE(IMMEDIATE),
+
+ /**
+ * Delay incoming short MIDI messages as if they where transferred via a MIDI cable to a real hardware unit and immediate sysex processing.
+ * This ensures more accurate timing of simultaneous NoteOn messages.
+ */
+ MT32EMU_MIDI_DELAY_MODE(DELAY_SHORT_MESSAGES_ONLY),
+
+ /** Delay all incoming MIDI events as if they where transferred via a MIDI cable to a real hardware unit.*/
+ MT32EMU_MIDI_DELAY_MODE(DELAY_ALL)
+};
+
+/** Methods for emulating the effects of analogue circuits of real hardware units on the output signal. */
+enum MT32EMU_ANALOG_OUTPUT_MODE_NAME {
+ /** Only digital path is emulated. The output samples correspond to the digital signal at the DAC entrance. */
+ MT32EMU_ANALOG_OUTPUT_MODE(DIGITAL_ONLY),
+ /** Coarse emulation of LPF circuit. High frequencies are boosted, sample rate remains unchanged. */
+ MT32EMU_ANALOG_OUTPUT_MODE(COARSE),
+ /**
+ * Finer emulation of LPF circuit. Output signal is upsampled to 48 kHz to allow emulation of audible mirror spectra above 16 kHz,
+ * which is passed through the LPF circuit without significant attenuation.
+ */
+ MT32EMU_ANALOG_OUTPUT_MODE(ACCURATE),
+ /**
+ * Same as AnalogOutputMode_ACCURATE mode but the output signal is 2x oversampled, i.e. the output sample rate is 96 kHz.
+ * This makes subsequent resampling easier. Besides, due to nonlinear passband of the LPF emulated, it takes fewer number of MACs
+ * compared to a regular LPF FIR implementations.
+ */
+ MT32EMU_ANALOG_OUTPUT_MODE(OVERSAMPLED)
+};
+
+enum MT32EMU_PARTIAL_STATE_NAME {
+ MT32EMU_PARTIAL_STATE(INACTIVE),
+ MT32EMU_PARTIAL_STATE(ATTACK),
+ MT32EMU_PARTIAL_STATE(SUSTAIN),
+ MT32EMU_PARTIAL_STATE(RELEASE)
+};
+
+#ifndef MT32EMU_C_ENUMERATIONS
+
+} // namespace MT32Emu
+
+#endif
+
+#undef MT32EMU_DAC_INPUT_MODE_NAME
+#undef MT32EMU_DAC_INPUT_MODE
+
+#undef MT32EMU_MIDI_DELAY_MODE_NAME
+#undef MT32EMU_MIDI_DELAY_MODE
+
+#undef MT32EMU_ANALOG_OUTPUT_MODE_NAME
+#undef MT32EMU_ANALOG_OUTPUT_MODE
+
+#undef MT32EMU_PARTIAL_STATE_NAME
+#undef MT32EMU_PARTIAL_STATE
+
+#endif /* #if (!defined MT32EMU_CPP_ENUMERATIONS_H && !defined MT32EMU_C_ENUMERATIONS) || (!defined MT32EMU_C_ENUMERATIONS_H && defined MT32EMU_C_ENUMERATIONS) */
diff --git a/audio/softsynth/mt32/File.cpp b/audio/softsynth/mt32/File.cpp
new file mode 100755
index 0000000000..395a893358
--- /dev/null
+++ b/audio/softsynth/mt32/File.cpp
@@ -0,0 +1,73 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <cstring>
+
+#include "internals.h"
+
+#include "File.h"
+#include "sha1/sha1.h"
+
+namespace MT32Emu {
+
+AbstractFile::AbstractFile() : sha1DigestCalculated(false), reserved(NULL) {
+ sha1Digest[0] = 0;
+}
+
+AbstractFile::AbstractFile(const SHA1Digest &useSHA1Digest) : sha1DigestCalculated(true), reserved(NULL) {
+ memcpy(sha1Digest, useSHA1Digest, sizeof(SHA1Digest) - 1);
+ sha1Digest[sizeof(SHA1Digest) - 1] = 0; // Ensure terminator char.
+}
+
+const File::SHA1Digest &AbstractFile::getSHA1() {
+ if (sha1DigestCalculated) {
+ return sha1Digest;
+ }
+ sha1DigestCalculated = true;
+
+ size_t size = getSize();
+ if (size == 0) {
+ return sha1Digest;
+ }
+
+ const Bit8u *data = getData();
+ if (data == NULL) {
+ return sha1Digest;
+ }
+
+ unsigned char fileDigest[20];
+
+ sha1::calc(data, int(size), fileDigest);
+ sha1::toHexString(fileDigest, sha1Digest);
+ return sha1Digest;
+}
+
+ArrayFile::ArrayFile(const Bit8u *useData, size_t useSize) : data(useData), size(useSize)
+{}
+
+ArrayFile::ArrayFile(const Bit8u *useData, size_t useSize, const SHA1Digest &useSHA1Digest) : AbstractFile(useSHA1Digest), data(useData), size(useSize)
+{}
+
+size_t ArrayFile::getSize() {
+ return size;
+}
+
+const Bit8u *ArrayFile::getData() {
+ return data;
+}
+
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/File.h b/audio/softsynth/mt32/File.h
new file mode 100755
index 0000000000..c9a7d582b4
--- /dev/null
+++ b/audio/softsynth/mt32/File.h
@@ -0,0 +1,73 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MT32EMU_FILE_H
+#define MT32EMU_FILE_H
+
+#include <cstddef>
+
+#include "globals.h"
+#include "Types.h"
+
+namespace MT32Emu {
+
+class MT32EMU_EXPORT File {
+public:
+ // Includes terminator char.
+ typedef char SHA1Digest[41];
+
+ virtual ~File() {}
+ virtual size_t getSize() = 0;
+ virtual const Bit8u *getData() = 0;
+ virtual const SHA1Digest &getSHA1() = 0;
+
+ virtual void close() = 0;
+};
+
+class MT32EMU_EXPORT AbstractFile : public File {
+public:
+ const SHA1Digest &getSHA1();
+
+protected:
+ AbstractFile();
+ AbstractFile(const SHA1Digest &sha1Digest);
+
+private:
+ bool sha1DigestCalculated;
+ SHA1Digest sha1Digest;
+
+ // Binary compatibility helper.
+ void *reserved;
+};
+
+class MT32EMU_EXPORT ArrayFile : public AbstractFile {
+public:
+ ArrayFile(const Bit8u *data, size_t size);
+ ArrayFile(const Bit8u *data, size_t size, const SHA1Digest &sha1Digest);
+
+ size_t getSize();
+ const Bit8u *getData();
+ void close() {}
+
+private:
+ const Bit8u *data;
+ size_t size;
+};
+
+} // namespace MT32Emu
+
+#endif // #ifndef MT32EMU_FILE_H
diff --git a/audio/softsynth/mt32/FileStream.cpp b/audio/softsynth/mt32/FileStream.cpp
new file mode 100755
index 0000000000..768c5fcdab
--- /dev/null
+++ b/audio/softsynth/mt32/FileStream.cpp
@@ -0,0 +1,83 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "internals.h"
+
+#include "FileStream.h"
+
+namespace MT32Emu {
+
+using std::ios_base;
+
+FileStream::FileStream() : ifsp(*new std::ifstream), data(NULL), size(0)
+{}
+
+FileStream::~FileStream() {
+ // destructor closes ifsp
+ delete &ifsp;
+ delete[] data;
+}
+
+size_t FileStream::getSize() {
+ if (size != 0) {
+ return size;
+ }
+ if (!ifsp.is_open()) {
+ return 0;
+ }
+ ifsp.seekg(0, ios_base::end);
+ size = size_t(ifsp.tellg());
+ return size;
+}
+
+const Bit8u *FileStream::getData() {
+ if (data != NULL) {
+ return data;
+ }
+ if (!ifsp.is_open()) {
+ return NULL;
+ }
+ if (getSize() == 0) {
+ return NULL;
+ }
+ Bit8u *fileData = new Bit8u[size];
+ if (fileData == NULL) {
+ return NULL;
+ }
+ ifsp.seekg(0);
+ ifsp.read(reinterpret_cast<char *>(fileData), std::streamsize(size));
+ if (size_t(ifsp.tellg()) != size) {
+ delete[] fileData;
+ return NULL;
+ }
+ data = fileData;
+ close();
+ return data;
+}
+
+bool FileStream::open(const char *filename) {
+ ifsp.clear();
+ ifsp.open(filename, ios_base::in | ios_base::binary);
+ return !ifsp.fail();
+}
+
+void FileStream::close() {
+ ifsp.close();
+ ifsp.clear();
+}
+
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/FileStream.h b/audio/softsynth/mt32/FileStream.h
new file mode 100755
index 0000000000..2de6e801ff
--- /dev/null
+++ b/audio/softsynth/mt32/FileStream.h
@@ -0,0 +1,46 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MT32EMU_FILE_STREAM_H
+#define MT32EMU_FILE_STREAM_H
+
+#include <fstream>
+
+#include "globals.h"
+#include "Types.h"
+#include "File.h"
+
+namespace MT32Emu {
+
+class FileStream : public AbstractFile {
+public:
+ MT32EMU_EXPORT FileStream();
+ MT32EMU_EXPORT ~FileStream();
+ MT32EMU_EXPORT size_t getSize();
+ MT32EMU_EXPORT const Bit8u *getData();
+ MT32EMU_EXPORT bool open(const char *filename);
+ MT32EMU_EXPORT void close();
+
+private:
+ std::ifstream &ifsp;
+ const Bit8u *data;
+ size_t size;
+};
+
+} // namespace MT32Emu
+
+#endif // #ifndef MT32EMU_FILE_STREAM_H
diff --git a/audio/softsynth/mt32/LA32FloatWaveGenerator.cpp b/audio/softsynth/mt32/LA32FloatWaveGenerator.cpp
index 42d820ebad..824204e81b 100644..100755
--- a/audio/softsynth/mt32/LA32FloatWaveGenerator.cpp
+++ b/audio/softsynth/mt32/LA32FloatWaveGenerator.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,10 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-//#include <cmath>
-#include "mt32emu.h"
+#ifndef MT32EMU_LA32_WAVE_GENERATOR_CPP
+#error This file should be included from LA32WaveGenerator.cpp only.
+#endif
+
#include "mmath.h"
-#include "internals.h"
namespace MT32Emu {
@@ -38,10 +39,10 @@ float LA32WaveGenerator::getPCMSample(unsigned int position) {
return ((pcmSample & 32768) == 0) ? sampleValue : -sampleValue;
}
-void LA32WaveGenerator::initSynth(const bool sawtoothWaveform, const Bit8u pulseWidth, const Bit8u resonance) {
- this->sawtoothWaveform = sawtoothWaveform;
- this->pulseWidth = pulseWidth;
- this->resonance = resonance;
+void LA32WaveGenerator::initSynth(const bool useSawtoothWaveform, const Bit8u usePulseWidth, const Bit8u useResonance) {
+ sawtoothWaveform = useSawtoothWaveform;
+ pulseWidth = usePulseWidth;
+ resonance = useResonance;
wavePos = 0.0f;
lastFreq = 0.0f;
@@ -50,24 +51,24 @@ void LA32WaveGenerator::initSynth(const bool sawtoothWaveform, const Bit8u pulse
active = true;
}
-void LA32WaveGenerator::initPCM(const Bit16s * const pcmWaveAddress, const Bit32u pcmWaveLength, const bool pcmWaveLooped, const bool pcmWaveInterpolated) {
- this->pcmWaveAddress = pcmWaveAddress;
- this->pcmWaveLength = pcmWaveLength;
- this->pcmWaveLooped = pcmWaveLooped;
- this->pcmWaveInterpolated = pcmWaveInterpolated;
+void LA32WaveGenerator::initPCM(const Bit16s * const usePCMWaveAddress, const Bit32u usePCMWaveLength, const bool usePCMWaveLooped, const bool usePCMWaveInterpolated) {
+ pcmWaveAddress = usePCMWaveAddress;
+ pcmWaveLength = usePCMWaveLength;
+ pcmWaveLooped = usePCMWaveLooped;
+ pcmWaveInterpolated = usePCMWaveInterpolated;
pcmPosition = 0.0f;
active = true;
}
+// ampVal - Logarithmic amp of the wave generator
+// pitch - Logarithmic frequency of the resulting wave
+// cutoffRampVal - Composed of the base cutoff in range [78..178] left-shifted by 18 bits and the TVF modifier
float LA32WaveGenerator::generateNextSample(const Bit32u ampVal, const Bit16u pitch, const Bit32u cutoffRampVal) {
if (!active) {
return 0.0f;
}
- this->amp = amp;
- this->pitch = pitch;
-
float sample = 0.0f;
// SEMI-CONFIRMED: From sample analysis:
@@ -284,9 +285,9 @@ bool LA32WaveGenerator::isPCMWave() const {
return pcmWaveAddress != NULL;
}
-void LA32PartialPair::init(const bool ringModulated, const bool mixed) {
- this->ringModulated = ringModulated;
- this->mixed = mixed;
+void LA32PartialPair::init(const bool useRingModulated, const bool useMixed) {
+ ringModulated = useRingModulated;
+ mixed = useMixed;
masterOutputSample = 0.0f;
slaveOutputSample = 0.0f;
}
@@ -354,4 +355,4 @@ bool LA32PartialPair::isActive(const PairType useMaster) const {
return useMaster == MASTER ? master.isActive() : slave.isActive();
}
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/LA32FloatWaveGenerator.h b/audio/softsynth/mt32/LA32FloatWaveGenerator.h
index 329e5de258..89b6fe479a 100644..100755
--- a/audio/softsynth/mt32/LA32FloatWaveGenerator.h
+++ b/audio/softsynth/mt32/LA32FloatWaveGenerator.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -16,14 +16,15 @@
*/
#ifndef MT32EMU_LA32_WAVE_GENERATOR_H
-#define MT32EMU_LA32_WAVE_GENERATOR_H
+#error This file should be included from LA32WaveGenerator.h only.
+#endif
namespace MT32Emu {
/**
* LA32WaveGenerator is aimed to represent the exact model of LA32 wave generator.
* The output square wave is created by adding high / low linear segments in-between
- * the rising and falling cosine segments. Basically, it’s very similar to the phase distortion synthesis.
+ * the rising and falling cosine segments. Basically, it's very similar to the phase distortion synthesis.
* Behaviour of a true resonance filter is emulated by adding decaying sine wave.
* The beginning and the ending of the resonant sine is multiplied by a cosine window.
* To synthesise sawtooth waves, the resulting square wave is multiplied by synchronous cosine wave.
@@ -38,12 +39,6 @@ class LA32WaveGenerator {
// True means the resulting square wave is to be multiplied by the synchronous cosine
bool sawtoothWaveform;
- // Logarithmic amp of the wave generator
- Bit32u amp;
-
- // Logarithmic frequency of the resulting wave
- Bit16u pitch;
-
// Values in range [1..31]
// Value 1 correspong to the minimum resonance
Bit8u resonance;
@@ -53,9 +48,6 @@ class LA32WaveGenerator {
// Value 255 corresponds to the maximum possible asymmetric of the resulting wave
Bit8u pulseWidth;
- // Composed of the base cutoff in range [78..178] left-shifted by 18 bits and the TVF modifier
- Bit32u cutoffVal;
-
// Logarithmic PCM sample start address
const Bit16s *pcmWaveAddress;
@@ -96,7 +88,7 @@ public:
// Return true if the WG engine generates PCM wave samples
bool isPCMWave() const;
-};
+}; // class LA32WaveGenerator
// LA32PartialPair contains a structure of two partials being mixed / ring modulated
class LA32PartialPair {
@@ -135,8 +127,6 @@ public:
// Return active state of the WG engine
bool isActive(const PairType master) const;
-};
+}; // class LA32PartialPair
} // namespace MT32Emu
-
-#endif // #ifndef MT32EMU_LA32_WAVE_GENERATOR_H
diff --git a/audio/softsynth/mt32/LA32Ramp.cpp b/audio/softsynth/mt32/LA32Ramp.cpp
index 2b31a330d2..a4da4f57a8 100644..100755
--- a/audio/softsynth/mt32/LA32Ramp.cpp
+++ b/audio/softsynth/mt32/LA32Ramp.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -47,12 +47,12 @@ We haven't fully explored:
- Values when ramping between levels (though this is probably correct).
- Transition timing (may not be 100% accurate, especially for very fast ramps).
*/
-//#include <cmath>
-#include "mt32emu.h"
-#include "mmath.h"
#include "internals.h"
+#include "LA32Ramp.h"
+#include "Tables.h"
+
namespace MT32Emu {
// SEMI-CONFIRMED from sample analysis.
@@ -152,4 +152,4 @@ void LA32Ramp::reset() {
interruptRaised = false;
}
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/LA32Ramp.h b/audio/softsynth/mt32/LA32Ramp.h
index 796b4d1eec..5e4ddf720e 100644..100755
--- a/audio/softsynth/mt32/LA32Ramp.h
+++ b/audio/softsynth/mt32/LA32Ramp.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,6 +18,9 @@
#ifndef MT32EMU_LA32RAMP_H
#define MT32EMU_LA32RAMP_H
+#include "globals.h"
+#include "Types.h"
+
namespace MT32Emu {
class LA32Ramp {
@@ -38,6 +41,6 @@ public:
void reset();
};
-}
+} // namespace MT32Emu
-#endif /* TVA_H_ */
+#endif // #ifndef MT32EMU_LA32RAMP_H
diff --git a/audio/softsynth/mt32/LA32WaveGenerator.cpp b/audio/softsynth/mt32/LA32WaveGenerator.cpp
index 765f75fa61..a9c425beac 100644..100755
--- a/audio/softsynth/mt32/LA32WaveGenerator.cpp
+++ b/audio/softsynth/mt32/LA32WaveGenerator.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,15 +15,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <cstddef>
+
+#include "internals.h"
+
+#include "LA32WaveGenerator.h"
+#include "Tables.h"
+
#if MT32EMU_USE_FLOAT_SAMPLES
+#define MT32EMU_LA32_WAVE_GENERATOR_CPP
#include "LA32FloatWaveGenerator.cpp"
+#undef MT32EMU_LA32_WAVE_GENERATOR_CPP
#else
-//#include <cmath>
-#include "mt32emu.h"
-#include "mmath.h"
-#include "internals.h"
-
namespace MT32Emu {
static const Bit32u SINE_SEGMENT_RELATIVE_LENGTH = 1 << 18;
@@ -50,7 +54,7 @@ Bit16s LA32Utilites::unlog(const LogSample &logSample) {
void LA32Utilites::addLogSamples(LogSample &logSample1, const LogSample &logSample2) {
Bit32u logSampleValue = logSample1.logValue + logSample2.logValue;
- logSample1.logValue = logSampleValue < 65536 ? (Bit16u)logSampleValue : 65535;
+ logSample1.logValue = logSampleValue < 65536 ? Bit16u(logSampleValue) : 65535;
logSample1.sign = logSample1.sign == logSample2.sign ? LogSample::POSITIVE : LogSample::NEGATIVE;
}
@@ -130,9 +134,7 @@ void LA32WaveGenerator::advancePosition() {
Bit32u lowLinearLength = (resonanceWaveLengthFactor << 8) - 4 * SINE_SEGMENT_RELATIVE_LENGTH - highLinearLength;
computePositions(highLinearLength, lowLinearLength, resonanceWaveLengthFactor);
- // resonancePhase computation hack
- int *resonancePhaseAlias = (int *)&resonancePhase;
- *resonancePhaseAlias = ((resonanceSinePosition >> 18) + (phase > POSITIVE_FALLING_SINE_SEGMENT ? 2 : 0)) & 3;
+ resonancePhase = ResonancePhase(((resonanceSinePosition >> 18) + (phase > POSITIVE_FALLING_SINE_SEGMENT ? 2 : 0)) & 3);
}
void LA32WaveGenerator::generateNextSquareWaveLogSample() {
@@ -158,7 +160,7 @@ void LA32WaveGenerator::generateNextSquareWaveLogSample() {
logSampleValue += (MIDDLE_CUTOFF_VALUE - cutoffVal) >> 9;
}
- squareLogSample.logValue = logSampleValue < 65536 ? (Bit16u)logSampleValue : 65535;
+ squareLogSample.logValue = logSampleValue < 65536 ? Bit16u(logSampleValue) : 65535;
squareLogSample.sign = phase < NEGATIVE_FALLING_SINE_SEGMENT ? LogSample::POSITIVE : LogSample::NEGATIVE;
}
@@ -198,7 +200,7 @@ void LA32WaveGenerator::generateNextResonanceWaveLogSample() {
// After all the amp decrements are added, it should be safe now to adjust the amp of the resonance wave to what we see on captures
logSampleValue -= 1 << 12;
- resonanceLogSample.logValue = logSampleValue < 65536 ? (Bit16u)logSampleValue : 65535;
+ resonanceLogSample.logValue = logSampleValue < 65536 ? Bit16u(logSampleValue) : 65535;
resonanceLogSample.sign = resonancePhase < NEGATIVE_FALLING_RESONANCE_SINE_SEGMENT ? LogSample::POSITIVE : LogSample::NEGATIVE;
}
@@ -216,7 +218,7 @@ void LA32WaveGenerator::generateNextSawtoothCosineLogSample(LogSample &logSample
void LA32WaveGenerator::pcmSampleToLogSample(LogSample &logSample, const Bit16s pcmSample) const {
Bit32u logSampleValue = (32787 - (pcmSample & 32767)) << 1;
logSampleValue += amp >> 10;
- logSample.logValue = logSampleValue < 65536 ? (Bit16u)logSampleValue : 65535;
+ logSample.logValue = logSampleValue < 65536 ? Bit16u(logSampleValue) : 65535;
logSample.sign = pcmSample < 0 ? LogSample::NEGATIVE : LogSample::POSITIVE;
}
@@ -377,7 +379,7 @@ Bit16s LA32PartialPair::unlogAndMixWGOutput(const LA32WaveGenerator &wg) {
Bit16s firstSample = LA32Utilites::unlog(wg.getOutputLogSample(true));
Bit16s secondSample = LA32Utilites::unlog(wg.getOutputLogSample(false));
if (wg.isPCMWave()) {
- return Bit16s(firstSample + ((Bit32s(secondSample - firstSample) * wg.getPCMInterpolationFactor()) >> 7));
+ return Bit16s(firstSample + (((Bit32s(secondSample) - Bit32s(firstSample)) * wg.getPCMInterpolationFactor()) >> 7));
}
return firstSample + secondSample;
}
@@ -407,7 +409,7 @@ Bit16s LA32PartialPair::nextOutSample() {
Bit16s slaveSample = slave.isPCMWave() ? LA32Utilites::unlog(slave.getOutputLogSample(true)) : unlogAndMixWGOutput(slave);
slaveSample <<= 2;
slaveSample >>= 2;
- Bit16s ringModulatedSample = Bit16s(((Bit32s)masterSample * (Bit32s)slaveSample) >> 13);
+ Bit16s ringModulatedSample = Bit16s((Bit32s(masterSample) * Bit32s(slaveSample)) >> 13);
return mixed ? nonOverdrivenMasterSample + ringModulatedSample : ringModulatedSample;
}
@@ -423,6 +425,6 @@ bool LA32PartialPair::isActive(const PairType useMaster) const {
return useMaster == MASTER ? master.isActive() : slave.isActive();
}
-}
+} // namespace MT32Emu
#endif // #if MT32EMU_USE_FLOAT_SAMPLES
diff --git a/audio/softsynth/mt32/LA32WaveGenerator.h b/audio/softsynth/mt32/LA32WaveGenerator.h
index 212abe2b19..6a40e44c98 100644..100755
--- a/audio/softsynth/mt32/LA32WaveGenerator.h
+++ b/audio/softsynth/mt32/LA32WaveGenerator.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,13 +15,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef MT32EMU_LA32_WAVE_GENERATOR_H
+#define MT32EMU_LA32_WAVE_GENERATOR_H
+
+#include "globals.h"
+#include "internals.h"
+#include "Types.h"
+
#if MT32EMU_USE_FLOAT_SAMPLES
#include "LA32FloatWaveGenerator.h"
#else
-#ifndef MT32EMU_LA32_WAVE_GENERATOR_H
-#define MT32EMU_LA32_WAVE_GENERATOR_H
-
namespace MT32Emu {
/**
@@ -55,7 +59,7 @@ public:
/**
* LA32WaveGenerator is aimed to represent the exact model of LA32 wave generator.
* The output square wave is created by adding high / low linear segments in-between
- * the rising and falling cosine segments. Basically, it’s very similar to the phase distortion synthesis.
+ * the rising and falling cosine segments. Basically, it's very similar to the phase distortion synthesis.
* Behaviour of a true resonance filter is emulated by adding decaying sine wave.
* The beginning and the ending of the resonant sine is multiplied by a cosine window.
* To synthesise sawtooth waves, the resulting square wave is multiplied by synchronous cosine wave.
@@ -143,7 +147,7 @@ class LA32WaveGenerator {
} phase;
// Current phase of the resonance wave
- enum {
+ enum ResonancePhase {
POSITIVE_RISING_RESONANCE_SINE_SEGMENT,
POSITIVE_FALLING_RESONANCE_SINE_SEGMENT,
NEGATIVE_FALLING_RESONANCE_SINE_SEGMENT,
@@ -200,7 +204,7 @@ public:
// Return current PCM interpolation factor
Bit32u getPCMInterpolationFactor() const;
-};
+}; // class LA32WaveGenerator
// LA32PartialPair contains a structure of two partials being mixed / ring modulated
class LA32PartialPair {
@@ -239,10 +243,10 @@ public:
// Return active state of the WG engine
bool isActive(const PairType master) const;
-};
+}; // class LA32PartialPair
} // namespace MT32Emu
-#endif // #ifndef MT32EMU_LA32_WAVE_GENERATOR_H
-
#endif // #if MT32EMU_USE_FLOAT_SAMPLES
+
+#endif // #ifndef MT32EMU_LA32_WAVE_GENERATOR_H
diff --git a/audio/softsynth/mt32/MemoryRegion.h b/audio/softsynth/mt32/MemoryRegion.h
index c0cb041e11..f8d7da18f8 100644..100755
--- a/audio/softsynth/mt32/MemoryRegion.h
+++ b/audio/softsynth/mt32/MemoryRegion.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,12 +18,20 @@
#ifndef MT32EMU_MEMORY_REGION_H
#define MT32EMU_MEMORY_REGION_H
+#include <cstddef>
+
+#include "globals.h"
+#include "Types.h"
+#include "Structures.h"
+
namespace MT32Emu {
enum MemoryRegionType {
MR_PatchTemp, MR_RhythmTemp, MR_TimbreTemp, MR_Patches, MR_Timbres, MR_System, MR_Display, MR_Reset
};
+class Synth;
+
class MemoryRegion {
private:
Synth *synth;
@@ -84,7 +92,7 @@ public:
}
void read(unsigned int entry, unsigned int off, Bit8u *dst, unsigned int len) const;
void write(unsigned int entry, unsigned int off, const Bit8u *src, unsigned int len, bool init = false) const;
-};
+}; // class MemoryRegion
class PatchTempMemoryRegion : public MemoryRegion {
public:
@@ -112,13 +120,13 @@ public:
};
class DisplayMemoryRegion : public MemoryRegion {
public:
- DisplayMemoryRegion(Synth *useSynth) : MemoryRegion(useSynth, NULL, NULL, MR_Display, MT32EMU_MEMADDR(0x200000), MAX_SYSEX_SIZE - 1, 1) {}
+ DisplayMemoryRegion(Synth *useSynth) : MemoryRegion(useSynth, NULL, NULL, MR_Display, MT32EMU_MEMADDR(0x200000), SYSEX_BUFFER_SIZE - 1, 1) {}
};
class ResetMemoryRegion : public MemoryRegion {
public:
ResetMemoryRegion(Synth *useSynth) : MemoryRegion(useSynth, NULL, NULL, MR_Reset, MT32EMU_MEMADDR(0x7F0000), 0x3FFF, 1) {}
};
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_MEMORY_REGION_H
diff --git a/audio/softsynth/mt32/MidiEventQueue.h b/audio/softsynth/mt32/MidiEventQueue.h
index b1948c5f8e..1a5ff0ad33 100644..100755
--- a/audio/softsynth/mt32/MidiEventQueue.h
+++ b/audio/softsynth/mt32/MidiEventQueue.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,6 +18,9 @@
#ifndef MT32EMU_MIDI_EVENT_QUEUE_H
#define MT32EMU_MIDI_EVENT_QUEUE_H
+#include "globals.h"
+#include "Types.h"
+
namespace MT32Emu {
/**
@@ -60,8 +63,9 @@ public:
const MidiEvent *peekMidiEvent();
void dropMidiEvent();
bool isFull() const;
+ bool inline isEmpty() const;
};
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_MIDI_EVENT_QUEUE_H
diff --git a/audio/softsynth/mt32/MidiStreamParser.cpp b/audio/softsynth/mt32/MidiStreamParser.cpp
new file mode 100755
index 0000000000..f9ead3369c
--- /dev/null
+++ b/audio/softsynth/mt32/MidiStreamParser.cpp
@@ -0,0 +1,289 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <cstdio>
+#include <cstring>
+
+#include "internals.h"
+
+#include "MidiStreamParser.h"
+#include "Synth.h"
+
+using namespace MT32Emu;
+
+DefaultMidiStreamParser::DefaultMidiStreamParser(Synth &useSynth, Bit32u initialStreamBufferCapacity) :
+ MidiStreamParser(initialStreamBufferCapacity), synth(useSynth), timestampSet(false) {}
+
+void DefaultMidiStreamParser::setTimestamp(const Bit32u useTimestamp) {
+ timestampSet = true;
+ timestamp = useTimestamp;
+}
+
+void DefaultMidiStreamParser::resetTimestamp() {
+ timestampSet = false;
+}
+
+void DefaultMidiStreamParser::handleShortMessage(const Bit32u message) {
+ do {
+ if (timestampSet) {
+ if (synth.playMsg(message, timestamp)) return;
+ }
+ else {
+ if (synth.playMsg(message)) return;
+ }
+ } while (synth.reportHandler->onMIDIQueueOverflow());
+}
+
+void DefaultMidiStreamParser::handleSysex(const Bit8u *stream, const Bit32u length) {
+ do {
+ if (timestampSet) {
+ if (synth.playSysex(stream, length, timestamp)) return;
+ }
+ else {
+ if (synth.playSysex(stream, length)) return;
+ }
+ } while (synth.reportHandler->onMIDIQueueOverflow());
+}
+
+void DefaultMidiStreamParser::handleSystemRealtimeMessage(const Bit8u realtime) {
+ synth.reportHandler->onMIDISystemRealtime(realtime);
+}
+
+void DefaultMidiStreamParser::printDebug(const char *debugMessage) {
+ synth.printDebug("%s", debugMessage);
+}
+
+MidiStreamParser::MidiStreamParser(Bit32u initialStreamBufferCapacity) :
+ MidiStreamParserImpl(*this, *this, initialStreamBufferCapacity) {}
+
+MidiStreamParserImpl::MidiStreamParserImpl(MidiReceiver &useReceiver, MidiReporter &useReporter, Bit32u initialStreamBufferCapacity) :
+ midiReceiver(useReceiver), midiReporter(useReporter)
+{
+ if (initialStreamBufferCapacity < SYSEX_BUFFER_SIZE) initialStreamBufferCapacity = SYSEX_BUFFER_SIZE;
+ if (MAX_STREAM_BUFFER_SIZE < initialStreamBufferCapacity) initialStreamBufferCapacity = MAX_STREAM_BUFFER_SIZE;
+ streamBufferCapacity = initialStreamBufferCapacity;
+ streamBuffer = new Bit8u[streamBufferCapacity];
+ streamBufferSize = 0;
+ runningStatus = 0;
+
+ reserved = NULL;
+}
+
+MidiStreamParserImpl::~MidiStreamParserImpl() {
+ delete[] streamBuffer;
+}
+
+void MidiStreamParserImpl::parseStream(const Bit8u *stream, Bit32u length) {
+ while (length > 0) {
+ Bit32u parsedMessageLength = 0;
+ if (0xF8 <= *stream) {
+ // Process System Realtime immediately and go on
+ midiReceiver.handleSystemRealtimeMessage(*stream);
+ parsedMessageLength = 1;
+ // No effect on the running status
+ } else if (streamBufferSize > 0) {
+ // Check if there is something in streamBuffer waiting for being processed
+ if (*streamBuffer == 0xF0) {
+ parsedMessageLength = parseSysexFragment(stream, length);
+ } else {
+ parsedMessageLength = parseShortMessageDataBytes(stream, length);
+ }
+ } else {
+ if (*stream == 0xF0) {
+ runningStatus = 0; // SysEx clears the running status
+ parsedMessageLength = parseSysex(stream, length);
+ } else {
+ parsedMessageLength = parseShortMessageStatus(stream);
+ }
+ }
+
+ // Parsed successfully
+ stream += parsedMessageLength;
+ length -= parsedMessageLength;
+ }
+}
+
+void MidiStreamParserImpl::processShortMessage(const Bit32u message) {
+ // Adds running status to the MIDI message if it doesn't contain one
+ Bit8u status = Bit8u(message);
+ if (0xF8 <= status) {
+ midiReceiver.handleSystemRealtimeMessage(status);
+ } else if (processStatusByte(status)) {
+ midiReceiver.handleShortMessage((message << 8) | status);
+ } else if (0x80 <= status) { // If no running status available yet, skip this message
+ midiReceiver.handleShortMessage(message);
+ }
+}
+
+// We deal with SysEx messages below 512 bytes long in most cases. Nevertheless, it seems reasonable to support a possibility
+// to load bulk dumps using a single message. However, this is known to fail with a real device due to limited input buffer size.
+bool MidiStreamParserImpl::checkStreamBufferCapacity(const bool preserveContent) {
+ if (streamBufferSize < streamBufferCapacity) return true;
+ if (streamBufferCapacity < MAX_STREAM_BUFFER_SIZE) {
+ Bit8u *oldStreamBuffer = streamBuffer;
+ streamBufferCapacity = MAX_STREAM_BUFFER_SIZE;
+ streamBuffer = new Bit8u[streamBufferCapacity];
+ if (preserveContent) memcpy(streamBuffer, oldStreamBuffer, streamBufferSize);
+ delete[] oldStreamBuffer;
+ return true;
+ }
+ return false;
+}
+
+// Checks input byte whether it is a status byte. If not, replaces it with running status when available.
+// Returns true if the input byte was changed to running status.
+bool MidiStreamParserImpl::processStatusByte(Bit8u &status) {
+ if (status < 0x80) {
+ // First byte isn't status, try running status
+ if (runningStatus < 0x80) {
+ // No running status available yet
+ midiReporter.printDebug("processStatusByte: No valid running status yet, MIDI message ignored");
+ return false;
+ }
+ status = runningStatus;
+ return true;
+ } else if (status < 0xF0) {
+ // Store current status as running for a Voice message
+ runningStatus = status;
+ } else if (status < 0xF8) {
+ // System Common clears running status
+ runningStatus = 0;
+ } // System Realtime doesn't affect running status
+ return false;
+}
+
+// Returns # of bytes parsed
+Bit32u MidiStreamParserImpl::parseShortMessageStatus(const Bit8u stream[]) {
+ Bit8u status = *stream;
+ Bit32u parsedLength = processStatusByte(status) ? 0 : 1;
+ if (0x80 <= status) { // If no running status available yet, skip one byte
+ *streamBuffer = status;
+ ++streamBufferSize;
+ }
+ return parsedLength;
+}
+
+// Returns # of bytes parsed
+Bit32u MidiStreamParserImpl::parseShortMessageDataBytes(const Bit8u stream[], Bit32u length) {
+ const Bit32u shortMessageLength = Synth::getShortMessageLength(*streamBuffer);
+ Bit32u parsedLength = 0;
+
+ // Append incoming bytes to streamBuffer
+ while ((streamBufferSize < shortMessageLength) && (length-- > 0)) {
+ Bit8u dataByte = *(stream++);
+ if (dataByte < 0x80) {
+ // Add data byte to streamBuffer
+ streamBuffer[streamBufferSize++] = dataByte;
+ } else if (dataByte < 0xF8) {
+ // Discard invalid bytes and start over
+ char s[128];
+ sprintf(s, "parseShortMessageDataBytes: Invalid short message: status %02x, expected length %i, actual %i -> ignored", *streamBuffer, shortMessageLength, streamBufferSize);
+ midiReporter.printDebug(s);
+ streamBufferSize = 0; // Clear streamBuffer
+ return parsedLength;
+ } else {
+ // Bypass System Realtime message
+ midiReceiver.handleSystemRealtimeMessage(dataByte);
+ }
+ ++parsedLength;
+ }
+ if (streamBufferSize < shortMessageLength) return parsedLength; // Still lacks data bytes
+
+ // Assemble short message
+ Bit32u shortMessage = streamBuffer[0];
+ for (Bit32u i = 1; i < shortMessageLength; ++i) {
+ shortMessage |= streamBuffer[i] << (i << 3);
+ }
+ midiReceiver.handleShortMessage(shortMessage);
+ streamBufferSize = 0; // Clear streamBuffer
+ return parsedLength;
+}
+
+// Returns # of bytes parsed
+Bit32u MidiStreamParserImpl::parseSysex(const Bit8u stream[], const Bit32u length) {
+ // Find SysEx length
+ Bit32u sysexLength = 1;
+ while (sysexLength < length) {
+ Bit8u nextByte = stream[sysexLength++];
+ if (0x80 <= nextByte) {
+ if (nextByte == 0xF7) {
+ // End of SysEx
+ midiReceiver.handleSysex(stream, sysexLength);
+ return sysexLength;
+ }
+ if (0xF8 <= nextByte) {
+ // The System Realtime message must be processed right after return
+ // but the SysEx is actually fragmented and to be reconstructed in streamBuffer
+ --sysexLength;
+ break;
+ }
+ // Illegal status byte in SysEx message, aborting
+ midiReporter.printDebug("parseSysex: SysEx message lacks end-of-sysex (0xf7), ignored");
+ // Continue parsing from that point
+ return sysexLength - 1;
+ }
+ }
+
+ // Store incomplete SysEx message for further processing
+ streamBufferSize = sysexLength;
+ if (checkStreamBufferCapacity(false)) {
+ memcpy(streamBuffer, stream, sysexLength);
+ } else {
+ // Not enough buffer capacity, don't care about the real buffer content, just mark the first byte
+ *streamBuffer = *stream;
+ streamBufferSize = streamBufferCapacity;
+ }
+ return sysexLength;
+}
+
+// Returns # of bytes parsed
+Bit32u MidiStreamParserImpl::parseSysexFragment(const Bit8u stream[], const Bit32u length) {
+ Bit32u parsedLength = 0;
+ while (parsedLength < length) {
+ Bit8u nextByte = stream[parsedLength++];
+ if (nextByte < 0x80) {
+ // Add SysEx data byte to streamBuffer
+ if (checkStreamBufferCapacity(true)) streamBuffer[streamBufferSize++] = nextByte;
+ continue;
+ }
+ if (0xF8 <= nextByte) {
+ // Bypass System Realtime message
+ midiReceiver.handleSystemRealtimeMessage(nextByte);
+ continue;
+ }
+ if (nextByte != 0xF7) {
+ // Illegal status byte in SysEx message, aborting
+ midiReporter.printDebug("parseSysexFragment: SysEx message lacks end-of-sysex (0xf7), ignored");
+ // Clear streamBuffer and continue parsing from that point
+ streamBufferSize = 0;
+ --parsedLength;
+ break;
+ }
+ // End of SysEx
+ if (checkStreamBufferCapacity(true)) {
+ streamBuffer[streamBufferSize++] = nextByte;
+ midiReceiver.handleSysex(streamBuffer, streamBufferSize);
+ streamBufferSize = 0; // Clear streamBuffer
+ break;
+ }
+ // Encountered streamBuffer overrun
+ midiReporter.printDebug("parseSysexFragment: streamBuffer overrun while receiving SysEx message, ignored. Max allowed size of fragmented SysEx is 32768 bytes.");
+ streamBufferSize = 0; // Clear streamBuffer
+ break;
+ }
+ return parsedLength;
+}
diff --git a/audio/softsynth/mt32/MidiStreamParser.h b/audio/softsynth/mt32/MidiStreamParser.h
new file mode 100755
index 0000000000..bd31b77c89
--- /dev/null
+++ b/audio/softsynth/mt32/MidiStreamParser.h
@@ -0,0 +1,124 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MT32EMU_MIDI_STREAM_PARSER_H
+#define MT32EMU_MIDI_STREAM_PARSER_H
+
+#include "globals.h"
+#include "Types.h"
+
+namespace MT32Emu {
+
+class Synth;
+
+// Interface for a user-supplied class to receive parsed well-formed MIDI messages.
+class MT32EMU_EXPORT MidiReceiver {
+public:
+ // Invoked when a complete short MIDI message is parsed in the input MIDI stream.
+ virtual void handleShortMessage(const Bit32u message) = 0;
+
+ // Invoked when a complete well-formed System Exclusive MIDI message is parsed in the input MIDI stream.
+ virtual void handleSysex(const Bit8u stream[], const Bit32u length) = 0;
+
+ // Invoked when a System Realtime MIDI message is parsed in the input MIDI stream.
+ virtual void handleSystemRealtimeMessage(const Bit8u realtime) = 0;
+
+protected:
+ ~MidiReceiver() {}
+};
+
+// Interface for a user-supplied class to receive notifications of input MIDI stream parse errors.
+class MT32EMU_EXPORT MidiReporter {
+public:
+ // Invoked when an error occurs during processing the input MIDI stream.
+ virtual void printDebug(const char *debugMessage) = 0;
+
+protected:
+ ~MidiReporter() {}
+};
+
+// Provides a context for parsing a stream of MIDI events coming from a single source.
+// There can be multiple MIDI sources feeding MIDI events to a single Synth object.
+// NOTE: Calls from multiple threads which feed a single Synth object with data must be explicitly synchronised,
+// although, no synchronisation is required with the rendering thread.
+class MT32EMU_EXPORT MidiStreamParserImpl {
+public:
+ // The first two arguments provide for implementations of essential interfaces needed.
+ // The third argument specifies streamBuffer initial capacity. The buffer capacity should be large enough to fit the longest SysEx expected.
+ // If a longer SysEx occurs, streamBuffer is reallocated to the maximum size of MAX_STREAM_BUFFER_SIZE (32768 bytes).
+ // Default capacity is SYSEX_BUFFER_SIZE (1000 bytes) which is enough to fit SysEx messages in common use.
+ MidiStreamParserImpl(MidiReceiver &, MidiReporter &, Bit32u initialStreamBufferCapacity = SYSEX_BUFFER_SIZE);
+ virtual ~MidiStreamParserImpl();
+
+ // Parses a block of raw MIDI bytes. All the parsed MIDI messages are sent in sequence to the user-supplied methods for further processing.
+ // SysEx messages are allowed to be fragmented across several calls to this method. Running status is also handled for short messages.
+ // NOTE: the total length of a SysEx message being fragmented shall not exceed MAX_STREAM_BUFFER_SIZE (32768 bytes).
+ void parseStream(const Bit8u *stream, Bit32u length);
+
+ // Convenience method which accepts a Bit32u-encoded short MIDI message and sends it to the user-supplied method for further processing.
+ // The short MIDI message may contain no status byte, the running status is used in this case.
+ void processShortMessage(const Bit32u message);
+
+private:
+ Bit8u runningStatus;
+ Bit8u *streamBuffer;
+ Bit32u streamBufferCapacity;
+ Bit32u streamBufferSize;
+ MidiReceiver &midiReceiver;
+ MidiReporter &midiReporter;
+
+ // Binary compatibility helper.
+ void *reserved;
+
+ bool checkStreamBufferCapacity(const bool preserveContent);
+ bool processStatusByte(Bit8u &status);
+ Bit32u parseShortMessageStatus(const Bit8u stream[]);
+ Bit32u parseShortMessageDataBytes(const Bit8u stream[], Bit32u length);
+ Bit32u parseSysex(const Bit8u stream[], const Bit32u length);
+ Bit32u parseSysexFragment(const Bit8u stream[], const Bit32u length);
+}; // class MidiStreamParserImpl
+
+// An abstract class that provides a context for parsing a stream of MIDI events coming from a single source.
+class MT32EMU_EXPORT MidiStreamParser : public MidiStreamParserImpl, protected MidiReceiver, protected MidiReporter {
+public:
+ // The argument specifies streamBuffer initial capacity. The buffer capacity should be large enough to fit the longest SysEx expected.
+ // If a longer SysEx occurs, streamBuffer is reallocated to the maximum size of MAX_STREAM_BUFFER_SIZE (32768 bytes).
+ // Default capacity is SYSEX_BUFFER_SIZE (1000 bytes) which is enough to fit SysEx messages in common use.
+ explicit MidiStreamParser(Bit32u initialStreamBufferCapacity = SYSEX_BUFFER_SIZE);
+};
+
+class MT32EMU_EXPORT DefaultMidiStreamParser : public MidiStreamParser {
+public:
+ explicit DefaultMidiStreamParser(Synth &synth, Bit32u initialStreamBufferCapacity = SYSEX_BUFFER_SIZE);
+ void setTimestamp(const Bit32u useTimestamp);
+ void resetTimestamp();
+
+protected:
+ void handleShortMessage(const Bit32u message);
+ void handleSysex(const Bit8u *stream, const Bit32u length);
+ void handleSystemRealtimeMessage(const Bit8u realtime);
+ void printDebug(const char *debugMessage);
+
+private:
+ Synth &synth;
+ bool timestampSet;
+ Bit32u timestamp;
+};
+
+} // namespace MT32Emu
+
+#endif // MT32EMU_MIDI_STREAM_PARSER_H
diff --git a/audio/softsynth/mt32/Part.cpp b/audio/softsynth/mt32/Part.cpp
index cffc3ed744..c4d5b94551 100644..100755
--- a/audio/softsynth/mt32/Part.cpp
+++ b/audio/softsynth/mt32/Part.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,12 +15,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-//#include <cstdio>
-//#include <cstring>
+#include <cstdio>
+#include <cstring>
-#include "mt32emu.h"
#include "internals.h"
+
+#include "Part.h"
+#include "Partial.h"
#include "PartialManager.h"
+#include "Poly.h"
+#include "Synth.h"
namespace MT32Emu {
@@ -112,7 +116,7 @@ Bit32s Part::getPitchBend() const {
void Part::setBend(unsigned int midiBend) {
// CONFIRMED:
- pitchBend = (((signed)midiBend - 8192) * pitchBenderRange) >> 14; // PORTABILITY NOTE: Assumes arithmetic shift
+ pitchBend = ((signed(midiBend) - 8192) * pitchBenderRange) >> 14; // PORTABILITY NOTE: Assumes arithmetic shift
}
Bit8u Part::getModulation() const {
@@ -120,7 +124,7 @@ Bit8u Part::getModulation() const {
}
void Part::setModulation(unsigned int midiModulation) {
- modulation = (Bit8u)midiModulation;
+ modulation = Bit8u(midiModulation);
}
void Part::resetAllControllers() {
@@ -162,7 +166,7 @@ void Part::refresh() {
patchCache[t].reverb = patchTemp->patch.reverbSwitch > 0;
}
memcpy(currentInstr, timbreTemp->common.name, 10);
- synth->newTimbreSet(partNum, patchTemp->patch.timbreGroup, currentInstr);
+ synth->newTimbreSet(partNum, patchTemp->patch.timbreGroup, patchTemp->patch.timbreNum, currentInstr);
updatePitchBenderRange();
}
@@ -255,26 +259,26 @@ void Part::cacheTimbre(PatchCache cache[4], const TimbreParam *timbre) {
switch (t) {
case 0:
- cache[t].PCMPartial = (PartialStruct[(int)timbre->common.partialStructure12] & 0x2) ? true : false;
- cache[t].structureMix = PartialMixStruct[(int)timbre->common.partialStructure12];
+ cache[t].PCMPartial = (PartialStruct[int(timbre->common.partialStructure12)] & 0x2) ? true : false;
+ cache[t].structureMix = PartialMixStruct[int(timbre->common.partialStructure12)];
cache[t].structurePosition = 0;
cache[t].structurePair = 1;
break;
case 1:
- cache[t].PCMPartial = (PartialStruct[(int)timbre->common.partialStructure12] & 0x1) ? true : false;
- cache[t].structureMix = PartialMixStruct[(int)timbre->common.partialStructure12];
+ cache[t].PCMPartial = (PartialStruct[int(timbre->common.partialStructure12)] & 0x1) ? true : false;
+ cache[t].structureMix = PartialMixStruct[int(timbre->common.partialStructure12)];
cache[t].structurePosition = 1;
cache[t].structurePair = 0;
break;
case 2:
- cache[t].PCMPartial = (PartialStruct[(int)timbre->common.partialStructure34] & 0x2) ? true : false;
- cache[t].structureMix = PartialMixStruct[(int)timbre->common.partialStructure34];
+ cache[t].PCMPartial = (PartialStruct[int(timbre->common.partialStructure34)] & 0x2) ? true : false;
+ cache[t].structureMix = PartialMixStruct[int(timbre->common.partialStructure34)];
cache[t].structurePosition = 0;
cache[t].structurePair = 3;
break;
case 3:
- cache[t].PCMPartial = (PartialStruct[(int)timbre->common.partialStructure34] & 0x1) ? true : false;
- cache[t].structureMix = PartialMixStruct[(int)timbre->common.partialStructure34];
+ cache[t].PCMPartial = (PartialStruct[int(timbre->common.partialStructure34)] & 0x1) ? true : false;
+ cache[t].structureMix = PartialMixStruct[int(timbre->common.partialStructure34)];
cache[t].structurePosition = 1;
cache[t].structurePair = 2;
break;
@@ -308,7 +312,7 @@ const char *Part::getName() const {
void Part::setVolume(unsigned int midiVolume) {
// CONFIRMED: This calculation matches the table used in the control ROM
- patchTemp->outputLevel = (Bit8u)(midiVolume * 100 / 127);
+ patchTemp->outputLevel = Bit8u(midiVolume * 100 / 127);
//synth->printDebug("%s (%s): Set volume to %d", name, currentInstr, midiVolume);
}
@@ -322,7 +326,7 @@ Bit8u Part::getExpression() const {
void Part::setExpression(unsigned int midiExpression) {
// CONFIRMED: This calculation matches the table used in the control ROM
- expression = (Bit8u)(midiExpression * 100 / 127);
+ expression = Bit8u(midiExpression * 100 / 127);
}
void RhythmPart::setPan(unsigned int midiPan) {
@@ -337,9 +341,9 @@ void Part::setPan(unsigned int midiPan) {
// NOTE: Panning is inverted compared to GM.
// CM-32L: Divide by 8.5
- patchTemp->panpot = (Bit8u)((midiPan << 3) / 68);
+ patchTemp->panpot = Bit8u((midiPan << 3) / 68);
// FIXME: MT-32: Divide by 9
- //patchTemp->panpot = (Bit8u)(midiPan / 9);
+ //patchTemp->panpot = Bit8u(midiPan / 9);
//synth->printDebug("%s (%s): Set pan to %d", name, currentInstr, panpot);
}
@@ -507,7 +511,7 @@ void Part::playPoly(const PatchCache cache[4], const MemParams::RhythmTemp *rhyt
#if MT32EMU_MONITOR_PARTIALS > 1
synth->printPartialUsage();
#endif
- synth->polyStateChanged(partNum);
+ synth->reportHandler->onPolyStateChanged(Bit8u(partNum));
}
void Part::allNotesOff() {
@@ -593,16 +597,14 @@ void Part::partialDeactivated(Poly *poly) {
if (!poly->isActive()) {
activePolys.remove(poly);
synth->partialManager->polyFreed(poly);
- synth->polyStateChanged(partNum);
+ synth->reportHandler->onPolyStateChanged(Bit8u(partNum));
}
}
-//#define POLY_LIST_DEBUG
-
PolyList::PolyList() : firstPoly(NULL), lastPoly(NULL) {}
bool PolyList::isEmpty() const {
-#ifdef POLY_LIST_DEBUG
+#ifdef MT32EMU_POLY_LIST_DEBUG
if ((firstPoly == NULL || lastPoly == NULL) && firstPoly != lastPoly) {
printf("PolyList: desynchronised firstPoly & lastPoly pointers\n");
}
@@ -619,7 +621,7 @@ Poly *PolyList::getLast() const {
}
void PolyList::prepend(Poly *poly) {
-#ifdef POLY_LIST_DEBUG
+#ifdef MT32EMU_POLY_LIST_DEBUG
if (poly->getNext() != NULL) {
printf("PolyList: Non-NULL next field in a Poly being prepended is ignored\n");
}
@@ -632,14 +634,14 @@ void PolyList::prepend(Poly *poly) {
}
void PolyList::append(Poly *poly) {
-#ifdef POLY_LIST_DEBUG
+#ifdef MT32EMU_POLY_LIST_DEBUG
if (poly->getNext() != NULL) {
printf("PolyList: Non-NULL next field in a Poly being appended is ignored\n");
}
#endif
poly->setNext(NULL);
if (lastPoly != NULL) {
-#ifdef POLY_LIST_DEBUG
+#ifdef MT32EMU_POLY_LIST_DEBUG
if (lastPoly->getNext() != NULL) {
printf("PolyList: Non-NULL next field in the lastPoly\n");
}
@@ -656,7 +658,7 @@ Poly *PolyList::takeFirst() {
Poly *oldFirst = firstPoly;
firstPoly = oldFirst->getNext();
if (firstPoly == NULL) {
-#ifdef POLY_LIST_DEBUG
+#ifdef MT32EMU_POLY_LIST_DEBUG
if (lastPoly != oldFirst) {
printf("PolyList: firstPoly != lastPoly in a list with a single Poly\n");
}
@@ -675,7 +677,7 @@ void PolyList::remove(Poly * const polyToRemove) {
for (Poly *poly = firstPoly; poly != NULL; poly = poly->getNext()) {
if (poly->getNext() == polyToRemove) {
if (polyToRemove == lastPoly) {
-#ifdef POLY_LIST_DEBUG
+#ifdef MT32EMU_POLY_LIST_DEBUG
if (lastPoly->getNext() != NULL) {
printf("PolyList: Non-NULL next field in the lastPoly\n");
}
@@ -689,4 +691,4 @@ void PolyList::remove(Poly * const polyToRemove) {
}
}
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/Part.h b/audio/softsynth/mt32/Part.h
index b458fb3988..f5171589d6 100644..100755
--- a/audio/softsynth/mt32/Part.h
+++ b/audio/softsynth/mt32/Part.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,9 +18,14 @@
#ifndef MT32EMU_PART_H
#define MT32EMU_PART_H
+#include "globals.h"
+#include "internals.h"
+#include "Types.h"
+#include "Structures.h"
+
namespace MT32Emu {
-class PartialManager;
+class Poly;
class Synth;
class PolyList {
@@ -123,7 +128,7 @@ public:
// Abort the first poly in PolyState_HELD, or if none exists, the first active poly in any state.
bool abortFirstPolyPreferHeld();
bool abortFirstPoly();
-};
+}; // class Part
class RhythmPart: public Part {
// Pointer to the area of the MT-32's memory dedicated to rhythm
@@ -143,5 +148,6 @@ public:
void setProgram(unsigned int patchNum);
};
-}
-#endif
+} // namespace MT32Emu
+
+#endif // #ifndef MT32EMU_PART_H
diff --git a/audio/softsynth/mt32/Partial.cpp b/audio/softsynth/mt32/Partial.cpp
index 7348087509..6afef364df 100644..100755
--- a/audio/softsynth/mt32/Partial.cpp
+++ b/audio/softsynth/mt32/Partial.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,14 +15,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-//#include <cmath>
-//#include <cstdlib>
-//#include <cstring>
+#include <cstddef>
-#include "mt32emu.h"
-#include "mmath.h"
#include "internals.h"
+#include "Partial.h"
+#include "Part.h"
+#include "Poly.h"
+#include "Synth.h"
+#include "Tables.h"
+#include "TVA.h"
+#include "TVF.h"
+#include "TVP.h"
+
namespace MT32Emu {
static const Bit8u PAN_NUMERATOR_MASTER[] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7};
@@ -54,7 +59,7 @@ int Partial::debugGetPartialNum() const {
}
// Only used for debugging purposes
-unsigned long Partial::debugGetSampleNum() const {
+Bit32u Partial::debugGetSampleNum() const {
return sampleNum;
}
@@ -266,7 +271,7 @@ void Partial::backupCache(const PatchCache &cache) {
}
}
-bool Partial::produceOutput(Sample *leftBuf, Sample *rightBuf, unsigned long length) {
+bool Partial::produceOutput(Sample *leftBuf, Sample *rightBuf, Bit32u length) {
if (!isActive() || alreadyOutputed || isRingModulatingSlave()) {
return false;
}
@@ -313,8 +318,8 @@ bool Partial::produceOutput(Sample *leftBuf, Sample *rightBuf, unsigned long len
// Though, it is unknown whether this overflow is exploited somewhere.
Sample leftOut = Sample((sample * leftPanValue) >> 8);
Sample rightOut = Sample((sample * rightPanValue) >> 8);
- *leftBuf = Synth::clipSampleEx((SampleEx)*leftBuf + (SampleEx)leftOut);
- *rightBuf = Synth::clipSampleEx((SampleEx)*rightBuf + (SampleEx)rightOut);
+ *leftBuf = Synth::clipSampleEx(SampleEx(*leftBuf) + SampleEx(leftOut));
+ *rightBuf = Synth::clipSampleEx(SampleEx(*rightBuf) + SampleEx(rightOut));
leftBuf++;
rightBuf++;
#endif
@@ -341,4 +346,4 @@ void Partial::startDecayAll() {
tvf->startDecay();
}
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/Partial.h b/audio/softsynth/mt32/Partial.h
index 749468135d..187665de51 100644..100755
--- a/audio/softsynth/mt32/Partial.h
+++ b/audio/softsynth/mt32/Partial.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,11 +18,21 @@
#ifndef MT32EMU_PARTIAL_H
#define MT32EMU_PARTIAL_H
+#include "globals.h"
+#include "internals.h"
+#include "Types.h"
+#include "Structures.h"
+#include "LA32Ramp.h"
+#include "LA32WaveGenerator.h"
+
namespace MT32Emu {
-class Synth;
class Part;
+class Poly;
+class Synth;
class TVA;
+class TVF;
+class TVP;
struct ControlROMPCMStruct;
// A partial represents one of up to four waveform generators currently playing within a poly.
@@ -32,7 +42,7 @@ private:
const int debugPartialNum; // Only used for debugging
// Number of the sample currently being rendered by produceOutput(), or 0 if no run is in progress
// This is only kept available for debugging purposes.
- unsigned long sampleNum;
+ Bit32u sampleNum;
// Actually, this is a 4-bit register but we abuse this to emulate inverted mixing.
// Also we double the value to enable INACCURATE_SMOOTH_PAN, with respect to MoK.
@@ -77,7 +87,7 @@ public:
~Partial();
int debugGetPartialNum() const;
- unsigned long debugGetSampleNum() const;
+ Bit32u debugGetSampleNum() const;
int getOwnerPart() const;
const Poly *getPoly() const;
@@ -100,9 +110,9 @@ public:
// Returns true only if data written to buffer
// This function (unlike the one below it) returns processed stereo samples
// made from combining this single partial with its pair, if it has one.
- bool produceOutput(Sample *leftBuf, Sample *rightBuf, unsigned long length);
-};
+ bool produceOutput(Sample *leftBuf, Sample *rightBuf, Bit32u length);
+}; // class Partial
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_PARTIAL_H
diff --git a/audio/softsynth/mt32/PartialManager.cpp b/audio/softsynth/mt32/PartialManager.cpp
index 8ca6e4e3d7..7c702f7582 100644..100755
--- a/audio/softsynth/mt32/PartialManager.cpp
+++ b/audio/softsynth/mt32/PartialManager.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,11 +15,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-//#include <cstring>
+#include <cstddef>
+#include <cstring>
-#include "mt32emu.h"
#include "internals.h"
+
#include "PartialManager.h"
+#include "Part.h"
+#include "Partial.h"
+#include "Poly.h"
+#include "Synth.h"
namespace MT32Emu {
@@ -275,7 +280,7 @@ void PartialManager::polyFreed(Poly *poly) {
const Poly *activePoly = synth->getPart(partNum)->getFirstActivePoly();
Bit32u polyCount = 0;
while (activePoly != NULL) {
- activePoly->getNext();
+ activePoly = activePoly->getNext();
polyCount++;
}
synth->printDebug("Part: %i, active poly count: %i\n", partNum, polyCount);
@@ -286,4 +291,4 @@ void PartialManager::polyFreed(Poly *poly) {
freePolys[firstFreePolyIndex] = poly;
}
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/PartialManager.h b/audio/softsynth/mt32/PartialManager.h
index f2e8767bbb..b2908a5c21 100644..100755
--- a/audio/softsynth/mt32/PartialManager.h
+++ b/audio/softsynth/mt32/PartialManager.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,8 +18,15 @@
#ifndef MT32EMU_PARTIALMANAGER_H
#define MT32EMU_PARTIALMANAGER_H
+#include "globals.h"
+#include "internals.h"
+#include "Types.h"
+
namespace MT32Emu {
+class Part;
+class Partial;
+class Poly;
class Synth;
class PartialManager {
@@ -49,8 +56,8 @@ public:
const Partial *getPartial(unsigned int partialNum) const;
Poly *assignPolyToPart(Part *part);
void polyFreed(Poly *poly);
-};
+}; // class PartialManager
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_PARTIALMANAGER_H
diff --git a/audio/softsynth/mt32/Poly.cpp b/audio/softsynth/mt32/Poly.cpp
index badcd8fb96..9a3948cf11 100644..100755
--- a/audio/softsynth/mt32/Poly.cpp
+++ b/audio/softsynth/mt32/Poly.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,9 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "mt32emu.h"
+#include <cstddef>
+
#include "internals.h"
+#include "Poly.h"
+#include "Part.h"
+#include "Partial.h"
+#include "Synth.h"
+
namespace MT32Emu {
Poly::Poly() {
@@ -181,4 +187,4 @@ void Poly::setNext(Poly *poly) {
next = poly;
}
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/Poly.h b/audio/softsynth/mt32/Poly.h
index e2614369bb..4b283231c8 100644..100755
--- a/audio/softsynth/mt32/Poly.h
+++ b/audio/softsynth/mt32/Poly.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,17 +18,14 @@
#ifndef MT32EMU_POLY_H
#define MT32EMU_POLY_H
+#include "globals.h"
+#include "internals.h"
+
namespace MT32Emu {
class Part;
class Partial;
-
-enum PolyState {
- POLY_Playing,
- POLY_Held, // This marks keys that have been released on the keyboard, but are being held by the pedal
- POLY_Releasing,
- POLY_Inactive
-};
+struct PatchCache;
class Poly {
private:
@@ -66,8 +63,8 @@ public:
Poly *getNext() const;
void setNext(Poly *poly);
-};
+}; // class Poly
-}
+} // namespace MT32Emu
-#endif /* POLY_H_ */
+#endif // #ifndef MT32EMU_POLY_H
diff --git a/audio/softsynth/mt32/ROMInfo.cpp b/audio/softsynth/mt32/ROMInfo.cpp
index f6817c1a4d..ce78e693aa 100644..100755
--- a/audio/softsynth/mt32/ROMInfo.cpp
+++ b/audio/softsynth/mt32/ROMInfo.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,27 +15,27 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-//#include <cstring>
+#include <cstring>
+
+#include "internals.h"
+
#include "ROMInfo.h"
namespace MT32Emu {
-static const ROMInfo *getKnownROMInfoFromList(unsigned int index) {
- static const ControlROMFeatureSet MT32_COMPATIBLE(true, true);
- static const ControlROMFeatureSet CM32L_COMPATIBLE(false, false);
-
+static const ROMInfo *getKnownROMInfoFromList(Bit32u index) {
// Known ROMs
- static const ROMInfo CTRL_MT32_V1_04 = {65536, "5a5cb5a77d7d55ee69657c2f870416daed52dea7", ROMInfo::Control, "ctrl_mt32_1_04", "MT-32 Control v1.04", ROMInfo::Full, NULL, &MT32_COMPATIBLE};
- static const ROMInfo CTRL_MT32_V1_05 = {65536, "e17a3a6d265bf1fa150312061134293d2b58288c", ROMInfo::Control, "ctrl_mt32_1_05", "MT-32 Control v1.05", ROMInfo::Full, NULL, &MT32_COMPATIBLE};
- static const ROMInfo CTRL_MT32_V1_06 = {65536, "a553481f4e2794c10cfe597fef154eef0d8257de", ROMInfo::Control, "ctrl_mt32_1_06", "MT-32 Control v1.06", ROMInfo::Full, NULL, &MT32_COMPATIBLE};
- static const ROMInfo CTRL_MT32_V1_07 = {65536, "b083518fffb7f66b03c23b7eb4f868e62dc5a987", ROMInfo::Control, "ctrl_mt32_1_07", "MT-32 Control v1.07", ROMInfo::Full, NULL, &MT32_COMPATIBLE};
- static const ROMInfo CTRL_MT32_BLUER = {65536, "7b8c2a5ddb42fd0732e2f22b3340dcf5360edf92", ROMInfo::Control, "ctrl_mt32_bluer", "MT-32 Control BlueRidge", ROMInfo::Full, NULL, &MT32_COMPATIBLE};
+ static const ROMInfo CTRL_MT32_V1_04 = {65536, "5a5cb5a77d7d55ee69657c2f870416daed52dea7", ROMInfo::Control, "ctrl_mt32_1_04", "MT-32 Control v1.04", ROMInfo::Full, NULL};
+ static const ROMInfo CTRL_MT32_V1_05 = {65536, "e17a3a6d265bf1fa150312061134293d2b58288c", ROMInfo::Control, "ctrl_mt32_1_05", "MT-32 Control v1.05", ROMInfo::Full, NULL};
+ static const ROMInfo CTRL_MT32_V1_06 = {65536, "a553481f4e2794c10cfe597fef154eef0d8257de", ROMInfo::Control, "ctrl_mt32_1_06", "MT-32 Control v1.06", ROMInfo::Full, NULL};
+ static const ROMInfo CTRL_MT32_V1_07 = {65536, "b083518fffb7f66b03c23b7eb4f868e62dc5a987", ROMInfo::Control, "ctrl_mt32_1_07", "MT-32 Control v1.07", ROMInfo::Full, NULL};
+ static const ROMInfo CTRL_MT32_BLUER = {65536, "7b8c2a5ddb42fd0732e2f22b3340dcf5360edf92", ROMInfo::Control, "ctrl_mt32_bluer", "MT-32 Control BlueRidge", ROMInfo::Full, NULL};
- static const ROMInfo CTRL_CM32L_V1_00 = {65536, "73683d585cd6948cc19547942ca0e14a0319456d", ROMInfo::Control, "ctrl_cm32l_1_00", "CM-32L/LAPC-I Control v1.00", ROMInfo::Full, NULL, &CM32L_COMPATIBLE};
- static const ROMInfo CTRL_CM32L_V1_02 = {65536, "a439fbb390da38cada95a7cbb1d6ca199cd66ef8", ROMInfo::Control, "ctrl_cm32l_1_02", "CM-32L/LAPC-I Control v1.02", ROMInfo::Full, NULL, &CM32L_COMPATIBLE};
+ static const ROMInfo CTRL_CM32L_V1_00 = {65536, "73683d585cd6948cc19547942ca0e14a0319456d", ROMInfo::Control, "ctrl_cm32l_1_00", "CM-32L/LAPC-I Control v1.00", ROMInfo::Full, NULL};
+ static const ROMInfo CTRL_CM32L_V1_02 = {65536, "a439fbb390da38cada95a7cbb1d6ca199cd66ef8", ROMInfo::Control, "ctrl_cm32l_1_02", "CM-32L/LAPC-I Control v1.02", ROMInfo::Full, NULL};
- static const ROMInfo PCM_MT32 = {524288, "f6b1eebc4b2d200ec6d3d21d51325d5b48c60252", ROMInfo::PCM, "pcm_mt32", "MT-32 PCM ROM", ROMInfo::Full, NULL, NULL};
- static const ROMInfo PCM_CM32L = {1048576, "289cc298ad532b702461bfc738009d9ebe8025ea", ROMInfo::PCM, "pcm_cm32l", "CM-32L/CM-64/LAPC-I PCM ROM", ROMInfo::Full, NULL, NULL};
+ static const ROMInfo PCM_MT32 = {524288, "f6b1eebc4b2d200ec6d3d21d51325d5b48c60252", ROMInfo::PCM, "pcm_mt32", "MT-32 PCM ROM", ROMInfo::Full, NULL};
+ static const ROMInfo PCM_CM32L = {1048576, "289cc298ad532b702461bfc738009d9ebe8025ea", ROMInfo::PCM, "pcm_cm32l", "CM-32L/CM-64/LAPC-I PCM ROM", ROMInfo::Full, NULL};
static const ROMInfo * const ROM_INFOS[] = {
&CTRL_MT32_V1_04,
@@ -52,23 +52,11 @@ static const ROMInfo *getKnownROMInfoFromList(unsigned int index) {
return ROM_INFOS[index];
}
-const ROMInfo* ROMInfo::getROMInfo(Common::File *file) {
- size_t fileSize = file->size();
- Common::String fileName = file->getName();
- fileName.toUppercase();
- bool isCM32LROM = fileName.hasPrefix("CM32L_");
- // We haven't added the SHA1 checksum code in ScummVM, as the file size
- // and ROM name suffices for our needs for now.
- //const char *fileDigest = file->getSHA1();
- for (int i = 0; getKnownROMInfoFromList(i) != NULL; i++) {
+const ROMInfo* ROMInfo::getROMInfo(File *file) {
+ size_t fileSize = file->getSize();
+ for (Bit32u i = 0; getKnownROMInfoFromList(i) != NULL; i++) {
const ROMInfo *romInfo = getKnownROMInfoFromList(i);
- if (fileSize == romInfo->fileSize /*&& !strcmp(fileDigest, romInfo->sha1Digest)*/) {
- if (fileSize == 65536) {
- // If we are looking for a CM-32L ROM, make sure we return the first matching
- // CM-32L ROM from the list, instead of the first matching MT-32 ROM
- if (isCM32LROM && romInfo->controlROMFeatures->isDefaultReverbMT32Compatible())
- continue;
- }
+ if (fileSize == romInfo->fileSize && !strcmp(file->getSHA1(), romInfo->sha1Digest)) {
return romInfo;
}
}
@@ -79,17 +67,17 @@ void ROMInfo::freeROMInfo(const ROMInfo *romInfo) {
(void) romInfo;
}
-static int getROMCount() {
- int count;
+static Bit32u getROMCount() {
+ Bit32u count;
for(count = 0; getKnownROMInfoFromList(count) != NULL; count++) {
}
return count;
}
-const ROMInfo** ROMInfo::getROMInfoList(unsigned int types, unsigned int pairTypes) {
+const ROMInfo** ROMInfo::getROMInfoList(Bit32u types, Bit32u pairTypes) {
const ROMInfo **romInfoList = new const ROMInfo*[getROMCount() + 1];
const ROMInfo **currentROMInList = romInfoList;
- for(int i = 0; getKnownROMInfoFromList(i) != NULL; i++) {
+ for (Bit32u i = 0; getKnownROMInfoFromList(i) != NULL; i++) {
const ROMInfo *romInfo = getKnownROMInfoFromList(i);
if ((types & (1 << romInfo->type)) && (pairTypes & (1 << romInfo->pairType))) {
*currentROMInList++ = romInfo;
@@ -103,19 +91,22 @@ void ROMInfo::freeROMInfoList(const ROMInfo **romInfoList) {
delete[] romInfoList;
}
-const ROMImage* ROMImage::makeROMImage(Common::File *file) {
- ROMImage *romImage = new ROMImage;
- romImage->file = file;
- romImage->romInfo = ROMInfo::getROMInfo(romImage->file);
- return romImage;
+ROMImage::ROMImage(File *useFile) : file(useFile), romInfo(ROMInfo::getROMInfo(file))
+{}
+
+ROMImage::~ROMImage() {
+ ROMInfo::freeROMInfo(romInfo);
+}
+
+const ROMImage* ROMImage::makeROMImage(File *file) {
+ return new ROMImage(file);
}
void ROMImage::freeROMImage(const ROMImage *romImage) {
- ROMInfo::freeROMInfo(romImage->romInfo);
delete romImage;
}
-Common::File* ROMImage::getFile() const {
+File* ROMImage::getFile() const {
return file;
}
@@ -123,17 +114,4 @@ const ROMInfo* ROMImage::getROMInfo() const {
return romInfo;
}
-ControlROMFeatureSet::ControlROMFeatureSet(bool useDefaultReverbMT32Compatible, bool useOldMT32AnalogLPF) :
- defaultReverbMT32Compatible(useDefaultReverbMT32Compatible),
- oldMT32AnalogLPF(useOldMT32AnalogLPF)
-{}
-
-bool ControlROMFeatureSet::isDefaultReverbMT32Compatible() const {
- return defaultReverbMT32Compatible;
-}
-
-bool ControlROMFeatureSet::isOldMT32AnalogLPF() const {
- return oldMT32AnalogLPF;
-}
-
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/ROMInfo.h b/audio/softsynth/mt32/ROMInfo.h
index 4682620a15..8a5ad141b6 100644..100755
--- a/audio/softsynth/mt32/ROMInfo.h
+++ b/audio/softsynth/mt32/ROMInfo.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,73 +18,63 @@
#ifndef MT32EMU_ROMINFO_H
#define MT32EMU_ROMINFO_H
-//#include <cstddef>
-#include "common/file.h"
+#include <cstddef>
-namespace MT32Emu {
+#include "globals.h"
+#include "File.h"
-struct ControlROMFeatureSet;
+namespace MT32Emu {
// Defines vital info about ROM file to be used by synth and applications
struct ROMInfo {
public:
size_t fileSize;
- const char *sha1Digest;
+ const File::SHA1Digest &sha1Digest;
enum Type {PCM, Control, Reverb} type;
const char *shortName;
const char *description;
enum PairType {Full, FirstHalf, SecondHalf, Mux0, Mux1} pairType;
ROMInfo *pairROMInfo;
- const ControlROMFeatureSet *controlROMFeatures;
// Returns a ROMInfo struct by inspecting the size and the SHA1 hash
- static const ROMInfo* getROMInfo(Common::File *file);
+ MT32EMU_EXPORT static const ROMInfo* getROMInfo(File *file);
// Currently no-op
- static void freeROMInfo(const ROMInfo *romInfo);
+ MT32EMU_EXPORT static void freeROMInfo(const ROMInfo *romInfo);
// Allows retrieving a NULL-terminated list of ROMInfos for a range of types and pairTypes
// (specified by bitmasks)
// Useful for GUI/console app to output information on what ROMs it supports
- static const ROMInfo** getROMInfoList(unsigned int types, unsigned int pairTypes);
+ MT32EMU_EXPORT static const ROMInfo** getROMInfoList(Bit32u types, Bit32u pairTypes);
// Frees the list of ROMInfos given
- static void freeROMInfoList(const ROMInfo **romInfos);
+ MT32EMU_EXPORT static void freeROMInfoList(const ROMInfo **romInfos);
};
// Synth::open() is to require a full control ROMImage and a full PCM ROMImage to work
class ROMImage {
private:
- Common::File *file;
- const ROMInfo *romInfo;
+ File * const file;
+ const ROMInfo * const romInfo;
-public:
+ ROMImage(File *file);
+ ~ROMImage();
+public:
// Creates a ROMImage object given a ROMInfo and a File. Keeps a reference
// to the File and ROMInfo given, which must be freed separately by the user
// after the ROMImage is freed
- static const ROMImage* makeROMImage(Common::File *file);
+ MT32EMU_EXPORT static const ROMImage* makeROMImage(File *file);
// Must only be done after all Synths using the ROMImage are deleted
- static void freeROMImage(const ROMImage *romImage);
+ MT32EMU_EXPORT static void freeROMImage(const ROMImage *romImage);
- Common::File *getFile() const;
- const ROMInfo *getROMInfo() const;
-};
-
-struct ControlROMFeatureSet {
-private:
- unsigned int defaultReverbMT32Compatible : 1;
- unsigned int oldMT32AnalogLPF : 1;
-
-public:
- ControlROMFeatureSet(bool defaultReverbMT32Compatible, bool oldMT32AnalogLPF);
- bool isDefaultReverbMT32Compatible() const;
- bool isOldMT32AnalogLPF() const;
+ MT32EMU_EXPORT File *getFile() const;
+ MT32EMU_EXPORT const ROMInfo *getROMInfo() const;
};
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_ROMINFO_H
diff --git a/audio/softsynth/mt32/Structures.h b/audio/softsynth/mt32/Structures.h
index 4dada3a847..6dcb9c86a9 100644..100755
--- a/audio/softsynth/mt32/Structures.h
+++ b/audio/softsynth/mt32/Structures.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,6 +18,9 @@
#ifndef MT32EMU_STRUCTURES_H
#define MT32EMU_STRUCTURES_H
+#include "globals.h"
+#include "Types.h"
+
namespace MT32Emu {
// MT32EMU_MEMADDR() converts from sysex-padded, MT32EMU_SYSEXMEMADDR converts to it
@@ -102,8 +105,8 @@ struct TimbreParam {
Bit8u envTime[5]; // 0-100
Bit8u envLevel[4]; // 0-100 // [3]: SUSTAIN LEVEL
} MT32EMU_ALIGN_PACKED tva;
- } MT32EMU_ALIGN_PACKED partial[4];
-} MT32EMU_ALIGN_PACKED;
+ } MT32EMU_ALIGN_PACKED partial[4]; // struct PartialParam
+} MT32EMU_ALIGN_PACKED; // struct TimbreParam
struct PatchParam {
Bit8u timbreGroup; // TIMBRE GROUP 0-3 (group A, group B, Memory, Rhythm)
@@ -163,7 +166,16 @@ struct MemParams {
Bit8u chanAssign[9]; // MIDI CHANNEL (PART1) 0-16 (1-16,OFF)
Bit8u masterVol; // MASTER VOLUME 0-100
} MT32EMU_ALIGN_PACKED system;
-};
+}; // struct MemParams
+
+struct SoundGroup {
+ Bit8u timbreNumberTableAddrLow;
+ Bit8u timbreNumberTableAddrHigh;
+ Bit8u displayPosition;
+ Bit8u name[9];
+ Bit8u timbreCount;
+ Bit8u pad;
+} MT32EMU_ALIGN_PACKED;
#if defined(_MSC_VER) || defined(__MINGW32__)
#pragma pack(pop)
@@ -171,10 +183,17 @@ struct MemParams {
#pragma pack()
#endif
+struct ControlROMFeatureSet {
+ unsigned int quirkPitchEnvelopeOverflow : 1;
+
+ // Features below don't actually depend on control ROM version, which is used to identify hardware model
+ unsigned int defaultReverbMT32Compatible : 1;
+ unsigned int oldMT32AnalogLPF : 1;
+};
+
struct ControlROMMap {
- Bit16u idPos;
- Bit16u idLen;
- const char *idBytes;
+ const char *shortName;
+ const ControlROMFeatureSet &featureSet;
Bit16u pcmTable; // 4 * pcmCount bytes
Bit16u pcmCount;
Bit16u timbreAMap; // 128 bytes
@@ -194,6 +213,8 @@ struct ControlROMMap {
Bit16u patchMaxTable; // 16 bytes
Bit16u systemMaxTable; // 23 bytes
Bit16u timbreMaxTable; // 72 bytes
+ Bit16u soundGroupsTable; // 14 bytes each entry
+ Bit16u soundGroupsCount;
};
struct ControlROMPCMStruct {
@@ -215,7 +236,7 @@ struct PatchCache {
bool playPartial;
bool PCMPartial;
int pcm;
- char waveform;
+ Bit8u waveform;
Bit32u structureMix;
int structurePosition;
@@ -233,6 +254,6 @@ struct PatchCache {
const TimbreParam::PartialParam *partialParam;
};
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_STRUCTURES_H
diff --git a/audio/softsynth/mt32/Synth.cpp b/audio/softsynth/mt32/Synth.cpp
index 6df7eb9e31..162c5d8cee 100644..100755
--- a/audio/softsynth/mt32/Synth.cpp
+++ b/audio/softsynth/mt32/Synth.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,42 +15,140 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-//#include <cerrno>
-//#include <cmath>
-//#include <cstdlib>
-//#include <cstring>
+#include <cstdio>
-#include "mt32emu.h"
-#include "mmath.h"
#include "internals.h"
+#include "Synth.h"
#include "Analog.h"
#include "BReverbModel.h"
+#include "File.h"
#include "MemoryRegion.h"
#include "MidiEventQueue.h"
+#include "Part.h"
+#include "Partial.h"
#include "PartialManager.h"
+#include "Poly.h"
+#include "ROMInfo.h"
+#include "TVA.h"
namespace MT32Emu {
// MIDI interface data transfer rate in samples. Used to simulate the transfer delay.
-static const double MIDI_DATA_TRANSFER_RATE = (double)SAMPLE_RATE / 31250.0 * 8.0;
+static const double MIDI_DATA_TRANSFER_RATE = double(SAMPLE_RATE) / 31250.0 * 8.0;
+
+// FIXME: there should be more specific feature sets for various MT-32 control ROM versions
+static const ControlROMFeatureSet OLD_MT32_COMPATIBLE = { true, true, true };
+static const ControlROMFeatureSet CM32L_COMPATIBLE = { false, false, false };
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},
- {0x4014, 22, "\000 ver1.06 31 Aug, 87 ", 0x3000, 128, 0x8000, 0x0000, false, 0xC000, 0x4000, false, 0x3200, 30, 0x7414, 85, 0x57D9, 0x57F4, 0x57E2, 0x5264, 0x5270, 0x5280, 0x521C},
- {0x4010, 22, "\000 ver1.07 10 Oct, 87 ", 0x3000, 128, 0x8000, 0x0000, false, 0xC000, 0x4000, false, 0x3200, 30, 0x73fe, 85, 0x57B1, 0x57CC, 0x57BA, 0x523C, 0x5248, 0x5258, 0x51F4}, // MT-32 revision 1
- {0x4010, 22, "\000verX.XX 30 Sep, 88 ", 0x3000, 128, 0x8000, 0x0000, false, 0xC000, 0x4000, false, 0x3200, 30, 0x741C, 85, 0x57E5, 0x5800, 0x57EE, 0x5270, 0x527C, 0x528C, 0x5228}, // MT-32 Blue Ridge mod
- {0x2205, 22, "\000CM32/LAPC1.00 890404", 0x8100, 256, 0x8000, 0x8000, false, 0x8080, 0x8000, false, 0x8500, 64, 0x8580, 85, 0x4F65, 0x4F80, 0x4F6E, 0x48A1, 0x48A5, 0x48BE, 0x48D5},
- {0x2205, 22, "\000CM32/LAPC1.02 891205", 0x8100, 256, 0x8000, 0x8000, true, 0x8080, 0x8000, true, 0x8500, 64, 0x8580, 85, 0x4F93, 0x4FAE, 0x4F9C, 0x48CB, 0x48CF, 0x48E8, 0x48FF} // CM-32L
+ // ID Features PCMmap PCMc tmbrA tmbrAO, tmbrAC tmbrB tmbrBO tmbrBC tmbrR trC rhythm rhyC rsrv panpot prog rhyMax patMax sysMax timMax sndGrp sGC
+ { "ctrl_mt32_1_04", OLD_MT32_COMPATIBLE, 0x3000, 128, 0x8000, 0x0000, false, 0xC000, 0x4000, false, 0x3200, 30, 0x73A6, 85, 0x57C7, 0x57E2, 0x57D0, 0x5252, 0x525E, 0x526E, 0x520A, 0x7064, 19 },
+ { "ctrl_mt32_1_05", OLD_MT32_COMPATIBLE, 0x3000, 128, 0x8000, 0x0000, false, 0xC000, 0x4000, false, 0x3200, 30, 0x7414, 85, 0x57C7, 0x57E2, 0x57D0, 0x5252, 0x525E, 0x526E, 0x520A, 0x70CA, 19 },
+ { "ctrl_mt32_1_06", OLD_MT32_COMPATIBLE, 0x3000, 128, 0x8000, 0x0000, false, 0xC000, 0x4000, false, 0x3200, 30, 0x7414, 85, 0x57D9, 0x57F4, 0x57E2, 0x5264, 0x5270, 0x5280, 0x521C, 0x70CA, 19 },
+ { "ctrl_mt32_1_07", OLD_MT32_COMPATIBLE, 0x3000, 128, 0x8000, 0x0000, false, 0xC000, 0x4000, false, 0x3200, 30, 0x73fe, 85, 0x57B1, 0x57CC, 0x57BA, 0x523C, 0x5248, 0x5258, 0x51F4, 0x70B0, 19 }, // MT-32 revision 1
+ {"ctrl_mt32_bluer", OLD_MT32_COMPATIBLE, 0x3000, 128, 0x8000, 0x0000, false, 0xC000, 0x4000, false, 0x3200, 30, 0x741C, 85, 0x57E5, 0x5800, 0x57EE, 0x5270, 0x527C, 0x528C, 0x5228, 0x70CE, 19 }, // MT-32 Blue Ridge mod
+ {"ctrl_cm32l_1_00", CM32L_COMPATIBLE, 0x8100, 256, 0x8000, 0x8000, true, 0x8080, 0x8000, true, 0x8500, 64, 0x8580, 85, 0x4F65, 0x4F80, 0x4F6E, 0x48A1, 0x48A5, 0x48BE, 0x48D5, 0x5A6C, 19 },
+ {"ctrl_cm32l_1_02", CM32L_COMPATIBLE, 0x8100, 256, 0x8000, 0x8000, true, 0x8080, 0x8000, true, 0x8500, 64, 0x8580, 85, 0x4F93, 0x4FAE, 0x4F9C, 0x48CB, 0x48CF, 0x48E8, 0x48FF, 0x5A96, 19 } // CM-32L
// (Note that all but CM-32L ROM actually have 86 entries for rhythmTemp)
};
-static inline void advanceStreamPosition(Sample *&stream, Bit32u posDelta) {
- if (stream != NULL) {
- stream += posDelta;
+static const PartialState PARTIAL_PHASE_TO_STATE[8] = {
+ PartialState_ATTACK, PartialState_ATTACK, PartialState_ATTACK, PartialState_ATTACK,
+ PartialState_SUSTAIN, PartialState_SUSTAIN, PartialState_RELEASE, PartialState_INACTIVE
+};
+
+static inline PartialState getPartialState(PartialManager *partialManager, unsigned int partialNum) {
+ const Partial *partial = partialManager->getPartial(partialNum);
+ return partial->isActive() ? PARTIAL_PHASE_TO_STATE[partial->getTVA()->getPhase()] : PartialState_INACTIVE;
+}
+
+#if MT32EMU_USE_FLOAT_SAMPLES
+static inline Bit16s convertSample(float sample) {
+ return Synth::clipSampleEx(Bit32s(sample * 16384.0f)); // This multiplier takes into account the DAC bit shift
+}
+#else
+static inline float convertSample(Bit16s sample) {
+ return float(sample) / 16384.0f; // This multiplier takes into account the DAC bit shift
+}
+#endif
+
+class SampleFormatConverter {
+protected:
+#if MT32EMU_USE_FLOAT_SAMPLES
+ Bit16s *outBuffer;
+#else
+ float *outBuffer;
+#endif
+
+public:
+ Sample *sampleBuffer;
+
+ SampleFormatConverter(Sample *buffer) : outBuffer(NULL), sampleBuffer(buffer) {}
+
+ inline bool isConversionNeeded() {
+ return outBuffer != NULL;
+ }
+
+ inline void convert(Bit32u len) {
+ if (sampleBuffer == NULL) return;
+ if (outBuffer == NULL) {
+ sampleBuffer += len;
+ return;
+ }
+ Sample *inBuffer = sampleBuffer;
+ while (len--) {
+ *(outBuffer++) = convertSample(*(inBuffer++));
+ }
}
+
+ inline void addSilence(Bit32u len) {
+ if (outBuffer != NULL) {
+ Synth::muteSampleBuffer(outBuffer, len);
+ outBuffer += len;
+ } else if (sampleBuffer != NULL) {
+ Synth::muteSampleBuffer(sampleBuffer, len);
+ sampleBuffer += len;
+ }
+ }
+};
+
+template <int BUFFER_SIZE_MULTIPLIER = 1>
+class BufferedSampleFormatConverter : public SampleFormatConverter {
+ Sample renderingBuffer[BUFFER_SIZE_MULTIPLIER * MAX_SAMPLES_PER_RUN];
+
+public:
+#if MT32EMU_USE_FLOAT_SAMPLES
+ BufferedSampleFormatConverter(Bit16s *buffer)
+#else
+ BufferedSampleFormatConverter(float *buffer)
+#endif
+ : SampleFormatConverter(renderingBuffer)
+ {
+ outBuffer = buffer;
+ if (buffer == NULL) sampleBuffer = NULL;
+ }
+};
+
+class Renderer {
+ Synth &synth;
+
+public:
+ Renderer(Synth &useSynth) : synth(useSynth) {}
+
+ void render(SampleFormatConverter &converter, Bit32u len);
+ void renderStreams(SampleFormatConverter &nonReverbLeft, SampleFormatConverter &nonReverbRight, SampleFormatConverter &reverbDryLeft, SampleFormatConverter &reverbDryRight, SampleFormatConverter &reverbWetLeft, SampleFormatConverter &reverbWetRight, Bit32u len);
+ void produceLA32Output(Sample *buffer, Bit32u len);
+ void convertSamplesToOutput(Sample *buffer, Bit32u len);
+ void doRenderStreams(Sample *nonReverbLeft, Sample *nonReverbRight, Sample *reverbDryLeft, Sample *reverbDryRight, Sample *reverbWetLeft, Sample *reverbWetRight, Bit32u len);
+};
+
+Bit32u Synth::getLibraryVersionInt() {
+ return (MT32EMU_VERSION_MAJOR << 16) | (MT32EMU_VERSION_MINOR << 8) | (MT32EMU_VERSION_PATCH);
+}
+
+const char *Synth::getLibraryVersionString() {
+ return MT32EMU_VERSION;
}
Bit8u Synth::calcSysexChecksum(const Bit8u *data, const Bit32u len, const Bit8u initChecksum) {
@@ -61,10 +159,17 @@ Bit8u Synth::calcSysexChecksum(const Bit8u *data, const Bit32u len, const Bit8u
return Bit8u(checksum & 0x7f);
}
-Synth::Synth(ReportHandler *useReportHandler) : mt32ram(*new MemParams()), mt32default(*new MemParams()) {
- isOpen = false;
+Bit32u Synth::getStereoOutputSampleRate(AnalogOutputMode analogOutputMode) {
+ static const unsigned int SAMPLE_RATES[] = {SAMPLE_RATE, SAMPLE_RATE, SAMPLE_RATE * 3 / 2, SAMPLE_RATE * 3};
+
+ return SAMPLE_RATES[analogOutputMode];
+}
+
+Synth::Synth(ReportHandler *useReportHandler) : mt32ram(*new MemParams), mt32default(*new MemParams), renderer(*new Renderer(*this)) {
+ opened = false;
reverbOverridden = false;
partialCount = DEFAULT_MAX_PARTIALS;
+ controlROMMap = NULL;
controlROMFeatures = NULL;
if (useReportHandler == NULL) {
@@ -85,11 +190,27 @@ Synth::Synth(ReportHandler *useReportHandler) : mt32ram(*new MemParams()), mt32d
setOutputGain(1.0f);
setReverbOutputGain(1.0f);
setReversedStereoEnabled(false);
+
+ patchTempMemoryRegion = NULL;
+ rhythmTempMemoryRegion = NULL;
+ timbreTempMemoryRegion = NULL;
+ patchesMemoryRegion = NULL;
+ timbresMemoryRegion = NULL;
+ systemMemoryRegion = NULL;
+ displayMemoryRegion = NULL;
+ resetMemoryRegion = NULL;
+ paddedTimbreMaxTable = NULL;
+
partialManager = NULL;
+ pcmWaves = NULL;
+ pcmROMData = NULL;
+ soundGroupNames = NULL;
midiQueue = NULL;
lastReceivedMIDIEventTimestamp = 0;
memset(parts, 0, sizeof(parts));
renderedSampleCount = 0;
+
+ reserved = NULL;
}
Synth::~Synth() {
@@ -99,47 +220,52 @@ Synth::~Synth() {
}
delete &mt32ram;
delete &mt32default;
+ delete &renderer;
}
void ReportHandler::showLCDMessage(const char *data) {
- // We cannot use printf here. Since we already implement our own
- // ReportHandler we simply disable the default implementation since it is
- // never called anyway.
-#if 0
- printf("WRITE-LCD: %s", data);
- printf("\n");
-#endif
+ printf("WRITE-LCD: %s\n", data);
}
void ReportHandler::printDebug(const char *fmt, va_list list) {
- // We cannot use (v)printf here. Since we already implement our own
- // ReportHandler we simply disable the default implementation since it is
- // never called anyway.
-#if 0
vprintf(fmt, list);
printf("\n");
-#endif
-}
-
-void Synth::polyStateChanged(int partNum) {
- reportHandler->onPolyStateChanged(partNum);
}
-void Synth::newTimbreSet(int partNum, Bit8u timbreGroup, const char patchName[]) {
- reportHandler->onProgramChanged(partNum, timbreGroup, patchName);
+void Synth::newTimbreSet(Bit8u partNum, Bit8u timbreGroup, Bit8u timbreNumber, const char patchName[]) {
+ const char *soundGroupName;
+ switch (timbreGroup) {
+ case 1:
+ timbreNumber += 64;
+ // Fall-through
+ case 0:
+ soundGroupName = soundGroupNames[soundGroupIx[timbreNumber]];
+ break;
+ case 2:
+ soundGroupName = soundGroupNames[controlROMMap->soundGroupsCount - 2];
+ break;
+ case 3:
+ soundGroupName = soundGroupNames[controlROMMap->soundGroupsCount - 1];
+ break;
+ default:
+ soundGroupName = NULL;
+ break;
+ }
+ reportHandler->onProgramChanged(partNum, soundGroupName, patchName);
}
void Synth::printDebug(const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
#if MT32EMU_DEBUG_SAMPLESTAMPS > 0
- reportHandler->printDebug("[%u] ", (char *)&renderedSampleCount);
+ reportHandler->printDebug("[%u]", (va_list)&renderedSampleCount);
#endif
reportHandler->printDebug(fmt, ap);
va_end(ap);
}
void Synth::setReverbEnabled(bool newReverbEnabled) {
+ if (!opened) return;
if (isReverbEnabled() == newReverbEnabled) return;
if (newReverbEnabled) {
bool oldReverbOverridden = reverbOverridden;
@@ -167,30 +293,23 @@ bool Synth::isReverbOverridden() const {
}
void Synth::setReverbCompatibilityMode(bool mt32CompatibleMode) {
- if (reverbModels[REVERB_MODE_ROOM] != NULL) {
- if (isMT32ReverbCompatibilityMode() == mt32CompatibleMode) return;
- setReverbEnabled(false);
- for (int i = 0; i < 4; i++) {
- delete reverbModels[i];
- }
- }
- reverbModels[REVERB_MODE_ROOM] = new BReverbModel(REVERB_MODE_ROOM, mt32CompatibleMode);
- reverbModels[REVERB_MODE_HALL] = new BReverbModel(REVERB_MODE_HALL, mt32CompatibleMode);
- reverbModels[REVERB_MODE_PLATE] = new BReverbModel(REVERB_MODE_PLATE, mt32CompatibleMode);
- reverbModels[REVERB_MODE_TAP_DELAY] = new BReverbModel(REVERB_MODE_TAP_DELAY, mt32CompatibleMode);
-#if !MT32EMU_REDUCE_REVERB_MEMORY
- for (int i = REVERB_MODE_ROOM; i <= REVERB_MODE_TAP_DELAY; i++) {
- reverbModels[i]->open();
- }
-#endif
- if (isOpen) {
- setReverbOutputGain(reverbOutputGain);
- setReverbEnabled(true);
+ if (!opened || (isMT32ReverbCompatibilityMode() == mt32CompatibleMode)) return;
+ bool oldReverbEnabled = isReverbEnabled();
+ setReverbEnabled(false);
+ for (int i = 0; i < 4; i++) {
+ delete reverbModels[i];
}
+ initReverbModels(mt32CompatibleMode);
+ setReverbEnabled(oldReverbEnabled);
+ setReverbOutputGain(reverbOutputGain);
}
bool Synth::isMT32ReverbCompatibilityMode() const {
- return isOpen && (reverbModels[REVERB_MODE_ROOM]->isMT32Compatible(REVERB_MODE_ROOM));
+ return opened && (reverbModels[REVERB_MODE_ROOM]->isMT32Compatible(REVERB_MODE_ROOM));
+}
+
+bool Synth::isDefaultReverbMT32Compatible() const {
+ return opened && controlROMFeatures->defaultReverbMT32Compatible;
}
void Synth::setDACInputMode(DACInputMode mode) {
@@ -239,22 +358,18 @@ void Synth::setReversedStereoEnabled(bool enabled) {
reversedStereoEnabled = enabled;
}
-bool Synth::isReversedStereoEnabled() {
+bool Synth::isReversedStereoEnabled() const {
return reversedStereoEnabled;
}
bool Synth::loadControlROM(const ROMImage &controlROMImage) {
- Common::File *file = controlROMImage.getFile();
+ File *file = controlROMImage.getFile();
const ROMInfo *controlROMInfo = controlROMImage.getROMInfo();
if ((controlROMInfo == NULL)
|| (controlROMInfo->type != ROMInfo::Control)
|| (controlROMInfo->pairType != ROMInfo::Full)) {
- return false;
- }
- controlROMFeatures = controlROMImage.getROMInfo()->controlROMFeatures;
- if (controlROMFeatures == NULL) {
#if MT32EMU_MONITOR_INIT
- printDebug("Invalid Control ROM Info provided without feature set");
+ printDebug("Invalid Control ROM Info provided");
#endif
return false;
}
@@ -262,13 +377,16 @@ bool Synth::loadControlROM(const ROMImage &controlROMImage) {
#if MT32EMU_MONITOR_INIT
printDebug("Found Control ROM: %s, %s", controlROMInfo->shortName, controlROMInfo->description);
#endif
- file->read(controlROMData, CONTROL_ROM_SIZE);
+ const Bit8u *fileData = file->getData();
+ memcpy(controlROMData, fileData, CONTROL_ROM_SIZE);
// Control ROM successfully loaded, now check whether it's a known type
controlROMMap = NULL;
+ controlROMFeatures = NULL;
for (unsigned int i = 0; i < sizeof(ControlROMMaps) / sizeof(ControlROMMaps[0]); i++) {
- if (memcmp(&controlROMData[ControlROMMaps[i].idPos], ControlROMMaps[i].idBytes, ControlROMMaps[i].idLen) == 0) {
+ if (strcmp(controlROMInfo->shortName, ControlROMMaps[i].shortName) == 0) {
controlROMMap = &ControlROMMaps[i];
+ controlROMFeatures = &controlROMMap->featureSet;
return true;
}
}
@@ -279,7 +397,7 @@ bool Synth::loadControlROM(const ROMImage &controlROMImage) {
}
bool Synth::loadPCMROM(const ROMImage &pcmROMImage) {
- Common::File *file = pcmROMImage.getFile();
+ File *file = pcmROMImage.getFile();
const ROMInfo *pcmROMInfo = pcmROMImage.getROMInfo();
if ((pcmROMInfo == NULL)
|| (pcmROMInfo->type != ROMInfo::PCM)
@@ -289,24 +407,21 @@ bool Synth::loadPCMROM(const ROMImage &pcmROMImage) {
#if MT32EMU_MONITOR_INIT
printDebug("Found PCM ROM: %s, %s", pcmROMInfo->shortName, pcmROMInfo->description);
#endif
- size_t fileSize = file->size();
+ size_t fileSize = file->getSize();
if (fileSize != (2 * pcmROMSize)) {
#if MT32EMU_MONITOR_INIT
printDebug("PCM ROM file has wrong size (expected %d, got %d)", 2 * pcmROMSize, fileSize);
#endif
return false;
}
-
- byte *buffer = new byte[file->size()];
- file->read(buffer, file->size());
- const byte *fileData = buffer;
+ const Bit8u *fileData = file->getData();
for (size_t i = 0; i < pcmROMSize; i++) {
Bit8u s = *(fileData++);
Bit8u c = *(fileData++);
int order[16] = {0, 9, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 8};
- signed short log = 0;
+ Bit16s log = 0;
for (int u = 0; u < 15; u++) {
int bit;
if (order[u] < 8) {
@@ -314,18 +429,15 @@ bool Synth::loadPCMROM(const ROMImage &pcmROMImage) {
} else {
bit = (c >> (7 - (order[u] - 8))) & 0x1;
}
- log = log | (short)(bit << (15 - u));
+ log = log | Bit16s(bit << (15 - u));
}
pcmROMData[i] = log;
}
-
- delete[] buffer;
-
return true;
}
bool Synth::initPCMList(Bit16u mapAddress, Bit16u count) {
- ControlROMPCMStruct *tps = (ControlROMPCMStruct *)&controlROMData[mapAddress];
+ ControlROMPCMStruct *tps = reinterpret_cast<ControlROMPCMStruct *>(&controlROMData[mapAddress]);
for (int i = 0; i < count; i++) {
Bit32u rAddr = tps[i].pos * 0x800;
Bit32u rLenExp = (tps[i].len & 0x70) >> 4;
@@ -345,7 +457,7 @@ bool Synth::initPCMList(Bit16u mapAddress, Bit16u count) {
return false;
}
-bool Synth::initCompressedTimbre(int timbreNum, const Bit8u *src, unsigned int srcLen) {
+bool Synth::initCompressedTimbre(Bit16u timbreNum, const Bit8u *src, Bit32u srcLen) {
// "Compressed" here means that muted partials aren't present in ROM (except in the case of partial 0 being muted).
// Instead the data from the previous unmuted partial is used.
if (srcLen < sizeof(TimbreParam::CommonParam)) {
@@ -369,7 +481,7 @@ bool Synth::initCompressedTimbre(int timbreNum, const Bit8u *src, unsigned int s
return true;
}
-bool Synth::initTimbres(Bit16u mapAddress, Bit16u offset, int count, int startTimbre, bool compressed) {
+bool Synth::initTimbres(Bit16u mapAddress, Bit16u offset, Bit16u count, Bit16u startTimbre, bool compressed) {
const Bit8u *timbreMap = &controlROMData[mapAddress];
for (Bit16u i = 0; i < count * 2; i += 2) {
Bit16u address = (timbreMap[i + 1] << 8) | timbreMap[i];
@@ -391,12 +503,32 @@ bool Synth::initTimbres(Bit16u mapAddress, Bit16u offset, int count, int startTi
return true;
}
+void Synth::initReverbModels(bool mt32CompatibleMode) {
+ reverbModels[REVERB_MODE_ROOM] = new BReverbModel(REVERB_MODE_ROOM, mt32CompatibleMode);
+ reverbModels[REVERB_MODE_HALL] = new BReverbModel(REVERB_MODE_HALL, mt32CompatibleMode);
+ reverbModels[REVERB_MODE_PLATE] = new BReverbModel(REVERB_MODE_PLATE, mt32CompatibleMode);
+ reverbModels[REVERB_MODE_TAP_DELAY] = new BReverbModel(REVERB_MODE_TAP_DELAY, mt32CompatibleMode);
+#if !MT32EMU_REDUCE_REVERB_MEMORY
+ for (int i = REVERB_MODE_ROOM; i <= REVERB_MODE_TAP_DELAY; i++) {
+ reverbModels[i]->open();
+ }
+#endif
+}
+
+void Synth::initSoundGroups(char newSoundGroupNames[][9]) {
+ memcpy(soundGroupIx, &controlROMData[controlROMMap->soundGroupsTable - sizeof(soundGroupIx)], sizeof(soundGroupIx));
+ const SoundGroup *table = reinterpret_cast<SoundGroup *>(&controlROMData[controlROMMap->soundGroupsTable]);
+ for (unsigned int i = 0; i < controlROMMap->soundGroupsCount; i++) {
+ memcpy(&newSoundGroupNames[i][0], table[i].name, sizeof(table[i].name));
+ }
+}
+
bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, AnalogOutputMode analogOutputMode) {
return open(controlROMImage, pcmROMImage, DEFAULT_MAX_PARTIALS, analogOutputMode);
}
bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, unsigned int usePartialCount, AnalogOutputMode analogOutputMode) {
- if (isOpen) {
+ if (opened) {
return false;
}
partialCount = usePartialCount;
@@ -411,6 +543,7 @@ bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, u
if (!loadControlROM(controlROMImage)) {
printDebug("Init Error - Missing or invalid Control ROM image");
reportHandler->onErrorControlROM();
+ dispose();
return false;
}
@@ -428,22 +561,24 @@ bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, u
if (!loadPCMROM(pcmROMImage)) {
printDebug("Init Error - Missing PCM ROM image");
reportHandler->onErrorPCMROM();
+ dispose();
return false;
}
#if MT32EMU_MONITOR_INIT
printDebug("Initialising Reverb Models");
#endif
- bool mt32CompatibleReverb = controlROMFeatures->isDefaultReverbMT32Compatible();
+ bool mt32CompatibleReverb = controlROMFeatures->defaultReverbMT32Compatible;
#if MT32EMU_MONITOR_INIT
printDebug("Using %s Compatible Reverb Models", mt32CompatibleReverb ? "MT-32" : "CM-32L");
#endif
- setReverbCompatibilityMode(mt32CompatibleReverb);
+ initReverbModels(mt32CompatibleReverb);
#if MT32EMU_MONITOR_INIT
printDebug("Initialising Timbre Bank A");
#endif
if (!initTimbres(controlROMMap->timbreAMap, controlROMMap->timbreAOffset, 0x40, 0, controlROMMap->timbreACompressed)) {
+ dispose();
return false;
}
@@ -451,6 +586,7 @@ bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, u
printDebug("Initialising Timbre Bank B");
#endif
if (!initTimbres(controlROMMap->timbreBMap, controlROMMap->timbreBOffset, 0x40, 64, controlROMMap->timbreBCompressed)) {
+ dispose();
return false;
}
@@ -458,6 +594,7 @@ bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, u
printDebug("Initialising Timbre Bank R");
#endif
if (!initTimbres(controlROMMap->timbreRMap, 0, controlROMMap->timbreRCount, 192, true)) {
+ dispose();
return false;
}
@@ -519,6 +656,10 @@ bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, u
refreshSystem();
reverbOverridden = oldReverbOverridden;
+ char(*writableSoundGroupNames)[9] = new char[controlROMMap->soundGroupsCount][9];
+ soundGroupNames = writableSoundGroupNames;
+ initSoundGroups(writableSoundGroupNames);
+
for (int i = 0; i < 9; i++) {
MemParams::PatchTemp *patchTemp = &mt32ram.patchTemp[i];
@@ -550,12 +691,12 @@ bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, u
midiQueue = new MidiEventQueue();
- analog = new Analog(analogOutputMode, controlROMFeatures);
+ analog = new Analog(analogOutputMode, controlROMFeatures->oldMT32AnalogLPF);
setOutputGain(outputGain);
setReverbOutputGain(reverbOutputGain);
- isOpen = true;
- isEnabled = false;
+ opened = true;
+ activated = false;
#if MT32EMU_MONITOR_INIT
printDebug("*** Initialisation complete ***");
@@ -563,10 +704,8 @@ bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, u
return true;
}
-void Synth::close(bool forced) {
- if (!forced && !isOpen) {
- return;
- }
+void Synth::dispose() {
+ opened = false;
delete midiQueue;
midiQueue = NULL;
@@ -582,8 +721,14 @@ void Synth::close(bool forced) {
parts[i] = NULL;
}
+ delete[] soundGroupNames;
+ soundGroupNames = NULL;
+
delete[] pcmWaves;
+ pcmWaves = NULL;
+
delete[] pcmROMData;
+ pcmROMData = NULL;
deleteMemoryRegions();
@@ -593,7 +738,17 @@ void Synth::close(bool forced) {
}
reverbModel = NULL;
controlROMFeatures = NULL;
- isOpen = false;
+ controlROMMap = NULL;
+}
+
+void Synth::close() {
+ if (opened) {
+ dispose();
+ }
+}
+
+bool Synth::isOpen() const {
+ return opened;
}
void Synth::flushMIDIQueue() {
@@ -649,7 +804,7 @@ Bit32u Synth::getShortMessageLength(Bit32u msg) {
}
Bit32u Synth::addMIDIInterfaceDelay(Bit32u len, Bit32u timestamp) {
- Bit32u transferTime = Bit32u((double)len * MIDI_DATA_TRANSFER_RATE);
+ Bit32u transferTime = Bit32u(double(len) * MIDI_DATA_TRANSFER_RATE);
// Dealing with wrapping
if (Bit32s(timestamp - lastReceivedMIDIEventTimestamp) < 0) {
timestamp = lastReceivedMIDIEventTimestamp;
@@ -664,12 +819,19 @@ bool Synth::playMsg(Bit32u msg) {
}
bool Synth::playMsg(Bit32u msg, Bit32u timestamp) {
+ if ((msg & 0xF8) == 0xF8) {
+ reportHandler->onMIDISystemRealtime(Bit8u(msg));
+ return true;
+ }
if (midiQueue == NULL) return false;
if (midiDelayMode != MIDIDelayMode_IMMEDIATE) {
timestamp = addMIDIInterfaceDelay(getShortMessageLength(msg), timestamp);
}
- if (!isEnabled) isEnabled = true;
- return midiQueue->pushShortMessage(msg, timestamp);
+ if (!activated) activated = true;
+ do {
+ if (midiQueue->pushShortMessage(msg, timestamp)) return true;
+ } while (reportHandler->onMIDIQueueOverflow());
+ return false;
}
bool Synth::playSysex(const Bit8u *sysex, Bit32u len) {
@@ -681,24 +843,28 @@ bool Synth::playSysex(const Bit8u *sysex, Bit32u len, Bit32u timestamp) {
if (midiDelayMode == MIDIDelayMode_DELAY_ALL) {
timestamp = addMIDIInterfaceDelay(len, timestamp);
}
- if (!isEnabled) isEnabled = true;
- return midiQueue->pushSysex(sysex, len, timestamp);
+ if (!activated) activated = true;
+ do {
+ if (midiQueue->pushSysex(sysex, len, timestamp)) return true;
+ } while (reportHandler->onMIDIQueueOverflow());
+ return false;
}
void Synth::playMsgNow(Bit32u msg) {
+ if (!opened) return;
+
// NOTE: Active sense IS implemented in real hardware. However, realtime processing is clearly out of the library scope.
// It is assumed that realtime consumers of the library respond to these MIDI events as appropriate.
- unsigned char code = (unsigned char)((msg & 0x0000F0) >> 4);
- unsigned char chan = (unsigned char)(msg & 0x00000F);
- unsigned char note = (unsigned char)((msg & 0x007F00) >> 8);
- unsigned char velocity = (unsigned char)((msg & 0x7F0000) >> 16);
- if (!isEnabled) isEnabled = true;
+ Bit8u code = Bit8u((msg & 0x0000F0) >> 4);
+ Bit8u chan = Bit8u(msg & 0x00000F);
+ Bit8u note = Bit8u((msg & 0x007F00) >> 8);
+ Bit8u velocity = Bit8u((msg & 0x7F0000) >> 16);
//printDebug("Playing chan %d, code 0x%01x note: 0x%02x", chan, code, note);
- char part = chantable[chan];
- if (part < 0 || part > 8) {
+ Bit8u part = chantable[chan];
+ if (part > 8) {
#if MT32EMU_MONITOR_MIDI > 0
printDebug("Play msg on unreg chan %d (%d): code=0x%01x, vel=%d", chan, part, code, velocity);
#endif
@@ -707,9 +873,12 @@ void Synth::playMsgNow(Bit32u msg) {
playMsgOnPart(part, code, note, velocity);
}
-void Synth::playMsgOnPart(unsigned char part, unsigned char code, unsigned char note, unsigned char velocity) {
+void Synth::playMsgOnPart(Bit8u part, Bit8u code, Bit8u note, Bit8u velocity) {
+ if (!opened) return;
+
Bit32u bend;
+ if (!activated) activated = true;
//printDebug("Synth::playMsgOnPart(%02x, %02x, %02x, %02x)", part, code, note, velocity);
switch (code) {
case 0x8:
@@ -836,23 +1005,23 @@ void Synth::playSysexWithoutFraming(const Bit8u *sysex, Bit32u len) {
return;
}
if (sysex[0] != SYSEX_MANUFACTURER_ROLAND) {
- printDebug("playSysexWithoutFraming: Header not intended for this device manufacturer: %02x %02x %02x %02x", (int)sysex[0], (int)sysex[1], (int)sysex[2], (int)sysex[3]);
+ printDebug("playSysexWithoutFraming: Header not intended for this device manufacturer: %02x %02x %02x %02x", int(sysex[0]), int(sysex[1]), int(sysex[2]), int(sysex[3]));
return;
}
if (sysex[2] == SYSEX_MDL_D50) {
- printDebug("playSysexWithoutFraming: Header is intended for model D-50 (not yet supported): %02x %02x %02x %02x", (int)sysex[0], (int)sysex[1], (int)sysex[2], (int)sysex[3]);
+ printDebug("playSysexWithoutFraming: Header is intended for model D-50 (not yet supported): %02x %02x %02x %02x", int(sysex[0]), int(sysex[1]), int(sysex[2]), int(sysex[3]));
return;
} else if (sysex[2] != SYSEX_MDL_MT32) {
- printDebug("playSysexWithoutFraming: Header not intended for model MT-32: %02x %02x %02x %02x", (int)sysex[0], (int)sysex[1], (int)sysex[2], (int)sysex[3]);
+ printDebug("playSysexWithoutFraming: Header not intended for model MT-32: %02x %02x %02x %02x", int(sysex[0]), int(sysex[1]), int(sysex[2]), int(sysex[3]));
return;
}
playSysexWithoutHeader(sysex[1], sysex[3], sysex + 4, len - 4);
}
-void Synth::playSysexWithoutHeader(unsigned char device, unsigned char command, const Bit8u *sysex, Bit32u len) {
+void Synth::playSysexWithoutHeader(Bit8u device, Bit8u command, const Bit8u *sysex, Bit32u len) {
if (device > 0x10) {
// We have device ID 0x10 (default, but changeable, on real MT-32), < 0x10 is for channels
- printDebug("playSysexWithoutHeader: Message is not intended for this device ID (provided: %02x, expected: 0x10 or channel)", (int)device);
+ printDebug("playSysexWithoutHeader: Message is not intended for this device ID (provided: %02x, expected: 0x10 or channel)", int(device));
return;
}
// This is checked early in the real devices (before any sysex length checks or further processing)
@@ -861,6 +1030,13 @@ void Synth::playSysexWithoutHeader(unsigned char device, unsigned char command,
reset();
return;
}
+
+ if (command == SYSEX_CMD_EOD) {
+#if MT32EMU_MONITOR_SYSEX > 0
+ printDebug("playSysexWithoutHeader: Ignored unsupported command %02x", command);
+#endif
+ return;
+ }
if (len < 4) {
printDebug("playSysexWithoutHeader: Message is too short (%d bytes)!", len);
return;
@@ -872,12 +1048,19 @@ void Synth::playSysexWithoutHeader(unsigned char device, unsigned char command,
}
len -= 1; // Exclude checksum
switch (command) {
+ case SYSEX_CMD_WSD:
+#if MT32EMU_MONITOR_SYSEX > 0
+ printDebug("playSysexWithoutHeader: Ignored unsupported command %02x", command);
+#endif
+ break;
case SYSEX_CMD_DAT:
+ /* Outcommented until we (ever) actually implement handshake communication
if (hasActivePartials()) {
printDebug("playSysexWithoutHeader: Got SYSEX_CMD_DAT but partials are active - ignoring");
// FIXME: We should send SYSEX_CMD_RJC in this case
break;
}
+ */
// Deliberate fall-through
case SYSEX_CMD_DT1:
writeSysex(device, sysex, len);
@@ -898,11 +1081,12 @@ void Synth::playSysexWithoutHeader(unsigned char device, unsigned char command,
}
}
-void Synth::readSysex(unsigned char /*device*/, const Bit8u * /*sysex*/, Bit32u /*len*/) const {
+void Synth::readSysex(Bit8u /*device*/, const Bit8u * /*sysex*/, Bit32u /*len*/) const {
// NYI
}
-void Synth::writeSysex(unsigned char device, const Bit8u *sysex, Bit32u len) {
+void Synth::writeSysex(Bit8u device, const Bit8u *sysex, Bit32u len) {
+ if (!opened) return;
reportHandler->onMIDIMessagePlayed();
Bit32u addr = (sysex[0] << 16) | (sysex[1] << 8) | (sysex[2]);
addr = MT32EMU_MEMADDR(addr);
@@ -918,7 +1102,7 @@ void Synth::writeSysex(unsigned char device, const Bit8u *sysex, Bit32u len) {
#endif
if (/*addr >= MT32EMU_MEMADDR(0x000000) && */addr < MT32EMU_MEMADDR(0x010000)) {
int offset;
- if (chantable[device] == -1) {
+ if (chantable[device] > 8) {
#if MT32EMU_MONITOR_SYSEX > 0
printDebug(" (Channel not mapped to a part... 0 offset)");
#endif
@@ -939,7 +1123,7 @@ void Synth::writeSysex(unsigned char device, const Bit8u *sysex, Bit32u len) {
addr += MT32EMU_MEMADDR(0x030110) - MT32EMU_MEMADDR(0x010000);
} else if (/*addr >= MT32EMU_MEMADDR(0x020000) && */ addr < MT32EMU_MEMADDR(0x030000)) {
int offset;
- if (chantable[device] == -1) {
+ if (chantable[device] > 8) {
#if MT32EMU_MONITOR_SYSEX > 0
printDebug(" (Channel not mapped to a part... 0 offset)");
#endif
@@ -986,6 +1170,7 @@ void Synth::writeSysex(unsigned char device, const Bit8u *sysex, Bit32u len) {
}
void Synth::readMemory(Bit32u addr, Bit32u len, Bit8u *data) {
+ if (!opened) return;
const MemoryRegion *region = findMemoryRegion(addr);
if (region != NULL) {
readMemoryRegion(region, addr, len, data);
@@ -1004,12 +1189,12 @@ void Synth::initMemoryRegions() {
pos += sizeof(TimbreParam::PartialParam);
}
memset(&paddedTimbreMaxTable[pos], 0, 10); // Padding
- patchTempMemoryRegion = new PatchTempMemoryRegion(this, (Bit8u *)&mt32ram.patchTemp[0], &controlROMData[controlROMMap->patchMaxTable]);
- rhythmTempMemoryRegion = new RhythmTempMemoryRegion(this, (Bit8u *)&mt32ram.rhythmTemp[0], &controlROMData[controlROMMap->rhythmMaxTable]);
- timbreTempMemoryRegion = new TimbreTempMemoryRegion(this, (Bit8u *)&mt32ram.timbreTemp[0], paddedTimbreMaxTable);
- patchesMemoryRegion = new PatchesMemoryRegion(this, (Bit8u *)&mt32ram.patches[0], &controlROMData[controlROMMap->patchMaxTable]);
- timbresMemoryRegion = new TimbresMemoryRegion(this, (Bit8u *)&mt32ram.timbres[0], paddedTimbreMaxTable);
- systemMemoryRegion = new SystemMemoryRegion(this, (Bit8u *)&mt32ram.system, &controlROMData[controlROMMap->systemMaxTable]);
+ patchTempMemoryRegion = new PatchTempMemoryRegion(this, reinterpret_cast<Bit8u *>(&mt32ram.patchTemp[0]), &controlROMData[controlROMMap->patchMaxTable]);
+ rhythmTempMemoryRegion = new RhythmTempMemoryRegion(this, reinterpret_cast<Bit8u *>(&mt32ram.rhythmTemp[0]), &controlROMData[controlROMMap->rhythmMaxTable]);
+ timbreTempMemoryRegion = new TimbreTempMemoryRegion(this, reinterpret_cast<Bit8u *>(&mt32ram.timbreTemp[0]), paddedTimbreMaxTable);
+ patchesMemoryRegion = new PatchesMemoryRegion(this, reinterpret_cast<Bit8u *>(&mt32ram.patches[0]), &controlROMData[controlROMMap->patchMaxTable]);
+ timbresMemoryRegion = new TimbresMemoryRegion(this, reinterpret_cast<Bit8u *>(&mt32ram.timbres[0]), paddedTimbreMaxTable);
+ systemMemoryRegion = new SystemMemoryRegion(this, reinterpret_cast<Bit8u *>(&mt32ram.system), &controlROMData[controlROMMap->systemMaxTable]);
displayMemoryRegion = new DisplayMemoryRegion(this);
resetMemoryRegion = new ResetMemoryRegion(this);
}
@@ -1071,7 +1256,7 @@ void Synth::readMemoryRegion(const MemoryRegion *region, Bit32u addr, Bit32u len
for (m = 0; m < len; m += 2) {
data[m] = 0xff;
if (m + 1 < len) {
- data[m+1] = (Bit8u)region->type;
+ data[m+1] = Bit8u(region->type);
}
}
}
@@ -1279,16 +1464,16 @@ void Synth::writeMemoryRegion(const MemoryRegion *region, Bit32u addr, Bit32u le
if(firstPart < 0)
firstPart = 0;
int lastPart = off + len - SYSTEM_CHAN_ASSIGN_START_OFF;
- if(lastPart > 9)
- lastPart = 9;
- refreshSystemChanAssign(firstPart, lastPart);
+ if(lastPart > 8)
+ lastPart = 8;
+ refreshSystemChanAssign(Bit8u(firstPart), Bit8u(lastPart));
}
if (off <= SYSTEM_MASTER_VOL_OFF && off + len > SYSTEM_MASTER_VOL_OFF) {
refreshSystemMasterVol();
}
break;
case MR_Display:
- char buf[MAX_SYSEX_SIZE];
+ char buf[SYSEX_BUFFER_SIZE];
memcpy(&buf, &data[0], len);
buf[len] = 0;
#if MT32EMU_MONITOR_SYSEX > 0
@@ -1361,19 +1546,19 @@ void Synth::refreshSystemReserveSettings() {
partialManager->setReserve(rset);
}
-void Synth::refreshSystemChanAssign(unsigned int firstPart, unsigned int lastPart) {
- memset(chantable, -1, sizeof(chantable));
+void Synth::refreshSystemChanAssign(Bit8u firstPart, Bit8u lastPart) {
+ memset(chantable, 0xFF, sizeof(chantable));
// CONFIRMED: In the case of assigning a channel to multiple parts, the lower part wins.
- for (unsigned int i = 0; i <= 8; i++) {
+ for (Bit32u i = 0; i <= 8; i++) {
if (parts[i] != NULL && i >= firstPart && i <= lastPart) {
// CONFIRMED: Decay is started for all polys, and all controllers are reset, for every part whose assignment was touched by the sysex write.
parts[i]->allSoundOff();
parts[i]->resetAllControllers();
}
- int chan = mt32ram.system.chanAssign[i];
- if (chan != 16 && chantable[chan] == -1) {
- chantable[chan] = i;
+ Bit8u chan = mt32ram.system.chanAssign[i];
+ if (chan < 16 && chantable[chan] > 8) {
+ chantable[chan] = Bit8u(i);
}
}
@@ -1398,6 +1583,7 @@ void Synth::refreshSystem() {
}
void Synth::reset() {
+ if (!opened) return;
#if MT32EMU_MONITOR_SYSEX > 0
printDebug("RESET");
#endif
@@ -1413,7 +1599,7 @@ void Synth::reset() {
}
}
refreshSystem();
- isEnabled = false;
+ isActive();
}
MidiEvent::~MidiEvent() {
@@ -1477,7 +1663,7 @@ bool MidiEventQueue::pushSysex(const Bit8u *sysexData, Bit32u sysexLength, Bit32
}
const MidiEvent *MidiEventQueue::peekMidiEvent() {
- return (startPosition == endPosition) ? NULL : &ringBuffer[startPosition];
+ return isEmpty() ? NULL : &ringBuffer[startPosition];
}
void MidiEventQueue::dropMidiEvent() {
@@ -1491,15 +1677,24 @@ bool MidiEventQueue::isFull() const {
return startPosition == ((endPosition + 1) & ringBufferMask);
}
-unsigned int Synth::getStereoOutputSampleRate() const {
+bool MidiEventQueue::isEmpty() const {
+ return startPosition == endPosition;
+}
+
+Bit32u Synth::getStereoOutputSampleRate() const {
return (analog == NULL) ? SAMPLE_RATE : analog->getOutputSampleRate();
}
-void Synth::render(Sample *stream, Bit32u len) {
- if (!isEnabled) {
- renderedSampleCount += analog->getDACStreamsLength(len);
- analog->process(NULL, NULL, NULL, NULL, NULL, NULL, NULL, len);
- muteSampleBuffer(stream, len << 1);
+void Renderer::render(SampleFormatConverter &converter, Bit32u len) {
+ if (!synth.opened) {
+ converter.addSilence(len << 1);
+ return;
+ }
+
+ if (!synth.activated) {
+ synth.renderedSampleCount += synth.analog->getDACStreamsLength(len);
+ synth.analog->process(NULL, NULL, NULL, NULL, NULL, NULL, NULL, len);
+ converter.addSilence(len << 1);
return;
}
@@ -1510,57 +1705,139 @@ void Synth::render(Sample *stream, Bit32u len) {
while (len > 0) {
Bit32u thisPassLen = len > MAX_SAMPLES_PER_RUN ? MAX_SAMPLES_PER_RUN : len;
- renderStreams(tmpNonReverbLeft, tmpNonReverbRight, tmpReverbDryLeft, tmpReverbDryRight, tmpReverbWetLeft, tmpReverbWetRight, analog->getDACStreamsLength(thisPassLen));
- analog->process(&stream, tmpNonReverbLeft, tmpNonReverbRight, tmpReverbDryLeft, tmpReverbDryRight, tmpReverbWetLeft, tmpReverbWetRight, thisPassLen);
+ synth.renderStreams(tmpNonReverbLeft, tmpNonReverbRight, tmpReverbDryLeft, tmpReverbDryRight, tmpReverbWetLeft, tmpReverbWetRight, synth.analog->getDACStreamsLength(thisPassLen));
+ synth.analog->process(converter.sampleBuffer, tmpNonReverbLeft, tmpNonReverbRight, tmpReverbDryLeft, tmpReverbDryRight, tmpReverbWetLeft, tmpReverbWetRight, thisPassLen);
+ converter.convert(thisPassLen << 1);
len -= thisPassLen;
}
}
-void Synth::renderStreams(Sample *nonReverbLeft, Sample *nonReverbRight, Sample *reverbDryLeft, Sample *reverbDryRight, Sample *reverbWetLeft, Sample *reverbWetRight, Bit32u len) {
+void Synth::render(Bit16s *stream, Bit32u len) {
+#if MT32EMU_USE_FLOAT_SAMPLES
+ BufferedSampleFormatConverter<2> converter(stream);
+#else
+ SampleFormatConverter converter(stream);
+#endif
+ renderer.render(converter, len);
+}
+
+void Synth::render(float *stream, Bit32u len) {
+#if MT32EMU_USE_FLOAT_SAMPLES
+ SampleFormatConverter converter(stream);
+#else
+ BufferedSampleFormatConverter<2> converter(stream);
+#endif
+ renderer.render(converter, len);
+}
+
+void Renderer::renderStreams(
+ SampleFormatConverter &nonReverbLeft, SampleFormatConverter &nonReverbRight,
+ SampleFormatConverter &reverbDryLeft, SampleFormatConverter &reverbDryRight,
+ SampleFormatConverter &reverbWetLeft, SampleFormatConverter &reverbWetRight,
+ Bit32u len)
+{
+ if (!synth.opened) {
+ nonReverbLeft.addSilence(len);
+ nonReverbRight.addSilence(len);
+ reverbDryLeft.addSilence(len);
+ reverbDryRight.addSilence(len);
+ reverbWetLeft.addSilence(len);
+ reverbWetRight.addSilence(len);
+ return;
+ }
+
while (len > 0) {
// We need to ensure zero-duration notes will play so add minimum 1-sample delay.
Bit32u thisLen = 1;
- if (!isAbortingPoly()) {
- const MidiEvent *nextEvent = midiQueue->peekMidiEvent();
- Bit32s samplesToNextEvent = (nextEvent != NULL) ? Bit32s(nextEvent->timestamp - renderedSampleCount) : MAX_SAMPLES_PER_RUN;
+ if (!synth.isAbortingPoly()) {
+ const MidiEvent *nextEvent = synth.midiQueue->peekMidiEvent();
+ Bit32s samplesToNextEvent = (nextEvent != NULL) ? Bit32s(nextEvent->timestamp - synth.renderedSampleCount) : MAX_SAMPLES_PER_RUN;
if (samplesToNextEvent > 0) {
thisLen = len > MAX_SAMPLES_PER_RUN ? MAX_SAMPLES_PER_RUN : len;
- if (thisLen > (Bit32u)samplesToNextEvent) {
+ if (thisLen > Bit32u(samplesToNextEvent)) {
thisLen = samplesToNextEvent;
}
} else {
if (nextEvent->sysexData == NULL) {
- playMsgNow(nextEvent->shortMessageData);
+ synth.playMsgNow(nextEvent->shortMessageData);
// If a poly is aborting we don't drop the event from the queue.
// Instead, we'll return to it again when the abortion is done.
- if (!isAbortingPoly()) {
- midiQueue->dropMidiEvent();
+ if (!synth.isAbortingPoly()) {
+ synth.midiQueue->dropMidiEvent();
}
} else {
- playSysexNow(nextEvent->sysexData, nextEvent->sysexLength);
- midiQueue->dropMidiEvent();
+ synth.playSysexNow(nextEvent->sysexData, nextEvent->sysexLength);
+ synth.midiQueue->dropMidiEvent();
}
}
}
- doRenderStreams(nonReverbLeft, nonReverbRight, reverbDryLeft, reverbDryRight, reverbWetLeft, reverbWetRight, thisLen);
- advanceStreamPosition(nonReverbLeft, thisLen);
- advanceStreamPosition(nonReverbRight, thisLen);
- advanceStreamPosition(reverbDryLeft, thisLen);
- advanceStreamPosition(reverbDryRight, thisLen);
- advanceStreamPosition(reverbWetLeft, thisLen);
- advanceStreamPosition(reverbWetRight, thisLen);
+ doRenderStreams(
+ nonReverbLeft.sampleBuffer, nonReverbRight.sampleBuffer,
+ reverbDryLeft.sampleBuffer, reverbDryRight.sampleBuffer,
+ reverbWetLeft.sampleBuffer, reverbWetRight.sampleBuffer,
+ thisLen);
+ nonReverbLeft.convert(thisLen);
+ nonReverbRight.convert(thisLen);
+ reverbDryLeft.convert(thisLen);
+ reverbDryRight.convert(thisLen);
+ reverbWetLeft.convert(thisLen);
+ reverbWetRight.convert(thisLen);
len -= thisLen;
}
}
+void Synth::renderStreams(
+ Bit16s *nonReverbLeft, Bit16s *nonReverbRight,
+ Bit16s *reverbDryLeft, Bit16s *reverbDryRight,
+ Bit16s *reverbWetLeft, Bit16s *reverbWetRight,
+ Bit32u len)
+{
+#if MT32EMU_USE_FLOAT_SAMPLES
+ BufferedSampleFormatConverter<> convNonReverbLeft(nonReverbLeft), convNonReverbRight(nonReverbRight);
+ BufferedSampleFormatConverter<> convReverbDryLeft(reverbDryLeft), convReverbDryRight(reverbDryRight);
+ BufferedSampleFormatConverter<> convReverbWetLeft(reverbWetLeft), convReverbWetRight(reverbWetRight);
+#else
+ SampleFormatConverter convNonReverbLeft(nonReverbLeft), convNonReverbRight(nonReverbRight);
+ SampleFormatConverter convReverbDryLeft(reverbDryLeft), convReverbDryRight(reverbDryRight);
+ SampleFormatConverter convReverbWetLeft(reverbWetLeft), convReverbWetRight(reverbWetRight);
+#endif
+ renderer.renderStreams(
+ convNonReverbLeft, convNonReverbRight,
+ convReverbDryLeft, convReverbDryRight,
+ convReverbWetLeft, convReverbWetRight,
+ len);
+}
+
+void Synth::renderStreams(
+ float *nonReverbLeft, float *nonReverbRight,
+ float *reverbDryLeft, float *reverbDryRight,
+ float *reverbWetLeft, float *reverbWetRight,
+ Bit32u len)
+{
+#if MT32EMU_USE_FLOAT_SAMPLES
+ SampleFormatConverter convNonReverbLeft(nonReverbLeft), convNonReverbRight(nonReverbRight);
+ SampleFormatConverter convReverbDryLeft(reverbDryLeft), convReverbDryRight(reverbDryRight);
+ SampleFormatConverter convReverbWetLeft(reverbWetLeft), convReverbWetRight(reverbWetRight);
+#else
+ BufferedSampleFormatConverter<> convNonReverbLeft(nonReverbLeft), convNonReverbRight(nonReverbRight);
+ BufferedSampleFormatConverter<> convReverbDryLeft(reverbDryLeft), convReverbDryRight(reverbDryRight);
+ BufferedSampleFormatConverter<> convReverbWetLeft(reverbWetLeft), convReverbWetRight(reverbWetRight);
+#endif
+ renderer.renderStreams(
+ convNonReverbLeft, convNonReverbRight,
+ convReverbDryLeft, convReverbDryRight,
+ convReverbWetLeft, convReverbWetRight,
+ len);
+}
+
// In GENERATION2 units, the output from LA32 goes to the Boss chip already bit-shifted.
// In NICE mode, it's also better to increase volume before the reverb processing to preserve accuracy.
-void Synth::produceLA32Output(Sample *buffer, Bit32u len) {
+void Renderer::produceLA32Output(Sample *buffer, Bit32u len) {
#if MT32EMU_USE_FLOAT_SAMPLES
(void)buffer;
(void)len;
#else
- switch (dacInputMode) {
+ switch (synth.dacInputMode) {
case DACInputMode_GENERATION2:
while (len--) {
*buffer = (*buffer & 0x8000) | ((*buffer << 1) & 0x7FFE) | ((*buffer >> 14) & 0x0001);
@@ -1569,7 +1846,7 @@ void Synth::produceLA32Output(Sample *buffer, Bit32u len) {
break;
case DACInputMode_NICE:
while (len--) {
- *buffer = clipSampleEx(SampleEx(*buffer) << 1);
+ *buffer = Synth::clipSampleEx(SampleEx(*buffer) << 1);
++buffer;
}
break;
@@ -1579,12 +1856,12 @@ void Synth::produceLA32Output(Sample *buffer, Bit32u len) {
#endif
}
-void Synth::convertSamplesToOutput(Sample *buffer, Bit32u len) {
+void Renderer::convertSamplesToOutput(Sample *buffer, Bit32u len) {
#if MT32EMU_USE_FLOAT_SAMPLES
(void)buffer;
(void)len;
#else
- if (dacInputMode == DACInputMode_GENERATION1) {
+ if (synth.dacInputMode == DACInputMode_GENERATION1) {
while (len--) {
*buffer = Sample((*buffer & 0x8000) | ((*buffer << 1) & 0x7FFE));
++buffer;
@@ -1593,7 +1870,7 @@ void Synth::convertSamplesToOutput(Sample *buffer, Bit32u len) {
#endif
}
-void Synth::doRenderStreams(Sample *nonReverbLeft, Sample *nonReverbRight, Sample *reverbDryLeft, Sample *reverbDryRight, Sample *reverbWetLeft, Sample *reverbWetRight, Bit32u len) {
+void Renderer::doRenderStreams(Sample *nonReverbLeft, Sample *nonReverbRight, Sample *reverbDryLeft, Sample *reverbDryRight, Sample *reverbWetLeft, Sample *reverbWetRight, Bit32u len) {
// Even if LA32 output isn't desired, we proceed anyway with temp buffers
Sample tmpBufNonReverbLeft[MAX_SAMPLES_PER_RUN], tmpBufNonReverbRight[MAX_SAMPLES_PER_RUN];
if (nonReverbLeft == NULL) nonReverbLeft = tmpBufNonReverbLeft;
@@ -1603,30 +1880,30 @@ void Synth::doRenderStreams(Sample *nonReverbLeft, Sample *nonReverbRight, Sampl
if (reverbDryLeft == NULL) reverbDryLeft = tmpBufReverbDryLeft;
if (reverbDryRight == NULL) reverbDryRight = tmpBufReverbDryRight;
- if (isEnabled) {
- muteSampleBuffer(nonReverbLeft, len);
- muteSampleBuffer(nonReverbRight, len);
- muteSampleBuffer(reverbDryLeft, len);
- muteSampleBuffer(reverbDryRight, len);
+ if (synth.activated) {
+ Synth::muteSampleBuffer(nonReverbLeft, len);
+ Synth::muteSampleBuffer(nonReverbRight, len);
+ Synth::muteSampleBuffer(reverbDryLeft, len);
+ Synth::muteSampleBuffer(reverbDryRight, len);
- for (unsigned int i = 0; i < getPartialCount(); i++) {
- if (partialManager->shouldReverb(i)) {
- partialManager->produceOutput(i, reverbDryLeft, reverbDryRight, len);
+ for (unsigned int i = 0; i < synth.getPartialCount(); i++) {
+ if (synth.partialManager->shouldReverb(i)) {
+ synth.partialManager->produceOutput(i, reverbDryLeft, reverbDryRight, len);
} else {
- partialManager->produceOutput(i, nonReverbLeft, nonReverbRight, len);
+ synth.partialManager->produceOutput(i, nonReverbLeft, nonReverbRight, len);
}
}
produceLA32Output(reverbDryLeft, len);
produceLA32Output(reverbDryRight, len);
- if (isReverbEnabled()) {
- reverbModel->process(reverbDryLeft, reverbDryRight, reverbWetLeft, reverbWetRight, len);
+ if (synth.isReverbEnabled()) {
+ synth.reverbModel->process(reverbDryLeft, reverbDryRight, reverbWetLeft, reverbWetRight, len);
if (reverbWetLeft != NULL) convertSamplesToOutput(reverbWetLeft, len);
if (reverbWetRight != NULL) convertSamplesToOutput(reverbWetRight, len);
} else {
- muteSampleBuffer(reverbWetLeft, len);
- muteSampleBuffer(reverbWetRight, len);
+ Synth::muteSampleBuffer(reverbWetLeft, len);
+ Synth::muteSampleBuffer(reverbWetRight, len);
}
// Don't bother with conversion if the output is going to be unused
@@ -1642,29 +1919,32 @@ void Synth::doRenderStreams(Sample *nonReverbLeft, Sample *nonReverbRight, Sampl
if (reverbDryRight != tmpBufReverbDryRight) convertSamplesToOutput(reverbDryRight, len);
} else {
// Avoid muting buffers that wasn't requested
- if (nonReverbLeft != tmpBufNonReverbLeft) muteSampleBuffer(nonReverbLeft, len);
- if (nonReverbRight != tmpBufNonReverbRight) muteSampleBuffer(nonReverbRight, len);
- if (reverbDryLeft != tmpBufReverbDryLeft) muteSampleBuffer(reverbDryLeft, len);
- if (reverbDryRight != tmpBufReverbDryRight) muteSampleBuffer(reverbDryRight, len);
- muteSampleBuffer(reverbWetLeft, len);
- muteSampleBuffer(reverbWetRight, len);
+ if (nonReverbLeft != tmpBufNonReverbLeft) Synth::muteSampleBuffer(nonReverbLeft, len);
+ if (nonReverbRight != tmpBufNonReverbRight) Synth::muteSampleBuffer(nonReverbRight, len);
+ if (reverbDryLeft != tmpBufReverbDryLeft) Synth::muteSampleBuffer(reverbDryLeft, len);
+ if (reverbDryRight != tmpBufReverbDryRight) Synth::muteSampleBuffer(reverbDryRight, len);
+ Synth::muteSampleBuffer(reverbWetLeft, len);
+ Synth::muteSampleBuffer(reverbWetRight, len);
}
- partialManager->clearAlreadyOutputed();
- renderedSampleCount += len;
+ synth.partialManager->clearAlreadyOutputed();
+ synth.renderedSampleCount += len;
}
-void Synth::printPartialUsage(unsigned long sampleOffset) {
+void Synth::printPartialUsage(Bit32u sampleOffset) {
unsigned int partialUsage[9];
partialManager->getPerPartPartialUsage(partialUsage);
if (sampleOffset > 0) {
- printDebug("[+%lu] Partial Usage: 1:%02d 2:%02d 3:%02d 4:%02d 5:%02d 6:%02d 7:%02d 8:%02d R: %02d TOTAL: %02d", sampleOffset, partialUsage[0], partialUsage[1], partialUsage[2], partialUsage[3], partialUsage[4], partialUsage[5], partialUsage[6], partialUsage[7], partialUsage[8], getPartialCount() - partialManager->getFreePartialCount());
+ printDebug("[+%u] Partial Usage: 1:%02d 2:%02d 3:%02d 4:%02d 5:%02d 6:%02d 7:%02d 8:%02d R: %02d TOTAL: %02d", sampleOffset, partialUsage[0], partialUsage[1], partialUsage[2], partialUsage[3], partialUsage[4], partialUsage[5], partialUsage[6], partialUsage[7], partialUsage[8], getPartialCount() - partialManager->getFreePartialCount());
} else {
printDebug("Partial Usage: 1:%02d 2:%02d 3:%02d 4:%02d 5:%02d 6:%02d 7:%02d 8:%02d R: %02d TOTAL: %02d", partialUsage[0], partialUsage[1], partialUsage[2], partialUsage[3], partialUsage[4], partialUsage[5], partialUsage[6], partialUsage[7], partialUsage[8], getPartialCount() - partialManager->getFreePartialCount());
}
}
bool Synth::hasActivePartials() const {
+ if (!opened) {
+ return false;
+ }
for (unsigned int partialNum = 0; partialNum < getPartialCount(); partialNum++) {
if (partialManager->getPartial(partialNum)->isActive()) {
return true;
@@ -1673,51 +1953,81 @@ bool Synth::hasActivePartials() const {
return false;
}
-bool Synth::isAbortingPoly() const {
- return abortingPoly != NULL;
-}
-
-bool Synth::isActive() const {
- if (hasActivePartials()) {
+bool Synth::isActive() {
+ if (!opened) {
+ return false;
+ }
+ if (!midiQueue->isEmpty() || hasActivePartials()) {
return true;
}
- if (isReverbEnabled()) {
- return reverbModel->isActive();
+ if (isReverbEnabled() && reverbModel->isActive()) {
+ return true;
}
+ activated = false;
return false;
}
-unsigned int Synth::getPartialCount() const {
+Bit32u Synth::getPartialCount() const {
return partialCount;
}
void Synth::getPartStates(bool *partStates) const {
+ if (!opened) {
+ memset(partStates, 0, 9 * sizeof(bool));
+ return;
+ }
for (int partNumber = 0; partNumber < 9; partNumber++) {
const Part *part = parts[partNumber];
partStates[partNumber] = part->getActiveNonReleasingPartialCount() > 0;
}
}
+Bit32u Synth::getPartStates() const {
+ if (!opened) return 0;
+ bool partStates[9];
+ getPartStates(partStates);
+ Bit32u bitSet = 0;
+ for (int partNumber = 8; partNumber >= 0; partNumber--) {
+ bitSet = (bitSet << 1) | (partStates[partNumber] ? 1 : 0);
+ }
+ return bitSet;
+}
+
void Synth::getPartialStates(PartialState *partialStates) const {
- static const PartialState partialPhaseToState[8] = {
- PartialState_ATTACK, PartialState_ATTACK, PartialState_ATTACK, PartialState_ATTACK,
- PartialState_SUSTAIN, PartialState_SUSTAIN, PartialState_RELEASE, PartialState_INACTIVE
- };
+ if (!opened) {
+ memset(partialStates, 0, partialCount * sizeof(PartialState));
+ return;
+ }
+ for (unsigned int partialNum = 0; partialNum < partialCount; partialNum++) {
+ partialStates[partialNum] = getPartialState(partialManager, partialNum);
+ }
+}
- for (unsigned int partialNum = 0; partialNum < getPartialCount(); partialNum++) {
- const Partial *partial = partialManager->getPartial(partialNum);
- partialStates[partialNum] = partial->isActive() ? partialPhaseToState[partial->getTVA()->getPhase()] : PartialState_INACTIVE;
+void Synth::getPartialStates(Bit8u *partialStates) const {
+ if (!opened) {
+ memset(partialStates, 0, ((partialCount + 3) >> 2));
+ return;
+ }
+ for (unsigned int quartNum = 0; (4 * quartNum) < partialCount; quartNum++) {
+ Bit8u packedStates = 0;
+ for (unsigned int i = 0; i < 4; i++) {
+ unsigned int partialNum = (4 * quartNum) + i;
+ if (partialCount <= partialNum) break;
+ PartialState partialState = getPartialState(partialManager, partialNum);
+ packedStates |= (partialState & 3) << (2 * i);
+ }
+ partialStates[quartNum] = packedStates;
}
}
-unsigned int Synth::getPlayingNotes(unsigned int partNumber, Bit8u *keys, Bit8u *velocities) const {
- unsigned int playingNotes = 0;
- if (isOpen && (partNumber < 9)) {
+Bit32u Synth::getPlayingNotes(Bit8u partNumber, Bit8u *keys, Bit8u *velocities) const {
+ Bit32u playingNotes = 0;
+ if (opened && (partNumber < 9)) {
const Part *part = parts[partNumber];
const Poly *poly = part->getFirstActivePoly();
while (poly != NULL) {
- keys[playingNotes] = (Bit8u)poly->getKey();
- velocities[playingNotes] = (Bit8u)poly->getVelocity();
+ keys[playingNotes] = Bit8u(poly->getKey());
+ velocities[playingNotes] = Bit8u(poly->getVelocity());
playingNotes++;
poly = poly->getNext();
}
@@ -1725,11 +2035,11 @@ unsigned int Synth::getPlayingNotes(unsigned int partNumber, Bit8u *keys, Bit8u
return playingNotes;
}
-const char *Synth::getPatchName(unsigned int partNumber) const {
- return (!isOpen || partNumber > 8) ? NULL : parts[partNumber]->getCurrentInstr();
+const char *Synth::getPatchName(Bit8u partNumber) const {
+ return (!opened || partNumber > 8) ? NULL : parts[partNumber]->getCurrentInstr();
}
-const Part *Synth::getPart(unsigned int partNum) const {
+const Part *Synth::getPart(Bit8u partNum) const {
if (partNum > 8) {
return NULL;
}
@@ -1783,6 +2093,7 @@ void MemoryRegion::write(unsigned int entry, unsigned int off, const Bit8u *src,
#if MT32EMU_MONITOR_SYSEX > 0
synth->printDebug("write[%d]: unwritable region: entry=%d, off=%d, len=%d", type, entry, off, len);
#endif
+ return;
}
for (unsigned int i = 0; i < len; i++) {
@@ -1807,4 +2118,4 @@ void MemoryRegion::write(unsigned int entry, unsigned int off, const Bit8u *src,
}
}
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/Synth.h b/audio/softsynth/mt32/Synth.h
index 97d4644ee2..5561d8d5db 100644..100755
--- a/audio/softsynth/mt32/Synth.h
+++ b/audio/softsynth/mt32/Synth.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,8 +18,13 @@
#ifndef MT32EMU_SYNTH_H
#define MT32EMU_SYNTH_H
-//#include <cstdarg>
-//#include <cstring>
+#include <cstdarg>
+#include <cstddef>
+#include <cstring>
+
+#include "globals.h"
+#include "Types.h"
+#include "Enumerations.h"
namespace MT32Emu {
@@ -31,6 +36,8 @@ class Part;
class Poly;
class Partial;
class PartialManager;
+class Renderer;
+class ROMImage;
class PatchTempMemoryRegion;
class RhythmTempMemoryRegion;
@@ -41,82 +48,11 @@ class SystemMemoryRegion;
class DisplayMemoryRegion;
class ResetMemoryRegion;
+struct ControlROMFeatureSet;
struct ControlROMMap;
struct PCMWaveEntry;
struct MemParams;
-/**
- * Methods for emulating the connection between the LA32 and the DAC, which involves
- * some hacks in the real devices for doubling the volume.
- * See also http://en.wikipedia.org/wiki/Roland_MT-32#Digital_overflow
- */
-enum DACInputMode {
- // Produces samples at double the volume, without tricks.
- // * Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)
- // * Higher quality than the real devices
- DACInputMode_NICE,
-
- // Produces samples that exactly match the bits output from the emulated LA32.
- // * Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)
- // * Much less likely to overdrive than any other mode.
- // * Half the volume of any of the other modes.
- // * Output gain is ignored for both LA32 and reverb output.
- // * Perfect for developers while debugging :)
- DACInputMode_PURE,
-
- // Re-orders the LA32 output bits as in early generation MT-32s (according to Wikipedia).
- // Bit order at DAC (where each number represents the original LA32 output bit number, and XX means the bit is always low):
- // 15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 XX
- DACInputMode_GENERATION1,
-
- // Re-orders the LA32 output bits as in later generations (personally confirmed on my CM-32L - KG).
- // Bit order at DAC (where each number represents the original LA32 output bit number):
- // 15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 14
- DACInputMode_GENERATION2
-};
-
-// Methods for emulating the effective delay of incoming MIDI messages introduced by a MIDI interface.
-enum MIDIDelayMode {
- // Process incoming MIDI events immediately.
- MIDIDelayMode_IMMEDIATE,
-
- // Delay incoming short MIDI messages as if they where transferred via a MIDI cable to a real hardware unit and immediate sysex processing.
- // This ensures more accurate timing of simultaneous NoteOn messages.
- MIDIDelayMode_DELAY_SHORT_MESSAGES_ONLY,
-
- // Delay all incoming MIDI events as if they where transferred via a MIDI cable to a real hardware unit.
- MIDIDelayMode_DELAY_ALL
-};
-
-// Methods for emulating the effects of analogue circuits of real hardware units on the output signal.
-enum AnalogOutputMode {
- // Only digital path is emulated. The output samples correspond to the digital signal at the DAC entrance.
- AnalogOutputMode_DIGITAL_ONLY,
- // Coarse emulation of LPF circuit. High frequencies are boosted, sample rate remains unchanged.
- AnalogOutputMode_COARSE,
- // Finer emulation of LPF circuit. Output signal is upsampled to 48 kHz to allow emulation of audible mirror spectra above 16 kHz,
- // which is passed through the LPF circuit without significant attenuation.
- AnalogOutputMode_ACCURATE,
- // Same as AnalogOutputMode_ACCURATE mode but the output signal is 2x oversampled, i.e. the output sample rate is 96 kHz.
- // This makes subsequent resampling easier. Besides, due to nonlinear passband of the LPF emulated, it takes fewer number of MACs
- // compared to a regular LPF FIR implementations.
- AnalogOutputMode_OVERSAMPLED
-};
-
-enum ReverbMode {
- REVERB_MODE_ROOM,
- REVERB_MODE_HALL,
- REVERB_MODE_PLATE,
- REVERB_MODE_TAP_DELAY
-};
-
-enum PartialState {
- PartialState_INACTIVE,
- PartialState_ATTACK,
- PartialState_SUSTAIN,
- PartialState_RELEASE
-};
-
const Bit8u SYSEX_MANUFACTURER_ROLAND = 0x41;
const Bit8u SYSEX_MDL_MT32 = 0x16;
@@ -132,47 +68,64 @@ const Bit8u SYSEX_CMD_EOD = 0x45; // End of data
const Bit8u SYSEX_CMD_ERR = 0x4E; // Communications error
const Bit8u SYSEX_CMD_RJC = 0x4F; // Rejection
-const int MAX_SYSEX_SIZE = 512; // FIXME: Does this correspond to a real MIDI buffer used in h/w devices?
-
-const unsigned int CONTROL_ROM_SIZE = 64 * 1024;
-
-class ReportHandler {
-friend class Synth;
+const Bit32u CONTROL_ROM_SIZE = 64 * 1024;
+
+// Set of multiplexed output streams appeared at the DAC entrance.
+template <class T>
+struct DACOutputStreams {
+ T *nonReverbLeft;
+ T *nonReverbRight;
+ T *reverbDryLeft;
+ T *reverbDryRight;
+ T *reverbWetLeft;
+ T *reverbWetRight;
+};
+// Class for the client to supply callbacks for reporting various errors and information
+class MT32EMU_EXPORT ReportHandler {
public:
virtual ~ReportHandler() {}
-protected:
-
// Callback for debug messages, in vprintf() format
virtual void printDebug(const char *fmt, va_list list);
-
- // Callbacks for reporting various errors and information
+ // Callbacks for reporting errors
virtual void onErrorControlROM() {}
virtual void onErrorPCMROM() {}
+ // Callback for reporting about displaying a new custom message on LCD
virtual void showLCDMessage(const char *message);
+ // Callback for reporting actual processing of a MIDI message
virtual void onMIDIMessagePlayed() {}
+ // Callback for reporting an overflow of the input MIDI queue.
+ // Returns true if a recovery action was taken and yet another attempt to enqueue the MIDI event is desired.
+ virtual bool onMIDIQueueOverflow() { return false; }
+ // Callback invoked when a System Realtime MIDI message is detected at the input.
+ virtual void onMIDISystemRealtime(Bit8u /* systemRealtime */) {}
+ // Callbacks for reporting system events
virtual void onDeviceReset() {}
virtual void onDeviceReconfig() {}
+ // Callbacks for reporting changes of reverb settings
virtual void onNewReverbMode(Bit8u /* mode */) {}
virtual void onNewReverbTime(Bit8u /* time */) {}
virtual void onNewReverbLevel(Bit8u /* level */) {}
- virtual void onPolyStateChanged(int /* partNum */) {}
- virtual void onProgramChanged(int /* partNum */, int /* bankNum */, const char * /* patchName */) {}
+ // Callbacks for reporting various information
+ virtual void onPolyStateChanged(Bit8u /* partNum */) {}
+ virtual void onProgramChanged(Bit8u /* partNum */, const char * /* soundGroupName */, const char * /* patchName */) {}
};
class Synth {
+friend class DefaultMidiStreamParser;
friend class Part;
-friend class RhythmPart;
-friend class Poly;
friend class Partial;
friend class PartialManager;
-friend class Tables;
-friend class MemoryRegion;
+friend class Poly;
+friend class Renderer;
+friend class RhythmPart;
friend class TVA;
-friend class TVF;
friend class TVP;
+
private:
+ // **************************** Implementation fields **************************
+
PatchTempMemoryRegion *patchTempMemoryRegion;
RhythmTempMemoryRegion *rhythmTempMemoryRegion;
TimbreTempMemoryRegion *timbreTempMemoryRegion;
@@ -184,8 +137,6 @@ private:
Bit8u *paddedTimbreMaxTable;
- bool isEnabled;
-
PCMWaveEntry *pcmWaves; // Array
const ControlROMFeatureSet *controlROMFeatures;
@@ -194,8 +145,11 @@ private:
Bit16s *pcmROMData;
size_t pcmROMSize; // This is in 16-bit samples, therefore half the number of bytes in the ROM
- unsigned int partialCount;
- Bit8s chantable[32]; // FIXME: Need explanation why 32 is set, obviously it should be 16
+ Bit8u soundGroupIx[128]; // For each standard timbre
+ const char (*soundGroupNames)[9]; // Array
+
+ Bit32u partialCount;
+ Bit8u chantable[16]; // NOTE: value above 8 means that the channel is not assigned
MidiEventQueue *midiQueue;
volatile Bit32u lastReceivedMIDIEventTimestamp;
@@ -215,7 +169,8 @@ private:
bool reversedStereoEnabled;
- bool isOpen;
+ bool opened;
+ bool activated;
bool isDefaultReportHandler;
ReportHandler *reportHandler;
@@ -229,15 +184,17 @@ private:
Poly *abortingPoly;
Analog *analog;
+ Renderer &renderer;
- Bit32u addMIDIInterfaceDelay(Bit32u len, Bit32u timestamp);
+ // Binary compatibility helper.
+ void *reserved;
- void produceLA32Output(Sample *buffer, Bit32u len);
- void convertSamplesToOutput(Sample *buffer, Bit32u len);
- bool isAbortingPoly() const;
- void doRenderStreams(Sample *nonReverbLeft, Sample *nonReverbRight, Sample *reverbDryLeft, Sample *reverbDryRight, Sample *reverbWetLeft, Sample *reverbWetRight, Bit32u len);
+ // **************************** Implementation methods **************************
- void readSysex(unsigned char channel, const Bit8u *sysex, Bit32u len) const;
+ Bit32u addMIDIInterfaceDelay(Bit32u len, Bit32u timestamp);
+ bool isAbortingPoly() const { return abortingPoly != NULL; }
+
+ void readSysex(Bit8u channel, const Bit8u *sysex, Bit32u len) const;
void initMemoryRegions();
void deleteMemoryRegions();
MemoryRegion *findMemoryRegion(Bit32u addr);
@@ -248,79 +205,97 @@ private:
bool loadPCMROM(const ROMImage &pcmROMImage);
bool initPCMList(Bit16u mapAddress, Bit16u count);
- bool initTimbres(Bit16u mapAddress, Bit16u offset, int timbreCount, int startTimbre, bool compressed);
- bool initCompressedTimbre(int drumNum, const Bit8u *mem, unsigned int memLen);
+ bool initTimbres(Bit16u mapAddress, Bit16u offset, Bit16u timbreCount, Bit16u startTimbre, bool compressed);
+ bool initCompressedTimbre(Bit16u drumNum, const Bit8u *mem, Bit32u memLen);
+ void initReverbModels(bool mt32CompatibleMode);
+ void initSoundGroups(char newSoundGroupNames[][9]);
void refreshSystemMasterTune();
void refreshSystemReverbParameters();
void refreshSystemReserveSettings();
- void refreshSystemChanAssign(unsigned int firstPart, unsigned int lastPart);
+ void refreshSystemChanAssign(Bit8u firstPart, Bit8u lastPart);
void refreshSystemMasterVol();
void refreshSystem();
void reset();
+ void dispose();
- void printPartialUsage(unsigned long sampleOffset = 0);
+ void printPartialUsage(Bit32u sampleOffset = 0);
- void polyStateChanged(int partNum);
- void newTimbreSet(int partNum, Bit8u timbreGroup, const char patchName[]);
+ void newTimbreSet(Bit8u partNum, Bit8u timbreGroup, Bit8u timbreNumber, const char patchName[]);
void printDebug(const char *fmt, ...);
// partNum should be 0..7 for Part 1..8, or 8 for Rhythm
- const Part *getPart(unsigned int partNum) const;
+ const Part *getPart(Bit8u partNum) const;
public:
- static inline Sample clipSampleEx(SampleEx sampleEx) {
-#if MT32EMU_USE_FLOAT_SAMPLES
- return sampleEx;
-#else
+ static inline Bit16s clipSampleEx(Bit32s sampleEx) {
// Clamp values above 32767 to 32767, and values below -32768 to -32768
// FIXME: Do we really need this stuff? I think these branches are very well predicted. Instead, this introduces a chain.
// The version below is actually a bit faster on my system...
- //return ((sampleEx + 0x8000) & ~0xFFFF) ? (sampleEx >> 31) ^ 0x7FFF : (Sample)sampleEx;
- return ((-0x8000 <= sampleEx) && (sampleEx <= 0x7FFF)) ? (Sample)sampleEx : (sampleEx >> 31) ^ 0x7FFF;
-#endif
+ //return ((sampleEx + 0x8000) & ~0xFFFF) ? Bit16s((sampleEx >> 31) ^ 0x7FFF) : (Bit16s)sampleEx;
+ return ((-0x8000 <= sampleEx) && (sampleEx <= 0x7FFF)) ? Bit16s(sampleEx) : Bit16s((sampleEx >> 31) ^ 0x7FFF);
+ }
+
+ static inline float clipSampleEx(float sampleEx) {
+ return sampleEx;
}
- static inline void muteSampleBuffer(Sample *buffer, Bit32u len) {
+ template <class S>
+ static inline void muteSampleBuffer(S *buffer, Bit32u len) {
if (buffer == NULL) return;
+ memset(buffer, 0, len * sizeof(S));
+ }
-#if MT32EMU_USE_FLOAT_SAMPLES
+ static inline void muteSampleBuffer(float *buffer, Bit32u len) {
+ if (buffer == NULL) return;
// FIXME: Use memset() where compatibility is guaranteed (if this turns out to be a win)
while (len--) {
*(buffer++) = 0.0f;
}
-#else
- memset(buffer, 0, len * sizeof(Sample));
-#endif
}
- static Bit32u getShortMessageLength(Bit32u msg);
- static Bit8u calcSysexChecksum(const Bit8u *data, const Bit32u len, const Bit8u initChecksum = 0);
+ // Returns library version as an integer in format: 0x00MMmmpp, where:
+ // MM - major version number
+ // mm - minor version number
+ // pp - patch number
+ MT32EMU_EXPORT static Bit32u getLibraryVersionInt();
+ // Returns library version as a C-string in format: "MAJOR.MINOR.PATCH"
+ MT32EMU_EXPORT static const char *getLibraryVersionString();
+
+ MT32EMU_EXPORT static Bit32u getShortMessageLength(Bit32u msg);
+ MT32EMU_EXPORT static Bit8u calcSysexChecksum(const Bit8u *data, const Bit32u len, const Bit8u initChecksum = 0);
+
+ // Returns output sample rate used in emulation of stereo analog circuitry of hardware units.
+ // See comment for AnalogOutputMode.
+ MT32EMU_EXPORT static Bit32u getStereoOutputSampleRate(AnalogOutputMode analogOutputMode);
// Optionally sets callbacks for reporting various errors, information and debug messages
- Synth(ReportHandler *useReportHandler = NULL);
- ~Synth();
+ MT32EMU_EXPORT explicit Synth(ReportHandler *useReportHandler = NULL);
+ MT32EMU_EXPORT ~Synth();
// Used to initialise the MT-32. Must be called before any other function.
// Returns true if initialization was sucessful, otherwise returns false.
// controlROMImage and pcmROMImage represent Control and PCM ROM images for use by synth.
// usePartialCount sets the maximum number of partials playing simultaneously for this session (optional).
// analogOutputMode sets the mode for emulation of analogue circuitry of the hardware units (optional).
- bool open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, unsigned int usePartialCount = DEFAULT_MAX_PARTIALS, AnalogOutputMode analogOutputMode = AnalogOutputMode_COARSE);
+ MT32EMU_EXPORT bool open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, Bit32u usePartialCount = DEFAULT_MAX_PARTIALS, AnalogOutputMode analogOutputMode = AnalogOutputMode_COARSE);
// Overloaded method which opens the synth with default partial count.
- bool open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, AnalogOutputMode analogOutputMode);
+ MT32EMU_EXPORT bool open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, AnalogOutputMode analogOutputMode);
// Closes the MT-32 and deallocates any memory used by the synthesizer
- void close(bool forced = false);
+ MT32EMU_EXPORT void close();
+
+ // Returns true if the synth is in completely initialized state, otherwise returns false.
+ MT32EMU_EXPORT bool isOpen() const;
// All the enqueued events are processed by the synth immediately.
- void flushMIDIQueue();
+ MT32EMU_EXPORT void flushMIDIQueue();
// Sets size of the internal MIDI event queue. The queue size is set to the minimum power of 2 that is greater or equal to the size specified.
// The queue is flushed before reallocation.
// Returns the actual queue size being used.
- Bit32u setMIDIEventQueueSize(Bit32u);
+ MT32EMU_EXPORT Bit32u setMIDIEventQueueSize(Bit32u);
// Enqueues a MIDI event for subsequent playback.
// The MIDI event will be processed not before the specified timestamp.
@@ -330,14 +305,15 @@ public:
// Calls from multiple threads must be synchronised, although, no synchronisation is required with the rendering thread.
// The methods return false if the MIDI event queue is full and the message cannot be enqueued.
- // Enqueues a single short MIDI message. The message must contain a status byte.
- bool playMsg(Bit32u msg, Bit32u timestamp);
- // Enqueues a single well formed System Exclusive MIDI message.
- bool playSysex(const Bit8u *sysex, Bit32u len, Bit32u timestamp);
+ // Enqueues a single short MIDI message to play at specified time. The message must contain a status byte.
+ MT32EMU_EXPORT bool playMsg(Bit32u msg, Bit32u timestamp);
+ // Enqueues a single well formed System Exclusive MIDI message to play at specified time.
+ MT32EMU_EXPORT bool playSysex(const Bit8u *sysex, Bit32u len, Bit32u timestamp);
- // Overloaded methods for the MIDI events to be processed ASAP.
- bool playMsg(Bit32u msg);
- bool playSysex(const Bit8u *sysex, Bit32u len);
+ // Enqueues a single short MIDI message to be processed ASAP. The message must contain a status byte.
+ MT32EMU_EXPORT bool playMsg(Bit32u msg);
+ // Enqueues a single well formed System Exclusive MIDI message to be processed ASAP.
+ MT32EMU_EXPORT bool playSysex(const Bit8u *sysex, Bit32u len);
// WARNING:
// The methods below don't ensure minimum 1-sample delay between sequential MIDI events,
@@ -345,40 +321,60 @@ public:
// A thread that invokes these methods must be explicitly synchronised with the thread performing sample rendering.
// Sends a short MIDI message to the synth for immediate playback. The message must contain a status byte.
- void playMsgNow(Bit32u msg);
- void playMsgOnPart(unsigned char part, unsigned char code, unsigned char note, unsigned char velocity);
-
- // Sends a string of Sysex commands to the MT-32 for immediate interpretation
- // The length is in bytes
- void playSysexNow(const Bit8u *sysex, Bit32u len);
- void playSysexWithoutFraming(const Bit8u *sysex, Bit32u len);
- void playSysexWithoutHeader(unsigned char device, unsigned char command, const Bit8u *sysex, Bit32u len);
- void writeSysex(unsigned char channel, const Bit8u *sysex, Bit32u len);
-
- void setReverbEnabled(bool reverbEnabled);
- bool isReverbEnabled() const;
+ // See the WARNING above.
+ MT32EMU_EXPORT void playMsgNow(Bit32u msg);
+ // Sends unpacked short MIDI message to the synth for immediate playback. The message must contain a status byte.
+ // See the WARNING above.
+ MT32EMU_EXPORT void playMsgOnPart(Bit8u part, Bit8u code, Bit8u note, Bit8u velocity);
+
+ // Sends a single well formed System Exclusive MIDI message for immediate processing. The length is in bytes.
+ // See the WARNING above.
+ MT32EMU_EXPORT void playSysexNow(const Bit8u *sysex, Bit32u len);
+ // Sends inner body of a System Exclusive MIDI message for direct processing. The length is in bytes.
+ // See the WARNING above.
+ MT32EMU_EXPORT void playSysexWithoutFraming(const Bit8u *sysex, Bit32u len);
+ // Sends inner body of a System Exclusive MIDI message for direct processing. The length is in bytes.
+ // See the WARNING above.
+ MT32EMU_EXPORT void playSysexWithoutHeader(Bit8u device, Bit8u command, const Bit8u *sysex, Bit32u len);
+ // Sends inner body of a System Exclusive MIDI message for direct processing. The length is in bytes.
+ // See the WARNING above.
+ MT32EMU_EXPORT void writeSysex(Bit8u channel, const Bit8u *sysex, Bit32u len);
+
+ // Allows to disable wet reverb output altogether.
+ MT32EMU_EXPORT void setReverbEnabled(bool reverbEnabled);
+ // Returns whether wet reverb output is enabled.
+ MT32EMU_EXPORT bool isReverbEnabled() const;
// Sets override reverb mode. In this mode, emulation ignores sysexes (or the related part of them) which control the reverb parameters.
// This mode is in effect until it is turned off. When the synth is re-opened, the override mode is unchanged but the state
// of the reverb model is reset to default.
- void setReverbOverridden(bool reverbOverridden);
- bool isReverbOverridden() const;
+ MT32EMU_EXPORT void setReverbOverridden(bool reverbOverridden);
+ // Returns whether reverb settings are overridden.
+ MT32EMU_EXPORT bool isReverbOverridden() const;
// Forces reverb model compatibility mode. By default, the compatibility mode corresponds to the used control ROM version.
// Invoking this method with the argument set to true forces emulation of old MT-32 reverb circuit.
// When the argument is false, emulation of the reverb circuit used in new generation of MT-32 compatible modules is enforced
// (these include CM-32L and LAPC-I).
- void setReverbCompatibilityMode(bool mt32CompatibleMode);
- bool isMT32ReverbCompatibilityMode() const;
- void setDACInputMode(DACInputMode mode);
- DACInputMode getDACInputMode() const;
- void setMIDIDelayMode(MIDIDelayMode mode);
- MIDIDelayMode getMIDIDelayMode() const;
+ MT32EMU_EXPORT void setReverbCompatibilityMode(bool mt32CompatibleMode);
+ // Returns whether reverb is in old MT-32 compatibility mode.
+ MT32EMU_EXPORT bool isMT32ReverbCompatibilityMode() const;
+ // Returns whether default reverb compatibility mode is the old MT-32 compatibility mode.
+ MT32EMU_EXPORT bool isDefaultReverbMT32Compatible() const;
+ // Sets new DAC input mode. See DACInputMode for details.
+ MT32EMU_EXPORT void setDACInputMode(DACInputMode mode);
+ // Returns current DAC input mode. See DACInputMode for details.
+ MT32EMU_EXPORT DACInputMode getDACInputMode() const;
+ // Sets new MIDI delay mode. See MIDIDelayMode for details.
+ MT32EMU_EXPORT void setMIDIDelayMode(MIDIDelayMode mode);
+ // Returns current MIDI delay mode. See MIDIDelayMode for details.
+ MT32EMU_EXPORT MIDIDelayMode getMIDIDelayMode() const;
// Sets output gain factor for synth output channels. Applied to all output samples and unrelated with the synth's Master volume,
// it rather corresponds to the gain of the output analog circuitry of the hardware units. However, together with setReverbOutputGain()
// it offers to the user a capability to control the gain of reverb and non-reverb output channels independently.
// Ignored in DACInputMode_PURE
- void setOutputGain(float);
- float getOutputGain() const;
+ MT32EMU_EXPORT void setOutputGain(float gain);
+ // Returns current output gain factor for synth output channels.
+ MT32EMU_EXPORT float getOutputGain() const;
// Sets output gain factor for the reverb wet output channels. It rather corresponds to the gain of the output
// analog circuitry of the hardware units. However, together with setOutputGain() it offers to the user a capability
@@ -389,59 +385,85 @@ public:
// there is a difference in the reverb analogue circuit, and the resulting output gain is 0.68
// of that for LA32 analogue output. This factor is applied to the reverb output gain.
// Ignored in DACInputMode_PURE
- void setReverbOutputGain(float);
- float getReverbOutputGain() const;
+ MT32EMU_EXPORT void setReverbOutputGain(float gain);
+ // Returns current output gain factor for reverb wet output channels.
+ MT32EMU_EXPORT float getReverbOutputGain() const;
- void setReversedStereoEnabled(bool enabled);
- bool isReversedStereoEnabled();
+ // Swaps left and right output channels.
+ MT32EMU_EXPORT void setReversedStereoEnabled(bool enabled);
+ // Returns whether left and right output channels are swapped.
+ MT32EMU_EXPORT bool isReversedStereoEnabled() const;
// Returns actual sample rate used in emulation of stereo analog circuitry of hardware units.
// See comment for render() below.
- unsigned int getStereoOutputSampleRate() const;
+ MT32EMU_EXPORT Bit32u getStereoOutputSampleRate() const;
// Renders samples to the specified output stream as if they were sampled at the analog stereo output.
- // When AnalogOutputMode is set to ACCURATE, the output signal is upsampled to 48 kHz in order
+ // When AnalogOutputMode is set to ACCURATE (OVERSAMPLED), the output signal is upsampled to 48 (96) kHz in order
// to retain emulation accuracy in whole audible frequency spectra. Otherwise, native digital signal sample rate is retained.
// getStereoOutputSampleRate() can be used to query actual sample rate of the output signal.
- // The length is in frames, not bytes (in 16-bit stereo, one frame is 4 bytes).
- void render(Sample *stream, Bit32u len);
+ // The length is in frames, not bytes (in 16-bit stereo, one frame is 4 bytes). Uses NATIVE byte ordering.
+ MT32EMU_EXPORT void render(Bit16s *stream, Bit32u len);
+ // Same as above but outputs to a float stereo stream.
+ MT32EMU_EXPORT void render(float *stream, Bit32u len);
// Renders samples to the specified output streams as if they appeared at the DAC entrance.
// No further processing performed in analog circuitry emulation is applied to the signal.
- // NULL may be specified in place of any or all of the stream buffers.
- // The length is in samples, not bytes.
- void renderStreams(Sample *nonReverbLeft, Sample *nonReverbRight, Sample *reverbDryLeft, Sample *reverbDryRight, Sample *reverbWetLeft, Sample *reverbWetRight, Bit32u len);
+ // NULL may be specified in place of any or all of the stream buffers to skip it.
+ // The length is in samples, not bytes. Uses NATIVE byte ordering.
+ MT32EMU_EXPORT void renderStreams(Bit16s *nonReverbLeft, Bit16s *nonReverbRight, Bit16s *reverbDryLeft, Bit16s *reverbDryRight, Bit16s *reverbWetLeft, Bit16s *reverbWetRight, Bit32u len);
+ void renderStreams(const DACOutputStreams<Bit16s> &streams, Bit32u len) {
+ renderStreams(streams.nonReverbLeft, streams.nonReverbRight, streams.reverbDryLeft, streams.reverbDryRight, streams.reverbWetLeft, streams.reverbWetRight, len);
+ }
+ // Same as above but outputs to float streams.
+ MT32EMU_EXPORT void renderStreams(float *nonReverbLeft, float *nonReverbRight, float *reverbDryLeft, float *reverbDryRight, float *reverbWetLeft, float *reverbWetRight, Bit32u len);
+ void renderStreams(const DACOutputStreams<float> &streams, Bit32u len) {
+ renderStreams(streams.nonReverbLeft, streams.nonReverbRight, streams.reverbDryLeft, streams.reverbDryRight, streams.reverbWetLeft, streams.reverbWetRight, len);
+ }
// Returns true when there is at least one active partial, otherwise false.
- bool hasActivePartials() const;
+ MT32EMU_EXPORT bool hasActivePartials() const;
- // Returns true if hasActivePartials() returns true, or reverb is (somewhat unreliably) detected as being active.
- bool isActive() const;
+ // Returns true if the synth is active and subsequent calls to render() may result in non-trivial output (i.e. silence).
+ // The synth is considered active when either there are pending MIDI events in the queue, there is at least one active partial,
+ // or the reverb is (somewhat unreliably) detected as being active.
+ MT32EMU_EXPORT bool isActive();
// Returns the maximum number of partials playing simultaneously.
- unsigned int getPartialCount() const;
+ MT32EMU_EXPORT Bit32u getPartialCount() const;
// Fills in current states of all the parts into the array provided. The array must have at least 9 entries to fit values for all the parts.
// If the value returned for a part is true, there is at least one active non-releasing partial playing on this part.
// This info is useful in emulating behaviour of LCD display of the hardware units.
- void getPartStates(bool *partStates) const;
+ MT32EMU_EXPORT void getPartStates(bool *partStates) const;
+
+ // Returns current states of all the parts as a bit set. The least significant bit corresponds to the state of part 1,
+ // total of 9 bits hold the states of all the parts. If the returned bit for a part is set, there is at least one active
+ // non-releasing partial playing on this part. This info is useful in emulating behaviour of LCD display of the hardware units.
+ MT32EMU_EXPORT Bit32u getPartStates() const;
// Fills in current states of all the partials into the array provided. The array must be large enough to accommodate states of all the partials.
- void getPartialStates(PartialState *partialStates) const;
+ MT32EMU_EXPORT void getPartialStates(PartialState *partialStates) const;
+
+ // Fills in current states of all the partials into the array provided. Each byte in the array holds states of 4 partials
+ // starting from the least significant bits. The state of each partial is packed in a pair of bits.
+ // The array must be large enough to accommodate states of all the partials (see getPartialCount()).
+ MT32EMU_EXPORT void getPartialStates(Bit8u *partialStates) const;
// Fills in information about currently playing notes on the specified part into the arrays provided. The arrays must be large enough
// to accommodate data for all the playing notes. The maximum number of simultaneously playing notes cannot exceed the number of partials.
// Argument partNumber should be 0..7 for Part 1..8, or 8 for Rhythm.
// Returns the number of currently playing notes on the specified part.
- unsigned int getPlayingNotes(unsigned int partNumber, Bit8u *keys, Bit8u *velocities) const;
+ MT32EMU_EXPORT Bit32u getPlayingNotes(Bit8u partNumber, Bit8u *keys, Bit8u *velocities) const;
// Returns name of the patch set on the specified part.
// Argument partNumber should be 0..7 for Part 1..8, or 8 for Rhythm.
- const char *getPatchName(unsigned int partNumber) const;
+ MT32EMU_EXPORT const char *getPatchName(Bit8u partNumber) const;
- void readMemory(Bit32u addr, Bit32u len, Bit8u *data);
-};
+ // Stores internal state of emulated synth into an array provided (as it would be acquired from hardware).
+ MT32EMU_EXPORT void readMemory(Bit32u addr, Bit32u len, Bit8u *data);
+}; // class Synth
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_SYNTH_H
diff --git a/audio/softsynth/mt32/TVA.cpp b/audio/softsynth/mt32/TVA.cpp
index 894e53f14a..c20b8b6393 100644..100755
--- a/audio/softsynth/mt32/TVA.cpp
+++ b/audio/softsynth/mt32/TVA.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -19,19 +19,23 @@
* This class emulates the calculations performed by the 8095 microcontroller in order to configure the LA-32's amplitude ramp for a single partial at each stage of its TVA envelope.
* Unless we introduced bugs, it should be pretty much 100% accurate according to Mok's specifications.
*/
-//#include <cmath>
-#include "mt32emu.h"
-#include "mmath.h"
#include "internals.h"
+#include "TVA.h"
+#include "Part.h"
+#include "Partial.h"
+#include "Poly.h"
+#include "Synth.h"
+#include "Tables.h"
+
namespace MT32Emu {
// CONFIRMED: Matches a table in ROM - haven't got around to coming up with a formula for it yet.
static Bit8u biasLevelToAmpSubtractionCoeff[13] = {255, 187, 137, 100, 74, 54, 40, 29, 21, 15, 10, 5, 0};
TVA::TVA(const Partial *usePartial, LA32Ramp *useAmpRamp) :
- partial(usePartial), ampRamp(useAmpRamp), system_(&usePartial->getSynth()->mt32ram.system), phase(TVA_PHASE_DEAD) {
+ partial(usePartial), ampRamp(useAmpRamp), system(&usePartial->getSynth()->mt32ram.system), phase(TVA_PHASE_DEAD) {
}
void TVA::startRamp(Bit8u newTarget, Bit8u newIncrement, int newPhase) {
@@ -91,15 +95,15 @@ static int calcVeloAmpSubtraction(Bit8u veloSensitivity, unsigned int velocity)
// FIXME:KG: Better variable names
int velocityMult = veloSensitivity - 50;
int absVelocityMult = velocityMult < 0 ? -velocityMult : velocityMult;
- velocityMult = (signed)((unsigned)(velocityMult * ((signed)velocity - 64)) << 2);
+ velocityMult = signed(unsigned(velocityMult * (signed(velocity) - 64)) << 2);
return absVelocityMult - (velocityMult >> 8); // PORTABILITY NOTE: Assumes arithmetic shift
}
-static int calcBasicAmp(const Tables *tables, const Partial *partial, const MemParams::System *system_, const TimbreParam::PartialParam *partialParam, const MemParams::PatchTemp *patchTemp, const MemParams::RhythmTemp *rhythmTemp, int biasAmpSubtraction, int veloAmpSubtraction, Bit8u expression) {
+static int calcBasicAmp(const Tables *tables, const Partial *partial, const MemParams::System *system, const TimbreParam::PartialParam *partialParam, const MemParams::PatchTemp *patchTemp, const MemParams::RhythmTemp *rhythmTemp, int biasAmpSubtraction, int veloAmpSubtraction, Bit8u expression) {
int amp = 155;
if (!partial->isRingModulatingSlave()) {
- amp -= tables->masterVolToAmpSubtraction[system_->masterVol];
+ amp -= tables->masterVolToAmpSubtraction[system->masterVol];
if (amp < 0) {
return 0;
}
@@ -140,7 +144,7 @@ static int calcBasicAmp(const Tables *tables, const Partial *partial, const MemP
return amp;
}
-int calcKeyTimeSubtraction(Bit8u envTimeKeyfollow, int key) {
+static int calcKeyTimeSubtraction(Bit8u envTimeKeyfollow, int key) {
if (envTimeKeyfollow == 0) {
return 0;
}
@@ -165,7 +169,7 @@ void TVA::reset(const Part *newPart, const TimbreParam::PartialParam *newPartial
biasAmpSubtraction = calcBiasAmpSubtractions(partialParam, key);
veloAmpSubtraction = calcVeloAmpSubtraction(partialParam->tva.veloSensitivity, velocity);
- int newTarget = calcBasicAmp(tables, partial, system_, partialParam, patchTemp, newRhythmTemp, biasAmpSubtraction, veloAmpSubtraction, part->getExpression());
+ int newTarget = calcBasicAmp(tables, partial, system, partialParam, patchTemp, newRhythmTemp, biasAmpSubtraction, veloAmpSubtraction, part->getExpression());
int newPhase;
if (partialParam->tva.envTime[0] == 0) {
// Initially go to the TVA_PHASE_ATTACK target amp, and spend the next phase going from there to the TVA_PHASE_2 target amp
@@ -182,7 +186,7 @@ void TVA::reset(const Part *newPart, const TimbreParam::PartialParam *newPartial
// "Go downward as quickly as possible".
// Since the current value is 0, the LA32Ramp will notice that we're already at or below the target and trying to go downward,
// and therefore jump to the target immediately and raise an interrupt.
- startRamp((Bit8u)newTarget, 0x80 | 127, newPhase);
+ startRamp(Bit8u(newTarget), 0x80 | 127, newPhase);
}
void TVA::startAbort() {
@@ -217,7 +221,7 @@ void TVA::recalcSustain() {
}
// We're sustaining. Recalculate all the values
const Tables *tables = &Tables::getInstance();
- int newTarget = calcBasicAmp(tables, partial, system_, partialParam, patchTemp, rhythmTemp, biasAmpSubtraction, veloAmpSubtraction, part->getExpression());
+ 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.
int targetDelta = newTarget - target;
@@ -225,9 +229,9 @@ void TVA::recalcSustain() {
// Calculate an increment to get to the new amp value in a short, more or less consistent amount of time
Bit8u newIncrement;
if (targetDelta >= 0) {
- newIncrement = tables->envLogarithmicTime[(Bit8u)targetDelta] - 2;
+ newIncrement = tables->envLogarithmicTime[Bit8u(targetDelta)] - 2;
} else {
- newIncrement = (tables->envLogarithmicTime[(Bit8u)-targetDelta] - 2) | 0x80;
+ newIncrement = (tables->envLogarithmicTime[Bit8u(-targetDelta)] - 2) | 0x80;
}
// Configure so that once the transition's complete and nextPhase() is called, we'll just re-enter sustain phase (or decay phase, depending on parameters at the time).
startRamp(newTarget, newIncrement, TVA_PHASE_SUSTAIN - 1);
@@ -279,7 +283,7 @@ void TVA::nextPhase() {
int envPointIndex = phase;
if (!allLevelsZeroFromNowOn) {
- newTarget = calcBasicAmp(tables, partial, system_, partialParam, patchTemp, rhythmTemp, biasAmpSubtraction, veloAmpSubtraction, part->getExpression());
+ newTarget = calcBasicAmp(tables, partial, system, partialParam, patchTemp, rhythmTemp, biasAmpSubtraction, veloAmpSubtraction, part->getExpression());
if (newPhase == TVA_PHASE_SUSTAIN || newPhase == TVA_PHASE_RELEASE) {
if (partialParam->tva.envLevel[3] == 0) {
@@ -311,7 +315,7 @@ void TVA::nextPhase() {
int envTimeSetting = partialParam->tva.envTime[envPointIndex];
if (newPhase == TVA_PHASE_ATTACK) {
- envTimeSetting -= ((signed)partial->getPoly()->getVelocity() - 64) >> (6 - partialParam->tva.envTimeVeloSensitivity); // PORTABILITY NOTE: Assumes arithmetic shift
+ envTimeSetting -= (signed(partial->getPoly()->getVelocity()) - 64) >> (6 - partialParam->tva.envTimeVeloSensitivity); // PORTABILITY NOTE: Assumes arithmetic shift
if (envTimeSetting <= 0 && partialParam->tva.envTime[envPointIndex] != 0) {
envTimeSetting = 1;
@@ -338,14 +342,14 @@ void TVA::nextPhase() {
}
}
targetDelta = -targetDelta;
- newIncrement = tables->envLogarithmicTime[(Bit8u)targetDelta] - envTimeSetting;
+ newIncrement = tables->envLogarithmicTime[Bit8u(targetDelta)] - envTimeSetting;
if (newIncrement <= 0) {
newIncrement = 1;
}
newIncrement = newIncrement | 0x80;
} else {
// FIXME: The last 22 or so entries in this table are 128 - surely that fucks things up, since that ends up being -128 signed?
- newIncrement = tables->envLogarithmicTime[(Bit8u)targetDelta] - envTimeSetting;
+ newIncrement = tables->envLogarithmicTime[Bit8u(targetDelta)] - envTimeSetting;
if (newIncrement <= 0) {
newIncrement = 1;
}
@@ -360,7 +364,7 @@ void TVA::nextPhase() {
}
}
- startRamp((Bit8u)newTarget, (Bit8u)newIncrement, newPhase);
+ startRamp(Bit8u(newTarget), Bit8u(newIncrement), newPhase);
}
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/TVA.h b/audio/softsynth/mt32/TVA.h
index a100107a69..f593b4e7d1 100644..100755
--- a/audio/softsynth/mt32/TVA.h
+++ b/audio/softsynth/mt32/TVA.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,9 +18,15 @@
#ifndef MT32EMU_TVA_H
#define MT32EMU_TVA_H
+#include "globals.h"
+#include "Types.h"
+#include "Structures.h"
+
namespace MT32Emu {
+class LA32Ramp;
class Part;
+class Partial;
// Note that when entering nextPhase(), newPhase is set to phase + 1, and the descriptions/names below refer to
// newPhase's value.
@@ -57,7 +63,7 @@ class TVA {
private:
const Partial * const partial;
LA32Ramp *ampRamp;
- const MemParams::System * const system_;
+ const MemParams::System * const system;
const Part *part;
const TimbreParam::PartialParam *partialParam;
@@ -87,8 +93,8 @@ public:
bool isPlaying() const;
int getPhase() const;
-};
+}; // class TVA
-}
+} // namespace MT32Emu
-#endif /* TVA_H_ */
+#endif // #ifndef MT32EMU_TVA_H
diff --git a/audio/softsynth/mt32/TVF.cpp b/audio/softsynth/mt32/TVF.cpp
index 164cf2b4cb..b296c34132 100644..100755
--- a/audio/softsynth/mt32/TVF.cpp
+++ b/audio/softsynth/mt32/TVF.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,12 +15,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-//#include <cmath>
-
-#include "mt32emu.h"
-#include "mmath.h"
#include "internals.h"
+#include "TVF.h"
+#include "LA32Ramp.h"
+#include "Partial.h"
+#include "Poly.h"
+#include "Tables.h"
+
namespace MT32Emu {
// Note that when entering nextPhase(), newPhase is set to phase + 1, and the descriptions/names below refer to
@@ -60,7 +62,7 @@ static int calcBaseCutoff(const TimbreParam::PartialParam *partialParam, Bit32u
static const Bit8s keyfollowMult21[] = {-21, -10, -5, 0, 2, 5, 8, 10, 13, 16, 18, 21, 26, 32, 42, 21, 21};
int baseCutoff = keyfollowMult21[partialParam->tvf.keyfollow] - keyfollowMult21[partialParam->wg.pitchKeyfollow];
// baseCutoff range now: -63 to 63
- baseCutoff *= (int)key - 60;
+ baseCutoff *= int(key) - 60;
// baseCutoff range now: -3024 to 3024
int biasPoint = partialParam->tvf.biasPoint;
if ((biasPoint & 0x40) == 0) {
@@ -75,7 +77,7 @@ static int calcBaseCutoff(const TimbreParam::PartialParam *partialParam, Bit32u
// biasPoint range here: 64 to 127
int bias = biasPoint - 31 - key; // bias range here: -75 to 84
if (bias < 0) {
- baseCutoff += bias * biasLevelToBiasMult[partialParam->tvf.biasLevel]; // Calculation range: −6375 to 6375
+ baseCutoff += bias * biasLevelToBiasMult[partialParam->tvf.biasLevel]; // Calculation range: -6375 to 6375
// baseCutoff range now: -9399 to 9399
}
}
@@ -96,7 +98,7 @@ static int calcBaseCutoff(const TimbreParam::PartialParam *partialParam, Bit32u
if (baseCutoff > 255) {
baseCutoff = 255;
}
- return (Bit8u)baseCutoff;
+ return Bit8u(baseCutoff);
}
TVF::TVF(const Partial *usePartial, LA32Ramp *useCutoffModifierRamp) :
@@ -128,7 +130,7 @@ void TVF::reset(const TimbreParam::PartialParam *newPartialParam, unsigned int b
int newLevelMult = velocity * newPartialParam->tvf.envVeloSensitivity;
newLevelMult >>= 6;
newLevelMult += 109 - newPartialParam->tvf.envVeloSensitivity;
- newLevelMult += ((signed)key - 60) >> (4 - newPartialParam->tvf.envDepthKeyfollow);
+ newLevelMult += (signed(key) - 60) >> (4 - newPartialParam->tvf.envDepthKeyfollow);
if (newLevelMult < 0) {
newLevelMult = 0;
}
@@ -140,7 +142,7 @@ void TVF::reset(const TimbreParam::PartialParam *newPartialParam, unsigned int b
levelMult = newLevelMult;
if (newPartialParam->tvf.envTimeKeyfollow != 0) {
- keyTimeSubtraction = ((signed)key - 60) >> (5 - newPartialParam->tvf.envTimeKeyfollow);
+ keyTimeSubtraction = (signed(key) - 60) >> (5 - newPartialParam->tvf.envTimeKeyfollow);
} else {
keyTimeSubtraction = 0;
}
@@ -228,4 +230,4 @@ void TVF::nextPhase() {
startRamp(newTarget, newIncrement, newPhase);
}
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/TVF.h b/audio/softsynth/mt32/TVF.h
index 1e2c6d1728..38dcef708c 100644..100755
--- a/audio/softsynth/mt32/TVF.h
+++ b/audio/softsynth/mt32/TVF.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,8 +18,15 @@
#ifndef MT32EMU_TVF_H
#define MT32EMU_TVF_H
+#include "globals.h"
+#include "Types.h"
+#include "Structures.h"
+
namespace MT32Emu {
+class LA32Ramp;
+class Partial;
+
class TVF {
private:
const Partial * const partial;
@@ -47,8 +54,8 @@ public:
Bit8u getBaseCutoff() const;
void handleInterrupt();
void startDecay();
-};
+}; // class TVF
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_TVF_H
diff --git a/audio/softsynth/mt32/TVP.cpp b/audio/softsynth/mt32/TVP.cpp
index a8003d96dc..dca0003843 100644..100755
--- a/audio/softsynth/mt32/TVP.cpp
+++ b/audio/softsynth/mt32/TVP.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,12 +15,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-//#include <cmath>
-//#include <cstdlib>
+#include <cstdlib>
-#include "mt32emu.h"
#include "internals.h"
+#include "TVP.h"
+#include "Part.h"
+#include "Partial.h"
+#include "Poly.h"
+#include "Synth.h"
+#include "TVA.h"
+
namespace MT32Emu {
// FIXME: Add Explanation
@@ -47,7 +52,7 @@ static Bit16u keyToPitchTable[] = {
};
TVP::TVP(const Partial *usePartial) :
- partial(usePartial), system_(&usePartial->getSynth()->mt32ram.system) {
+ partial(usePartial), system(&usePartial->getSynth()->mt32ram.system) {
// We want to do processing 4000 times per second. FIXME: This is pretty arbitrary.
maxCounter = SAMPLE_RATE / 4000;
// The timer runs at 500kHz. We only need to bother updating it every maxCounter samples, before we do processing.
@@ -58,7 +63,7 @@ TVP::TVP(const Partial *usePartial) :
static Bit16s keyToPitch(unsigned int key) {
// We're using a table to do: return round_to_nearest_or_even((key - 60) * (4096.0 / 12.0))
// Banker's rounding is just slightly annoying to do in C++
- int k = (int)key;
+ int k = int(key);
Bit16s pitch = keyToPitchTable[abs(k - 60)];
return key < 60 ? -pitch : pitch;
}
@@ -82,7 +87,7 @@ static Bit32u calcBasePitch(const Partial *partial, const TimbreParam::PartialPa
const ControlROMPCMStruct *controlROMPCMStruct = partial->getControlROMPCMStruct();
if (controlROMPCMStruct != NULL) {
- basePitch += (Bit32s)((((Bit32s)controlROMPCMStruct->pitchMSB) << 8) | (Bit32s)controlROMPCMStruct->pitchLSB);
+ basePitch += (Bit32s(controlROMPCMStruct->pitchMSB) << 8) | Bit32s(controlROMPCMStruct->pitchLSB);
} else {
if ((partialParam->wg.waveform & 1) == 0) {
basePitch += 37133; // This puts Middle C at around 261.64Hz (assuming no other modifications, masterTune of 64, etc.)
@@ -98,7 +103,7 @@ static Bit32u calcBasePitch(const Partial *partial, const TimbreParam::PartialPa
if (basePitch > 59392) {
basePitch = 59392;
}
- return (Bit32u)basePitch;
+ return Bit32u(basePitch);
}
static Bit32u calcVeloMult(Bit8u veloSensitivity, unsigned int velocity) {
@@ -119,7 +124,7 @@ static Bit32u calcVeloMult(Bit8u veloSensitivity, unsigned int velocity) {
static Bit32s calcTargetPitchOffsetWithoutLFO(const TimbreParam::PartialParam *partialParam, int levelIndex, unsigned int velocity) {
int veloMult = calcVeloMult(partialParam->pitchEnv.veloSensitivity, velocity);
int targetPitchOffsetWithoutLFO = partialParam->pitchEnv.level[levelIndex] - 50;
- targetPitchOffsetWithoutLFO = (Bit32s)(targetPitchOffsetWithoutLFO * veloMult) >> (16 - partialParam->pitchEnv.depth); // PORTABILITY NOTE: Assumes arithmetic shift
+ targetPitchOffsetWithoutLFO = (targetPitchOffsetWithoutLFO * veloMult) >> (16 - partialParam->pitchEnv.depth); // PORTABILITY NOTE: Assumes arithmetic shift
return targetPitchOffsetWithoutLFO;
}
@@ -140,7 +145,7 @@ void TVP::reset(const Part *usePart, const TimbreParam::PartialParam *usePartial
phase = 0;
if (partialParam->pitchEnv.timeKeyfollow) {
- timeKeyfollowSubtraction = (key - 60) >> (5 - partialParam->pitchEnv.timeKeyfollow); // PORTABILITY NOTE: Assumes arithmetic shift
+ timeKeyfollowSubtraction = Bit32s(key - 60) >> (5 - partialParam->pitchEnv.timeKeyfollow); // PORTABILITY NOTE: Assumes arithmetic shift
} else {
timeKeyfollowSubtraction = 0;
}
@@ -163,7 +168,7 @@ void TVP::updatePitch() {
if (!partial->isPCM() || (partial->getControlROMPCMStruct()->len & 0x01) == 0) { // FIXME: Use !partial->pcmWaveEntry->unaffectedByMasterTune instead
// FIXME: masterTune recalculation doesn't really happen here, and there are various bugs not yet emulated
// 171 is ~half a semitone.
- newPitch += ((system_->masterTune - 64) * 171) >> 6; // PORTABILITY NOTE: Assumes arithmetic shift.
+ newPitch += ((system->masterTune - 64) * 171) >> 6; // PORTABILITY NOTE: Assumes arithmetic shift.
}
if ((partialParam->wg.pitchBenderEnabled & 1) != 0) {
newPitch += part->getPitchBend();
@@ -172,14 +177,13 @@ void TVP::updatePitch() {
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;
+ // Skipping this check seems about right emulation of MT-32 GEN0 quirk exploited in Colonel's Bequest timbre "Lightning"
+ if (partial->getSynth()->controlROMFeatures->quirkPitchEnvelopeOverflow == 0) {
+ if (newPitch > 59392) {
+ newPitch = 59392;
+ }
}
-#endif
- pitch = (Bit16u)newPitch;
+ 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.
partial->getTVA()->recalcSustain();
@@ -317,10 +321,10 @@ void TVP::process() {
negativeBigTicksRemaining = negativeBigTicksRemaining >> rightShifts; // PORTABILITY NOTE: Assumes arithmetic shift
rightShifts = 13;
}
- int newResult = ((Bit32s)(negativeBigTicksRemaining * pitchOffsetChangePerBigTick)) >> rightShifts; // PORTABILITY NOTE: Assumes arithmetic shift
+ int newResult = (negativeBigTicksRemaining * pitchOffsetChangePerBigTick) >> rightShifts; // PORTABILITY NOTE: Assumes arithmetic shift
newResult += targetPitchOffsetWithoutLFO + lfoPitchOffset;
currentPitchOffset = newResult;
updatePitch();
}
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/TVP.h b/audio/softsynth/mt32/TVP.h
index e9d05ffa7a..be90f0ff08 100644..100755
--- a/audio/softsynth/mt32/TVP.h
+++ b/audio/softsynth/mt32/TVP.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,12 +18,19 @@
#ifndef MT32EMU_TVP_H
#define MT32EMU_TVP_H
+#include "globals.h"
+#include "Types.h"
+#include "Structures.h"
+
namespace MT32Emu {
+class Part;
+class Partial;
+
class TVP {
private:
const Partial * const partial;
- const MemParams::System * const system_; // FIXME: Only necessary because masterTune calculation is done in the wrong place atm.
+ const MemParams::System * const system; // FIXME: Only necessary because masterTune calculation is done in the wrong place atm.
const Part *part;
const TimbreParam::PartialParam *partialParam;
@@ -60,8 +67,8 @@ public:
Bit32u getBasePitch() const;
Bit16u nextPitch();
void startDecay();
-};
+}; // class TVP
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_TVP_H
diff --git a/audio/softsynth/mt32/Tables.cpp b/audio/softsynth/mt32/Tables.cpp
index 7e165b5a7a..cb3493285a 100644..100755
--- a/audio/softsynth/mt32/Tables.cpp
+++ b/audio/softsynth/mt32/Tables.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -15,11 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-//#include <cmath>
+#include "internals.h"
-#include "mt32emu.h"
-#include "mmath.h"
#include "Tables.h"
+#include "mmath.h"
namespace MT32Emu {
@@ -31,24 +30,25 @@ const Tables &Tables::getInstance() {
}
Tables::Tables() {
- int lf;
- for (lf = 0; lf <= 100; lf++) {
+ for (int lf = 0; lf <= 100; lf++) {
// CONFIRMED:KG: This matches a ROM table found by Mok
- float fVal = (2.0f - LOG10F((float)lf + 1.0f)) * 128.0f;
- int val = (int)(fVal + 1.0);
+ float fVal = (2.0f - LOG10F(float(lf) + 1.0f)) * 128.0f;
+ int val = int(fVal + 1.0);
if (val > 255) {
val = 255;
}
- levelToAmpSubtraction[lf] = (Bit8u)val;
+ levelToAmpSubtraction[lf] = Bit8u(val);
}
envLogarithmicTime[0] = 64;
- for (lf = 1; lf <= 255; lf++) {
+ for (int lf = 1; lf <= 255; lf++) {
// CONFIRMED:KG: This matches a ROM table found by Mok
- envLogarithmicTime[lf] = (Bit8u)ceil(64.0f + LOG2F((float)lf) * 8.0f);
+ envLogarithmicTime[lf] = Bit8u(ceil(64.0f + LOG2F(float(lf)) * 8.0f));
}
-#ifdef EMULATE_LAPC_I // Dummy #ifdef - we'll have runtime emulation mode selection in future.
+#if 0
+ // The table below is to be used in conjunction with emulation of VCA of newer generation units which is currently missing.
+ // These relatively small values are rather intended to fine-tune the overall amplification of the VCA.
// CONFIRMED: Based on a table found by Mok in the LAPC-I control ROM
// Note that this matches the MT-32 table, but with the values clamped to a maximum of 8.
memset(masterVolToAmpSubtraction, 8, 71);
@@ -64,12 +64,12 @@ Tables::Tables() {
// CONFIRMED: Based on a table found by Mok in the MT-32 control ROM
masterVolToAmpSubtraction[0] = 255;
for (int masterVol = 1; masterVol <= 100; masterVol++) {
- masterVolToAmpSubtraction[masterVol] = (int)(106.31 - 16.0f * LOG2F((float)masterVol));
+ masterVolToAmpSubtraction[masterVol] = Bit8u(106.31 - 16.0f * LOG2F(float(masterVol)));
}
#endif
for (int i = 0; i <= 100; i++) {
- pulseWidth100To255[i] = (int)(i * 255 / 100.0f + 0.5f);
+ pulseWidth100To255[i] = Bit8u(i * 255 / 100.0f + 0.5f);
//synth->printDebug("%d: %d", i, pulseWidth100To255[i]);
}
@@ -94,4 +94,4 @@ Tables::Tables() {
resAmpDecayFactor = resAmpDecayFactorTable;
}
-}
+} // namespace MT32Emu
diff --git a/audio/softsynth/mt32/Tables.h b/audio/softsynth/mt32/Tables.h
index 8865c7fac8..249e32919a 100644..100755
--- a/audio/softsynth/mt32/Tables.h
+++ b/audio/softsynth/mt32/Tables.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,6 +18,9 @@
#ifndef MT32EMU_TABLES_H
#define MT32EMU_TABLES_H
+#include "globals.h"
+#include "Types.h"
+
namespace MT32Emu {
class Tables {
@@ -52,8 +55,8 @@ public:
Bit16u logsin9[512];
const Bit8u *resAmpDecayFactor;
-};
+}; // class Tables
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_TABLES_H
diff --git a/audio/softsynth/mt32/Types.h b/audio/softsynth/mt32/Types.h
index 934b1a1173..f90dce19a4 100644..100755
--- a/audio/softsynth/mt32/Types.h
+++ b/audio/softsynth/mt32/Types.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -27,14 +27,6 @@ typedef signed short int Bit16s;
typedef unsigned char Bit8u;
typedef signed char Bit8s;
-#if MT32EMU_USE_FLOAT_SAMPLES
-typedef float Sample;
-typedef float SampleEx;
-#else
-typedef Bit16s Sample;
-typedef Bit32s SampleEx;
-#endif
-
}
#endif
diff --git a/audio/softsynth/mt32/c_interface/c_interface.cpp b/audio/softsynth/mt32/c_interface/c_interface.cpp
new file mode 100755
index 0000000000..6ae252bea5
--- /dev/null
+++ b/audio/softsynth/mt32/c_interface/c_interface.cpp
@@ -0,0 +1,624 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "../globals.h"
+#include "../Types.h"
+#include "../File.h"
+#include "../FileStream.h"
+#include "../ROMInfo.h"
+#include "../Synth.h"
+#include "../MidiStreamParser.h"
+
+#include "c_types.h"
+#include "c_interface.h"
+
+using namespace MT32Emu;
+
+namespace MT32Emu {
+
+static mt32emu_service_version getSynthVersionID(mt32emu_service_i) {
+ return MT32EMU_SERVICE_VERSION_CURRENT;
+}
+
+static const mt32emu_service_i_v0 SERVICE_VTABLE = {
+ getSynthVersionID,
+ mt32emu_get_supported_report_handler_version,
+ mt32emu_get_supported_midi_receiver_version,
+ mt32emu_get_library_version_int,
+ mt32emu_get_library_version_string,
+ mt32emu_get_stereo_output_samplerate,
+ mt32emu_create_context,
+ mt32emu_free_context,
+ mt32emu_add_rom_data,
+ mt32emu_add_rom_file,
+ mt32emu_get_rom_info,
+ mt32emu_set_partial_count,
+ mt32emu_set_analog_output_mode,
+ mt32emu_open_synth,
+ mt32emu_close_synth,
+ mt32emu_is_open,
+ mt32emu_get_actual_stereo_output_samplerate,
+ mt32emu_flush_midi_queue,
+ mt32emu_set_midi_event_queue_size,
+ mt32emu_set_midi_receiver,
+ mt32emu_parse_stream,
+ mt32emu_parse_stream_at,
+ mt32emu_play_short_message,
+ mt32emu_play_short_message_at,
+ mt32emu_play_msg,
+ mt32emu_play_sysex,
+ mt32emu_play_msg_at,
+ mt32emu_play_sysex_at,
+ mt32emu_play_msg_now,
+ mt32emu_play_msg_on_part,
+ mt32emu_play_sysex_now,
+ mt32emu_write_sysex,
+ mt32emu_set_reverb_enabled,
+ mt32emu_is_reverb_enabled,
+ mt32emu_set_reverb_overridden,
+ mt32emu_is_reverb_overridden,
+ mt32emu_set_reverb_compatibility_mode,
+ mt32emu_is_mt32_reverb_compatibility_mode,
+ mt32emu_is_default_reverb_mt32_compatible,
+ mt32emu_set_dac_input_mode,
+ mt32emu_get_dac_input_mode,
+ mt32emu_set_midi_delay_mode,
+ mt32emu_get_midi_delay_mode,
+ mt32emu_set_output_gain,
+ mt32emu_get_output_gain,
+ mt32emu_set_reverb_output_gain,
+ mt32emu_get_reverb_output_gain,
+ mt32emu_set_reversed_stereo_enabled,
+ mt32emu_is_reversed_stereo_enabled,
+ mt32emu_render_bit16s,
+ mt32emu_render_float,
+ mt32emu_render_bit16s_streams,
+ mt32emu_render_float_streams,
+ mt32emu_has_active_partials,
+ mt32emu_is_active,
+ mt32emu_get_partial_count,
+ mt32emu_get_part_states,
+ mt32emu_get_partial_states,
+ mt32emu_get_playing_notes,
+ mt32emu_get_patch_name,
+ mt32emu_read_memory
+};
+
+} // namespace MT32Emu
+
+struct mt32emu_data {
+ ReportHandler *reportHandler;
+ Synth *synth;
+ const ROMImage *controlROMImage;
+ const ROMImage *pcmROMImage;
+ DefaultMidiStreamParser *midiParser;
+ Bit32u partialCount;
+ AnalogOutputMode analogOutputMode;
+};
+
+// Internal C++ utility stuff
+
+namespace MT32Emu {
+
+class DelegatingReportHandlerAdapter : public ReportHandler {
+public:
+ DelegatingReportHandlerAdapter(mt32emu_report_handler_i useReportHandler, void *useInstanceData) :
+ delegate(useReportHandler), instanceData(useInstanceData) {}
+
+protected:
+ const mt32emu_report_handler_i delegate;
+ void * const instanceData;
+
+private:
+ void printDebug(const char *fmt, va_list list) {
+ if (delegate.v0->printDebug == NULL) {
+ ReportHandler::printDebug(fmt, list);
+ } else {
+ delegate.v0->printDebug(instanceData, fmt, list);
+ }
+ }
+
+ void onErrorControlROM() {
+ if (delegate.v0->onErrorControlROM == NULL) {
+ ReportHandler::onErrorControlROM();
+ } else {
+ delegate.v0->onErrorControlROM(instanceData);
+ }
+ }
+
+ void onErrorPCMROM() {
+ if (delegate.v0->onErrorPCMROM == NULL) {
+ ReportHandler::onErrorPCMROM();
+ } else {
+ delegate.v0->onErrorPCMROM(instanceData);
+ }
+ }
+
+ void showLCDMessage(const char *message) {
+ if (delegate.v0->showLCDMessage == NULL) {
+ ReportHandler::showLCDMessage(message);
+ } else {
+ delegate.v0->showLCDMessage(instanceData, message);
+ }
+ }
+
+ void onMIDIMessagePlayed() {
+ if (delegate.v0->onMIDIMessagePlayed == NULL) {
+ ReportHandler::onMIDIMessagePlayed();
+ } else {
+ delegate.v0->onMIDIMessagePlayed(instanceData);
+ }
+ }
+
+ bool onMIDIQueueOverflow() {
+ if (delegate.v0->onMIDIQueueOverflow == NULL) {
+ return ReportHandler::onMIDIQueueOverflow();
+ }
+ return delegate.v0->onMIDIQueueOverflow(instanceData) != MT32EMU_BOOL_FALSE;
+ }
+
+ void onMIDISystemRealtime(Bit8u systemRealtime) {
+ if (delegate.v0->onMIDISystemRealtime == NULL) {
+ ReportHandler::onMIDISystemRealtime(systemRealtime);
+ } else {
+ delegate.v0->onMIDISystemRealtime(instanceData, systemRealtime);
+ }
+ }
+
+ void onDeviceReset() {
+ if (delegate.v0->onDeviceReset == NULL) {
+ ReportHandler::onDeviceReset();
+ } else {
+ delegate.v0->onDeviceReset(instanceData);
+ }
+ }
+
+ void onDeviceReconfig() {
+ if (delegate.v0->onDeviceReconfig == NULL) {
+ ReportHandler::onDeviceReconfig();
+ } else {
+ delegate.v0->onDeviceReconfig(instanceData);
+ }
+ }
+
+ void onNewReverbMode(Bit8u mode) {
+ if (delegate.v0->onNewReverbMode == NULL) {
+ ReportHandler::onNewReverbMode(mode);
+ } else {
+ delegate.v0->onNewReverbMode(instanceData, mode);
+ }
+ }
+
+ void onNewReverbTime(Bit8u time) {
+ if (delegate.v0->onNewReverbTime == NULL) {
+ ReportHandler::onNewReverbTime(time);
+ } else {
+ delegate.v0->onNewReverbTime(instanceData, time);
+ }
+ }
+
+ void onNewReverbLevel(Bit8u level) {
+ if (delegate.v0->onNewReverbLevel == NULL) {
+ ReportHandler::onNewReverbLevel(level);
+ } else {
+ delegate.v0->onNewReverbLevel(instanceData, level);
+ }
+ }
+
+ void onPolyStateChanged(Bit8u partNum) {
+ if (delegate.v0->onPolyStateChanged == NULL) {
+ ReportHandler::onPolyStateChanged(partNum);
+ } else {
+ delegate.v0->onPolyStateChanged(instanceData, partNum);
+ }
+ }
+
+ void onProgramChanged(Bit8u partNum, const char *soundGroupName, const char *patchName) {
+ if (delegate.v0->onProgramChanged == NULL) {
+ ReportHandler::onProgramChanged(partNum, soundGroupName, patchName);
+ } else {
+ delegate.v0->onProgramChanged(instanceData, partNum, soundGroupName, patchName);
+ }
+ }
+};
+
+class DelegatingMidiStreamParser : public DefaultMidiStreamParser {
+public:
+ DelegatingMidiStreamParser(const mt32emu_data *useData, mt32emu_midi_receiver_i useMIDIReceiver, void *useInstanceData) :
+ DefaultMidiStreamParser(*useData->synth), delegate(useMIDIReceiver), instanceData(useInstanceData) {}
+
+protected:
+ mt32emu_midi_receiver_i delegate;
+ void *instanceData;
+
+private:
+ void handleShortMessage(const Bit32u message) {
+ if (delegate.v0->handleShortMessage == NULL) {
+ DefaultMidiStreamParser::handleShortMessage(message);
+ } else {
+ delegate.v0->handleShortMessage(instanceData, message);
+ }
+ }
+
+ void handleSysex(const Bit8u *stream, const Bit32u length) {
+ if (delegate.v0->handleSysex == NULL) {
+ DefaultMidiStreamParser::handleSysex(stream, length);
+ } else {
+ delegate.v0->handleSysex(instanceData, stream, length);
+ }
+ }
+
+ void handleSystemRealtimeMessage(const Bit8u realtime) {
+ if (delegate.v0->handleSystemRealtimeMessage == NULL) {
+ DefaultMidiStreamParser::handleSystemRealtimeMessage(realtime);
+ } else {
+ delegate.v0->handleSystemRealtimeMessage(instanceData, realtime);
+ }
+ }
+};
+
+static mt32emu_return_code addROMFile(mt32emu_data *data, File *file) {
+ const ROMImage *image = ROMImage::makeROMImage(file);
+ const ROMInfo *info = image->getROMInfo();
+ if (info == NULL) {
+ ROMImage::freeROMImage(image);
+ return MT32EMU_RC_ROM_NOT_IDENTIFIED;
+ }
+ if (info->type == ROMInfo::Control) {
+ if (data->controlROMImage != NULL) {
+ delete data->controlROMImage->getFile();
+ ROMImage::freeROMImage(data->controlROMImage);
+ }
+ data->controlROMImage = image;
+ return MT32EMU_RC_ADDED_CONTROL_ROM;
+ } else if (info->type == ROMInfo::PCM) {
+ if (data->pcmROMImage != NULL) {
+ delete data->pcmROMImage->getFile();
+ ROMImage::freeROMImage(data->pcmROMImage);
+ }
+ data->pcmROMImage = image;
+ return MT32EMU_RC_ADDED_PCM_ROM;
+ }
+ ROMImage::freeROMImage(image);
+ return MT32EMU_RC_OK; // No support for reverb ROM yet.
+}
+
+} // namespace MT32Emu
+
+// C-visible implementation
+
+extern "C" {
+
+const mt32emu_service_i mt32emu_get_service_i() {
+ mt32emu_service_i i = { &SERVICE_VTABLE };
+ return i;
+}
+
+mt32emu_report_handler_version mt32emu_get_supported_report_handler_version() {
+ return MT32EMU_REPORT_HANDLER_VERSION_CURRENT;
+}
+
+mt32emu_midi_receiver_version mt32emu_get_supported_midi_receiver_version() {
+ return MT32EMU_MIDI_RECEIVER_VERSION_CURRENT;
+}
+
+mt32emu_bit32u mt32emu_get_library_version_int() {
+ return Synth::getLibraryVersionInt();
+}
+
+const char *mt32emu_get_library_version_string() {
+ return Synth::getLibraryVersionString();
+}
+
+mt32emu_bit32u mt32emu_get_stereo_output_samplerate(const mt32emu_analog_output_mode analog_output_mode) {
+ return Synth::getStereoOutputSampleRate(static_cast<AnalogOutputMode>(analog_output_mode));
+}
+
+mt32emu_context mt32emu_create_context(mt32emu_report_handler_i report_handler, void *instance_data) {
+ mt32emu_data *data = new mt32emu_data;
+ data->reportHandler = (report_handler.v0 != NULL) ? new DelegatingReportHandlerAdapter(report_handler, instance_data) : new ReportHandler;
+ data->synth = new Synth(data->reportHandler);
+ data->midiParser = new DefaultMidiStreamParser(*data->synth);
+ data->controlROMImage = NULL;
+ data->pcmROMImage = NULL;
+ data->partialCount = DEFAULT_MAX_PARTIALS;
+ data->analogOutputMode = AnalogOutputMode_COARSE;
+ return data;
+}
+
+void mt32emu_free_context(mt32emu_context data) {
+ if (data == NULL) return;
+ if (data->controlROMImage != NULL) {
+ delete data->controlROMImage->getFile();
+ ROMImage::freeROMImage(data->controlROMImage);
+ data->controlROMImage = NULL;
+ }
+ if (data->pcmROMImage != NULL) {
+ delete data->pcmROMImage->getFile();
+ ROMImage::freeROMImage(data->pcmROMImage);
+ data->pcmROMImage = NULL;
+ }
+ delete data->midiParser;
+ data->midiParser = NULL;
+ delete data->synth;
+ data->synth = NULL;
+ delete data->reportHandler;
+ data->reportHandler = NULL;
+ delete data;
+}
+
+mt32emu_return_code mt32emu_add_rom_data(mt32emu_context context, const mt32emu_bit8u *data, size_t data_size, const mt32emu_sha1_digest *sha1_digest) {
+ if (sha1_digest == NULL) return addROMFile(context, new ArrayFile(data, data_size));
+ return addROMFile(context, new ArrayFile(data, data_size, *sha1_digest));
+}
+
+mt32emu_return_code mt32emu_add_rom_file(mt32emu_context context, const char *filename) {
+ mt32emu_return_code rc = MT32EMU_RC_OK;
+ FileStream *fs = new FileStream;
+ if (fs->open(filename)) {
+ if (fs->getData() != NULL) {
+ rc = addROMFile(context, fs);
+ if (rc > 0) return rc;
+ } else {
+ rc = MT32EMU_RC_FILE_NOT_LOADED;
+ }
+ } else {
+ rc = MT32EMU_RC_FILE_NOT_FOUND;
+ }
+ delete fs;
+ return rc;
+}
+
+void mt32emu_get_rom_info(mt32emu_const_context context, mt32emu_rom_info *rom_info) {
+ const ROMInfo *romInfo = context->controlROMImage == NULL ? NULL : context->controlROMImage->getROMInfo();
+ if (romInfo != NULL) {
+ rom_info->control_rom_id = romInfo->shortName;
+ rom_info->control_rom_description = romInfo->description;
+ rom_info->control_rom_sha1_digest = romInfo->sha1Digest;
+ } else {
+ rom_info->control_rom_id = NULL;
+ rom_info->control_rom_description = NULL;
+ rom_info->control_rom_sha1_digest = NULL;
+ }
+ romInfo = context->pcmROMImage == NULL ? NULL : context->pcmROMImage->getROMInfo();
+ if (romInfo != NULL) {
+ rom_info->pcm_rom_id = romInfo->shortName;
+ rom_info->pcm_rom_description = romInfo->description;
+ rom_info->pcm_rom_sha1_digest = romInfo->sha1Digest;
+ } else {
+ rom_info->pcm_rom_id = NULL;
+ rom_info->pcm_rom_description = NULL;
+ rom_info->pcm_rom_sha1_digest = NULL;
+ }
+}
+
+void mt32emu_set_partial_count(mt32emu_context context, const mt32emu_bit32u partial_count) {
+ context->partialCount = partial_count;
+}
+
+void mt32emu_set_analog_output_mode(mt32emu_context context, const mt32emu_analog_output_mode analog_output_mode) {
+ context->analogOutputMode = static_cast<AnalogOutputMode>(analog_output_mode);
+}
+
+mt32emu_return_code mt32emu_open_synth(mt32emu_const_context context) {
+ if ((context->controlROMImage == NULL) || (context->pcmROMImage == NULL)) {
+ return MT32EMU_RC_MISSING_ROMS;
+ }
+ if (context->synth->open(*context->controlROMImage, *context->pcmROMImage, context->partialCount, context->analogOutputMode)) {
+ return MT32EMU_RC_OK;
+ }
+ return MT32EMU_RC_FAILED;
+}
+
+void mt32emu_close_synth(mt32emu_const_context context) {
+ context->synth->close();
+}
+
+mt32emu_boolean mt32emu_is_open(mt32emu_const_context context) {
+ return context->synth->isOpen() ? MT32EMU_BOOL_TRUE : MT32EMU_BOOL_FALSE;
+}
+
+mt32emu_bit32u mt32emu_get_actual_stereo_output_samplerate(mt32emu_const_context context) {
+ return context->synth->getStereoOutputSampleRate();
+}
+
+void mt32emu_flush_midi_queue(mt32emu_const_context context) {
+ context->synth->flushMIDIQueue();
+}
+
+mt32emu_bit32u mt32emu_set_midi_event_queue_size(mt32emu_const_context context, const mt32emu_bit32u queue_size) {
+ return context->synth->setMIDIEventQueueSize(queue_size);
+}
+
+void mt32emu_set_midi_receiver(mt32emu_context context, mt32emu_midi_receiver_i midi_receiver, void *instance_data) {
+ delete context->midiParser;
+ context->midiParser = (midi_receiver.v0 != NULL) ? new DelegatingMidiStreamParser(context, midi_receiver, instance_data) : new DefaultMidiStreamParser(*context->synth);
+}
+
+void mt32emu_parse_stream(mt32emu_const_context context, const mt32emu_bit8u *stream, mt32emu_bit32u length) {
+ context->midiParser->resetTimestamp();
+ context->midiParser->parseStream(stream, length);
+}
+
+void mt32emu_parse_stream_at(mt32emu_const_context context, const mt32emu_bit8u *stream, mt32emu_bit32u length, mt32emu_bit32u timestamp) {
+ context->midiParser->setTimestamp(timestamp);
+ context->midiParser->parseStream(stream, length);
+}
+
+void mt32emu_play_short_message(mt32emu_const_context context, mt32emu_bit32u message) {
+ context->midiParser->resetTimestamp();
+ context->midiParser->processShortMessage(message);
+}
+
+void mt32emu_play_short_message_at(mt32emu_const_context context, mt32emu_bit32u message, mt32emu_bit32u timestamp) {
+ context->midiParser->setTimestamp(timestamp);
+ context->midiParser->processShortMessage(message);
+}
+
+mt32emu_return_code mt32emu_play_msg(mt32emu_const_context context, mt32emu_bit32u msg) {
+ if (!context->synth->isOpen()) return MT32EMU_RC_NOT_OPENED;
+ return (context->synth->playMsg(msg)) ? MT32EMU_RC_OK : MT32EMU_RC_QUEUE_FULL;
+}
+
+mt32emu_return_code mt32emu_play_sysex(mt32emu_const_context context, const mt32emu_bit8u *sysex, mt32emu_bit32u len) {
+ if (!context->synth->isOpen()) return MT32EMU_RC_NOT_OPENED;
+ return (context->synth->playSysex(sysex, len)) ? MT32EMU_RC_OK : MT32EMU_RC_QUEUE_FULL;
+}
+
+mt32emu_return_code mt32emu_play_msg_at(mt32emu_const_context context, mt32emu_bit32u msg, mt32emu_bit32u timestamp) {
+ if (!context->synth->isOpen()) return MT32EMU_RC_NOT_OPENED;
+ return (context->synth->playMsg(msg, timestamp)) ? MT32EMU_RC_OK : MT32EMU_RC_QUEUE_FULL;
+}
+
+mt32emu_return_code mt32emu_play_sysex_at(mt32emu_const_context context, const mt32emu_bit8u *sysex, mt32emu_bit32u len, mt32emu_bit32u timestamp) {
+ if (!context->synth->isOpen()) return MT32EMU_RC_NOT_OPENED;
+ return (context->synth->playSysex(sysex, len, timestamp)) ? MT32EMU_RC_OK : MT32EMU_RC_QUEUE_FULL;
+}
+
+void mt32emu_play_msg_now(mt32emu_const_context context, mt32emu_bit32u msg) {
+ context->synth->playMsgNow(msg);
+}
+
+void mt32emu_play_msg_on_part(mt32emu_const_context context, mt32emu_bit8u part, mt32emu_bit8u code, mt32emu_bit8u note, mt32emu_bit8u velocity) {
+ context->synth->playMsgOnPart(part, code, note, velocity);
+}
+
+void mt32emu_play_sysex_now(mt32emu_const_context context, const mt32emu_bit8u *sysex, mt32emu_bit32u len) {
+ context->synth->playSysexNow(sysex, len);
+}
+
+void mt32emu_write_sysex(mt32emu_const_context context, mt32emu_bit8u channel, const mt32emu_bit8u *sysex, mt32emu_bit32u len) {
+ context->synth->writeSysex(channel, sysex, len);
+}
+
+void mt32emu_set_reverb_enabled(mt32emu_const_context context, const mt32emu_boolean reverb_enabled) {
+ context->synth->setReverbEnabled(reverb_enabled != MT32EMU_BOOL_FALSE);
+}
+
+mt32emu_boolean mt32emu_is_reverb_enabled(mt32emu_const_context context) {
+ return context->synth->isReverbEnabled() ? MT32EMU_BOOL_TRUE : MT32EMU_BOOL_FALSE;
+}
+
+void mt32emu_set_reverb_overridden(mt32emu_const_context context, const mt32emu_boolean reverb_overridden) {
+ context->synth->setReverbOverridden(reverb_overridden != MT32EMU_BOOL_FALSE);
+}
+
+mt32emu_boolean mt32emu_is_reverb_overridden(mt32emu_const_context context) {
+ return context->synth->isReverbOverridden() ? MT32EMU_BOOL_TRUE : MT32EMU_BOOL_FALSE;
+}
+
+void mt32emu_set_reverb_compatibility_mode(mt32emu_const_context context, const mt32emu_boolean mt32_compatible_mode) {
+ context->synth->setReverbCompatibilityMode(mt32_compatible_mode != MT32EMU_BOOL_FALSE);
+}
+
+mt32emu_boolean mt32emu_is_mt32_reverb_compatibility_mode(mt32emu_const_context context) {
+ return context->synth->isMT32ReverbCompatibilityMode() ? MT32EMU_BOOL_TRUE : MT32EMU_BOOL_FALSE;
+}
+
+mt32emu_boolean mt32emu_is_default_reverb_mt32_compatible(mt32emu_const_context context) {
+ return context->synth->isDefaultReverbMT32Compatible() ? MT32EMU_BOOL_TRUE : MT32EMU_BOOL_FALSE;
+}
+
+void mt32emu_set_dac_input_mode(mt32emu_const_context context, const mt32emu_dac_input_mode mode) {
+ context->synth->setDACInputMode(static_cast<DACInputMode>(mode));
+}
+
+mt32emu_dac_input_mode mt32emu_get_dac_input_mode(mt32emu_const_context context) {
+ return static_cast<mt32emu_dac_input_mode>(context->synth->getDACInputMode());
+}
+
+void mt32emu_set_midi_delay_mode(mt32emu_const_context context, const mt32emu_midi_delay_mode mode) {
+ context->synth->setMIDIDelayMode(static_cast<MIDIDelayMode>(mode));
+}
+
+mt32emu_midi_delay_mode mt32emu_get_midi_delay_mode(mt32emu_const_context context) {
+ return static_cast<mt32emu_midi_delay_mode>(context->synth->getMIDIDelayMode());
+}
+
+void mt32emu_set_output_gain(mt32emu_const_context context, float gain) {
+ context->synth->setOutputGain(gain);
+}
+
+float mt32emu_get_output_gain(mt32emu_const_context context) {
+ return context->synth->getOutputGain();
+}
+
+void mt32emu_set_reverb_output_gain(mt32emu_const_context context, float gain) {
+ context->synth->setReverbOutputGain(gain);
+}
+
+float mt32emu_get_reverb_output_gain(mt32emu_const_context context) {
+ return context->synth->getReverbOutputGain();
+}
+
+void mt32emu_set_reversed_stereo_enabled(mt32emu_const_context context, const mt32emu_boolean enabled) {
+ context->synth->setReversedStereoEnabled(enabled != MT32EMU_BOOL_FALSE);
+}
+
+mt32emu_boolean mt32emu_is_reversed_stereo_enabled(mt32emu_const_context context) {
+ return context->synth->isReversedStereoEnabled() ? MT32EMU_BOOL_TRUE : MT32EMU_BOOL_FALSE;
+}
+
+void mt32emu_render_bit16s(mt32emu_const_context context, mt32emu_bit16s *stream, mt32emu_bit32u len) {
+ context->synth->render(stream, len);
+}
+
+void mt32emu_render_float(mt32emu_const_context context, float *stream, mt32emu_bit32u len) {
+ context->synth->render(stream, len);
+}
+
+void mt32emu_render_bit16s_streams(mt32emu_const_context context, const mt32emu_dac_output_bit16s_streams *streams, mt32emu_bit32u len) {
+ context->synth->renderStreams(*reinterpret_cast<const DACOutputStreams<Bit16s> *>(streams), len);
+}
+
+void mt32emu_render_float_streams(mt32emu_const_context context, const mt32emu_dac_output_float_streams *streams, mt32emu_bit32u len) {
+ context->synth->renderStreams(*reinterpret_cast<const DACOutputStreams<float> *>(streams), len);
+}
+
+mt32emu_boolean mt32emu_has_active_partials(mt32emu_const_context context) {
+ return context->synth->hasActivePartials() ? MT32EMU_BOOL_TRUE : MT32EMU_BOOL_FALSE;
+}
+
+mt32emu_boolean mt32emu_is_active(mt32emu_const_context context) {
+ return context->synth->isActive() ? MT32EMU_BOOL_TRUE : MT32EMU_BOOL_FALSE;
+}
+
+mt32emu_bit32u mt32emu_get_partial_count(mt32emu_const_context context) {
+ return context->synth->getPartialCount();
+}
+
+mt32emu_bit32u mt32emu_get_part_states(mt32emu_const_context context) {
+ return context->synth->getPartStates();
+}
+
+void mt32emu_get_partial_states(mt32emu_const_context context, mt32emu_bit8u *partial_states) {
+ context->synth->getPartialStates(partial_states);
+}
+
+mt32emu_bit32u mt32emu_get_playing_notes(mt32emu_const_context context, mt32emu_bit8u part_number, mt32emu_bit8u *keys, mt32emu_bit8u *velocities) {
+ return context->synth->getPlayingNotes(part_number, keys, velocities);
+}
+
+const char *mt32emu_get_patch_name(mt32emu_const_context context, mt32emu_bit8u part_number) {
+ return context->synth->getPatchName(part_number);
+}
+
+void mt32emu_read_memory(mt32emu_const_context context, mt32emu_bit32u addr, mt32emu_bit32u len, mt32emu_bit8u *data) {
+ context->synth->readMemory(addr, len, data);
+}
+
+} // extern "C"
diff --git a/audio/softsynth/mt32/c_interface/c_interface.h b/audio/softsynth/mt32/c_interface/c_interface.h
new file mode 100755
index 0000000000..a2bdcb1254
--- /dev/null
+++ b/audio/softsynth/mt32/c_interface/c_interface.h
@@ -0,0 +1,362 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MT32EMU_C_INTERFACE_H
+#define MT32EMU_C_INTERFACE_H
+
+#include <stddef.h>
+
+#include "../globals.h"
+#include "c_types.h"
+
+#undef MT32EMU_EXPORT
+#define MT32EMU_EXPORT MT32EMU_EXPORT_ATTRIBUTE
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* == Context-independent functions == */
+
+/* === Interface handling === */
+
+/** Returns mt32emu_service_i interface. */
+MT32EMU_EXPORT const mt32emu_service_i mt32emu_get_service_i();
+
+#if MT32EMU_EXPORTS_TYPE == 2
+#undef MT32EMU_EXPORT
+#define MT32EMU_EXPORT
+#endif
+
+/**
+ * Returns the version ID of mt32emu_report_handler_i interface the library has been compiled with.
+ * This allows a client to fall-back gracefully instead of silently not receiving expected event reports.
+ */
+MT32EMU_EXPORT mt32emu_report_handler_version mt32emu_get_supported_report_handler_version();
+
+/**
+ * Returns the version ID of mt32emu_midi_receiver_version_i interface the library has been compiled with.
+ * This allows a client to fall-back gracefully instead of silently not receiving expected MIDI messages.
+ */
+MT32EMU_EXPORT mt32emu_midi_receiver_version mt32emu_get_supported_midi_receiver_version();
+
+/**
+ * Returns library version as an integer in format: 0x00MMmmpp, where:
+ * MM - major version number
+ * mm - minor version number
+ * pp - patch number
+ */
+MT32EMU_EXPORT mt32emu_bit32u mt32emu_get_library_version_int();
+
+/**
+ * Returns library version as a C-string in format: "MAJOR.MINOR.PATCH".
+ */
+MT32EMU_EXPORT const char *mt32emu_get_library_version_string();
+
+/**
+ * Returns output sample rate used in emulation of stereo analog circuitry of hardware units for particular analog_output_mode.
+ * See comment for mt32emu_analog_output_mode.
+ */
+MT32EMU_EXPORT mt32emu_bit32u mt32emu_get_stereo_output_samplerate(const mt32emu_analog_output_mode analog_output_mode);
+
+/* == Context-dependent functions == */
+
+/** Initialises a new emulation context and installs custom report handler if non-NULL. */
+MT32EMU_EXPORT mt32emu_context mt32emu_create_context(mt32emu_report_handler_i report_handler, void *instance_data);
+
+/** Closes and destroys emulation context. */
+MT32EMU_EXPORT void mt32emu_free_context(mt32emu_context context);
+
+/**
+ * Adds new ROM identified by its SHA1 digest to the emulation context replacing previously added ROM of the same type if any.
+ * Argument sha1_digest can be NULL, in this case the digest will be computed using the actual ROM data.
+ * If sha1_digest is set to non-NULL, it is assumed being correct and will not be recomputed.
+ * This function doesn't immediately change the state of already opened synth. Newly added ROM will take effect upon next call of mt32emu_open_synth().
+ * Returns positive value upon success.
+ */
+MT32EMU_EXPORT mt32emu_return_code mt32emu_add_rom_data(mt32emu_context context, const mt32emu_bit8u *data, size_t data_size, const mt32emu_sha1_digest *sha1_digest);
+
+/**
+ * Loads a ROM file, identify it by SHA1 digest, and adds it to the emulation context replacing previously added ROM of the same type if any.
+ * This function doesn't immediately change the state of already opened synth. Newly added ROM will take effect upon next call of mt32emu_open_synth().
+ * Returns positive value upon success.
+ */
+MT32EMU_EXPORT mt32emu_return_code mt32emu_add_rom_file(mt32emu_context context, const char *filename);
+
+/**
+ * Fills in mt32emu_rom_info structure with identifiers and descriptions of control and PCM ROM files identified and added to the synth context.
+ * If one of the ROM files is not loaded and identified yet, NULL is returned in the corresponding fields of the mt32emu_rom_info structure.
+ */
+MT32EMU_EXPORT void mt32emu_get_rom_info(mt32emu_const_context context, mt32emu_rom_info *rom_info);
+
+/**
+ * Allows to override the default maximum number of partials playing simultaneously within the emulation session.
+ * This function doesn't immediately change the state of already opened synth. Newly set vale will take effect upon next call of mt32emu_open_synth().
+ */
+MT32EMU_EXPORT void mt32emu_set_partial_count(mt32emu_context context, const mt32emu_bit32u partial_count);
+
+/**
+ * Allows to override the default mode for emulation of analogue circuitry of the hardware units within the emulation session.
+ * This function doesn't immediately change the state of already opened synth. Newly set vale will take effect upon next call of mt32emu_open_synth().
+ */
+MT32EMU_EXPORT void mt32emu_set_analog_output_mode(mt32emu_context context, const mt32emu_analog_output_mode analog_output_mode);
+
+/**
+ * Prepares the emulation context to receive MIDI messages and produce output audio data using aforehand added set of ROMs,
+ * and optionally set the maximum partial count and the analog output mode.
+ * Returns MT32EMU_RC_OK upon success.
+ */
+MT32EMU_EXPORT mt32emu_return_code mt32emu_open_synth(mt32emu_const_context context);
+
+/** Closes the emulation context freeing allocated resources. Added ROMs remain unaffected and ready for reuse. */
+MT32EMU_EXPORT void mt32emu_close_synth(mt32emu_const_context context);
+
+/** Returns true if the synth is in completely initialized state, otherwise returns false. */
+MT32EMU_EXPORT mt32emu_boolean mt32emu_is_open(mt32emu_const_context context);
+
+/**
+ * Returns actual output sample rate used in emulation of stereo analog circuitry of hardware units.
+ * See comment for mt32emu_analog_output_mode.
+ */
+MT32EMU_EXPORT mt32emu_bit32u mt32emu_get_actual_stereo_output_samplerate(mt32emu_const_context context);
+
+/** All the enqueued events are processed by the synth immediately. */
+MT32EMU_EXPORT void mt32emu_flush_midi_queue(mt32emu_const_context context);
+
+/**
+ * Sets size of the internal MIDI event queue. The queue size is set to the minimum power of 2 that is greater or equal to the size specified.
+ * The queue is flushed before reallocation.
+ * Returns the actual queue size being used.
+ */
+MT32EMU_EXPORT mt32emu_bit32u mt32emu_set_midi_event_queue_size(mt32emu_const_context context, const mt32emu_bit32u queue_size);
+
+/**
+ * Installs custom MIDI receiver object intended for receiving MIDI messages generated by MIDI stream parser.
+ * MIDI stream parser is involved when functions mt32emu_parse_stream() and mt32emu_play_short_message() or the likes are called.
+ * By default, parsed short MIDI messages and System Exclusive messages are sent to the synth input MIDI queue.
+ * This function allows to override default behaviour. If midi_receiver argument is set to NULL, the default behaviour is restored.
+ */
+MT32EMU_EXPORT void mt32emu_set_midi_receiver(mt32emu_context context, mt32emu_midi_receiver_i midi_receiver, void *instance_data);
+
+/* Enqueues a MIDI event for subsequent playback.
+ * The MIDI event will be processed not before the specified timestamp.
+ * The timestamp is measured as the global rendered sample count since the synth was created (at the native sample rate 32000 Hz).
+ * The minimum delay involves emulation of the delay introduced while the event is transferred via MIDI interface
+ * and emulation of the MCU busy-loop while it frees partials for use by a new Poly.
+ * Calls from multiple threads must be synchronised, although, no synchronisation is required with the rendering thread.
+ * onMIDIQueueOverflow callback is invoked when the MIDI event queue is full and the message cannot be enqueued.
+ */
+
+/**
+ * Parses a block of raw MIDI bytes and enqueues parsed MIDI messages for further processing ASAP.
+ * SysEx messages are allowed to be fragmented across several calls to this method. Running status is also handled for short messages.
+ * When a System Realtime MIDI message is parsed, onMIDISystemRealtime callback is invoked.
+ * NOTE: the total length of a SysEx message being fragmented shall not exceed MT32EMU_MAX_STREAM_BUFFER_SIZE (32768 bytes).
+ */
+MT32EMU_EXPORT void mt32emu_parse_stream(mt32emu_const_context context, const mt32emu_bit8u *stream, mt32emu_bit32u length);
+
+/**
+ * Parses a block of raw MIDI bytes and enqueues parsed MIDI messages to play at specified time.
+ * SysEx messages are allowed to be fragmented across several calls to this method. Running status is also handled for short messages.
+ * When a System Realtime MIDI message is parsed, onMIDISystemRealtime callback is invoked.
+ * NOTE: the total length of a SysEx message being fragmented shall not exceed MT32EMU_MAX_STREAM_BUFFER_SIZE (32768 bytes).
+ */
+MT32EMU_EXPORT void mt32emu_parse_stream_at(mt32emu_const_context context, const mt32emu_bit8u *stream, mt32emu_bit32u length, mt32emu_bit32u timestamp);
+
+/**
+ * Enqueues a single mt32emu_bit32u-encoded short MIDI message with full processing ASAP.
+ * The short MIDI message may contain no status byte, the running status is used in this case.
+ * When the argument is a System Realtime MIDI message, onMIDISystemRealtime callback is invoked.
+ */
+MT32EMU_EXPORT void mt32emu_play_short_message(mt32emu_const_context context, mt32emu_bit32u message);
+
+/**
+ * Enqueues a single mt32emu_bit32u-encoded short MIDI message to play at specified time with full processing.
+ * The short MIDI message may contain no status byte, the running status is used in this case.
+ * When the argument is a System Realtime MIDI message, onMIDISystemRealtime callback is invoked.
+ */
+MT32EMU_EXPORT void mt32emu_play_short_message_at(mt32emu_const_context context, mt32emu_bit32u message, mt32emu_bit32u timestamp);
+
+/** Enqueues a single short MIDI message to be processed ASAP. The message must contain a status byte. */
+MT32EMU_EXPORT mt32emu_return_code mt32emu_play_msg(mt32emu_const_context context, mt32emu_bit32u msg);
+/** Enqueues a single well formed System Exclusive MIDI message to be processed ASAP. */
+MT32EMU_EXPORT mt32emu_return_code mt32emu_play_sysex(mt32emu_const_context context, const mt32emu_bit8u *sysex, mt32emu_bit32u len);
+
+/** Enqueues a single short MIDI message to play at specified time. The message must contain a status byte. */
+MT32EMU_EXPORT mt32emu_return_code mt32emu_play_msg_at(mt32emu_const_context context, mt32emu_bit32u msg, mt32emu_bit32u timestamp);
+/** Enqueues a single well formed System Exclusive MIDI message to play at specified time. */
+MT32EMU_EXPORT mt32emu_return_code mt32emu_play_sysex_at(mt32emu_const_context context, const mt32emu_bit8u *sysex, mt32emu_bit32u len, mt32emu_bit32u timestamp);
+
+/* WARNING:
+ * The methods below don't ensure minimum 1-sample delay between sequential MIDI events,
+ * and a sequence of NoteOn and immediately succeeding NoteOff messages is always silent.
+ * A thread that invokes these methods must be explicitly synchronised with the thread performing sample rendering.
+ */
+
+/**
+ * Sends a short MIDI message to the synth for immediate playback. The message must contain a status byte.
+ * See the WARNING above.
+ */
+MT32EMU_EXPORT void mt32emu_play_msg_now(mt32emu_const_context context, mt32emu_bit32u msg);
+/**
+ * Sends unpacked short MIDI message to the synth for immediate playback. The message must contain a status byte.
+ * See the WARNING above.
+ */
+MT32EMU_EXPORT void mt32emu_play_msg_on_part(mt32emu_const_context context, mt32emu_bit8u part, mt32emu_bit8u code, mt32emu_bit8u note, mt32emu_bit8u velocity);
+
+/**
+ * Sends a single well formed System Exclusive MIDI message for immediate processing. The length is in bytes.
+ * See the WARNING above.
+ */
+MT32EMU_EXPORT void mt32emu_play_sysex_now(mt32emu_const_context context, const mt32emu_bit8u *sysex, mt32emu_bit32u len);
+/**
+ * Sends inner body of a System Exclusive MIDI message for direct processing. The length is in bytes.
+ * See the WARNING above.
+ */
+MT32EMU_EXPORT void mt32emu_write_sysex(mt32emu_const_context context, mt32emu_bit8u channel, const mt32emu_bit8u *sysex, mt32emu_bit32u len);
+
+/** Allows to disable wet reverb output altogether. */
+MT32EMU_EXPORT void mt32emu_set_reverb_enabled(mt32emu_const_context context, const mt32emu_boolean reverb_enabled);
+/** Returns whether wet reverb output is enabled. */
+MT32EMU_EXPORT mt32emu_boolean mt32emu_is_reverb_enabled(mt32emu_const_context context);
+/**
+ * Sets override reverb mode. In this mode, emulation ignores sysexes (or the related part of them) which control the reverb parameters.
+ * This mode is in effect until it is turned off. When the synth is re-opened, the override mode is unchanged but the state
+ * of the reverb model is reset to default.
+ */
+MT32EMU_EXPORT void mt32emu_set_reverb_overridden(mt32emu_const_context context, const mt32emu_boolean reverb_overridden);
+/** Returns whether reverb settings are overridden. */
+MT32EMU_EXPORT mt32emu_boolean mt32emu_is_reverb_overridden(mt32emu_const_context context);
+/**
+ * Forces reverb model compatibility mode. By default, the compatibility mode corresponds to the used control ROM version.
+ * Invoking this method with the argument set to true forces emulation of old MT-32 reverb circuit.
+ * When the argument is false, emulation of the reverb circuit used in new generation of MT-32 compatible modules is enforced
+ * (these include CM-32L and LAPC-I).
+ */
+MT32EMU_EXPORT void mt32emu_set_reverb_compatibility_mode(mt32emu_const_context context, const mt32emu_boolean mt32_compatible_mode);
+/** Returns whether reverb is in old MT-32 compatibility mode. */
+MT32EMU_EXPORT mt32emu_boolean mt32emu_is_mt32_reverb_compatibility_mode(mt32emu_const_context context);
+/** Returns whether default reverb compatibility mode is the old MT-32 compatibility mode. */
+MT32EMU_EXPORT mt32emu_boolean mt32emu_is_default_reverb_mt32_compatible(mt32emu_const_context context);
+
+/** Sets new DAC input mode. See mt32emu_dac_input_mode for details. */
+MT32EMU_EXPORT void mt32emu_set_dac_input_mode(mt32emu_const_context context, const mt32emu_dac_input_mode mode);
+/** Returns current DAC input mode. See mt32emu_dac_input_mode for details. */
+MT32EMU_EXPORT mt32emu_dac_input_mode mt32emu_get_dac_input_mode(mt32emu_const_context context);
+
+/** Sets new MIDI delay mode. See mt32emu_midi_delay_mode for details. */
+MT32EMU_EXPORT void mt32emu_set_midi_delay_mode(mt32emu_const_context context, const mt32emu_midi_delay_mode mode);
+/** Returns current MIDI delay mode. See mt32emu_midi_delay_mode for details. */
+MT32EMU_EXPORT mt32emu_midi_delay_mode mt32emu_get_midi_delay_mode(mt32emu_const_context context);
+
+/**
+ * Sets output gain factor for synth output channels. Applied to all output samples and unrelated with the synth's Master volume,
+ * it rather corresponds to the gain of the output analog circuitry of the hardware units. However, together with mt32emu_set_reverb_output_gain()
+ * it offers to the user a capability to control the gain of reverb and non-reverb output channels independently.
+ * Ignored in MT32EMU_DAC_PURE mode.
+ */
+MT32EMU_EXPORT void mt32emu_set_output_gain(mt32emu_const_context context, float gain);
+/** Returns current output gain factor for synth output channels. */
+MT32EMU_EXPORT float mt32emu_get_output_gain(mt32emu_const_context context);
+
+/**
+ * Sets output gain factor for the reverb wet output channels. It rather corresponds to the gain of the output
+ * analog circuitry of the hardware units. However, together with mt32emu_set_output_gain() it offers to the user a capability
+ * to control the gain of reverb and non-reverb output channels independently.
+ *
+ * Note: We're currently emulate CM-32L/CM-64 reverb quite accurately and the reverb output level closely
+ * corresponds to the level of digital capture. Although, according to the CM-64 PCB schematic,
+ * there is a difference in the reverb analogue circuit, and the resulting output gain is 0.68
+ * of that for LA32 analogue output. This factor is applied to the reverb output gain.
+ * Ignored in MT32EMU_DAC_PURE mode.
+ */
+MT32EMU_EXPORT void mt32emu_set_reverb_output_gain(mt32emu_const_context context, float gain);
+/** Returns current output gain factor for reverb wet output channels. */
+MT32EMU_EXPORT float mt32emu_get_reverb_output_gain(mt32emu_const_context context);
+
+/** Swaps left and right output channels. */
+MT32EMU_EXPORT void mt32emu_set_reversed_stereo_enabled(mt32emu_const_context context, const mt32emu_boolean enabled);
+/** Returns whether left and right output channels are swapped. */
+MT32EMU_EXPORT mt32emu_boolean mt32emu_is_reversed_stereo_enabled(mt32emu_const_context context);
+
+/**
+ * Renders samples to the specified output stream as if they were sampled at the analog stereo output.
+ * When mt32emu_analog_output_mode is set to ACCURATE (OVERSAMPLED), the output signal is upsampled to 48 (96) kHz in order
+ * to retain emulation accuracy in whole audible frequency spectra. Otherwise, native digital signal sample rate is retained.
+ * mt32emu_get_actual_stereo_output_samplerate() can be used to query actual sample rate of the output signal.
+ * The length is in frames, not bytes (in 16-bit stereo, one frame is 4 bytes). Uses NATIVE byte ordering.
+ */
+MT32EMU_EXPORT void mt32emu_render_bit16s(mt32emu_const_context context, mt32emu_bit16s *stream, mt32emu_bit32u len);
+/** Same as above but outputs to a float stereo stream. */
+MT32EMU_EXPORT void mt32emu_render_float(mt32emu_const_context context, float *stream, mt32emu_bit32u len);
+
+/**
+ * Renders samples to the specified output streams as if they appeared at the DAC entrance.
+ * No further processing performed in analog circuitry emulation is applied to the signal.
+ * NULL may be specified in place of any or all of the stream buffers to skip it.
+ * The length is in samples, not bytes. Uses NATIVE byte ordering.
+ */
+MT32EMU_EXPORT void mt32emu_render_bit16s_streams(mt32emu_const_context context, const mt32emu_dac_output_bit16s_streams *streams, mt32emu_bit32u len);
+/** Same as above but outputs to float streams. */
+MT32EMU_EXPORT void mt32emu_render_float_streams(mt32emu_const_context context, const mt32emu_dac_output_float_streams *streams, mt32emu_bit32u len);
+
+/** Returns true when there is at least one active partial, otherwise false. */
+MT32EMU_EXPORT mt32emu_boolean mt32emu_has_active_partials(mt32emu_const_context context);
+
+/** Returns true if mt32emu_has_active_partials() returns true, or reverb is (somewhat unreliably) detected as being active. */
+MT32EMU_EXPORT mt32emu_boolean mt32emu_is_active(mt32emu_const_context context);
+
+/** Returns the maximum number of partials playing simultaneously. */
+MT32EMU_EXPORT mt32emu_bit32u mt32emu_get_partial_count(mt32emu_const_context context);
+
+/**
+ * Returns current states of all the parts as a bit set. The least significant bit corresponds to the state of part 1,
+ * total of 9 bits hold the states of all the parts. If the returned bit for a part is set, there is at least one active
+ * non-releasing partial playing on this part. This info is useful in emulating behaviour of LCD display of the hardware units.
+ */
+MT32EMU_EXPORT mt32emu_bit32u mt32emu_get_part_states(mt32emu_const_context context);
+
+/**
+ * Fills in current states of all the partials into the array provided. Each byte in the array holds states of 4 partials
+ * starting from the least significant bits. The state of each partial is packed in a pair of bits.
+ * The array must be large enough to accommodate states of all the partials.
+ * @see getPartialCount()
+ */
+MT32EMU_EXPORT void mt32emu_get_partial_states(mt32emu_const_context context, mt32emu_bit8u *partial_states);
+
+/**
+ * Fills in information about currently playing notes on the specified part into the arrays provided. The arrays must be large enough
+ * to accommodate data for all the playing notes. The maximum number of simultaneously playing notes cannot exceed the number of partials.
+ * Argument partNumber should be 0..7 for Part 1..8, or 8 for Rhythm.
+ * Returns the number of currently playing notes on the specified part.
+ */
+MT32EMU_EXPORT mt32emu_bit32u mt32emu_get_playing_notes(mt32emu_const_context context, mt32emu_bit8u part_number, mt32emu_bit8u *keys, mt32emu_bit8u *velocities);
+
+/**
+ * Returns name of the patch set on the specified part.
+ * Argument partNumber should be 0..7 for Part 1..8, or 8 for Rhythm.
+ */
+MT32EMU_EXPORT const char *mt32emu_get_patch_name(mt32emu_const_context context, mt32emu_bit8u part_number);
+
+/** Stores internal state of emulated synth into an array provided (as it would be acquired from hardware). */
+MT32EMU_EXPORT void mt32emu_read_memory(mt32emu_const_context context, mt32emu_bit32u addr, mt32emu_bit32u len, mt32emu_bit8u *data);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif /* #ifndef MT32EMU_C_INTERFACE_H */
diff --git a/audio/softsynth/mt32/c_interface/c_types.h b/audio/softsynth/mt32/c_interface/c_types.h
new file mode 100755
index 0000000000..3cd8744235
--- /dev/null
+++ b/audio/softsynth/mt32/c_interface/c_types.h
@@ -0,0 +1,298 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MT32EMU_C_TYPES_H
+#define MT32EMU_C_TYPES_H
+
+#include <stdarg.h>
+#include <stddef.h>
+
+#include "../globals.h"
+
+#define MT32EMU_C_ENUMERATIONS
+#include "../Enumerations.h"
+#undef MT32EMU_C_ENUMERATIONS
+
+typedef unsigned int mt32emu_bit32u;
+typedef signed int mt32emu_bit32s;
+typedef unsigned short int mt32emu_bit16u;
+typedef signed short int mt32emu_bit16s;
+typedef unsigned char mt32emu_bit8u;
+typedef signed char mt32emu_bit8s;
+
+typedef char mt32emu_sha1_digest[41];
+
+typedef enum {
+ MT32EMU_BOOL_FALSE, MT32EMU_BOOL_TRUE
+} mt32emu_boolean;
+
+typedef enum {
+ /* Operation completed normally. */
+ MT32EMU_RC_OK = 0,
+ MT32EMU_RC_ADDED_CONTROL_ROM = 1,
+ MT32EMU_RC_ADDED_PCM_ROM = 2,
+
+ /* Definite error occurred. */
+ MT32EMU_RC_ROM_NOT_IDENTIFIED = -1,
+ MT32EMU_RC_FILE_NOT_FOUND = -2,
+ MT32EMU_RC_FILE_NOT_LOADED = -3,
+ MT32EMU_RC_MISSING_ROMS = -4,
+ MT32EMU_RC_NOT_OPENED = -5,
+ MT32EMU_RC_QUEUE_FULL = -6,
+
+ /* Undefined error occurred. */
+ MT32EMU_RC_FAILED = -100
+} mt32emu_return_code;
+
+/** Emulation context */
+typedef struct mt32emu_data *mt32emu_context;
+typedef const struct mt32emu_data *mt32emu_const_context;
+
+/* Convenience aliases */
+#ifndef __cplusplus
+typedef enum mt32emu_analog_output_mode mt32emu_analog_output_mode;
+typedef enum mt32emu_dac_input_mode mt32emu_dac_input_mode;
+typedef enum mt32emu_midi_delay_mode mt32emu_midi_delay_mode;
+typedef enum mt32emu_partial_state mt32emu_partial_state;
+#endif
+
+/** Contains identifiers and descriptions of ROM files being used. */
+typedef struct {
+ const char *control_rom_id;
+ const char *control_rom_description;
+ const char *control_rom_sha1_digest;
+ const char *pcm_rom_id;
+ const char *pcm_rom_description;
+ const char *pcm_rom_sha1_digest;
+} mt32emu_rom_info;
+
+/** Set of multiplexed output bit16s streams appeared at the DAC entrance. */
+typedef struct {
+ mt32emu_bit16s *nonReverbLeft;
+ mt32emu_bit16s *nonReverbRight;
+ mt32emu_bit16s *reverbDryLeft;
+ mt32emu_bit16s *reverbDryRight;
+ mt32emu_bit16s *reverbWetLeft;
+ mt32emu_bit16s *reverbWetRight;
+} mt32emu_dac_output_bit16s_streams;
+
+/** Set of multiplexed output float streams appeared at the DAC entrance. */
+typedef struct {
+ float *nonReverbLeft;
+ float *nonReverbRight;
+ float *reverbDryLeft;
+ float *reverbDryRight;
+ float *reverbWetLeft;
+ float *reverbWetRight;
+} mt32emu_dac_output_float_streams;
+
+/* === Interface handling === */
+
+/** Report handler interface versions */
+typedef enum {
+ MT32EMU_REPORT_HANDLER_VERSION_0 = 0,
+ MT32EMU_REPORT_HANDLER_VERSION_CURRENT = MT32EMU_REPORT_HANDLER_VERSION_0
+} mt32emu_report_handler_version;
+
+/** MIDI receiver interface versions */
+typedef enum {
+ MT32EMU_MIDI_RECEIVER_VERSION_0 = 0,
+ MT32EMU_MIDI_RECEIVER_VERSION_CURRENT = MT32EMU_MIDI_RECEIVER_VERSION_0
+} mt32emu_midi_receiver_version;
+
+/** Synth interface versions */
+typedef enum {
+ MT32EMU_SERVICE_VERSION_0 = 0,
+ MT32EMU_SERVICE_VERSION_CURRENT = MT32EMU_SERVICE_VERSION_0
+} mt32emu_service_version;
+
+/* === Report Handler Interface === */
+
+typedef union mt32emu_report_handler_i mt32emu_report_handler_i;
+
+/** Interface for handling reported events (initial version) */
+typedef struct {
+ /** Returns the actual interface version ID */
+ mt32emu_report_handler_version (*getVersionID)(mt32emu_report_handler_i i);
+
+ /** Callback for debug messages, in vprintf() format */
+ void (*printDebug)(void *instance_data, const char *fmt, va_list list);
+ /** Callbacks for reporting errors */
+ void (*onErrorControlROM)(void *instance_data);
+ void (*onErrorPCMROM)(void *instance_data);
+ /** Callback for reporting about displaying a new custom message on LCD */
+ void (*showLCDMessage)(void *instance_data, const char *message);
+ /** Callback for reporting actual processing of a MIDI message */
+ void (*onMIDIMessagePlayed)(void *instance_data);
+ /**
+ * Callback for reporting an overflow of the input MIDI queue.
+ * Returns MT32EMU_BOOL_TRUE if a recovery action was taken
+ * and yet another attempt to enqueue the MIDI event is desired.
+ */
+ mt32emu_boolean (*onMIDIQueueOverflow)(void *instance_data);
+ /**
+ * Callback invoked when a System Realtime MIDI message is detected in functions
+ * mt32emu_parse_stream and mt32emu_play_short_message and the likes.
+ */
+ void (*onMIDISystemRealtime)(void *instance_data, mt32emu_bit8u system_realtime);
+ /** Callbacks for reporting system events */
+ void (*onDeviceReset)(void *instance_data);
+ void (*onDeviceReconfig)(void *instance_data);
+ /** Callbacks for reporting changes of reverb settings */
+ void (*onNewReverbMode)(void *instance_data, mt32emu_bit8u mode);
+ void (*onNewReverbTime)(void *instance_data, mt32emu_bit8u time);
+ void (*onNewReverbLevel)(void *instance_data, mt32emu_bit8u level);
+ /** Callbacks for reporting various information */
+ void (*onPolyStateChanged)(void *instance_data, mt32emu_bit8u part_num);
+ void (*onProgramChanged)(void *instance_data, mt32emu_bit8u part_num, const char *sound_group_name, const char *patch_name);
+} mt32emu_report_handler_i_v0;
+
+/**
+ * Extensible interface for handling reported events.
+ * Union intended to view an interface of any subsequent version as any parent interface not requiring a cast.
+ * Elements are to be addressed using the tag of the interface version when they were introduced.
+ */
+union mt32emu_report_handler_i {
+ const mt32emu_report_handler_i_v0 *v0;
+};
+
+/* === MIDI Receiver Interface === */
+
+typedef union mt32emu_midi_receiver_i mt32emu_midi_receiver_i;
+
+/** Interface for receiving MIDI messages generated by MIDI stream parser (initial version) */
+typedef struct {
+ /** Returns the actual interface version ID */
+ mt32emu_midi_receiver_version (*getVersionID)(mt32emu_midi_receiver_i i);
+
+ /** Invoked when a complete short MIDI message is parsed in the input MIDI stream. */
+ void (*handleShortMessage)(void *instance_data, const mt32emu_bit32u message);
+
+ /** Invoked when a complete well-formed System Exclusive MIDI message is parsed in the input MIDI stream. */
+ void (*handleSysex)(void *instance_data, const mt32emu_bit8u stream[], const mt32emu_bit32u length);
+
+ /** Invoked when a System Realtime MIDI message is parsed in the input MIDI stream. */
+ void (*handleSystemRealtimeMessage)(void *instance_data, const mt32emu_bit8u realtime);
+} mt32emu_midi_receiver_i_v0;
+
+/**
+ * Extensible interface for receiving MIDI messages.
+ * Union intended to view an interface of any subsequent version as any parent interface not requiring a cast.
+ * Elements are to be addressed using the tag of the interface version when they were introduced.
+ */
+union mt32emu_midi_receiver_i {
+ const mt32emu_midi_receiver_i_v0 *v0;
+};
+
+/* === Service Interface === */
+
+typedef union mt32emu_service_i mt32emu_service_i;
+
+/**
+ * Basic interface that defines all the library services (initial version).
+ * The members closely resemble C functions declared in c_interface.h, and the intention is to provide for easier
+ * access when the library is dynamically loaded in run-time, e.g. as a plugin. This way the client only needs
+ * to bind to mt32emu_get_service_i() function instead of binding to each function it needs to use.
+ * See c_interface.h for parameter description.
+ */
+typedef struct {
+ /** Returns the actual interface version ID */
+ mt32emu_service_version (*getVersionID)(mt32emu_service_i i);
+ mt32emu_report_handler_version (*getSupportedReportHandlerVersionID)();
+ mt32emu_midi_receiver_version (*getSupportedMIDIReceiverVersionID)();
+
+ mt32emu_bit32u (*getLibraryVersionInt)();
+ const char *(*getLibraryVersionString)();
+
+ mt32emu_bit32u (*getStereoOutputSamplerate)(const mt32emu_analog_output_mode analog_output_mode);
+
+ mt32emu_context (*createContext)(mt32emu_report_handler_i report_handler, void *instance_data);
+ void (*freeContext)(mt32emu_context context);
+ mt32emu_return_code (*addROMData)(mt32emu_context context, const mt32emu_bit8u *data, size_t data_size, const mt32emu_sha1_digest *sha1_digest);
+ mt32emu_return_code (*addROMFile)(mt32emu_context context, const char *filename);
+ void (*getROMInfo)(mt32emu_const_context context, mt32emu_rom_info *rom_info);
+ void (*setPartialCount)(mt32emu_context context, const mt32emu_bit32u partial_count);
+ void (*setAnalogOutputMode)(mt32emu_context context, const mt32emu_analog_output_mode analog_output_mode);
+ mt32emu_return_code (*openSynth)(mt32emu_const_context context);
+ void (*closeSynth)(mt32emu_const_context context);
+ mt32emu_boolean (*isOpen)(mt32emu_const_context context);
+ mt32emu_bit32u (*getActualStereoOutputSamplerate)(mt32emu_const_context context);
+ void (*flushMIDIQueue)(mt32emu_const_context context);
+ mt32emu_bit32u (*setMIDIEventQueueSize)(mt32emu_const_context context, const mt32emu_bit32u queue_size);
+ void (*setMIDIReceiver)(mt32emu_context context, mt32emu_midi_receiver_i midi_receiver, void *instance_data);
+
+ void (*parseStream)(mt32emu_const_context context, const mt32emu_bit8u *stream, mt32emu_bit32u length);
+ void (*parseStream_At)(mt32emu_const_context context, const mt32emu_bit8u *stream, mt32emu_bit32u length, mt32emu_bit32u timestamp);
+ void (*playShortMessage)(mt32emu_const_context context, mt32emu_bit32u message);
+ void (*playShortMessageAt)(mt32emu_const_context context, mt32emu_bit32u message, mt32emu_bit32u timestamp);
+ mt32emu_return_code (*playMsg)(mt32emu_const_context context, mt32emu_bit32u msg);
+ mt32emu_return_code (*playSysex)(mt32emu_const_context context, const mt32emu_bit8u *sysex, mt32emu_bit32u len);
+ mt32emu_return_code (*playMsgAt)(mt32emu_const_context context, mt32emu_bit32u msg, mt32emu_bit32u timestamp);
+ mt32emu_return_code (*playSysexAt)(mt32emu_const_context context, const mt32emu_bit8u *sysex, mt32emu_bit32u len, mt32emu_bit32u timestamp);
+
+ void (*playMsgNow)(mt32emu_const_context context, mt32emu_bit32u msg);
+ void (*playMsgOnPart)(mt32emu_const_context context, mt32emu_bit8u part, mt32emu_bit8u code, mt32emu_bit8u note, mt32emu_bit8u velocity);
+ void (*playSysexNow)(mt32emu_const_context context, const mt32emu_bit8u *sysex, mt32emu_bit32u len);
+ void (*writeSysex)(mt32emu_const_context context, mt32emu_bit8u channel, const mt32emu_bit8u *sysex, mt32emu_bit32u len);
+
+ void (*setReverbEnabled)(mt32emu_const_context context, const mt32emu_boolean reverb_enabled);
+ mt32emu_boolean (*isReverbEnabled)(mt32emu_const_context context);
+ void (*setReverbOverridden)(mt32emu_const_context context, const mt32emu_boolean reverb_overridden);
+ mt32emu_boolean (*isReverbOverridden)(mt32emu_const_context context);
+ void (*setReverbCompatibilityMode)(mt32emu_const_context context, const mt32emu_boolean mt32_compatible_mode);
+ mt32emu_boolean (*isMT32ReverbCompatibilityMode)(mt32emu_const_context context);
+ mt32emu_boolean (*isDefaultReverbMT32Compatible)(mt32emu_const_context context);
+
+ void (*setDACInputMode)(mt32emu_const_context context, const mt32emu_dac_input_mode mode);
+ mt32emu_dac_input_mode (*getDACInputMode)(mt32emu_const_context context);
+
+ void (*setMIDIDelayMode)(mt32emu_const_context context, const mt32emu_midi_delay_mode mode);
+ mt32emu_midi_delay_mode (*getMIDIDelayMode)(mt32emu_const_context context);
+
+ void (*setOutputGain)(mt32emu_const_context context, float gain);
+ float (*getOutputGain)(mt32emu_const_context context);
+ void (*setReverbOutputGain)(mt32emu_const_context context, float gain);
+ float (*getReverbOutputGain)(mt32emu_const_context context);
+
+ void (*setReversedStereoEnabled)(mt32emu_const_context context, const mt32emu_boolean enabled);
+ mt32emu_boolean (*isReversedStereoEnabled)(mt32emu_const_context context);
+
+ void (*renderBit16s)(mt32emu_const_context context, mt32emu_bit16s *stream, mt32emu_bit32u len);
+ void (*renderFloat)(mt32emu_const_context context, float *stream, mt32emu_bit32u len);
+ void (*renderBit16sStreams)(mt32emu_const_context context, const mt32emu_dac_output_bit16s_streams *streams, mt32emu_bit32u len);
+ void (*renderFloatStreams)(mt32emu_const_context context, const mt32emu_dac_output_float_streams *streams, mt32emu_bit32u len);
+
+ mt32emu_boolean (*hasActivePartials)(mt32emu_const_context context);
+ mt32emu_boolean (*isActive)(mt32emu_const_context context);
+ mt32emu_bit32u (*getPartialCount)(mt32emu_const_context context);
+ mt32emu_bit32u (*getPartStates)(mt32emu_const_context context);
+ void (*getPartialStates)(mt32emu_const_context context, mt32emu_bit8u *partial_states);
+ mt32emu_bit32u (*getPlayingNotes)(mt32emu_const_context context, mt32emu_bit8u part_number, mt32emu_bit8u *keys, mt32emu_bit8u *velocities);
+ const char *(*getPatchName)(mt32emu_const_context context, mt32emu_bit8u part_number);
+ void (*readMemory)(mt32emu_const_context context, mt32emu_bit32u addr, mt32emu_bit32u len, mt32emu_bit8u *data);
+} mt32emu_service_i_v0;
+
+/**
+ * Extensible interface for all the library services.
+ * Union intended to view an interface of any subsequent version as any parent interface not requiring a cast.
+ * Elements are to be addressed using the tag of the interface version when they were introduced.
+ */
+union mt32emu_service_i {
+ const mt32emu_service_i_v0 *v0;
+};
+
+#endif /* #ifndef MT32EMU_C_TYPES_H */
diff --git a/audio/softsynth/mt32/c_interface/cpp_interface.h b/audio/softsynth/mt32/c_interface/cpp_interface.h
new file mode 100755
index 0000000000..3e86322faa
--- /dev/null
+++ b/audio/softsynth/mt32/c_interface/cpp_interface.h
@@ -0,0 +1,436 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MT32EMU_CPP_INTERFACE_H
+#define MT32EMU_CPP_INTERFACE_H
+
+#include <cstdarg>
+
+#include "../globals.h"
+#include "c_types.h"
+
+#include "../Types.h"
+#include "../Enumerations.h"
+
+#if MT32EMU_API_TYPE == 2
+
+#define mt32emu_get_supported_report_handler_version i.v0->getSupportedReportHandlerVersionID
+#define mt32emu_get_supported_midi_receiver_version i.v0->getSupportedMIDIReceiverVersionID
+#define mt32emu_get_library_version_int i.v0->getLibraryVersionInt
+#define mt32emu_get_library_version_string i.v0->getLibraryVersionString
+#define mt32emu_get_stereo_output_samplerate i.v0->getStereoOutputSamplerate
+#define mt32emu_create_context i.v0->createContext
+#define mt32emu_free_context i.v0->freeContext
+#define mt32emu_add_rom_data i.v0->addROMData
+#define mt32emu_add_rom_file i.v0->addROMFile
+#define mt32emu_get_rom_info i.v0->getROMInfo
+#define mt32emu_set_partial_count i.v0->setPartialCount
+#define mt32emu_set_analog_output_mode i.v0->setAnalogOutputMode
+#define mt32emu_open_synth i.v0->openSynth
+#define mt32emu_close_synth i.v0->closeSynth
+#define mt32emu_is_open i.v0->isOpen
+#define mt32emu_get_actual_stereo_output_samplerate i.v0->getActualStereoOutputSamplerate
+#define mt32emu_flush_midi_queue i.v0->flushMIDIQueue
+#define mt32emu_set_midi_event_queue_size i.v0->setMIDIEventQueueSize
+#define mt32emu_set_midi_receiver i.v0->setMIDIReceiver
+#define mt32emu_parse_stream i.v0->parseStream
+#define mt32emu_parse_stream_at i.v0->parseStream_At
+#define mt32emu_play_short_message i.v0->playShortMessage
+#define mt32emu_play_short_message_at i.v0->playShortMessageAt
+#define mt32emu_play_msg i.v0->playMsg
+#define mt32emu_play_sysex i.v0->playSysex
+#define mt32emu_play_msg_at i.v0->playMsgAt
+#define mt32emu_play_sysex_at i.v0->playSysexAt
+#define mt32emu_play_msg_now i.v0->playMsgNow
+#define mt32emu_play_msg_on_part i.v0->playMsgOnPart
+#define mt32emu_play_sysex_now i.v0->playSysexNow
+#define mt32emu_write_sysex i.v0->writeSysex
+#define mt32emu_set_reverb_enabled i.v0->setReverbEnabled
+#define mt32emu_is_reverb_enabled i.v0->isReverbEnabled
+#define mt32emu_set_reverb_overridden i.v0->setReverbOverridden
+#define mt32emu_is_reverb_overridden i.v0->isReverbOverridden
+#define mt32emu_set_reverb_compatibility_mode i.v0->setReverbCompatibilityMode
+#define mt32emu_is_mt32_reverb_compatibility_mode i.v0->isMT32ReverbCompatibilityMode
+#define mt32emu_is_default_reverb_mt32_compatible i.v0->isDefaultReverbMT32Compatible
+#define mt32emu_set_dac_input_mode i.v0->setDACInputMode
+#define mt32emu_get_dac_input_mode i.v0->getDACInputMode
+#define mt32emu_set_midi_delay_mode i.v0->setMIDIDelayMode
+#define mt32emu_get_midi_delay_mode i.v0->getMIDIDelayMode
+#define mt32emu_set_output_gain i.v0->setOutputGain
+#define mt32emu_get_output_gain i.v0->getOutputGain
+#define mt32emu_set_reverb_output_gain i.v0->setReverbOutputGain
+#define mt32emu_get_reverb_output_gain i.v0->getReverbOutputGain
+#define mt32emu_set_reversed_stereo_enabled i.v0->setReversedStereoEnabled
+#define mt32emu_is_reversed_stereo_enabled i.v0->isReversedStereoEnabled
+#define mt32emu_render_bit16s i.v0->renderBit16s
+#define mt32emu_render_float i.v0->renderFloat
+#define mt32emu_render_bit16s_streams i.v0->renderBit16sStreams
+#define mt32emu_render_float_streams i.v0->renderFloatStreams
+#define mt32emu_has_active_partials i.v0->hasActivePartials
+#define mt32emu_is_active i.v0->isActive
+#define mt32emu_get_partial_count i.v0->getPartialCount
+#define mt32emu_get_part_states i.v0->getPartStates
+#define mt32emu_get_partial_states i.v0->getPartialStates
+#define mt32emu_get_playing_notes i.v0->getPlayingNotes
+#define mt32emu_get_patch_name i.v0->getPatchName
+#define mt32emu_read_memory i.v0->readMemory
+
+#else // #if MT32EMU_API_TYPE == 2
+
+#include "c_interface.h"
+
+#endif // #if MT32EMU_API_TYPE == 2
+
+namespace MT32Emu {
+
+namespace CppInterfaceImpl {
+
+static const mt32emu_report_handler_i NULL_REPORT_HANDLER = { NULL };
+static mt32emu_report_handler_i getReportHandlerThunk();
+static mt32emu_midi_receiver_i getMidiReceiverThunk();
+
+}
+
+/*
+ * The classes below correspond to the interfaces defined in c_types.h and provided for convenience when using C++.
+ * The approach used makes no assumption of any internal class data memory layout, since the C++ standard does not
+ * provide any detail in this area and leaves it up to the implementation. Therefore, this way portability is guaranteed,
+ * despite the implementation may be a little inefficient.
+ * See c_types.h and c_interface.h for description of the corresponding interface methods.
+ */
+
+// Defines the interface for handling reported events.
+// Corresponds to the current version of mt32emu_report_handler_i interface.
+class IReportHandler {
+public:
+ virtual void printDebug(const char *fmt, va_list list) = 0;
+ virtual void onErrorControlROM() = 0;
+ virtual void onErrorPCMROM() = 0;
+ virtual void showLCDMessage(const char *message) = 0;
+ virtual void onMIDIMessagePlayed() = 0;
+ virtual bool onMIDIQueueOverflow() = 0;
+ virtual void onMIDISystemRealtime(Bit8u system_realtime) = 0;
+ virtual void onDeviceReset() = 0;
+ virtual void onDeviceReconfig() = 0;
+ virtual void onNewReverbMode(Bit8u mode) = 0;
+ virtual void onNewReverbTime(Bit8u time) = 0;
+ virtual void onNewReverbLevel(Bit8u level) = 0;
+ virtual void onPolyStateChanged(Bit8u part_num) = 0;
+ virtual void onProgramChanged(Bit8u part_num, const char *sound_group_name, const char *patch_name) = 0;
+
+protected:
+ ~IReportHandler() {}
+};
+
+// Defines the interface for receiving MIDI messages generated by MIDI stream parser.
+// Corresponds to the current version of mt32emu_midi_receiver_i interface.
+class IMidiReceiver {
+public:
+ virtual void handleShortMessage(const Bit32u message) = 0;
+ virtual void handleSysex(const Bit8u stream[], const Bit32u length) = 0;
+ virtual void handleSystemRealtimeMessage(const Bit8u realtime) = 0;
+
+protected:
+ ~IMidiReceiver() {}
+};
+
+// Defines all the library services.
+// Corresponds to the current version of mt32emu_service_i interface.
+class Service {
+public:
+#if MT32EMU_API_TYPE == 2
+ explicit Service(mt32emu_service_i interface, mt32emu_context context = NULL) : i(interface), c(context) {}
+#else
+ explicit Service(mt32emu_context context = NULL) : c(context) {}
+#endif
+ ~Service() { if (c != NULL) mt32emu_free_context(c); }
+
+ // Context-independent methods
+
+#if MT32EMU_API_TYPE == 2
+ mt32emu_service_version getVersionID() { return i.v0->getVersionID(i); }
+#endif
+ mt32emu_report_handler_version getSupportedReportHandlerVersionID() { return mt32emu_get_supported_report_handler_version(); }
+ mt32emu_midi_receiver_version getSupportedMIDIReceiverVersionID() { return mt32emu_get_supported_midi_receiver_version(); }
+
+ Bit32u getLibraryVersionInt() { return mt32emu_get_library_version_int(); }
+ const char *getLibraryVersionString() { return mt32emu_get_library_version_string(); }
+
+ Bit32u getStereoOutputSamplerate(const AnalogOutputMode analog_output_mode) { return mt32emu_get_stereo_output_samplerate(static_cast<mt32emu_analog_output_mode>(analog_output_mode)); }
+
+ // Context-dependent methods
+
+ mt32emu_context getContext() { return c; }
+ void createContext(mt32emu_report_handler_i report_handler = CppInterfaceImpl::NULL_REPORT_HANDLER, void *instance_data = NULL) { freeContext(); c = mt32emu_create_context(report_handler, instance_data); }
+ void createContext(IReportHandler &report_handler) { createContext(CppInterfaceImpl::getReportHandlerThunk(), &report_handler); }
+ void freeContext() { if (c != NULL) { mt32emu_free_context(c); c = NULL; } }
+ mt32emu_return_code addROMData(const Bit8u *data, size_t data_size, const mt32emu_sha1_digest *sha1_digest = NULL) { return mt32emu_add_rom_data(c, data, data_size, sha1_digest); }
+ mt32emu_return_code addROMFile(const char *filename) { return mt32emu_add_rom_file(c, filename); }
+ void getROMInfo(mt32emu_rom_info *rom_info) { mt32emu_get_rom_info(c, rom_info); }
+ void setPartialCount(const Bit32u partial_count) { mt32emu_set_partial_count(c, partial_count); }
+ void setAnalogOutputMode(const AnalogOutputMode analog_output_mode) { mt32emu_set_analog_output_mode(c, static_cast<mt32emu_analog_output_mode>(analog_output_mode)); }
+ mt32emu_return_code openSynth() { return mt32emu_open_synth(c); }
+ void closeSynth() { mt32emu_close_synth(c); }
+ bool isOpen() { return mt32emu_is_open(c) != MT32EMU_BOOL_FALSE; }
+ Bit32u getActualStereoOutputSamplerate() { return mt32emu_get_actual_stereo_output_samplerate(c); }
+ void flushMIDIQueue() { mt32emu_flush_midi_queue(c); }
+ Bit32u setMIDIEventQueueSize(const Bit32u queue_size) { return mt32emu_set_midi_event_queue_size(c, queue_size); }
+ void setMIDIReceiver(mt32emu_midi_receiver_i midi_receiver, void *instance_data) { mt32emu_set_midi_receiver(c, midi_receiver, instance_data); }
+ void setMIDIReceiver(IMidiReceiver &midi_receiver) { setMIDIReceiver(CppInterfaceImpl::getMidiReceiverThunk(), &midi_receiver); }
+
+ void parseStream(const Bit8u *stream, Bit32u length) { mt32emu_parse_stream(c, stream, length); }
+ void parseStream_At(const Bit8u *stream, Bit32u length, Bit32u timestamp) { mt32emu_parse_stream_at(c, stream, length, timestamp); }
+ void playShortMessage(Bit32u message) { mt32emu_play_short_message(c, message); }
+ void playShortMessageAt(Bit32u message, Bit32u timestamp) { mt32emu_play_short_message_at(c, message, timestamp); }
+ mt32emu_return_code playMsg(Bit32u msg) { return mt32emu_play_msg(c, msg); }
+ mt32emu_return_code playSysex(const Bit8u *sysex, Bit32u len) { return mt32emu_play_sysex(c, sysex, len); }
+ mt32emu_return_code playMsgAt(Bit32u msg, Bit32u timestamp) { return mt32emu_play_msg_at(c, msg, timestamp); }
+ mt32emu_return_code playSysexAt(const Bit8u *sysex, Bit32u len, Bit32u timestamp) { return mt32emu_play_sysex_at(c, sysex, len, timestamp); }
+
+ void playMsgNow(Bit32u msg) { mt32emu_play_msg_now(c, msg); }
+ void playMsgOnPart(Bit8u part, Bit8u code, Bit8u note, Bit8u velocity) { mt32emu_play_msg_on_part(c, part, code, note, velocity); }
+ void playSysexNow(const Bit8u *sysex, Bit32u len) { mt32emu_play_sysex_now(c, sysex, len); }
+ void writeSysex(Bit8u channel, const Bit8u *sysex, Bit32u len) { mt32emu_write_sysex(c, channel, sysex, len); }
+
+ void setReverbEnabled(const bool reverb_enabled) { mt32emu_set_reverb_enabled(c, reverb_enabled ? MT32EMU_BOOL_TRUE : MT32EMU_BOOL_FALSE); }
+ bool isReverbEnabled() { return mt32emu_is_reverb_enabled(c) != MT32EMU_BOOL_FALSE; }
+ void setReverbOverridden(const bool reverb_overridden) { mt32emu_set_reverb_overridden(c, reverb_overridden ? MT32EMU_BOOL_TRUE : MT32EMU_BOOL_FALSE); }
+ bool isReverbOverridden() { return mt32emu_is_reverb_overridden(c) != MT32EMU_BOOL_FALSE; }
+ void setReverbCompatibilityMode(const bool mt32_compatible_mode) { mt32emu_set_reverb_compatibility_mode(c, mt32_compatible_mode ? MT32EMU_BOOL_TRUE : MT32EMU_BOOL_FALSE); }
+ bool isMT32ReverbCompatibilityMode() { return mt32emu_is_mt32_reverb_compatibility_mode(c) != MT32EMU_BOOL_FALSE; }
+ bool isDefaultReverbMT32Compatible() { return mt32emu_is_default_reverb_mt32_compatible(c) != MT32EMU_BOOL_FALSE; }
+
+ void setDACInputMode(const DACInputMode mode) { mt32emu_set_dac_input_mode(c, static_cast<mt32emu_dac_input_mode>(mode)); }
+ DACInputMode getDACInputMode() { return static_cast<DACInputMode>(mt32emu_get_dac_input_mode(c)); }
+
+ void setMIDIDelayMode(const MIDIDelayMode mode) { mt32emu_set_midi_delay_mode(c, static_cast<mt32emu_midi_delay_mode>(mode)); }
+ MIDIDelayMode getMIDIDelayMode() { return static_cast<MIDIDelayMode>(mt32emu_get_midi_delay_mode(c)); }
+
+ void setOutputGain(float gain) { mt32emu_set_output_gain(c, gain); }
+ float getOutputGain() { return mt32emu_get_output_gain(c); }
+ void setReverbOutputGain(float gain) { mt32emu_set_reverb_output_gain(c, gain); }
+ float getReverbOutputGain() { return mt32emu_get_reverb_output_gain(c); }
+
+ void setReversedStereoEnabled(const bool enabled) { mt32emu_set_reversed_stereo_enabled(c, enabled ? MT32EMU_BOOL_TRUE : MT32EMU_BOOL_FALSE); }
+ bool isReversedStereoEnabled() { return mt32emu_is_reversed_stereo_enabled(c) != MT32EMU_BOOL_FALSE; }
+
+ void renderBit16s(Bit16s *stream, Bit32u len) { mt32emu_render_bit16s(c, stream, len); }
+ void renderFloat(float *stream, Bit32u len) { mt32emu_render_float(c, stream, len); }
+ void renderBit16sStreams(const mt32emu_dac_output_bit16s_streams *streams, Bit32u len) { mt32emu_render_bit16s_streams(c, streams, len); }
+ void renderFloatStreams(const mt32emu_dac_output_float_streams *streams, Bit32u len) { mt32emu_render_float_streams(c, streams, len); }
+
+ bool hasActivePartials() { return mt32emu_has_active_partials(c) != MT32EMU_BOOL_FALSE; }
+ bool isActive() { return mt32emu_is_active(c) != MT32EMU_BOOL_FALSE; }
+ Bit32u getPartialCount() { return mt32emu_get_partial_count(c); }
+ Bit32u getPartStates() { return mt32emu_get_part_states(c); }
+ void getPartialStates(Bit8u *partial_states) { mt32emu_get_partial_states(c, partial_states); }
+ Bit32u getPlayingNotes(Bit8u part_number, Bit8u *keys, Bit8u *velocities) { return mt32emu_get_playing_notes(c, part_number, keys, velocities); }
+ const char *getPatchName(Bit8u part_number) { return mt32emu_get_patch_name(c, part_number); }
+ void readMemory(Bit32u addr, Bit32u len, Bit8u *data) { mt32emu_read_memory(c, addr, len, data); }
+
+private:
+#if MT32EMU_API_TYPE == 2
+ const mt32emu_service_i i;
+#endif
+ mt32emu_context c;
+};
+
+namespace CppInterfaceImpl {
+
+static mt32emu_report_handler_version getReportHandlerVersionID(mt32emu_report_handler_i) {
+ return MT32EMU_REPORT_HANDLER_VERSION_CURRENT;
+}
+
+static void printDebug(void *instance_data, const char *fmt, va_list list) {
+ ((IReportHandler *)instance_data)->printDebug(fmt, list);
+}
+
+static void onErrorControlROM(void *instance_data) {
+ ((IReportHandler *)instance_data)->onErrorControlROM();
+}
+
+static void onErrorPCMROM(void *instance_data) {
+ ((IReportHandler *)instance_data)->onErrorPCMROM();
+}
+
+static void showLCDMessage(void *instance_data, const char *message) {
+ ((IReportHandler *)instance_data)->showLCDMessage(message);
+}
+
+static void onMIDIMessagePlayed(void *instance_data) {
+ ((IReportHandler *)instance_data)->onMIDIMessagePlayed();
+}
+
+static mt32emu_boolean onMIDIQueueOverflow(void *instance_data) {
+ return ((IReportHandler *)instance_data)->onMIDIQueueOverflow() ? MT32EMU_BOOL_TRUE : MT32EMU_BOOL_FALSE;
+}
+
+static void onMIDISystemRealtime(void *instance_data, mt32emu_bit8u system_realtime) {
+ ((IReportHandler *)instance_data)->onMIDISystemRealtime(system_realtime);
+}
+
+static void onDeviceReset(void *instance_data) {
+ ((IReportHandler *)instance_data)->onDeviceReset();
+}
+
+static void onDeviceReconfig(void *instance_data) {
+ ((IReportHandler *)instance_data)->onDeviceReconfig();
+}
+
+static void onNewReverbMode(void *instance_data, mt32emu_bit8u mode) {
+ ((IReportHandler *)instance_data)->onNewReverbMode(mode);
+}
+
+static void onNewReverbTime(void *instance_data, mt32emu_bit8u time) {
+ ((IReportHandler *)instance_data)->onNewReverbTime(time);
+}
+
+static void onNewReverbLevel(void *instance_data, mt32emu_bit8u level) {
+ ((IReportHandler *)instance_data)->onNewReverbLevel(level);
+}
+
+static void onPolyStateChanged(void *instance_data, mt32emu_bit8u part_num) {
+ ((IReportHandler *)instance_data)->onPolyStateChanged(part_num);
+}
+
+static void onProgramChanged(void *instance_data, mt32emu_bit8u part_num, const char *sound_group_name, const char *patch_name) {
+ ((IReportHandler *)instance_data)->onProgramChanged(part_num, sound_group_name, patch_name);
+}
+
+static mt32emu_report_handler_i getReportHandlerThunk() {
+ static const mt32emu_report_handler_i_v0 REPORT_HANDLER_V0_THUNK = {
+ getReportHandlerVersionID,
+ printDebug,
+ onErrorControlROM,
+ onErrorPCMROM,
+ showLCDMessage,
+ onMIDIMessagePlayed,
+ onMIDIQueueOverflow,
+ onMIDISystemRealtime,
+ onDeviceReset,
+ onDeviceReconfig,
+ onNewReverbMode,
+ onNewReverbTime,
+ onNewReverbLevel,
+ onPolyStateChanged,
+ onProgramChanged
+ };
+
+ static const mt32emu_report_handler_i REPORT_HANDLER_THUNK = { &REPORT_HANDLER_V0_THUNK };
+
+ return REPORT_HANDLER_THUNK;
+}
+
+static mt32emu_midi_receiver_version getMidiReceiverVersionID(mt32emu_midi_receiver_i) {
+ return MT32EMU_MIDI_RECEIVER_VERSION_CURRENT;
+}
+
+static void handleShortMessage(void *instance_data, const mt32emu_bit32u message) {
+ ((IMidiReceiver *)instance_data)->handleShortMessage(message);
+}
+
+static void handleSysex(void *instance_data, const mt32emu_bit8u stream[], const mt32emu_bit32u length) {
+ ((IMidiReceiver *)instance_data)->handleSysex(stream, length);
+}
+
+static void handleSystemRealtimeMessage(void *instance_data, const mt32emu_bit8u realtime) {
+ ((IMidiReceiver *)instance_data)->handleSystemRealtimeMessage(realtime);
+}
+
+static mt32emu_midi_receiver_i getMidiReceiverThunk() {
+ static const mt32emu_midi_receiver_i_v0 MIDI_RECEIVER_V0_THUNK = {
+ getMidiReceiverVersionID,
+ handleShortMessage,
+ handleSysex,
+ handleSystemRealtimeMessage
+ };
+
+ static const mt32emu_midi_receiver_i MIDI_RECEIVER_THUNK = { &MIDI_RECEIVER_V0_THUNK };
+
+ return MIDI_RECEIVER_THUNK;
+}
+
+} // namespace CppInterfaceImpl
+
+} // namespace MT32Emu
+
+#if MT32EMU_API_TYPE == 2
+
+#undef mt32emu_get_supported_report_handler_version
+#undef mt32emu_get_supported_midi_receiver_version
+#undef mt32emu_get_library_version_int
+#undef mt32emu_get_library_version_string
+#undef mt32emu_get_stereo_output_samplerate
+#undef mt32emu_create_context
+#undef mt32emu_free_context
+#undef mt32emu_add_rom_data
+#undef mt32emu_add_rom_file
+#undef mt32emu_get_rom_info
+#undef mt32emu_set_partial_count
+#undef mt32emu_set_analog_output_mode
+#undef mt32emu_open_synth
+#undef mt32emu_close_synth
+#undef mt32emu_is_open
+#undef mt32emu_get_actual_stereo_output_samplerate
+#undef mt32emu_flush_midi_queue
+#undef mt32emu_set_midi_event_queue_size
+#undef mt32emu_set_midi_receiver
+#undef mt32emu_parse_stream
+#undef mt32emu_parse_stream_at
+#undef mt32emu_play_short_message
+#undef mt32emu_play_short_message_at
+#undef mt32emu_play_msg
+#undef mt32emu_play_sysex
+#undef mt32emu_play_msg_at
+#undef mt32emu_play_sysex_at
+#undef mt32emu_play_msg_now
+#undef mt32emu_play_msg_on_part
+#undef mt32emu_play_sysex_now
+#undef mt32emu_write_sysex
+#undef mt32emu_set_reverb_enabled
+#undef mt32emu_is_reverb_enabled
+#undef mt32emu_set_reverb_overridden
+#undef mt32emu_is_reverb_overridden
+#undef mt32emu_set_reverb_compatibility_mode
+#undef mt32emu_is_mt32_reverb_compatibility_mode
+#undef mt32emu_is_default_reverb_mt32_compatible
+#undef mt32emu_set_dac_input_mode
+#undef mt32emu_get_dac_input_mode
+#undef mt32emu_set_midi_delay_mode
+#undef mt32emu_get_midi_delay_mode
+#undef mt32emu_set_output_gain
+#undef mt32emu_get_output_gain
+#undef mt32emu_set_reverb_output_gain
+#undef mt32emu_get_reverb_output_gain
+#undef mt32emu_set_reversed_stereo_enabled
+#undef mt32emu_is_reversed_stereo_enabled
+#undef mt32emu_render_bit16s
+#undef mt32emu_render_float
+#undef mt32emu_render_bit16s_streams
+#undef mt32emu_render_float_streams
+#undef mt32emu_has_active_partials
+#undef mt32emu_is_active
+#undef mt32emu_get_partial_count
+#undef mt32emu_get_part_states
+#undef mt32emu_get_partial_states
+#undef mt32emu_get_playing_notes
+#undef mt32emu_get_patch_name
+#undef mt32emu_read_memory
+
+#endif // #if MT32EMU_API_TYPE == 2
+
+#endif /* #ifndef MT32EMU_CPP_INTERFACE_H */
diff --git a/audio/softsynth/mt32/config.h b/audio/softsynth/mt32/config.h
new file mode 100644
index 0000000000..779cc4d4b3
--- /dev/null
+++ b/audio/softsynth/mt32/config.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MT32EMU_CONFIG_H
+#define MT32EMU_CONFIG_H
+
+#define MT32EMU_VERSION "2.0.0"
+#define MT32EMU_VERSION_MAJOR 2
+#define MT32EMU_VERSION_MINOR 0
+#define MT32EMU_VERSION_PATCH 0
+
+#define MT32EMU_EXPORTS_TYPE 3
+
+#endif
diff --git a/audio/softsynth/mt32/globals.h b/audio/softsynth/mt32/globals.h
new file mode 100755
index 0000000000..49a5ecc250
--- /dev/null
+++ b/audio/softsynth/mt32/globals.h
@@ -0,0 +1,119 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MT32EMU_GLOBALS_H
+#define MT32EMU_GLOBALS_H
+
+#include "config.h"
+
+/* Support for compiling shared library. */
+#ifdef MT32EMU_SHARED
+#if defined _WIN32 || defined __CYGWIN__
+#ifdef _MSC_VER
+#ifdef mt32emu_EXPORTS
+#define MT32EMU_EXPORT_ATTRIBUTE _declspec(dllexport)
+#else /* #ifdef mt32emu_EXPORTS */
+#define MT32EMU_EXPORT_ATTRIBUTE _declspec(dllimport)
+#endif /* #ifdef mt32emu_EXPORTS */
+#else /* #ifdef _MSC_VER */
+#ifdef mt32emu_EXPORTS
+#define MT32EMU_EXPORT_ATTRIBUTE __attribute__ ((dllexport))
+#else /* #ifdef mt32emu_EXPORTS */
+#define MT32EMU_EXPORT_ATTRIBUTE __attribute__ ((dllimport))
+#endif /* #ifdef mt32emu_EXPORTS */
+#endif /* #ifdef _MSC_VER */
+#else /* #if defined _WIN32 || defined __CYGWIN__ */
+#define MT32EMU_EXPORT_ATTRIBUTE __attribute__ ((visibility("default")))
+#endif /* #if defined _WIN32 || defined __CYGWIN__ */
+#else /* #ifdef MT32EMU_SHARED */
+#define MT32EMU_EXPORT_ATTRIBUTE
+#endif /* #ifdef MT32EMU_SHARED */
+
+#if MT32EMU_EXPORTS_TYPE == 1 || MT32EMU_EXPORTS_TYPE == 2
+#define MT32EMU_EXPORT
+#else
+#define MT32EMU_EXPORT MT32EMU_EXPORT_ATTRIBUTE
+#endif
+
+/* Useful constants */
+
+/* Sample rate to use in mixing. With the progress of development, we've found way too many thing dependent.
+ * In order to achieve further advance in emulation accuracy, sample rate made fixed throughout the emulator,
+ * except the emulation of analogue path.
+ * The output from the synth is supposed to be resampled externally in order to convert to the desired sample rate.
+ */
+#define MT32EMU_SAMPLE_RATE 32000
+
+/* The default value for the maximum number of partials playing simultaneously. */
+#define MT32EMU_DEFAULT_MAX_PARTIALS 32
+
+/* The higher this number, the more memory will be used, but the more samples can be processed in one run -
+ * various parts of sample generation can be processed more efficiently in a single run.
+ * A run's maximum length is that given to Synth::render(), so giving a value here higher than render() is ever
+ * called with will give no gain (but simply waste the memory).
+ * Note that this value does *not* in any way impose limitations on the length given to render(), and has no effect
+ * on the generated audio.
+ * This value must be >= 1.
+ */
+#define MT32EMU_MAX_SAMPLES_PER_RUN 4096
+
+/* The default size of the internal MIDI event queue.
+ * It holds the incoming MIDI events before the rendering engine actually processes them.
+ * The main goal is to fairly emulate the real hardware behaviour which obviously
+ * uses an internal MIDI event queue to gather incoming data as well as the delays
+ * introduced by transferring data via the MIDI interface.
+ * This also facilitates building of an external rendering loop
+ * as the queue stores timestamped MIDI events.
+ */
+#define MT32EMU_DEFAULT_MIDI_EVENT_QUEUE_SIZE 1024
+
+/* Maximum allowed size of MIDI parser input stream buffer.
+ * Should suffice for any reasonable bulk dump SysEx, as the h/w units have only 32K of RAM onboard.
+ */
+#define MT32EMU_MAX_STREAM_BUFFER_SIZE 32768
+
+/* This should correspond to the MIDI buffer size used in real h/w devices.
+ * CM-32L control ROM seems using 1000 bytes, old MT-32 isn't confirmed by now.
+ */
+#define MT32EMU_SYSEX_BUFFER_SIZE 1000
+
+#if defined(__cplusplus) && MT32EMU_API_TYPE != 1
+
+namespace MT32Emu
+{
+const unsigned int SAMPLE_RATE = MT32EMU_SAMPLE_RATE;
+#undef MT32EMU_SAMPLE_RATE
+
+const unsigned int DEFAULT_MAX_PARTIALS = MT32EMU_DEFAULT_MAX_PARTIALS;
+#undef MT32EMU_DEFAULT_MAX_PARTIALS
+
+const unsigned int MAX_SAMPLES_PER_RUN = MT32EMU_MAX_SAMPLES_PER_RUN;
+#undef MT32EMU_MAX_SAMPLES_PER_RUN
+
+const unsigned int DEFAULT_MIDI_EVENT_QUEUE_SIZE = MT32EMU_DEFAULT_MIDI_EVENT_QUEUE_SIZE;
+#undef MT32EMU_DEFAULT_MIDI_EVENT_QUEUE_SIZE
+
+const unsigned int MAX_STREAM_BUFFER_SIZE = MT32EMU_MAX_STREAM_BUFFER_SIZE;
+#undef MT32EMU_MAX_STREAM_BUFFER_SIZE
+
+const unsigned int SYSEX_BUFFER_SIZE = MT32EMU_SYSEX_BUFFER_SIZE;
+#undef MT32EMU_SYSEX_BUFFER_SIZE
+}
+
+#endif /* #if defined(__cplusplus) && MT32EMU_API_TYPE != 1 */
+
+#endif /* #ifndef MT32EMU_GLOBALS_H */
diff --git a/audio/softsynth/mt32/internals.h b/audio/softsynth/mt32/internals.h
index ef56819a42..c64ba39212 100644..100755
--- a/audio/softsynth/mt32/internals.h
+++ b/audio/softsynth/mt32/internals.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,66 +18,111 @@
#ifndef MT32EMU_INTERNALS_H
#define MT32EMU_INTERNALS_H
+#include "Types.h"
+
// Debugging
// 0: Standard debug output is not stamped with the rendered sample count
// 1: Standard debug output is stamped with the rendered sample count
// NOTE: The "samplestamp" corresponds to the end of the last completed rendering run.
// This is important to bear in mind for debug output that occurs during a run.
+#ifndef MT32EMU_DEBUG_SAMPLESTAMPS
#define MT32EMU_DEBUG_SAMPLESTAMPS 0
+#endif
// 0: No debug output for initialisation progress
// 1: Debug output for initialisation progress
+#ifndef MT32EMU_MONITOR_INIT
#define MT32EMU_MONITOR_INIT 0
+#endif
// 0: No debug output for MIDI events
// 1: Debug output for weird MIDI events
+#ifndef MT32EMU_MONITOR_MIDI
#define MT32EMU_MONITOR_MIDI 0
+#endif
// 0: No debug output for note on/off
// 1: Basic debug output for note on/off
// 2: Comprehensive debug output for note on/off
+#ifndef MT32EMU_MONITOR_INSTRUMENTS
#define MT32EMU_MONITOR_INSTRUMENTS 0
+#endif
// 0: No debug output for partial allocations
// 1: Show partial stats when an allocation fails
// 2: Show partial stats with every new poly
// 3: Show individual partial allocations/deactivations
+#ifndef MT32EMU_MONITOR_PARTIALS
#define MT32EMU_MONITOR_PARTIALS 0
+#endif
// 0: No debug output for sysex
// 1: Basic debug output for sysex
+#ifndef MT32EMU_MONITOR_SYSEX
#define MT32EMU_MONITOR_SYSEX 0
+#endif
// 0: No debug output for sysex writes to the timbre areas
// 1: Debug output with the name and location of newly-written timbres
// 2: Complete dump of timbre parameters for newly-written timbres
+#ifndef MT32EMU_MONITOR_TIMBRES
#define MT32EMU_MONITOR_TIMBRES 0
+#endif
// 0: No TVA/TVF-related debug output.
// 1: Shows changes to TVA/TVF target, increment and phase.
+#ifndef MT32EMU_MONITOR_TVA
#define MT32EMU_MONITOR_TVA 0
+#endif
+#ifndef MT32EMU_MONITOR_TVF
#define MT32EMU_MONITOR_TVF 0
+#endif
// Configuration
+// 0: Use 16-bit signed samples and refined wave generator based on logarithmic fixed-point computations and LUTs. Maximum emulation accuracy and speed.
+// 1: Use float samples in the wave generator and renderer. Maximum output quality and minimum noise.
+#ifndef MT32EMU_USE_FLOAT_SAMPLES
+#define MT32EMU_USE_FLOAT_SAMPLES 0
+#endif
+
// If non-zero, deletes reverb buffers that are not in use to save memory.
// If zero, keeps reverb buffers for all modes around all the time to avoid allocating/freeing in the critical path.
+#ifndef MT32EMU_REDUCE_REVERB_MEMORY
#define MT32EMU_REDUCE_REVERB_MEMORY 1
+#endif
// 0: Maximum speed at the cost of a bit lower emulation accuracy.
// 1: Maximum achievable emulation accuracy.
+#ifndef MT32EMU_BOSS_REVERB_PRECISE_MODE
#define MT32EMU_BOSS_REVERB_PRECISE_MODE 0
+#endif
-#include "Structures.h"
-#include "Tables.h"
-#include "Poly.h"
-#include "LA32Ramp.h"
-#include "LA32WaveGenerator.h"
-#include "TVA.h"
-#include "TVP.h"
-#include "TVF.h"
-#include "Partial.h"
-#include "Part.h"
+namespace MT32Emu {
+enum PolyState {
+ POLY_Playing,
+ POLY_Held, // This marks keys that have been released on the keyboard, but are being held by the pedal
+ POLY_Releasing,
+ POLY_Inactive
+};
+
+enum ReverbMode {
+ REVERB_MODE_ROOM,
+ REVERB_MODE_HALL,
+ REVERB_MODE_PLATE,
+ REVERB_MODE_TAP_DELAY
+};
+
+#if MT32EMU_USE_FLOAT_SAMPLES
+typedef float Sample;
+typedef float SampleEx;
+#else
+typedef Bit16s Sample;
+typedef Bit32s SampleEx;
#endif
+
+}
+
+#endif // #ifndef MT32EMU_INTERNALS_H
diff --git a/audio/softsynth/mt32/mmath.h b/audio/softsynth/mt32/mmath.h
index 602242e74f..f233bedcbb 100644..100755
--- a/audio/softsynth/mt32/mmath.h
+++ b/audio/softsynth/mt32/mmath.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,12 +18,7 @@
#ifndef MT32EMU_MMATH_H
#define MT32EMU_MMATH_H
-#define FIXEDPOINT_UDIV(x, y, point) (((x) << (point)) / ((y)))
-#define FIXEDPOINT_SDIV(x, y, point) (((x) * (1 << point)) / ((y)))
-#define FIXEDPOINT_UMULT(x, y, point) (((x) * (y)) >> point)
-#define FIXEDPOINT_SMULT(x, y, point) (((x) * (y)) / (1 << point))
-
-#define FIXEDPOINT_MAKE(x, point) ((Bit32u)((1 << point) * x))
+#include <cmath>
namespace MT32Emu {
@@ -46,7 +41,7 @@ static inline float EXPF(float x) {
static inline float EXP2F(float x) {
#ifdef __APPLE__
// on OSX exp2f() is 1.59 times faster than "exp() and the multiplication with FLOAT_LN_2"
- return exp2(x);
+ return exp2f(x);
#else
return exp(FLOAT_LN_2 * x);
#endif
@@ -68,6 +63,6 @@ static inline float LOG10F(float x) {
return log10(x);
}
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_MMATH_H
diff --git a/audio/softsynth/mt32/module.mk b/audio/softsynth/mt32/module.mk
index f966da8d08..1a27492c2a 100644
--- a/audio/softsynth/mt32/module.mk
+++ b/audio/softsynth/mt32/module.mk
@@ -3,8 +3,11 @@ MODULE := audio/softsynth/mt32
MODULE_OBJS := \
Analog.o \
BReverbModel.o \
+ File.o \
+ FileStream.o \
LA32Ramp.o \
LA32WaveGenerator.o \
+ MidiStreamParser.o \
Part.o \
Partial.o \
PartialManager.o \
@@ -14,7 +17,9 @@ MODULE_OBJS := \
Tables.o \
TVA.o \
TVF.o \
- TVP.o
+ TVP.o \
+ sha1/sha1.o \
+ c_interface/c_interface.o
# Include common rules
include $(srcdir)/rules.mk
diff --git a/audio/softsynth/mt32/mt32emu.h b/audio/softsynth/mt32/mt32emu.h
index 1574c08f0d..9f2b058250 100644..100755
--- a/audio/softsynth/mt32/mt32emu.h
+++ b/audio/softsynth/mt32/mt32emu.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,44 +18,66 @@
#ifndef MT32EMU_MT32EMU_H
#define MT32EMU_MT32EMU_H
-// Configuration
-
-// 0: Use 16-bit signed samples and refined wave generator based on logarithmic fixed-point computations and LUTs. Maximum emulation accuracy and speed.
-// 1: Use float samples in the wave generator and renderer. Maximum output quality and minimum noise.
-#define MT32EMU_USE_FLOAT_SAMPLES 0
-
-namespace MT32Emu
-{
-// Sample rate to use in mixing. With the progress of development, we've found way too many thing dependent.
-// In order to achieve further advance in emulation accuracy, sample rate made fixed throughout the emulator,
-// except the emulation of analogue path.
-// The output from the synth is supposed to be resampled externally in order to convert to the desired sample rate.
-const unsigned int SAMPLE_RATE = 32000;
-
-// The default value for the maximum number of partials playing simultaneously.
-const unsigned int DEFAULT_MAX_PARTIALS = 32;
-
-// The higher this number, the more memory will be used, but the more samples can be processed in one run -
-// various parts of sample generation can be processed more efficiently in a single run.
-// A run's maximum length is that given to Synth::render(), so giving a value here higher than render() is ever
-// called with will give no gain (but simply waste the memory).
-// Note that this value does *not* in any way impose limitations on the length given to render(), and has no effect
-// on the generated audio.
-// This value must be >= 1.
-const unsigned int MAX_SAMPLES_PER_RUN = 4096;
-
-// The default size of the internal MIDI event queue.
-// It holds the incoming MIDI events before the rendering engine actually processes them.
-// The main goal is to fairly emulate the real hardware behaviour which obviously
-// uses an internal MIDI event queue to gather incoming data as well as the delays
-// introduced by transferring data via the MIDI interface.
-// This also facilitates building of an external rendering loop
-// as the queue stores timestamped MIDI events.
-const unsigned int DEFAULT_MIDI_EVENT_QUEUE_SIZE = 1024;
-}
+#include "config.h"
+
+/* API Configuration */
+
+/* 0: Use full-featured C++ API. Well suitable when the library is to be linked statically.
+ * When the library is shared, ABI compatibility may be an issue. Therefore, it should
+ * only be used within a project comprising of several modules to share the library code.
+ * 1: Use C-compatible API. Make the library looks as a regular C library with well-defined ABI.
+ * This is also crucial when the library is to be linked with modules in a different
+ * language, either statically or dynamically.
+ * 2: Use plugin-like API via C-interface wrapped in a C++ class. This is mainly intended
+ * for a shared library being dynamically loaded in run-time. To get access to all the library
+ * services, a client application only needs to bind with a single factory function.
+ * 3: Use optimised C++ API compatible with the plugin API (type 2). The facade class also wraps
+ * the C functions but they are invoked directly. This enables the compiler to generate better
+ * code for the library when linked statically yet being consistent with the plugin-like API.
+ */
+
+#ifdef MT32EMU_API_TYPE
+#if MT32EMU_API_TYPE == 0 && (MT32EMU_EXPORTS_TYPE == 1 || MT32EMU_EXPORTS_TYPE == 2)
+#error Incompatible setting MT32EMU_API_TYPE=0
+#elif MT32EMU_API_TYPE == 1 && (MT32EMU_EXPORTS_TYPE == 0 || MT32EMU_EXPORTS_TYPE == 2)
+#error Incompatible setting MT32EMU_API_TYPE=1
+#elif MT32EMU_API_TYPE == 2 && (MT32EMU_EXPORTS_TYPE == 0)
+#error Incompatible setting MT32EMU_API_TYPE=2
+#elif MT32EMU_API_TYPE == 3 && (MT32EMU_EXPORTS_TYPE == 0)
+#error Incompatible setting MT32EMU_API_TYPE=3
+#endif
+#else /* #ifdef MT32EMU_API_TYPE */
+#if 0 < MT32EMU_EXPORTS_TYPE && MT32EMU_EXPORTS_TYPE < 3
+#define MT32EMU_API_TYPE MT32EMU_EXPORTS_TYPE
+#else
+#define MT32EMU_API_TYPE 0
+#endif
+#endif /* #ifdef MT32EMU_API_TYPE */
+
+/* MT32EMU_SHARED should be defined when building shared library, especially for Windows platforms. */
+/*
+#define MT32EMU_SHARED
+*/
+
+#include "globals.h"
+
+#if !defined(__cplusplus) || MT32EMU_API_TYPE == 1
+
+#include "c_interface/c_interface.h"
+
+#elif MT32EMU_API_TYPE == 2 || MT32EMU_API_TYPE == 3
+
+#include "c_interface/cpp_interface.h"
+
+#else /* #if !defined(__cplusplus) || MT32EMU_API_TYPE == 1 */
#include "Types.h"
+#include "File.h"
+#include "FileStream.h"
#include "ROMInfo.h"
#include "Synth.h"
+#include "MidiStreamParser.h"
-#endif
+#endif /* #if !defined(__cplusplus) || MT32EMU_API_TYPE == 1 */
+
+#endif /* #ifndef MT32EMU_MT32EMU_H */
diff --git a/audio/softsynth/mt32/sha1/sha1.cpp b/audio/softsynth/mt32/sha1/sha1.cpp
new file mode 100755
index 0000000000..9b91cd9f29
--- /dev/null
+++ b/audio/softsynth/mt32/sha1/sha1.cpp
@@ -0,0 +1,185 @@
+/*
+ Copyright (c) 2011, Micael Hildenborg
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of Micael Hildenborg nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY Micael Hildenborg ''AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL Micael Hildenborg BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ Contributors:
+ Gustav
+ Several members in the gamedev.se forum.
+ Gregory Petrosyan
+ */
+
+#include "sha1.h"
+
+namespace sha1
+{
+ namespace // local
+ {
+ // Rotate an integer value to left.
+ inline unsigned int rol(const unsigned int value,
+ const unsigned int steps)
+ {
+ return ((value << steps) | (value >> (32 - steps)));
+ }
+
+ // Sets the first 16 integers in the buffert to zero.
+ // Used for clearing the W buffert.
+ inline void clearWBuffert(unsigned int* buffert)
+ {
+ for (int pos = 16; --pos >= 0;)
+ {
+ buffert[pos] = 0;
+ }
+ }
+
+ void innerHash(unsigned int* result, unsigned int* w)
+ {
+ unsigned int a = result[0];
+ unsigned int b = result[1];
+ unsigned int c = result[2];
+ unsigned int d = result[3];
+ unsigned int e = result[4];
+
+ int round = 0;
+
+ #define sha1macro(func,val) \
+ { \
+ const unsigned int t = rol(a, 5) + (func) + e + val + w[round]; \
+ e = d; \
+ d = c; \
+ c = rol(b, 30); \
+ b = a; \
+ a = t; \
+ }
+
+ while (round < 16)
+ {
+ sha1macro((b & c) | (~b & d), 0x5a827999)
+ ++round;
+ }
+ while (round < 20)
+ {
+ w[round] = rol((w[round - 3] ^ w[round - 8] ^ w[round - 14] ^ w[round - 16]), 1);
+ sha1macro((b & c) | (~b & d), 0x5a827999)
+ ++round;
+ }
+ while (round < 40)
+ {
+ w[round] = rol((w[round - 3] ^ w[round - 8] ^ w[round - 14] ^ w[round - 16]), 1);
+ sha1macro(b ^ c ^ d, 0x6ed9eba1)
+ ++round;
+ }
+ while (round < 60)
+ {
+ w[round] = rol((w[round - 3] ^ w[round - 8] ^ w[round - 14] ^ w[round - 16]), 1);
+ sha1macro((b & c) | (b & d) | (c & d), 0x8f1bbcdc)
+ ++round;
+ }
+ while (round < 80)
+ {
+ w[round] = rol((w[round - 3] ^ w[round - 8] ^ w[round - 14] ^ w[round - 16]), 1);
+ sha1macro(b ^ c ^ d, 0xca62c1d6)
+ ++round;
+ }
+
+ #undef sha1macro
+
+ result[0] += a;
+ result[1] += b;
+ result[2] += c;
+ result[3] += d;
+ result[4] += e;
+ }
+ } // namespace
+
+ void calc(const void* src, const int bytelength, unsigned char* hash)
+ {
+ // Init the result array.
+ unsigned int result[5] = { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 };
+
+ // Cast the void src pointer to be the byte array we can work with.
+ const unsigned char* sarray = static_cast<const unsigned char*>(src);
+
+ // The reusable round buffer
+ unsigned int w[80];
+
+ // Loop through all complete 64byte blocks.
+ const int endOfFullBlocks = bytelength - 64;
+ int endCurrentBlock;
+ int currentBlock = 0;
+
+ while (currentBlock <= endOfFullBlocks)
+ {
+ endCurrentBlock = currentBlock + 64;
+
+ // Init the round buffer with the 64 byte block data.
+ for (int roundPos = 0; currentBlock < endCurrentBlock; currentBlock += 4)
+ {
+ // This line will swap endian on big endian and keep endian on little endian.
+ w[roundPos++] = static_cast<unsigned int>(sarray[currentBlock + 3])
+ | (static_cast<unsigned int>(sarray[currentBlock + 2]) << 8)
+ | (static_cast<unsigned int>(sarray[currentBlock + 1]) << 16)
+ | (static_cast<unsigned int>(sarray[currentBlock]) << 24);
+ }
+ innerHash(result, w);
+ }
+
+ // Handle the last and not full 64 byte block if existing.
+ endCurrentBlock = bytelength - currentBlock;
+ clearWBuffert(w);
+ int lastBlockBytes = 0;
+ for (;lastBlockBytes < endCurrentBlock; ++lastBlockBytes)
+ {
+ w[lastBlockBytes >> 2] |= static_cast<unsigned int>(sarray[lastBlockBytes + currentBlock]) << ((3 - (lastBlockBytes & 3)) << 3);
+ }
+ w[lastBlockBytes >> 2] |= 0x80 << ((3 - (lastBlockBytes & 3)) << 3);
+ if (endCurrentBlock >= 56)
+ {
+ innerHash(result, w);
+ clearWBuffert(w);
+ }
+ w[15] = bytelength << 3;
+ innerHash(result, w);
+
+ // Store hash in result pointer, and make sure we get in in the correct order on both endian models.
+ for (int hashByte = 20; --hashByte >= 0;)
+ {
+ hash[hashByte] = (result[hashByte >> 2] >> (((3 - hashByte) & 0x3) << 3)) & 0xff;
+ }
+ }
+
+ void toHexString(const unsigned char* hash, char* hexstring)
+ {
+ const char hexDigits[] = { "0123456789abcdef" };
+
+ for (int hashByte = 20; --hashByte >= 0;)
+ {
+ hexstring[hashByte << 1] = hexDigits[(hash[hashByte] >> 4) & 0xf];
+ hexstring[(hashByte << 1) + 1] = hexDigits[hash[hashByte] & 0xf];
+ }
+ hexstring[40] = 0;
+ }
+} // namespace sha1
diff --git a/audio/softsynth/mt32/sha1/sha1.h b/audio/softsynth/mt32/sha1/sha1.h
new file mode 100755
index 0000000000..96d8ce4da6
--- /dev/null
+++ b/audio/softsynth/mt32/sha1/sha1.h
@@ -0,0 +1,49 @@
+/*
+ Copyright (c) 2011, Micael Hildenborg
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of Micael Hildenborg nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY Micael Hildenborg ''AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL Micael Hildenborg BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SHA1_DEFINED
+#define SHA1_DEFINED
+
+namespace sha1
+{
+
+ /**
+ @param src points to any kind of data to be hashed.
+ @param bytelength the number of bytes to hash from the src pointer.
+ @param hash should point to a buffer of at least 20 bytes of size for storing the sha1 result in.
+ */
+ void calc(const void* src, const int bytelength, unsigned char* hash);
+
+ /**
+ @param hash is 20 bytes of sha1 hash. This is the same data that is the result from the calc function.
+ @param hexstring should point to a buffer of at least 41 bytes of size for storing the hexadecimal representation of the hash. A zero will be written at position 40, so the buffer will be a valid zero ended string.
+ */
+ void toHexString(const unsigned char* hash, char* hexstring);
+
+} // namespace sha1
+
+#endif // SHA1_DEFINED
diff --git a/backends/cloud/box/boxstorage.cpp b/backends/cloud/box/boxstorage.cpp
index 598ca55c15..fb01521016 100644
--- a/backends/cloud/box/boxstorage.cpp
+++ b/backends/cloud/box/boxstorage.cpp
@@ -67,8 +67,8 @@ void BoxStorage::loadKeyAndSecret() {
#endif
}
-BoxStorage::BoxStorage(Common::String accessToken, Common::String refreshToken):
- _token(accessToken), _refreshToken(refreshToken) {}
+BoxStorage::BoxStorage(Common::String token, Common::String refreshToken):
+ _token(token), _refreshToken(refreshToken) {}
BoxStorage::BoxStorage(Common::String code) {
getAccessToken(
@@ -191,36 +191,36 @@ void BoxStorage::infoInnerCallback(StorageInfoCallback outerCallback, Networking
return;
}
- Common::JSONObject info = json->asObject();
+ Common::JSONObject jsonInfo = json->asObject();
- Common::String uid, name, email;
+ Common::String uid, displayName, email;
uint64 quotaUsed = 0, quotaAllocated = 0;
// can check that "type": "user"
// there is also "max_upload_size", "phone" and "avatar_url"
- if (Networking::CurlJsonRequest::jsonContainsString(info, "id", "BoxStorage::infoInnerCallback"))
- uid = info.getVal("id")->asString();
+ if (Networking::CurlJsonRequest::jsonContainsString(jsonInfo, "id", "BoxStorage::infoInnerCallback"))
+ uid = jsonInfo.getVal("id")->asString();
- if (Networking::CurlJsonRequest::jsonContainsString(info, "name", "BoxStorage::infoInnerCallback"))
- name = info.getVal("name")->asString();
+ if (Networking::CurlJsonRequest::jsonContainsString(jsonInfo, "name", "BoxStorage::infoInnerCallback"))
+ displayName = jsonInfo.getVal("name")->asString();
- if (Networking::CurlJsonRequest::jsonContainsString(info, "login", "BoxStorage::infoInnerCallback"))
- email = info.getVal("login")->asString();
+ if (Networking::CurlJsonRequest::jsonContainsString(jsonInfo, "login", "BoxStorage::infoInnerCallback"))
+ email = jsonInfo.getVal("login")->asString();
- if (Networking::CurlJsonRequest::jsonContainsIntegerNumber(info, "space_amount", "BoxStorage::infoInnerCallback"))
- quotaAllocated = info.getVal("space_amount")->asIntegerNumber();
+ if (Networking::CurlJsonRequest::jsonContainsIntegerNumber(jsonInfo, "space_amount", "BoxStorage::infoInnerCallback"))
+ quotaAllocated = jsonInfo.getVal("space_amount")->asIntegerNumber();
- if (Networking::CurlJsonRequest::jsonContainsIntegerNumber(info, "space_used", "BoxStorage::infoInnerCallback"))
- quotaUsed = info.getVal("space_used")->asIntegerNumber();
+ if (Networking::CurlJsonRequest::jsonContainsIntegerNumber(jsonInfo, "space_used", "BoxStorage::infoInnerCallback"))
+ quotaUsed = jsonInfo.getVal("space_used")->asIntegerNumber();
Common::String username = email;
- if (username == "") username = name;
+ if (username == "") username = displayName;
if (username == "") username = uid;
CloudMan.setStorageUsername(kStorageBoxId, username);
if (outerCallback) {
- (*outerCallback)(StorageInfoResponse(nullptr, StorageInfo(uid, name, email, quotaUsed, quotaAllocated)));
+ (*outerCallback)(StorageInfoResponse(nullptr, StorageInfo(uid, displayName, email, quotaUsed, quotaAllocated)));
delete outerCallback;
}
@@ -245,8 +245,8 @@ void BoxStorage::createDirectoryInnerCallback(BoolCallback outerCallback, Networ
if (outerCallback) {
if (Networking::CurlJsonRequest::jsonIsObject(json, "BoxStorage::createDirectoryInnerCallback")) {
- Common::JSONObject info = json->asObject();
- (*outerCallback)(BoolResponse(nullptr, info.contains("id")));
+ Common::JSONObject jsonInfo = json->asObject();
+ (*outerCallback)(BoolResponse(nullptr, jsonInfo.contains("id")));
} else {
(*outerCallback)(BoolResponse(nullptr, false));
}
@@ -256,7 +256,7 @@ void BoxStorage::createDirectoryInnerCallback(BoolCallback outerCallback, Networ
delete json;
}
-Networking::Request *BoxStorage::createDirectoryWithParentId(Common::String parentId, Common::String name, BoolCallback callback, Networking::ErrorCallback errorCallback) {
+Networking::Request *BoxStorage::createDirectoryWithParentId(Common::String parentId, Common::String directoryName, BoolCallback callback, Networking::ErrorCallback errorCallback) {
if (!errorCallback)
errorCallback = getErrorPrintingCallback();
@@ -270,7 +270,7 @@ Networking::Request *BoxStorage::createDirectoryWithParentId(Common::String pare
parentObject.setVal("id", new Common::JSONValue(parentId));
Common::JSONObject jsonRequestParameters;
- jsonRequestParameters.setVal("name", new Common::JSONValue(name));
+ jsonRequestParameters.setVal("name", new Common::JSONValue(directoryName));
jsonRequestParameters.setVal("parent", new Common::JSONValue(parentObject));
Common::JSONValue value(jsonRequestParameters);
diff --git a/backends/cloud/box/boxstorage.h b/backends/cloud/box/boxstorage.h
index 27bf60e39b..a641669b2a 100644
--- a/backends/cloud/box/boxstorage.h
+++ b/backends/cloud/box/boxstorage.h
@@ -74,7 +74,7 @@ public:
/** Public Cloud API comes down there. */
virtual Networking::Request *listDirectoryById(Common::String id, ListDirectoryCallback callback, Networking::ErrorCallback errorCallback);
- virtual Networking::Request *createDirectoryWithParentId(Common::String parentId, Common::String name, BoolCallback callback, Networking::ErrorCallback errorCallback);
+ virtual Networking::Request *createDirectoryWithParentId(Common::String parentId, Common::String directoryName, BoolCallback callback, Networking::ErrorCallback errorCallback);
/** Returns UploadStatus struct with info about uploaded file. */
virtual Networking::Request *upload(Common::String remotePath, Common::String localPath, UploadCallback callback, Networking::ErrorCallback errorCallback);
diff --git a/backends/cloud/cloudmanager.cpp b/backends/cloud/cloudmanager.cpp
index 5f7d6942ca..4fb38ad779 100644
--- a/backends/cloud/cloudmanager.cpp
+++ b/backends/cloud/cloudmanager.cpp
@@ -272,6 +272,8 @@ void CloudManager::connectStorage(uint32 index, Common::String code) {
// when the token is received, they call replaceStorage()
// or removeStorage(), if some error occurred
// thus, no memory leak happens
+
+ // FIXME: storage is set, but never used. Should it be returned from this function for class variable _storages?
}
Networking::Request *CloudManager::listDirectory(Common::String path, Storage::ListDirectoryCallback callback, Networking::ErrorCallback errorCallback, bool recursive) {
diff --git a/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp b/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp
index 411e367a9d..d6937d9cb2 100644
--- a/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp
+++ b/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp
@@ -52,8 +52,8 @@ void DropboxCreateDirectoryRequest::start() {
_ignoreCallback = false;
Networking::JsonCallback innerCallback = new Common::Callback<DropboxCreateDirectoryRequest, Networking::JsonResponse>(this, &DropboxCreateDirectoryRequest::responseCallback);
- Networking::ErrorCallback errorCallback = new Common::Callback<DropboxCreateDirectoryRequest, Networking::ErrorResponse>(this, &DropboxCreateDirectoryRequest::errorCallback);
- Networking::CurlJsonRequest *request = new Networking::CurlJsonRequest(innerCallback, errorCallback, DROPBOX_API_CREATE_FOLDER);
+ Networking::ErrorCallback errorResponseCallback = new Common::Callback<DropboxCreateDirectoryRequest, Networking::ErrorResponse>(this, &DropboxCreateDirectoryRequest::errorCallback);
+ Networking::CurlJsonRequest *request = new Networking::CurlJsonRequest(innerCallback, errorResponseCallback, DROPBOX_API_CREATE_FOLDER);
request->addHeader("Authorization: Bearer " + _token);
request->addHeader("Content-Type: application/json");
diff --git a/backends/cloud/dropbox/dropboxinforequest.cpp b/backends/cloud/dropbox/dropboxinforequest.cpp
index 3d82c8d34b..ebf2d12170 100644
--- a/backends/cloud/dropbox/dropboxinforequest.cpp
+++ b/backends/cloud/dropbox/dropboxinforequest.cpp
@@ -54,8 +54,8 @@ void DropboxInfoRequest::start() {
_ignoreCallback = false;
Networking::JsonCallback innerCallback = new Common::Callback<DropboxInfoRequest, Networking::JsonResponse>(this, &DropboxInfoRequest::userResponseCallback);
- Networking::ErrorCallback errorCallback = new Common::Callback<DropboxInfoRequest, Networking::ErrorResponse>(this, &DropboxInfoRequest::errorCallback);
- Networking::CurlJsonRequest *request = new Networking::CurlJsonRequest(innerCallback, errorCallback, DROPBOX_API_GET_CURRENT_ACCOUNT);
+ Networking::ErrorCallback errorResponseCallback = new Common::Callback<DropboxInfoRequest, Networking::ErrorResponse>(this, &DropboxInfoRequest::errorCallback);
+ Networking::CurlJsonRequest *request = new Networking::CurlJsonRequest(innerCallback, errorResponseCallback, DROPBOX_API_GET_CURRENT_ACCOUNT);
request->addHeader("Authorization: Bearer " + _token);
request->addHeader("Content-Type: application/json");
request->addPostField("null"); //use POST
@@ -108,8 +108,8 @@ void DropboxInfoRequest::userResponseCallback(Networking::JsonResponse response)
delete json;
Networking::JsonCallback innerCallback = new Common::Callback<DropboxInfoRequest, Networking::JsonResponse>(this, &DropboxInfoRequest::quotaResponseCallback);
- Networking::ErrorCallback errorCallback = new Common::Callback<DropboxInfoRequest, Networking::ErrorResponse>(this, &DropboxInfoRequest::errorCallback);
- Networking::CurlJsonRequest *request = new Networking::CurlJsonRequest(innerCallback, errorCallback, DROPBOX_API_GET_SPACE_USAGE);
+ Networking::ErrorCallback errorResponseCallback = new Common::Callback<DropboxInfoRequest, Networking::ErrorResponse>(this, &DropboxInfoRequest::errorCallback);
+ Networking::CurlJsonRequest *request = new Networking::CurlJsonRequest(innerCallback, errorResponseCallback, DROPBOX_API_GET_SPACE_USAGE);
request->addHeader("Authorization: Bearer " + _token);
request->addHeader("Content-Type: application/json");
request->addPostField("null"); //use POST
diff --git a/backends/cloud/googledrive/googledrivestorage.cpp b/backends/cloud/googledrive/googledrivestorage.cpp
index ec4c84400c..c00d954966 100644
--- a/backends/cloud/googledrive/googledrivestorage.cpp
+++ b/backends/cloud/googledrive/googledrivestorage.cpp
@@ -68,8 +68,8 @@ void GoogleDriveStorage::loadKeyAndSecret() {
#endif
}
-GoogleDriveStorage::GoogleDriveStorage(Common::String accessToken, Common::String refreshToken):
- _token(accessToken), _refreshToken(refreshToken) {}
+GoogleDriveStorage::GoogleDriveStorage(Common::String token, Common::String refreshToken):
+ _token(token), _refreshToken(refreshToken) {}
GoogleDriveStorage::GoogleDriveStorage(Common::String code) {
getAccessToken(
@@ -192,28 +192,28 @@ void GoogleDriveStorage::infoInnerCallback(StorageInfoCallback outerCallback, Ne
return;
}
- Common::JSONObject info = json->asObject();
+ Common::JSONObject jsonInfo = json->asObject();
- Common::String uid, name, email;
+ Common::String uid, displayName, email;
uint64 quotaUsed = 0, quotaAllocated = 0;
- if (Networking::CurlJsonRequest::jsonContainsAttribute(info, "user", "GoogleDriveStorage::infoInnerCallback") &&
- Networking::CurlJsonRequest::jsonIsObject(info.getVal("user"), "GoogleDriveStorage::infoInnerCallback")) {
+ if (Networking::CurlJsonRequest::jsonContainsAttribute(jsonInfo, "user", "GoogleDriveStorage::infoInnerCallback") &&
+ Networking::CurlJsonRequest::jsonIsObject(jsonInfo.getVal("user"), "GoogleDriveStorage::infoInnerCallback")) {
//"me":true, "kind":"drive#user","photoLink": "",
//"displayName":"Alexander Tkachev","emailAddress":"alexander@tkachov.ru","permissionId":""
- Common::JSONObject user = info.getVal("user")->asObject();
+ Common::JSONObject user = jsonInfo.getVal("user")->asObject();
if (Networking::CurlJsonRequest::jsonContainsString(user, "permissionId", "GoogleDriveStorage::infoInnerCallback"))
uid = user.getVal("permissionId")->asString(); //not sure it's user's id, but who cares anyway?
if (Networking::CurlJsonRequest::jsonContainsString(user, "displayName", "GoogleDriveStorage::infoInnerCallback"))
- name = user.getVal("displayName")->asString();
+ displayName = user.getVal("displayName")->asString();
if (Networking::CurlJsonRequest::jsonContainsString(user, "emailAddress", "GoogleDriveStorage::infoInnerCallback"))
email = user.getVal("emailAddress")->asString();
}
- if (Networking::CurlJsonRequest::jsonContainsAttribute(info, "storageQuota", "GoogleDriveStorage::infoInnerCallback") &&
- Networking::CurlJsonRequest::jsonIsObject(info.getVal("storageQuota"), "GoogleDriveStorage::infoInnerCallback")) {
+ if (Networking::CurlJsonRequest::jsonContainsAttribute(jsonInfo, "storageQuota", "GoogleDriveStorage::infoInnerCallback") &&
+ Networking::CurlJsonRequest::jsonIsObject(jsonInfo.getVal("storageQuota"), "GoogleDriveStorage::infoInnerCallback")) {
//"usageInDrive":"6332462","limit":"18253611008","usage":"6332462","usageInDriveTrash":"0"
- Common::JSONObject storageQuota = info.getVal("storageQuota")->asObject();
+ Common::JSONObject storageQuota = jsonInfo.getVal("storageQuota")->asObject();
if (Networking::CurlJsonRequest::jsonContainsString(storageQuota, "usage", "GoogleDriveStorage::infoInnerCallback")) {
Common::String usage = storageQuota.getVal("usage")->asString();
@@ -229,7 +229,7 @@ void GoogleDriveStorage::infoInnerCallback(StorageInfoCallback outerCallback, Ne
CloudMan.setStorageUsername(kStorageGoogleDriveId, email);
if (outerCallback) {
- (*outerCallback)(StorageInfoResponse(nullptr, StorageInfo(uid, name, email, quotaUsed, quotaAllocated)));
+ (*outerCallback)(StorageInfoResponse(nullptr, StorageInfo(uid, displayName, email, quotaUsed, quotaAllocated)));
delete outerCallback;
}
@@ -246,8 +246,8 @@ void GoogleDriveStorage::createDirectoryInnerCallback(BoolCallback outerCallback
if (outerCallback) {
if (Networking::CurlJsonRequest::jsonIsObject(json, "GoogleDriveStorage::createDirectoryInnerCallback")) {
- Common::JSONObject info = json->asObject();
- (*outerCallback)(BoolResponse(nullptr, info.contains("id")));
+ Common::JSONObject jsonInfo = json->asObject();
+ (*outerCallback)(BoolResponse(nullptr, jsonInfo.contains("id")));
} else {
(*outerCallback)(BoolResponse(nullptr, false));
}
@@ -289,7 +289,7 @@ void GoogleDriveStorage::printInfo(StorageInfoResponse response) {
debug(9, "\tdisk usage: %lu/%lu", response.value.used(), response.value.available());
}
-Networking::Request *GoogleDriveStorage::createDirectoryWithParentId(Common::String parentId, Common::String name, BoolCallback callback, Networking::ErrorCallback errorCallback) {
+Networking::Request *GoogleDriveStorage::createDirectoryWithParentId(Common::String parentId, Common::String directoryName, BoolCallback callback, Networking::ErrorCallback errorCallback) {
if (!errorCallback)
errorCallback = getErrorPrintingCallback();
@@ -304,7 +304,7 @@ Networking::Request *GoogleDriveStorage::createDirectoryWithParentId(Common::Str
Common::JSONObject jsonRequestParameters;
jsonRequestParameters.setVal("mimeType", new Common::JSONValue("application/vnd.google-apps.folder"));
- jsonRequestParameters.setVal("name", new Common::JSONValue(name));
+ jsonRequestParameters.setVal("name", new Common::JSONValue(directoryName));
jsonRequestParameters.setVal("parents", new Common::JSONValue(parentsArray));
Common::JSONValue value(jsonRequestParameters);
diff --git a/backends/cloud/googledrive/googledrivestorage.h b/backends/cloud/googledrive/googledrivestorage.h
index 457369dc90..d0585bc403 100644
--- a/backends/cloud/googledrive/googledrivestorage.h
+++ b/backends/cloud/googledrive/googledrivestorage.h
@@ -86,7 +86,7 @@ public:
virtual Networking::Request *streamFileById(Common::String id, Networking::NetworkReadStreamCallback callback, Networking::ErrorCallback errorCallback);
/** Calls the callback when finished. */
- virtual Networking::Request *createDirectoryWithParentId(Common::String parentId, Common::String name, BoolCallback callback, Networking::ErrorCallback errorCallback);
+ virtual Networking::Request *createDirectoryWithParentId(Common::String parentId, Common::String directoryName, BoolCallback callback, Networking::ErrorCallback errorCallback);
/** Returns the StorageInfo struct. */
virtual Networking::Request *info(StorageInfoCallback callback, Networking::ErrorCallback errorCallback);
diff --git a/backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp b/backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp
index da67266d12..74cf3208e3 100644
--- a/backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp
+++ b/backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp
@@ -72,8 +72,8 @@ void OneDriveCreateDirectoryRequest::start() {
url += ":/" + ConnMan.urlEncode(parent) + ":";
url += "/children";
Networking::JsonCallback innerCallback = new Common::Callback<OneDriveCreateDirectoryRequest, Networking::JsonResponse>(this, &OneDriveCreateDirectoryRequest::responseCallback);
- Networking::ErrorCallback errorCallback = new Common::Callback<OneDriveCreateDirectoryRequest, Networking::ErrorResponse>(this, &OneDriveCreateDirectoryRequest::errorCallback);
- Networking::CurlJsonRequest *request = new OneDriveTokenRefresher(_storage, innerCallback, errorCallback, url.c_str());
+ Networking::ErrorCallback errorResponseCallback = new Common::Callback<OneDriveCreateDirectoryRequest, Networking::ErrorResponse>(this, &OneDriveCreateDirectoryRequest::errorCallback);
+ Networking::CurlJsonRequest *request = new OneDriveTokenRefresher(_storage, innerCallback, errorResponseCallback, url.c_str());
request->addHeader("Authorization: Bearer " + _storage->accessToken());
request->addHeader("Content-Type: application/json");
diff --git a/backends/cloud/onedrive/onedrivestorage.cpp b/backends/cloud/onedrive/onedrivestorage.cpp
index 8799f3d69f..14e803d980 100644
--- a/backends/cloud/onedrive/onedrivestorage.cpp
+++ b/backends/cloud/onedrive/onedrivestorage.cpp
@@ -67,8 +67,8 @@ void OneDriveStorage::loadKeyAndSecret() {
#endif
}
-OneDriveStorage::OneDriveStorage(Common::String accessToken, Common::String userId, Common::String refreshToken):
- _token(accessToken), _uid(userId), _refreshToken(refreshToken) {}
+OneDriveStorage::OneDriveStorage(Common::String token, Common::String uid, Common::String refreshToken):
+ _token(token), _uid(uid), _refreshToken(refreshToken) {}
OneDriveStorage::OneDriveStorage(Common::String code) {
getAccessToken(
@@ -193,35 +193,35 @@ void OneDriveStorage::infoInnerCallback(StorageInfoCallback outerCallback, Netwo
return;
}
- Common::JSONObject info = json->asObject();
+ Common::JSONObject jsonInfo = json->asObject();
- Common::String uid, name, email;
+ Common::String uid, displayName, email;
uint64 quotaUsed = 0, quotaAllocated = 26843545600LL; // 25 GB, because I actually don't know any way to find out the real one
- if (Networking::CurlJsonRequest::jsonContainsObject(info, "createdBy", "OneDriveStorage::infoInnerCallback")) {
- Common::JSONObject createdBy = info.getVal("createdBy")->asObject();
+ if (Networking::CurlJsonRequest::jsonContainsObject(jsonInfo, "createdBy", "OneDriveStorage::infoInnerCallback")) {
+ Common::JSONObject createdBy = jsonInfo.getVal("createdBy")->asObject();
if (Networking::CurlJsonRequest::jsonContainsObject(createdBy, "user", "OneDriveStorage::infoInnerCallback")) {
Common::JSONObject user = createdBy.getVal("user")->asObject();
if (Networking::CurlJsonRequest::jsonContainsString(user, "id", "OneDriveStorage::infoInnerCallback"))
uid = user.getVal("id")->asString();
if (Networking::CurlJsonRequest::jsonContainsString(user, "displayName", "OneDriveStorage::infoInnerCallback"))
- name = user.getVal("displayName")->asString();
+ displayName = user.getVal("displayName")->asString();
}
}
- if (Networking::CurlJsonRequest::jsonContainsIntegerNumber(info, "size", "OneDriveStorage::infoInnerCallback")) {
- quotaUsed = info.getVal("size")->asIntegerNumber();
+ if (Networking::CurlJsonRequest::jsonContainsIntegerNumber(jsonInfo, "size", "OneDriveStorage::infoInnerCallback")) {
+ quotaUsed = jsonInfo.getVal("size")->asIntegerNumber();
}
Common::String username = email;
if (username == "")
- username = name;
+ username = displayName;
if (username == "")
username = uid;
CloudMan.setStorageUsername(kStorageOneDriveId, username);
if (outerCallback) {
- (*outerCallback)(StorageInfoResponse(nullptr, StorageInfo(uid, name, email, quotaUsed, quotaAllocated)));
+ (*outerCallback)(StorageInfoResponse(nullptr, StorageInfo(uid, displayName, email, quotaUsed, quotaAllocated)));
delete outerCallback;
}
diff --git a/backends/cloud/storagefile.cpp b/backends/cloud/storagefile.cpp
index 2428d8ff80..90ec7da120 100644
--- a/backends/cloud/storagefile.cpp
+++ b/backends/cloud/storagefile.cpp
@@ -56,10 +56,10 @@ StorageFile::StorageFile(Common::String pth, uint32 sz, uint32 ts, bool dir) {
_isDirectory = dir;
}
-StorageFile::StorageFile(Common::String id, Common::String path, Common::String name, uint32 sz, uint32 ts, bool dir) {
- _id = id;
- _path = path;
- _name = name;
+StorageFile::StorageFile(Common::String fileId, Common::String filePath, Common::String fileName, uint32 sz, uint32 ts, bool dir) {
+ _id = fileId;
+ _path = filePath;
+ _name = fileName;
_size = sz;
_timestamp = ts;
_isDirectory = dir;
diff --git a/backends/cloud/storagefile.h b/backends/cloud/storagefile.h
index 44f16c3689..c29ac77dd1 100644
--- a/backends/cloud/storagefile.h
+++ b/backends/cloud/storagefile.h
@@ -48,7 +48,7 @@ class StorageFile {
public:
StorageFile(); //invalid empty file
StorageFile(Common::String pth, uint32 sz, uint32 ts, bool dir);
- StorageFile(Common::String id, Common::String path, Common::String name, uint32 sz, uint32 ts, bool dir);
+ StorageFile(Common::String fileId, Common::String filePath, Common::String fileName, uint32 sz, uint32 ts, bool dir);
Common::String id() const { return _id; }
Common::String path() const { return _path; }
diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h
index 24286b649d..28ea3bbecd 100644
--- a/backends/fs/abstract-fs.h
+++ b/backends/fs/abstract-fs.h
@@ -195,11 +195,11 @@ public:
/**
* Creates a file referred by this node.
*
- * @param isDirectory true if created file must be a directory
+ * @param isDirectoryFlag true if created file must be a directory
*
* @return true if file is created successfully
*/
- virtual bool create(bool isDirectory) = 0;
+ virtual bool create(bool isDirectoryFlag) = 0;
};
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index 24a8fb98ad..09ba3a1c83 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -443,7 +443,7 @@ Common::WriteStream *AmigaOSFilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath(), true);
}
-bool AmigaOSFilesystemNode::create(bool isDirectory) {
+bool AmigaOSFilesystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
diff --git a/backends/fs/amigaos4/amigaos4-fs.h b/backends/fs/amigaos4/amigaos4-fs.h
index 3ed45d3f77..c86bb4c57a 100644
--- a/backends/fs/amigaos4/amigaos4-fs.h
+++ b/backends/fs/amigaos4/amigaos4-fs.h
@@ -116,7 +116,7 @@ public:
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
};
diff --git a/backends/fs/chroot/chroot-fs.cpp b/backends/fs/chroot/chroot-fs.cpp
index be6805bbd8..ac7cde3398 100644
--- a/backends/fs/chroot/chroot-fs.cpp
+++ b/backends/fs/chroot/chroot-fs.cpp
@@ -108,7 +108,7 @@ Common::WriteStream *ChRootFilesystemNode::createWriteStream() {
return _realNode->createWriteStream();
}
-bool ChRootFilesystemNode::create(bool /*isDir*/) {
+bool ChRootFilesystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
diff --git a/backends/fs/chroot/chroot-fs.h b/backends/fs/chroot/chroot-fs.h
index e0ecc1c47e..76902bc92a 100644
--- a/backends/fs/chroot/chroot-fs.h
+++ b/backends/fs/chroot/chroot-fs.h
@@ -49,7 +49,7 @@ public:
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
private:
static Common::String addPathComponent(const Common::String &path, const Common::String &component);
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp
index 83b1295838..035178dbb4 100644
--- a/backends/fs/ds/ds-fs.cpp
+++ b/backends/fs/ds/ds-fs.cpp
@@ -211,7 +211,7 @@ Common::WriteStream *DSFileSystemNode::createWriteStream() {
return Common::wrapBufferedWriteStream(stream, WRITE_BUFFER_SIZE);
}
-bool DSFileSystemNode::create(bool isDirectory) {
+bool DSFileSystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
@@ -271,7 +271,7 @@ GBAMPFileSystemNode::GBAMPFileSystemNode(const Common::String& path) {
_path = path;
}
-GBAMPFileSystemNode::GBAMPFileSystemNode(const Common::String& path, bool isDir) {
+GBAMPFileSystemNode::GBAMPFileSystemNode(const Common::String& path, bool isDirectoryFlag) {
//consolePrintf("'%s'",path.c_str());
int lastSlash = 3;
@@ -284,7 +284,7 @@ GBAMPFileSystemNode::GBAMPFileSystemNode(const Common::String& path, bool isDir)
_displayName = Common::String(path.c_str() + lastSlash + 1);
_path = path;
_isValid = true;
- _isDirectory = isDir;
+ _isDirectory = isDirectoryFlag;
}
@@ -398,7 +398,7 @@ Common::WriteStream *GBAMPFileSystemNode::createWriteStream() {
return Common::wrapBufferedWriteStream(stream, WRITE_BUFFER_SIZE);
}
-bool GBAMPFileSystemNode::create(bool isDirectory) {
+bool GBAMPFileSystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
diff --git a/backends/fs/ds/ds-fs.h b/backends/fs/ds/ds-fs.h
index 939d1a1555..12dd6d6a59 100644
--- a/backends/fs/ds/ds-fs.h
+++ b/backends/fs/ds/ds-fs.h
@@ -91,7 +91,7 @@ public:
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
/**
* Returns the zip file this node points to.
@@ -132,7 +132,7 @@ public:
* @param path String with the path the new node should point to.
* @param path true if path is a directory, false otherwise.
*/
- GBAMPFileSystemNode(const Common::String &path, bool isDirectory);
+ GBAMPFileSystemNode(const Common::String &path, bool isDirectoryFlag);
/**
* Copy constructor.
@@ -157,7 +157,7 @@ public:
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
};
struct fileHandle {
diff --git a/backends/fs/n64/n64-fs.cpp b/backends/fs/n64/n64-fs.cpp
index d568500d30..5a131c0305 100644
--- a/backends/fs/n64/n64-fs.cpp
+++ b/backends/fs/n64/n64-fs.cpp
@@ -160,7 +160,7 @@ Common::WriteStream *N64FilesystemNode::createWriteStream() {
return RomfsStream::makeFromPath(getPath(), true);
}
-bool N64FilesystemNode::create(bool isDirectory) {
+bool N64FilesystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
diff --git a/backends/fs/n64/n64-fs.h b/backends/fs/n64/n64-fs.h
index d520ad5be6..b2de8a4bc4 100644
--- a/backends/fs/n64/n64-fs.h
+++ b/backends/fs/n64/n64-fs.h
@@ -73,7 +73,7 @@ public:
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
};
#endif
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index ce5715210a..4434bcba97 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -253,10 +253,10 @@ Common::WriteStream *POSIXFilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath(), true);
}
-bool POSIXFilesystemNode::create(bool isDir) {
+bool POSIXFilesystemNode::create(bool isDirectoryFlag) {
bool success;
- if (isDir) {
+ if (isDirectoryFlag) {
success = mkdir(_path.c_str(), 0755) == 0;
} else {
int fd = open(_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0755);
@@ -270,12 +270,12 @@ bool POSIXFilesystemNode::create(bool isDir) {
if (success) {
setFlags();
if (_isValid) {
- if (_isDirectory != isDir) warning("failed to create %s: got %s", isDir ? "directory" : "file", _isDirectory ? "directory" : "file");
- return _isDirectory == isDir;
+ if (_isDirectory != isDirectoryFlag) warning("failed to create %s: got %s", isDirectoryFlag ? "directory" : "file", _isDirectory ? "directory" : "file");
+ return _isDirectory == isDirectoryFlag;
}
warning("POSIXFilesystemNode: %s() was a success, but stat indicates there is no such %s",
- isDir ? "mkdir" : "creat", isDir ? "directory" : "file");
+ isDirectoryFlag ? "mkdir" : "creat", isDirectoryFlag ? "directory" : "file");
return false;
}
diff --git a/backends/fs/posix/posix-fs.h b/backends/fs/posix/posix-fs.h
index 4ebce7e9d9..5a6b6bd2bd 100644
--- a/backends/fs/posix/posix-fs.h
+++ b/backends/fs/posix/posix-fs.h
@@ -73,7 +73,7 @@ public:
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
private:
/**
diff --git a/backends/fs/ps2/ps2-fs.cpp b/backends/fs/ps2/ps2-fs.cpp
index 8391e063a0..eba740e948 100644
--- a/backends/fs/ps2/ps2-fs.cpp
+++ b/backends/fs/ps2/ps2-fs.cpp
@@ -441,7 +441,7 @@ Common::WriteStream *Ps2FilesystemNode::createWriteStream() {
return PS2FileStream::makeFromPath(getPath(), true);
}
-bool Ps2FilesystemNode::create(bool isDirectory) {
+bool Ps2FilesystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
diff --git a/backends/fs/ps2/ps2-fs.h b/backends/fs/ps2/ps2-fs.h
index c9da434535..ca476eca9f 100644
--- a/backends/fs/ps2/ps2-fs.h
+++ b/backends/fs/ps2/ps2-fs.h
@@ -96,7 +96,7 @@ public:
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
int getDev() { return 0; }
};
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index 6bd5e93435..c69592ea99 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -239,7 +239,7 @@ Common::WriteStream *PSPFilesystemNode::createWriteStream() {
return Common::wrapBufferedWriteStream(stream, WRITE_BUFFER_SIZE);
}
-bool PSPFilesystemNode::create(bool isDirectory) {
+bool PSPFilesystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
diff --git a/backends/fs/psp/psp-fs.h b/backends/fs/psp/psp-fs.h
index 648544650b..47c6d04a70 100644
--- a/backends/fs/psp/psp-fs.h
+++ b/backends/fs/psp/psp-fs.h
@@ -65,7 +65,7 @@ public:
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
};
#endif
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index e4163caa33..c6d5cc4955 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -232,7 +232,7 @@ Common::WriteStream *SymbianFilesystemNode::createWriteStream() {
return SymbianStdioStream::makeFromPath(getPath(), true);
}
-bool SymbianFilesystemNode::create(bool isDirectory) {
+bool SymbianFilesystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
diff --git a/backends/fs/symbian/symbian-fs.h b/backends/fs/symbian/symbian-fs.h
index 1327f9f2e9..0f8212035f 100644
--- a/backends/fs/symbian/symbian-fs.h
+++ b/backends/fs/symbian/symbian-fs.h
@@ -66,7 +66,7 @@ public:
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
};
#endif
diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp
index e036b75019..c3fdbc07b2 100644
--- a/backends/fs/wii/wii-fs.cpp
+++ b/backends/fs/wii/wii-fs.cpp
@@ -213,7 +213,7 @@ Common::WriteStream *WiiFilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath(), true);
}
-bool WiiFilesystemNode::create(bool isDirectory) {
+bool WiiFilesystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
diff --git a/backends/fs/wii/wii-fs.h b/backends/fs/wii/wii-fs.h
index affb765884..491c8d1d2c 100644
--- a/backends/fs/wii/wii-fs.h
+++ b/backends/fs/wii/wii-fs.h
@@ -69,7 +69,7 @@ public:
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
};
#endif
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index b43686f911..caf0e31360 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -244,10 +244,10 @@ Common::WriteStream *WindowsFilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath(), true);
}
-bool WindowsFilesystemNode::create(bool isDirectory) {
+bool WindowsFilesystemNode::create(bool isDirectoryFlag) {
bool success;
- if (isDirectory) {
+ if (isDirectoryFlag) {
success = CreateDirectory(toUnicode(_path.c_str()), NULL) != 0;
} else {
success = CreateFile(toUnicode(_path.c_str()), GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL) != INVALID_HANDLE_VALUE;
@@ -264,12 +264,12 @@ bool WindowsFilesystemNode::create(bool isDirectory) {
_path += '\\';
}
- if (_isDirectory != isDirectory) warning("failed to create %s: got %s", isDirectory ? "directory" : "file", _isDirectory ? "directory" : "file");
- return _isDirectory == isDirectory;
+ if (_isDirectory != isDirectoryFlag) warning("failed to create %s: got %s", isDirectoryFlag ? "directory" : "file", _isDirectory ? "directory" : "file");
+ return _isDirectory == isDirectoryFlag;
}
warning("WindowsFilesystemNode: Create%s() was a success, but GetFileAttributes() indicates there is no such %s",
- isDirectory ? "Directory" : "File", isDirectory ? "directory" : "file");
+ isDirectoryFlag ? "Directory" : "File", isDirectoryFlag ? "directory" : "file");
return false;
}
diff --git a/backends/fs/windows/windows-fs.h b/backends/fs/windows/windows-fs.h
index 7c9f2c1e1a..3758877f05 100644
--- a/backends/fs/windows/windows-fs.h
+++ b/backends/fs/windows/windows-fs.h
@@ -88,7 +88,7 @@ public:
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
private:
/**
diff --git a/backends/networking/curl/networkreadstream.cpp b/backends/networking/curl/networkreadstream.cpp
index b4516701a7..4da18ce311 100644
--- a/backends/networking/curl/networkreadstream.cpp
+++ b/backends/networking/curl/networkreadstream.cpp
@@ -228,19 +228,19 @@ Common::String NetworkReadStream::responseHeaders() const {
}
uint32 NetworkReadStream::fillWithSendingContents(char *bufferToFill, uint32 maxSize) {
- uint32 size = _sendingContentsSize - _sendingContentsPos;
- if (size > maxSize)
- size = maxSize;
- for (uint32 i = 0; i < size; ++i) {
+ uint32 sendSize = _sendingContentsSize - _sendingContentsPos;
+ if (sendSize > maxSize)
+ sendSize = maxSize;
+ for (uint32 i = 0; i < sendSize; ++i) {
bufferToFill[i] = _sendingContentsBuffer[_sendingContentsPos + i];
}
- _sendingContentsPos += size;
- return size;
+ _sendingContentsPos += sendSize;
+ return sendSize;
}
-uint32 NetworkReadStream::addResponseHeaders(char *buffer, uint32 size) {
- _responseHeaders += Common::String(buffer, size);
- return size;
+uint32 NetworkReadStream::addResponseHeaders(char *buffer, uint32 bufferSize) {
+ _responseHeaders += Common::String(buffer, bufferSize);
+ return bufferSize;
}
double NetworkReadStream::getProgress() const {
diff --git a/backends/networking/curl/networkreadstream.h b/backends/networking/curl/networkreadstream.h
index 62a3e41d9b..275d8dbd79 100644
--- a/backends/networking/curl/networkreadstream.h
+++ b/backends/networking/curl/networkreadstream.h
@@ -128,7 +128,7 @@ public:
*
* @returns how many bytes were actually read
*/
- uint32 addResponseHeaders(char *buffer, uint32 size);
+ uint32 addResponseHeaders(char *buffer, uint32 bufferSize);
/** Returns a number in range [0, 1], where 1 is "complete". */
double getProgress() const;
diff --git a/backends/platform/symbian/README b/backends/platform/symbian/README
index 47a3097ac0..cdff5f9787 100644
--- a/backends/platform/symbian/README
+++ b/backends/platform/symbian/README
@@ -1,7 +1,7 @@
ScummVM - ScummVM ported to EPOC/SymbianOS
- Copyright (C) 2008-2016 ScummVM Team
+ Copyright (C) 2008-2017 ScummVM Team
Copyright (C) 2013-2013 Fedor Strizhniou aka zanac
Copyright (C) 2003-2013 Lars 'AnotherGuest' Persson
Copyright (C) 2002-2008 Jurgen 'SumthinWicked' Braam
diff --git a/backends/platform/symbian/S60/ScummVM_S60.mmp.in b/backends/platform/symbian/S60/ScummVM_S60.mmp.in
index 14e586246a..9f47612f22 100644
--- a/backends/platform/symbian/S60/ScummVM_S60.mmp.in
+++ b/backends/platform/symbian/S60/ScummVM_S60.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/S60/ScummVM_S60_App.mmp b/backends/platform/symbian/S60/ScummVM_S60_App.mmp
index e75059b4b7..df70046bf4 100644
--- a/backends/platform/symbian/S60/ScummVM_S60_App.mmp
+++ b/backends/platform/symbian/S60/ScummVM_S60_App.mmp
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
index a669943933..e6ae1b9f27 100644
--- a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
+++ b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
@@ -3,7 +3,7 @@
* Copyright (C) 2003-2014 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
* Copyright (C) 2013-2014 Fedor Strizhniou Additional library porting, engine support, help files etc
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
index ac8fc6b35a..1555db872b 100644
--- a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
+++ b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
@@ -3,7 +3,7 @@
* Copyright (C) 2003-2014 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
* Copyright (C) 2013-2014 Fedor Strizhniou Additional library porting, engine support, help files etc
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/S80/ScummVM_S80.mmp.in b/backends/platform/symbian/S80/ScummVM_S80.mmp.in
index e7ebe900bb..304423e671 100644
--- a/backends/platform/symbian/S80/ScummVM_S80.mmp.in
+++ b/backends/platform/symbian/S80/ScummVM_S80.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/S80/ScummVM_S80_App.mmp b/backends/platform/symbian/S80/ScummVM_S80_App.mmp
index 4b3fc052cf..abf7c72aed 100644
--- a/backends/platform/symbian/S80/ScummVM_S80_App.mmp
+++ b/backends/platform/symbian/S80/ScummVM_S80_App.mmp
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/S90/Scummvm_S90.mmp.in b/backends/platform/symbian/S90/Scummvm_S90.mmp.in
index e35cdb9107..3f44b3ac26 100644
--- a/backends/platform/symbian/S90/Scummvm_S90.mmp.in
+++ b/backends/platform/symbian/S90/Scummvm_S90.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/S90/Scummvm_S90_App.mmp b/backends/platform/symbian/S90/Scummvm_S90_App.mmp
index 1716629ceb..e794acd3d3 100644
--- a/backends/platform/symbian/S90/Scummvm_S90_App.mmp
+++ b/backends/platform/symbian/S90/Scummvm_S90_App.mmp
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/UIQ2/ScummVM.rss b/backends/platform/symbian/UIQ2/ScummVM.rss
index 13712e26c4..c7d703bc5c 100644
--- a/backends/platform/symbian/UIQ2/ScummVM.rss
+++ b/backends/platform/symbian/UIQ2/ScummVM.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff --git a/backends/platform/symbian/UIQ3/ScummVM.rss b/backends/platform/symbian/UIQ3/ScummVM.rss
index 5e133ac137..2f6d17fe3b 100644
--- a/backends/platform/symbian/UIQ3/ScummVM.rss
+++ b/backends/platform/symbian/UIQ3/ScummVM.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss b/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss
index 5e133ac137..2f6d17fe3b 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss
+++ b/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
index 5e27b87433..0bc0bf1f8e 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
+++ b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2009 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2009 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
index 8568a51ec3..1c5127ff0f 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
+++ b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss b/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss
index 8f8ff5c3b0..1e08f72002 100644
--- a/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss
+++ b/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/config.mmh b/backends/platform/symbian/mmp/config.mmh
index 8a81fd2b78..414110ccd0 100644
--- a/backends/platform/symbian/mmp/config.mmh
+++ b/backends/platform/symbian/mmp/config.mmh
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
* Copyright (C) 2014 Fedor Strizhniou
*
* ScummVM is the legal property of its developers, whose names
diff --git a/backends/platform/symbian/mmp/scummvm_access.mmp.in b/backends/platform/symbian/mmp/scummvm_access.mmp.in
index 8e1c85f3e3..d6dd0c3753 100644
--- a/backends/platform/symbian/mmp/scummvm_access.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_access.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM project
+ * Copyright (C) 2005-2017 The ScummVM project
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_agi.mmp.in b/backends/platform/symbian/mmp/scummvm_agi.mmp.in
index dcea8f023b..76df3cf57d 100644
--- a/backends/platform/symbian/mmp/scummvm_agi.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_agi.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_agos.mmp.in b/backends/platform/symbian/mmp/scummvm_agos.mmp.in
index c5eb4d8ad4..22d8fdcae0 100644
--- a/backends/platform/symbian/mmp/scummvm_agos.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_agos.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_avalanche.mmp.in b/backends/platform/symbian/mmp/scummvm_avalanche.mmp.in
index a9580c643e..adb18d3915 100644
--- a/backends/platform/symbian/mmp/scummvm_avalanche.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_avalanche.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
* Copyright (C) 2013 Strizniou Fedor
*
* ScummVM is the legal property of its developers, whose names
diff --git a/backends/platform/symbian/mmp/scummvm_base.mmp.in b/backends/platform/symbian/mmp/scummvm_base.mmp.in
index 58a56c95ac..703d2c6c32 100644
--- a/backends/platform/symbian/mmp/scummvm_base.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_base.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_bbvs.mmp.in b/backends/platform/symbian/mmp/scummvm_bbvs.mmp.in
index 864d019c97..9c27028682 100644
--- a/backends/platform/symbian/mmp/scummvm_bbvs.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_bbvs.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
* Copyright (C) 2014 Fedor Strizhniou - Epoc project file
*
* ScummVM is the legal property of its developers, whose names
diff --git a/backends/platform/symbian/mmp/scummvm_cge.mmp.in b/backends/platform/symbian/mmp/scummvm_cge.mmp.in
index bcfbec8a70..330ce0fe3b 100644
--- a/backends/platform/symbian/mmp/scummvm_cge.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_cge.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_cge2.mmp.in b/backends/platform/symbian/mmp/scummvm_cge2.mmp.in
index f09a2b2427..7e32ef4766 100644
--- a/backends/platform/symbian/mmp/scummvm_cge2.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_cge2.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_cine.mmp.in b/backends/platform/symbian/mmp/scummvm_cine.mmp.in
index ff55b1bc1d..d811d0529b 100644
--- a/backends/platform/symbian/mmp/scummvm_cine.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_cine.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_composer.mmp.in b/backends/platform/symbian/mmp/scummvm_composer.mmp.in
index c974df098a..9838194d0f 100644
--- a/backends/platform/symbian/mmp/scummvm_composer.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_composer.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_cruise.mmp.in b/backends/platform/symbian/mmp/scummvm_cruise.mmp.in
index 134c924d2a..dadc04e544 100644
--- a/backends/platform/symbian/mmp/scummvm_cruise.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_cruise.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_draci.mmp.in b/backends/platform/symbian/mmp/scummvm_draci.mmp.in
index 66d111efb0..26ef912cfb 100644
--- a/backends/platform/symbian/mmp/scummvm_draci.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_draci.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_drascula.mmp.in b/backends/platform/symbian/mmp/scummvm_drascula.mmp.in
index b3128978c3..bb695bdb5c 100644
--- a/backends/platform/symbian/mmp/scummvm_drascula.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_drascula.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_dreamweb.mmp.in b/backends/platform/symbian/mmp/scummvm_dreamweb.mmp.in
index b7841ee9cb..0829f4a2f0 100644
--- a/backends/platform/symbian/mmp/scummvm_dreamweb.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_dreamweb.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
* Copyright (C) 2013 Strizniou Fedor
*
* ScummVM is the legal property of its developers, whose names
diff --git a/backends/platform/symbian/mmp/scummvm_fullpipe.mmp.in b/backends/platform/symbian/mmp/scummvm_fullpipe.mmp.in
index 85bbfa69be..79a5641c80 100644
--- a/backends/platform/symbian/mmp/scummvm_fullpipe.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_fullpipe.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
* Copyright (C) 2013 Strizniou Fedor
*
* ScummVM is the legal property of its developers, whose names
diff --git a/backends/platform/symbian/mmp/scummvm_gob.mmp.in b/backends/platform/symbian/mmp/scummvm_gob.mmp.in
index b91fbb68b7..def031ec56 100644
--- a/backends/platform/symbian/mmp/scummvm_gob.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_gob.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_groovie.mmp.in b/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
index effff997df..eb2778f4e4 100644
--- a/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_hopkins.mmp.in b/backends/platform/symbian/mmp/scummvm_hopkins.mmp.in
index 4df1db9be6..7f344fb5ef 100644
--- a/backends/platform/symbian/mmp/scummvm_hopkins.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_hopkins.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_hugo.mmp.in b/backends/platform/symbian/mmp/scummvm_hugo.mmp.in
index c294588147..bdad87c480 100644
--- a/backends/platform/symbian/mmp/scummvm_hugo.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_hugo.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_kyra.mmp.in b/backends/platform/symbian/mmp/scummvm_kyra.mmp.in
index ad6dfebe71..21730e4761 100644
--- a/backends/platform/symbian/mmp/scummvm_kyra.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_kyra.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in b/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in
index 9c49fe7dcb..ba93db6bbd 100644
--- a/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_lure.mmp.in b/backends/platform/symbian/mmp/scummvm_lure.mmp.in
index 4982576432..32ac942f15 100644
--- a/backends/platform/symbian/mmp/scummvm_lure.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_lure.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_m4.mmp.in b/backends/platform/symbian/mmp/scummvm_m4.mmp.in
index 5a87e3fd14..f910e54214 100644
--- a/backends/platform/symbian/mmp/scummvm_m4.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_m4.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_made.mmp.in b/backends/platform/symbian/mmp/scummvm_made.mmp.in
index ab809351c5..b8f77c04a9 100644
--- a/backends/platform/symbian/mmp/scummvm_made.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_made.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_mads.mmp.in b/backends/platform/symbian/mmp/scummvm_mads.mmp.in
index 65224af700..43da279c4f 100644
--- a/backends/platform/symbian/mmp/scummvm_mads.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_mads.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
* Copyright (C) 2014 Fedor Strizhniou - Epoc project file
*
* ScummVM is the legal property of its developers, whose names
diff --git a/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in b/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in
index ff3bce9767..379614d12f 100644
--- a/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_mortevielle.mmp.in b/backends/platform/symbian/mmp/scummvm_mortevielle.mmp.in
index e04006ea85..57484f4ccb 100644
--- a/backends/platform/symbian/mmp/scummvm_mortevielle.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_mortevielle.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
* Copyright (C) 2013 Strizniou Fedor
*
* ScummVM is the legal property of its developers, whose names
diff --git a/backends/platform/symbian/mmp/scummvm_neverhood.mmp.in b/backends/platform/symbian/mmp/scummvm_neverhood.mmp.in
index 05f195c2c4..1f4edd5627 100644
--- a/backends/platform/symbian/mmp/scummvm_neverhood.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_neverhood.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in b/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in
index 933deec4b7..7ee266fd0b 100644
--- a/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_pegasus.mmp.in b/backends/platform/symbian/mmp/scummvm_pegasus.mmp.in
index e292764ed9..1e62557c14 100644
--- a/backends/platform/symbian/mmp/scummvm_pegasus.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_pegasus.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_prince.mmp.in b/backends/platform/symbian/mmp/scummvm_prince.mmp.in
index c0b8193c38..466ba9bc5d 100644
--- a/backends/platform/symbian/mmp/scummvm_prince.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_prince.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM project
+ * Copyright (C) 2005-2017 The ScummVM project
* Copyright (C) 2014 Strizniou Fedor
*
* ScummVM is the legal property of its developers, whose names
diff --git a/backends/platform/symbian/mmp/scummvm_queen.mmp.in b/backends/platform/symbian/mmp/scummvm_queen.mmp.in
index 106037e741..301ead5ccb 100644
--- a/backends/platform/symbian/mmp/scummvm_queen.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_queen.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_saga.mmp.in b/backends/platform/symbian/mmp/scummvm_saga.mmp.in
index 230b54ed07..5f035578a4 100644
--- a/backends/platform/symbian/mmp/scummvm_saga.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_saga.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_sci.mmp.in b/backends/platform/symbian/mmp/scummvm_sci.mmp.in
index 42c79c4ccf..3db2e5b1ab 100644
--- a/backends/platform/symbian/mmp/scummvm_sci.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sci.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
index c727a6f1be..bebe5e72f2 100644
--- a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_sherlock.mmp.in b/backends/platform/symbian/mmp/scummvm_sherlock.mmp.in
index 4c4117f39e..353442bfcb 100644
--- a/backends/platform/symbian/mmp/scummvm_sherlock.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sherlock.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
* Copyright (C) 2015 Strizniou Fedor
*
* ScummVM is the legal property of its developers, whose names
diff --git a/backends/platform/symbian/mmp/scummvm_sky.mmp.in b/backends/platform/symbian/mmp/scummvm_sky.mmp.in
index 621dcd8699..d849c57704 100644
--- a/backends/platform/symbian/mmp/scummvm_sky.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sky.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_sword1.mmp.in b/backends/platform/symbian/mmp/scummvm_sword1.mmp.in
index 0904732a1b..7321f85805 100644
--- a/backends/platform/symbian/mmp/scummvm_sword1.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sword1.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_sword2.mmp.in b/backends/platform/symbian/mmp/scummvm_sword2.mmp.in
index 48aea59db3..0b9f6daf3f 100644
--- a/backends/platform/symbian/mmp/scummvm_sword2.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sword2.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_sword25.mmp.in b/backends/platform/symbian/mmp/scummvm_sword25.mmp.in
index 49e37e3140..6704c13b4a 100644
--- a/backends/platform/symbian/mmp/scummvm_sword25.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sword25.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
* Copyright (C) 2013 Strizniou Fedor
*
* ScummVM is the legal property of its developers, whose names
diff --git a/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in b/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in
index 85091abf2c..73a08491a7 100644
--- a/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_testbed.mmp.in b/backends/platform/symbian/mmp/scummvm_testbed.mmp.in
index 3302bfe8af..160ab4c6ea 100644
--- a/backends/platform/symbian/mmp/scummvm_testbed.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_testbed.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
* Copyright (C) 2013 Strizniou Fedor
*
* ScummVM is the legal property of its developers, whose names
diff --git a/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in b/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in
index 21fe837a8a..f2ced4aa9f 100644
--- a/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_toltecs.mmp.in b/backends/platform/symbian/mmp/scummvm_toltecs.mmp.in
index 00f2d2261d..5ca28c2736 100644
--- a/backends/platform/symbian/mmp/scummvm_toltecs.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_toltecs.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_tony.mmp.in b/backends/platform/symbian/mmp/scummvm_tony.mmp.in
index a05fba8842..64426475fa 100644
--- a/backends/platform/symbian/mmp/scummvm_tony.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_tony.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_toon.mmp.in b/backends/platform/symbian/mmp/scummvm_toon.mmp.in
index 1f268b3c00..5ca4176053 100644
--- a/backends/platform/symbian/mmp/scummvm_toon.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_toon.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_touche.mmp.in b/backends/platform/symbian/mmp/scummvm_touche.mmp.in
index 636b448168..90b18518e0 100644
--- a/backends/platform/symbian/mmp/scummvm_touche.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_touche.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_tsage.mmp.in b/backends/platform/symbian/mmp/scummvm_tsage.mmp.in
index d45a808628..a6ef4129cf 100644
--- a/backends/platform/symbian/mmp/scummvm_tsage.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_tsage.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_tucker.mmp.in b/backends/platform/symbian/mmp/scummvm_tucker.mmp.in
index 68c81aebbb..d7d6803ee7 100644
--- a/backends/platform/symbian/mmp/scummvm_tucker.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_tucker.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_voyeur.mmp.in b/backends/platform/symbian/mmp/scummvm_voyeur.mmp.in
index 9e02567651..7f8ec39e42 100644
--- a/backends/platform/symbian/mmp/scummvm_voyeur.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_voyeur.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in b/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in
index d5eef5d3a3..c74b6b17d3 100644
--- a/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/mmp/scummvm_zvision.mmp.in b/backends/platform/symbian/mmp/scummvm_zvision.mmp.in
index 1bd34dfe38..89f5fd02f9 100644
--- a/backends/platform/symbian/mmp/scummvm_zvision.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_zvision.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
* Copyright (C) 2013 Strizniou Fedor - Epoc project file
*
* ScummVM is the legal property of its developers, whose names
diff --git a/backends/platform/symbian/res/ScummVmAif.rss b/backends/platform/symbian/res/ScummVmAif.rss
index 3bb86ca796..358356194e 100644
--- a/backends/platform/symbian/res/ScummVmAif.rss
+++ b/backends/platform/symbian/res/ScummVmAif.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/res/scummvm.rss b/backends/platform/symbian/res/scummvm.rss
index 67af8b77d0..051f1f4856 100644
--- a/backends/platform/symbian/res/scummvm.rss
+++ b/backends/platform/symbian/res/scummvm.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/res/scummvm_A0000658.rss b/backends/platform/symbian/res/scummvm_A0000658.rss
index 2f478962de..938abe7e3b 100644
--- a/backends/platform/symbian/res/scummvm_A0000658.rss
+++ b/backends/platform/symbian/res/scummvm_A0000658.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/backends/platform/symbian/src/ScummVm.hrh b/backends/platform/symbian/src/ScummVm.hrh
index 927da51e3d..cedf644879 100644
--- a/backends/platform/symbian/src/ScummVm.hrh
+++ b/backends/platform/symbian/src/ScummVm.hrh
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2016 The ScummVM Team
+ * Copyright (C) 2005-2017 The ScummVM Team
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
diff --git a/common/EventMapper.cpp b/common/EventMapper.cpp
index cf65946d50..f84d24b4d0 100644
--- a/common/EventMapper.cpp
+++ b/common/EventMapper.cpp
@@ -35,7 +35,6 @@ List<Event> DefaultEventMapper::mapEvent(const Event &ev, EventSource *source) {
// of middle mouse button.
const uint32 vkeybdTime = 1000;
- static bool vkeybd = false;
static uint32 vkeybdThen = 0;
if (ev.type == EVENT_MBUTTONDOWN) {
diff --git a/common/debug-channels.h b/common/debug-channels.h
index 1414a1053a..0fb8006803 100644
--- a/common/debug-channels.h
+++ b/common/debug-channels.h
@@ -117,7 +117,7 @@ public:
/**
* Test whether the given debug channel is enabled.
*/
- bool isDebugChannelEnabled(uint32 channel);
+ bool isDebugChannelEnabled(uint32 channel, bool enforce = false);
private:
typedef HashMap<String, DebugChannel, IgnoreCase_Hash, IgnoreCase_EqualTo> DebugChannelMap;
diff --git a/common/debug.cpp b/common/debug.cpp
index c61fc63dea..5db8990db8 100644
--- a/common/debug.cpp
+++ b/common/debug.cpp
@@ -110,9 +110,9 @@ void DebugManager::disableAllDebugChannels() {
disableDebugChannel(i->_value.name);
}
-bool DebugManager::isDebugChannelEnabled(uint32 channel) {
+bool DebugManager::isDebugChannelEnabled(uint32 channel, bool enforce) {
// Debug level 11 turns on all special debug level messages
- if (gDebugLevel == 11)
+ if (gDebugLevel == 11 && enforce == false)
return true;
else
return (gDebugChannelsEnabled & channel) != 0;
@@ -125,8 +125,8 @@ bool debugLevelSet(int level) {
}
bool debugChannelSet(int level, uint32 debugChannels) {
- if (gDebugLevel != 11)
- if (level > gDebugLevel || !(DebugMan.isDebugChannelEnabled(debugChannels)))
+ if (gDebugLevel != 11 || level == -1)
+ if ((level != -1 && level > gDebugLevel) || !(DebugMan.isDebugChannelEnabled(debugChannels, level == -1)))
return false;
return true;
diff --git a/common/debug.h b/common/debug.h
index 883a0bf29d..5ec37f2f1e 100644
--- a/common/debug.h
+++ b/common/debug.h
@@ -117,6 +117,7 @@ bool debugLevelSet(int level);
/**
* Returns true if the debug level and channel are active
*
+ * @param level debug level to check against. If set to -1, only channel check is active
* @see enableDebugChannel
*/
bool debugChannelSet(int level, uint32 debugChannels);
diff --git a/common/json.cpp b/common/json.cpp
index 792d1967e9..c8caf01519 100644
--- a/common/json.cpp
+++ b/common/json.cpp
@@ -979,17 +979,13 @@ String JSONValue::stringifyImpl(size_t const indentDepth) const {
if (isinf(_numberValue) || isnan(_numberValue))
ret_string = "null";
else {
- char str[80];
- sprintf(str, "%g", _numberValue);
- ret_string = str;
+ ret_string = String::format("%g", _numberValue);
}
break;
}
case JSONType_IntegerNumber: {
- char str[80];
- sprintf(str, "%lld", _integerValue);
- ret_string = str;
+ ret_string = String::format("%lld", _integerValue);
break;
}
diff --git a/common/safe-bool.h b/common/safe-bool.h
new file mode 100644
index 0000000000..7cbe29931c
--- /dev/null
+++ b/common/safe-bool.h
@@ -0,0 +1,65 @@
+/**
+ * Boost Software License - Version 1.0 - August 17th, 2003
+ *
+ * Permission is hereby granted, free of charge, to any person or organization
+ * obtaining a copy of the software and accompanying documentation covered by
+ * this license (the "Software") to use, reproduce, display, distribute,
+ * execute, and transmit the Software, and to prepare derivative works of the
+ * Software, and to permit third-parties to whom the Software is furnished to
+ * do so, all subject to the following:
+ *
+ * The copyright notices in the Software and this entire statement, including
+ * the above license grant, this restriction and the following disclaimer,
+ * must be included in all copies of the Software, in whole or in part, and
+ * all derivative works of the Software, unless such copies or derivative
+ * works are solely in the form of machine-executable object code generated by
+ * a source language processor.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+ * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef COMMON_SAFE_BOOL_H
+#define COMMON_SAFE_BOOL_H
+
+namespace Common {
+ namespace impl {
+ template <typename T>
+ struct no_base {};
+
+ template <typename T>
+ struct safe_bool_impl {
+ typedef T *TP; // workaround to make parsing easier
+ TP stub;
+ typedef TP safe_bool_impl::*type;
+ };
+ }
+
+ /**
+ * Prevents `operator bool` from implicitly converting to other types.
+ */
+ template <typename DerivedT, typename BaseT = impl::no_base<DerivedT> >
+ struct SafeBool : BaseT {
+ private:
+ typedef impl::safe_bool_impl<DerivedT> impl_t;
+ typedef typename impl_t::type bool_type;
+
+ public:
+ operator bool_type() const {
+ return static_cast<const DerivedT *>(this)->operator_bool() ?
+ &impl_t::stub : 0;
+ }
+
+ operator bool_type() {
+ return static_cast<DerivedT *>(this)->operator_bool() ?
+ &impl_t::stub : 0;
+ }
+ };
+} // End of namespace Common
+
+#endif
diff --git a/common/scummsys.h b/common/scummsys.h
index 959c67a404..6fd9be81c8 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -132,6 +132,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
+ #include <stddef.h>
#include <assert.h>
#include <ctype.h>
// MSVC does not define M_PI, M_SQRT2 and other math defines by default.
@@ -150,6 +151,17 @@
#if !defined(__SYMBIAN32__)
#include <new>
#endif
+
+ /**
+ * Generates a compile-time assertion.
+ *
+ * @param expression An expression that can be evaluated at compile time.
+ * @param message An underscore-delimited message to be presented at compile
+ * time if the expression evaluates to false.
+ */
+ #define STATIC_ASSERT(expression, message) \
+ extern int STATIC_ASSERT_##message[(expression) ? 1 : -1]; \
+ (void)(STATIC_ASSERT_##message);
#endif
// The following math constants are usually defined by the system math.h header, but
diff --git a/common/span.h b/common/span.h
new file mode 100644
index 0000000000..db6110a91c
--- /dev/null
+++ b/common/span.h
@@ -0,0 +1,995 @@
+/* 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 COMMON_SPAN_H
+#define COMMON_SPAN_H
+
+#include "common/file.h"
+#include "common/memstream.h"
+#include "common/safe-bool.h"
+#include "common/scummsys.h"
+#include "common/type-traits.h"
+
+namespace Common {
+
+#define COMMON_SPAN_TYPEDEFS \
+ typedef typename super_type::value_type value_type; \
+ typedef typename super_type::difference_type difference_type; \
+ typedef typename super_type::index_type index_type; \
+ typedef typename super_type::size_type size_type; \
+ typedef typename super_type::const_iterator const_iterator; \
+ typedef typename super_type::iterator iterator; \
+ typedef typename super_type::pointer pointer; \
+ typedef typename super_type::const_pointer const_pointer; \
+ typedef typename super_type::reference reference; \
+ typedef typename super_type::const_reference const_reference;
+
+enum {
+ kSpanMaxSize = 0xFFFFFFFF,
+ kSpanKeepOffset = 0xFFFFFFFF
+};
+
+#pragma mark -
+#pragma mark SpanValidationMode
+
+enum SpanValidationMode {
+ kValidateRead,
+ kValidateWrite,
+ kValidateSeek
+};
+
+namespace SpanInternal {
+#pragma mark -
+#pragma mark SpanIterator
+ /**
+ * Bounds-checked iteration over a span of memory.
+ */
+ template <typename Span, bool IsConst>
+ class SpanIterator {
+ typedef typename Span::value_type span_value_type;
+ typedef typename Conditional<IsConst, const Span, Span>::type span_type;
+
+ public:
+ typedef typename Span::difference_type difference_type;
+ typedef typename RemoveConst<span_value_type>::type value_type;
+ typedef typename Conditional<IsConst, const span_value_type, span_value_type>::type *pointer;
+ typedef typename Conditional<IsConst, const span_value_type, span_value_type>::type &reference;
+
+ inline SpanIterator() : _span(nullptr), _index(0) {}
+
+ inline SpanIterator(span_type *const span, const difference_type index) :
+ _span(span),
+ _index(index) {
+ if (span != nullptr) {
+ span->validate(index, 0, kValidateSeek);
+ }
+ }
+
+ inline SpanIterator(const SpanIterator &other) :
+ _span(other._span),
+ _index(other._index) {}
+
+ inline SpanIterator &operator=(const SpanIterator &other) {
+ _span = other._span;
+ _index = other._index;
+ return *this;
+ }
+
+#pragma mark -
+#pragma mark SpanIterator - Dereferencing operations
+
+ public:
+ inline reference operator*() const {
+ // validation is in Span::operator[]
+ return (*_span)[_index];
+ }
+
+ inline pointer operator->() const {
+ return &operator*();
+ }
+
+ inline reference operator[](const difference_type index) const {
+ // validation is in SpanIterator::operator+=
+ return *(*this + index);
+ }
+
+#pragma mark -
+#pragma mark SpanIterator - Arithmetic operations
+
+ public:
+ inline SpanIterator &operator+=(const difference_type delta) {
+ assert(_span != nullptr);
+ _span->validate(_index, delta, kValidateSeek);
+ _index += delta;
+ return *this;
+ }
+
+ inline SpanIterator &operator-=(const difference_type delta) {
+ return operator+=(-delta);
+ }
+
+ inline SpanIterator &operator++() {
+ return operator+=(1);
+ }
+
+ inline SpanIterator operator++(int) {
+ SpanIterator old(*this);
+ operator+=(1);
+ return old;
+ }
+
+ inline SpanIterator &operator--() {
+ return operator+=(-1);
+ }
+
+ inline SpanIterator operator--(int) {
+ SpanIterator old(*this);
+ operator+=(-1);
+ return old;
+ }
+
+ inline SpanIterator operator+(const difference_type delta) const {
+ SpanIterator it(*this);
+ return it += delta;
+ }
+
+ inline SpanIterator operator-(const difference_type delta) const {
+ return operator+(-delta);
+ }
+
+ inline difference_type operator-(const SpanIterator &other) const {
+ assert(_span == other._span);
+ return _index - other._index;
+ }
+
+#pragma mark -
+#pragma mark SpanIterator - Comparison operations
+
+ public:
+ inline bool operator==(const SpanIterator& other) const {
+ return _span == other._span && _index == other._index;
+ }
+
+ inline bool operator!=(const SpanIterator& other) const {
+ return !operator==(other);
+ }
+
+ inline bool operator<(const SpanIterator& other) const {
+ assert(_span == other._span);
+ return _index < other._index;
+ }
+
+ inline bool operator<=(const SpanIterator& other) const {
+ return !other.operator<(*this);
+ }
+
+ inline bool operator>(const SpanIterator& other) const {
+ return other.operator<(*this);
+ }
+
+ inline bool operator>=(const SpanIterator& other) const {
+ return !operator<(other);
+ }
+
+#pragma mark -
+#pragma mark SpanIterator - Data access convenience functions
+
+ public:
+ inline int8 getInt8() const {
+ return _span->getInt8At(_index);
+ }
+
+ inline uint8 getUint8() const {
+ return _span->getUint8At(_index);
+ }
+
+ inline int16 getInt16BE() const {
+ return _span->getInt16BEAt(_index);
+ }
+
+ inline int16 getInt16LE() const {
+ return _span->getInt16LEAt(_index);
+ }
+
+ inline uint16 getUint16BE() const {
+ return _span->getUint16BEAt(_index);
+ }
+
+ inline uint16 getUint16LE() const {
+ return _span->getUint16LEAt(_index);
+ }
+
+ inline uint32 getUint24LE() const {
+ return _span->getUint24LEAt(_index);
+ }
+
+ inline uint32 getUint32() const {
+ return _span->getUint32At(_index);
+ }
+
+ inline int32 getInt32BE() const {
+ return _span->getInt32BEAt(_index);
+ }
+
+ inline int32 getInt32LE() const {
+ return _span->getInt32LEAt(_index);
+ }
+
+ inline uint32 getUint32BE() const {
+ return _span->getUint32BEAt(_index);
+ }
+
+ inline uint32 getUint32LE() const {
+ return _span->getUint32LEAt(_index);
+ }
+
+ protected:
+ span_type *_span;
+ difference_type _index;
+ };
+} // End of namespace SpanInternal
+
+#pragma mark -
+#pragma mark SpanBase
+
+template <typename ValueType, template <typename> class Derived>
+class SpanBase : public SafeBool<Derived<ValueType> > {
+ typedef Derived<ValueType> derived_type;
+ typedef typename AddConst<derived_type>::type const_derived_type;
+ typedef typename RemoveConst<derived_type>::type mutable_derived_type;
+
+#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
+ template <typename T, bool U> friend class SpanInternal::SpanIterator;
+ template <typename T, template <typename> class U> friend class SpanBase;
+ template <typename T, typename U> friend struct SafeBool;
+#endif
+#ifdef CXXTEST_RUNNING
+ friend class ::SpanTestSuite;
+#endif
+
+public:
+ typedef ValueType value_type;
+ typedef ptrdiff_t difference_type;
+ typedef size_t index_type;
+ typedef size_t size_type;
+ typedef SpanInternal::SpanIterator<derived_type, true> const_iterator;
+ typedef SpanInternal::SpanIterator<derived_type, false> iterator;
+ typedef value_type *pointer;
+ typedef const value_type *const_pointer;
+ typedef value_type &reference;
+ typedef const value_type &const_reference;
+
+ inline size_type byteSize() const { return impl().size() * sizeof(value_type); }
+
+#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
+protected:
+#endif
+ inline SpanBase() {}
+ inline SpanBase(const SpanBase &) {}
+ inline SpanBase &operator=(const SpanBase &) { return this->impl(); }
+ inline ~SpanBase() {}
+
+ inline const_derived_type &impl() const { return static_cast<const_derived_type &>(*this); }
+ inline mutable_derived_type &impl() { return static_cast<mutable_derived_type &>(*this); }
+
+#pragma mark -
+#pragma mark SpanBase - Interface
+
+#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
+protected:
+#endif
+ inline void clear();
+
+ inline size_type size() const;
+
+ inline const_iterator cbegin() const;
+ inline const_iterator cend() const;
+ inline const_iterator begin() const;
+ inline const_iterator end() const;
+ inline iterator begin();
+ inline iterator end();
+
+ inline pointer data() const;
+
+#pragma mark -
+#pragma mark SpanBase - Data access functions
+
+public:
+ inline const_reference operator[](const index_type index) const {
+ impl().validate(index, sizeof(value_type));
+ return impl().data()[index];
+ }
+
+ inline reference operator[](const index_type index) {
+ impl().validate(index, sizeof(value_type));
+ return impl().data()[index];
+ }
+
+ inline int8 getInt8At(const index_type index) const {
+ STATIC_ASSERT(sizeof(value_type) == sizeof(uint8), int8_can_only_be_read_from_byte_or_char_spans);
+ return (int8)getUint8At(index);
+ }
+
+ inline uint8 getUint8At(const index_type index) const {
+ STATIC_ASSERT(sizeof(value_type) == sizeof(uint8), uint8_can_only_be_read_from_byte_or_char_spans);
+ impl().validate(index, sizeof(uint8));
+ return (uint8)impl().data()[index];
+ }
+
+ inline int16 getInt16BEAt(const index_type index) const {
+ STATIC_ASSERT(sizeof(value_type) <= sizeof(uint16), int16_can_only_be_read_from_int16_or_smaller_spans);
+ return (int16)impl().getUint16BEAt(index);
+ }
+
+ inline int16 getInt16LEAt(const index_type index) const {
+ STATIC_ASSERT(sizeof(value_type) <= sizeof(uint16), int16_can_only_be_read_from_int16_or_smaller_spans);
+ return (int16)impl().getUint16LEAt(index);
+ }
+
+ inline uint16 getUint16BEAt(const index_type index) const {
+ STATIC_ASSERT(sizeof(value_type) <= sizeof(uint16), uint16_can_only_be_read_from_int16_or_smaller_spans);
+ impl().validate(index, sizeof(uint16));
+ return READ_BE_UINT16(impl().data() + index);
+ }
+
+ inline uint16 getUint16LEAt(const index_type index) const {
+ STATIC_ASSERT(sizeof(value_type) <= sizeof(uint16), uint16_can_only_be_read_from_int16_or_smaller_spans);
+ impl().validate(index, sizeof(uint16));
+ return READ_LE_UINT16(impl().data() + index);
+ }
+
+ inline uint32 getUint24LEAt(const index_type index) const {
+ STATIC_ASSERT(sizeof(value_type) <= 3, uint24_can_only_be_read_from_int24_or_smaller_spans);
+ impl().validate(index, 3);
+ return READ_LE_UINT24(impl().data() + index);
+ }
+
+ inline uint32 getUint32At(const index_type index) const {
+ STATIC_ASSERT(sizeof(value_type) <= sizeof(uint32), uint32_can_only_be_read_from_int32_or_smaller_spans);
+ impl().validate(index, sizeof(uint32));
+ return READ_UINT32(impl().data() + index);
+ }
+
+ inline int32 getInt32BEAt(const index_type index) const {
+ STATIC_ASSERT(sizeof(value_type) <= sizeof(uint32), int32_can_only_be_read_from_int32_or_smaller_spans);
+ return (int32)impl().getUint32BEAt(index);
+ }
+
+ inline int32 getInt32LEAt(const index_type index) const {
+ STATIC_ASSERT(sizeof(value_type) <= sizeof(uint32), int32_can_only_be_read_from_int32_or_smaller_spans);
+ return (int32)impl().getUint32LEAt(index);
+ }
+
+ inline uint32 getUint32BEAt(const index_type index) const {
+ STATIC_ASSERT(sizeof(value_type) <= sizeof(uint32), uint32_can_only_be_read_from_int32_or_smaller_spans);
+ impl().validate(index, sizeof(uint32));
+ return READ_BE_UINT32(impl().data() + index);
+ }
+
+ inline uint32 getUint32LEAt(const index_type index) const {
+ STATIC_ASSERT(sizeof(value_type) <= sizeof(uint32), uint32_can_only_be_read_from_int32_or_smaller_spans);
+ impl().validate(index, sizeof(uint32));
+ return READ_LE_UINT32(impl().data() + index);
+ }
+
+ inline String getStringAt(const index_type index, size_type numEntries = kSpanMaxSize) const {
+ STATIC_ASSERT(sizeof(value_type) == sizeof(char), strings_can_only_be_read_from_byte_or_char_spans);
+ const char *string = (const char *)impl().data();
+
+ if (numEntries == kSpanMaxSize) {
+ numEntries = strnlen(string, impl().size() - index);
+ }
+
+ impl().validate(index, numEntries);
+ return String(string + index, numEntries);
+ }
+
+ /**
+ * Returns a raw pointer to memory after validating the given index and
+ * size. Use this only in performance-critical code, like processing pixel
+ * data in a loop, where validating each read independently would introduce
+ * unnecessary overhead.
+ */
+ inline const_pointer getUnsafeDataAt(const index_type index, size_type numEntries = kSpanMaxSize) const {
+ if (numEntries == kSpanMaxSize) {
+ numEntries = impl().size() - index;
+ }
+
+ impl().validate(index, numEntries * sizeof(value_type));
+ return impl().data() + index;
+ }
+
+ inline pointer getUnsafeDataAt(const index_type index, size_type numEntries = kSpanMaxSize) {
+ if (numEntries == kSpanMaxSize) {
+ numEntries = impl().size() - index;
+ }
+
+ impl().validate(index, numEntries * sizeof(value_type));
+ return impl().data() + index;
+ }
+
+ inline MemoryReadStream toStream(const index_type index = 0, size_type numEntries = kSpanMaxSize) const {
+ if (numEntries == kSpanMaxSize) {
+ numEntries = impl().size();
+ }
+
+ impl().validate(index, numEntries * sizeof(value_type));
+ return MemoryReadStream(impl().data() + index, numEntries * sizeof(value_type), DisposeAfterUse::NO);
+ }
+
+#pragma mark -
+#pragma mark SpanBase - Operators
+
+public:
+ template <typename Other>
+ inline bool operator==(const Other &other) const {
+ return impl().data() == other.impl().data() && impl().size() == other.impl().size();
+ }
+
+ template <typename Other>
+ inline bool operator!=(const Other &other) const {
+ return !operator==(other);
+ }
+
+ template <typename Other>
+ inline difference_type operator-(const Other &other) const {
+ return impl().data() - other.impl().data();
+ }
+
+ template <typename Other>
+ inline bool operator<(const Other &other) const {
+ return impl().data() < other.impl().data();
+ }
+
+ template <typename Other>
+ inline bool operator<=(const Other &other) const {
+ return !other.operator<(*this);
+ }
+
+ template <typename Other>
+ inline bool operator>(const Other &other) const {
+ return other.operator<(*this);
+ }
+
+ template <typename Other>
+ inline bool operator>=(const Other &other) const {
+ return !operator<(other);
+ }
+
+#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
+protected:
+#endif
+ inline bool operator_bool() const { return impl().data() != nullptr; }
+
+#pragma mark -
+#pragma mark SpanBase - Copying
+
+public:
+ /**
+ * Copies data from this span to a raw pointer. To only copy a portion of
+ * the span, call subspan first.
+ */
+ inline void unsafeCopyDataTo(void *target) const {
+ memcpy(target, impl().data(), impl().byteSize());
+ }
+
+ /**
+ * Copies the data from this span to the given target span. To only copy a
+ * portion of the span, call subspan first.
+ */
+ template <typename Other>
+ inline void copyDataTo(Other &target) const {
+ assert((impl().byteSize() % sizeof(typename Other::value_type)) == 0);
+ target.impl().validate(0, impl().byteSize(), kValidateWrite);
+ memcpy(target.impl().data(), impl().data(), impl().byteSize());
+ }
+
+#pragma mark -
+#pragma mark SpanBase - Validation
+
+#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
+protected:
+#endif
+ /**
+ * @returns true if bounds are invalid.
+ */
+ inline bool checkInvalidBounds(const index_type index, const difference_type deltaInBytes) const {
+ // There is a potential that large bogus values may cause arithmetic
+ // overflow, so the individual operands are checked separately first.
+ // Values that are not allowed to be negative are treated as unsigned to
+ // reduce the number of necessary comparisons
+ const size_t maxByteOffset = index * (signed)sizeof(value_type) + deltaInBytes;
+ return index > impl().size() || deltaInBytes > (difference_type)impl().byteSize() || maxByteOffset > impl().byteSize();
+ }
+
+ inline void validate(const index_type index, const difference_type deltaInBytes, const SpanValidationMode mode = kValidateRead) const {
+ /* LCOV_EXCL_START */
+ if (impl().checkInvalidBounds(index, deltaInBytes)) {
+ error("%s", impl().getValidationMessage(index, deltaInBytes, mode).c_str());
+ }
+ /* LCOV_EXCL_STOP */
+ }
+};
+
+#pragma mark -
+#pragma mark SpanImpl
+
+template <typename ValueType, template <typename> class Derived>
+class SpanImpl : public SpanBase<ValueType, Derived> {
+ typedef SpanBase<ValueType, Derived> super_type;
+ typedef typename AddConst<Derived<ValueType> >::type const_derived_type;
+ typedef typename RemoveConst<Derived<ValueType> >::type mutable_derived_type;
+
+#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
+ template <typename T, template <typename> class U> friend class SpanImpl;
+#endif
+#ifdef CXXTEST_RUNNING
+ friend class ::SpanTestSuite;
+#endif
+
+public:
+ COMMON_SPAN_TYPEDEFS
+
+ inline SpanImpl() : super_type(), _data(nullptr), _size(0) {}
+
+ inline SpanImpl(const pointer data_, const size_type size_) :
+ super_type(),
+ _data(data_),
+ _size(size_) {}
+
+ template <typename Other>
+ inline SpanImpl(const Other &other) :
+ super_type(),
+ _data(other.data()),
+ _size(other.size()) {}
+
+ inline void clear() {
+ _data = nullptr;
+ _size = 0;
+ }
+
+ inline size_type size() const { return _size; }
+ inline pointer data() const { return _data; }
+
+ inline const_iterator cbegin() const { return const_iterator(&this->impl(), 0); }
+ inline const_iterator cend() const { return const_iterator(&this->impl(), size()); }
+ inline const_iterator begin() const { return const_iterator(&this->impl(), 0); }
+ inline const_iterator end() const { return const_iterator(&this->impl(), size()); }
+ inline iterator begin() { return iterator(&this->impl(), 0); }
+ inline iterator end() { return iterator(&this->impl(), size()); }
+
+ const String name() const { return String::format("%p", static_cast<const void *>(data())); }
+
+ String getValidationMessage(const index_type index, const difference_type deltaInBytes, const SpanValidationMode mode) const {
+ const char *modeName;
+ switch (mode) {
+ case kValidateRead:
+ modeName = "reading";
+ break;
+ case kValidateWrite:
+ modeName = "writing";
+ break;
+ case kValidateSeek:
+ modeName = "seeking";
+ break;
+ }
+
+ return String::format("Access violation %s %s: %ld + %ld > %ld",
+ modeName,
+ this->impl().name().c_str(),
+ index,
+ deltaInBytes / sizeof(value_type),
+ size());
+ }
+
+#pragma mark -
+#pragma mark SpanImpl - Subspan
+
+public:
+ template <typename NewValueType>
+ inline const Derived<NewValueType> subspan(const index_type index, size_type numEntries = kSpanMaxSize) const {
+ Derived<NewValueType> span;
+ populateSubspan(span, index, numEntries);
+ return span;
+ }
+
+ template <typename NewValueType>
+ inline Derived<NewValueType> subspan(const index_type index, size_type numEntries = kSpanMaxSize) {
+ Derived<NewValueType> span;
+ populateSubspan(span, index, numEntries);
+ return span;
+ }
+
+ inline const_derived_type subspan(const index_type index, const size_type numEntries = kSpanMaxSize) const {
+ return subspan<value_type>(index, numEntries);
+ }
+
+ inline mutable_derived_type subspan(const index_type index, const size_type numEntries = kSpanMaxSize) {
+ return subspan<value_type>(index, numEntries);
+ }
+
+#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
+protected:
+#endif
+ template <typename NewValueType>
+ void populateSubspan(Derived<NewValueType> &span, const index_type index, size_type numEntries) const {
+ if (numEntries == kSpanMaxSize) {
+ numEntries = CLIP<size_type>(size() - index, 0, size());
+ }
+
+ assert(numEntries * sizeof(value_type) % sizeof(NewValueType) == 0);
+ this->validate(index, numEntries * sizeof(value_type), kValidateSeek);
+
+ span._data = (NewValueType *)const_cast<mutable_value_type *>(_data + index);
+ span._size = numEntries * sizeof(value_type) / sizeof(NewValueType);
+ }
+
+#pragma mark -
+#pragma mark SpanImpl - Allocation
+
+private:
+ typedef typename RemoveConst<value_type>::type mutable_value_type;
+ typedef Derived<mutable_value_type> mutable_value_derived_type;
+
+public:
+ mutable_value_derived_type &allocate(const size_type numEntries) {
+ assert(_data == nullptr);
+ assert(numEntries != kSpanMaxSize);
+ _data = new mutable_value_type[numEntries];
+ _size = numEntries;
+ return (mutable_value_derived_type &)const_cast<Derived<value_type> &>(this->impl());
+ }
+
+ template <typename Other>
+ mutable_value_derived_type &allocateFromSpan(const Other &other) {
+ assert(_data == nullptr);
+ assert(sizeof(value_type) == sizeof(typename Other::value_type));
+ _data = new mutable_value_type[other.size()];
+ _size = other.size();
+ copy(other.begin(), other.end(), const_cast<mutable_value_type *>(_data));
+ return (mutable_value_derived_type &)const_cast<Derived<value_type> &>(this->impl());
+ }
+
+ mutable_value_derived_type &allocateFromStream(SeekableReadStream &stream, size_type numEntries = kSpanMaxSize) {
+ if (numEntries == kSpanMaxSize) {
+ numEntries = (stream.size() - stream.pos()) / sizeof(value_type);
+ }
+
+ const uint32 bytesRequested = numEntries * sizeof(value_type);
+ assert(stream.pos() + bytesRequested <= (uint)stream.size());
+ allocate(numEntries);
+ const uint32 bytesRead = stream.read((void *)const_cast<mutable_value_type *>(_data), bytesRequested);
+ assert(bytesRead == bytesRequested);
+ return (mutable_value_derived_type &)const_cast<Derived<value_type> &>(this->impl());
+ }
+
+ value_type *_data;
+ size_type _size;
+};
+
+#pragma mark -
+#pragma mark Span
+
+template <typename ValueType>
+class Span : public SpanImpl<ValueType, Span> {
+ typedef SpanImpl<ValueType, ::Common::Span> super_type;
+ typedef typename AddConst<Span<ValueType> >::type const_derived_type;
+ typedef typename RemoveConst<Span<ValueType> >::type mutable_derived_type;
+#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
+ template <typename T> friend class Span;
+#endif
+
+public:
+ COMMON_SPAN_TYPEDEFS
+
+ inline Span() : super_type() {}
+
+ inline Span(const pointer data_, const size_type size_) : super_type(data_, size_) {}
+
+ // Allows unrelated sibling classes like NamedSpan to assign to superclass
+ // siblings like Span
+ template <typename Other>
+ inline Span(const Other &other) : super_type(other) {}
+};
+
+#pragma mark -
+#pragma mark NamedSpanImpl
+
+template <typename ValueType, template <typename> class Derived>
+class NamedSpanImpl : public SpanImpl<ValueType, Derived> {
+ typedef SpanImpl<ValueType, Derived> super_type;
+ typedef typename AddConst<Derived<ValueType> >::type const_derived_type;
+ typedef typename RemoveConst<Derived<ValueType> >::type mutable_derived_type;
+
+#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
+ template <typename T, template <typename> class U> friend class NamedSpanImpl;
+#endif
+#ifdef CXXTEST_RUNNING
+ friend class ::SpanTestSuite;
+#endif
+
+public:
+ COMMON_SPAN_TYPEDEFS
+
+ inline NamedSpanImpl() : super_type(), _name(), _sourceByteOffset(0) {}
+
+ inline NamedSpanImpl(const pointer data_,
+ const size_type size_,
+ const String &name_ = String(),
+ const size_type sourceByteOffset_ = 0) :
+ super_type(data_, size_),
+ _name(name_),
+ _sourceByteOffset(sourceByteOffset_) {}
+
+ template <typename Other>
+ inline NamedSpanImpl(const Other &other) :
+ super_type(other),
+ _name(other.name()),
+ _sourceByteOffset(other.sourceByteOffset()) {}
+
+ inline void clear() {
+ super_type::clear();
+ _name.clear();
+ _sourceByteOffset = 0;
+ }
+
+ const String &name() const { return _name; }
+ String &name() { return _name; }
+
+ const size_type &sourceByteOffset() const { return _sourceByteOffset; }
+ size_type &sourceByteOffset() { return _sourceByteOffset; }
+
+private:
+ String _name;
+ size_type _sourceByteOffset;
+
+#pragma mark -
+#pragma mark NamedSpanImpl - Subspan
+
+public:
+ template <typename NewValueType>
+ inline const Derived<NewValueType> subspan(const index_type index, const size_type numEntries = kSpanMaxSize, const String &name_ = String(), const size_type sourceByteOffset_ = kSpanKeepOffset) const {
+ Derived<NewValueType> span;
+ populateSubspan(span, index, numEntries, name_, sourceByteOffset_);
+ return span;
+ }
+
+ template <typename NewValueType>
+ inline Derived<NewValueType> subspan(const index_type index, const size_type numEntries = kSpanMaxSize, const String &name_ = String(), const size_type sourceByteOffset_ = kSpanKeepOffset) {
+ Derived<NewValueType> span;
+ populateSubspan(span, index, numEntries, name_, sourceByteOffset_);
+ return span;
+ }
+
+ inline const_derived_type subspan(const index_type index, const size_type numEntries = kSpanMaxSize, const String &name_ = String(), const size_type sourceByteOffset_ = kSpanKeepOffset) const {
+ return subspan<value_type>(index, numEntries, name_, sourceByteOffset_);
+ }
+
+ inline mutable_derived_type subspan(const index_type index, const size_type numEntries = kSpanMaxSize, const String &name_ = String(), const size_type sourceByteOffset_ = kSpanKeepOffset) {
+ return subspan<value_type>(index, numEntries, name_, sourceByteOffset_);
+ }
+
+#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
+protected:
+#endif
+ template <typename NewValueType>
+ void populateSubspan(Derived<NewValueType> &span, const index_type index, size_type numEntries, const String &name_, const size_type sourceByteOffset_ = kSpanKeepOffset) const {
+ super_type::template populateSubspan<NewValueType>(span, index, numEntries);
+
+ if (name_.empty()) {
+ span._name = _name;
+ } else {
+ span._name = name_;
+ }
+
+ if (sourceByteOffset_ == kSpanKeepOffset) {
+ span._sourceByteOffset = _sourceByteOffset + index * sizeof(value_type);
+ } else {
+ span._sourceByteOffset = sourceByteOffset_;
+ }
+ }
+
+#pragma mark -
+#pragma mark NamedSpanImpl - Validation
+
+public:
+ String getValidationMessage(const index_type index, const difference_type deltaInBytes, const SpanValidationMode mode) const {
+ const index_type indexInBytes = index * sizeof(value_type);
+ const size_type maxSizeInBytes = this->impl().byteSize();
+
+ return super_type::getValidationMessage(index, deltaInBytes, mode) +
+ String::format(" (abs: %ld + %ld > %ld)",
+ this->impl().sourceByteOffset() + indexInBytes,
+ deltaInBytes,
+ this->impl().sourceByteOffset() + maxSizeInBytes);
+ }
+
+#pragma mark -
+#pragma mark NamedSpanImpl - Allocation
+
+private:
+ typedef typename RemoveConst<value_type>::type mutable_value_type;
+ typedef Derived<mutable_value_type> mutable_value_derived_type;
+
+public:
+ mutable_value_derived_type &allocate(const size_type numEntries, const String &name_ = String()) {
+ super_type::allocate(numEntries);
+ _name = name_;
+ _sourceByteOffset = 0;
+ return (mutable_value_derived_type &)const_cast<Derived<value_type> &>(this->impl());
+ }
+
+ template <typename OtherValueType>
+ mutable_value_derived_type &allocateFromSpan(const NamedSpanImpl<OtherValueType, Derived> &other) {
+ super_type::allocateFromSpan(other);
+ _name = other.name();
+ _sourceByteOffset = other.sourceByteOffset();
+ return (mutable_value_derived_type &)const_cast<Derived<value_type> &>(this->impl());
+ }
+
+ template <typename OtherValueType, template <typename> class OtherDerived>
+ mutable_value_derived_type &allocateFromSpan(const SpanImpl<OtherValueType, OtherDerived> &other) {
+ super_type::allocateFromSpan(other);
+ return (mutable_value_derived_type &)const_cast<Derived<value_type> &>(this->impl());
+ }
+
+ mutable_value_derived_type &allocateFromStream(SeekableReadStream &stream, size_type numEntries = kSpanMaxSize, const String &name_ = String()) {
+ super_type::allocateFromStream(stream, numEntries);
+ _name = name_;
+ _sourceByteOffset = 0;
+ return (mutable_value_derived_type &)const_cast<Derived<value_type> &>(this->impl());
+ }
+
+ mutable_value_derived_type &allocateFromStream(File &file, const size_type numEntries = kSpanMaxSize) {
+ return allocateFromStream(file, numEntries, file.getName());
+ }
+};
+
+#pragma mark -
+#pragma mark NamedSpan
+
+template <typename ValueType>
+class NamedSpan : public NamedSpanImpl<ValueType, NamedSpan> {
+ typedef NamedSpanImpl<ValueType, ::Common::NamedSpan> super_type;
+
+#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
+ template <typename T> friend class NamedSpan;
+#endif
+
+public:
+ COMMON_SPAN_TYPEDEFS
+
+ inline NamedSpan() : super_type() {}
+
+ inline NamedSpan(const pointer data_,
+ const size_type size_,
+ const String &name_ = String(),
+ const size_type sourceByteOffset_ = 0) :
+ super_type(data_, size_, name_, sourceByteOffset_) {}
+
+ template <typename Other>
+ inline NamedSpan(const Other &other) : super_type(other) {}
+};
+
+#pragma mark -
+#pragma mark SpanOwner
+
+/**
+ * Similar to ScopedPtr, but allows holding and disposing pointers inside Spans
+ * without requiring an additional pointer to data, and with copyability.
+ */
+template <typename OwnedSpan>
+class SpanOwner : public SafeBool<SpanOwner<OwnedSpan> > {
+ typedef typename OwnedSpan::value_type value_type;
+ typedef typename OwnedSpan::size_type size_type;
+ typedef typename OwnedSpan::index_type index_type;
+ typedef typename OwnedSpan::pointer pointer;
+ typedef typename OwnedSpan::reference reference;
+ typedef typename OwnedSpan::const_reference const_reference;
+
+#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
+ template <typename T, typename U> friend struct SafeBool;
+#endif
+
+public:
+ inline SpanOwner() : _span() {}
+
+ inline SpanOwner(const OwnedSpan &span) : _span(span) {}
+
+ /**
+ * Creates a new owned copy of the memory from the other SpanOwner.
+ */
+ inline SpanOwner(const SpanOwner &other) {
+ // Allocating memory when copy-constructing from an unallocated owner
+ // will break the new owner by making it appear allocated even though
+ // it doesn't (and shouldn't) contain data
+ if (!other) {
+ SpanOwner();
+ return;
+ }
+
+ _span.allocateFromSpan(other._span);
+ }
+
+ /**
+ * Transfers ownership of the Span from the other owner to this owner.
+ * If this owner already holds another Span, the old Span will be destroyed.
+ */
+ inline SpanOwner &operator=(SpanOwner &other) {
+ if (this == &other) {
+ return *this;
+ }
+
+ if (_span.data()) {
+ delete[] const_cast<typename RemoveConst<value_type>::type *>(_span.data());
+ }
+ _span = other._span;
+ other.release();
+ return *this;
+ }
+
+ inline ~SpanOwner() {
+ delete[] const_cast<typename RemoveConst<value_type>::type *>(_span.data());
+ }
+
+ /**
+ * Releases the memory owned by this SpanOwner to the caller.
+ */
+ inline pointer release() {
+ pointer data = _span.data();
+ _span.clear();
+ return data;
+ }
+
+ /**
+ * Destroys the memory owned by this owner.
+ */
+ inline void clear() {
+ delete[] const_cast<typename RemoveConst<value_type>::type *>(_span.data());
+ _span.clear();
+ }
+
+#if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
+protected:
+#endif
+ inline bool operator_bool() const { return _span; }
+
+private:
+ OwnedSpan _span;
+
+#pragma mark -
+#pragma mark SpanOwner - Data access
+
+public:
+ inline const OwnedSpan &operator*() const { return _span; }
+ inline OwnedSpan &operator*() { return _span; }
+
+ inline const OwnedSpan *operator->() const { return &_span; }
+ inline OwnedSpan *operator->() { return &_span; }
+
+ inline const_reference operator[](const index_type index) const { return _span[index]; }
+ inline reference operator[](const index_type index) { return _span[index]; }
+};
+
+} // End of namespace Common
+
+#endif
diff --git a/common/str.cpp b/common/str.cpp
index 90bd539790..3a0fd6a08e 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -942,6 +942,13 @@ size_t strlcat(char *dst, const char *src, size_t size) {
return dstLength + (src - srcStart);
}
+size_t strnlen(const char *src, size_t maxSize) {
+ size_t counter = 0;
+ while (counter != maxSize && *src++)
+ ++counter;
+ return counter;
+}
+
} // End of namespace Common
// Portable implementation of stricmp / strcasecmp / strcmpi.
diff --git a/common/str.h b/common/str.h
index d55ba072a9..ba1e0b8341 100644
--- a/common/str.h
+++ b/common/str.h
@@ -445,6 +445,17 @@ size_t strlcpy(char *dst, const char *src, size_t size);
size_t strlcat(char *dst, const char *src, size_t size);
/**
+ * Determine the length of a string up to a maximum of `maxSize` characters.
+ * This should be used instead of `strlen` when reading the length of a C string
+ * from potentially unsafe or corrupt sources, like game assets.
+ *
+ * @param src The source string.
+ * @param maxSize The maximum size of the string.
+ * @return The length of the string.
+ */
+size_t strnlen(const char *src, size_t maxSize);
+
+/**
* Convenience wrapper for tag2string which "returns" a C string.
* Note: It is *NOT* safe to do anything with the return value other than directly
* copying or printing it.
diff --git a/common/type-traits.h b/common/type-traits.h
new file mode 100644
index 0000000000..4b17317374
--- /dev/null
+++ b/common/type-traits.h
@@ -0,0 +1,34 @@
+/* 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 COMMON_TYPE_TRAITS_H
+#define COMMON_TYPE_TRAITS_H
+
+namespace Common {
+ template <bool b, class T, class U> struct Conditional { typedef T type; };
+ template <class T, class U> struct Conditional<false, T, U> { typedef U type; };
+ template <typename T> struct RemoveConst { typedef T type; };
+ template <typename T> struct RemoveConst<const T> { typedef T type; };
+ template <typename T> struct AddConst { typedef const T type; };
+} // End of namespace Common
+
+#endif
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 8eba73d7b3..6072120a15 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -1527,7 +1527,8 @@ void ProjectProvider::addFilesToProject(const std::string &dir, std::ofstream &p
StringList duplicate;
for (StringList::const_iterator i = includeList.begin(); i != includeList.end(); ++i) {
- const std::string fileName = getLastPathComponent(*i);
+ std::string fileName = getLastPathComponent(*i);
+ std::transform(fileName.begin(), fileName.end(), fileName.begin(), tolower);
// Leave out non object file names.
if (fileName.size() < 2 || fileName.compare(fileName.size() - 2, 2, ".o"))
@@ -1540,7 +1541,9 @@ void ProjectProvider::addFilesToProject(const std::string &dir, std::ofstream &p
// Search for duplicates
StringList::const_iterator j = i; ++j;
for (; j != includeList.end(); ++j) {
- if (fileName == getLastPathComponent(*j)) {
+ std::string candidateFileName = getLastPathComponent(*j);
+ std::transform(candidateFileName.begin(), candidateFileName.end(), candidateFileName.begin(), tolower);
+ if (fileName == candidateFileName) {
duplicate.push_back(fileName);
break;
}
diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index 2c6a89543f..3accce4e05 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -514,7 +514,9 @@ void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream
if (!_compileFiles.empty()) {
projectFile << "\t<ItemGroup>\n";
for (std::list<FileEntry>::const_iterator entry = _compileFiles.begin(); entry != _compileFiles.end(); ++entry) {
- const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), (*entry).name + ".o") != duplicate.end());
+ std::string fileName = (*entry).name + ".o";
+ std::transform(fileName.begin(), fileName.end(), fileName.begin(), tolower);
+ const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), fileName) != duplicate.end());
// Deal with duplicated file names
if (isDuplicate) {
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp
index 96fdbdf27a..d63c347b17 100644
--- a/devtools/create_project/visualstudio.cpp
+++ b/devtools/create_project/visualstudio.cpp
@@ -338,7 +338,9 @@ void VisualStudioProvider::writeFileListToProject(const FileNode &dir, std::ofst
if (producesObjectFile(node->name)) {
std::string name, ext;
splitFilename(node->name, name, ext);
- const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), name + ".o") != duplicate.end());
+ name += ".o";
+ std::transform(name.begin(), name.end(), name.begin(), tolower);
+ const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), name) != duplicate.end());
if (ext == "asm") {
std::string objFileName = "$(IntDir)\\";
diff --git a/devtools/create_titanic/create_titanic_dat.cpp b/devtools/create_titanic/create_titanic_dat.cpp
index 39fb8b8855..0454f876ba 100644
--- a/devtools/create_titanic/create_titanic_dat.cpp
+++ b/devtools/create_titanic/create_titanic_dat.cpp
@@ -416,7 +416,7 @@ static const BedheadEntry OFF_RESTING_D_WRONG[1] = {
{ "Any", "Any", "Any", "ClosedWrong", 59, 70 }
};
-static const char *const STRINGS_EN[133] = {
+static const char *const STRINGS_EN[137] = {
"",
"You are standing outside the Pellerator.",
"I'm sorry, you cannot enter this pellerator at present as a bot is in the way.",
@@ -554,10 +554,14 @@ static const char *const STRINGS_EN[133] = {
"1st class",
"2nd class",
"SGT class",
- "no class"
+ "no class",
+ "Your assigned room: ",
+ "A previously assigned room: ",
+ "Saved Chevron: ",
+ "Current location: "
};
-static const char *const STRINGS_DE[178] = {
+static const char *const STRINGS_DE[182] = {
// TODO: Still many strings to translate to German
"",
"Sie befinden sich vor dem Pellerator.",
@@ -712,6 +716,10 @@ static const char *const STRINGS_DE[178] = {
"2nd class",
"SGT class",
"no class",
+ "Your assigned room: ",
+ "A previously assigned room: ",
+ "Saved Chevron: ",
+ "Current location: ",
"Sommer",
"Herbst",
@@ -1091,8 +1099,9 @@ void writeStarfieldPoints2() {
}
void writePhrases(const char *name, const CommonPhrase *phrases) {
+ outputFile.seek(dataOffset);
+
for (uint idx = 0; phrases->_str; ++idx, ++phrases) {
- outputFile.seek(dataOffset + idx * 4);
outputFile.writeString(phrases->_str);
outputFile.writeLong(phrases->_dialogueId);
outputFile.writeLong(phrases->_roomNum);
@@ -1241,8 +1250,8 @@ void writeData() {
writeStringArray("TEXT/ITEM_NAMES", ITEM_NAMES, 46);
writeStringArray("TEXT/ITEM_IDS", ITEM_IDS, 40);
writeStringArray("TEXT/ROOM_NAMES", ROOM_NAMES, 34);
- writeStringArray("TEXT/STRINGS", STRINGS_EN, 133);
- writeStringArray("TEXT/STRINGS/DE", STRINGS_DE, 178);
+ writeStringArray("TEXT/STRINGS", STRINGS_EN, 137);
+ writeStringArray("TEXT/STRINGS/DE", STRINGS_DE, 182);
const int TEXT_PHRASES[3] = { 0x61D3C8, 0x618340, 0x61B1E0 };
const int TEXT_REPLACEMENTS1[3] = { 0x61D9B0, 0x61C788, 0x61B7C8 };
const int TEXT_REPLACEMENTS2[3] = { 0x61DD20, 0x61CAF8, 0x61BB38 };
diff --git a/dists/debian/copyright b/dists/debian/copyright
index 06705fd6bc..0123b2886c 100644
--- a/dists/debian/copyright
+++ b/dists/debian/copyright
@@ -7,7 +7,7 @@ It was downloaded from <http://www.scummvm.org/>.
Upstream Authors: see `/usr/share/doc/scummvm/AUTHORS'.
-ScummVM is Copyright © 2002-2016 The ScummVM Team
+ScummVM is Copyright © 2002-2017 The ScummVM Team
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
diff --git a/dists/macosx/Info.plist b/dists/macosx/Info.plist
index aeab8eaf2d..ab0bf4db27 100644
--- a/dists/macosx/Info.plist
+++ b/dists/macosx/Info.plist
@@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>scummvm</string>
<key>CFBundleGetInfoString</key>
- <string>1.10.0git, Copyright 2001-2016 The ScummVM Team</string>
+ <string>1.10.0git, Copyright 2001-2017 The ScummVM Team</string>
<key>CFBundleIconFile</key>
<string>scummvm.icns</string>
<key>CFBundleIdentifier</key>
@@ -49,7 +49,7 @@
<key>CFBundleVersion</key>
<string>1.10.0git</string>
<key>NSHumanReadableCopyright</key>
- <string>Copyright 2001-2016 The ScummVM Team</string>
+ <string>Copyright 2001-2017 The ScummVM Team</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>SUFeedURL</key>
diff --git a/dists/macosx/Info.plist.in b/dists/macosx/Info.plist.in
index c5f54fe3f0..db740769ef 100644
--- a/dists/macosx/Info.plist.in
+++ b/dists/macosx/Info.plist.in
@@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>scummvm</string>
<key>CFBundleGetInfoString</key>
- <string>@VERSION@, Copyright 2001-2016 The ScummVM Team</string>
+ <string>@VERSION@, Copyright 2001-2017 The ScummVM Team</string>
<key>CFBundleIconFile</key>
<string>scummvm.icns</string>
<key>CFBundleIdentifier</key>
@@ -49,7 +49,7 @@
<key>CFBundleVersion</key>
<string>@VERSION@</string>
<key>NSHumanReadableCopyright</key>
- <string>Copyright 2001-2016 The ScummVM Team</string>
+ <string>Copyright 2001-2017 The ScummVM Team</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>SUFeedURL</key>
diff --git a/dists/macosx/dockplugin/Info.plist b/dists/macosx/dockplugin/Info.plist
index a8eab8afd8..dc2a4fda45 100644
--- a/dists/macosx/dockplugin/Info.plist
+++ b/dists/macosx/dockplugin/Info.plist
@@ -19,7 +19,7 @@
<key>CFBundleVersion</key>
<string>1.10.0git</string>
<key>NSHumanReadableCopyright</key>
- <string>Copyright 2001-2016 The ScummVM Team</string>
+ <string>Copyright 2001-2017 The ScummVM Team</string>
<key>NSPrincipalClass</key>
<string>ScummVMDockTilePlugIn</string>
</dict>
diff --git a/dists/macosx/dockplugin/Info.plist.in b/dists/macosx/dockplugin/Info.plist.in
index 851fc70f11..57699e6151 100644
--- a/dists/macosx/dockplugin/Info.plist.in
+++ b/dists/macosx/dockplugin/Info.plist.in
@@ -19,7 +19,7 @@
<key>CFBundleVersion</key>
<string>@VERSION@</string>
<key>NSHumanReadableCopyright</key>
- <string>Copyright 2001-2016 The ScummVM Team</string>
+ <string>Copyright 2001-2017 The ScummVM Team</string>
<key>NSPrincipalClass</key>
<string>ScummVMDockTilePlugIn</string>
</dict>
diff --git a/dists/scummvm.rc b/dists/scummvm.rc
index 699f5ce871..5fa760e06b 100644
--- a/dists/scummvm.rc
+++ b/dists/scummvm.rc
@@ -88,7 +88,7 @@ BEGIN
VALUE "FileDescription", "http://www.scummvm.org/\0"
VALUE "FileVersion", "1.10.0git\0"
VALUE "InternalName", "scummvm\0"
- VALUE "LegalCopyright", "Copyright © 2001-2016 The ScummVM Team\0"
+ VALUE "LegalCopyright", "Copyright © 2001-2017 The ScummVM Team\0"
VALUE "LegalTrademarks", "'SCUMM', and all SCUMM games are a TM of LucasArts. Simon The Sorcerer is a TM of AdventureSoft. Beneath a Steel Sky and Broken Sword are a TM of Revolution. Flight of the Amazon Queen is a TM of John Passfield and Steve Stamatiadis. \0"
VALUE "OriginalFilename", "scummvm.exe\0"
VALUE "ProductName", "ScummVM\0"
diff --git a/dists/scummvm.rc.in b/dists/scummvm.rc.in
index f78aa3acf5..411dbcaa7b 100644
--- a/dists/scummvm.rc.in
+++ b/dists/scummvm.rc.in
@@ -88,7 +88,7 @@ BEGIN
VALUE "FileDescription", "http://www.scummvm.org/\0"
VALUE "FileVersion", "@VERSION@\0"
VALUE "InternalName", "scummvm\0"
- VALUE "LegalCopyright", "Copyright © 2001-2016 The ScummVM Team\0"
+ VALUE "LegalCopyright", "Copyright © 2001-2017 The ScummVM Team\0"
VALUE "LegalTrademarks", "'SCUMM', and all SCUMM games are a TM of LucasArts. Simon The Sorcerer is a TM of AdventureSoft. Beneath a Steel Sky and Broken Sword are a TM of Revolution. Flight of the Amazon Queen is a TM of John Passfield and Steve Stamatiadis. \0"
VALUE "OriginalFilename", "scummvm.exe\0"
VALUE "ProductName", "ScummVM\0"
diff --git a/dists/win32/ScummVM.iss b/dists/win32/ScummVM.iss
index 6a5b7d91da..a4a63f4df4 100644
--- a/dists/win32/ScummVM.iss
+++ b/dists/win32/ScummVM.iss
@@ -1,5 +1,5 @@
[Setup]
-AppCopyright=2016
+AppCopyright=2017
AppName=ScummVM
AppVerName=ScummVM Git
AppPublisher=The ScummVM Team
diff --git a/dists/win32/migration.bat b/dists/win32/migration.bat
index 0ab38653f6..6ec7806b5f 100644
--- a/dists/win32/migration.bat
+++ b/dists/win32/migration.bat
@@ -4,7 +4,7 @@
:: This script will copy any saved games located in the
:: old default location, to the new default location.
::
-:: (c) 2012-2016 ScummVM Team
+:: (c) 2012-2017 ScummVM Team
::
@echo off
diff --git a/engines/access/POTFILES b/engines/access/POTFILES
new file mode 100644
index 0000000000..eafbe17056
--- /dev/null
+++ b/engines/access/POTFILES
@@ -0,0 +1 @@
+engines/access/resources.cpp
diff --git a/engines/access/resources.cpp b/engines/access/resources.cpp
index 096fb15b35..a7b23eb56d 100644
--- a/engines/access/resources.cpp
+++ b/engines/access/resources.cpp
@@ -24,6 +24,7 @@
#include "access/access.h"
#include "access/amazon/amazon_resources.h"
#include "access/martian/martian_resources.h"
+#include "common/translation.h"
namespace Access {
@@ -38,8 +39,9 @@ Resources *Resources::init(AccessEngine *vm) {
bool Resources::load(Common::String &errorMessage) {
Common::File f;
- if (!f.open("access.dat")) {
- errorMessage = "Could not locate required access.dat file";
+ Common::String filename = "access.dat";
+ if (!f.open(filename.c_str())) {
+ errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
return false;
}
@@ -47,7 +49,7 @@ bool Resources::load(Common::String &errorMessage) {
char buffer[4];
f.read(buffer, 4);
if (strncmp(buffer, "SVMA", 4)) {
- errorMessage = "Located access.dat file had invalid contents";
+ errorMessage = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
return false;
}
@@ -56,8 +58,8 @@ bool Resources::load(Common::String &errorMessage) {
uint version = f.readUint16LE();
if (version != expectedVersion) {
errorMessage = Common::String::format(
- "Incorrect version of access.dat found. Expected %d but got %d",
- expectedVersion, version);
+ _("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+ filename.c_str(), expectedVersion, 0, version, 0);
return false;
}
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index 63b0937354..c1c3820b10 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -56,11 +56,14 @@ AdlEngine::AdlEngine(OSystem *syst, const AdlGameDescription *gd) :
_dumpFile(nullptr),
_display(nullptr),
_graphics(nullptr),
+ _speaker(nullptr),
_isRestarting(false),
_isRestoring(false),
_isQuitting(false),
_skipOneCommand(false),
_gameDescription(gd),
+ _console(nullptr),
+ _messageIds(),
_saveVerb(0),
_saveNoun(0),
_restoreVerb(0),
@@ -246,6 +249,10 @@ void AdlEngine::loadWords(Common::ReadStream &stream, WordMap &map, Common::Stri
if (synonyms == 0xff)
break;
+ // WORKAROUND: Missing noun list terminator in hires5 region 15
+ if (_gameDescription->gameType == GAME_TYPE_HIRES5 && _state.region == 15 && index == 81)
+ return;
+
for (uint i = 0; i < synonyms; ++i) {
if (stream.read((char *)buf, IDI_WORD_SIZE) < IDI_WORD_SIZE)
error("Error reading word list");
@@ -296,6 +303,30 @@ void AdlEngine::readCommands(Common::ReadStream &stream, Commands &commands) {
}
}
+void AdlEngine::removeCommand(Commands &commands, uint idx) {
+ Commands::iterator cmds;
+ uint i = 0;
+ for (cmds = commands.begin(); cmds != commands.end(); ++cmds) {
+ if (i++ == idx) {
+ commands.erase(cmds);
+ return;
+ }
+ }
+
+ error("Command %d not found", idx);
+}
+
+Command &AdlEngine::getCommand(Commands &commands, uint idx) {
+ Commands::iterator cmds;
+ uint i = 0;
+ for (cmds = commands.begin(); cmds != commands.end(); ++cmds) {
+ if (i++ == idx)
+ return *cmds;
+ }
+
+ error("Command %d not found", idx);
+}
+
void AdlEngine::checkInput(byte verb, byte noun) {
// Try room-local command list first
if (doOneCommand(_roomData.commands, verb, noun))
@@ -399,6 +430,11 @@ void AdlEngine::initState() {
initGameState();
}
+void AdlEngine::switchRoom(byte roomNr) {
+ getCurRoom().curPicture = getCurRoom().picture;
+ _state.room = roomNr;
+}
+
byte AdlEngine::roomArg(byte room) const {
return room;
}
@@ -428,6 +464,20 @@ void AdlEngine::bell(uint count) const {
_speaker->bell(count);
}
+const Region &AdlEngine::getRegion(uint i) const {
+ if (i < 1 || i > _state.regions.size())
+ error("Region %i out of range [1, %i]", i, _state.regions.size());
+
+ return _state.regions[i - 1];
+}
+
+Region &AdlEngine::getRegion(uint i) {
+ if (i < 1 || i > _state.regions.size())
+ error("Region %i out of range [1, %i]", i, _state.regions.size());
+
+ return _state.regions[i - 1];
+}
+
const Room &AdlEngine::getRoom(uint i) const {
if (i < 1 || i > _state.rooms.size())
error("Room %i out of range [1, %i]", i, _state.rooms.size());
@@ -442,6 +492,14 @@ Room &AdlEngine::getRoom(uint i) {
return _state.rooms[i - 1];
}
+const Region &AdlEngine::getCurRegion() const {
+ return getRegion(_state.region);
+}
+
+Region &AdlEngine::getCurRegion() {
+ return getRegion(_state.region);
+}
+
const Room &AdlEngine::getCurRoom() const {
return getRoom(_state.room);
}
@@ -488,26 +546,25 @@ void AdlEngine::takeItem(byte noun) {
Common::List<Item>::iterator item;
for (item = _state.items.begin(); item != _state.items.end(); ++item) {
- if (item->noun != noun || item->room != _state.room)
- continue;
-
- if (item->state == IDI_ITEM_DOESNT_MOVE) {
- printMessage(_messageIds.itemDoesntMove);
- return;
- }
-
- if (item->state == IDI_ITEM_DROPPED) {
- item->room = IDI_ANY;
- return;
- }
+ if (item->noun == noun && item->room == _state.room && item->region == _state.region) {
+ if (item->state == IDI_ITEM_DOESNT_MOVE) {
+ printMessage(_messageIds.itemDoesntMove);
+ return;
+ }
- Common::Array<byte>::const_iterator pic;
- for (pic = item->roomPictures.begin(); pic != item->roomPictures.end(); ++pic) {
- if (*pic == getCurRoom().curPicture) {
+ if (item->state == IDI_ITEM_DROPPED) {
item->room = IDI_ANY;
- item->state = IDI_ITEM_DROPPED;
return;
}
+
+ Common::Array<byte>::const_iterator pic;
+ for (pic = item->roomPictures.begin(); pic != item->roomPictures.end(); ++pic) {
+ if (*pic == getCurRoom().curPicture) {
+ item->room = IDI_ANY;
+ item->state = IDI_ITEM_DROPPED;
+ return;
+ }
+ }
}
}
@@ -518,17 +575,71 @@ void AdlEngine::dropItem(byte noun) {
Common::List<Item>::iterator item;
for (item = _state.items.begin(); item != _state.items.end(); ++item) {
- if (item->noun != noun || item->room != IDI_ANY)
- continue;
-
- item->room = _state.room;
- item->state = IDI_ITEM_DROPPED;
- return;
+ if (item->noun == noun && item->room == IDI_ANY) {
+ item->room = _state.room;
+ item->region = _state.region;
+ item->state = IDI_ITEM_DROPPED;
+ return;
+ }
}
printMessage(_messageIds.dontUnderstand);
}
+void AdlEngine::gameLoop() {
+ uint verb = 0, noun = 0;
+ _isRestarting = false;
+
+ // When restoring from the launcher, we don't read
+ // input on the first iteration. This is needed to
+ // ensure that restoring from the launcher and
+ // restoring in-game brings us to the same game state.
+ // (Also see comment below.)
+ if (!_isRestoring) {
+ showRoom();
+
+ if (_isRestarting)
+ return;
+
+ _canSaveNow = _canRestoreNow = true;
+ getInput(verb, noun);
+ _canSaveNow = _canRestoreNow = false;
+
+ if (shouldQuit())
+ return;
+
+ // If we just restored from the GMM, we skip this command
+ // set, as no command has been input by the user
+ if (!_isRestoring)
+ checkInput(verb, noun);
+ }
+
+ if (_isRestoring) {
+ // We restored from the GMM or launcher. As restoring
+ // with "RESTORE GAME" does not end command processing,
+ // we don't break it off here either. This essentially
+ // means that restoring a game will always run through
+ // the global commands and increase the move counter
+ // before the first user input.
+ _display->printAsciiString("\r");
+ _isRestoring = false;
+ verb = _restoreVerb;
+ noun = _restoreNoun;
+ }
+
+ // Restarting does end command processing
+ if (_isRestarting)
+ return;
+
+ doAllCommands(_globalCommands, verb, noun);
+
+ if (_isRestarting)
+ return;
+
+ advanceClock();
+ _state.moves++;
+}
+
Common::Error AdlEngine::run() {
initGraphics(DISPLAY_WIDTH * 2, DISPLAY_HEIGHT * 2, true);
@@ -554,59 +665,8 @@ Common::Error AdlEngine::run() {
_display->setMode(DISPLAY_MODE_MIXED);
- while (!_isQuitting) {
- uint verb = 0, noun = 0;
- _isRestarting = false;
-
- // When restoring from the launcher, we don't read
- // input on the first iteration. This is needed to
- // ensure that restoring from the launcher and
- // restoring in-game brings us to the same game state.
- // (Also see comment below.)
- if (!_isRestoring) {
- showRoom();
-
- if (_isRestarting)
- continue;
-
- _canSaveNow = _canRestoreNow = true;
- getInput(verb, noun);
- _canSaveNow = _canRestoreNow = false;
-
- if (shouldQuit())
- break;
-
- // If we just restored from the GMM, we skip this command
- // set, as no command has been input by the user
- if (!_isRestoring)
- checkInput(verb, noun);
- }
-
- if (_isRestoring) {
- // We restored from the GMM or launcher. As restoring
- // with "RESTORE GAME" does not end command processing,
- // we don't break it off here either. This essentially
- // means that restoring a game will always run through
- // the global commands and increase the move counter
- // before the first user input.
- _display->printAsciiString("\r");
- _isRestoring = false;
- verb = _restoreVerb;
- noun = _restoreNoun;
- }
-
- // Restarting does end command processing
- if (_isRestarting)
- continue;
-
- doAllCommands(_globalCommands, verb, noun);
-
- if (_isRestarting)
- continue;
-
- advanceClock();
- _state.moves++;
- }
+ while (!(_isQuitting || shouldQuit()))
+ gameLoop();
return Common::kNoError;
}
@@ -622,6 +682,49 @@ bool AdlEngine::hasFeature(EngineFeature f) const {
}
}
+void AdlEngine::loadState(Common::ReadStream &stream) {
+ _state.room = stream.readByte();
+ _state.moves = stream.readByte();
+ _state.isDark = stream.readByte();
+ _state.time.hours = stream.readByte();
+ _state.time.minutes = stream.readByte();
+
+ uint32 size = stream.readUint32BE();
+ if (size != _state.rooms.size())
+ error("Room count mismatch (expected %i; found %i)", _state.rooms.size(), size);
+
+ for (uint i = 0; i < size; ++i) {
+ _state.rooms[i].picture = stream.readByte();
+ _state.rooms[i].curPicture = stream.readByte();
+ _state.rooms[i].isFirstTime = stream.readByte();
+ }
+
+ // NOTE: _state.curPicture is part of the save state in the original engine. We
+ // reconstruct it instead. This is believed to be safe for at least hires 0-2, but
+ // this may need to be re-evaluated for later games.
+ _state.curPicture = getCurRoom().curPicture;
+
+ size = stream.readUint32BE();
+ if (size != _state.items.size())
+ error("Item count mismatch (expected %i; found %i)", _state.items.size(), size);
+
+ Common::List<Item>::iterator item;
+ for (item = _state.items.begin(); item != _state.items.end(); ++item) {
+ item->room = stream.readByte();
+ item->picture = stream.readByte();
+ item->position.x = stream.readByte();
+ item->position.y = stream.readByte();
+ item->state = stream.readByte();
+ }
+
+ size = stream.readUint32BE();
+ if (size != _state.vars.size())
+ error("Variable count mismatch (expected %i; found %i)", _state.vars.size(), size);
+
+ for (uint i = 0; i < size; ++i)
+ _state.vars[i] = stream.readByte();
+}
+
Common::Error AdlEngine::loadGameState(int slot) {
Common::String fileName = Common::String::format("%s.s%02d", _targetName.c_str(), slot);
Common::InSaveFile *inFile = getSaveFileManager()->openForLoading(fileName);
@@ -654,47 +757,7 @@ Common::Error AdlEngine::loadGameState(int slot) {
Graphics::skipThumbnail(*inFile);
initState();
-
- _state.room = inFile->readByte();
- _state.moves = inFile->readByte();
- _state.isDark = inFile->readByte();
- _state.time.hours = inFile->readByte();
- _state.time.minutes = inFile->readByte();
-
- uint32 size = inFile->readUint32BE();
- if (size != _state.rooms.size())
- error("Room count mismatch (expected %i; found %i)", _state.rooms.size(), size);
-
- for (uint i = 0; i < size; ++i) {
- _state.rooms[i].picture = inFile->readByte();
- _state.rooms[i].curPicture = inFile->readByte();
- _state.rooms[i].isFirstTime = inFile->readByte();
- }
-
- // NOTE: _state.curPicture is part of the save state in the original engine. We
- // reconstruct it instead. This is believed to be safe for at least hires 0-2, but
- // this may need to be re-evaluated for later games.
- _state.curPicture = getCurRoom().curPicture;
-
- size = inFile->readUint32BE();
- if (size != _state.items.size())
- error("Item count mismatch (expected %i; found %i)", _state.items.size(), size);
-
- Common::List<Item>::iterator item;
- for (item = _state.items.begin(); item != _state.items.end(); ++item) {
- item->room = inFile->readByte();
- item->picture = inFile->readByte();
- item->position.x = inFile->readByte();
- item->position.y = inFile->readByte();
- item->state = inFile->readByte();
- }
-
- size = inFile->readUint32BE();
- if (size != _state.vars.size())
- error("Variable count mismatch (expected %i; found %i)", _state.vars.size(), size);
-
- for (uint i = 0; i < size; ++i)
- _state.vars[i] = inFile->readByte();
+ loadState(*inFile);
if (inFile->err() || inFile->eos())
error("Failed to load game '%s'", fileName.c_str());
@@ -711,6 +774,35 @@ bool AdlEngine::canLoadGameStateCurrently() {
return _canRestoreNow;
}
+void AdlEngine::saveState(Common::WriteStream &stream) {
+ stream.writeByte(_state.room);
+ stream.writeByte(_state.moves);
+ stream.writeByte(_state.isDark);
+ stream.writeByte(_state.time.hours);
+ stream.writeByte(_state.time.minutes);
+
+ stream.writeUint32BE(_state.rooms.size());
+ for (uint i = 0; i < _state.rooms.size(); ++i) {
+ stream.writeByte(_state.rooms[i].picture);
+ stream.writeByte(_state.rooms[i].curPicture);
+ stream.writeByte(_state.rooms[i].isFirstTime);
+ }
+
+ stream.writeUint32BE(_state.items.size());
+ Common::List<Item>::const_iterator item;
+ for (item = _state.items.begin(); item != _state.items.end(); ++item) {
+ stream.writeByte(item->room);
+ stream.writeByte(item->picture);
+ stream.writeByte(item->position.x);
+ stream.writeByte(item->position.y);
+ stream.writeByte(item->state);
+ }
+
+ stream.writeUint32BE(_state.vars.size());
+ for (uint i = 0; i < _state.vars.size(); ++i)
+ stream.writeByte(_state.vars[i]);
+}
+
Common::Error AdlEngine::saveGameState(int slot, const Common::String &desc) {
Common::String fileName = Common::String::format("%s.s%02d", _targetName.c_str(), slot);
Common::OutSaveFile *outFile = getSaveFileManager()->openForSaving(fileName);
@@ -748,34 +840,7 @@ Common::Error AdlEngine::saveGameState(int slot, const Common::String &desc) {
outFile->writeUint32BE(playTime);
_display->saveThumbnail(*outFile);
-
- outFile->writeByte(_state.room);
- outFile->writeByte(_state.moves);
- outFile->writeByte(_state.isDark);
- outFile->writeByte(_state.time.hours);
- outFile->writeByte(_state.time.minutes);
-
- outFile->writeUint32BE(_state.rooms.size());
- for (uint i = 0; i < _state.rooms.size(); ++i) {
- outFile->writeByte(_state.rooms[i].picture);
- outFile->writeByte(_state.rooms[i].curPicture);
- outFile->writeByte(_state.rooms[i].isFirstTime);
- }
-
- outFile->writeUint32BE(_state.items.size());
- Common::List<Item>::const_iterator item;
- for (item = _state.items.begin(); item != _state.items.end(); ++item) {
- outFile->writeByte(item->room);
- outFile->writeByte(item->picture);
- outFile->writeByte(item->position.x);
- outFile->writeByte(item->position.y);
- outFile->writeByte(item->state);
- }
-
- outFile->writeUint32BE(_state.vars.size());
- for (uint i = 0; i < _state.vars.size(); ++i)
- outFile->writeByte(_state.vars[i]);
-
+ saveState(*outFile);
outFile->finalize();
if (outFile->err()) {
@@ -1009,7 +1074,7 @@ int AdlEngine::o1_listInv(ScriptEnv &e) {
for (item = _state.items.begin(); item != _state.items.end(); ++item)
if (item->room == IDI_ANY)
- printMessage(item->description);
+ printString(getItemDescription(*item));
return 0;
}
@@ -1024,8 +1089,7 @@ int AdlEngine::o1_moveItem(ScriptEnv &e) {
int AdlEngine::o1_setRoom(ScriptEnv &e) {
OP_DEBUG_1("\tROOM = %d", e.arg(1));
- getCurRoom().curPicture = getCurRoom().picture;
- _state.room = e.arg(1);
+ switchRoom(e.arg(1));
return 1;
}
@@ -1179,8 +1243,8 @@ bool AdlEngine::matchCommand(ScriptEnv &env) const {
return false;
if (DebugMan.isDebugChannelEnabled(kDebugChannelScript)) {
- op_debug("IF\n\tROOM == %s", roomStr(env.getCommand().room).c_str());
- op_debug("\t&& SAID(%s, %s)", verbStr(env.getCommand().verb).c_str(), nounStr(env.getCommand().noun).c_str());
+ (void)op_debug("IF\n\tROOM == %s", roomStr(env.getCommand().room).c_str());
+ (void)op_debug("\t&& SAID(%s, %s)", verbStr(env.getCommand().verb).c_str(), nounStr(env.getCommand().noun).c_str());
}
for (uint i = 0; i < env.getCondCount(); ++i) {
@@ -1193,7 +1257,7 @@ bool AdlEngine::matchCommand(ScriptEnv &env) const {
if (numArgs < 0) {
if (DebugMan.isDebugChannelEnabled(kDebugChannelScript))
- op_debug("FAIL\n");
+ (void)op_debug("FAIL\n");
return false;
}
@@ -1205,7 +1269,7 @@ bool AdlEngine::matchCommand(ScriptEnv &env) const {
void AdlEngine::doActions(ScriptEnv &env) {
if (DebugMan.isDebugChannelEnabled(kDebugChannelScript))
- op_debug("THEN");
+ (void)op_debug("THEN");
for (uint i = 0; i < env.getActCount(); ++i) {
byte op = env.op();
@@ -1217,7 +1281,7 @@ void AdlEngine::doActions(ScriptEnv &env) {
if (numArgs < 0) {
if (DebugMan.isDebugChannelEnabled(kDebugChannelScript))
- op_debug("ABORT\n");
+ (void)op_debug("ABORT\n");
return;
}
@@ -1225,7 +1289,7 @@ void AdlEngine::doActions(ScriptEnv &env) {
}
if (DebugMan.isDebugChannelEnabled(kDebugChannelScript))
- op_debug("END\n");
+ (void)op_debug("END\n");
}
bool AdlEngine::doOneCommand(const Commands &commands, byte verb, byte noun) {
@@ -1318,14 +1382,14 @@ Common::String AdlEngine::verbStr(uint i) const {
if (i == IDI_ANY)
return "*";
else
- return Common::String::format("%d/%s", i, _priVerbs[i - 1].c_str());
+ return Common::String::format("%d/%s", i, (i - 1 < _priVerbs.size() ? _priVerbs[i - 1].c_str() : "<INVALID>"));
}
Common::String AdlEngine::nounStr(uint i) const {
if (i == IDI_ANY)
return "*";
else
- return Common::String::format("%d/%s", i, _priNouns[i - 1].c_str());
+ return Common::String::format("%d/%s", i, (i - 1 < _priNouns.size() ? _priNouns[i - 1].c_str() : "<INVALID>"));
}
Common::String AdlEngine::msgStr(uint i) const {
diff --git a/engines/adl/adl.h b/engines/adl/adl.h
index fc696f074f..62c5ea1b8e 100644
--- a/engines/adl/adl.h
+++ b/engines/adl/adl.h
@@ -42,6 +42,7 @@
namespace Common {
class ReadStream;
+class WriteStream;
class SeekableReadStream;
class File;
struct Event;
@@ -84,7 +85,8 @@ struct Room {
Room() :
description(0),
picture(0),
- curPicture(0) {
+ curPicture(0),
+ isFirstTime(true) {
memset(connections, 0, sizeof(connections));
}
@@ -143,6 +145,7 @@ enum {
struct Item {
byte id;
byte noun;
+ byte region;
byte room;
byte picture;
bool isLineArt;
@@ -151,6 +154,8 @@ struct Item {
byte description;
Common::Array<byte> roomPictures;
bool isOnScreen;
+
+ Item() : id(0), noun(0), region(0), room(0), picture(0), isLineArt(false), state(0), description(0), isOnScreen(false) { }
};
struct Time {
@@ -159,18 +164,30 @@ struct Time {
Time() : hours(12), minutes(0) { }
};
+struct RoomState {
+ byte picture;
+ byte isFirstTime;
+};
+
+struct Region {
+ Common::Array<byte> vars;
+ Common::Array<RoomState> rooms;
+};
+
struct State {
+ Common::Array<Region> regions;
Common::Array<Room> rooms;
Common::List<Item> items;
Common::Array<byte> vars;
+ byte region, prevRegion;
byte room;
byte curPicture;
uint16 moves;
bool isDark;
Time time;
- State() : room(1), curPicture(0), moves(1), isDark(false) { }
+ State() : region(0), prevRegion(0), room(1), curPicture(0), moves(1), isDark(false) { }
};
typedef Common::List<Command> Commands;
@@ -222,6 +239,9 @@ protected:
Common::Error loadGameState(int slot);
Common::Error saveGameState(int slot, const Common::String &desc);
+ virtual void gameLoop();
+ virtual void loadState(Common::ReadStream &stream);
+ virtual void saveState(Common::WriteStream &stream);
Common::String readString(Common::ReadStream &stream, byte until = 0) const;
Common::String readStringAt(Common::SeekableReadStream &stream, uint offset, byte until = 0) const;
void openFile(Common::File &file, const Common::String &name) const;
@@ -234,17 +254,23 @@ protected:
Common::String inputString(byte prompt = 0) const;
byte inputKey(bool showCursor = true) const;
+ void getInput(uint &verb, uint &noun);
virtual Common::String formatVerbError(const Common::String &verb) const;
virtual Common::String formatNounError(const Common::String &verb, const Common::String &noun) const;
void loadWords(Common::ReadStream &stream, WordMap &map, Common::StringArray &pri) const;
void readCommands(Common::ReadStream &stream, Commands &commands);
+ void removeCommand(Commands &commands, uint idx);
+ Command &getCommand(Commands &commands, uint idx);
void checkInput(byte verb, byte noun);
virtual bool isInputValid(byte verb, byte noun, bool &is_any);
virtual bool isInputValid(const Commands &commands, byte verb, byte noun, bool &is_any);
+ virtual void applyRoomWorkarounds(byte roomNr) { }
+ virtual void applyRegionWorkarounds() { }
virtual void setupOpcodeTables();
virtual void initState();
+ virtual void switchRoom(byte roomNr);
virtual byte roomArg(byte room) const;
virtual void advanceClock() { }
void loadDroppedItemOffsets(Common::ReadStream &stream, byte count);
@@ -288,8 +314,12 @@ protected:
void bell(uint count = 1) const;
// Game state functions
+ const Region &getRegion(uint i) const;
+ Region &getRegion(uint i);
const Room &getRoom(uint i) const;
Room &getRoom(uint i);
+ const Region &getCurRegion() const;
+ Region &getCurRegion();
const Room &getCurRoom() const;
Room &getCurRoom();
const Item &getItem(uint i) const;
@@ -297,7 +327,7 @@ protected:
byte getVar(uint i) const;
void setVar(uint i, byte value);
virtual void takeItem(byte noun);
- void dropItem(byte noun);
+ virtual void dropItem(byte noun);
bool matchCommand(ScriptEnv &env) const;
void doActions(ScriptEnv &env);
bool doOneCommand(const Commands &commands, byte verb, byte noun);
@@ -360,16 +390,20 @@ protected:
State _state;
bool _isRestarting, _isRestoring, _isQuitting;
+ bool _canSaveNow, _canRestoreNow;
bool _skipOneCommand;
+ const AdlGameDescription *_gameDescription;
+
private:
- virtual void runIntro() const { }
+ virtual void runIntro() { }
virtual void init() = 0;
virtual void initGameState() = 0;
virtual void drawItems() = 0;
virtual void drawItem(Item &item, const Common::Point &pos) = 0;
virtual void loadRoom(byte roomNr) = 0;
virtual void showRoom() = 0;
+ virtual void switchRegion(byte region) { }
// Engine
Common::Error run();
@@ -381,13 +415,10 @@ private:
byte convertKey(uint16 ascii) const;
Common::String getLine() const;
Common::String getWord(const Common::String &line, uint &index) const;
- void getInput(uint &verb, uint &noun);
Console *_console;
GUI::Debugger *getDebugger() { return _console; }
- const AdlGameDescription *_gameDescription;
byte _saveVerb, _saveNoun, _restoreVerb, _restoreNoun;
- bool _canSaveNow, _canRestoreNow;
};
} // End of namespace Adl
diff --git a/engines/adl/adl_v2.cpp b/engines/adl/adl_v2.cpp
index 45810d64ca..c3e82117d8 100644
--- a/engines/adl/adl_v2.cpp
+++ b/engines/adl/adl_v2.cpp
@@ -245,6 +245,8 @@ void AdlEngine_v2::loadRoom(byte roomNr) {
stream->seek(commandOffset);
readCommands(*stream, _roomData.commands);
}
+
+ applyRoomWorkarounds(roomNr);
}
void AdlEngine_v2::showRoom() {
@@ -286,32 +288,34 @@ void AdlEngine_v2::showRoom() {
_linesPrinted = 0;
}
+// TODO: Merge this into AdlEngine?
void AdlEngine_v2::takeItem(byte noun) {
Common::List<Item>::iterator item;
for (item = _state.items.begin(); item != _state.items.end(); ++item) {
- if (item->noun != noun || item->room != _state.room)
- continue;
-
- if (item->state == IDI_ITEM_DOESNT_MOVE) {
- printMessage(_messageIds.itemDoesntMove);
- return;
- }
-
- if (item->state == IDI_ITEM_DROPPED) {
- item->room = IDI_ANY;
- _itemRemoved = true;
- return;
- }
+ if (item->noun == noun && item->room == _state.room && item->region == _state.region) {
+ if (item->state == IDI_ITEM_DOESNT_MOVE) {
+ printMessage(_messageIds.itemDoesntMove);
+ return;
+ }
- Common::Array<byte>::const_iterator pic;
- for (pic = item->roomPictures.begin(); pic != item->roomPictures.end(); ++pic) {
- if (*pic == getCurRoom().curPicture || *pic == IDI_ANY) {
+ if (item->state == IDI_ITEM_DROPPED) {
item->room = IDI_ANY;
_itemRemoved = true;
- item->state = IDI_ITEM_DROPPED;
return;
}
+
+ Common::Array<byte>::const_iterator pic;
+ for (pic = item->roomPictures.begin(); pic != item->roomPictures.end(); ++pic) {
+ if (*pic == getCurRoom().curPicture || *pic == IDI_ANY) {
+ if (!isInventoryFull()) {
+ item->room = IDI_ANY;
+ _itemRemoved = true;
+ item->state = IDI_ITEM_DROPPED;
+ }
+ return;
+ }
+ }
}
}
@@ -323,24 +327,20 @@ void AdlEngine_v2::drawItems() {
for (item = _state.items.begin(); item != _state.items.end(); ++item) {
// Skip items not in this room
- if (item->room != _state.room)
- continue;
-
- if (item->isOnScreen)
- continue;
-
- if (item->state == IDI_ITEM_DROPPED) {
- // Draw dropped item if in normal view
- if (getCurRoom().picture == getCurRoom().curPicture)
- drawItem(*item, _itemOffsets[_itemsOnScreen++]);
- } else {
- // Draw fixed item if current view is in the pic list
- Common::Array<byte>::const_iterator pic;
-
- for (pic = item->roomPictures.begin(); pic != item->roomPictures.end(); ++pic) {
- if (*pic == _state.curPicture || *pic == IDI_ANY) {
- drawItem(*item, item->position);
- break;
+ if (item->region == _state.region && item->room == _state.room && !item->isOnScreen) {
+ if (item->state == IDI_ITEM_DROPPED) {
+ // Draw dropped item if in normal view
+ if (getCurRoom().picture == getCurRoom().curPicture)
+ drawItem(*item, _itemOffsets[_itemsOnScreen++]);
+ } else {
+ // Draw fixed item if current view is in the pic list
+ Common::Array<byte>::const_iterator pic;
+
+ for (pic = item->roomPictures.begin(); pic != item->roomPictures.end(); ++pic) {
+ if (*pic == _state.curPicture || *pic == IDI_ANY) {
+ drawItem(*item, item->position);
+ break;
+ }
}
}
}
@@ -367,12 +367,13 @@ DataBlockPtr AdlEngine_v2::readDataBlockPtr(Common::ReadStream &f) const {
void AdlEngine_v2::loadItems(Common::ReadStream &stream) {
byte id;
while ((id = stream.readByte()) != 0xff && !stream.eos() && !stream.err()) {
- Item item = Item();
+ Item item;
+
item.id = id;
item.noun = stream.readByte();
item.room = stream.readByte();
item.picture = stream.readByte();
- item.isLineArt = stream.readByte(); // Disk number in later games
+ item.region = stream.readByte();
item.position.x = stream.readByte();
item.position.y = stream.readByte();
item.state = stream.readByte();
diff --git a/engines/adl/adl_v2.h b/engines/adl/adl_v2.h
index 8f36b5cdb8..f0af9eba22 100644
--- a/engines/adl/adl_v2.h
+++ b/engines/adl/adl_v2.h
@@ -58,6 +58,8 @@ protected:
void loadMessages(Common::ReadStream &stream, byte count);
void loadPictures(Common::ReadStream &stream);
void loadItemPictures(Common::ReadStream &stream, byte count);
+ virtual bool isInventoryFull() { return false; }
+ int askForSlot(const Common::String &question);
void checkTextOverflow(char c);
@@ -90,8 +92,6 @@ protected:
byte _roomOnScreen, _picOnScreen, _itemsOnScreen;
private:
- int askForSlot(const Common::String &question);
-
Common::RandomSource *_random;
};
diff --git a/engines/adl/adl_v3.cpp b/engines/adl/adl_v3.cpp
index ba9e4a063e..46af211695 100644
--- a/engines/adl/adl_v3.cpp
+++ b/engines/adl/adl_v3.cpp
@@ -62,8 +62,6 @@ void AdlEngine_v3::setupOpcodeTables() {
AdlEngine_v2::setupOpcodeTables();
delete _condOpcodes[0x04];
_condOpcodes[0x04] = new OpcodeV3(this, &AdlEngine_v3::o3_isNounNotInRoom);
- delete _actOpcodes[0x04];
- _actOpcodes[0x04] = new OpcodeV3(this, &AdlEngine_v3::o3_listInv);
}
int AdlEngine_v3::o3_isNounNotInRoom(ScriptEnv &e) {
@@ -85,16 +83,4 @@ int AdlEngine_v3::o3_isNounNotInRoom(ScriptEnv &e) {
return (isAnItem ? 1 : -1);
}
-int AdlEngine_v3::o3_listInv(ScriptEnv &e) {
- OP_DEBUG_0("\tLIST_INVENTORY()");
-
- Common::List<Item>::const_iterator item;
-
- for (item = _state.items.begin(); item != _state.items.end(); ++item)
- if (item->room == IDI_ANY)
- printString(_itemDesc[item->description - 1]);
-
- return 0;
-}
-
} // End of namespace Adl
diff --git a/engines/adl/adl_v3.h b/engines/adl/adl_v3.h
index b0d40f3993..ab56d4e7d2 100644
--- a/engines/adl/adl_v3.h
+++ b/engines/adl/adl_v3.h
@@ -41,7 +41,6 @@ protected:
void loadItemDescriptions(Common::SeekableReadStream &stream, byte count);
int o3_isNounNotInRoom(ScriptEnv &e);
- int o3_listInv(ScriptEnv &e);
Common::Array<Common::String> _itemDesc;
};
diff --git a/engines/adl/adl_v4.cpp b/engines/adl/adl_v4.cpp
index ed20c82513..dcf0f997c9 100644
--- a/engines/adl/adl_v4.cpp
+++ b/engines/adl/adl_v4.cpp
@@ -20,22 +20,162 @@
*
*/
-#include "common/random.h"
-#include "common/error.h"
-
#include "adl/adl_v4.h"
#include "adl/display.h"
-#include "adl/graphics.h"
+#include "adl/detection.h"
namespace Adl {
AdlEngine_v4::AdlEngine_v4(OSystem *syst, const AdlGameDescription *gd) :
AdlEngine_v3(syst, gd),
- _curDisk(0) {
+ _currentVolume(0),
+ _itemPicIndex(nullptr) {
+
+}
+
+AdlEngine_v4::~AdlEngine_v4() {
+ delete _itemPicIndex;
+}
+
+void AdlEngine_v4::gameLoop() {
+ uint verb = 0, noun = 0;
+ _isRestarting = false;
+
+ if (_isRestoring) {
+ // Game restored from launcher. As this version of ADL long jumps to
+ // the game loop after restoring, no special action is required.
+ _isRestoring = false;
+ }
+
+ showRoom();
+
+ if (_isRestarting || shouldQuit())
+ return;
+
+ _canSaveNow = _canRestoreNow = true;
+ getInput(verb, noun);
+ _canSaveNow = _canRestoreNow = false;
+
+ if (_isRestoring) {
+ // Game restored from GMM. Move cursor to next line and jump to
+ // start of game loop.
+ _display->printAsciiString("\r");
+ _isRestoring = false;
+ return;
+ }
+
+ if (_isRestarting || shouldQuit())
+ return;
+
+ _linesPrinted = 0;
+
+ checkInput(verb, noun);
+
+ if (_isRestarting || shouldQuit())
+ return;
+
+ doAllCommands(_globalCommands, verb, noun);
+
+ if (_isRestarting || shouldQuit())
+ return;
+
+ _state.moves++;
+}
+
+void AdlEngine_v4::loadState(Common::ReadStream &stream) {
+ _state.room = stream.readByte();
+ _state.region = stream.readByte();
+ _state.prevRegion = stream.readByte();
+
+ uint32 size = stream.readUint32BE();
+ if (size != _state.regions.size())
+ error("Region count mismatch (expected %i; found %i)", _state.regions.size(), size);
+
+ Common::Array<Region>::iterator region;
+ for (region = _state.regions.begin(); region != _state.regions.end(); ++region) {
+ size = stream.readUint32BE();
+ if (size != region->rooms.size())
+ error("Room count mismatch (expected %i; found %i)", region->rooms.size(), size);
+
+ Common::Array<RoomState>::iterator room;
+ for (room = region->rooms.begin(); room != region->rooms.end(); ++room) {
+ room->picture = stream.readByte();
+ room->isFirstTime = stream.readByte();
+ }
+
+ size = stream.readUint32BE();
+ if (size != region->vars.size())
+ error("Variable count mismatch (expected %i; found %i)", region->vars.size(), size);
+
+ for (uint i = 0; i < region->vars.size(); ++i)
+ region->vars[i] = stream.readByte();
+ }
+
+ size = stream.readUint32BE();
+ if (size != _state.items.size())
+ error("Item count mismatch (expected %i; found %i)", _state.items.size(), size);
+
+ Common::List<Item>::iterator item;
+ for (item = _state.items.begin(); item != _state.items.end(); ++item) {
+ item->room = stream.readByte();
+ item->region = stream.readByte();
+ item->state = stream.readByte();
+ }
+
+ size = stream.readUint32BE();
+ const uint expectedSize = _state.vars.size() - getRegion(1).vars.size();
+ if (size != expectedSize)
+ error("Variable count mismatch (expected %i; found %i)", expectedSize, size);
+
+ for (uint i = getRegion(1).vars.size(); i < size; ++i)
+ _state.vars[i] = stream.readByte();
+
+ if (stream.err() || stream.eos())
+ return;
+
+ loadRegion(_state.region);
+ restoreRoomState(_state.room);
+ _roomOnScreen = _picOnScreen = 0;
+}
+
+void AdlEngine_v4::saveState(Common::WriteStream &stream) {
+ backupVars();
+ backupRoomState(_state.room);
+
+ stream.writeByte(_state.room);
+ stream.writeByte(_state.region);
+ stream.writeByte(_state.prevRegion);
+
+ stream.writeUint32BE(_state.regions.size());
+ Common::Array<Region>::const_iterator region;
+ for (region = _state.regions.begin(); region != _state.regions.end(); ++region) {
+ stream.writeUint32BE(region->rooms.size());
+ Common::Array<RoomState>::const_iterator room;
+ for (room = region->rooms.begin(); room != region->rooms.end(); ++room) {
+ stream.writeByte(room->picture);
+ stream.writeByte(room->isFirstTime);
+ }
+
+ stream.writeUint32BE(region->vars.size());
+ for (uint i = 0; i < region->vars.size(); ++i)
+ stream.writeByte(region->vars[i]);
+ }
+
+ stream.writeUint32BE(_state.items.size());
+ Common::List<Item>::const_iterator item;
+ for (item = _state.items.begin(); item != _state.items.end(); ++item) {
+ stream.writeByte(item->room);
+ stream.writeByte(item->region);
+ stream.writeByte(item->state);
+ }
+
+ stream.writeUint32BE(_state.vars.size() - getRegion(1).vars.size());
+ for (uint i = getRegion(1).vars.size(); i < _state.vars.size(); ++i)
+ stream.writeByte(_state.vars[i]);
}
Common::String AdlEngine_v4::loadMessage(uint idx) const {
- Common::String str = AdlEngine_v2::loadMessage(idx);
+ Common::String str = AdlEngine_v3::loadMessage(idx);
for (uint i = 0; i < str.size(); ++i) {
const char *xorStr = "AVISDURGAN";
@@ -49,114 +189,237 @@ Common::String AdlEngine_v4::getItemDescription(const Item &item) const {
return _itemDesc[item.id - 1];
}
-void AdlEngine_v4::applyDiskOffset(byte &track, byte &sector) const {
- sector += _diskOffsets[_curDisk].sector;
+DiskImage *AdlEngine_v4::loadDisk(byte volume) const {
+ const ADGameFileDescription *ag;
+
+ for (ag = _gameDescription->desc.filesDescriptions; ag->fileName; ag++) {
+ if (ag->fileType == volume) {
+ DiskImage *disk = new DiskImage();
+ if (!disk->open(ag->fileName))
+ error("Failed to open %s", ag->fileName);
+ return disk;
+ }
+ }
+
+ error("Disk volume %d not found", volume);
+}
+
+void AdlEngine_v4::insertDisk(byte volume) {
+ delete _disk;
+ _disk = loadDisk(volume);
+ _currentVolume = volume;
+}
+
+void AdlEngine_v4::loadRegionLocations(Common::ReadStream &stream, uint regions) {
+ for (uint r = 0; r < regions; ++r) {
+ RegionLocation loc;
+ loc.track = stream.readByte();
+ loc.sector = stream.readByte();
+
+ if (stream.eos() || stream.err())
+ error("Failed to read region locations");
+
+ _regionLocations.push_back(loc);
+ }
+}
+
+void AdlEngine_v4::loadRegionInitDataOffsets(Common::ReadStream &stream, uint regions) {
+ for (uint r = 0; r < regions; ++r) {
+ RegionInitDataOffset initOfs;
+ initOfs.track = stream.readByte();
+ initOfs.sector = stream.readByte();
+ initOfs.offset = stream.readByte();
+ initOfs.volume = stream.readByte();
+
+ if (stream.eos() || stream.err())
+ error("Failed to read region init data offsets");
+
+ _regionInitDataOffsets.push_back(initOfs);
+ }
+}
+
+void AdlEngine_v4::initRegions(const byte *roomsPerRegion, uint regions) {
+ _state.regions.resize(regions);
+
+ for (uint r = 0; r < regions; ++r) {
+ Region &regn = _state.regions[r];
+ // Each region has 24 variables
+ regn.vars.resize(24);
+
+ regn.rooms.resize(roomsPerRegion[r]);
+ for (uint rm = 0; rm < roomsPerRegion[r]; ++rm) {
+ // TODO: hires6 uses 0xff and has slightly different
+ // code working on these values
+ regn.rooms[rm].picture = 1;
+ regn.rooms[rm].isFirstTime = 1;
+ }
+ }
+}
+
+void AdlEngine_v4::fixupDiskOffset(byte &track, byte &sector) const {
+ if (_state.region == 0)
+ return;
+
+ sector += _regionLocations[_state.region - 1].sector;
if (sector >= 16) {
sector -= 16;
++track;
}
- track += _diskOffsets[_curDisk].track;
+ track += _regionLocations[_state.region - 1].track;
}
void AdlEngine_v4::adjustDataBlockPtr(byte &track, byte &sector, byte &offset, byte &size) const {
- applyDiskOffset(track, sector);
-}
-
-typedef Common::Functor1Mem<ScriptEnv &, int, AdlEngine_v4> OpcodeV4;
-#define SetOpcodeTable(x) table = &x;
-#define Opcode(x) table->push_back(new OpcodeV4(this, &AdlEngine_v4::x))
-#define OpcodeUnImpl() table->push_back(new OpcodeV4(this, 0))
-
-void AdlEngine_v4::setupOpcodeTables() {
- Common::Array<const Opcode *> *table = 0;
-
- SetOpcodeTable(_condOpcodes);
- // 0x00
- OpcodeUnImpl();
- Opcode(o2_isFirstTime);
- Opcode(o2_isRandomGT);
- Opcode(o4_isItemInRoom);
- // 0x04
- Opcode(o4_isNounNotInRoom);
- Opcode(o1_isMovesGT);
- Opcode(o1_isVarEQ);
- Opcode(o2_isCarryingSomething);
- // 0x08
- Opcode(o4_isVarGT);
- Opcode(o1_isCurPicEQ);
- Opcode(o4_skipOneCommand);
-
- SetOpcodeTable(_actOpcodes);
- // 0x00
- OpcodeUnImpl();
- Opcode(o1_varAdd);
- Opcode(o1_varSub);
- Opcode(o1_varSet);
- // 0x04
- Opcode(o4_listInv);
- Opcode(o4_moveItem);
- Opcode(o1_setRoom);
- Opcode(o2_setCurPic);
- // 0x08
- Opcode(o2_setPic);
- Opcode(o1_printMsg);
- Opcode(o4_dummy);
- Opcode(o4_setTextMode);
- // 0x0c
- Opcode(o2_moveAllItems);
- Opcode(o1_quit);
- Opcode(o4_dummy);
- Opcode(o2_save);
- // 0x10
- Opcode(o2_restore);
- Opcode(o1_restart);
- Opcode(o4_setDisk);
- Opcode(o4_dummy);
- // 0x14
- Opcode(o1_resetPic);
- Opcode(o1_goDirection<IDI_DIR_NORTH>);
- Opcode(o1_goDirection<IDI_DIR_SOUTH>);
- Opcode(o1_goDirection<IDI_DIR_EAST>);
- // 0x18
- Opcode(o1_goDirection<IDI_DIR_WEST>);
- Opcode(o1_goDirection<IDI_DIR_UP>);
- Opcode(o1_goDirection<IDI_DIR_DOWN>);
- Opcode(o1_takeItem);
- // 0x1c
- Opcode(o1_dropItem);
- Opcode(o1_setRoomPic);
- Opcode(o4_sound);
- OpcodeUnImpl();
- // 0x20
- Opcode(o2_initDisk);
+ fixupDiskOffset(track, sector);
}
-int AdlEngine_v4::o4_isVarGT(ScriptEnv &e) {
- OP_DEBUG_2("\t&& VARS[%d] > %d", e.arg(1), e.arg(2));
+void AdlEngine_v4::loadRegion(byte region) {
+ if (_currentVolume != _regionInitDataOffsets[region - 1].volume) {
+ insertDisk(_regionInitDataOffsets[region - 1].volume);
- if (getVar(e.arg(1)) > e.arg(2))
- return 2;
+ // FIXME: This shouldn't be needed, but currently is, due to
+ // implementation choices made earlier on for DataBlockPtr and DiskImage.
+ _state.region = 0; // To avoid region offset being applied
+ _itemPics.clear();
+ _itemPicIndex->seek(0);
+ loadItemPictures(*_itemPicIndex, _itemPicIndex->size() / 5);
+ }
- return -1;
+ _state.region = region;
+
+ byte track = _regionInitDataOffsets[region - 1].track;
+ byte sector = _regionInitDataOffsets[region - 1].sector;
+ uint offset = _regionInitDataOffsets[region - 1].offset;
+
+ fixupDiskOffset(track, sector);
+
+ for (uint block = 0; block < 7; ++block) {
+ StreamPtr stream(_disk->createReadStream(track, sector, offset, 1));
+
+ uint16 addr = stream->readUint16LE();
+ uint16 size = stream->readUint16LE();
+
+ stream.reset(_disk->createReadStream(track, sector, offset, size / 256 + 1));
+ stream->skip(4);
+
+ switch (addr) {
+ case 0x9000: {
+ // Messages
+ _messages.clear();
+ uint count = size / 4;
+ loadMessages(*stream, count);
+ break;
+ }
+ case 0x4a80: {
+ // Global pics
+ _pictures.clear();
+ loadPictures(*stream);
+ break;
+ }
+ case 0x4000:
+ // Verbs
+ loadWords(*stream, _verbs, _priVerbs);
+ break;
+ case 0x1800:
+ // Nouns
+ loadWords(*stream, _nouns, _priNouns);
+ break;
+ case 0x0e00: {
+ // Rooms
+ uint count = size / 14 - 1;
+ stream->skip(14); // Skip invalid room 0
+
+ _state.rooms.clear();
+ loadRooms(*stream, count);
+ break;
+ }
+ case 0x7b00:
+ // TODO: hires6 has global and room lists swapped
+ // Room commands
+ readCommands(*stream, _roomCommands);
+ break;
+ case 0x9500:
+ // Global commands
+ readCommands(*stream, _globalCommands);
+ break;
+ default:
+ error("Unknown data block found (addr %04x; size %04x)", addr, size);
+ }
+
+ offset += 4 + size;
+ while (offset >= 256) {
+ offset -= 256;
+ ++sector;
+ if (sector >= 16) {
+ sector = 0;
+ ++track;
+ }
+ }
+ }
+
+ applyRegionWorkarounds();
+ restoreVars();
}
-int AdlEngine_v4::o4_skipOneCommand(ScriptEnv &e) {
- OP_DEBUG_0("\t&& SKIP_ONE_COMMAND()");
+void AdlEngine_v4::loadItemPicIndex(Common::ReadStream &stream, uint items) {
+ _itemPicIndex = stream.readStream(items * 5);
- _skipOneCommand = true;
- setVar(2, 0);
+ if (stream.eos() || stream.err())
+ error("Error reading item index");
+}
- return -1;
+void AdlEngine_v4::backupRoomState(byte room) {
+ RoomState &backup = getCurRegion().rooms[room - 1];
+
+ backup.isFirstTime = getRoom(room).isFirstTime;
+ backup.picture = getRoom(room).picture;
+}
+
+void AdlEngine_v4::restoreRoomState(byte room) {
+ const RoomState &backup = getCurRegion().rooms[room - 1];
+
+ getRoom(room).isFirstTime = backup.isFirstTime;
+ getRoom(room).picture = backup.picture;
+}
+
+void AdlEngine_v4::backupVars() {
+ Region &region = getCurRegion();
+
+ for (uint i = 0; i < region.vars.size(); ++i)
+ region.vars[i] = getVar(i);
+}
+
+void AdlEngine_v4::restoreVars() {
+ const Region &region = getCurRegion();
+
+ for (uint i = 0; i < region.vars.size(); ++i)
+ setVar(i, region.vars[i]);
+}
+
+void AdlEngine_v4::switchRegion(byte region) {
+ backupVars();
+ backupRoomState(_state.room);
+ _state.prevRegion = _state.region;
+ _state.region = region;
+ loadRegion(region);
+ _state.room = 1;
+ _picOnScreen = _roomOnScreen = 0;
+}
+
+void AdlEngine_v4::switchRoom(byte roomNr) {
+ getCurRoom().curPicture = getCurRoom().picture;
+ getCurRoom().isFirstTime = false;
+ backupRoomState(_state.room);
+ _state.room = roomNr;
+ restoreRoomState(_state.room);
}
-// FIXME: Rename "isLineArt" and look at code duplication
int AdlEngine_v4::o4_isItemInRoom(ScriptEnv &e) {
OP_DEBUG_2("\t&& GET_ITEM_ROOM(%s) == %s", itemStr(e.arg(1)).c_str(), itemRoomStr(e.arg(2)).c_str());
const Item &item = getItem(e.arg(1));
- if (e.arg(2) != IDI_ANY && item.isLineArt != _curDisk)
+ if (e.arg(2) != IDI_ANY && item.region != _state.region)
return -1;
if (item.room == roomArg(e.arg(2)))
@@ -165,94 +428,152 @@ int AdlEngine_v4::o4_isItemInRoom(ScriptEnv &e) {
return -1;
}
-int AdlEngine_v4::o4_isNounNotInRoom(ScriptEnv &e) {
- OP_DEBUG_1("\t&& NO_SUCH_ITEMS_IN_ROOM(%s)", itemRoomStr(e.arg(1)).c_str());
+int AdlEngine_v4::o4_isVarGT(ScriptEnv &e) {
+ OP_DEBUG_2("\t&& VARS[%d] > %d", e.arg(1), e.arg(2));
- Common::List<Item>::const_iterator item;
+ if (getVar(e.arg(1)) > e.arg(2))
+ return 2;
- setVar(24, 0);
+ return -1;
+}
- for (item = _state.items.begin(); item != _state.items.end(); ++item)
- if (item->noun == e.getNoun()) {
- setVar(24, 1);
+int AdlEngine_v4::o4_moveItem(ScriptEnv &e) {
+ o2_moveItem(e);
+ getItem(e.arg(1)).region = _state.region;
+ return 2;
+}
- if (item->room == roomArg(e.arg(1)))
- return -1;
- }
+int AdlEngine_v4::o4_setRegionToPrev(ScriptEnv &e) {
+ OP_DEBUG_0("\tREGION = PREV_REGION");
- return 1;
+ switchRegion(_state.prevRegion);
+ // Long jump
+ _isRestarting = true;
+ return -1;
}
-int AdlEngine_v4::o4_listInv(ScriptEnv &e) {
- OP_DEBUG_0("\tLIST_INVENTORY()");
+int AdlEngine_v4::o4_moveAllItems(ScriptEnv &e) {
+ OP_DEBUG_2("\tMOVE_ALL_ITEMS(%s, %s)", itemRoomStr(e.arg(1)).c_str(), itemRoomStr(e.arg(2)).c_str());
- Common::List<Item>::const_iterator item;
+ byte room1 = roomArg(e.arg(1));
- for (item = _state.items.begin(); item != _state.items.end(); ++item)
- if (item->room == IDI_ANY)
- printString(_itemDesc[item->id - 1]);
+ if (room1 == _state.room)
+ _picOnScreen = 0;
- return 0;
-}
+ byte room2 = roomArg(e.arg(2));
-int AdlEngine_v4::o4_moveItem(ScriptEnv &e) {
- OP_DEBUG_2("\tSET_ITEM_ROOM(%s, %s)", itemStr(e.arg(1)).c_str(), itemRoomStr(e.arg(2)).c_str());
+ Common::List<Item>::iterator item;
- byte room = roomArg(e.arg(2));
+ for (item = _state.items.begin(); item != _state.items.end(); ++item) {
+ if (room1 != item->room)
+ continue;
- Item &item = getItem(e.arg(1));
+ if (room1 != IDI_ANY) {
+ if (_state.region != item->region)
+ continue;
+ if (room2 == IDI_ANY) {
+ if (isInventoryFull())
+ break;
+ if (item->state == IDI_ITEM_DOESNT_MOVE)
+ continue;
+ }
+ }
- if (item.room == _roomOnScreen)
- _picOnScreen = 0;
+ item->room = room2;
+ item->region = _state.region;
- // Set items that move from inventory to a room to state "dropped"
- if (item.room == IDI_ANY && room != IDI_VOID_ROOM)
- item.state = IDI_ITEM_DROPPED;
+ if (room1 == IDI_ANY)
+ item->state = IDI_ITEM_DROPPED;
+ }
- item.room = room;
- item.isLineArt = _curDisk;
return 2;
}
-int AdlEngine_v4::o4_dummy(ScriptEnv &e) {
- OP_DEBUG_0("\tDUMMY()");
+int AdlEngine_v4::o4_setRegion(ScriptEnv &e) {
+ OP_DEBUG_1("\tREGION = %d", e.arg(1));
+
+ switchRegion(e.arg(1));
+ // Long jump
+ _isRestarting = true;
+ return -1;
+}
+
+int AdlEngine_v4::o4_save(ScriptEnv &e) {
+ OP_DEBUG_0("\tSAVE_GAME()");
+
+ _display->printString(_strings_v2.saveReplace);
+ const char key = inputKey();
+ if (shouldQuit())
+ return -1;
+
+ if (key != APPLECHAR('Y'))
+ return 0;
+
+ const int slot = askForSlot(_strings_v2.saveInsert);
+
+ if (slot < 0)
+ return -1;
+
+ saveGameState(slot, "");
return 0;
}
-int AdlEngine_v4::o4_setTextMode(ScriptEnv &e) {
- OP_DEBUG_1("\tSET_TEXT_MODE(%d)", e.arg(1));
+int AdlEngine_v4::o4_restore(ScriptEnv &e) {
+ OP_DEBUG_0("\tRESTORE_GAME()");
- // TODO
- // 1: 4-line mode
- // 2: 24-line mode
+ const int slot = askForSlot(_strings_v2.restoreInsert);
- switch (e.arg(1)) {
- case 3:
- // We re-use the restarting flag here, to simulate a long jump
- _isRestarting = true;
+ if (slot < 0)
return -1;
- }
- return 1;
+ loadGameState(slot);
+ _isRestoring = false;
+
+ _picOnScreen = 0;
+ _roomOnScreen = 0;
+
+ // Long jump
+ _isRestarting = true;
+ return -1;
}
-int AdlEngine_v4::o4_setDisk(ScriptEnv &e) {
- OP_DEBUG_2("\tSET_DISK(%d, %d)", e.arg(1), e.arg(2));
+int AdlEngine_v4::o4_restart(ScriptEnv &e) {
+ OP_DEBUG_0("\tRESTART_GAME()");
- // TODO
- // Arg 1: disk
- // Arg 2: room
+ while (true) {
+ _display->printString(_strings.playAgain);
+ const Common::String input(inputString());
- return 2;
+ if (shouldQuit())
+ return -1;
+
+ if (input.firstChar() == APPLECHAR('N')) {
+ return o1_quit(e);
+ } else if (input.firstChar() == APPLECHAR('Y')) {
+ // The original game loads a special save game from volume 3
+ initState();
+ // Long jump
+ _isRestarting = true;
+ return -1;
+ }
+ }
}
-int AdlEngine_v4::o4_sound(ScriptEnv &e) {
- OP_DEBUG_0("\tSOUND()");
+int AdlEngine_v4::o4_setRegionRoom(ScriptEnv &e) {
+ OP_DEBUG_2("\tSET_REGION_ROOM(%d, %d)", e.arg(1), e.arg(2));
- // TODO
+ switchRegion(e.arg(1));
+ _state.room = e.arg(2);
+ // Long jump
+ _isRestarting = true;
+ return -1;
+}
- return 0;
+int AdlEngine_v4::o4_setRoomPic(ScriptEnv &e) {
+ o1_setRoomPic(e);
+ backupRoomState(e.arg(1));
+ return 2;
}
} // End of namespace Adl
diff --git a/engines/adl/adl_v4.h b/engines/adl/adl_v4.h
index 79aa824d92..4e87530673 100644
--- a/engines/adl/adl_v4.h
+++ b/engines/adl/adl_v4.h
@@ -25,47 +25,70 @@
#include "adl/adl_v3.h"
-namespace Common {
-class RandomSource;
-}
+namespace Adl {
-struct DiskOffset {
+// Base track/sector for a region
+struct RegionLocation {
byte track;
byte sector;
};
-namespace Adl {
+// Location of the 7 initial data blocks, relative to RegionLocation
+struct RegionInitDataOffset {
+ byte track;
+ byte sector;
+ byte offset;
+ byte volume;
+};
class AdlEngine_v4 : public AdlEngine_v3 {
public:
- virtual ~AdlEngine_v4() { }
+ virtual ~AdlEngine_v4();
protected:
AdlEngine_v4(OSystem *syst, const AdlGameDescription *gd);
// AdlEngine
- virtual void setupOpcodeTables();
+ virtual void gameLoop();
+ virtual void loadState(Common::ReadStream &stream);
+ virtual void saveState(Common::WriteStream &stream);
virtual Common::String loadMessage(uint idx) const;
- Common::String getItemDescription(const Item &item) const;
+ virtual Common::String getItemDescription(const Item &item) const;
+ virtual void switchRegion(byte region);
+ virtual void switchRoom(byte roomNr);
// AdlEngine_v2
virtual void adjustDataBlockPtr(byte &track, byte &sector, byte &offset, byte &size) const;
- void applyDiskOffset(byte &track, byte &sector) const;
+ DiskImage *loadDisk(byte volume) const;
+ void insertDisk(byte volume);
+ void loadRegionLocations(Common::ReadStream &stream, uint regions);
+ void loadRegionInitDataOffsets(Common::ReadStream &stream, uint regions);
+ void initRegions(const byte *roomsPerRegion, uint regions);
+ void fixupDiskOffset(byte &track, byte &sector) const;
+ void loadRegion(byte region);
+ void loadItemPicIndex(Common::ReadStream &stream, uint items);
+ void backupRoomState(byte room);
+ void restoreRoomState(byte room);
+ void backupVars();
+ void restoreVars();
- int o4_isVarGT(ScriptEnv &e);
int o4_isItemInRoom(ScriptEnv &e);
- int o4_isNounNotInRoom(ScriptEnv &e);
- int o4_skipOneCommand(ScriptEnv &e);
- int o4_listInv(ScriptEnv &e);
+ int o4_isVarGT(ScriptEnv &e);
int o4_moveItem(ScriptEnv &e);
- int o4_dummy(ScriptEnv &e);
- int o4_setTextMode(ScriptEnv &e);
- int o4_setDisk(ScriptEnv &e);
- int o4_sound(ScriptEnv &e);
+ int o4_setRegionToPrev(ScriptEnv &e);
+ int o4_moveAllItems(ScriptEnv &e);
+ int o4_setRegion(ScriptEnv &e);
+ int o4_save(ScriptEnv &e);
+ int o4_restore(ScriptEnv &e);
+ int o4_restart(ScriptEnv &e);
+ int o4_setRegionRoom(ScriptEnv &e);
+ int o4_setRoomPic(ScriptEnv &e);
- byte _curDisk;
- Common::Array<DiskOffset> _diskOffsets;
+ byte _currentVolume;
+ Common::Array<RegionLocation> _regionLocations;
+ Common::Array<RegionInitDataOffset> _regionInitDataOffsets;
+ Common::SeekableReadStream *_itemPicIndex;
};
} // End of namespace Adl
diff --git a/engines/adl/adl_v5.cpp b/engines/adl/adl_v5.cpp
new file mode 100644
index 0000000000..7e7c6e40ac
--- /dev/null
+++ b/engines/adl/adl_v5.cpp
@@ -0,0 +1,246 @@
+/* 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 "common/random.h"
+#include "common/error.h"
+
+#include "adl/adl_v5.h"
+#include "adl/display.h"
+#include "adl/graphics.h"
+
+namespace Adl {
+
+AdlEngine_v5::AdlEngine_v5(OSystem *syst, const AdlGameDescription *gd) :
+ AdlEngine_v3(syst, gd),
+ _curDisk(0) {
+}
+
+Common::String AdlEngine_v5::loadMessage(uint idx) const {
+ Common::String str = AdlEngine_v2::loadMessage(idx);
+
+ for (uint i = 0; i < str.size(); ++i) {
+ const char *xorStr = "AVISDURGAN";
+ str.setChar(str[i] ^ xorStr[i % strlen(xorStr)], i);
+ }
+
+ return str;
+}
+
+Common::String AdlEngine_v5::getItemDescription(const Item &item) const {
+ return _itemDesc[item.id - 1];
+}
+
+void AdlEngine_v5::applyDiskOffset(byte &track, byte &sector) const {
+ sector += _diskOffsets[_curDisk].sector;
+ if (sector >= 16) {
+ sector -= 16;
+ ++track;
+ }
+
+ track += _diskOffsets[_curDisk].track;
+}
+
+void AdlEngine_v5::adjustDataBlockPtr(byte &track, byte &sector, byte &offset, byte &size) const {
+ applyDiskOffset(track, sector);
+}
+
+typedef Common::Functor1Mem<ScriptEnv &, int, AdlEngine_v5> OpcodeV4;
+#define SetOpcodeTable(x) table = &x;
+#define Opcode(x) table->push_back(new OpcodeV4(this, &AdlEngine_v5::x))
+#define OpcodeUnImpl() table->push_back(new OpcodeV4(this, 0))
+
+void AdlEngine_v5::setupOpcodeTables() {
+ Common::Array<const Opcode *> *table = 0;
+
+ SetOpcodeTable(_condOpcodes);
+ // 0x00
+ OpcodeUnImpl();
+ Opcode(o2_isFirstTime);
+ Opcode(o2_isRandomGT);
+ Opcode(o5_isItemInRoom);
+ // 0x04
+ Opcode(o5_isNounNotInRoom);
+ Opcode(o1_isMovesGT);
+ Opcode(o1_isVarEQ);
+ Opcode(o2_isCarryingSomething);
+ // 0x08
+ Opcode(o5_isVarGT);
+ Opcode(o1_isCurPicEQ);
+ Opcode(o5_skipOneCommand);
+
+ SetOpcodeTable(_actOpcodes);
+ // 0x00
+ OpcodeUnImpl();
+ Opcode(o1_varAdd);
+ Opcode(o1_varSub);
+ Opcode(o1_varSet);
+ // 0x04
+ Opcode(o1_listInv);
+ Opcode(o5_moveItem);
+ Opcode(o1_setRoom);
+ Opcode(o2_setCurPic);
+ // 0x08
+ Opcode(o2_setPic);
+ Opcode(o1_printMsg);
+ Opcode(o5_dummy);
+ Opcode(o5_setTextMode);
+ // 0x0c
+ Opcode(o2_moveAllItems);
+ Opcode(o1_quit);
+ Opcode(o5_dummy);
+ Opcode(o2_save);
+ // 0x10
+ Opcode(o2_restore);
+ Opcode(o1_restart);
+ Opcode(o5_setDisk);
+ Opcode(o5_dummy);
+ // 0x14
+ Opcode(o1_resetPic);
+ Opcode(o1_goDirection<IDI_DIR_NORTH>);
+ Opcode(o1_goDirection<IDI_DIR_SOUTH>);
+ Opcode(o1_goDirection<IDI_DIR_EAST>);
+ // 0x18
+ Opcode(o1_goDirection<IDI_DIR_WEST>);
+ Opcode(o1_goDirection<IDI_DIR_UP>);
+ Opcode(o1_goDirection<IDI_DIR_DOWN>);
+ Opcode(o1_takeItem);
+ // 0x1c
+ Opcode(o1_dropItem);
+ Opcode(o1_setRoomPic);
+ Opcode(o5_sound);
+ OpcodeUnImpl();
+ // 0x20
+ Opcode(o2_initDisk);
+}
+
+int AdlEngine_v5::o5_isVarGT(ScriptEnv &e) {
+ OP_DEBUG_2("\t&& VARS[%d] > %d", e.arg(1), e.arg(2));
+
+ if (getVar(e.arg(1)) > e.arg(2))
+ return 2;
+
+ return -1;
+}
+
+int AdlEngine_v5::o5_skipOneCommand(ScriptEnv &e) {
+ OP_DEBUG_0("\t&& SKIP_ONE_COMMAND()");
+
+ _skipOneCommand = true;
+ setVar(2, 0);
+
+ return -1;
+}
+
+// FIXME: Rename "isLineArt" and look at code duplication
+int AdlEngine_v5::o5_isItemInRoom(ScriptEnv &e) {
+ OP_DEBUG_2("\t&& GET_ITEM_ROOM(%s) == %s", itemStr(e.arg(1)).c_str(), itemRoomStr(e.arg(2)).c_str());
+
+ const Item &item = getItem(e.arg(1));
+
+ if (e.arg(2) != IDI_ANY && item.isLineArt != _curDisk)
+ return -1;
+
+ if (item.room == roomArg(e.arg(2)))
+ return 2;
+
+ return -1;
+}
+
+int AdlEngine_v5::o5_isNounNotInRoom(ScriptEnv &e) {
+ OP_DEBUG_1("\t&& NO_SUCH_ITEMS_IN_ROOM(%s)", itemRoomStr(e.arg(1)).c_str());
+
+ Common::List<Item>::const_iterator item;
+
+ setVar(24, 0);
+
+ for (item = _state.items.begin(); item != _state.items.end(); ++item)
+ if (item->noun == e.getNoun()) {
+ setVar(24, 1);
+
+ if (item->room == roomArg(e.arg(1)))
+ return -1;
+ }
+
+ return 1;
+}
+
+int AdlEngine_v5::o5_moveItem(ScriptEnv &e) {
+ OP_DEBUG_2("\tSET_ITEM_ROOM(%s, %s)", itemStr(e.arg(1)).c_str(), itemRoomStr(e.arg(2)).c_str());
+
+ byte room = roomArg(e.arg(2));
+
+ Item &item = getItem(e.arg(1));
+
+ if (item.room == _roomOnScreen)
+ _picOnScreen = 0;
+
+ // Set items that move from inventory to a room to state "dropped"
+ if (item.room == IDI_ANY && room != IDI_VOID_ROOM)
+ item.state = IDI_ITEM_DROPPED;
+
+ item.room = room;
+ item.isLineArt = _curDisk;
+ return 2;
+}
+
+int AdlEngine_v5::o5_dummy(ScriptEnv &e) {
+ OP_DEBUG_0("\tDUMMY()");
+
+ return 0;
+}
+
+int AdlEngine_v5::o5_setTextMode(ScriptEnv &e) {
+ OP_DEBUG_1("\tSET_TEXT_MODE(%d)", e.arg(1));
+
+ // TODO
+ // 1: 4-line mode
+ // 2: 24-line mode
+
+ switch (e.arg(1)) {
+ case 3:
+ // We re-use the restarting flag here, to simulate a long jump
+ _isRestarting = true;
+ return -1;
+ }
+
+ return 1;
+}
+
+int AdlEngine_v5::o5_setDisk(ScriptEnv &e) {
+ OP_DEBUG_2("\tSET_DISK(%d, %d)", e.arg(1), e.arg(2));
+
+ // TODO
+ // Arg 1: disk
+ // Arg 2: room
+
+ return 2;
+}
+
+int AdlEngine_v5::o5_sound(ScriptEnv &e) {
+ OP_DEBUG_0("\tSOUND()");
+
+ // TODO
+
+ return 0;
+}
+
+} // End of namespace Adl
diff --git a/engines/adl/adl_v5.h b/engines/adl/adl_v5.h
new file mode 100644
index 0000000000..377fe45e20
--- /dev/null
+++ b/engines/adl/adl_v5.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.
+ *
+ */
+
+#ifndef ADL_ADL_V5_H
+#define ADL_ADL_V5_H
+
+#include "adl/adl_v3.h"
+
+namespace Common {
+class RandomSource;
+}
+
+struct DiskOffset {
+ byte track;
+ byte sector;
+};
+
+namespace Adl {
+
+// FIXME: Subclass _v4 when it is done
+class AdlEngine_v5 : public AdlEngine_v3 {
+public:
+ virtual ~AdlEngine_v5() { }
+
+protected:
+ AdlEngine_v5(OSystem *syst, const AdlGameDescription *gd);
+
+ // AdlEngine
+ virtual void setupOpcodeTables();
+ virtual Common::String loadMessage(uint idx) const;
+ Common::String getItemDescription(const Item &item) const;
+
+ // AdlEngine_v2
+ virtual void adjustDataBlockPtr(byte &track, byte &sector, byte &offset, byte &size) const;
+
+ void applyDiskOffset(byte &track, byte &sector) const;
+
+ int o5_isVarGT(ScriptEnv &e);
+ int o5_isItemInRoom(ScriptEnv &e);
+ int o5_isNounNotInRoom(ScriptEnv &e);
+ int o5_skipOneCommand(ScriptEnv &e);
+ int o5_moveItem(ScriptEnv &e);
+ int o5_dummy(ScriptEnv &e);
+ int o5_setTextMode(ScriptEnv &e);
+ int o5_setDisk(ScriptEnv &e);
+ int o5_sound(ScriptEnv &e);
+
+ byte _curDisk;
+ Common::Array<DiskOffset> _diskOffsets;
+};
+
+} // End of namespace Adl
+
+#endif
diff --git a/engines/adl/console.cpp b/engines/adl/console.cpp
index c35e8b02aa..7305ec8125 100644
--- a/engines/adl/console.cpp
+++ b/engines/adl/console.cpp
@@ -35,6 +35,7 @@ Console::Console(AdlEngine *engine) : GUI::Debugger() {
registerCmd("verbs", WRAP_METHOD(Console, Cmd_Verbs));
registerCmd("dump_scripts", WRAP_METHOD(Console, Cmd_DumpScripts));
registerCmd("valid_cmds", WRAP_METHOD(Console, Cmd_ValidCommands));
+ registerCmd("region", WRAP_METHOD(Console, Cmd_Region));
registerCmd("room", WRAP_METHOD(Console, Cmd_Room));
registerCmd("items", WRAP_METHOD(Console, Cmd_Items));
registerCmd("give_item", WRAP_METHOD(Console, Cmd_GiveItem));
@@ -112,35 +113,55 @@ bool Console::Cmd_ValidCommands(int argc, const char **argv) {
return true;
}
-bool Console::Cmd_DumpScripts(int argc, const char **argv) {
- if (argc != 1) {
- debugPrintf("Usage: %s\n", argv[0]);
- return true;
- }
-
- bool oldFlag = DebugMan.isDebugChannelEnabled(kDebugChannelScript);
-
- DebugMan.enableDebugChannel("Script");
-
- _engine->_dumpFile = new Common::DumpFile();
-
+void Console::dumpScripts(const Common::String &prefix) {
for (byte roomNr = 1; roomNr <= _engine->_state.rooms.size(); ++roomNr) {
_engine->loadRoom(roomNr);
if (_engine->_roomData.commands.size() != 0) {
- _engine->_dumpFile->open(Common::String::format("%03d.ADL", roomNr).c_str());
+ _engine->_dumpFile->open(prefix + Common::String::format("%03d.ADL", roomNr).c_str());
_engine->doAllCommands(_engine->_roomData.commands, IDI_ANY, IDI_ANY);
_engine->_dumpFile->close();
}
}
_engine->loadRoom(_engine->_state.room);
- _engine->_dumpFile->open("GLOBAL.ADL");
+ _engine->_dumpFile->open(prefix + "GLOBAL.ADL");
_engine->doAllCommands(_engine->_globalCommands, IDI_ANY, IDI_ANY);
_engine->_dumpFile->close();
- _engine->_dumpFile->open("RESPONSE.ADL");
+ _engine->_dumpFile->open(prefix + "RESPONSE.ADL");
_engine->doAllCommands(_engine->_roomCommands, IDI_ANY, IDI_ANY);
_engine->_dumpFile->close();
+}
+
+bool Console::Cmd_DumpScripts(int argc, const char **argv) {
+ if (argc != 1) {
+ debugPrintf("Usage: %s\n", argv[0]);
+ return true;
+ }
+
+ bool oldFlag = DebugMan.isDebugChannelEnabled(kDebugChannelScript);
+
+ DebugMan.enableDebugChannel("Script");
+
+ _engine->_dumpFile = new Common::DumpFile();
+
+ if (_engine->_state.regions.empty()) {
+ dumpScripts();
+ } else {
+ const byte oldRegion = _engine->_state.region;
+ const byte oldPrevRegion = _engine->_state.prevRegion;
+ const byte oldRoom = _engine->_state.room;
+
+ for (byte regionNr = 1; regionNr <= _engine->_state.regions.size(); ++regionNr) {
+ _engine->switchRegion(regionNr);
+ dumpScripts(Common::String::format("%03d-", regionNr));
+ }
+
+ _engine->switchRegion(oldRegion);
+ _engine->_state.prevRegion = oldPrevRegion;
+ _engine->_state.room = oldRoom;
+ _engine->loadRoom(oldRoom);
+ }
delete _engine->_dumpFile;
_engine->_dumpFile = nullptr;
@@ -151,6 +172,42 @@ bool Console::Cmd_DumpScripts(int argc, const char **argv) {
return true;
}
+void Console::prepareGame() {
+ _engine->clearScreen();
+ _engine->loadRoom(_engine->_state.room);
+ _engine->showRoom();
+ _engine->_display->updateTextScreen();
+ _engine->_display->updateHiResScreen();
+}
+
+bool Console::Cmd_Region(int argc, const char **argv) {
+ if (argc > 2) {
+ debugPrintf("Usage: %s [<new_region>]\n", argv[0]);
+ return true;
+ }
+
+ if (argc == 2) {
+ if (!_engine->_canRestoreNow) {
+ debugPrintf("Cannot change regions right now\n");
+ return true;
+ }
+
+ uint regionCount = _engine->_state.regions.size();
+ uint region = strtoul(argv[1], NULL, 0);
+ if (region < 1 || region > regionCount) {
+ debugPrintf("Region %u out of valid range [1, %u]\n", region, regionCount);
+ return true;
+ }
+
+ _engine->switchRegion(region);
+ prepareGame();
+ }
+
+ debugPrintf("Current region: %u\n", _engine->_state.region);
+
+ return true;
+}
+
bool Console::Cmd_Room(int argc, const char **argv) {
if (argc > 2) {
debugPrintf("Usage: %s [<new_room>]\n", argv[0]);
@@ -170,12 +227,8 @@ bool Console::Cmd_Room(int argc, const char **argv) {
return true;
}
- _engine->_state.room = room;
- _engine->clearScreen();
- _engine->loadRoom(_engine->_state.room);
- _engine->showRoom();
- _engine->_display->updateTextScreen();
- _engine->_display->updateHiResScreen();
+ _engine->switchRoom(room);
+ prepareGame();
}
debugPrintf("Current room: %u\n", _engine->_state.room);
diff --git a/engines/adl/console.h b/engines/adl/console.h
index a8c6adc1cc..68787e148a 100644
--- a/engines/adl/console.h
+++ b/engines/adl/console.h
@@ -48,6 +48,7 @@ private:
bool Cmd_Verbs(int argc, const char **argv);
bool Cmd_DumpScripts(int argc, const char **argv);
bool Cmd_ValidCommands(int argc, const char **argv);
+ bool Cmd_Region(int argc, const char **argv);
bool Cmd_Room(int argc, const char **argv);
bool Cmd_Items(int argc, const char **argv);
bool Cmd_GiveItem(int argc, const char **argv);
@@ -56,6 +57,8 @@ private:
void printItem(const Item &item);
void printWordMap(const Common::HashMap<Common::String, uint> &wordMap);
+ void dumpScripts(const Common::String &prefix = Common::String());
+ void prepareGame();
AdlEngine *_engine;
};
diff --git a/engines/adl/detection.cpp b/engines/adl/detection.cpp
index 6c1085a127..cba66faca9 100644
--- a/engines/adl/detection.cpp
+++ b/engines/adl/detection.cpp
@@ -162,18 +162,18 @@ static const AdlGameDescription gameDescriptions[] = {
{
"hires5", 0,
{
- { "TZONE1A.NIB", 0, "475dedb7396fdcea81c1a2a4046caebe", 232960 },
- { "TZONE1B.NIB", 0, "f8aaea094ebbe41cf4354d9fe2c30d9a", 232960 },
- { "TZONE2C.NIB", 0, "b351a367dc48e776bf08e42a3f50ae74", 232960 },
- { "TZONE2D.NIB", 0, "9583b287a5c95960f5335878102bb8b1", 232960 },
- { "TZONE3E.NIB", 0, "502e42a0cb69ffe4a48cd51c1ff210cf", 232960 },
- { "TZONE3F.NIB", 0, "3d6e0aae15f590b72b6759535b6b7d3c", 232960 },
- { "TZONE4G.NIB", 0, "ede4113a9c9e17745faf71d099808a18", 232960 },
- { "TZONE4H.NIB", 0, "f95dae4aae1155a27f7120230464d4e1", 232960 },
- { "TZONE5I.NIB", 0, "92b3b376877f81a7b7ae426bf1e65456", 232960 },
- { "TZONE5J.NIB", 0, "c9ef796fa596548dbf8f085901f0bac3", 232960 },
- { "TZONE6K.NIB", 0, "2e5323be637002efce1d4c813ae20a3f", 232960 },
- { "TZONE6L.NIB", 0, "7c9268f0ea2d02120c77a46337b3d975", 232960 },
+ { "TZONE1A.NIB", 2, "475dedb7396fdcea81c1a2a4046caebe", 232960 },
+ { "TZONE1B.NIB", 3, "f8aaea094ebbe41cf4354d9fe2c30d9a", 232960 },
+ { "TZONE2C.NIB", 4, "b351a367dc48e776bf08e42a3f50ae74", 232960 },
+ { "TZONE2D.NIB", 5, "9583b287a5c95960f5335878102bb8b1", 232960 },
+ { "TZONE3E.NIB", 6, "502e42a0cb69ffe4a48cd51c1ff210cf", 232960 },
+ { "TZONE3F.NIB", 7, "3d6e0aae15f590b72b6759535b6b7d3c", 232960 },
+ { "TZONE4G.NIB", 8, "ede4113a9c9e17745faf71d099808a18", 232960 },
+ { "TZONE4H.NIB", 9, "f95dae4aae1155a27f7120230464d4e1", 232960 },
+ { "TZONE5I.NIB", 10, "92b3b376877f81a7b7ae426bf1e65456", 232960 },
+ { "TZONE5J.NIB", 11, "c9ef796fa596548dbf8f085901f0bac3", 232960 },
+ { "TZONE6K.NIB", 12, "2e5323be637002efce1d4c813ae20a3f", 232960 },
+ { "TZONE6L.NIB", 13, "7c9268f0ea2d02120c77a46337b3d975", 232960 },
AD_LISTEND
},
Common::EN_ANY,
diff --git a/engines/adl/disk.cpp b/engines/adl/disk.cpp
index d429556670..133c655706 100644
--- a/engines/adl/disk.cpp
+++ b/engines/adl/disk.cpp
@@ -39,11 +39,13 @@ static Common::SeekableReadStream *readImage(const Common::String &filename) {
return f;
}
+const uint trackLen = 256 * 26;
+
// 4-and-4 encoding (odd-even)
-static uint8 read44(Common::SeekableReadStream &f) {
+static uint8 read44(byte *buffer, uint &pos) {
// 1s in the other fields, so we can just AND
- uint8 ret = f.readByte();
- return ((ret << 1) | 1) & f.readByte();
+ uint8 ret = buffer[pos++ % trackLen];
+ return ((ret << 1) | 1) & buffer[pos++ % trackLen];
}
static Common::SeekableReadStream *readImage_NIB(const Common::String &filename) {
@@ -67,18 +69,30 @@ static Common::SeekableReadStream *readImage_NIB(const Common::String &filename)
byte *const diskImage = (byte *)calloc(imageSize, 1);
bool sawAddress = false;
- uint8 volNo, track, sector;
+ uint8 volNo = 0, track = 0, sector = 0;
bool newStyle;
- while (f.pos() < f.size()) {
+ byte buffer[trackLen];
+ uint firstGoodTrackPos = 0;
+ uint pos = trackLen; // force read
+
+ while (true) {
+ if (pos >= trackLen+firstGoodTrackPos) {
+ if (f.pos() == f.size())
+ break;
+ f.read(buffer, sizeof(buffer));
+ firstGoodTrackPos = 0;
+ pos = 0;
+ sawAddress = false;
+ }
+
// Read until we find two sync bytes.
- if (f.readByte() != 0xd5 || f.readByte() != 0xaa)
+ if (buffer[pos++ % trackLen] != 0xd5 || buffer[pos++ % trackLen] != 0xaa)
continue;
- byte prologue = f.readByte();
+ byte prologue = buffer[pos++ % trackLen];
if (sawAddress && (prologue == 0xb5 || prologue == 0x96)) {
- warning("NIB: data for %02x/%02x/%02x missing", volNo, track, sector);
sawAddress = false;
}
@@ -91,17 +105,26 @@ static Common::SeekableReadStream *readImage_NIB(const Common::String &filename)
// Accept a DOS 3.3(?) header at the start.
if (prologue == 0x96) {
newStyle = true;
+ } else if (prologue == 0xad || prologue == 0xfd) {
+ sawAddress = false;
+ continue;
} else {
error("unknown NIB field prologue %02x", prologue);
}
}
- volNo = read44(f);
- track = read44(f);
- sector = read44(f);
- uint8 checksum = read44(f);
- if ((volNo ^ track ^ sector) != checksum)
- error("invalid NIB checksum");
+ volNo = read44(buffer, pos);
+ track = read44(buffer, pos);
+ sector = read44(buffer, pos);
+ uint8 checksum = read44(buffer, pos);
+ if ((volNo ^ track ^ sector) != checksum) {
+ warning("invalid NIB checksum (volNo %d, track %d, sector %d)", volNo, track, sector);
+ sawAddress = false;
+ continue;
+ }
+
+ if (!firstGoodTrackPos)
+ firstGoodTrackPos = pos;
// Epilogue is de/aa plus a gap, but we don't care.
continue;
@@ -121,7 +144,13 @@ static Common::SeekableReadStream *readImage_NIB(const Common::String &filename)
// 6-and-2 uses 342 on-disk bytes
byte inbuffer[342];
- f.read(inbuffer, 342);
+ uint z = trackLen - (pos % trackLen);
+ if (z < 342) {
+ memcpy(inbuffer, buffer + (pos % trackLen), z);
+ memcpy(inbuffer + z, buffer, 342 - z);
+ } else
+ memcpy(inbuffer, buffer + (pos % trackLen), 342);
+ pos += 342;
byte oldVal = 0;
for (uint n = 0; n < 342; ++n) {
@@ -136,7 +165,7 @@ static Common::SeekableReadStream *readImage_NIB(const Common::String &filename)
inbuffer[n] = oldVal;
}
- byte checksum = f.readByte();
+ byte checksum = buffer[pos++ % trackLen];
if (checksum < 0x96 || oldVal != c_6and2_lookup[checksum - 0x96])
warning("NIB: checksum mismatch @ (%x, %x)", track, sector);
@@ -156,7 +185,13 @@ static Common::SeekableReadStream *readImage_NIB(const Common::String &filename)
} else {
// 5-and-3 uses 410 on-disk bytes, decoding to just over 256 bytes
byte inbuffer[410];
- f.read(inbuffer, 410);
+ uint z = trackLen - (pos % trackLen);
+ if (z < 410) {
+ memcpy(inbuffer, buffer + (pos % trackLen), z);
+ memcpy(inbuffer + z, buffer, 410 - z);
+ } else
+ memcpy(inbuffer, buffer + (pos % trackLen), 410);
+ pos += 410;
bool truncated = false;
byte oldVal = 0;
@@ -166,7 +201,7 @@ static Common::SeekableReadStream *readImage_NIB(const Common::String &filename)
if (inbuffer[n] == 0xd5) {
// Early end of block.
truncated = true;
- f.seek(-(410 - n), SEEK_CUR);
+ pos -= (410 - n);
warning("NIB: early end of block @ 0x%x (%x, %x)", f.pos(), track, sector);
break;
}
@@ -175,7 +210,7 @@ static Common::SeekableReadStream *readImage_NIB(const Common::String &filename)
// Badly-encoded nibbles, stop trying to decode here.
truncated = true;
warning("NIB: bad nibble %02x @ 0x%x (%x, %x)", inbuffer[n], f.pos(), track, sector);
- f.seek(-(410 - n), SEEK_CUR);
+ pos -= (410 - n);
break;
}
// undo checksum
@@ -183,7 +218,7 @@ static Common::SeekableReadStream *readImage_NIB(const Common::String &filename)
inbuffer[n] = oldVal;
}
if (!truncated) {
- byte checksum = f.readByte();
+ byte checksum = buffer[pos++ % trackLen];
if (checksum < 0xaa || oldVal != c_5and3_lookup[checksum - 0xaa])
warning("NIB: checksum mismatch @ (%x, %x)", track, sector);
}
diff --git a/engines/adl/display.cpp b/engines/adl/display.cpp
index 2cf50f72fc..feef8fb2a4 100644
--- a/engines/adl/display.cpp
+++ b/engines/adl/display.cpp
@@ -130,7 +130,7 @@ Display::Display() :
_frameBufSurface->create(DISPLAY_WIDTH * 2, DISPLAY_HEIGHT * 2, Graphics::PixelFormat::createFormatCLUT8());
_textBuf = new byte[TEXT_BUF_SIZE];
- memset(_textBuf, APPLECHAR(' '), TEXT_BUF_SIZE);
+ memset(_textBuf, (byte)APPLECHAR(' '), TEXT_BUF_SIZE);
_textBufSurface = new Graphics::Surface;
// For ease of copying, also use 2x scaling here
_textBufSurface->create(DISPLAY_WIDTH * 2, DISPLAY_HEIGHT * 2, Graphics::PixelFormat::createFormatCLUT8());
@@ -267,7 +267,7 @@ void Display::clear(byte color) {
}
void Display::home() {
- memset(_textBuf, APPLECHAR(' '), TEXT_BUF_SIZE);
+ memset(_textBuf, (byte)APPLECHAR(' '), TEXT_BUF_SIZE);
_cursorPos = 0;
}
@@ -546,7 +546,7 @@ void Display::createFont() {
void Display::scrollUp() {
memmove(_textBuf, _textBuf + TEXT_WIDTH, TEXT_BUF_SIZE - TEXT_WIDTH);
- memset(_textBuf + TEXT_BUF_SIZE - TEXT_WIDTH, APPLECHAR(' '), TEXT_WIDTH);
+ memset(_textBuf + TEXT_BUF_SIZE - TEXT_WIDTH, (byte)APPLECHAR(' '), TEXT_WIDTH);
if (_cursorPos >= TEXT_WIDTH)
_cursorPos -= TEXT_WIDTH;
}
diff --git a/engines/adl/hires1.cpp b/engines/adl/hires1.cpp
index 217a9013ba..e811b747c3 100644
--- a/engines/adl/hires1.cpp
+++ b/engines/adl/hires1.cpp
@@ -98,7 +98,7 @@ public:
private:
// AdlEngine
- void runIntro() const;
+ void runIntro();
void init();
void initGameState();
void restartGame();
@@ -126,7 +126,7 @@ private:
} _gameStrings;
};
-void HiRes1Engine::runIntro() const {
+void HiRes1Engine::runIntro() {
StreamPtr stream(_files->createReadStream(IDS_HR1_EXE_0));
stream->seek(IDI_HR1_OFS_LOGO_0);
@@ -318,7 +318,8 @@ void HiRes1Engine::initGameState() {
stream->seek(IDI_HR1_OFS_ITEMS);
byte id;
while ((id = stream->readByte()) != 0xff) {
- Item item = Item();
+ Item item;
+
item.id = id;
item.noun = stream->readByte();
item.room = stream->readByte();
diff --git a/engines/adl/hires2.cpp b/engines/adl/hires2.cpp
index 199f457b4f..9562095ec9 100644
--- a/engines/adl/hires2.cpp
+++ b/engines/adl/hires2.cpp
@@ -54,12 +54,12 @@ public:
private:
// AdlEngine
- void runIntro() const;
+ void runIntro();
void init();
void initGameState();
};
-void HiRes2Engine::runIntro() const {
+void HiRes2Engine::runIntro() {
// This only works for the 16-sector re-release. The original
// release is not supported at this time, because we don't have
// access to it.
diff --git a/engines/adl/hires5.cpp b/engines/adl/hires5.cpp
index e7ee224754..c1ada9e7d3 100644
--- a/engines/adl/hires5.cpp
+++ b/engines/adl/hires5.cpp
@@ -26,7 +26,7 @@
#include "common/file.h"
#include "common/stream.h"
-#include "adl/adl_v3.h"
+#include "adl/adl_v4.h"
#include "adl/detection.h"
#include "adl/display.h"
#include "adl/graphics.h"
@@ -34,21 +34,303 @@
namespace Adl {
-class HiRes5Engine : public AdlEngine_v3 {
+class HiRes5Engine : public AdlEngine_v4 {
public:
- HiRes5Engine(OSystem *syst, const AdlGameDescription *gd) : AdlEngine_v3(syst, gd) { }
+ HiRes5Engine(OSystem *syst, const AdlGameDescription *gd) :
+ AdlEngine_v4(syst, gd) { }
private:
// AdlEngine
+ void setupOpcodeTables();
+ void runIntro();
void init();
void initGameState();
+ void applyRegionWorkarounds();
+ void applyRoomWorkarounds(byte roomNr);
+
+ // AdlEngine_v4
+ bool isInventoryFull();
+
+ int o_checkItemTimeLimits(ScriptEnv &e);
+ int o_startAnimation(ScriptEnv &e);
+ int o_winGame(ScriptEnv &e);
+
+ static const uint kRegions = 41;
+ static const uint kItems = 69;
+
+ Common::Array<byte> _itemTimeLimits;
+ Common::String _itemTimeLimitMsg;
+
+ struct {
+ Common::String itemTimeLimit;
+ Common::String carryingTooMuch;
+ } _gameStrings;
};
+typedef Common::Functor1Mem<ScriptEnv &, int, HiRes5Engine> OpcodeH5;
+#define SetOpcodeTable(x) table = &x;
+#define Opcode(x) table->push_back(new OpcodeH5(this, &HiRes5Engine::x))
+#define OpcodeUnImpl() table->push_back(new OpcodeH5(this, 0))
+
+void HiRes5Engine::setupOpcodeTables() {
+ Common::Array<const Opcode *> *table = 0;
+
+ SetOpcodeTable(_condOpcodes);
+ // 0x00
+ OpcodeUnImpl();
+ Opcode(o2_isFirstTime);
+ Opcode(o2_isRandomGT);
+ Opcode(o4_isItemInRoom);
+ // 0x04
+ Opcode(o3_isNounNotInRoom);
+ Opcode(o1_isMovesGT);
+ Opcode(o1_isVarEQ);
+ Opcode(o2_isCarryingSomething);
+ // 0x08
+ Opcode(o4_isVarGT);
+ Opcode(o1_isCurPicEQ);
+ OpcodeUnImpl();
+
+ SetOpcodeTable(_actOpcodes);
+ // 0x00
+ OpcodeUnImpl();
+ Opcode(o1_varAdd);
+ Opcode(o1_varSub);
+ Opcode(o1_varSet);
+ // 0x04
+ Opcode(o1_listInv);
+ Opcode(o4_moveItem);
+ Opcode(o1_setRoom);
+ Opcode(o2_setCurPic);
+ // 0x08
+ Opcode(o2_setPic);
+ Opcode(o1_printMsg);
+ Opcode(o4_setRegionToPrev);
+ Opcode(o_checkItemTimeLimits);
+ // 0x0c
+ Opcode(o4_moveAllItems);
+ Opcode(o1_quit);
+ Opcode(o4_setRegion);
+ Opcode(o4_save);
+ // 0x10
+ Opcode(o4_restore);
+ Opcode(o4_restart);
+ Opcode(o4_setRegionRoom);
+ Opcode(o_startAnimation);
+ // 0x14
+ Opcode(o1_resetPic);
+ Opcode(o1_goDirection<IDI_DIR_NORTH>);
+ Opcode(o1_goDirection<IDI_DIR_SOUTH>);
+ Opcode(o1_goDirection<IDI_DIR_EAST>);
+ // 0x18
+ Opcode(o1_goDirection<IDI_DIR_WEST>);
+ Opcode(o1_goDirection<IDI_DIR_UP>);
+ Opcode(o1_goDirection<IDI_DIR_DOWN>);
+ Opcode(o1_takeItem);
+ // 0x1c
+ Opcode(o1_dropItem);
+ Opcode(o4_setRoomPic);
+ Opcode(o_winGame);
+ OpcodeUnImpl();
+ // 0x20
+ Opcode(o2_initDisk);
+}
+
+bool HiRes5Engine::isInventoryFull() {
+ Common::List<Item>::const_iterator item;
+ byte weight = 0;
+
+ for (item = _state.items.begin(); item != _state.items.end(); ++item) {
+ if (item->room == IDI_ANY)
+ weight += item->description;
+ }
+
+ if (weight >= 100) {
+ printString(_gameStrings.carryingTooMuch);
+ inputString();
+ return true;
+ }
+
+ return false;
+}
+
+int HiRes5Engine::o_checkItemTimeLimits(ScriptEnv &e) {
+ OP_DEBUG_1("\tCHECK_ITEM_TIME_LIMITS(VARS[%d])", e.arg(1));
+
+ bool lostAnItem = false;
+ Common::List<Item>::iterator item;
+
+ for (item = _state.items.begin(); item != _state.items.end(); ++item) {
+ const byte room = item->room;
+ const byte region = item->region;
+
+ if (room == IDI_ANY || room == IDI_CUR_ROOM || (room == _state.room && region == _state.region)) {
+ if (getVar(e.arg(1)) < _itemTimeLimits[item->id - 1]) {
+ item->room = IDI_VOID_ROOM;
+ lostAnItem = true;
+ }
+ }
+ }
+
+ if (lostAnItem) {
+ printString(_gameStrings.itemTimeLimit);
+ inputString();
+ }
+
+ return 1;
+}
+
+int HiRes5Engine::o_startAnimation(ScriptEnv &e) {
+ OP_DEBUG_0("\tSTART_ANIMATION()");
+
+ // TODO: sets a flag that triggers an animation
+
+ return 0;
+}
+
+int HiRes5Engine::o_winGame(ScriptEnv &e) {
+ OP_DEBUG_0("\tWIN_GAME()");
+
+ // TODO: draws room and plays music
+
+ return o1_quit(e);
+}
+
+void HiRes5Engine::runIntro() {
+ insertDisk(2);
+
+ StreamPtr stream(_disk->createReadStream(0x10, 0x0, 0x00, 31));
+
+ _display->setMode(DISPLAY_MODE_HIRES);
+ _display->loadFrameBuffer(*stream);
+ _display->updateHiResScreen();
+
+ inputKey();
+
+ _display->home();
+ _display->setMode(DISPLAY_MODE_TEXT);
+
+ stream.reset(_disk->createReadStream(0x03, 0xc, 0x34, 1));
+ Common::String menu(readString(*stream));
+
+ while (!g_engine->shouldQuit()) {
+ _display->home();
+ _display->printString(menu);
+
+ Common::String cmd(inputString());
+
+ // We ignore the backup and format menu options
+ if (!cmd.empty() && cmd[0] == APPLECHAR('1'))
+ break;
+ };
+}
+
void HiRes5Engine::init() {
_graphics = new Graphics_v2(*_display);
+
+ insertDisk(2);
+
+ StreamPtr stream(_disk->createReadStream(0x5, 0x0, 0x02));
+ loadRegionLocations(*stream, kRegions);
+
+ stream.reset(_disk->createReadStream(0xd, 0x2, 0x04));
+ loadRegionInitDataOffsets(*stream, kRegions);
+
+ stream.reset(_disk->createReadStream(0x7, 0xe));
+ _strings.verbError = readStringAt(*stream, 0x4f);
+ _strings.nounError = readStringAt(*stream, 0x8e);
+ _strings.enterCommand = readStringAt(*stream, 0xbc);
+
+ stream.reset(_disk->createReadStream(0x7, 0xc));
+ _strings.lineFeeds = readString(*stream);
+
+ stream.reset(_disk->createReadStream(0x8, 0x3, 0x00, 2));
+ _strings_v2.saveInsert = readStringAt(*stream, 0x66);
+ _strings_v2.saveReplace = readStringAt(*stream, 0x112);
+ _strings_v2.restoreInsert = readStringAt(*stream, 0x180);
+ _strings.playAgain = readStringAt(*stream, 0x247, 0xff);
+
+ _messageIds.cantGoThere = 110;
+ _messageIds.dontUnderstand = 112;
+ _messageIds.itemDoesntMove = 114;
+ _messageIds.itemNotHere = 115;
+ _messageIds.thanksForPlaying = 113;
+
+ stream.reset(_disk->createReadStream(0xe, 0x1, 0x13, 4));
+ loadItemDescriptions(*stream, kItems);
+
+ stream.reset(_disk->createReadStream(0x8, 0xd, 0xfd, 1));
+ loadDroppedItemOffsets(*stream, 16);
+
+ stream.reset(_disk->createReadStream(0xb, 0xa, 0x05, 1));
+ loadItemPicIndex(*stream, kItems);
+
+ stream.reset(_disk->createReadStream(0x7, 0x8, 0x01));
+ for (uint i = 0; i < kItems; ++i)
+ _itemTimeLimits.push_back(stream->readByte());
+
+ if (stream->eos() || stream->err())
+ error("Failed to read item time limits");
+
+ stream.reset(_disk->createReadStream(0x8, 0x2, 0x2d));
+ _gameStrings.itemTimeLimit = readString(*stream);
+
+ stream.reset(_disk->createReadStream(0x8, 0x7, 0x02));
+ _gameStrings.carryingTooMuch = readString(*stream);
}
void HiRes5Engine::initGameState() {
+ _state.vars.resize(40);
+
+ insertDisk(2);
+
+ StreamPtr stream(_disk->createReadStream(0x5, 0x1, 0x00, 3));
+ loadItems(*stream);
+
+ // A combined total of 1213 rooms
+ static const byte rooms[kRegions] = {
+ 6, 16, 24, 57, 40, 30, 76, 40,
+ 54, 38, 44, 21, 26, 42, 49, 32,
+ 59, 69, 1, 1, 1, 1, 1, 18,
+ 25, 13, 28, 28, 11, 23, 9, 31,
+ 6, 29, 29, 34, 9, 10, 95, 86,
+ 1
+ };
+
+ initRegions(rooms, kRegions);
+
+ loadRegion(1);
+ _state.room = 5;
+}
+
+void HiRes5Engine::applyRegionWorkarounds() {
+ // WORKAROUND: Remove/fix buggy commands
+ switch (_state.region) {
+ case 3:
+ // "USE PIN" references a missing message, but cannot
+ // be triggered due to shadowing of the "USE" verb.
+ // We remove it anyway to allow script dumping to proceed.
+ // TODO: Investigate if we should fix this command instead
+ // of removing it.
+ removeCommand(_roomCommands, 12);
+ break;
+ case 14:
+ // "WITH SHOVEL" references a missing message. This bug
+ // is game-breaking in the original, but unlikely to occur
+ // in practice due to the "DIG" command not asking for what
+ // to dig with. Probably a remnant of an earlier version
+ // of the script.
+ removeCommand(_roomCommands, 0);
+ }
+}
+
+void HiRes5Engine::applyRoomWorkarounds(byte roomNr) {
+ // WORKAROUND: Remove/fix buggy commands
+ if (_state.region == 17 && roomNr == 49) {
+ // "GET WATER" references a missing message when you already
+ // have water. This message should be 117 instead of 17.
+ getCommand(_roomData.commands, 8).script[4] = 117;
+ }
}
Engine *HiRes5Engine_create(OSystem *syst, const AdlGameDescription *gd) {
diff --git a/engines/adl/hires6.cpp b/engines/adl/hires6.cpp
index a1fea05f19..c07493f5bd 100644
--- a/engines/adl/hires6.cpp
+++ b/engines/adl/hires6.cpp
@@ -27,7 +27,7 @@
#include "common/stream.h"
#include "common/memstream.h"
-#include "adl/adl_v4.h"
+#include "adl/adl_v5.h"
#include "adl/display.h"
#include "adl/graphics.h"
#include "adl/disk.h"
@@ -55,10 +55,10 @@ struct DiskDataDesc {
byte volume;
};
-class HiRes6Engine : public AdlEngine_v4 {
+class HiRes6Engine : public AdlEngine_v5 {
public:
HiRes6Engine(OSystem *syst, const AdlGameDescription *gd) :
- AdlEngine_v4(syst, gd),
+ AdlEngine_v5(syst, gd),
_boot(nullptr),
_currVerb(0),
_currNoun(0) {
@@ -68,7 +68,7 @@ public:
private:
// AdlEngine
- void runIntro() const;
+ void runIntro();
void init();
void initGameState();
void printRoomDescription();
@@ -120,7 +120,7 @@ static Common::MemoryReadStream *loadSectors(DiskImage *disk, byte track, byte s
return new Common::MemoryReadStream(buf, bufSize, DisposeAfterUse::YES);
}
-void HiRes6Engine::runIntro() const {
+void HiRes6Engine::runIntro() {
DiskImage *boot(new DiskImage());
if (!boot->open(disks[0]))
diff --git a/engines/adl/module.mk b/engines/adl/module.mk
index 0654caa142..df9dd2d232 100644
--- a/engines/adl/module.mk
+++ b/engines/adl/module.mk
@@ -5,6 +5,7 @@ MODULE_OBJS := \
adl_v2.o \
adl_v3.o \
adl_v4.o \
+ adl_v5.o \
console.o \
detection.o \
disk.o \
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 3b130de00f..8b6dc0c0d9 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -397,7 +397,9 @@ bool AdvancedMetaEngine::getFileProperties(const Common::FSNode &parent, const F
fileProps.md5 = macResMan.computeResForkMD5AsString(_md5Bytes);
fileProps.size = macResMan.getResForkDataSize();
- return true;
+
+ if (fileProps.size != 0)
+ return true;
}
if (!allFiles.contains(fname))
diff --git a/engines/bladerunner/item.cpp b/engines/bladerunner/item.cpp
index 6200668e14..b8d4cd2c1f 100644
--- a/engines/bladerunner/item.cpp
+++ b/engines/bladerunner/item.cpp
@@ -122,7 +122,7 @@ void Item::setXYZ(Vector3 position) {
_depth = screenPosition.z * 25.5f;
}
-void Item::setup(int itemId, int setId, int animationId, Vector3 position, int facing, int height, int width, bool isTargetable, bool isVisible, bool isPoliceMazeEnemy) {
+void Item::setup(int itemId, int setId, int animationId, Vector3 position, int facing, int height, int width, bool isTargetableFlag, bool isVisibleFlag, bool isPoliceMazeEnemyFlag) {
_itemId = itemId;
_setId = setId;
_animationId = animationId;
@@ -130,9 +130,9 @@ void Item::setup(int itemId, int setId, int animationId, Vector3 position, int f
_angle = facing * (M_PI / 512.0f);
_width = width;
_height = height;
- _isTargetable = isTargetable;
- _isVisible = isVisible;
- _isPoliceMazeEnemy = isPoliceMazeEnemy;
+ _isTargetable = isTargetableFlag;
+ _isVisible = isVisibleFlag;
+ _isPoliceMazeEnemy = isPoliceMazeEnemyFlag;
setXYZ(position);
_screenRectangle.bottom = -1;
_screenRectangle.right = -1;
diff --git a/engines/bladerunner/item.h b/engines/bladerunner/item.h
index 3f12a6ad3a..0c74bf3be3 100644
--- a/engines/bladerunner/item.h
+++ b/engines/bladerunner/item.h
@@ -70,7 +70,7 @@ public:
bool isTargetable();
void tick(bool special);
- void setup(int itemId, int setId, int animationId, Vector3 position, int facing, int height, int width, bool isTargetable, bool isVisible, bool isPoliceMazeEnemy);
+ void setup(int itemId, int setId, int animationId, Vector3 position, int facing, int height, int width, bool isTargetableFlag, bool isVisibleFlag, bool isPoliceMazeEnemyFlag);
};
}
diff --git a/engines/bladerunner/items.cpp b/engines/bladerunner/items.cpp
index 2bc06e0a72..6fa17dffd5 100644
--- a/engines/bladerunner/items.cpp
+++ b/engines/bladerunner/items.cpp
@@ -62,7 +62,7 @@ void Items::tick() {
}
}
-bool Items::addToWorld(int itemId, int animationId, int setId, Vector3 position, int facing, int height, int width, bool isTargetable, bool isVisible, bool isPoliceMazeEnemy, bool addToSet) {
+bool Items::addToWorld(int itemId, int animationId, int setId, Vector3 position, int facing, int height, int width, bool isTargetableFlag, bool isVisibleFlag, bool isPoliceMazeEnemyFlag, bool addToSetFlag) {
if (_items.size() >= 100) {
return false;
}
@@ -72,11 +72,11 @@ bool Items::addToWorld(int itemId, int animationId, int setId, Vector3 position,
}
Item *item = new Item(_vm);
- item->setup(itemId, setId, animationId, position, facing, height, width, isTargetable, isVisible, isPoliceMazeEnemy);
+ item->setup(itemId, setId, animationId, position, facing, height, width, isTargetableFlag, isVisibleFlag, isPoliceMazeEnemyFlag);
_items.push_back(item);
- if (addToSet && setId == _vm->_scene->getSetId()) {
- return _vm->_sceneObjects->addItem(itemId + SCENE_OBJECTS_ITEMS_OFFSET, &item->_boundingBox, &item->_screenRectangle, isTargetable, isVisible);
+ if (addToSetFlag && setId == _vm->_scene->getSetId()) {
+ return _vm->_sceneObjects->addItem(itemId + SCENE_OBJECTS_ITEMS_OFFSET, &item->_boundingBox, &item->_screenRectangle, isTargetableFlag, isVisibleFlag);
}
return true;
}
diff --git a/engines/bladerunner/items.h b/engines/bladerunner/items.h
index 667117fba2..c288e93bae 100644
--- a/engines/bladerunner/items.h
+++ b/engines/bladerunner/items.h
@@ -43,7 +43,7 @@ public:
void getWidthHeight(int itemId, int *width, int *height);
void tick();
- bool addToWorld(int itemId, int animationId, int setId, Vector3 position, int facing, int height, int width, bool isTargetable, bool isVisible, bool isPoliceMazeEnemy, bool b);
+ bool addToWorld(int itemId, int animationId, int setId, Vector3 position, int facing, int height, int width, bool isTargetableFlag, bool isVisibleFlag, bool isPoliceMazeEnemyFlag, bool addToSetFlag);
bool addToSet(int itemId);
bool remove(int itemId);
diff --git a/engines/bladerunner/vqa_decoder.cpp b/engines/bladerunner/vqa_decoder.cpp
index fe94012c51..15bf49306a 100644
--- a/engines/bladerunner/vqa_decoder.cpp
+++ b/engines/bladerunner/vqa_decoder.cpp
@@ -434,10 +434,9 @@ bool VQADecoder::readCINF(Common::SeekableReadStream *s, uint32 size) {
return false;
for (int i = 0; i != _clipInfo.clipCount; ++i) {
- uint16 a;
- uint32 b;
- a = s->readUint16LE();
- b = s->readUint32LE();
+ uint16 a = s->readUint16LE();
+ uint32 b = s->readUint32LE();
+ debug("VQADecoder::readCINF() i: %d a: 0x%04x b: 0x%08x", i, a, b);
}
return true;
@@ -471,13 +470,13 @@ bool VQADecoder::readLNIN(Common::SeekableReadStream *s, uint32 size) {
if (chd.id != kLNIH || chd.size != 10)
return false;
- uint16 loopNamesCount, loopUnk1, loopUnk2, loopUnk3, loopUnk4;
+ uint16 loopNamesCount = s->readUint16LE();
+ uint16 loopUnk1 = s->readUint16LE();
+ uint16 loopUnk2 = s->readUint16LE();
+ uint16 loopUnk3 = s->readUint16LE();
+ uint16 loopUnk4 = s->readUint16LE();
- loopNamesCount = s->readUint16LE();
- loopUnk1 = s->readUint16LE();
- loopUnk2 = s->readUint16LE();
- loopUnk3 = s->readUint16LE();
- loopUnk4 = s->readUint16LE();
+ debug("VQADecoder::readLNIN() Unknown Values: 0x%04x 0x%04x 0x%04x 0x%04x", loopUnk1, loopUnk2, loopUnk3, loopUnk4);
if (loopNamesCount != _loopInfo.loopCount)
return false;
diff --git a/engines/chewy/console.cpp b/engines/chewy/console.cpp
index cb2d5e21c1..6fbd99278f 100644
--- a/engines/chewy/console.cpp
+++ b/engines/chewy/console.cpp
@@ -26,6 +26,7 @@
#include "chewy/console.h"
#include "chewy/graphics.h"
#include "chewy/resource.h"
+#include "chewy/scene.h"
#include "chewy/sound.h"
#include "chewy/text.h"
@@ -43,6 +44,7 @@ Console::Console(ChewyEngine *vm) : GUI::Debugger(), _vm(vm) {
registerCmd("error_message", WRAP_METHOD(Console, Cmd_ErrorMessage));
registerCmd("dialog", WRAP_METHOD(Console, Cmd_Dialog));
registerCmd("text", WRAP_METHOD(Console, Cmd_Text));
+ registerCmd("scene", WRAP_METHOD(Console, Cmd_Scene));
}
Console::~Console() {
@@ -235,4 +237,17 @@ bool Console::Cmd_Text(int argc, const char **argv) {
return true;
}
+bool Console::Cmd_Scene(int argc, const char **argv) {
+ if (argc < 2) {
+ debugPrintf("Current scene is: %d\n", _vm->_scene->getCurScene());
+ debugPrintf("Use scene <scene num> to change the scene\n");
+ return true;
+ }
+
+ int sceneNum = atoi(argv[1]);
+ _vm->_scene->change(sceneNum);
+
+ return false;
+}
+
} // End of namespace Chewy
diff --git a/engines/chewy/console.h b/engines/chewy/console.h
index 4953480644..ae2be15f30 100644
--- a/engines/chewy/console.h
+++ b/engines/chewy/console.h
@@ -48,6 +48,7 @@ private:
bool Cmd_ErrorMessage(int argc, const char **argv);
bool Cmd_Dialog(int argc, const char **argv);
bool Cmd_Text(int argc, const char **argv);
+ bool Cmd_Scene(int argc, const char **argv);
};
} // End of namespace Chewy
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 18e001f05f..df8a6daf07 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -32,21 +32,25 @@
namespace Chewy {
const byte _cursorFrames[] = {
- 4, 1, 1, 1, // walk
- 4, 1, 1, 1, // pick up / use
- 1, 1, 1, 1, 1,
- 4, 1, 1, 1, // look
- 4, 1, 1, 1, // talk
- 4, 1, 1, 1, // open
- 1,
- 1, 1, 1, 1, // left, right, up, down
- 1, // save
- 1,
- 5, 1, 1, 1, 1,
- 1,
- 1, // use (inventory)
- 1, // look (inventory)
- 1 // gun
+ 4, 1, 1, 1, // 0-3: walk
+ 4, 1, 1, 1, // 5-7: use (+ no use, 4)
+ 1, // 8: go to
+ 4, 1, 1, 1, // 9-12: nope
+ 4, 1, 1, 1, // 13-16: look
+ 4, 1, 1, 1, // 17-20: talk (+ no talk, 17)
+ 4, 1, 1, 1, // 21-24: inventory
+ 1, // 25: save
+ 1, // 26: exit left
+ 1, // 27: exit right
+ 1, // 28: exit up
+ 1, // 29: exit down
+ 1, // 30: disk
+ 1, // 31: Howard
+ 5, 1, 1, 1, 1, // 32: animated arrow
+ 1, // 37: Nichelle
+ 1, // 38: use (inventory)
+ 1, // 39: look (inventory)
+ 1 // 40: gun
};
Cursor::Cursor(ChewyEngine *vm) : _vm(vm) {
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 6675fea392..55a7b62bff 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -28,6 +28,7 @@
#include "chewy/cursor.h"
#include "chewy/events.h"
#include "chewy/graphics.h"
+#include "chewy/scene.h"
namespace Chewy {
@@ -56,6 +57,8 @@ void Events::processEvents() {
}
} else if (_event.type == Common::EVENT_RBUTTONUP) {
_vm->_cursor->nextCursor();
+ } else if (_event.type == Common::EVENT_MOUSEMOVE) {
+ _vm->_scene->updateMouse(_event.mouse);
}
}
}
diff --git a/engines/chewy/scene.cpp b/engines/chewy/scene.cpp
index 03e4332f85..0f12219078 100644
--- a/engines/chewy/scene.cpp
+++ b/engines/chewy/scene.cpp
@@ -35,10 +35,53 @@
namespace Chewy {
+#define MAX_DETAILS 32
+#define MAX_HOTSPOTS 50
+
+// Animated details - scene animations
+struct AnimatedDetails {
+ uint16 x;
+ uint16 y;
+ // 66 bytes animated details - TODO
+};
+
+// Static details - scene sprites and props
+struct StaticDetails {
+ int16 x;
+ int16 y;
+ int16 spriteNum;
+ uint16 z;
+ byte hide;
+ // 1 byte dummy
+};
+
+struct SceneInfo {
+ uint16 staticDetailsCount;
+ uint16 animatedDetailsCount;
+ uint32 spritePtr;
+ AnimatedDetails animatedDetails[MAX_DETAILS];
+ StaticDetails staticDetails[MAX_DETAILS];
+ Common::Rect hotspot[MAX_HOTSPOTS];
+ uint16 hotspotDescRes[MAX_HOTSPOTS];
+ Common::String hotspotDesc[MAX_HOTSPOTS];
+ byte roomNum;
+ byte picNum;
+ byte autoMoveCount;
+ byte loadTaf;
+ Common::String tafName; // 14 bytes
+ byte zoomFactor;
+ // 1 byte dummy
+ // 6 * 20 = 120 bytes automove coordinates - TODO
+ // MAX_DETAILS * 3 * 2 = 192 bytes voc - TODO
+ // MAX_DETAILS * 3 = 96 bytes samples - TODO
+};
+
Scene::Scene(ChewyEngine *vm) : _vm(vm) {
+ _sceneInfo = new SceneInfo();
}
Scene::~Scene() {
+ delete _sceneInfo;
}
void Scene::change(uint scene) {
@@ -46,14 +89,121 @@ void Scene::change(uint scene) {
_vm->_cursor->setCursor(0);
_vm->_cursor->showCursor();
+ loadSceneInfo();
draw();
}
void Scene::draw() {
+ // Background
_vm->_graphics->drawImage("episode1.tgp", _curScene);
+
+ // Static details
+ for (uint16 i = 0; i < MAX_HOTSPOTS; i++) {
+ StaticDetails s = _sceneInfo->staticDetails[i];
+ if (s.spriteNum >= 0 && s.x >= 0 && s.y >= 0 && !s.hide)
+ _vm->_graphics->drawSprite(Common::String::format("det%d.taf", _curScene), s.spriteNum, s.x, s.y);
+ }
+
+ // TODO: These are all hardcoded for now
_vm->_graphics->drawSprite("det1.taf", 0, 200, 100);
_vm->_graphics->loadFont("6x8.tff");
_vm->_graphics->drawText("This is a test", 200, 80);
}
+void Scene::updateMouse(Common::Point coords) {
+ // Animated details
+ // TODO: handle these
+
+ // Static details
+ for (uint16 i = 0; i < MAX_HOTSPOTS; i++) {
+ if (_sceneInfo->hotspot[i].contains(coords)) {
+ // TODO: Draw hotspot description on screen
+ debug("Coords %d, %d: '%s'", coords.x, coords.y, _sceneInfo->hotspotDesc[i].c_str());
+ break;
+ }
+ }
+}
+
+void Scene::loadSceneInfo() {
+ const uint32 sceneInfoSize = 3784;
+ const uint32 headerRDI = MKTAG('R', 'D', 'I', '\0');
+ const char *sceneIndexFileName = "test.rdi";
+ Common::File indexFile;
+ if (!Common::File::exists(sceneIndexFileName))
+ error("File %s not found", sceneIndexFileName);
+ Text *text = new Text();
+
+ indexFile.open(sceneIndexFileName);
+
+ uint32 header = indexFile.readUint32BE();
+ if (header != headerRDI)
+ error("Invalid resource - %s", sceneIndexFileName);
+
+ indexFile.seek(sceneInfoSize * _curScene, SEEK_CUR);
+
+ // TODO: These can be set to larger numbers than MAX_DETAILS
+ _sceneInfo->staticDetailsCount = indexFile.readUint16LE();
+ _sceneInfo->animatedDetailsCount = indexFile.readUint16LE();
+ indexFile.skip(6);
+
+ // Animated details
+ for (int i = 0; i < MAX_DETAILS; i++) {
+ _sceneInfo->animatedDetails[i].x = indexFile.readUint16LE();
+ _sceneInfo->animatedDetails[i].y = indexFile.readUint16LE();
+ indexFile.skip(66); // animated details info - TODO: read these
+ }
+
+ // Static details
+ for (int i = 0; i < MAX_DETAILS; i++) {
+ _sceneInfo->staticDetails[i].x = indexFile.readSint16LE();
+ _sceneInfo->staticDetails[i].y = indexFile.readSint16LE();
+ _sceneInfo->staticDetails[i].spriteNum = indexFile.readSint16LE();
+ _sceneInfo->staticDetails[i].z = indexFile.readUint16LE();
+ _sceneInfo->staticDetails[i].hide = indexFile.readByte();
+ indexFile.readByte(); // padding
+ }
+
+ // Hotspots
+ for (int i = 0; i < MAX_HOTSPOTS; i++) {
+ _sceneInfo->hotspot[i].left = indexFile.readUint16LE();
+ _sceneInfo->hotspot[i].top = indexFile.readUint16LE();
+ _sceneInfo->hotspot[i].right = indexFile.readUint16LE();
+ _sceneInfo->hotspot[i].bottom = indexFile.readUint16LE();
+ if (!_sceneInfo->hotspot[i].isValidRect())
+ warning("Hotspot %d has an invalid rect", i);
+ }
+
+ // Hotspot descriptions
+ for (int i = 0; i < MAX_HOTSPOTS; i++) {
+ _sceneInfo->hotspotDescRes[i] = indexFile.readUint16LE();
+
+ if (_sceneInfo->hotspotDescRes[i] < 12) {
+ // TODO: Hotspot description IDs are off... investigate why
+ _sceneInfo->hotspotDesc[i] = text->getText(_curScene + kADSTextMax, _sceneInfo->hotspotDescRes[i])->text;
+ } else {
+ // TODO: Handle these types of hotspot descriptions
+ warning("Hotspot %d has an invalid description resource (%d)", i, _sceneInfo->hotspotDescRes[i]);
+ _sceneInfo->hotspotDesc[i] = Common::String::format("Hotspot %d", _sceneInfo->hotspotDescRes[i]);
+ }
+ }
+
+ _sceneInfo->roomNum = indexFile.readByte();
+ _sceneInfo->picNum = indexFile.readByte();
+ _sceneInfo->autoMoveCount = indexFile.readByte();
+ _sceneInfo->loadTaf = indexFile.readByte();
+
+ for (int i = 0; i < 14; i++)
+ _sceneInfo->tafName += indexFile.readByte();
+
+ _sceneInfo->zoomFactor = indexFile.readByte();
+ indexFile.readByte(); // padding
+
+ // 6 * 20 = 120 bytes automove coordinates - TODO: read these
+ // MAX_DETAILS * 3 * 2 = 192 bytes voc - TODO: read these
+ // MAX_DETAILS * 3 = 96 bytes samples - TODO: read these
+
+ delete text;
+ indexFile.close();
+}
+
} // End of namespace Chewy
diff --git a/engines/chewy/scene.h b/engines/chewy/scene.h
index 37601d057b..c5b87ac7ae 100644
--- a/engines/chewy/scene.h
+++ b/engines/chewy/scene.h
@@ -27,6 +27,8 @@
namespace Chewy {
+struct SceneInfo;
+
class Scene {
public:
Scene(ChewyEngine *vm);
@@ -34,10 +36,17 @@ public:
void change(uint scene);
void draw();
+ void updateMouse(Common::Point coords);
+ uint getCurScene() const {
+ return _curScene;
+ }
private:
+ void loadSceneInfo();
+
ChewyEngine *_vm;
uint _curScene;
+ SceneInfo *_sceneInfo;
};
} // End of namespace Chewy
diff --git a/engines/chewy/text.cpp b/engines/chewy/text.cpp
index fcf07a684b..cf0fb041a7 100644
--- a/engines/chewy/text.cpp
+++ b/engines/chewy/text.cpp
@@ -113,7 +113,7 @@ TextEntry *Text::getText(uint dialogNum, uint entryNum) {
} while (*ptr);
if (*(ptr + 1) != kEndText || *(ptr + 2) != kEndChunk)
- error("Invalid text resource - %d", dialogNum);
+ error("Invalid text resource - %d, %d", dialogNum, entryNum);
if (!isText)
ptr += 3; // 0, kEndText, kEndChunk
diff --git a/engines/cruise/font.cpp b/engines/cruise/font.cpp
index 43fbf8c79b..3a4e0d6d78 100644
--- a/engines/cruise/font.cpp
+++ b/engines/cruise/font.cpp
@@ -30,7 +30,7 @@
namespace Cruise {
-const int SPACE_WIDTH = 4;
+const int SPACE_WIDTH = 5;
/**
* Determines the line size by finding the highest character in the given font set
@@ -200,7 +200,9 @@ void renderWord(const uint8 *fontPtr_Data, uint8 *outBufferPtr, int xOffset, int
fontPtr_Data2 += sizeof(uint16);
for (int j = 0; j < charWidth; j++) {
- *outBufferPtr = ((bitSet1 >> 15) & 1) | ((bitSet2 >> 14) & 2);
+ if (((bitSet1 >> 15) & 1)) {
+ *outBufferPtr = ((bitSet2 >> 15) & 1) + 1;
+ }
outBufferPtr++;
bitSet1 <<= 1;
diff --git a/engines/director/archive.cpp b/engines/director/archive.cpp
index 5b1a26ffd4..593fb638e4 100644
--- a/engines/director/archive.cpp
+++ b/engines/director/archive.cpp
@@ -100,6 +100,18 @@ Common::SeekableSubReadStreamEndian *Archive::getResource(uint32 tag, uint16 id)
return new Common::SeekableSubReadStreamEndian(_stream, res.offset, res.offset + res.size, _isBigEndian, DisposeAfterUse::NO);
}
+Resource Archive::getResourceDetail(uint32 tag, uint16 id) {
+ if (!_types.contains(tag))
+ error("Archive does not contain '%s' %04x", tag2str(tag), id);
+
+ const ResourceMap &resMap = _types[tag];
+
+ if (!resMap.contains(id))
+ error("Archive does not contain '%s' %04x", tag2str(tag), id);
+
+ return resMap[id];
+}
+
uint32 Archive::getOffset(uint32 tag, uint16 id) const {
if (!_types.contains(tag))
error("Archive does not contain '%s' %04x", tag2str(tag), id);
@@ -365,6 +377,7 @@ bool RIFXArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
subStream.readUint32(); // unknown
Common::Array<Resource> resources;
+ resources.reserve(2048);
// Need to look for these two resources
const Resource *keyRes = 0;
@@ -395,6 +408,11 @@ bool RIFXArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
keyRes = &resources[resources.size() - 1];
else if (tag == MKTAG('C', 'A', 'S', '*'))
casRes = &resources[resources.size() - 1];
+ //or the children of
+ else if (tag == MKTAG('S', 'T', 'X', 'T') ||
+ tag == MKTAG('B', 'I', 'T', 'D') ||
+ tag == MKTAG('D', 'I', 'B', ' '))
+ _types[tag][i] = res;
}
// We need to have found the 'File' resource already
@@ -409,6 +427,8 @@ bool RIFXArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
return false;
}
+ uint castTag = MKTAG('C', 'A', 'S', 't');
+
// Parse the CAS*, if present
if (casRes) {
Common::SeekableSubReadStreamEndian casStream(stream, casRes->offset + 8, casRes->offset + 8 + casRes->size, _isBigEndian, DisposeAfterUse::NO);
@@ -420,8 +440,10 @@ bool RIFXArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
for (uint i = 0; i < casSize; i++) {
uint32 index = casStream.readUint32();
- const Resource &res = resources[index];
- _types[MKTAG('C', 'A', 'S', 't')][i + 1] = res;
+ Resource &res = resources[index];
+ res.index = index;
+ res.castId = i + 1;
+ _types[castTag][res.castId] = res;
debugCN(2, kDebugLoading, "%d ", index);
}
@@ -444,10 +466,20 @@ bool RIFXArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
debugC(2, kDebugLoading, "KEY*: index: %d id: %d resTag: %s", index, id, tag2str(resTag));
- const Resource &res = resources[index];
+ Resource &res = resources[index];
debug(3, "Found RIFX resource: '%s' id: 0x%04x, %d @ 0x%08x (%d)", tag2str(resTag), id, res.size, res.offset, res.offset);
_types[resTag][id] = res;
- _types[resTag][1024 + i + 1] = res;
+ //_types[resTag][1024 + i + 1] = res;
+
+ if (id < 1024) {
+ for (uint cast = 0; cast < _types[castTag].size(); cast++) {
+ if (_types[castTag][cast].index == id) {
+ res.index = index;
+ _types[castTag][cast].children.push_back(res);
+ break;
+ }
+ }
+ }
}
_stream = stream;
@@ -471,5 +503,17 @@ Common::SeekableSubReadStreamEndian *RIFXArchive::getResource(uint32 tag, uint16
return new Common::SeekableSubReadStreamEndian(_stream, offset, offset + size, true, DisposeAfterUse::NO);
}
+Resource RIFXArchive::getResourceDetail(uint32 tag, uint16 id) {
+ if (!_types.contains(tag))
+ error("Archive does not contain '%s' %04x", tag2str(tag), id);
+
+ const ResourceMap &resMap = _types[tag];
+
+ if (!resMap.contains(id))
+ error("Archive does not contain '%s' %04x", tag2str(tag), id);
+
+ return resMap[id];
+}
+
} // End of namespace Director
diff --git a/engines/director/archive.h b/engines/director/archive.h
index 93f4ce7ee9..b77bace9ba 100644
--- a/engines/director/archive.h
+++ b/engines/director/archive.h
@@ -33,6 +33,15 @@ class MacResManager;
namespace Director {
// Completely ripped off of Mohawk's Archive code
+
+struct Resource {
+ uint32 index;
+ uint32 offset;
+ uint32 size;
+ uint32 castId;
+ Common::String name;
+ Common::Array<Resource> children;
+};
class Archive {
public:
@@ -50,6 +59,7 @@ public:
bool hasResource(uint32 tag, uint16 id) const;
bool hasResource(uint32 tag, const Common::String &resName) const;
virtual Common::SeekableSubReadStreamEndian *getResource(uint32 tag, uint16 id);
+ virtual Resource getResourceDetail(uint32 tag, uint16 id);
uint32 getOffset(uint32 tag, uint16 id) const;
uint16 findResourceID(uint32 tag, const Common::String &resName) const;
Common::String getName(uint32 tag, uint16 id) const;
@@ -61,11 +71,6 @@ public:
protected:
Common::SeekableReadStream *_stream;
- struct Resource {
- uint32 offset;
- uint32 size;
- Common::String name;
- };
typedef Common::HashMap<uint16, Resource> ResourceMap;
typedef Common::HashMap<uint32, ResourceMap> TypeMap;
TypeMap _types;
@@ -103,6 +108,7 @@ public:
bool openStream(Common::SeekableReadStream *stream, uint32 startOffset = 0);
Common::SeekableSubReadStreamEndian *getResource(uint32 tag, uint16 id);
+ Resource getResourceDetail(uint32 tag, uint16 id);
};
} // End of namespace Director
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 892ac48f8c..0db59cbd64 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -41,11 +41,18 @@ BitmapCast::BitmapCast(Common::ReadStreamEndian &stream, uint16 version) {
unk2 = stream.readUint16();
}
} else {
+ stream.readByte();
+ stream.readByte();
+
initialRect = Score::readRect(stream);
boundingRect = Score::readRect(stream);
regX = stream.readUint16();
regY = stream.readUint16();
+ bitsPerPixel = stream.readUint16();
+ if (bitsPerPixel == 0)
+ bitsPerPixel = 1;
+
int tail = 0;
while (!stream.eos()) {
@@ -83,11 +90,33 @@ TextCast::TextCast(Common::ReadStreamEndian &stream, uint16 version) {
if (flags & 0x4)
textFlags.push_back(kTextFlagDoNotWrap);
if (flags & 0xf8)
- warning("Unproxessed text cast flags: %x", flags & 0xf8);
+ warning("Unprocessed text cast flags: %x", flags & 0xf8);
// TODO: FIXME: guesswork
fontId = stream.readByte();
fontSize = stream.readByte();
+ } else if (version < 5) {
+ borderSize = static_cast<SizeType>(stream.readByte());
+ gutterSize = static_cast<SizeType>(stream.readByte());
+ boxShadow = static_cast<SizeType>(stream.readByte());
+ textType = static_cast<TextType>(stream.readByte());
+ textAlign = static_cast<TextAlignType>(stream.readSint16()); //this is because 'right' is -1? or should that be 255?
+ stream.readUint16();
+ stream.readUint16();
+ stream.readUint16();
+ stream.readUint16();
+
+ fontId = 1; //this is in STXT
+
+ initialRect = Score::readRect(stream);
+ stream.readUint16();
+ textShadow = static_cast<SizeType>(stream.readByte());
+ byte flags = stream.readByte();
+
+ if (flags)
+ warning("Unproxessed text cast flags: %x", flags);
+
+ fontSize = stream.readUint16();
} else {
initialRect = Score::readRect(stream);
boundingRect = Score::readRect(stream);
@@ -109,6 +138,9 @@ ShapeCast::ShapeCast(Common::ReadStreamEndian &stream, uint16 version) {
lineThickness = stream.readByte();
lineDirection = stream.readByte();
} else {
+ stream.readByte();
+ stream.readByte();
+
initialRect = Score::readRect(stream);
boundingRect = Score::readRect(stream);
}
@@ -119,8 +151,13 @@ ButtonCast::ButtonCast(Common::ReadStreamEndian &stream, uint16 version) : TextC
if (version < 4) {
buttonType = static_cast<ButtonType>(stream.readUint16BE());
} else {
+ stream.readByte();
+ stream.readByte();
+
initialRect = Score::readRect(stream);
boundingRect = Score::readRect(stream);
+
+ buttonType = static_cast<ButtonType>(stream.readUint16BE());
}
modified = 0;
}
@@ -129,6 +166,9 @@ ScriptCast::ScriptCast(Common::ReadStreamEndian &stream, uint16 version) {
if (version < 4) {
error("Unhandled Script cast");
} else {
+ stream.readByte();
+ stream.readByte();
+
initialRect = Score::readRect(stream);
boundingRect = Score::readRect(stream);
diff --git a/engines/director/cast.h b/engines/director/cast.h
index 69edf8ce89..953c94c4c6 100644
--- a/engines/director/cast.h
+++ b/engines/director/cast.h
@@ -25,10 +25,12 @@
#include "common/rect.h"
#include "common/substream.h"
+#include "director/archive.h"
namespace Director {
enum CastType {
+ kCastTypeNull = 0,
kCastBitmap = 1,
kCastFilmLoop = 2,
kCastText = 3,
@@ -39,13 +41,14 @@ enum CastType {
kCastShape = 8,
kCastMovie = 9,
kCastDigitalVideo = 10,
- kCastScript = 11
+ kCastLingoScript = 11
};
struct Cast {
CastType type;
Common::Rect initialRect;
Common::Rect boundingRect;
+ Common::Array<Resource> children;
byte modified;
};
@@ -58,6 +61,8 @@ struct BitmapCast : Cast {
uint8 flags;
uint16 someFlaggyThing;
uint16 unk1, unk2;
+
+ uint16 bitsPerPixel;
};
enum ShapeType {
@@ -119,8 +124,9 @@ struct TextCast : Cast {
TextType textType;
TextAlignType textAlign;
SizeType textShadow;
+ byte textSlant;
Common::Array<TextFlag> textFlags;
- int16 palinfo1, palinfo2, palinfo3;
+ uint16 palinfo1, palinfo2, palinfo3;
};
enum ButtonType {
diff --git a/engines/director/detection.cpp b/engines/director/detection.cpp
index ca0b5c1515..c26084ac6c 100644
--- a/engines/director/detection.cpp
+++ b/engines/director/detection.cpp
@@ -73,7 +73,7 @@ bool DirectorEngine::hasFeature(EngineFeature f) const {
static const PlainGameDescriptor directorGames[] = {
{ "director", "Macromedia Director Game" },
{ "directortest", "Macromedia Director Test Target" },
- { "theapartment", "The Apartment, D3 interactive demo" },
+ { "theapartment", "The Apartment, Interactive demo" },
{ "gundam0079", "Gundam 0079: The War for Earth" },
{ "jewels", "Jewels of the Oracle" },
{ "jman", "The Journeyman Project" },
diff --git a/engines/director/detection_tables.h b/engines/director/detection_tables.h
index ae52784f51..15bdf37968 100644
--- a/engines/director/detection_tables.h
+++ b/engines/director/detection_tables.h
@@ -69,7 +69,7 @@ static const DirectorGameDescription gameDescriptions[] = {
{
{
"theapartment",
- "",
+ "D3",
AD_ENTRY1s("Main Menu", "9e838fe1a6af7992d656ca325e38dee5", 47911),
Common::EN_ANY,
Common::kPlatformMacintosh,
@@ -79,6 +79,19 @@ static const DirectorGameDescription gameDescriptions[] = {
GID_GENERIC,
3
},
+ {
+ {
+ "theapartment",
+ "D4",
+ AD_ENTRY1s("Main Menu", "ff86181f03fe6eb060f65a985ca0580d", 160612),
+ Common::EN_ANY,
+ Common::kPlatformMacintosh,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NOASPECT)
+ },
+ GID_GENERIC,
+ 4
+ },
{
{
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index 32358e4b6e..fa5ae9402e 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -33,6 +33,8 @@
namespace Director {
+DirectorEngine *g_director;
+
DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc),
_rnd("director") {
DebugMan.addDebugChannel(kDebugLingoExec, "lingoexec", "Lingo Execution");
@@ -41,12 +43,17 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
DebugMan.addDebugChannel(kDebugImages, "images", "Image drawing");
DebugMan.addDebugChannel(kDebugText, "text", "Text rendering");
+ g_director = this;
+
if (!_mixer->isReady())
error("Sound initialization failed");
// Setup mixer
syncSoundSettings();
+ // Load Patterns
+ loadPatterns();
+
_sharedCasts = nullptr;
_currentScore = nullptr;
diff --git a/engines/director/director.h b/engines/director/director.h
index 300998bb78..3a7a4c8427 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -34,7 +34,8 @@ class MacResManager;
}
namespace Graphics {
-class MacWindowManager;
+class MacWindowManager;
+typedef Common::Array<byte *> MacPatterns;
}
namespace Director {
@@ -73,6 +74,7 @@ public:
Common::Language getLanguage() const;
Common::String getEXEName() const;
DirectorSound *getSoundManager() const { return _soundManager; }
+ Graphics::MacWindowManager *getMacWindowManager() const { return _wm; }
Archive *getMainArchive() const { return _mainArchive; }
Lingo *getLingo() const { return _lingo; }
Score *getCurrentScore() const { return _currentScore; }
@@ -81,6 +83,8 @@ public:
const byte *getPalette() const { return _currentPalette; }
uint16 getPaletteColorCount() const { return _currentPaletteLength; }
void loadSharedCastsFrom(Common::String filename);
+ void loadPatterns();
+ Graphics::MacPatterns &getPatterns();
void loadMainArchive();
Archive *createArchive();
@@ -133,12 +137,17 @@ private:
uint16 _currentPaletteLength;
Lingo *_lingo;
+ Graphics::MacPatterns _director3Patterns;
+ Graphics::MacPatterns _director3QuickDrawPatterns;
+
Common::String _sharedCastFile;
private:
void testFont();
};
+extern DirectorEngine *g_director;
+
} // End of namespace Director
#endif
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index de0de6d4d0..97252344cd 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -24,6 +24,7 @@
#include "graphics/font.h"
#include "graphics/macgui/macfontmanager.h"
#include "graphics/macgui/macwindowmanager.h"
+#include "graphics/primitives.h"
#include "image/bmp.h"
#include "director/director.h"
@@ -114,54 +115,61 @@ void Frame::readChannel(Common::SeekableSubReadStreamEndian &stream, uint16 offs
}
void Frame::readChannels(Common::ReadStreamEndian *stream) {
- _actionId = stream->readByte();
- _soundType1 = stream->readByte(); // type: 0x17 for sounds (sound is cast id), 0x16 for MIDI (sound is cmd id)
- uint8 transFlags = stream->readByte(); // 0x80 is whole stage (vs changed area), rest is duration in 1/4ths of a second
-
- if (transFlags & 0x80)
- _transArea = 1;
- else
- _transArea = 0;
- _transDuration = transFlags & 0x7f;
-
- _transChunkSize = stream->readByte();
- _tempo = stream->readByte();
- _transType = static_cast<TransitionType>(stream->readByte());
- _sound1 = stream->readUint16();
- if (_vm->getPlatform() == Common::kPlatformMacintosh) {
- _sound2 = stream->readUint16();
- _soundType2 = stream->readByte();
- } else {
- byte unk[3];
- stream->read(unk, 3);
- warning("unk1: %x unk2: %x unk3: %x", unk[0], unk[1], unk[2]);
- }
- _skipFrameFlag = stream->readByte();
- _blend = stream->readByte();
+ byte unk[16];
- if (_vm->getPlatform() != Common::kPlatformMacintosh) {
- _sound2 = stream->readUint16();
- _soundType2 = stream->readByte();
- }
+ if (_vm->getVersion() < 4) {
+ _actionId = stream->readByte();
+ _soundType1 = stream->readByte(); // type: 0x17 for sounds (sound is cast id), 0x16 for MIDI (sound is cmd id)
+ uint8 transFlags = stream->readByte(); // 0x80 is whole stage (vs changed area), rest is duration in 1/4ths of a second
- uint16 palette = stream->readUint16();
+ if (transFlags & 0x80)
+ _transArea = 1;
+ else
+ _transArea = 0;
+ _transDuration = transFlags & 0x7f;
+
+ _transChunkSize = stream->readByte();
+ _tempo = stream->readByte();
+ _transType = static_cast<TransitionType>(stream->readByte());
+ _sound1 = stream->readUint16();
+ if (_vm->getPlatform() == Common::kPlatformMacintosh) {
+ _sound2 = stream->readUint16();
+ _soundType2 = stream->readByte();
+ } else {
+ stream->read(unk, 3);
+ warning("unk1: %x unk2: %x unk3: %x", unk[0], unk[1], unk[2]);
+ }
+ _skipFrameFlag = stream->readByte();
+ _blend = stream->readByte();
- if (palette) {
- warning("STUB: Palette info");
- }
+ if (_vm->getPlatform() != Common::kPlatformMacintosh) {
+ _sound2 = stream->readUint16();
+ _soundType2 = stream->readByte();
+ }
- debugC(kDebugLoading, 8, "%d %d %d %d %d %d %d %d %d %d %d", _actionId, _soundType1, _transDuration, _transChunkSize, _tempo, _transType, _sound1, _skipFrameFlag, _blend, _sound2, _soundType2);
+ uint16 palette = stream->readUint16();
- _palette = new PaletteInfo();
- _palette->firstColor = stream->readByte(); // for cycles. note: these start at 0x80 (for pal entry 0)!
- _palette->lastColor = stream->readByte();
- _palette->flags = stream->readByte();
- _palette->speed = stream->readByte();
- _palette->frameCount = stream->readUint16();
+ if (palette) {
+ warning("STUB: Palette info");
+ }
+
+ debugC(kDebugLoading, 8, "%d %d %d %d %d %d %d %d %d %d %d", _actionId, _soundType1, _transDuration, _transChunkSize, _tempo, _transType, _sound1, _skipFrameFlag, _blend, _sound2, _soundType2);
+
+ _palette = new PaletteInfo();
+ _palette->firstColor = stream->readByte(); // for cycles. note: these start at 0x80 (for pal entry 0)!
+ _palette->lastColor = stream->readByte();
+ _palette->flags = stream->readByte();
+ _palette->speed = stream->readByte();
+ _palette->frameCount = stream->readUint16();
+
+ _palette->cycleCount = stream->readUint16();
+ } else if (_vm->getVersion() < 5) {
+ stream->read(unk, 16);
+ _actionId = stream->readUint16();
+ stream->read(unk, 5);
+ }
- _palette->cycleCount = stream->readUint16();
- byte unk[11];
stream->read(unk, 6);
if (_vm->getPlatform() == Common::kPlatformMacintosh) {
@@ -181,8 +189,9 @@ void Frame::readChannels(Common::ReadStreamEndian *stream) {
for (int i = 0; i < CHANNEL_COUNT; i++) {
Sprite &sprite = *_sprites[i + 1];
- sprite._x1 = stream->readByte();
- sprite._enabled = (stream->readByte() != 0);
+ sprite._scriptId = stream->readByte();
+ sprite._spriteType = stream->readByte();
+ sprite._enabled = sprite._spriteType != 0;
sprite._x2 = stream->readUint16();
sprite._flags = stream->readUint16();
@@ -193,14 +202,14 @@ void Frame::readChannels(Common::ReadStreamEndian *stream) {
else
sprite._trails = 0;
+ sprite._lineSize = (sprite._flags >> 8) & 0x03;
+
sprite._castId = stream->readUint16();
sprite._startPoint.y = stream->readUint16();
sprite._startPoint.x = stream->readUint16();
sprite._height = stream->readUint16();
sprite._width = stream->readUint16();
- debugC(kDebugLoading, 8, "%03d(%d)[%x,%x,%04x,%d/%d/%d/%d]", sprite._castId, sprite._enabled, sprite._x1, sprite._x2, sprite._flags, sprite._startPoint.x, sprite._startPoint.y, sprite._width, sprite._height);
-
if (_vm->getPlatform() == Common::kPlatformMacintosh && _vm->getVersion() >= 4) {
sprite._scriptId = stream->readUint16();
sprite._flags2 = stream->readByte(); // 0x40 editable, 0x80 moveable
@@ -209,6 +218,11 @@ void Frame::readChannels(Common::ReadStreamEndian *stream) {
if (_vm->getVersion() >= 5)
sprite._unk3 = stream->readUint32();
}
+
+ debugC(kDebugLoading, 8, "%03d(%d)[%x,%x,%04x,%d/%d/%d/%d/%d] script:%d",
+ sprite._castId, sprite._enabled, sprite._x1, sprite._x2, sprite._flags,
+ sprite._startPoint.x, sprite._startPoint.y, sprite._width, sprite._height,
+ sprite._lineSize, sprite._scriptId);
}
}
@@ -360,6 +374,7 @@ void Frame::readSprite(Common::SeekableSubReadStreamEndian &stream, uint16 offse
}
void Frame::prepareFrame(Score *score) {
+ _drawRects.clear();
renderSprites(*score->_surface, false);
renderSprites(*score->_trailSurface, true);
@@ -529,85 +544,175 @@ void Frame::renderSprites(Graphics::ManagedSurface &surface, bool renderTrail) {
if ((_sprites[i]->_trails == 0 && renderTrail) || (_sprites[i]->_trails == 1 && !renderTrail))
continue;
- Cast *cast;
- if (!_vm->_currentScore->_casts.contains(_sprites[i]->_castId)) {
- if (!_vm->getSharedCasts()->contains(_sprites[i]->_castId)) {
- warning("Cast id %d not found", _sprites[i]->_castId);
- continue;
- } else {
- warning("Getting cast id %d from shared cast", _sprites[i]->_castId);
- cast = _vm->getSharedCasts()->getVal(_sprites[i]->_castId);
+ CastType castType = kCastTypeNull;
+ Cast *cast = nullptr;
+ if (_vm->getVersion() < 4) {
+ switch (_sprites[i]->_spriteType) {
+ case 0x01:
+ castType = kCastBitmap;
+ break;
+ case 0x02:
+ case 0x0c: //this is actually a mouse-over shape? I don't think it's a real button.
+ castType = kCastShape;
+ break;
+ case 0x07:
+ castType = kCastText;
+ break;
}
} else {
- cast = _vm->_currentScore->_casts[_sprites[i]->_castId];
+ if (!_vm->_currentScore->_casts.contains(_sprites[i]->_castId)) {
+ if (!_vm->getSharedCasts()->contains(_sprites[i]->_castId)) {
+ warning("Cast id %d not found", _sprites[i]->_castId);
+ continue;
+ } else {
+ warning("Getting cast id %d from shared cast", _sprites[i]->_castId);
+ cast = _vm->getSharedCasts()->getVal(_sprites[i]->_castId);
+ }
+ } else {
+ cast = _vm->_currentScore->_casts[_sprites[i]->_castId];
+ }
+ castType = cast->type;
}
- if (cast->type == kCastText) {
- renderText(surface, i);
- continue;
- }
+ //this needs precedence to be hit first... D3 does something really tricky with cast IDs for shapes.
+ //I don't like this implementation 100% as the 'cast' above might not actually hit a member and be null?
+ if (castType == kCastShape) {
+ renderShape(surface, i);
+ } else if (castType == kCastText) {
+ renderText(surface, i, _vm->getVersion() < 4 ? _sprites[i]->_castId + 1024 : cast->children[0].index);
+ } else if (castType == kCastButton) {
+ renderButton(surface, i, _vm->getVersion() < 4 ? _sprites[i]->_castId + 1024 : cast->children[0].index);
+ } else {
+ Image::ImageDecoder *img = getImageFrom(_sprites[i]->_castId);
- Image::ImageDecoder *img = getImageFrom(_sprites[i]->_castId);
+ if (!img) {
+ warning("Image with id %d not found", _sprites[i]->_castId);
+ continue;
+ }
- if (!img) {
- warning("Image with id %d not found", _sprites[i]->_castId);
- continue;
- }
+ if (!img->getSurface()) {
+ warning("Frame::renderSprites: Could not load image %d", _sprites[i]->_castId);
+ continue;
+ }
- if (!img->getSurface()) {
- warning("Frame::renderSprites: Could not load image %d", _sprites[i]->_castId);
- continue;
- }
+ assert(_sprites[i]->_cast);
- assert(_sprites[i]->_cast);
-
- uint32 regX = static_cast<BitmapCast *>(_sprites[i]->_cast)->regX;
- uint32 regY = static_cast<BitmapCast *>(_sprites[i]->_cast)->regY;
- uint32 rectLeft = static_cast<BitmapCast *>(_sprites[i]->_cast)->initialRect.left;
- uint32 rectTop = static_cast<BitmapCast *>(_sprites[i]->_cast)->initialRect.top;
-
- int x = _sprites[i]->_startPoint.x - regX + rectLeft;
- int y = _sprites[i]->_startPoint.y - regY + rectTop;
- int height = _sprites[i]->_height;
- int width = _sprites[i]->_width;
-
- Common::Rect drawRect = Common::Rect(x, y, x + width, y + height);
- _drawRects.push_back(drawRect);
-
- switch (_sprites[i]->_ink) {
- case kInkTypeCopy:
- surface.blitFrom(*img->getSurface(), Common::Point(x, y));
- break;
- case kInkTypeTransparent:
- // FIXME: is it always white (last entry in pallette)?
- surface.transBlitFrom(*img->getSurface(), Common::Point(x, y), _vm->getPaletteColorCount() - 1);
- break;
- case kInkTypeBackgndTrans:
- drawBackgndTransSprite(surface, *img->getSurface(), drawRect);
- break;
- case kInkTypeMatte:
- drawMatteSprite(surface, *img->getSurface(), drawRect);
- break;
- case kInkTypeGhost:
- drawGhostSprite(surface, *img->getSurface(), drawRect);
- break;
- case kInkTypeReverse:
- drawReverseSprite(surface, *img->getSurface(), drawRect);
- break;
- default:
- warning("Unhandled ink type %d", _sprites[i]->_ink);
- surface.blitFrom(*img->getSurface(), Common::Point(x, y));
- break;
+ BitmapCast *bitmapCast = static_cast<BitmapCast *>(_sprites[i]->_cast);
+ //TODO: might want a quicker way to determine if cast is from Shared Cast.
+ if (_vm->getSharedBMP() != NULL && _vm->getSharedBMP()->contains(_sprites[i]->_castId + 1024)) {
+ bitmapCast = static_cast<BitmapCast *>(_vm->getSharedCasts()->getVal(_sprites[i]->_castId));
+ }
+
+ uint32 regX = bitmapCast->regX;
+ uint32 regY = bitmapCast->regY;
+ uint32 rectLeft = bitmapCast->initialRect.left;
+ uint32 rectTop = bitmapCast->initialRect.top;
+
+ int x = _sprites[i]->_startPoint.x - regX + rectLeft;
+ int y = _sprites[i]->_startPoint.y - regY + rectTop;
+ int height = _sprites[i]->_height;
+ int width = _sprites[i]->_width;
+
+ Common::Rect drawRect(x, y, x + width, y + height);
+
+ addDrawRect(i, drawRect);
+
+ switch (_sprites[i]->_ink) {
+ case kInkTypeCopy:
+ surface.blitFrom(*img->getSurface(), Common::Point(x, y));
+ break;
+ case kInkTypeTransparent:
+ // FIXME: is it always white (last entry in pallette)?
+ surface.transBlitFrom(*img->getSurface(), Common::Point(x, y), _vm->getPaletteColorCount() - 1);
+ break;
+ case kInkTypeBackgndTrans:
+ drawBackgndTransSprite(surface, *img->getSurface(), drawRect);
+ break;
+ case kInkTypeMatte:
+ drawMatteSprite(surface, *img->getSurface(), drawRect);
+ break;
+ case kInkTypeGhost:
+ drawGhostSprite(surface, *img->getSurface(), drawRect);
+ break;
+ case kInkTypeReverse:
+ drawReverseSprite(surface, *img->getSurface(), drawRect);
+ break;
+ default:
+ warning("Unhandled ink type %d", _sprites[i]->_ink);
+ surface.blitFrom(*img->getSurface(), Common::Point(x, y));
+ break;
+ }
}
}
}
}
-void Frame::renderButton(Graphics::ManagedSurface &surface, uint16 spriteId) {
- renderText(surface, spriteId);
+void Frame::addDrawRect(uint16 spriteId, Common::Rect &rect) {
+ FrameEntity *fi = new FrameEntity();
+ fi->spriteId = spriteId;
+ fi->rect = rect;
+ _drawRects.push_back(fi);
+}
+
+void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteId) {
+ Common::Rect shapeRect = Common::Rect(_sprites[spriteId]->_startPoint.x,
+ _sprites[spriteId]->_startPoint.y,
+ _sprites[spriteId]->_startPoint.x + _sprites[spriteId]->_width,
+ _sprites[spriteId]->_startPoint.y + _sprites[spriteId]->_height);
+
+ Graphics::ManagedSurface tmpSurface;
+ tmpSurface.create(shapeRect.width(), shapeRect.height(), Graphics::PixelFormat::createFormatCLUT8());
+ if (_vm->getVersion() <= 3 && _sprites[spriteId]->_spriteType == 0x0c) {
+ tmpSurface.fillRect(Common::Rect(shapeRect.width(), shapeRect.height()), 255);
+ tmpSurface.frameRect(Common::Rect(shapeRect.width(), shapeRect.height()), 0);
+ //TODO: don't override, work out how to display correctly.
+ _sprites[spriteId]->_ink = kInkTypeTransparent;
+ } else {
+ //No minus one on the pattern here! MacPlotData will do that for us!
+ Graphics::MacPlotData pd(&tmpSurface, &_vm->getPatterns(), _sprites[spriteId]->_castId, 1, _sprites[spriteId]->_backColor);
+ Common::Rect fillRect(shapeRect.width(), shapeRect.height());
+ Graphics::drawFilledRect(fillRect, _sprites[spriteId]->_foreColor, Graphics::macDrawPixel, &pd);
+ }
+
+ if (_sprites[spriteId]->_lineSize > 0) {
+ for (int rr = 0; rr < (_sprites[spriteId]->_lineSize - 1); rr++)
+ tmpSurface.frameRect(Common::Rect(rr, rr, shapeRect.width() - (rr * 2), shapeRect.height() - (rr * 2)), 0);
+ }
+
+ switch (_sprites[spriteId]->_ink) {
+ case kInkTypeCopy:
+ surface.blitFrom(tmpSurface, Common::Point(_sprites[spriteId]->_startPoint.x, _sprites[spriteId]->_startPoint.y));
+ break;
+ case kInkTypeTransparent:
+ // FIXME: is it always white (last entry in pallette)?
+ surface.transBlitFrom(tmpSurface, Common::Point(_sprites[spriteId]->_startPoint.x, _sprites[spriteId]->_startPoint.y), _vm->getPaletteColorCount() - 1);
+ break;
+ case kInkTypeBackgndTrans:
+ drawBackgndTransSprite(surface, tmpSurface, shapeRect);
+ break;
+ case kInkTypeMatte:
+ drawMatteSprite(surface, tmpSurface, shapeRect);
+ break;
+ case kInkTypeGhost:
+ drawGhostSprite(surface, tmpSurface, shapeRect);
+ break;
+ case kInkTypeReverse:
+ drawReverseSprite(surface, tmpSurface, shapeRect);
+ break;
+ default:
+ warning("Unhandled ink type %d", _sprites[spriteId]->_ink);
+ surface.blitFrom(tmpSurface, Common::Point(_sprites[spriteId]->_startPoint.x, _sprites[spriteId]->_startPoint.y));
+ break;
+ }
+
+ addDrawRect(spriteId, shapeRect);
+}
+
+void Frame::renderButton(Graphics::ManagedSurface &surface, uint16 spriteId, uint16 textId) {
+ renderText(surface, spriteId, _vm->getMainArchive()->getResource(MKTAG('S', 'T', 'X', 'T'), textId), true);
- uint16 castID = _sprites[spriteId]->_castId;
- ButtonCast *button = static_cast<ButtonCast *>(_vm->_currentScore->_casts[castID]);
+ uint16 castId = _sprites[spriteId]->_castId;
+ ButtonCast *button = static_cast<ButtonCast *>(_vm->_currentScore->_casts[castId]);
uint32 rectLeft = button->initialRect.left;
uint32 rectTop = button->initialRect.top;
@@ -617,13 +722,21 @@ void Frame::renderButton(Graphics::ManagedSurface &surface, uint16 spriteId) {
int height = _sprites[spriteId]->_height;
int width = _sprites[spriteId]->_width;
+ Common::Rect _rect;
+
switch (button->buttonType) {
case kTypeCheckBox:
// Magic numbers: checkbox square need to move left about 5px from text and 12px side size (D4)
- surface.frameRect(Common::Rect(x - 17, y, x + 12, y + 12), 0);
+ _rect = Common::Rect(x - 17, y, x + 12, y + 12);
+ surface.frameRect(_rect, 0);
+ addDrawRect(spriteId, _rect);
break;
- case kTypeButton:
- surface.frameRect(Common::Rect(x, y, x + width, y + height), 0);
+ case kTypeButton: {
+ _rect = Common::Rect(x, y, x + width - 1, y + height + 5);
+ Graphics::MacPlotData pd(&surface, &_vm->getMacWindowManager()->getPatterns(), Graphics::MacGUIConstants::kPatternSolid, 1);
+ Graphics::drawRoundRect(_rect, 4, 0, false, Graphics::macDrawPixel, &pd);
+ addDrawRect(spriteId, _rect);
+ }
break;
case kTypeRadio:
warning("STUB: renderButton: kTypeRadio");
@@ -633,6 +746,10 @@ void Frame::renderButton(Graphics::ManagedSurface &surface, uint16 spriteId) {
Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId) {
uint16 imgId = spriteId + 1024;
+
+ if (_vm->getVersion() >= 4 && _vm->_currentScore->_casts[spriteId]->children.size() > 0)
+ imgId = _vm->_currentScore->_casts[spriteId]->children[0].index;
+
Image::ImageDecoder *img = NULL;
if (_vm->_currentScore->getArchive()->hasResource(MKTAG('D', 'I', 'B', ' '), imgId)) {
@@ -647,16 +764,31 @@ Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId) {
return img;
}
- if (_vm->_currentScore->getArchive()->hasResource(MKTAG('B', 'I', 'T', 'D'), imgId)) {
- Common::SeekableReadStream *pic = _vm->_currentScore->getArchive()->getResource(MKTAG('B', 'I', 'T', 'D'), imgId);
+ Common::SeekableReadStream *pic = NULL;
+ BitmapCast *bc = NULL;
- if (_vm->getVersion() <= 4) {
- BitmapCast *bc = static_cast<BitmapCast *>(_vm->_currentScore->_casts[spriteId]);
+ if (_vm->getSharedBMP() != NULL && _vm->getSharedBMP()->contains(imgId)) {
+ pic = _vm->getSharedBMP()->getVal(imgId);
+ bc = static_cast<BitmapCast *>(_vm->getSharedCasts()->getVal(spriteId));
+ } else if (_vm->_currentScore->getArchive()->hasResource(MKTAG('B', 'I', 'T', 'D'), imgId)) {
+ pic = _vm->_currentScore->getArchive()->getResource(MKTAG('B', 'I', 'T', 'D'), imgId);
+ bc = static_cast<BitmapCast *>(_vm->_currentScore->_casts[spriteId]);
+ }
+
+ if (pic != NULL && bc != NULL) {
+ if (_vm->getVersion() < 4) {
int w = bc->initialRect.width(), h = bc->initialRect.height();
debugC(2, kDebugImages, "id: %d, w: %d, h: %d, flags: %x, some: %x, unk1: %d, unk2: %d",
imgId, w, h, bc->flags, bc->someFlaggyThing, bc->unk1, bc->unk2);
img = new BITDDecoder(w, h);
+ } else if (_vm->getVersion() < 6) {
+ bc = static_cast<BitmapCast *>(_vm->_currentScore->_casts[spriteId]);
+ int w = bc->initialRect.width(), h = bc->initialRect.height();
+
+ debugC(2, kDebugImages, "id: %d, w: %d, h: %d, flags: %x, some: %x, unk1: %d, unk2: %d",
+ imgId, w, h, bc->flags, bc->someFlaggyThing, bc->unk1, bc->unk2);
+ img = new BITDDecoderV4(w, h, bc->bitsPerPixel);
} else {
img = new Image::BitmapDecoder();
}
@@ -666,34 +798,37 @@ Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId) {
byte buf[1024];
int n = s->read(buf, 1024);
Common::hexdump(buf, n);
+ s->seek(0);
}
img->loadStream(*pic);
return img;
}
- if (_vm->getSharedBMP() != NULL && _vm->getSharedBMP()->contains(imgId)) {
- img = new Image::BitmapDecoder();
- img->loadStream(*_vm->getSharedBMP()->getVal(imgId));
- return img;
- }
-
warning("Image %d not found", spriteId);
return img;
}
-void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID) {
- uint16 castID = _sprites[spriteID]->_castId;
-
- TextCast *textCast = static_cast<TextCast *>(_vm->_currentScore->_casts[castID]);
- Common::SeekableSubReadStreamEndian *textStream;
+void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, uint16 castId) {
+ Common::SeekableSubReadStreamEndian *textStream = NULL;
- if (_vm->_currentScore->_movieArchive->hasResource(MKTAG('S','T','X','T'), castID + 1024)) {
- textStream = _vm->_currentScore->_movieArchive->getResource(MKTAG('S','T','X','T'), castID + 1024);
- } else {
- textStream = _vm->getSharedSTXT()->getVal(spriteID + 1024);
+ if (_vm->_currentScore->_movieArchive->hasResource(MKTAG('S', 'T', 'X', 'T'), castId)) {
+ textStream = _vm->_currentScore->_movieArchive->getResource(MKTAG('S', 'T', 'X', 'T'), castId);
+ } else if (_vm->getSharedSTXT() != nullptr) {
+ textStream = _vm->getSharedSTXT()->getVal(spriteId + 1024);
}
+
+ renderText(surface, spriteId, textStream, false);
+}
+
+void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Common::SeekableSubReadStreamEndian *textStream, bool isButtonLabel) {
+ if (textStream == NULL)
+ return;
+
+ uint16 castId = _sprites[spriteId]->_castId;
+ TextCast *textCast = static_cast<TextCast *>(_vm->_currentScore->_casts[castId]);
+
uint32 unk1 = textStream->readUint32();
uint32 strLen = textStream->readUint32();
uint32 dataLen = textStream->readUint32();
@@ -711,15 +846,43 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID) {
if (strLen < 200)
debugC(3, kDebugText, "text: '%s'", text.c_str());
- uint32 rectLeft = static_cast<TextCast *>(_sprites[spriteID]->_cast)->initialRect.left;
- uint32 rectTop = static_cast<TextCast *>(_sprites[spriteID]->_cast)->initialRect.top;
+ if (_vm->getVersion() >= 4) {
+ uint16 a = textStream->readUint16();
+ uint32 b = textStream->readUint32();
+ uint16 c = textStream->readUint16();
+ uint16 d = textStream->readUint16();
+
+ debugC(3, kDebugText, "text: a: %x b: %x c: %x d: %x", a, b, c, d);
+
+ textCast->fontId = textStream->readUint16();
+ textCast->textSlant = textStream->readByte();
+ textStream->readByte();
+ textCast->fontSize = textStream->readUint16();
+
+ textCast->palinfo1 = textStream->readUint16();
+ textCast->palinfo2 = textStream->readUint16();
+ textCast->palinfo3 = textStream->readUint16();
+ }
+
+ uint16 boxShadow = (uint16)textCast->boxShadow;
+ uint16 borderSize = (uint16)textCast->borderSize;
+ uint16 padding = (uint16)textCast->gutterSize;
+ uint16 textShadow = (uint16)textCast->textShadow;
+
+ //uint32 rectLeft = textCast->initialRect.left;
+ //uint32 rectTop = textCast->initialRect.top;
+
+ int x = _sprites[spriteId]->_startPoint.x; // +rectLeft;
+ int y = _sprites[spriteId]->_startPoint.y; // +rectTop;
- int x = _sprites[spriteID]->_startPoint.x + rectLeft;
- int y = _sprites[spriteID]->_startPoint.y + rectTop;
- int height = _sprites[spriteID]->_height;
- int width = _sprites[spriteID]->_width;
+ int height = _sprites[spriteId]->_height;
+ if (_vm->getVersion() >= 4 && !isButtonLabel) height = textCast->initialRect.bottom;
+ height += textShadow;
+
+ int width = _sprites[spriteId]->_width;
+ if (_vm->getVersion() >= 4 && !isButtonLabel) width = textCast->initialRect.right;
- Graphics::MacFont macFont(textCast->fontId, textCast->fontSize);
+ Graphics::MacFont macFont(textCast->fontId, textCast->fontSize, textCast->textSlant);
if (_vm->_currentScore->_fontMap.contains(textCast->fontId)) {
// Override
@@ -730,44 +893,66 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID) {
debugC(3, kDebugText, "renderText: x: %d y: %d w: %d h: %d font: '%s'", x, y, width, height, _vm->_wm->_fontMan->getFontName(macFont));
- font->drawString(&surface, text, x, y, width, 0);
+ int alignment = (int)textCast->textAlign;
+ if (alignment == -1) alignment = 3;
+ else alignment++;
- if (textCast->borderSize != kSizeNone) {
- uint16 size = textCast->borderSize;
-
- // Indent from borders, measured in d4
- x -= 1;
- y -= 4;
+ uint16 textX = x, textY = y;
+ if (!isButtonLabel) {
+ if (borderSize > 0) {
+ textX += (borderSize + 1);
+ textY += borderSize;
+ }
- height += 4;
- width += 1;
+ if (padding > 0) {
+ width += padding * 2;
+ height += padding;
+ if (textCast->textAlign == kTextAlignLeft) textX += padding;
+ else if (textCast->textAlign == kTextAlignRight) textX -= (padding + 1);
+ //TODO: alignment issue with odd-size-width center-aligned text
+ //else if (textCast->textAlign == kTextAlignCenter && ((borderSize + padding) % 2 == 1)) textX--;
+ textY += padding / 2;
+ }
- while (size) {
- surface.frameRect(Common::Rect(x, y, x + height, y + width), 0);
- x--;
- y--;
- height += 2;
- width += 2;
- size--;
+ if (textShadow > 0) {
+ if (borderSize == 0) textX += 1;
+ font->drawString(&surface, text, textX + textShadow, textY + textShadow,
+ width, (_sprites[spriteId]->_ink == kInkTypeReverse ? 255 : 0), (Graphics::TextAlign)alignment);
+ height -= textShadow;
}
+ } else {
+ textY += 2;
}
- if (textCast->gutterSize != kSizeNone) {
- x -= 1;
- y -= 4;
-
- height += 4;
- width += 1;
- uint16 size = textCast->gutterSize;
-
- surface.frameRect(Common::Rect(x, y, x + height, y + width), 0);
+ //TODO: the colour is wrong here... need to determine the correct colour for all versions!
+ font->drawString(&surface, text, textX, textY,
+ width, (_sprites[spriteId]->_ink == kInkTypeReverse ? 255 : 0), (Graphics::TextAlign)alignment);
+
+ if (isButtonLabel)
+ return;
+
+ uint16 borderX = x + borderSize - 1, borderY = y + borderSize - 1, borderHeight = height, borderWidth = width;
+ if (borderSize != kSizeNone) {
+ while (borderSize) {
+ borderWidth += 2;
+ borderHeight += 2;
+ surface.frameRect(Common::Rect(borderX, borderY, borderX + borderWidth, borderY + borderHeight), 0);
+ borderSize--;
+ borderX--;
+ borderY--;
+ }
+ }
- while (size) {
- surface.drawLine(x + width, y, x + width, y + height, 0);
- surface.drawLine(x, y + height, x + width, y + height, 0);
- x++;
- y++;
- size--;
+ if (boxShadow > 0) {
+ borderSize = (uint16)textCast->borderSize;
+ uint baseOffsetX = x + boxShadow;
+ uint baseOffsetY = y + height + (borderSize * 2);
+ uint sideOffsetX = x + borderWidth;
+ uint sideOffsetY = y + boxShadow;
+ while (boxShadow) {
+ surface.drawLine(baseOffsetX, baseOffsetY + (boxShadow - 1), baseOffsetX + borderWidth - 1, baseOffsetY + (boxShadow - 1), 0);
+ surface.drawLine(sideOffsetX + (boxShadow - 1), sideOffsetY, sideOffsetX + (boxShadow - 1), sideOffsetY + borderHeight - 1, 0);
+ boxShadow--;
}
}
}
@@ -883,11 +1068,10 @@ void Frame::drawMatteSprite(Graphics::ManagedSurface &target, const Graphics::Su
}
uint16 Frame::getSpriteIDFromPos(Common::Point pos) {
- // Find first from top to bottom
- for (uint16 i = _drawRects.size() - 1; i > 0; i--) {
- if (_drawRects[i].contains(pos))
- return i;
- }
+ // Find first from front to back
+ for (int dr = _drawRects.size() - 1; dr >= 0; dr--)
+ if (_drawRects[dr]->rect.contains(pos))
+ return _drawRects[dr]->spriteId;
return 0;
}
diff --git a/engines/director/frame.h b/engines/director/frame.h
index ce82fa527c..f21e3a7055 100644
--- a/engines/director/frame.h
+++ b/engines/director/frame.h
@@ -104,6 +104,11 @@ struct PaletteInfo {
uint16 cycleCount;
};
+struct FrameEntity {
+ uint16 spriteId;
+ Common::Rect rect;
+};
+
class Frame {
public:
@@ -119,16 +124,19 @@ private:
void playTransition(Score *score);
void playSoundChannel();
void renderSprites(Graphics::ManagedSurface &surface, bool renderTrail);
- void renderText(Graphics::ManagedSurface &surface, uint16 spriteId);
- void renderButton(Graphics::ManagedSurface &surface, uint16 spriteId);
+ void renderText(Graphics::ManagedSurface &surface, uint16 spriteId, uint16 castId);
+ void renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Common::SeekableSubReadStreamEndian *textStream, bool isButtonLabel);
+ void renderShape(Graphics::ManagedSurface &surface, uint16 spriteId);
+ void renderButton(Graphics::ManagedSurface &surface, uint16 spriteId, uint16 textId);
void readPaletteInfo(Common::SeekableSubReadStreamEndian &stream);
void readSprite(Common::SeekableSubReadStreamEndian &stream, uint16 offset, uint16 size);
void readMainChannels(Common::SeekableSubReadStreamEndian &stream, uint16 offset, uint16 size);
- Image::ImageDecoder *getImageFrom(uint16 spriteID);
+ Image::ImageDecoder *getImageFrom(uint16 spriteId);
void drawBackgndTransSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect);
void drawMatteSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect);
void drawGhostSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect);
void drawReverseSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect);
+ void addDrawRect(uint16 entityId, Common::Rect &rect);
public:
byte _channelData[kChannelDataSize];
@@ -148,7 +156,7 @@ public:
uint8 _skipFrameFlag;
uint8 _blend;
Common::Array<Sprite *> _sprites;
- Common::Array<Common::Rect > _drawRects;
+ Common::Array<FrameEntity *> _drawRects;
DirectorEngine *_vm;
};
diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
new file mode 100644
index 0000000000..f980edee5c
--- /dev/null
+++ b/engines/director/graphics.cpp
@@ -0,0 +1,155 @@
+/* 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 "director/director.h"
+
+namespace Director {
+
+static byte director3Patterns[][8] = { { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
+ { 0xFF, 0xFF, 0x77, 0xFF, 0xFF, 0xFF, 0x77, 0xFF },
+ { 0x77, 0xFF, 0xDD, 0xFF, 0x77, 0xFF, 0xDD, 0xFF },
+ { 0xFF, 0xDD, 0xFF, 0x55, 0xFF, 0xDD, 0xFF, 0x55 },
+ { 0xFF, 0xD5, 0xFF, 0x55, 0xFF, 0x5D, 0xFF, 0x55 },
+ { 0xFF, 0xAA, 0xFF, 0xAA, 0xFF, 0xAA, 0xFF, 0xAA },
+ { 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA },
+ { 0xAA, 0x44, 0xAA, 0x11, 0xAA, 0x44, 0xAA, 0x11 },
+ { 0xAA, 0x44, 0xAA, 0x00, 0xAA, 0x44, 0xAA, 0x00 },
+ { 0xAA, 0x00, 0xAA, 0x00, 0xAA, 0x00, 0xAA, 0x00 },
+ { 0x00, 0x22, 0x00, 0x88, 0x00, 0x22, 0x00, 0x88 },
+ { 0x88, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00 },
+ { 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00 },
+ { 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 },
+ { 0x21, 0x42, 0x84, 0x09, 0x12, 0x24, 0x48, 0x90 },
+ { 0x11, 0x22, 0x44, 0x88, 0x11, 0x22, 0x44, 0x88 },
+ { 0xEE, 0xDD, 0xBB, 0x77, 0xEE, 0xDD, 0xBB, 0x77 },
+ { 0xF6, 0xED, 0xDB, 0xB7, 0x6F, 0xDE, 0xBD, 0x7B },
+ { 0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0xDF, 0xBF, 0x7F },
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF },
+ { 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF },
+ { 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0xFF },
+ { 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF },
+ { 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00 },
+ { 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00 },
+ { 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00 },
+ { 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ { 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 },
+ { 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82 },
+ { 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88 },
+ { 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94 },
+ { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA },
+ { 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD },
+ { 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB },
+ { 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7 },
+ { 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF },
+ { 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x00 },
+ { 0x7F, 0x7F, 0x7F, 0x00, 0x7F, 0x7F, 0x7F, 0x00 },
+ { 0x77, 0x77, 0x77, 0x00, 0x77, 0x77, 0x77, 0x00 },
+ { 0x88, 0x88, 0x88, 0xFF, 0x88, 0x88, 0x88, 0xFF },
+ { 0x80, 0x80, 0x80, 0xFF, 0x80, 0x80, 0x80, 0xFF },
+ { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xFF },
+ { 0x01, 0x82, 0x44, 0x28, 0x10, 0x28, 0x44, 0x82 },
+ { 0x11, 0x82, 0x45, 0xAB, 0xD7, 0xAB, 0x45, 0x82 },
+ { 0xF7, 0x7F, 0xBE, 0x5D, 0x2A, 0x5D, 0xBE, 0x7F },
+ { 0xFE, 0x7D, 0xBB, 0xD7, 0xEF, 0xD7, 0xBB, 0x7D },
+ { 0xFE, 0x7F, 0xBF, 0xDF, 0xEF, 0xDF, 0xBF, 0x7F },
+ { 0xEE, 0x77, 0xBB, 0xDD, 0xEE, 0xDD, 0xBB, 0x77 },
+ { 0x11, 0x88, 0x44, 0x22, 0x11, 0x22, 0x44, 0x88 },
+ { 0x01, 0x80, 0x40, 0x20, 0x10, 0x20, 0x40, 0x80 },
+ { 0x22, 0x00, 0x01, 0x22, 0x54, 0x88, 0x01, 0x00 },
+ { 0xBF, 0xAF, 0xAB, 0xAA, 0xEA, 0xFA, 0xFE, 0xFF },
+ { 0xFF, 0xFF, 0xBE, 0x9C, 0xAA, 0xB6, 0xBE, 0xFF }
+};
+
+static byte director3QuickDrawPatterns[][8] = { { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
+ { 0xDD, 0xFF, 0x77, 0xFF, 0xDD, 0xFF, 0x77, 0xFF },
+ { 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77 },
+ { 0xEE, 0xDD, 0xBB, 0x77, 0xEE, 0xDD, 0xBB, 0x77 },
+ { 0xFF, 0xAA, 0xFF, 0xAA, 0xFF, 0xAA, 0xFF, 0xAA },
+ { 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55 },
+ { 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 },
+ { 0x11, 0x22, 0x44, 0x88, 0x11, 0x22, 0x44, 0x88 },
+ { 0xAA, 0x00, 0xAA, 0x00, 0xAA, 0x00, 0xAA, 0x00 },
+ { 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22 },
+ { 0x00, 0x22, 0x00, 0x88, 0x00, 0x22, 0x00, 0x88 },
+ { 0x10, 0x20, 0x40, 0x80, 0x01, 0x02, 0x04, 0x08 },
+ { 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00 },
+ { 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ { 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88 },
+ { 0x58, 0xDF, 0x00, 0xDF, 0xDF, 0x58, 0x58, 0x58 },
+ { 0xB1, 0x36, 0x06, 0x60, 0x63, 0x1B, 0x18, 0x81 },
+ { 0x08, 0xFF, 0x01, 0x01, 0x01, 0xFF, 0x08, 0x08 },
+ { 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00 },
+ { 0x80, 0x80, 0x80, 0xFF, 0x80, 0x80, 0x80, 0x80 },
+ { 0x80, 0x10, 0x02, 0x40, 0x04, 0x20, 0x09, 0x00 },
+ { 0x80, 0x01, 0x82, 0x44, 0x38, 0x10, 0x20, 0x40 },
+ { 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00 },
+ { 0x22, 0xFF, 0x22, 0x22, 0x22, 0xFF, 0x22, 0x22 },
+ { 0x00, 0x08, 0x14, 0x2A, 0x55, 0x2A, 0x14, 0x08 },
+ { 0x81, 0xAA, 0x14, 0x08, 0x08, 0xAA, 0x41, 0x80 },
+ { 0x3E, 0x1D, 0x88, 0xD1, 0xE3, 0xC5, 0x88, 0x5C },
+ { 0xAA, 0x00, 0x80, 0x00, 0x88, 0x00, 0x80, 0x00 },
+ { 0x00, 0x11, 0x82, 0x44, 0x28, 0x11, 0x00, 0x55 },
+ { 0x7C, 0x10, 0x10, 0x28, 0xC7, 0x01, 0x01, 0x82 },
+ { 0xEE, 0x31, 0xF1, 0xF1, 0xEE, 0x13, 0x1F, 0x1F },
+ { 0x00, 0x40, 0x20, 0x10, 0x00, 0x01, 0x02, 0x04 },
+ { 0x00, 0x00, 0x40, 0xA0, 0x00, 0x04, 0x0A, 0x00 },
+ { 0x20, 0x60, 0x90, 0x09, 0x06, 0x81, 0x40, 0x20 },
+ { 0x00, 0x7F, 0x43, 0x5F, 0x5F, 0x5F, 0x7F, 0x7F },
+ { 0x01, 0x02, 0x45, 0xAA, 0xFF, 0x20, 0x40, 0x80 },
+ { 0x00, 0x44, 0x0A, 0x11, 0x11, 0x11, 0x51, 0x24 },
+ { 0x0F, 0x0F, 0x0F, 0x0F, 0xF0, 0xF0, 0xF0, 0xF0 },
+ { 0xF8, 0xFC, 0xFA, 0xFC, 0xFA, 0x54, 0x2A, 0x00 },
+ { 0x42, 0xC3, 0x3C, 0x3C, 0x3C, 0x3C, 0xC3, 0x42 },
+ { 0x10, 0x38, 0x7C, 0xFE, 0x7D, 0x3A, 0x14, 0x08 },
+ { 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF },
+ { 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC },
+ { 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00 },
+ { 0xBB, 0xDD, 0xAE, 0x77, 0xEE, 0xDD, 0xAB, 0x77 },
+ { 0x80, 0x40, 0x40, 0x20, 0x20, 0x18, 0x06, 0x01 },
+ { 0x01, 0x82, 0x44, 0x28, 0x10, 0x28, 0x44, 0x82 },
+ { 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF, 0xFF },
+ { 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xFF, 0xFF, 0xFF },
+ { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00, 0x00 },
+ { 0xC3, 0x87, 0x0F, 0x1E, 0x3C, 0x78, 0xF0, 0xE1 },
+ { 0xF0, 0xF0, 0x0F, 0x0F, 0x0F, 0xF0, 0xF0, 0xF0 },
+ { 0xFF, 0xFF, 0xE7, 0xC3, 0x81, 0x18, 0x3C, 0x7E },
+ { 0x1F, 0x8F, 0xC7, 0xE3, 0xC7, 0x8F, 0x1F, 0x3E },
+ { 0xFF, 0x2A, 0xFF, 0xC8, 0xFF, 0x65, 0xFF, 0x9D }
+};
+
+void DirectorEngine::loadPatterns() {
+ for (int i = 0; i < ARRAYSIZE(director3Patterns); i++)
+ _director3Patterns.push_back(director3Patterns[i]);
+
+ for (int i = 0; i < ARRAYSIZE(director3QuickDrawPatterns); i++)
+ _director3QuickDrawPatterns.push_back(director3QuickDrawPatterns[i]);
+}
+
+Graphics::MacPatterns &DirectorEngine::getPatterns() {
+ //TOOD: implement switch and other version patterns. (use getVersion());
+ return _director3QuickDrawPatterns;
+}
+
+}
diff --git a/engines/director/images.cpp b/engines/director/images.cpp
index 0ec84af0d3..7d5e08936e 100644
--- a/engines/director/images.cpp
+++ b/engines/director/images.cpp
@@ -201,4 +201,152 @@ bool BITDDecoder::loadStream(Common::SeekableReadStream &stream) {
return true;
}
+/****************************
+* BITD V4+
+****************************/
+
+BITDDecoderV4::BITDDecoderV4(int w, int h, uint16 bitsPerPixel) {
+ _surface = new Graphics::Surface();
+
+ // We make the surface pitch a multiple of 16.
+ int pitch = w;
+ if (w % 16)
+ pitch += 16 - (w % 16);
+
+ Graphics::PixelFormat pf = Graphics::PixelFormat::createFormatCLUT8();
+ switch (bitsPerPixel) {
+ case 2:
+ break;
+ case 4:
+ break;
+ case 8:
+ break;
+ case 16:
+ break;
+ case 32:
+ //pf = Graphics::PixelFormat::PixelFormat(bitsPerPixel / 8, 8, 8, 8, 8, 24, 16, 8, 0);
+ break;
+ }
+
+
+ // HACK: Create a padded surface by adjusting w after create()
+ _surface->create(pitch, h, pf);
+ _surface->w = w;
+
+ _palette = new byte[256 * 3];
+
+ _palette[0] = _palette[1] = _palette[2] = 0;
+ _palette[255 * 3 + 0] = _palette[255 * 3 + 1] = _palette[255 * 3 + 2] = 0xff;
+
+ _paletteColorCount = 2;
+
+ _bitsPerPixel = bitsPerPixel;
+}
+
+BITDDecoderV4::~BITDDecoderV4() {
+ destroy();
+}
+
+void BITDDecoderV4::destroy() {
+ _surface = 0;
+
+ delete[] _palette;
+ _palette = 0;
+ _paletteColorCount = 0;
+}
+
+void BITDDecoderV4::loadPalette(Common::SeekableReadStream &stream) {
+ // no op
+}
+
+bool BITDDecoderV4::loadStream(Common::SeekableReadStream &stream) {
+ int x = 0, y = 0;
+
+ // If the stream has exactly the required number of bits for this image,
+ // we assume it is uncompressed.
+ if (stream.size() * 8 == _surface->pitch * _surface->h) {
+ debugC(3, kDebugImages, "Skipping compression");
+ for (y = 0; y < _surface->h; y++) {
+ for (x = 0; x < _surface->pitch; ) {
+ byte color = stream.readByte();
+ for (int c = 0; c < 8; c++)
+ *((byte *)_surface->getBasePtr(x++, y)) = (color & (1 << (7 - c))) ? 0 : 0xff;
+ }
+ }
+
+ return true;
+ }
+
+ Common::Array<int> pixels;
+
+ while (!stream.eos()) {
+ int data = stream.readByte();
+ int len = data + 1;
+ if ((data & 0x80) != 0) {
+ len = ((data ^ 0xFF) & 0xff) + 2;
+ data = stream.readByte();
+ for (int p = 0; p < len; p++) {
+ pixels.push_back(data);
+ //*((byte *)_surface->getBasePtr(x, y)) = data;
+ }
+ //data = stream.readByte();
+ } else {
+ for (int p = 0; p < len; p++) {
+ data = stream.readByte();
+ pixels.push_back(data);
+ }
+ }
+ if (_bitsPerPixel == 32 && pixels.size() % (_surface->w * 3) == 0)
+ stream.readUint16BE();
+ }
+
+ int offset = 0;
+ if (_surface->w < (pixels.size() / _surface->h))
+ offset = (pixels.size() / _surface->h) - _surface->w;
+
+ if (pixels.size() > 0) {
+ for (y = 0; y < _surface->h; y++) {
+ for (x = 0; x < _surface->w;) {
+ switch (_bitsPerPixel) {
+ case 1: {
+ for (int c = 0; c < 8; c++, x++) {
+ *((byte *)_surface->getBasePtr(x, y)) = (pixels[(((y * _surface->pitch) + x) / 8)] & (1 << (7 - c))) ? 0 : 0xff;
+ }
+ break;
+ }
+
+ case 8:
+ //this calculation is wrong.. need a demo with colours.
+ *((byte *)_surface->getBasePtr(x, y)) = 0xff - pixels[(y * _surface->w) + x + (y * offset)];
+ x++;
+ break;
+
+ case 16:
+ *((uint16*)_surface->getBasePtr(x, y)) = _surface->format.RGBToColor(
+ (pixels[((y * _surface->w) * 2) + x] & 0x7c) << 1,
+ (pixels[((y * _surface->w) * 2) + x] & 0x03) << 6 |
+ (pixels[((y * _surface->w) * 2) + (_surface->w) + x] & 0xe0) >> 2,
+ (pixels[((y * _surface->w) * 2) + (_surface->w) + x] & 0x1f) << 3);
+ x++;
+ break;
+
+ case 32:
+ *((uint32*)_surface->getBasePtr(x, y)) = _surface->format.RGBToColor(
+ pixels[((y * _surface->w) * 3) + x],
+ pixels[(((y * _surface->w) * 3) + (_surface->w)) + x],
+ pixels[(((y * _surface->w) * 3) + (2 * _surface->w)) + x]);
+ x++;
+ break;
+
+ default:
+ x++;
+ break;
+ }
+ }
+ }
+ }
+
+ return true;
+}
+
} // End of namespace Director
diff --git a/engines/director/images.h b/engines/director/images.h
index 54e824588f..8d25d348d2 100644
--- a/engines/director/images.h
+++ b/engines/director/images.h
@@ -81,6 +81,26 @@ private:
uint8 _paletteColorCount;
};
+class BITDDecoderV4 : public Image::ImageDecoder {
+public:
+ BITDDecoderV4(int w, int h, uint16 bitsPerPixel);
+ virtual ~BITDDecoderV4();
+
+ // ImageDecoder API
+ void destroy();
+ virtual bool loadStream(Common::SeekableReadStream &stream);
+ virtual const Graphics::Surface *getSurface() const { return _surface; }
+ const byte *getPalette() const { return _palette; }
+ void loadPalette(Common::SeekableReadStream &stream);
+ uint16 getPaletteColorCount() const { return _paletteColorCount; }
+
+private:
+ Graphics::Surface *_surface;
+ byte *_palette;
+ uint8 _paletteColorCount;
+ uint16 _bitsPerPixel;
+};
+
} // End of namespace Director
#endif
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index 9220b14f09..4d3b7ddf5b 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -33,28 +33,53 @@ static struct BuiltinProto {
} builtins[] = {
// Math
{ "abs", Lingo::b_abs, 1, 1, true }, // D2
- { "atan", Lingo::b_atan, 1, 1, true }, // D4
- { "cos", Lingo::b_cos, 1, 1, true }, // D4
- { "exp", Lingo::b_exp, 1, 1, true }, // D4
- { "float", Lingo::b_float, 1, 1, true }, // D4
+ { "atan", Lingo::b_atan, 1, 1, true }, // D4
+ { "cos", Lingo::b_cos, 1, 1, true }, // D4
+ { "exp", Lingo::b_exp, 1, 1, true }, // D4
+ { "float", Lingo::b_float, 1, 1, true }, // D4
{ "integer", Lingo::b_integer, 1, 1, true },
- { "integerp", Lingo::b_integerp, 1, 1, true },
- { "log", Lingo::b_log, 1, 1, true }, // D4
- { "pi", Lingo::b_pi, 0, 0, true }, // D4
- { "power", Lingo::b_power, 2, 2, true }, // D4
+ { "log", Lingo::b_log, 1, 1, true }, // D4
+ { "pi", Lingo::b_pi, 0, 0, true }, // D4
+ { "power", Lingo::b_power, 2, 2, true }, // D4
{ "random", Lingo::b_random, 1, 1, true }, // D2
{ "sin", Lingo::b_sin, 1, 1, true },
{ "sqrt", Lingo::b_sqrt, 1, 1, true }, // D2
- { "tan", Lingo::b_tan, 1, 1, true }, // D4
+ { "tan", Lingo::b_tan, 1, 1, true }, // D4
// String
{ "chars", Lingo::b_chars, 3, 3, true }, // D2
{ "charToNum", Lingo::b_charToNum, 1, 1, true }, // D2
+ { "delete", Lingo::b_delete, 1, 1, true }, // D3
+ { "hilite", Lingo::b_hilite, 1, 1, true }, // D3
{ "length", Lingo::b_length, 1, 1, true }, // D2
{ "numToChar", Lingo::b_numToChar, 1, 1, true }, // D2
{ "offset", Lingo::b_offset, 2, 2, true }, // D2
{ "string", Lingo::b_string, 1, 1, true }, // D2
- { "stringp", Lingo::b_stringp, 1, 1, true }, // D2
{ "value", Lingo::b_value, 1, 1, true }, // D2
+ // Lists
+ { "add", Lingo::b_add, 2, 2, false }, // D4
+ { "addAt", Lingo::b_addAt, 3, 3, false }, // D4
+ { "addProp", Lingo::b_addProp, 3, 3, false }, // D4
+ { "append", Lingo::b_append, 2, 2, false }, // D4
+ { "count", Lingo::b_count, 1, 1, true }, // D4
+ { "deleteAt", Lingo::b_deleteAt, 2, 2, false }, // D4
+ { "deleteProp", Lingo::b_deleteProp, 2, 2, false }, // D4
+ { "findPos", Lingo::b_findPos, 2, 2, true }, // D4
+ { "findPosNear", Lingo::b_findPosNear, 2, 2, true }, // D4
+ { "getaProp", Lingo::b_getaProp, 2, 2, true }, // D4
+ { "getAt", Lingo::b_getAt, 2, 2, true }, // D4
+ { "getLast", Lingo::b_getLast, 1, 1, true }, // D4
+ { "getOne", Lingo::b_getOne, 2, 2, true }, // D4
+ { "getPos", Lingo::b_getPos, 2, 2, true }, // D4
+ { "getProp", Lingo::b_getProp, 2, 2, true }, // D4
+ { "getPropAt", Lingo::b_getPropAt, 2, 2, true }, // D4
+ { "list", Lingo::b_list, -1, 0, true }, // D4
+ { "listP", Lingo::b_listP, 1, 1, true }, // D4
+ { "max", Lingo::b_max, 1, 1, true }, // D4
+ { "min", Lingo::b_min, 1, 1, true }, // D4
+ { "setaProp", Lingo::b_setaProp, 3, 3, false }, // D4
+ { "setAt", Lingo::b_setAt, 3, 3, false }, // D4
+ { "setProp", Lingo::b_setProp, 3, 3, false }, // D4
+ { "sort", Lingo::b_sort, 1, 1, false }, // D4
// Files
{ "closeDA", Lingo::b_closeDA, 0, 0, false }, // D2
{ "closeResFile", Lingo::b_closeResFile, 0, 1, false }, // D2
@@ -63,9 +88,12 @@ static struct BuiltinProto {
{ "openDA", Lingo::b_openDA, 1, 1, false }, // D2
{ "openResFile", Lingo::b_openResFile, 1, 1, false }, // D2
{ "openXlib", Lingo::b_openXlib, 1, 1, false }, // D2
+ { "setCallBack", Lingo::b_setCallBack, 2, 2, false }, // D3
{ "showResFile", Lingo::b_showResFile, 0, 1, false }, // D2
{ "showXlib", Lingo::b_showXlib, 0, 1, false }, // D2
+ { "xFactoryList", Lingo::b_xFactoryList, 1, 1, true }, // D3
// Control
+ { "abort", Lingo::b_abort, 0, 0, false }, // D4
{ "continue", Lingo::b_continue, 0, 0, false }, // D2
{ "dontPassEvent", Lingo::b_dontPassEvent, 0, 0, false }, // D2
{ "delay", Lingo::b_delay, 1, 1, false }, // D2
@@ -75,6 +103,8 @@ static struct BuiltinProto {
// play // D2
{ "playAccel", Lingo::b_playAccel, -1,0, false }, // D2
// play done // D2
+ { "preLoad", Lingo::b_preLoad, -1,0, false }, // D3
+ { "preLoadCast", Lingo::b_preLoadCast, -1,0, false }, // D3
{ "quit", Lingo::b_quit, 0, 0, false }, // D2
{ "restart", Lingo::b_restart, 0, 0, false }, // D2
{ "shutDown", Lingo::b_shutDown, 0, 0, false }, // D2
@@ -83,25 +113,33 @@ static struct BuiltinProto {
// when mouseDown // D2
// when mouseUp // D2
// when timeOut // D2
+ // Types
+ { "floatP", Lingo::b_floatP, 1, 1, true }, // D3
+ { "ilk", Lingo::b_ilk, 1, 2, false }, // D4
+ { "integerp", Lingo::b_integerp, 1, 1, true }, // D2
+ { "objectp", Lingo::b_objectp, 1, 1, true }, // D2
+ { "stringp", Lingo::b_stringp, 1, 1, true }, // D2
+ { "symbolp", Lingo::b_symbolp, 1, 1, true }, // D2
// Misc
{ "alert", Lingo::b_alert, 1, 1, false }, // D2
{ "cursor", Lingo::b_cursor, 1, 1, false }, // D2
+ { "framesToHMS", Lingo::b_framesToHMS, 4, 4, false }, // D3
+ { "HMStoFrames", Lingo::b_HMStoFrames, 4, 4, false }, // D3
{ "printFrom", Lingo::b_printFrom, -1,0, false }, // D2
- { "ilk", Lingo::b_ilk, 1, 2, true }, // D4
// put // D2
// set // D2
- { "objectp", Lingo::b_objectp, 1, 1, true },
{ "showGlobals", Lingo::b_showGlobals, 0, 0, false }, // D2
{ "showLocals", Lingo::b_showLocals, 0, 0, false }, // D2
- { "symbolp", Lingo::b_symbolp, 1, 1, true }, // D2
// Score
{ "constrainH", Lingo::b_constrainH, 2, 2, true }, // D2
{ "constrainV", Lingo::b_constrainV, 2, 2, true }, // D2
+ { "duplicate-cast", Lingo::b_duplicateCast, 1, 2, false }, // D4
{ "editableText", Lingo::b_editableText, 0, 0, false }, // D2
+ { "erase-cast", Lingo::b_eraseCast, 1, 2, false }, // D4
// go // D2
{ "installMenu", Lingo::b_installMenu, 1, 1, false }, // D2
{ "label", Lingo::b_label, 1, 1, true }, // D2
- { "marker", Lingo::b_marker, 1, 1, true }, // D2
+ { "marker", Lingo::b_marker, 1, 1, true }, // D2
{ "moveableSprite", Lingo::b_moveableSprite,0, 0, false }, // D2
{ "puppetPalette", Lingo::b_puppetPalette, -1,0, false }, // D2
{ "puppetSound", Lingo::b_puppetSound, -1,0, false }, // D2
@@ -118,6 +156,11 @@ static struct BuiltinProto {
{ "beep", Lingo::b_beep, 0, 1, false }, // D2
{ "mci", Lingo::b_mci, 1, 1, false },
{ "mciwait", Lingo::b_mciwait, 1, 1, false },
+ { "sound-fadeIn", Lingo::b_soundFadeIn, 1, 2, false }, // D3
+ { "sound-fadeOut", Lingo::b_soundFadeOut, 1, 2, false }, // D3
+ { "sound-playFile", Lingo::b_soundPlayFile, 2, 2, false }, // D3
+ { "sound-stop", Lingo::b_soundStop, 1, 1, false }, // D3
+ { "soundBusy", Lingo::b_soundBusy, 1, 1, true }, // D3
// Constants
{ "backspace", Lingo::b_backspace, 0, 0, false }, // D2
{ "empty", Lingo::b_empty, 0, 0, false }, // D2
@@ -127,10 +170,22 @@ static struct BuiltinProto {
{ "return", Lingo::b_return, 0, 0, false }, // D2
{ "tab", Lingo::b_tab, 0, 0, false }, // D2
{ "true", Lingo::b_true, 0, 0, false }, // D2
+ { "version", Lingo::b_version, 0, 0, false }, // D3
+ // References
+ { "field", Lingo::b_field, 1, 1, false }, // D3
+ { "me", Lingo::b_me, -1,0, false }, // D3
+
{ 0, 0, 0, 0, false }
};
+static const char *twoWordBuiltins[] = {
+ "duplicate",
+ "erase",
+ "sound",
+ 0
+};
+
void Lingo::initBuiltIns() {
for (BuiltinProto *blt = builtins; blt->name; blt++) {
Symbol *sym = new Symbol;
@@ -143,10 +198,13 @@ void Lingo::initBuiltIns() {
sym->parens = blt->parens;
sym->u.bltin = blt->func;
- _handlers[blt->name] = sym;
+ _builtins[blt->name] = sym;
_functions[(void *)sym->u.s] = new FuncDesc(blt->name, "");
}
+
+ for (const char **b = twoWordBuiltins; *b; b++)
+ _twoWordBuiltins[*b] = true;
}
void Lingo::printStubWithArglist(const char *funcname, int nargs) {
@@ -240,14 +298,6 @@ void Lingo::b_integer(int nargs) {
g_lingo->push(d);
}
-void Lingo::b_integerp(int nargs) {
- Datum d = g_lingo->pop();
- int res = (d.type == INT) ? 1 : 0;
- d.toInt();
- d.u.i = res;
- g_lingo->push(d);
-}
-
void Lingo::b_log(int nargs) {
Datum d = g_lingo->pop();
d.toFloat();
@@ -345,6 +395,26 @@ void Lingo::b_charToNum(int nargs) {
g_lingo->push(d);
}
+void Lingo::b_delete(int nargs) {
+ Datum d = g_lingo->pop();
+
+ d.toInt();
+
+ warning("STUB: b_delete");
+
+ g_lingo->push(Datum((char)d.u.i));
+}
+
+void Lingo::b_hilite(int nargs) {
+ Datum d = g_lingo->pop();
+
+ d.toInt();
+
+ warning("STUB: b_hilite");
+
+ g_lingo->push(Datum((char)d.u.i));
+}
+
void Lingo::b_length(int nargs) {
Datum d = g_lingo->pop();
@@ -385,14 +455,6 @@ void Lingo::b_string(int nargs) {
g_lingo->push(d);
}
-void Lingo::b_stringp(int nargs) {
- Datum d = g_lingo->pop();
- int res = (d.type == STRING) ? 1 : 0;
- d.toInt();
- d.u.i = res;
- g_lingo->push(d);
-}
-
void Lingo::b_value(int nargs) {
Datum d = g_lingo->pop();
d.toInt();
@@ -400,6 +462,129 @@ void Lingo::b_value(int nargs) {
g_lingo->push(d);
}
+///////////////////
+// Lists
+///////////////////
+void Lingo::b_add(int nargs) {
+ g_lingo->printStubWithArglist("b_add", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_addAt(int nargs) {
+ g_lingo->printStubWithArglist("b_addAt", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_addProp(int nargs) {
+ g_lingo->printStubWithArglist("b_addProp", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_append(int nargs) {
+ g_lingo->printStubWithArglist("b_append", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_count(int nargs) {
+ g_lingo->printStubWithArglist("b_count", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_deleteAt(int nargs) {
+ g_lingo->printStubWithArglist("b_deleteAt", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_deleteProp(int nargs) {
+ g_lingo->printStubWithArglist("b_deleteProp", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_findPos(int nargs) {
+ g_lingo->printStubWithArglist("b_findPos", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_findPosNear(int nargs) {
+ g_lingo->printStubWithArglist("b_findPosNear", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_getaProp(int nargs) {
+ g_lingo->printStubWithArglist("b_getaProp", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_getAt(int nargs) {
+ g_lingo->printStubWithArglist("b_getAt", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_getLast(int nargs) {
+ g_lingo->printStubWithArglist("b_getLast", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_getOne(int nargs) {
+ g_lingo->printStubWithArglist("b_getOne", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_getPos(int nargs) {
+ g_lingo->printStubWithArglist("b_getPos", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_getProp(int nargs) {
+ g_lingo->printStubWithArglist("b_getProp", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_getPropAt(int nargs) {
+ g_lingo->printStubWithArglist("b_getPropAt", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_list(int nargs) {
+ g_lingo->printStubWithArglist("b_list", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_listP(int nargs) {
+ g_lingo->printStubWithArglist("b_listP", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_max(int nargs) {
+ g_lingo->printStubWithArglist("b_max", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_min(int nargs) {
+ g_lingo->printStubWithArglist("b_min", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_setaProp(int nargs) {
+ g_lingo->printStubWithArglist("b_setaProp", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_setAt(int nargs) {
+ g_lingo->printStubWithArglist("b_setAt", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_setProp(int nargs) {
+ g_lingo->printStubWithArglist("b_setProp", nargs);
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_sort(int nargs) {
+ g_lingo->printStubWithArglist("b_sort", nargs);
+ g_lingo->dropStack(nargs);
+}
+
///////////////////
// Files
@@ -458,6 +643,10 @@ void Lingo::b_openXlib(int nargs) {
delete d.u.s;
}
+void Lingo::b_setCallBack(int nargs) {
+ warning("STUB: b_setCallBack");
+}
+
void Lingo::b_showResFile(int nargs) {
Datum d = g_lingo->pop();
@@ -478,17 +667,31 @@ void Lingo::b_showXlib(int nargs) {
delete d.u.s;
}
+void Lingo::b_xFactoryList(int nargs) {
+ Datum d = g_lingo->pop();
+
+ d.toString();
+
+ warning("STUB: b_xFactoryList(%s)", d.u.s->c_str());
+
+ delete d.u.s;
+}
+
///////////////////
// Control
///////////////////
-void Lingo::b_dontPassEvent(int nargs) {
- warning("STUB: b_dontPassEvent");
+void Lingo::b_abort(int nargs) {
+ warning("STUB: b_continue");
}
void Lingo::b_continue(int nargs) {
warning("STUB: b_continue");
}
+void Lingo::b_dontPassEvent(int nargs) {
+ warning("STUB: b_dontPassEvent");
+}
+
void Lingo::b_nothing(int nargs) {
warning("STUB: b_nothing");
}
@@ -515,6 +718,34 @@ void Lingo::b_playAccel(int nargs) {
g_lingo->dropStack(nargs);
}
+void Lingo::b_preLoad(int nargs) {
+ g_lingo->printStubWithArglist("b_preLoad", nargs);
+
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_preLoadCast(int nargs) {
+ g_lingo->printStubWithArglist("b_preLoadCast", nargs);
+
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_framesToHMS(int nargs) {
+ g_lingo->printStubWithArglist("b_framesToHMS", nargs);
+
+ g_lingo->dropStack(nargs);
+
+ g_lingo->push(Datum(0));
+}
+
+void Lingo::b_HMStoFrames(int nargs) {
+ g_lingo->printStubWithArglist("b_HMStoFrames", nargs);
+
+ g_lingo->dropStack(nargs);
+
+ g_lingo->push(Datum(0));
+}
+
void Lingo::b_printFrom(int nargs) {
g_lingo->printStubWithArglist("b_printFrom", nargs);
@@ -537,31 +768,30 @@ void Lingo::b_startTimer(int nargs) {
warning("STUB: b_startTimer");
}
-
///////////////////
-// Misc
+// Types
///////////////////
-void Lingo::b_ilk(int nargs) {
+void Lingo::b_floatP(int nargs) {
Datum d = g_lingo->pop();
- d.u.i = d.type;
- d.type = SYMBOL;
+ int res = (d.type == FLOAT) ? 1 : 0;
+ d.toInt();
+ d.u.i = res;
g_lingo->push(d);
}
-void Lingo::b_alert(int nargs) {
+void Lingo::b_ilk(int nargs) {
Datum d = g_lingo->pop();
-
- d.toString();
-
- warning("STUB: b_alert(%s)", d.u.s->c_str());
-
- delete d.u.s;
+ d.u.i = d.type;
+ d.type = SYMBOL;
+ g_lingo->push(d);
}
-void Lingo::b_cursor(int nargs) {
+void Lingo::b_integerp(int nargs) {
Datum d = g_lingo->pop();
+ int res = (d.type == INT) ? 1 : 0;
d.toInt();
- warning("STUB: b_cursor(%d)", d.u.i);
+ d.u.i = res;
+ g_lingo->push(d);
}
void Lingo::b_objectp(int nargs) {
@@ -572,12 +802,12 @@ void Lingo::b_objectp(int nargs) {
g_lingo->push(d);
}
-void Lingo::b_showGlobals(int nargs) {
- warning("STUB: b_showGlobals");
-}
-
-void Lingo::b_showLocals(int nargs) {
- warning("STUB: b_showLocals");
+void Lingo::b_stringp(int nargs) {
+ Datum d = g_lingo->pop();
+ int res = (d.type == STRING) ? 1 : 0;
+ d.toInt();
+ d.u.i = res;
+ g_lingo->push(d);
}
void Lingo::b_symbolp(int nargs) {
@@ -590,6 +820,33 @@ void Lingo::b_symbolp(int nargs) {
///////////////////
+// Misc
+///////////////////
+void Lingo::b_alert(int nargs) {
+ Datum d = g_lingo->pop();
+
+ d.toString();
+
+ warning("STUB: b_alert(%s)", d.u.s->c_str());
+
+ delete d.u.s;
+}
+
+void Lingo::b_cursor(int nargs) {
+ Datum d = g_lingo->pop();
+ d.toInt();
+ g_lingo->func_cursor(d.u.i);
+}
+
+void Lingo::b_showGlobals(int nargs) {
+ warning("STUB: b_showGlobals");
+}
+
+void Lingo::b_showLocals(int nargs) {
+ warning("STUB: b_showLocals");
+}
+
+///////////////////
// Score
///////////////////
void Lingo::b_constrainH(int nargs) {
@@ -616,10 +873,22 @@ void Lingo::b_constrainV(int nargs) {
g_lingo->push(Datum(0));
}
+void Lingo::b_duplicateCast(int nargs) {
+ g_lingo->printStubWithArglist("b_duplicateCast", nargs);
+
+ g_lingo->dropStack(nargs);
+}
+
void Lingo::b_editableText(int nargs) {
warning("STUB: b_editableText");
}
+void Lingo::b_eraseCast(int nargs) {
+ g_lingo->printStubWithArglist("b_eraseCast", nargs);
+
+ g_lingo->dropStack(nargs);
+}
+
void Lingo::b_installMenu(int nargs) {
Datum d = g_lingo->pop();
warning("STUB: b_installMenu(%d)", d.u.i);
@@ -730,7 +999,7 @@ void Lingo::b_point(int nargs) {
///////////////////
void Lingo::b_beep(int nargs) {
Datum d = g_lingo->pop();
- warning("STUB: b_beep(%d)", d.u.i);
+ g_lingo->func_beep(d.u.i);
}
void Lingo::b_mci(int nargs) {
@@ -749,6 +1018,36 @@ void Lingo::b_mciwait(int nargs) {
g_lingo->func_mciwait(*d.u.s);
}
+void Lingo::b_soundBusy(int nargs) {
+ g_lingo->printStubWithArglist("b_soundBusy", nargs);
+
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_soundFadeIn(int nargs) {
+ g_lingo->printStubWithArglist("b_soundFadeIn", nargs);
+
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_soundFadeOut(int nargs) {
+ g_lingo->printStubWithArglist("b_soundFadeOut", nargs);
+
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_soundPlayFile(int nargs) {
+ g_lingo->printStubWithArglist("b_soundPlayFile", nargs);
+
+ g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_soundStop(int nargs) {
+ g_lingo->printStubWithArglist("b_soundStop", nargs);
+
+ g_lingo->dropStack(nargs);
+}
+
///////////////////
// Constants
///////////////////
@@ -784,6 +1083,10 @@ void Lingo::b_true(int nargs) {
g_lingo->push(Datum(1));
}
+void Lingo::b_version(int nargs) {
+ g_lingo->push(Datum(g_director->getVersion()));
+}
+
///////////////////
// Factory
///////////////////
@@ -791,6 +1094,20 @@ void Lingo::b_factory(int nargs) {
// This is intentionally empty
}
+// TODO:
+// List of predefined methods in D3
+// mAtFrame
+// mDescribe
+// mDispose
+// mGet
+// mInstanceRespondsTo
+// mMessageList
+// mName
+// mNew
+// mPerform
+// mPut
+// mRespondsTo
+
void Lingo::factoryCall(Common::String &name, int nargs) {
Common::String s("factoryCall: ");
@@ -820,4 +1137,18 @@ void Lingo::factoryCall(Common::String &name, int nargs) {
}
}
+///////////////////
+// References
+///////////////////
+void Lingo::b_field(int nargs) {
+ warning("STUB: b_field");
+}
+
+void Lingo::b_me(int nargs) {
+ g_lingo->printStubWithArglist("me", nargs);
+
+ g_lingo->dropStack(nargs);
+}
+
+
} // End of namespace Director
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index dd5977673e..f55c6946b1 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -53,13 +53,15 @@ static struct FuncDescr {
const char *name;
const char *args;
} funcDescr[] = {
- { 0, "STOP", "" },
+ { 0, "STOP", "" },
{ Lingo::c_xpop, "c_xpop", "" },
+ { Lingo::c_arraypush, "c_arraypush", "i" },
{ Lingo::c_printtop, "c_printtop", "" },
{ Lingo::c_constpush, "c_constpush", "i" },
{ Lingo::c_voidpush, "c_voidpush", "" },
{ Lingo::c_fconstpush, "c_fconstpush", "f" },
{ Lingo::c_stringpush, "c_stringpush", "s" },
+ { Lingo::c_symbolpush, "c_symbolpush", "s" }, // D3
{ Lingo::c_varpush, "c_varpush", "s" },
{ Lingo::c_assign, "c_assign", "" },
{ Lingo::c_eval, "c_eval", "s" },
@@ -73,11 +75,21 @@ static struct FuncDescr {
{ Lingo::c_mod, "c_mod", "" },
{ Lingo::c_negate, "c_negate", "" },
{ Lingo::c_ampersand, "c_ampersand", "" },
+ { Lingo::c_after, "c_after", "" }, // D3
+ { Lingo::c_before, "c_before", "" }, // D3
{ Lingo::c_concat, "c_concat", "" },
{ Lingo::c_contains, "c_contains", "" },
{ Lingo::c_starts, "c_starts", "" },
{ Lingo::c_intersects, "c_intersects", "" },
{ Lingo::c_within, "c_within", "" },
+ { Lingo::c_charOf, "c_charOf", "" }, // D3
+ { Lingo::c_charToOf, "c_charToOf", "" }, // D3
+ { Lingo::c_itemOf, "c_itemOf", "" }, // D3
+ { Lingo::c_itemToOf, "c_itemToOf", "" }, // D3
+ { Lingo::c_lineOf, "c_lineOf", "" }, // D3
+ { Lingo::c_lineToOf, "c_lineToOf", "" }, // D3
+ { Lingo::c_wordOf, "c_wordOf", "" }, // D3
+ { Lingo::c_wordToOf, "c_wordToOf", "" }, // D3
{ Lingo::c_and, "c_and", "" },
{ Lingo::c_or, "c_or", "" },
{ Lingo::c_not, "c_not", "" },
@@ -212,20 +224,45 @@ void Lingo::c_stringpush() {
g_lingo->push(Datum(new Common::String(s)));
}
+void Lingo::c_symbolpush() {
+ char *s = (char *)&(*g_lingo->_currentScript)[g_lingo->_pc];
+ g_lingo->_pc += g_lingo->calcStringAlignment(s);
+
+ warning("STUB: c_symbolpush()");
+
+ // TODO: FIXME: Must push symbol instead of string
+ g_lingo->push(Datum(new Common::String(s)));
+}
+
+void Lingo::c_arraypush() {
+ Datum d;
+ inst v = (*g_lingo->_currentScript)[g_lingo->_pc++];
+ int arraySize = READ_UINT32(&v);
+
+ warning("STUB: c_arraypush()");
+
+ for (int i = 0; i < arraySize; i++)
+ g_lingo->pop();
+
+ d.u.i = arraySize;
+ d.type = INT;
+ g_lingo->push(d);
+}
+
void Lingo::c_varpush() {
- char *name = (char *)&(*g_lingo->_currentScript)[g_lingo->_pc];
+ Common::String name((char *)&(*g_lingo->_currentScript)[g_lingo->_pc]);
Datum d;
- g_lingo->_pc += g_lingo->calcStringAlignment(name);
+ g_lingo->_pc += g_lingo->calcStringAlignment(name.c_str());
- if (g_lingo->_handlers.contains(name)) {
+ if (g_lingo->getHandler(name) != NULL) {
d.type = HANDLER;
d.u.s = new Common::String(name);
g_lingo->push(d);
return;
}
- d.u.sym = g_lingo->lookupVar(name);
+ d.u.sym = g_lingo->lookupVar(name.c_str());
if (d.u.sym->type == CASTREF) {
d.type = INT;
int val = d.u.sym->u.i;
@@ -465,6 +502,34 @@ void Lingo::c_ampersand() {
g_lingo->push(d1);
}
+void Lingo::c_after() {
+ Datum d2 = g_lingo->pop();
+ Datum d1 = g_lingo->pop();
+
+ d1.toString();
+ d2.toString();
+
+ warning("STUB: c_after");
+
+ delete d2.u.s;
+
+ g_lingo->push(d1);
+}
+
+void Lingo::c_before() {
+ Datum d2 = g_lingo->pop();
+ Datum d1 = g_lingo->pop();
+
+ d1.toString();
+ d2.toString();
+
+ warning("STUB: c_before");
+
+ delete d2.u.s;
+
+ g_lingo->push(d1);
+}
+
void Lingo::c_concat() {
Datum d2 = g_lingo->pop();
Datum d1 = g_lingo->pop();
@@ -530,7 +595,7 @@ void Lingo::c_intersects() {
Datum d2 = g_lingo->pop();
Datum d1 = g_lingo->pop();
- warning("STUB: c_intersects: %d", d2.u.i);
+ warning("STUB: c_intersects: %d %d", d1.u.i, d2.u.i);
g_lingo->push(d1);
}
@@ -539,7 +604,83 @@ void Lingo::c_within() {
Datum d2 = g_lingo->pop();
Datum d1 = g_lingo->pop();
- warning("STUB: c_within: %d", d2.u.i);
+ warning("STUB: c_within: %d %d", d1.u.i, d2.u.i);
+
+ g_lingo->push(d1);
+}
+
+void Lingo::c_charOf() {
+ Datum d2 = g_lingo->pop();
+ Datum d1 = g_lingo->pop();
+
+ warning("STUB: c_charOf: %d %d", d1.u.i, d2.u.i);
+
+ g_lingo->push(d1);
+}
+
+void Lingo::c_charToOf() {
+ Datum d3 = g_lingo->pop();
+ Datum d2 = g_lingo->pop();
+ Datum d1 = g_lingo->pop();
+
+ warning("STUB: c_charToOf: %d %d %d", d1.u.i, d2.u.i, d3.u.i);
+
+ g_lingo->push(d1);
+}
+
+void Lingo::c_itemOf() {
+ Datum d2 = g_lingo->pop();
+ Datum d1 = g_lingo->pop();
+
+ warning("STUB: c_itemOf: %d %d", d1.u.i, d2.u.i);
+
+ g_lingo->push(d1);
+}
+
+void Lingo::c_itemToOf() {
+ Datum d3 = g_lingo->pop();
+ Datum d2 = g_lingo->pop();
+ Datum d1 = g_lingo->pop();
+
+ warning("STUB: c_itemToOf: %d %d %d", d1.u.i, d2.u.i, d3.u.i);
+
+ g_lingo->push(d1);
+}
+
+void Lingo::c_lineOf() {
+ Datum d2 = g_lingo->pop();
+ Datum d1 = g_lingo->pop();
+
+ warning("STUB: c_lineOf: %d %d", d1.u.i, d2.u.i);
+
+ g_lingo->push(d1);
+}
+
+void Lingo::c_lineToOf() {
+ Datum d3 = g_lingo->pop();
+ Datum d2 = g_lingo->pop();
+ Datum d1 = g_lingo->pop();
+
+ warning("STUB: c_lineToOf: %d %d %d", d1.u.i, d2.u.i, d3.u.i);
+
+ g_lingo->push(d1);
+}
+
+void Lingo::c_wordOf() {
+ Datum d2 = g_lingo->pop();
+ Datum d1 = g_lingo->pop();
+
+ warning("STUB: c_wordOf: %d %d", d1.u.i, d2.u.i);
+
+ g_lingo->push(d1);
+}
+
+void Lingo::c_wordToOf() {
+ Datum d3 = g_lingo->pop();
+ Datum d2 = g_lingo->pop();
+ Datum d1 = g_lingo->pop();
+
+ warning("STUB: c_wordToOf: %d %d %d", d1.u.i, d2.u.i, d3.u.i);
g_lingo->push(d1);
}
@@ -859,22 +1000,21 @@ void Lingo::c_call() {
void Lingo::call(Common::String name, int nargs) {
bool dropArgs = false;
- Symbol *sym;
+ Symbol *sym = g_lingo->getHandler(name);
- if (!g_lingo->_handlers.contains(name)) {
+ if (!g_lingo->_eventHandlerTypeIds.contains(name)) {
Symbol *s = g_lingo->lookupVar(name.c_str(), false);
if (s && s->type == OBJECT) {
debugC(3, kDebugLingoExec, "Dereferencing object reference: %s to %s", name.c_str(), s->u.s->c_str());
name = *s->u.s;
+ sym = g_lingo->getHandler(name);
}
}
- if (!g_lingo->_handlers.contains(name)) {
+ if (sym == NULL) {
warning("Call to undefined handler '%s'. Dropping %d stack items", name.c_str(), nargs);
dropArgs = true;
} else {
- sym = g_lingo->_handlers[name];
-
if (sym->type == BLTIN && sym->nargs != -1 && sym->nargs != nargs && sym->maxArgs != nargs) {
if (sym->nargs == sym->maxArgs)
warning("Incorrect number of arguments to handler '%s', expecting %d. Dropping %d stack items", name.c_str(), sym->nargs, nargs);
@@ -895,9 +1035,10 @@ void Lingo::call(Common::String name, int nargs) {
return;
}
- if (sym->nargs != -1 && sym->nargs < nargs) {
- warning("Incorrect number of arguments for function %s. Dropping extra %d", name.c_str(), nargs - sym->nargs);
- for (int i = 0; i < nargs - sym->nargs; i++)
+ if (sym->nargs != -1 && sym->maxArgs < nargs) {
+ warning("Incorrect number of arguments for function %s (%d, expected %d to %d). Dropping extra %d",
+ name.c_str(), nargs, sym->nargs, sym->maxArgs, nargs - sym->nargs);
+ for (int i = 0; i < nargs - sym->maxArgs; i++)
g_lingo->pop();
}
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp
index ba39d10447..da5c8de35e 100644
--- a/engines/director/lingo/lingo-codegen.cpp
+++ b/engines/director/lingo/lingo-codegen.cpp
@@ -99,6 +99,14 @@ Common::String Lingo::decodeInstruction(uint pc, uint *newPc) {
res += Common::String::format(" %d", v);
break;
}
+ case 'f':
+ {
+ i = (*_currentScript)[pc++];
+ double v = *((double *)&i);
+
+ res += Common::String::format(" %f", v);
+ break;
+ }
case 'o':
{
i = (*_currentScript)[pc++];
@@ -184,32 +192,39 @@ Symbol *Lingo::lookupVar(const char *name, bool create, bool putInGlobalList) {
void Lingo::cleanLocalVars() {
// Clean up current scope local variables and clean up memory
+ debugC(3, kDebugLingoExec, "cleanLocalVars: have %d vars", _localvars->size());
+
for (SymbolHash::const_iterator h = _localvars->begin(); h != _localvars->end(); ++h) {
- if (!h->_value->global)
- delete h->_value;
+ if (!h->_value->global) {
+ Symbol *sym = h->_value;
+ free(sym->name);
+ delete sym;
+ }
}
+
delete g_lingo->_localvars;
+
+ g_lingo->_localvars = 0;
}
void Lingo::define(Common::String &name, int start, int nargs, Common::String *prefix, int end) {
- Symbol *sym;
-
if (prefix)
name = *prefix + "-" + name;
debugC(3, kDebugLingoCompile, "define(\"%s\", %d, %d, %d)", name.c_str(), start, _currentScript->size() - 1, nargs);
- if (!_handlers.contains(name)) { // Create variable if it was not defined
+ Symbol *sym = getHandler(name);
+ if (sym == NULL) { // Create variable if it was not defined
sym = new Symbol;
sym->name = (char *)calloc(name.size() + 1, 1);
Common::strlcpy(sym->name, name.c_str(), name.size() + 1);
sym->type = HANDLER;
- _handlers[name] = sym;
+ _handlers[ENTITY_INDEX(_eventHandlerTypeIds[name.c_str()], _currentEntityId)] = sym;
} else {
- sym = g_lingo->_handlers[name];
-
+ //we don't want to be here. The getHandler call should have used the EntityId and the result
+ //should have been unique!
warning("Redefining handler '%s'", name.c_str());
delete sym->u.defn;
}
@@ -219,6 +234,7 @@ void Lingo::define(Common::String &name, int start, int nargs, Common::String *p
sym->u.defn = new ScriptData(&(*_currentScript)[start], end - start + 1);
sym->nargs = nargs;
+ sym->maxArgs = nargs;
}
int Lingo::codeString(const char *str) {
@@ -264,6 +280,15 @@ int Lingo::codeConst(int val) {
return res;
}
+int Lingo::codeArray(int arraySize) {
+ int res = g_lingo->code1(g_lingo->c_arraypush);
+ inst i = 0;
+ WRITE_UINT32(&i, arraySize);
+ g_lingo->code1(i);
+
+ return res;
+}
+
void Lingo::codeArg(Common::String *s) {
_argstack.push_back(s);
}
@@ -289,17 +314,24 @@ void Lingo::codeArgStore() {
int Lingo::codeFunc(Common::String *s, int numpar) {
int ret = g_lingo->code1(g_lingo->c_call);
- if (s->equalsIgnoreCase("me")) {
- if (!g_lingo->_currentFactory.empty()) {
- g_lingo->codeString(g_lingo->_currentFactory.c_str());
- debugC(2, kDebugLingoCompile, "Replaced 'me' with %s", g_lingo->_currentFactory.c_str());
- } else {
- warning("'me' out of factory method");
- g_lingo->codeString(s->c_str());
- }
- } else {
- g_lingo->codeString(s->c_str());
- }
+ g_lingo->codeString(s->c_str());
+
+ inst num = 0;
+ WRITE_UINT32(&num, numpar);
+ g_lingo->code1(num);
+
+ return ret;
+}
+
+int Lingo::codeMe(Common::String *method, int numpar) {
+ int ret = g_lingo->code1(g_lingo->c_call);
+
+ Common::String m(g_lingo->_currentFactory);
+
+ m += '-';
+ m += *method;
+
+ g_lingo->codeString(m.c_str());
inst num = 0;
WRITE_UINT32(&num, numpar);
@@ -352,7 +384,7 @@ void Lingo::codeFactory(Common::String &name) {
sym->parens = true;
sym->u.bltin = g_lingo->b_factory;
- _handlers[name] = sym;
+ _handlers[ENTITY_INDEX(_eventHandlerTypeIds[name.c_str()], _currentEntityId)] = sym;
}
}
diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp
index e22044c1e9..0deab0760c 100644
--- a/engines/director/lingo/lingo-funcs.cpp
+++ b/engines/director/lingo/lingo-funcs.cpp
@@ -26,6 +26,7 @@
#include "common/util.h"
#include "director/lingo/lingo-gr.h"
#include "director/sound.h"
+#include "graphics/macgui/macwindowmanager.h"
namespace Director {
@@ -199,15 +200,58 @@ void Lingo::func_goto(Datum &frame, Datum &movie) {
}
void Lingo::func_gotoloop() {
+ if (!_vm->_currentScore)
+ return;
+
_vm->_currentScore->gotoloop();
}
void Lingo::func_gotonext() {
+ if (!_vm->_currentScore)
+ return;
+
_vm->_currentScore->gotonext();
}
void Lingo::func_gotoprevious() {
+ if (!_vm->_currentScore)
+ return;
+
_vm->_currentScore->gotoprevious();
}
+void Lingo::func_cursor(int c) {
+ if (_cursorOnStack) {
+ //pop cursor
+ _vm->getMacWindowManager()->popCursor();
+ }
+
+ //and then push cursor.
+ switch (c) {
+ case 0:
+ case -1:
+ _vm->getMacWindowManager()->pushArrowCursor();
+ break;
+ case 1:
+ _vm->getMacWindowManager()->pushBeamCursor();
+ break;
+ case 2:
+ _vm->getMacWindowManager()->pushCrossHairCursor();
+ break;
+ case 3:
+ _vm->getMacWindowManager()->pushCrossBarCursor();
+ break;
+ case 4:
+ _vm->getMacWindowManager()->pushWatchCursor();
+ break;
+ }
+
+ warning("STUB: func_cursor(%d)", c);
+}
+
+void Lingo::func_beep(int repeats) {
+ for (int r = 0; r <= repeats; r++)
+ _vm->getSoundManager()->systemBeep();
+}
+
}
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index aef81fad8a..03ac16c6a8 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -73,68 +73,77 @@
POINT = 262,
RECT = 263,
ARRAY = 264,
- SYMBOL = 265,
- OBJECT = 266,
- INT = 267,
- THEENTITY = 268,
- THEENTITYWITHID = 269,
- FLOAT = 270,
- BLTIN = 271,
- BLTINNOARGS = 272,
- BLTINNOARGSORONE = 273,
- BLTINONEARG = 274,
- BLTINARGLIST = 275,
+ OBJECT = 265,
+ INT = 266,
+ THEENTITY = 267,
+ THEENTITYWITHID = 268,
+ FLOAT = 269,
+ BLTIN = 270,
+ BLTINNOARGS = 271,
+ BLTINNOARGSORONE = 272,
+ BLTINONEARG = 273,
+ BLTINARGLIST = 274,
+ TWOWORDBUILTIN = 275,
ID = 276,
STRING = 277,
HANDLER = 278,
- tDOWN = 279,
- tELSE = 280,
- tNLELSIF = 281,
- tEND = 282,
- tEXIT = 283,
- tFRAME = 284,
- tGLOBAL = 285,
- tGO = 286,
- tIF = 287,
- tINTO = 288,
- tLOOP = 289,
- tMACRO = 290,
- tMOVIE = 291,
- tNEXT = 292,
- tOF = 293,
- tPREVIOUS = 294,
- tPUT = 295,
- tREPEAT = 296,
- tSET = 297,
- tTHEN = 298,
- tTO = 299,
- tWHEN = 300,
- tWITH = 301,
- tWHILE = 302,
- tNLELSE = 303,
- tFACTORY = 304,
- tMETHOD = 305,
- tOPEN = 306,
- tPLAY = 307,
- tDONE = 308,
- tPLAYACCEL = 309,
- tINSTANCE = 310,
- tGE = 311,
- tLE = 312,
- tGT = 313,
- tLT = 314,
- tEQ = 315,
- tNEQ = 316,
- tAND = 317,
- tOR = 318,
- tNOT = 319,
- tMOD = 320,
- tCONCAT = 321,
- tCONTAINS = 322,
- tSTARTS = 323,
- tSPRITE = 324,
- tINTERSECTS = 325,
- tWITHIN = 326
+ SYMBOL = 279,
+ ENDCLAUSE = 280,
+ tDOWN = 281,
+ tELSE = 282,
+ tNLELSIF = 283,
+ tEXIT = 284,
+ tFRAME = 285,
+ tGLOBAL = 286,
+ tGO = 287,
+ tIF = 288,
+ tINTO = 289,
+ tLOOP = 290,
+ tMACRO = 291,
+ tMOVIE = 292,
+ tNEXT = 293,
+ tOF = 294,
+ tPREVIOUS = 295,
+ tPUT = 296,
+ tREPEAT = 297,
+ tSET = 298,
+ tTHEN = 299,
+ tTO = 300,
+ tWHEN = 301,
+ tWITH = 302,
+ tWHILE = 303,
+ tNLELSE = 304,
+ tFACTORY = 305,
+ tMETHOD = 306,
+ tOPEN = 307,
+ tPLAY = 308,
+ tDONE = 309,
+ tPLAYACCEL = 310,
+ tINSTANCE = 311,
+ tGE = 312,
+ tLE = 313,
+ tGT = 314,
+ tLT = 315,
+ tEQ = 316,
+ tNEQ = 317,
+ tAND = 318,
+ tOR = 319,
+ tNOT = 320,
+ tMOD = 321,
+ tAFTER = 322,
+ tBEFORE = 323,
+ tCONCAT = 324,
+ tCONTAINS = 325,
+ tSTARTS = 326,
+ tCHAR = 327,
+ tITEM = 328,
+ tLINE = 329,
+ tWORD = 330,
+ tSPRITE = 331,
+ tINTERSECTS = 332,
+ tWITHIN = 333,
+ tON = 334,
+ tME = 335
};
#endif
/* Tokens. */
@@ -145,68 +154,77 @@
#define POINT 262
#define RECT 263
#define ARRAY 264
-#define SYMBOL 265
-#define OBJECT 266
-#define INT 267
-#define THEENTITY 268
-#define THEENTITYWITHID 269
-#define FLOAT 270
-#define BLTIN 271
-#define BLTINNOARGS 272
-#define BLTINNOARGSORONE 273
-#define BLTINONEARG 274
-#define BLTINARGLIST 275
+#define OBJECT 265
+#define INT 266
+#define THEENTITY 267
+#define THEENTITYWITHID 268
+#define FLOAT 269
+#define BLTIN 270
+#define BLTINNOARGS 271
+#define BLTINNOARGSORONE 272
+#define BLTINONEARG 273
+#define BLTINARGLIST 274
+#define TWOWORDBUILTIN 275
#define ID 276
#define STRING 277
#define HANDLER 278
-#define tDOWN 279
-#define tELSE 280
-#define tNLELSIF 281
-#define tEND 282
-#define tEXIT 283
-#define tFRAME 284
-#define tGLOBAL 285
-#define tGO 286
-#define tIF 287
-#define tINTO 288
-#define tLOOP 289
-#define tMACRO 290
-#define tMOVIE 291
-#define tNEXT 292
-#define tOF 293
-#define tPREVIOUS 294
-#define tPUT 295
-#define tREPEAT 296
-#define tSET 297
-#define tTHEN 298
-#define tTO 299
-#define tWHEN 300
-#define tWITH 301
-#define tWHILE 302
-#define tNLELSE 303
-#define tFACTORY 304
-#define tMETHOD 305
-#define tOPEN 306
-#define tPLAY 307
-#define tDONE 308
-#define tPLAYACCEL 309
-#define tINSTANCE 310
-#define tGE 311
-#define tLE 312
-#define tGT 313
-#define tLT 314
-#define tEQ 315
-#define tNEQ 316
-#define tAND 317
-#define tOR 318
-#define tNOT 319
-#define tMOD 320
-#define tCONCAT 321
-#define tCONTAINS 322
-#define tSTARTS 323
-#define tSPRITE 324
-#define tINTERSECTS 325
-#define tWITHIN 326
+#define SYMBOL 279
+#define ENDCLAUSE 280
+#define tDOWN 281
+#define tELSE 282
+#define tNLELSIF 283
+#define tEXIT 284
+#define tFRAME 285
+#define tGLOBAL 286
+#define tGO 287
+#define tIF 288
+#define tINTO 289
+#define tLOOP 290
+#define tMACRO 291
+#define tMOVIE 292
+#define tNEXT 293
+#define tOF 294
+#define tPREVIOUS 295
+#define tPUT 296
+#define tREPEAT 297
+#define tSET 298
+#define tTHEN 299
+#define tTO 300
+#define tWHEN 301
+#define tWITH 302
+#define tWHILE 303
+#define tNLELSE 304
+#define tFACTORY 305
+#define tMETHOD 306
+#define tOPEN 307
+#define tPLAY 308
+#define tDONE 309
+#define tPLAYACCEL 310
+#define tINSTANCE 311
+#define tGE 312
+#define tLE 313
+#define tGT 314
+#define tLT 315
+#define tEQ 316
+#define tNEQ 317
+#define tAND 318
+#define tOR 319
+#define tNOT 320
+#define tMOD 321
+#define tAFTER 322
+#define tBEFORE 323
+#define tCONCAT 324
+#define tCONTAINS 325
+#define tSTARTS 326
+#define tCHAR 327
+#define tITEM 328
+#define tLINE 329
+#define tWORD 330
+#define tSPRITE 331
+#define tINTERSECTS 332
+#define tWITHIN 333
+#define tON 334
+#define tME 335
@@ -230,6 +248,16 @@ void yyerror(const char *s) {
warning("%s at line %d col %d", s, g_lingo->_linenumber, g_lingo->_colnumber);
}
+void checkEnd(Common::String *token, const char *expect, bool required) {
+ if (required) {
+ if (token->compareToIgnoreCase(expect)) {
+ Common::String err = Common::String::format("end mismatch. Expected %s but got %s", expect, token->c_str());
+ yyerror(err.c_str());
+ }
+ }
+
+ delete token;
+}
@@ -253,7 +281,7 @@ void yyerror(const char *s) {
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 69 "engines/director/lingo/lingo-gr.y"
+#line 79 "engines/director/lingo/lingo-gr.y"
{
Common::String *s;
int i;
@@ -264,7 +292,7 @@ typedef union YYSTYPE
Common::Array<double> *arr;
}
/* Line 193 of yacc.c. */
-#line 268 "engines/director/lingo/lingo-gr.cpp"
+#line 296 "engines/director/lingo/lingo-gr.cpp"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -277,7 +305,7 @@ typedef union YYSTYPE
/* Line 216 of yacc.c. */
-#line 281 "engines/director/lingo/lingo-gr.cpp"
+#line 309 "engines/director/lingo/lingo-gr.cpp"
#ifdef short
# undef short
@@ -490,22 +518,22 @@ union yyalloc
#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 92
+#define YYFINAL 110
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 995
+#define YYLAST 1648
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 85
+#define YYNTOKENS 96
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 37
+#define YYNNTS 39
/* YYNRULES -- Number of rules. */
-#define YYNRULES 130
+#define YYNRULES 150
/* YYNRULES -- Number of states. */
-#define YYNSTATES 269
+#define YYNSTATES 329
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 326
+#define YYMAXUTOK 335
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -514,15 +542,15 @@ union yyalloc
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 79, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 78, 73, 2,
- 80, 81, 76, 74, 84, 75, 2, 77, 2, 2,
+ 88, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 83, 72, 82, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 87, 82, 2,
+ 89, 90, 85, 83, 95, 84, 2, 86, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 92, 81, 91, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 93, 2, 94, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -545,7 +573,8 @@ static const yytype_uint8 yytranslate[] =
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
- 65, 66, 67, 68, 69, 70, 71
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80
};
#if YYDEBUG
@@ -554,92 +583,105 @@ static const yytype_uint8 yytranslate[] =
static const yytype_uint16 yyprhs[] =
{
0, 0, 3, 7, 9, 12, 14, 15, 17, 19,
- 21, 23, 25, 30, 35, 40, 46, 51, 56, 62,
- 64, 66, 68, 70, 79, 91, 104, 108, 117, 129,
- 141, 148, 159, 170, 171, 175, 178, 180, 183, 185,
- 192, 194, 200, 202, 206, 210, 213, 217, 219, 221,
- 222, 223, 224, 227, 230, 234, 236, 238, 240, 242,
- 247, 249, 251, 254, 256, 260, 264, 268, 272, 276,
- 280, 284, 288, 292, 296, 300, 304, 307, 311, 315,
- 319, 323, 326, 329, 333, 338, 343, 346, 348, 350,
- 353, 355, 358, 361, 364, 367, 369, 372, 377, 380,
- 382, 386, 388, 392, 395, 398, 401, 404, 408, 411,
- 414, 416, 420, 423, 426, 429, 433, 436, 437, 446,
- 449, 450, 459, 460, 462, 466, 471, 472, 476, 477,
- 479
+ 21, 23, 25, 30, 35, 40, 45, 50, 56, 61,
+ 66, 72, 74, 76, 78, 80, 88, 99, 111, 115,
+ 123, 134, 145, 152, 163, 174, 175, 179, 182, 184,
+ 187, 189, 196, 198, 204, 206, 210, 214, 217, 221,
+ 223, 225, 226, 227, 228, 231, 234, 238, 240, 242,
+ 244, 246, 248, 253, 255, 257, 260, 262, 266, 270,
+ 274, 278, 282, 286, 290, 294, 298, 302, 306, 310,
+ 313, 317, 321, 325, 329, 333, 336, 339, 343, 347,
+ 352, 357, 362, 369, 374, 381, 386, 393, 398, 405,
+ 408, 410, 412, 415, 417, 420, 423, 426, 429, 431,
+ 436, 439, 444, 451, 456, 459, 463, 465, 469, 471,
+ 475, 478, 481, 484, 487, 491, 494, 497, 499, 503,
+ 506, 509, 512, 516, 519, 520, 529, 532, 533, 542,
+ 543, 544, 555, 556, 558, 562, 567, 568, 572, 573,
+ 575
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
+static const yytype_int16 yyrhs[] =
{
- 86, 0, -1, 86, 87, 88, -1, 88, -1, 1,
- 87, -1, 79, -1, -1, 115, -1, 108, -1, 120,
- -1, 89, -1, 91, -1, 40, 107, 33, 21, -1,
- 42, 21, 72, 107, -1, 42, 13, 72, 107, -1,
- 42, 14, 107, 72, 107, -1, 42, 21, 44, 107,
- -1, 42, 13, 44, 107, -1, 42, 14, 107, 44,
- 107, -1, 107, -1, 108, -1, 90, -1, 92, -1,
- 99, 80, 98, 81, 105, 104, 27, 41, -1, 100,
- 72, 107, 104, 44, 107, 104, 105, 104, 27, 41,
- -1, 100, 72, 107, 104, 24, 44, 107, 104, 105,
- 104, 27, 41, -1, 106, 107, 104, -1, 101, 98,
- 43, 87, 105, 104, 27, 32, -1, 101, 98, 43,
- 87, 105, 104, 48, 105, 104, 27, 32, -1, 101,
- 98, 43, 87, 105, 104, 103, 94, 104, 27, 32,
- -1, 101, 98, 43, 103, 90, 104, -1, 101, 98,
- 43, 103, 90, 104, 48, 103, 90, 104, -1, 101,
- 98, 43, 103, 90, 104, 95, 104, 93, 104, -1,
- -1, 48, 103, 90, -1, 94, 97, -1, 97, -1,
- 95, 96, -1, 96, -1, 102, 98, 43, 103, 91,
- 104, -1, 95, -1, 102, 98, 43, 105, 104, -1,
- 107, -1, 107, 72, 107, -1, 80, 98, 81, -1,
- 41, 47, -1, 41, 46, 21, -1, 32, -1, 26,
- -1, -1, -1, -1, 105, 87, -1, 105, 91, -1,
- 45, 21, 43, -1, 12, -1, 15, -1, 22, -1,
- 17, -1, 21, 80, 121, 81, -1, 21, -1, 13,
- -1, 14, 107, -1, 89, -1, 107, 74, 107, -1,
- 107, 75, 107, -1, 107, 76, 107, -1, 107, 77,
- 107, -1, 107, 65, 107, -1, 107, 82, 107, -1,
- 107, 83, 107, -1, 107, 61, 107, -1, 107, 56,
- 107, -1, 107, 57, 107, -1, 107, 62, 107, -1,
- 107, 63, 107, -1, 64, 107, -1, 107, 73, 107,
- -1, 107, 66, 107, -1, 107, 67, 107, -1, 107,
- 68, 107, -1, 74, 107, -1, 75, 107, -1, 80,
- 107, 81, -1, 69, 107, 70, 107, -1, 69, 107,
- 71, 107, -1, 40, 107, -1, 111, -1, 114, -1,
- 28, 41, -1, 28, -1, 30, 109, -1, 55, 110,
- -1, 19, 107, -1, 18, 107, -1, 18, -1, 20,
- 121, -1, 51, 107, 46, 107, -1, 51, 107, -1,
- 21, -1, 109, 84, 21, -1, 21, -1, 110, 84,
- 21, -1, 31, 34, -1, 31, 37, -1, 31, 39,
- -1, 31, 112, -1, 31, 112, 113, -1, 31, 113,
- -1, 29, 107, -1, 107, -1, 38, 36, 107, -1,
- 36, 107, -1, 52, 53, -1, 52, 112, -1, 52,
- 112, 113, -1, 52, 113, -1, -1, 35, 21, 116,
- 103, 118, 87, 119, 105, -1, 49, 21, -1, -1,
- 50, 21, 117, 103, 118, 87, 119, 105, -1, -1,
- 21, -1, 118, 84, 21, -1, 118, 87, 84, 21,
- -1, -1, 21, 103, 121, -1, -1, 107, -1, 121,
- 84, 107, -1
+ 97, 0, -1, 97, 98, 99, -1, 99, -1, 1,
+ 98, -1, 88, -1, -1, 126, -1, 119, -1, 133,
+ -1, 100, -1, 102, -1, 41, 118, 34, 21, -1,
+ 41, 118, 67, 118, -1, 41, 118, 68, 118, -1,
+ 43, 21, 81, 118, -1, 43, 12, 81, 118, -1,
+ 43, 13, 118, 81, 118, -1, 43, 21, 45, 118,
+ -1, 43, 12, 45, 118, -1, 43, 13, 118, 45,
+ 118, -1, 118, -1, 119, -1, 101, -1, 103, -1,
+ 110, 89, 109, 90, 116, 115, 25, -1, 111, 81,
+ 118, 115, 45, 118, 115, 116, 115, 25, -1, 111,
+ 81, 118, 115, 26, 45, 118, 115, 116, 115, 25,
+ -1, 117, 118, 115, -1, 112, 109, 44, 98, 116,
+ 115, 25, -1, 112, 109, 44, 98, 116, 115, 49,
+ 116, 115, 25, -1, 112, 109, 44, 98, 116, 115,
+ 114, 105, 115, 25, -1, 112, 109, 44, 114, 101,
+ 115, -1, 112, 109, 44, 114, 101, 115, 49, 114,
+ 101, 115, -1, 112, 109, 44, 114, 101, 115, 106,
+ 115, 104, 115, -1, -1, 49, 114, 101, -1, 105,
+ 108, -1, 108, -1, 106, 107, -1, 107, -1, 113,
+ 109, 44, 114, 102, 115, -1, 106, -1, 113, 109,
+ 44, 116, 115, -1, 118, -1, 118, 81, 118, -1,
+ 89, 109, 90, -1, 42, 48, -1, 42, 47, 21,
+ -1, 33, -1, 28, -1, -1, -1, -1, 116, 98,
+ -1, 116, 102, -1, 46, 21, 44, -1, 11, -1,
+ 14, -1, 24, -1, 22, -1, 16, -1, 21, 89,
+ 134, 90, -1, 21, -1, 12, -1, 13, 118, -1,
+ 100, -1, 118, 83, 118, -1, 118, 84, 118, -1,
+ 118, 85, 118, -1, 118, 86, 118, -1, 118, 66,
+ 118, -1, 118, 91, 118, -1, 118, 92, 118, -1,
+ 118, 62, 118, -1, 118, 57, 118, -1, 118, 58,
+ 118, -1, 118, 63, 118, -1, 118, 64, 118, -1,
+ 65, 118, -1, 118, 82, 118, -1, 118, 67, 118,
+ -1, 118, 69, 118, -1, 118, 70, 118, -1, 118,
+ 71, 118, -1, 83, 118, -1, 84, 118, -1, 89,
+ 118, 90, -1, 93, 134, 94, -1, 76, 118, 77,
+ 118, -1, 76, 118, 78, 118, -1, 72, 118, 39,
+ 118, -1, 72, 118, 45, 118, 39, 118, -1, 73,
+ 118, 39, 118, -1, 73, 118, 45, 118, 39, 118,
+ -1, 74, 118, 39, 118, -1, 74, 118, 45, 118,
+ 39, 118, -1, 75, 118, 39, 118, -1, 75, 118,
+ 45, 118, 39, 118, -1, 41, 118, -1, 122, -1,
+ 125, -1, 29, 42, -1, 29, -1, 31, 120, -1,
+ 56, 121, -1, 18, 118, -1, 17, 118, -1, 17,
+ -1, 19, 89, 134, 90, -1, 19, 134, -1, 80,
+ 89, 21, 90, -1, 80, 89, 21, 95, 134, 90,
+ -1, 52, 118, 47, 118, -1, 52, 118, -1, 20,
+ 21, 134, -1, 21, -1, 120, 95, 21, -1, 21,
+ -1, 121, 95, 21, -1, 32, 35, -1, 32, 38,
+ -1, 32, 40, -1, 32, 123, -1, 32, 123, 124,
+ -1, 32, 124, -1, 30, 118, -1, 118, -1, 39,
+ 37, 118, -1, 37, 118, -1, 53, 54, -1, 53,
+ 123, -1, 53, 123, 124, -1, 53, 124, -1, -1,
+ 36, 21, 127, 114, 131, 98, 132, 116, -1, 50,
+ 21, -1, -1, 51, 21, 128, 114, 131, 98, 132,
+ 116, -1, -1, -1, 79, 21, 129, 114, 130, 131,
+ 98, 132, 116, 25, -1, -1, 21, -1, 131, 95,
+ 21, -1, 131, 98, 95, 21, -1, -1, 21, 114,
+ 134, -1, -1, 118, -1, 134, 95, 118, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 105, 105, 106, 107, 110, 115, 116, 117, 118,
- 119, 120, 123, 129, 135, 143, 151, 157, 165, 174,
- 175, 177, 178, 183, 194, 210, 222, 230, 237, 246,
- 255, 265, 275, 286, 287, 290, 291, 294, 295, 298,
- 306, 307, 315, 316, 317, 319, 321, 327, 333, 340,
- 342, 344, 345, 346, 349, 355, 356, 359, 362, 365,
- 368, 372, 379, 385, 386, 387, 388, 389, 390, 391,
- 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
- 402, 403, 404, 405, 406, 407, 410, 411, 412, 413,
- 414, 416, 417, 418, 421, 424, 427, 428, 429, 432,
- 433, 436, 437, 448, 449, 450, 451, 454, 457, 462,
- 463, 466, 467, 470, 471, 474, 477, 507, 507, 513,
- 516, 516, 521, 522, 523, 524, 526, 530, 538, 539,
- 540
+ 0, 117, 117, 118, 119, 122, 127, 128, 129, 130,
+ 131, 132, 135, 141, 142, 143, 149, 157, 165, 171,
+ 179, 188, 189, 191, 192, 197, 210, 228, 242, 250,
+ 260, 272, 284, 294, 304, 315, 316, 319, 320, 323,
+ 324, 327, 335, 336, 344, 345, 346, 348, 350, 356,
+ 362, 369, 371, 373, 374, 375, 378, 384, 385, 388,
+ 391, 394, 397, 400, 404, 411, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 452,
+ 453, 454, 455, 456, 458, 459, 460, 463, 466, 469,
+ 470, 471, 472, 473, 474, 475, 478, 479, 482, 483,
+ 494, 495, 496, 497, 500, 503, 508, 509, 512, 513,
+ 516, 517, 520, 523, 553, 553, 559, 562, 562, 567,
+ 568, 567, 578, 579, 580, 581, 583, 587, 595, 596,
+ 597
};
#endif
@@ -649,24 +691,25 @@ static const yytype_uint16 yyrline[] =
static const char *const yytname[] =
{
"$end", "error", "$undefined", "UNARY", "CASTREF", "VOID", "VAR",
- "POINT", "RECT", "ARRAY", "SYMBOL", "OBJECT", "INT", "THEENTITY",
+ "POINT", "RECT", "ARRAY", "OBJECT", "INT", "THEENTITY",
"THEENTITYWITHID", "FLOAT", "BLTIN", "BLTINNOARGS", "BLTINNOARGSORONE",
- "BLTINONEARG", "BLTINARGLIST", "ID", "STRING", "HANDLER", "tDOWN",
- "tELSE", "tNLELSIF", "tEND", "tEXIT", "tFRAME", "tGLOBAL", "tGO", "tIF",
- "tINTO", "tLOOP", "tMACRO", "tMOVIE", "tNEXT", "tOF", "tPREVIOUS",
- "tPUT", "tREPEAT", "tSET", "tTHEN", "tTO", "tWHEN", "tWITH", "tWHILE",
- "tNLELSE", "tFACTORY", "tMETHOD", "tOPEN", "tPLAY", "tDONE",
- "tPLAYACCEL", "tINSTANCE", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ",
- "tAND", "tOR", "tNOT", "tMOD", "tCONCAT", "tCONTAINS", "tSTARTS",
- "tSPRITE", "tINTERSECTS", "tWITHIN", "'='", "'&'", "'+'", "'-'", "'*'",
- "'/'", "'%'", "'\\n'", "'('", "')'", "'>'", "'<'", "','", "$accept",
- "program", "nl", "programline", "asgn", "stmtoneliner", "stmt", "ifstmt",
- "elsestmtoneliner", "elseifstmt", "elseifstmtoneliner",
- "elseifstmtoneliner1", "elseifstmt1", "cond", "repeatwhile",
- "repeatwith", "if", "elseif", "begin", "end", "stmtlist", "when", "expr",
- "func", "globallist", "instancelist", "gotofunc", "gotoframe",
- "gotomovie", "playfunc", "defn", "@1", "@2", "argdef", "argstore",
- "macro", "arglist", 0
+ "BLTINONEARG", "BLTINARGLIST", "TWOWORDBUILTIN", "ID", "STRING",
+ "HANDLER", "SYMBOL", "ENDCLAUSE", "tDOWN", "tELSE", "tNLELSIF", "tEXIT",
+ "tFRAME", "tGLOBAL", "tGO", "tIF", "tINTO", "tLOOP", "tMACRO", "tMOVIE",
+ "tNEXT", "tOF", "tPREVIOUS", "tPUT", "tREPEAT", "tSET", "tTHEN", "tTO",
+ "tWHEN", "tWITH", "tWHILE", "tNLELSE", "tFACTORY", "tMETHOD", "tOPEN",
+ "tPLAY", "tDONE", "tPLAYACCEL", "tINSTANCE", "tGE", "tLE", "tGT", "tLT",
+ "tEQ", "tNEQ", "tAND", "tOR", "tNOT", "tMOD", "tAFTER", "tBEFORE",
+ "tCONCAT", "tCONTAINS", "tSTARTS", "tCHAR", "tITEM", "tLINE", "tWORD",
+ "tSPRITE", "tINTERSECTS", "tWITHIN", "tON", "tME", "'='", "'&'", "'+'",
+ "'-'", "'*'", "'/'", "'%'", "'\\n'", "'('", "')'", "'>'", "'<'", "'['",
+ "']'", "','", "$accept", "program", "nl", "programline", "asgn",
+ "stmtoneliner", "stmt", "ifstmt", "elsestmtoneliner", "elseifstmt",
+ "elseifstmtoneliner", "elseifstmtoneliner1", "elseifstmt1", "cond",
+ "repeatwhile", "repeatwith", "if", "elseif", "begin", "end", "stmtlist",
+ "when", "expr", "func", "globallist", "instancelist", "gotofunc",
+ "gotoframe", "gotomovie", "playfunc", "defn", "@1", "@2", "@3", "@4",
+ "argdef", "argstore", "macro", "arglist", 0
};
#endif
@@ -682,46 +725,51 @@ static const yytype_uint16 yytoknum[] =
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
- 325, 326, 61, 38, 43, 45, 42, 47, 37, 10,
- 40, 41, 62, 60, 44
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 61, 38, 43, 45, 42, 47, 37, 10, 40,
+ 41, 62, 60, 91, 93, 44
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 85, 86, 86, 86, 87, 88, 88, 88, 88,
- 88, 88, 89, 89, 89, 89, 89, 89, 89, 90,
- 90, 91, 91, 91, 91, 91, 91, 92, 92, 92,
- 92, 92, 92, 93, 93, 94, 94, 95, 95, 96,
- 97, 97, 98, 98, 98, 99, 100, 101, 102, 103,
- 104, 105, 105, 105, 106, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 108, 108, 108, 108,
- 108, 108, 108, 108, 108, 108, 108, 108, 108, 109,
- 109, 110, 110, 111, 111, 111, 111, 111, 111, 112,
- 112, 113, 113, 114, 114, 114, 114, 116, 115, 115,
- 117, 115, 118, 118, 118, 118, 119, 120, 121, 121,
- 121
+ 0, 96, 97, 97, 97, 98, 99, 99, 99, 99,
+ 99, 99, 100, 100, 100, 100, 100, 100, 100, 100,
+ 100, 101, 101, 102, 102, 102, 102, 102, 102, 103,
+ 103, 103, 103, 103, 103, 104, 104, 105, 105, 106,
+ 106, 107, 108, 108, 109, 109, 109, 110, 111, 112,
+ 113, 114, 115, 116, 116, 116, 117, 118, 118, 118,
+ 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
+ 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
+ 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
+ 118, 118, 118, 118, 118, 118, 118, 118, 118, 119,
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
+ 119, 119, 119, 119, 119, 119, 120, 120, 121, 121,
+ 122, 122, 122, 122, 122, 122, 123, 123, 124, 124,
+ 125, 125, 125, 125, 127, 126, 126, 128, 126, 129,
+ 130, 126, 131, 131, 131, 131, 132, 133, 134, 134,
+ 134
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 3, 1, 2, 1, 0, 1, 1, 1,
- 1, 1, 4, 4, 4, 5, 4, 4, 5, 1,
- 1, 1, 1, 8, 11, 12, 3, 8, 11, 11,
- 6, 10, 10, 0, 3, 2, 1, 2, 1, 6,
- 1, 5, 1, 3, 3, 2, 3, 1, 1, 0,
- 0, 0, 2, 2, 3, 1, 1, 1, 1, 4,
- 1, 1, 2, 1, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 2, 3, 3, 3,
- 3, 2, 2, 3, 4, 4, 2, 1, 1, 2,
- 1, 2, 2, 2, 2, 1, 2, 4, 2, 1,
- 3, 1, 3, 2, 2, 2, 2, 3, 2, 2,
- 1, 3, 2, 2, 2, 3, 2, 0, 8, 2,
- 0, 8, 0, 1, 3, 4, 0, 3, 0, 1,
+ 1, 1, 4, 4, 4, 4, 4, 5, 4, 4,
+ 5, 1, 1, 1, 1, 7, 10, 11, 3, 7,
+ 10, 10, 6, 10, 10, 0, 3, 2, 1, 2,
+ 1, 6, 1, 5, 1, 3, 3, 2, 3, 1,
+ 1, 0, 0, 0, 2, 2, 3, 1, 1, 1,
+ 1, 1, 4, 1, 1, 2, 1, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
+ 3, 3, 3, 3, 3, 2, 2, 3, 3, 4,
+ 4, 4, 6, 4, 6, 4, 6, 4, 6, 2,
+ 1, 1, 2, 1, 2, 2, 2, 2, 1, 4,
+ 2, 4, 6, 4, 2, 3, 1, 3, 1, 3,
+ 2, 2, 2, 2, 3, 2, 2, 1, 3, 2,
+ 2, 2, 3, 2, 0, 8, 2, 0, 8, 0,
+ 0, 10, 0, 1, 3, 4, 0, 3, 0, 1,
3
};
@@ -730,331 +778,479 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 0, 0, 55, 61, 0, 56, 58, 95, 0, 128,
- 49, 57, 90, 0, 0, 47, 0, 0, 0, 0,
+ 0, 0, 57, 64, 0, 58, 61, 108, 0, 148,
+ 0, 51, 60, 59, 103, 0, 0, 49, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 3, 63, 21, 11, 22, 0, 0, 0,
- 0, 19, 8, 87, 88, 7, 9, 5, 4, 60,
- 0, 63, 62, 94, 93, 129, 96, 128, 128, 89,
- 99, 91, 0, 103, 0, 104, 0, 105, 110, 106,
- 108, 117, 86, 0, 45, 0, 0, 0, 0, 119,
- 120, 98, 113, 114, 116, 101, 92, 76, 0, 81,
- 82, 0, 1, 6, 0, 0, 0, 0, 42, 50,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 148,
+ 0, 3, 66, 23, 11, 24, 0, 0, 0, 0,
+ 21, 8, 100, 101, 7, 9, 5, 4, 63, 0,
+ 66, 65, 107, 106, 148, 149, 110, 148, 148, 148,
+ 102, 116, 104, 0, 120, 0, 121, 0, 122, 127,
+ 123, 125, 134, 99, 0, 47, 0, 0, 0, 0,
+ 136, 137, 114, 130, 131, 133, 118, 105, 79, 0,
+ 0, 0, 0, 0, 139, 0, 85, 86, 0, 0,
+ 1, 6, 0, 0, 0, 0, 44, 52, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 127,
- 0, 109, 112, 0, 107, 49, 0, 46, 0, 0,
- 0, 0, 0, 54, 49, 0, 115, 0, 0, 0,
- 83, 2, 0, 50, 0, 0, 49, 0, 26, 72,
- 73, 71, 74, 75, 68, 78, 79, 80, 77, 64,
- 65, 66, 67, 69, 70, 130, 59, 100, 111, 122,
- 12, 17, 14, 0, 0, 16, 13, 122, 97, 102,
- 84, 85, 51, 0, 44, 51, 0, 43, 123, 0,
- 18, 15, 0, 50, 0, 0, 50, 50, 20, 0,
- 126, 126, 52, 53, 0, 0, 50, 49, 30, 124,
- 0, 51, 51, 0, 50, 51, 0, 51, 0, 48,
- 49, 50, 38, 0, 125, 118, 121, 23, 51, 50,
- 27, 50, 50, 40, 36, 0, 0, 37, 33, 0,
- 50, 0, 0, 35, 0, 0, 50, 49, 50, 49,
- 0, 0, 0, 0, 49, 31, 0, 32, 0, 0,
- 24, 28, 29, 50, 34, 50, 25, 41, 39
+ 0, 0, 0, 0, 0, 0, 149, 0, 0, 115,
+ 0, 147, 0, 126, 129, 0, 124, 51, 0, 0,
+ 0, 48, 0, 0, 0, 0, 0, 56, 51, 0,
+ 132, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 51, 0, 87, 88, 2, 0, 52, 0,
+ 0, 51, 0, 28, 75, 76, 74, 77, 78, 71,
+ 81, 82, 83, 84, 80, 67, 68, 69, 70, 72,
+ 73, 109, 150, 62, 117, 128, 142, 12, 13, 14,
+ 19, 16, 0, 0, 18, 15, 142, 113, 119, 91,
+ 0, 93, 0, 95, 0, 97, 0, 89, 90, 140,
+ 111, 148, 53, 0, 46, 53, 0, 45, 143, 0,
+ 20, 17, 0, 0, 0, 0, 0, 142, 0, 52,
+ 0, 0, 52, 52, 22, 0, 146, 146, 92, 94,
+ 96, 98, 0, 112, 54, 55, 0, 0, 52, 51,
+ 32, 144, 0, 53, 53, 146, 25, 52, 53, 29,
+ 53, 0, 50, 51, 52, 40, 0, 145, 135, 138,
+ 53, 53, 52, 52, 52, 42, 38, 0, 0, 39,
+ 35, 0, 0, 52, 0, 0, 37, 0, 0, 52,
+ 51, 52, 51, 141, 0, 26, 30, 31, 51, 33,
+ 0, 34, 0, 27, 52, 36, 52, 43, 41
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 31, 202, 32, 51, 34, 203, 36, 248, 232,
- 233, 222, 234, 97, 37, 38, 39, 223, 258, 148,
- 193, 40, 41, 198, 61, 86, 43, 69, 70, 44,
- 45, 125, 134, 189, 211, 46, 56
+ -1, 40, 264, 41, 60, 43, 265, 45, 311, 294,
+ 295, 285, 296, 115, 46, 47, 48, 286, 322, 183,
+ 249, 49, 50, 254, 72, 97, 52, 80, 81, 53,
+ 54, 147, 158, 172, 247, 239, 273, 55, 66
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -206
+#define YYPACT_NINF -266
static const yytype_int16 yypact[] =
{
- 263, -61, -206, -206, 671, -206, -206, 671, 671, 671,
- 912, -206, -17, 9, 593, -206, 14, 671, 8, 6,
- 20, 24, 29, 671, 634, 31, 671, 671, 671, 671,
- 671, 3, -206, 4, -206, -206, -206, -21, -8, 707,
- 671, 889, -206, -206, -206, -206, -206, -206, -206, -20,
- 671, -206, 889, 889, 889, 889, 1, 671, 671, -206,
- -206, 7, 671, -206, 671, -206, 37, -206, 889, 13,
- -206, -206, 723, 54, -206, -38, 671, -34, 41, -206,
- -206, 774, -206, 13, -206, -206, 10, -43, 797, -43,
- -43, 843, -206, 332, 707, 671, 707, 43, 866, 889,
- 671, 671, 671, 671, 671, 671, 671, 671, 671, 671,
- 671, 671, 671, 671, 671, 671, 723, 671, -59, 1,
- 67, 889, 889, 671, -206, -206, 69, -206, 671, 671,
- 751, 671, 671, -206, -206, 671, -206, 71, 671, 671,
- -206, -206, 18, 889, 19, 820, -61, 671, -206, 44,
- 44, 44, -43, -43, -43, 889, 44, 44, 166, 224,
- 224, -43, -43, 889, 889, 889, -206, -206, 889, 81,
- -206, 889, 889, 671, 671, 889, 889, 81, 889, -206,
- 889, 889, -206, -7, -206, -206, 529, 889, -206, -58,
- 889, 889, -58, 396, 60, 671, 396, -206, -206, 84,
- 27, 27, -206, -206, 85, 671, 889, -16, -12, -206,
- 87, -206, -206, 73, 889, -206, 90, -206, 97, -206,
- -206, 97, -206, 707, -206, 396, 396, -206, -206, 396,
- -206, 396, 97, 97, -206, 707, 529, -206, 76, 86,
- 396, 101, 104, -206, 105, 93, -206, -206, -206, -206,
- 111, 114, 126, 127, -18, -206, 529, -206, 465, 120,
- -206, -206, -206, 396, -206, -206, -206, -206, -206
+ 317, -63, -266, -266, 908, -266, -266, 908, 908, 946,
+ 18, 1546, -266, -266, 6, 29, 806, -266, 39, 908,
+ 10, 43, 46, 47, 58, 908, 872, 59, 908, 908,
+ 908, 908, 908, 908, 61, -4, 908, 908, 908, 908,
+ 11, -266, 12, -266, -266, -266, -3, 7, 982, 908,
+ 1515, -266, -266, -266, -266, -266, -266, -266, 3, 908,
+ -266, 1515, 1515, 1515, 908, 1515, 13, 908, 908, 908,
+ -266, -266, 14, 908, -266, 908, -266, 69, -266, 1515,
+ -11, -266, -266, 1010, 86, -266, -29, 908, -28, 68,
+ -266, -266, 1360, -266, -11, -266, -266, 22, -49, 1046,
+ 1082, 1118, 1154, 1391, -266, 97, -49, -49, 1453, -19,
+ -266, 400, 982, 908, 982, 75, 1484, 1515, 908, 908,
+ 908, 908, 908, 908, 908, 908, 908, 908, 908, 908,
+ 908, 908, 908, 908, 908, 1010, 1453, -36, 908, 13,
+ -24, 13, 99, 1515, 1515, 908, -266, -266, 100, 908,
+ 908, -266, 908, 908, 1329, 908, 908, -266, -266, 908,
+ -266, 101, 908, 908, 908, 908, 908, 908, 908, 908,
+ 908, 908, -266, -12, -266, -266, -266, 33, 1515, 35,
+ 1422, -63, 908, -266, 768, 768, 768, -49, -49, -49,
+ 1515, 1515, 768, 768, 1556, 78, 78, -49, -49, 1515,
+ 1515, -266, 1515, -266, -266, 1515, 105, -266, 1515, 1515,
+ 1515, 1515, 908, 908, 1515, 1515, 105, 1515, -266, 1515,
+ 1190, 1515, 1226, 1515, 1262, 1515, 1298, 1515, 1515, -266,
+ -266, 908, -266, -5, -266, -266, 732, 1515, -266, -64,
+ 1515, 1515, -64, 908, 908, 908, 908, 105, 15, 566,
+ 82, 908, 566, -266, -266, 107, 36, 36, 1515, 1515,
+ 1515, 1515, -64, -266, -266, -266, 110, 908, 1515, -2,
+ -15, -266, 109, -266, -266, 36, -266, 1515, -266, -266,
+ -266, 108, -266, -266, 108, -266, 982, -266, 566, 566,
+ -266, -266, 566, 566, 108, 108, -266, 982, 732, -266,
+ 90, 102, 483, 566, 118, 124, -266, 125, 111, -266,
+ -266, -266, -266, -266, 128, -266, -266, -266, -18, -266,
+ 732, -266, 649, -266, 566, -266, -266, -266, -266
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -206, -206, 11, 70, 2, -179, 0, -206, -206, -206,
- -44, -205, -67, -63, -206, -206, -206, -203, -9, -13,
- -141, -206, 39, 5, -206, -206, -206, 142, -11, -206,
- -206, -206, -206, -4, -32, -206, 23
+ -266, -266, 1, 45, 4, -233, 0, -266, -266, -266,
+ -116, -265, -137, -85, -266, -266, -266, -259, -10, -27,
+ -229, -266, 65, 5, -266, -266, -266, 132, -17, -266,
+ -266, -266, -266, -266, -266, -201, -243, -266, -31
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -61
+#define YYTABLE_NINF -64
static const yytype_int16 yytable[] =
{
- 35, 58, 33, 92, -10, 42, 128, 197, -51, -51,
- 131, 216, 48, 84, 219, 235, 237, 194, 47, 75,
- 76, 47, 166, 106, 59, 117, 199, 77, 237, 235,
- 60, 142, 217, 144, 129, 71, 220, 195, 132, 114,
- 115, 78, 93, 52, 196, 79, 53, 54, 55, 64,
- 80, 66, 85, 68, 73, 74, 72, 246, 124, 94,
- 57, -51, 81, 68, 95, 87, 88, 89, 90, 91,
- 225, 226, 136, 123, 229, 127, 231, 264, 98, 99,
- 118, 119, 47, -10, 133, 117, 146, 240, 167, 116,
- 170, 120, 179, 35, 137, 33, 55, 55, 42, 182,
- 184, 121, 188, 122, 205, 209, 103, 104, 224, 105,
- 106, 210, 213, 263, 227, 130, 169, 109, 110, 111,
- 112, 113, 230, 219, 247, 177, 114, 115, 251, 249,
- 183, 252, 253, 98, 143, 145, 254, 186, 259, 149,
- 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
- 160, 161, 162, 163, 164, 260, 165, 185, 261, 262,
- 239, 266, 168, 141, 221, 243, 83, 171, 172, 212,
- 175, 176, 245, 192, 178, 0, 0, 180, 181, 0,
- 204, 0, 0, 207, 208, 0, 187, 0, 0, 0,
- 0, 0, 0, 215, 0, 0, 0, 0, 218, 0,
- 200, 228, 0, 201, 0, 0, 0, 0, 238, 0,
- 0, 236, 190, 191, 0, 0, 241, 0, 242, 244,
- 0, 0, 0, 0, 0, 0, 0, 250, 103, 104,
- 0, 105, 106, 255, 206, 257, 0, 0, 256, 0,
- 110, 111, 112, 113, 214, 0, 0, 0, 114, 115,
- 267, 0, 268, 0, 0, 0, 0, 0, 265, 0,
- 0, 0, 98, -6, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 98, 2, 3, 4, 5, 0,
- 6, 7, 8, 9, 10, 11, 103, 104, 0, 105,
- 106, 12, 0, 13, 14, 15, 0, 0, 16, 0,
- 112, 113, 0, 17, 18, 19, 114, 115, 20, 0,
- 0, 0, 21, 22, 23, 24, 0, 0, 25, 0,
- 0, 0, 0, 0, 0, 0, 0, 26, 0, 0,
- 0, 0, 27, 0, 0, 0, 0, 28, 29, 0,
- 0, 0, -6, 30, 2, 3, 4, 5, 0, 6,
- 7, 8, 9, 10, 11, 0, 0, 0, 0, 0,
- 12, 0, 13, 14, 15, 0, 0, 16, 0, 0,
- 0, 0, 17, 18, 19, 0, 0, 20, 0, 0,
- 0, 21, 22, 23, 24, 0, 0, 25, 0, 0,
- 0, 0, 0, 0, 0, 0, 26, 0, 0, 0,
- 0, 27, 0, 0, 0, 0, 28, 29, 2, 3,
- 4, 5, 30, 6, 7, 8, 9, 49, 11, 0,
- 0, 0, 0, 0, 12, 0, 13, 14, 15, 0,
- 0, 0, 0, 0, 0, 0, 17, 18, 19, 0,
- 0, 20, 0, 0, 0, 0, 0, 23, 24, 0,
- 0, 25, 0, 0, 0, 0, 0, 0, 0, 0,
- 26, 0, 0, 0, 0, 27, 0, 0, 0, 0,
- 28, 29, 0, 0, 0, 47, 30, 2, 3, 4,
- 5, 0, 6, 7, 8, 9, 49, 11, 0, 0,
- 0, 0, 0, 12, 0, 13, 14, 15, 0, 0,
- 0, 0, 0, 0, 0, 17, 18, 19, 0, 0,
- 20, 0, 0, 0, 0, 0, 23, 24, 0, 0,
- 25, 0, 0, 0, 0, 0, 0, 0, 0, 26,
- 0, 0, 0, 0, 27, 0, 0, 0, 0, 28,
- 29, 2, 3, 4, 5, 30, 6, 7, 8, 9,
- 49, 11, 0, 0, 0, 0, 0, 12, 0, 13,
- 14, 0, 0, 0, 0, 0, 0, 0, 0, 17,
- 0, 19, 0, 0, 0, 0, 0, 0, 0, 0,
- 23, 24, 0, 0, 25, 0, 0, 0, 0, 0,
- 0, 0, 0, 26, 0, 0, 0, 0, 27, 0,
- 0, 0, 0, 28, 29, 2, 3, 4, 5, 30,
- 6, 0, 0, 0, 49, 11, 0, 0, 0, 0,
- 0, 0, 62, 0, 0, 0, 0, 63, 0, 64,
- 65, 66, 67, 50, 0, 19, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 2, 3, 4, 5,
- 0, 6, 0, 0, 0, 49, 11, 26, 0, 0,
- 0, 0, 27, 62, 0, 0, 0, 28, 29, 0,
- 64, 0, 66, 30, 50, 0, 19, 0, 0, 0,
- 0, 0, 0, 2, 3, 4, 5, 82, 6, 0,
- 0, 0, 49, 11, 0, 0, 0, 0, 26, 0,
- 0, 0, 0, 27, 0, 0, 0, 0, 28, 29,
- 0, 50, 0, 19, 30, 0, 0, 0, 0, 2,
- 3, 4, 5, 0, 6, 0, 0, 0, 49, 11,
- 0, 0, 0, 0, 0, 26, 0, 0, 0, 0,
- 27, 0, 0, 0, 0, 28, 29, 50, 0, 19,
- 0, 30, 0, 0, 0, 0, 126, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 26, 0, 0, 0, 0, 27, 0, 0, 100,
- 101, 28, 29, 0, 102, 103, 104, 96, 105, 106,
- 107, 108, 0, 0, 0, 173, 109, 110, 111, 112,
- 113, 0, 0, 0, 0, 114, 115, 100, 101, 0,
- 0, 0, 102, 103, 104, 0, 105, 106, 107, 108,
- 135, 0, 0, 174, 109, 110, 111, 112, 113, 0,
- 100, 101, 0, 114, 115, 102, 103, 104, 0, 105,
- 106, 107, 108, 0, 0, 0, 0, 109, 110, 111,
- 112, 113, 0, 100, 101, 0, 114, 115, 102, 103,
- 104, 0, 105, 106, 107, 108, 0, 138, 139, 0,
- 109, 110, 111, 112, 113, 0, 100, 101, 0, 114,
- 115, 102, 103, 104, 0, 105, 106, 107, 108, 0,
- 0, 0, 147, 109, 110, 111, 112, 113, 0, 100,
- 101, 140, 114, 115, 102, 103, 104, 0, 105, 106,
- 107, 108, 0, 0, 0, 0, 109, 110, 111, 112,
- 113, 0, 100, 101, 140, 114, 115, 102, 103, 104,
- 0, 105, 106, 107, 108, 0, 0, 0, 147, 109,
- 110, 111, 112, 113, 0, 100, 101, 0, 114, 115,
- 102, 103, 104, 0, 105, 106, 107, 108, 0, 0,
- 0, 0, 109, 110, 111, 112, 113, 0, -60, -60,
- 0, 114, 115, -60, -60, -60, 0, -60, -60, -60,
- -60, 0, 0, 0, 0, -60, 0, 0, -60, -60,
- 0, 0, 57, 0, -60, -60
+ 44, 69, 57, 253, 42, 51, 252, -53, 109, 95,
+ -53, 110, -10, 282, 274, 242, 152, 155, 124, 299,
+ 125, 250, 297, 279, 56, 56, 75, 177, 77, 179,
+ 299, 255, 290, 137, 283, 297, 139, 140, 141, 67,
+ 251, 111, 133, 134, 288, 289, 262, 280, 70, 292,
+ 71, 293, 153, 156, 201, 86, 87, 84, 85, 138,
+ 82, 302, 303, 146, 88, 309, 203, 89, 90, 61,
+ -53, 138, 62, 63, 65, 175, 138, 160, 230, 91,
+ 96, 79, 104, 231, 83, 105, 112, 325, 113, 324,
+ 92, 79, 68, 98, 99, 100, 101, 102, 103, 56,
+ -10, 106, 107, 108, 65, 263, 145, 151, 138, 142,
+ 138, 44, 157, 116, 117, 42, 51, 161, 173, 181,
+ 204, 207, 218, 232, 135, 234, 238, 267, 271, 136,
+ 287, 272, 65, 65, 65, 276, 282, 206, 143, 310,
+ 144, 121, 122, 315, 123, 124, 312, 125, 216, 316,
+ 317, 233, 154, 323, 284, 318, 176, 306, 94, 0,
+ 0, 0, 229, 131, 132, 0, 0, 0, 0, 133,
+ 134, 236, 0, 0, 0, 0, 0, 116, 178, 180,
+ 0, 0, 235, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
+ 248, 301, 0, 202, 0, 0, 0, 0, 0, 0,
+ 205, 0, 308, 0, 208, 209, 0, 210, 211, 0,
+ 214, 215, 266, 0, 217, 269, 270, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 0, 0, 0,
+ 256, 278, 0, 257, 0, 0, 0, 237, 0, 0,
+ 291, 0, 0, 0, 0, 0, 0, 300, 0, 281,
+ 0, 0, 0, 275, 0, 304, 305, 307, 0, 0,
+ 0, 0, 0, 298, 0, 0, 314, 240, 241, 0,
+ 0, 0, 319, 0, 321, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 65, 327, 0, 328,
+ 320, 0, 0, 0, 0, 0, 0, 0, 258, 259,
+ 260, 261, 0, 0, 0, 0, 268, -6, 1, 0,
+ 0, 0, 326, 0, 0, 0, 0, 0, 2, 3,
+ 4, 5, 277, 6, 7, 8, 9, 10, 11, 12,
+ 0, 13, 0, 0, 0, 0, 14, 0, 15, 16,
+ 17, 116, 0, 18, 0, 0, 0, 0, 19, 20,
+ 21, 0, 116, 22, 0, 0, 0, 23, 24, 25,
+ 26, 0, 0, 27, 0, 0, 0, 0, 0, 0,
+ 0, 0, 28, 0, 0, 0, 0, 0, 0, 29,
+ 30, 31, 32, 33, 0, 0, 34, 35, 0, 0,
+ 36, 37, 0, 0, 0, -6, 38, 0, 0, 0,
+ 39, 2, 3, 4, 5, 0, 6, 7, 8, 9,
+ 10, 11, 12, 0, 13, 0, 0, 0, 0, 14,
+ 0, 15, 16, 17, 0, 0, 18, 0, 0, 0,
+ 0, 19, 20, 21, 0, 0, 22, 0, 0, 0,
+ 23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
+ 0, 0, 0, 0, 0, 28, 0, 0, 0, 0,
+ 0, 0, 29, 30, 31, 32, 33, 0, 0, 34,
+ 35, 0, 0, 36, 37, 0, 0, 0, 0, 38,
+ 0, 0, 0, 39, 2, 3, 4, 5, 0, 6,
+ 7, 8, 9, 10, 58, 12, 0, 13, 313, 0,
+ 0, 0, 14, 0, 15, 16, 17, 0, 0, 0,
+ 0, 0, 0, 0, 19, 20, 21, 0, 0, 22,
+ 0, 0, 0, 0, 0, 25, 26, 0, 0, 27,
+ 0, 0, 0, 0, 0, 0, 0, 0, 28, 0,
+ 0, 0, 0, 0, 0, 29, 30, 31, 32, 33,
+ 0, 0, 0, 35, 0, 0, 36, 37, 0, 0,
+ 0, 56, 38, 0, 0, 0, 39, 2, 3, 4,
+ 5, 0, 6, 7, 8, 9, 10, 58, 12, 0,
+ 13, 0, 0, 0, 0, 14, 0, 15, 16, 17,
+ 0, 0, 0, 0, 0, 0, 0, 19, 20, 21,
+ 0, 0, 22, 0, 0, 0, 0, 0, 25, 26,
+ 0, 0, 27, 0, 0, 0, 0, 0, 0, 0,
+ 0, 28, 0, 0, 0, 0, 0, 0, 29, 30,
+ 31, 32, 33, 0, 0, 0, 35, 0, 0, 36,
+ 37, 0, 0, 0, 56, 38, 0, 0, 0, 39,
+ 2, 3, 4, 5, 0, 6, 7, 8, 9, 10,
+ 58, 12, 0, 13, 0, 0, 0, 0, 14, 0,
+ 15, 16, 17, 0, 0, 0, 0, 0, 0, 0,
+ 19, 20, 21, 0, 0, 22, 0, 0, 0, 0,
+ 0, 25, 26, 0, 0, 27, 0, 0, 0, 0,
+ 0, 0, 0, 0, 28, 0, 0, 0, 0, 0,
+ 0, 29, 30, 31, 32, 33, 0, 0, 0, 35,
+ 0, 0, 36, 37, 0, 0, 0, 0, 38, 0,
+ 0, 0, 39, 2, 3, 4, 5, 0, 6, 7,
+ 8, 9, 10, 58, 12, 0, 13, 0, 0, 0,
+ 0, 14, 0, 15, 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 19, 0, 21, 0, 0, 0, 0,
+ 0, 0, 0, 0, 25, 26, 0, 0, 27, 0,
+ 0, 0, 0, 0, 0, 0, 0, 28, 0, 0,
+ 0, 0, 0, 0, 29, 30, 31, 32, 33, 0,
+ 0, 0, 35, 0, 0, 36, 37, 2, 3, 4,
+ 5, 38, 6, 0, 0, 39, 0, 58, 12, 0,
+ 13, 121, 122, 0, 123, 124, 73, 125, 0, 0,
+ 0, 74, 0, 75, 76, 77, 78, 59, 0, 21,
+ 128, 129, 130, 131, 132, 0, 0, 0, 0, 133,
+ 134, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 28, 0, 0, 0, 0, 0, 0, 29, 30,
+ 31, 32, 33, 2, 3, 4, 5, 0, 6, 36,
+ 37, 0, 0, 58, 12, 38, 13, 0, 0, 39,
+ 0, 0, 73, 0, 0, 0, 0, 0, 0, 75,
+ 0, 77, 0, 59, 0, 21, 0, 0, 0, 2,
+ 3, 4, 5, 0, 6, 0, 93, 0, 0, 58,
+ 12, 0, 13, 0, 0, 0, 0, 28, 0, 0,
+ 0, 0, 0, 0, 29, 30, 31, 32, 33, 59,
+ 0, 21, 0, 0, 0, 36, 37, 2, 3, 4,
+ 5, 38, 6, 0, 0, 39, 0, 58, 12, 0,
+ 13, 0, 0, 28, 0, 0, 0, 0, 0, 0,
+ 29, 30, 31, 32, 33, 0, 0, 59, 0, 21,
+ 0, 36, 37, 2, 3, 4, 5, 38, 6, 0,
+ 0, 39, 0, 58, 12, 0, 13, 0, 0, 0,
+ 0, 28, 0, 0, 0, 0, 0, 0, 29, 30,
+ 31, 32, 33, 59, 0, 21, 0, 0, 0, 36,
+ 37, 0, 0, 0, 0, 64, 0, 0, 0, 39,
+ 0, 0, 0, 0, 148, 0, 0, 28, 0, 0,
+ 0, 0, 0, 0, 29, 30, 31, 32, 33, 0,
+ 0, 0, 0, 0, 0, 36, 37, 118, 119, 0,
+ 0, 114, 120, 121, 122, 39, 123, 149, 150, 125,
+ 126, 127, 0, 0, 0, 162, 0, 0, 0, 0,
+ 0, 163, 128, 129, 130, 131, 132, 0, 0, 0,
+ 0, 133, 134, 118, 119, 0, 0, 0, 120, 121,
+ 122, 0, 123, 124, 0, 125, 126, 127, 0, 0,
+ 0, 164, 0, 0, 0, 0, 0, 165, 128, 129,
+ 130, 131, 132, 0, 0, 0, 0, 133, 134, 118,
+ 119, 0, 0, 0, 120, 121, 122, 0, 123, 124,
+ 0, 125, 126, 127, 0, 0, 0, 166, 0, 0,
+ 0, 0, 0, 167, 128, 129, 130, 131, 132, 0,
+ 0, 0, 0, 133, 134, 118, 119, 0, 0, 0,
+ 120, 121, 122, 0, 123, 124, 0, 125, 126, 127,
+ 0, 0, 0, 168, 0, 0, 0, 0, 0, 169,
+ 128, 129, 130, 131, 132, 0, 0, 0, 0, 133,
+ 134, 118, 119, 0, 0, 0, 120, 121, 122, 0,
+ 123, 124, 0, 125, 126, 127, 0, 0, 0, 243,
+ 0, 0, 0, 0, 0, 0, 128, 129, 130, 131,
+ 132, 0, 0, 0, 0, 133, 134, 118, 119, 0,
+ 0, 0, 120, 121, 122, 0, 123, 124, 0, 125,
+ 126, 127, 0, 0, 0, 244, 0, 0, 0, 0,
+ 0, 0, 128, 129, 130, 131, 132, 0, 0, 0,
+ 0, 133, 134, 118, 119, 0, 0, 0, 120, 121,
+ 122, 0, 123, 124, 0, 125, 126, 127, 0, 0,
+ 0, 245, 0, 0, 0, 0, 0, 0, 128, 129,
+ 130, 131, 132, 0, 0, 0, 0, 133, 134, 118,
+ 119, 0, 0, 0, 120, 121, 122, 0, 123, 124,
+ 0, 125, 126, 127, 0, 0, 0, 246, 0, 0,
+ 0, 0, 0, 0, 128, 129, 130, 131, 132, 0,
+ 0, 0, 0, 133, 134, 118, 119, 0, 0, 0,
+ 120, 121, 122, 0, 123, 124, 0, 125, 126, 127,
+ 0, 0, 0, 0, 212, 0, 0, 0, 0, 0,
+ 128, 129, 130, 131, 132, 0, 118, 119, 0, 133,
+ 134, 120, 121, 122, 0, 123, 124, 0, 125, 126,
+ 127, 0, 0, 0, 0, 0, 0, 159, 0, 0,
+ 213, 128, 129, 130, 131, 132, 0, 118, 119, 0,
+ 133, 134, 120, 121, 122, 0, 123, 124, 0, 125,
+ 126, 127, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 128, 129, 130, 131, 132, 0, 118, 119,
+ 0, 133, 134, 120, 121, 122, 0, 123, 124, 0,
+ 125, 126, 127, 0, 0, 0, 0, 0, 170, 171,
+ 0, 0, 0, 128, 129, 130, 131, 132, 0, 118,
+ 119, 0, 133, 134, 120, 121, 122, 0, 123, 124,
+ 0, 125, 126, 127, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 182, 128, 129, 130, 131, 132, 0,
+ 118, 119, 174, 133, 134, 120, 121, 122, 0, 123,
+ 124, 0, 125, 126, 127, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 128, 129, 130, 131, 132,
+ 0, 118, 119, 174, 133, 134, 120, 121, 122, 0,
+ 123, 124, 0, 125, 126, 127, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 182, 128, 129, 130, 131,
+ 132, 0, 118, 119, 0, 133, 134, 120, 121, 122,
+ 0, 123, 124, 0, 125, 126, 127, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 128, 129, 130,
+ 131, 132, 0, -63, -63, 0, 133, 134, -63, -63,
+ -63, 0, -63, -63, 0, -63, -63, -63, 0, 121,
+ 122, 0, 123, 124, 0, 125, 0, 0, -63, 0,
+ 0, -63, -63, 0, 0, 68, 0, -63, -63, 129,
+ 130, 131, 132, 0, 0, 0, 0, 133, 134
};
static const yytype_int16 yycheck[] =
{
- 0, 10, 0, 0, 0, 0, 44, 186, 26, 27,
- 44, 27, 1, 24, 26, 218, 221, 24, 79, 13,
- 14, 79, 81, 66, 41, 84, 84, 21, 233, 232,
- 21, 94, 48, 96, 72, 21, 48, 44, 72, 82,
- 83, 21, 31, 4, 185, 21, 7, 8, 9, 36,
- 21, 38, 21, 14, 46, 47, 17, 236, 69, 80,
- 80, 79, 23, 24, 72, 26, 27, 28, 29, 30,
- 211, 212, 83, 36, 215, 21, 217, 256, 39, 40,
- 57, 58, 79, 79, 43, 84, 43, 228, 21, 50,
- 21, 84, 21, 93, 84, 93, 57, 58, 93, 81,
- 81, 62, 21, 64, 44, 21, 62, 63, 21, 65,
- 66, 84, 27, 254, 41, 76, 125, 73, 74, 75,
- 76, 77, 32, 26, 48, 134, 82, 83, 27, 43,
- 143, 27, 27, 94, 95, 96, 43, 146, 27, 100,
- 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
- 111, 112, 113, 114, 115, 41, 117, 146, 32, 32,
- 223, 41, 123, 93, 208, 232, 24, 128, 129, 201,
- 131, 132, 235, 177, 135, -1, -1, 138, 139, -1,
- 193, -1, -1, 196, 197, -1, 147, -1, -1, -1,
- -1, -1, -1, 206, -1, -1, -1, -1, 207, -1,
- 189, 214, -1, 192, -1, -1, -1, -1, 221, -1,
- -1, 220, 173, 174, -1, -1, 229, -1, 231, 232,
- -1, -1, -1, -1, -1, -1, -1, 240, 62, 63,
- -1, 65, 66, 246, 195, 248, -1, -1, 247, -1,
- 74, 75, 76, 77, 205, -1, -1, -1, 82, 83,
- 263, -1, 265, -1, -1, -1, -1, -1, 258, -1,
- -1, -1, 223, 0, 1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 235, 12, 13, 14, 15, -1,
- 17, 18, 19, 20, 21, 22, 62, 63, -1, 65,
- 66, 28, -1, 30, 31, 32, -1, -1, 35, -1,
- 76, 77, -1, 40, 41, 42, 82, 83, 45, -1,
- -1, -1, 49, 50, 51, 52, -1, -1, 55, -1,
- -1, -1, -1, -1, -1, -1, -1, 64, -1, -1,
- -1, -1, 69, -1, -1, -1, -1, 74, 75, -1,
- -1, -1, 79, 80, 12, 13, 14, 15, -1, 17,
- 18, 19, 20, 21, 22, -1, -1, -1, -1, -1,
- 28, -1, 30, 31, 32, -1, -1, 35, -1, -1,
- -1, -1, 40, 41, 42, -1, -1, 45, -1, -1,
- -1, 49, 50, 51, 52, -1, -1, 55, -1, -1,
- -1, -1, -1, -1, -1, -1, 64, -1, -1, -1,
- -1, 69, -1, -1, -1, -1, 74, 75, 12, 13,
- 14, 15, 80, 17, 18, 19, 20, 21, 22, -1,
- -1, -1, -1, -1, 28, -1, 30, 31, 32, -1,
- -1, -1, -1, -1, -1, -1, 40, 41, 42, -1,
- -1, 45, -1, -1, -1, -1, -1, 51, 52, -1,
- -1, 55, -1, -1, -1, -1, -1, -1, -1, -1,
- 64, -1, -1, -1, -1, 69, -1, -1, -1, -1,
- 74, 75, -1, -1, -1, 79, 80, 12, 13, 14,
- 15, -1, 17, 18, 19, 20, 21, 22, -1, -1,
- -1, -1, -1, 28, -1, 30, 31, 32, -1, -1,
- -1, -1, -1, -1, -1, 40, 41, 42, -1, -1,
- 45, -1, -1, -1, -1, -1, 51, 52, -1, -1,
- 55, -1, -1, -1, -1, -1, -1, -1, -1, 64,
- -1, -1, -1, -1, 69, -1, -1, -1, -1, 74,
- 75, 12, 13, 14, 15, 80, 17, 18, 19, 20,
- 21, 22, -1, -1, -1, -1, -1, 28, -1, 30,
- 31, -1, -1, -1, -1, -1, -1, -1, -1, 40,
- -1, 42, -1, -1, -1, -1, -1, -1, -1, -1,
- 51, 52, -1, -1, 55, -1, -1, -1, -1, -1,
- -1, -1, -1, 64, -1, -1, -1, -1, 69, -1,
- -1, -1, -1, 74, 75, 12, 13, 14, 15, 80,
- 17, -1, -1, -1, 21, 22, -1, -1, -1, -1,
- -1, -1, 29, -1, -1, -1, -1, 34, -1, 36,
- 37, 38, 39, 40, -1, 42, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 12, 13, 14, 15,
- -1, 17, -1, -1, -1, 21, 22, 64, -1, -1,
- -1, -1, 69, 29, -1, -1, -1, 74, 75, -1,
- 36, -1, 38, 80, 40, -1, 42, -1, -1, -1,
- -1, -1, -1, 12, 13, 14, 15, 53, 17, -1,
- -1, -1, 21, 22, -1, -1, -1, -1, 64, -1,
- -1, -1, -1, 69, -1, -1, -1, -1, 74, 75,
- -1, 40, -1, 42, 80, -1, -1, -1, -1, 12,
- 13, 14, 15, -1, 17, -1, -1, -1, 21, 22,
- -1, -1, -1, -1, -1, 64, -1, -1, -1, -1,
- 69, -1, -1, -1, -1, 74, 75, 40, -1, 42,
- -1, 80, -1, -1, -1, -1, 33, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 64, -1, -1, -1, -1, 69, -1, -1, 56,
- 57, 74, 75, -1, 61, 62, 63, 80, 65, 66,
- 67, 68, -1, -1, -1, 44, 73, 74, 75, 76,
- 77, -1, -1, -1, -1, 82, 83, 56, 57, -1,
- -1, -1, 61, 62, 63, -1, 65, 66, 67, 68,
- 46, -1, -1, 72, 73, 74, 75, 76, 77, -1,
- 56, 57, -1, 82, 83, 61, 62, 63, -1, 65,
- 66, 67, 68, -1, -1, -1, -1, 73, 74, 75,
- 76, 77, -1, 56, 57, -1, 82, 83, 61, 62,
- 63, -1, 65, 66, 67, 68, -1, 70, 71, -1,
- 73, 74, 75, 76, 77, -1, 56, 57, -1, 82,
- 83, 61, 62, 63, -1, 65, 66, 67, 68, -1,
- -1, -1, 72, 73, 74, 75, 76, 77, -1, 56,
- 57, 81, 82, 83, 61, 62, 63, -1, 65, 66,
- 67, 68, -1, -1, -1, -1, 73, 74, 75, 76,
- 77, -1, 56, 57, 81, 82, 83, 61, 62, 63,
- -1, 65, 66, 67, 68, -1, -1, -1, 72, 73,
- 74, 75, 76, 77, -1, 56, 57, -1, 82, 83,
- 61, 62, 63, -1, 65, 66, 67, 68, -1, -1,
- -1, -1, 73, 74, 75, 76, 77, -1, 56, 57,
- -1, 82, 83, 61, 62, 63, -1, 65, 66, 67,
- 68, -1, -1, -1, -1, 73, -1, -1, 76, 77,
- -1, -1, 80, -1, 82, 83
+ 0, 11, 1, 236, 0, 0, 235, 25, 39, 26,
+ 28, 0, 0, 28, 257, 216, 45, 45, 67, 284,
+ 69, 26, 281, 25, 88, 88, 37, 112, 39, 114,
+ 295, 95, 275, 64, 49, 294, 67, 68, 69, 21,
+ 45, 40, 91, 92, 273, 274, 247, 49, 42, 278,
+ 21, 280, 81, 81, 90, 12, 13, 47, 48, 95,
+ 21, 290, 291, 80, 21, 298, 90, 21, 21, 4,
+ 88, 95, 7, 8, 9, 94, 95, 94, 90, 21,
+ 21, 16, 21, 95, 19, 89, 89, 320, 81, 318,
+ 25, 26, 89, 28, 29, 30, 31, 32, 33, 88,
+ 88, 36, 37, 38, 39, 90, 37, 21, 95, 95,
+ 95, 111, 44, 48, 49, 111, 111, 95, 21, 44,
+ 21, 21, 21, 90, 59, 90, 21, 45, 21, 64,
+ 21, 95, 67, 68, 69, 25, 28, 147, 73, 49,
+ 75, 63, 64, 25, 66, 67, 44, 69, 158, 25,
+ 25, 178, 87, 25, 270, 44, 111, 294, 26, -1,
+ -1, -1, 172, 85, 86, -1, -1, -1, -1, 91,
+ 92, 181, -1, -1, -1, -1, -1, 112, 113, 114,
+ -1, -1, 181, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 231, 286, -1, 138, -1, -1, -1, -1, -1, -1,
+ 145, -1, 297, -1, 149, 150, -1, 152, 153, -1,
+ 155, 156, 249, -1, 159, 252, 253, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 171, -1, -1, -1,
+ 239, 268, -1, 242, -1, -1, -1, 182, -1, -1,
+ 277, -1, -1, -1, -1, -1, -1, 284, -1, 269,
+ -1, -1, -1, 262, -1, 292, 293, 294, -1, -1,
+ -1, -1, -1, 283, -1, -1, 303, 212, 213, -1,
+ -1, -1, 309, -1, 311, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 231, 324, -1, 326,
+ 310, -1, -1, -1, -1, -1, -1, -1, 243, 244,
+ 245, 246, -1, -1, -1, -1, 251, 0, 1, -1,
+ -1, -1, 322, -1, -1, -1, -1, -1, 11, 12,
+ 13, 14, 267, 16, 17, 18, 19, 20, 21, 22,
+ -1, 24, -1, -1, -1, -1, 29, -1, 31, 32,
+ 33, 286, -1, 36, -1, -1, -1, -1, 41, 42,
+ 43, -1, 297, 46, -1, -1, -1, 50, 51, 52,
+ 53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
+ -1, -1, 65, -1, -1, -1, -1, -1, -1, 72,
+ 73, 74, 75, 76, -1, -1, 79, 80, -1, -1,
+ 83, 84, -1, -1, -1, 88, 89, -1, -1, -1,
+ 93, 11, 12, 13, 14, -1, 16, 17, 18, 19,
+ 20, 21, 22, -1, 24, -1, -1, -1, -1, 29,
+ -1, 31, 32, 33, -1, -1, 36, -1, -1, -1,
+ -1, 41, 42, 43, -1, -1, 46, -1, -1, -1,
+ 50, 51, 52, 53, -1, -1, 56, -1, -1, -1,
+ -1, -1, -1, -1, -1, 65, -1, -1, -1, -1,
+ -1, -1, 72, 73, 74, 75, 76, -1, -1, 79,
+ 80, -1, -1, 83, 84, -1, -1, -1, -1, 89,
+ -1, -1, -1, 93, 11, 12, 13, 14, -1, 16,
+ 17, 18, 19, 20, 21, 22, -1, 24, 25, -1,
+ -1, -1, 29, -1, 31, 32, 33, -1, -1, -1,
+ -1, -1, -1, -1, 41, 42, 43, -1, -1, 46,
+ -1, -1, -1, -1, -1, 52, 53, -1, -1, 56,
+ -1, -1, -1, -1, -1, -1, -1, -1, 65, -1,
+ -1, -1, -1, -1, -1, 72, 73, 74, 75, 76,
+ -1, -1, -1, 80, -1, -1, 83, 84, -1, -1,
+ -1, 88, 89, -1, -1, -1, 93, 11, 12, 13,
+ 14, -1, 16, 17, 18, 19, 20, 21, 22, -1,
+ 24, -1, -1, -1, -1, 29, -1, 31, 32, 33,
+ -1, -1, -1, -1, -1, -1, -1, 41, 42, 43,
+ -1, -1, 46, -1, -1, -1, -1, -1, 52, 53,
+ -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
+ -1, 65, -1, -1, -1, -1, -1, -1, 72, 73,
+ 74, 75, 76, -1, -1, -1, 80, -1, -1, 83,
+ 84, -1, -1, -1, 88, 89, -1, -1, -1, 93,
+ 11, 12, 13, 14, -1, 16, 17, 18, 19, 20,
+ 21, 22, -1, 24, -1, -1, -1, -1, 29, -1,
+ 31, 32, 33, -1, -1, -1, -1, -1, -1, -1,
+ 41, 42, 43, -1, -1, 46, -1, -1, -1, -1,
+ -1, 52, 53, -1, -1, 56, -1, -1, -1, -1,
+ -1, -1, -1, -1, 65, -1, -1, -1, -1, -1,
+ -1, 72, 73, 74, 75, 76, -1, -1, -1, 80,
+ -1, -1, 83, 84, -1, -1, -1, -1, 89, -1,
+ -1, -1, 93, 11, 12, 13, 14, -1, 16, 17,
+ 18, 19, 20, 21, 22, -1, 24, -1, -1, -1,
+ -1, 29, -1, 31, 32, -1, -1, -1, -1, -1,
+ -1, -1, -1, 41, -1, 43, -1, -1, -1, -1,
+ -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
+ -1, -1, -1, -1, -1, -1, -1, 65, -1, -1,
+ -1, -1, -1, -1, 72, 73, 74, 75, 76, -1,
+ -1, -1, 80, -1, -1, 83, 84, 11, 12, 13,
+ 14, 89, 16, -1, -1, 93, -1, 21, 22, -1,
+ 24, 63, 64, -1, 66, 67, 30, 69, -1, -1,
+ -1, 35, -1, 37, 38, 39, 40, 41, -1, 43,
+ 82, 83, 84, 85, 86, -1, -1, -1, -1, 91,
+ 92, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 65, -1, -1, -1, -1, -1, -1, 72, 73,
+ 74, 75, 76, 11, 12, 13, 14, -1, 16, 83,
+ 84, -1, -1, 21, 22, 89, 24, -1, -1, 93,
+ -1, -1, 30, -1, -1, -1, -1, -1, -1, 37,
+ -1, 39, -1, 41, -1, 43, -1, -1, -1, 11,
+ 12, 13, 14, -1, 16, -1, 54, -1, -1, 21,
+ 22, -1, 24, -1, -1, -1, -1, 65, -1, -1,
+ -1, -1, -1, -1, 72, 73, 74, 75, 76, 41,
+ -1, 43, -1, -1, -1, 83, 84, 11, 12, 13,
+ 14, 89, 16, -1, -1, 93, -1, 21, 22, -1,
+ 24, -1, -1, 65, -1, -1, -1, -1, -1, -1,
+ 72, 73, 74, 75, 76, -1, -1, 41, -1, 43,
+ -1, 83, 84, 11, 12, 13, 14, 89, 16, -1,
+ -1, 93, -1, 21, 22, -1, 24, -1, -1, -1,
+ -1, 65, -1, -1, -1, -1, -1, -1, 72, 73,
+ 74, 75, 76, 41, -1, 43, -1, -1, -1, 83,
+ 84, -1, -1, -1, -1, 89, -1, -1, -1, 93,
+ -1, -1, -1, -1, 34, -1, -1, 65, -1, -1,
+ -1, -1, -1, -1, 72, 73, 74, 75, 76, -1,
+ -1, -1, -1, -1, -1, 83, 84, 57, 58, -1,
+ -1, 89, 62, 63, 64, 93, 66, 67, 68, 69,
+ 70, 71, -1, -1, -1, 39, -1, -1, -1, -1,
+ -1, 45, 82, 83, 84, 85, 86, -1, -1, -1,
+ -1, 91, 92, 57, 58, -1, -1, -1, 62, 63,
+ 64, -1, 66, 67, -1, 69, 70, 71, -1, -1,
+ -1, 39, -1, -1, -1, -1, -1, 45, 82, 83,
+ 84, 85, 86, -1, -1, -1, -1, 91, 92, 57,
+ 58, -1, -1, -1, 62, 63, 64, -1, 66, 67,
+ -1, 69, 70, 71, -1, -1, -1, 39, -1, -1,
+ -1, -1, -1, 45, 82, 83, 84, 85, 86, -1,
+ -1, -1, -1, 91, 92, 57, 58, -1, -1, -1,
+ 62, 63, 64, -1, 66, 67, -1, 69, 70, 71,
+ -1, -1, -1, 39, -1, -1, -1, -1, -1, 45,
+ 82, 83, 84, 85, 86, -1, -1, -1, -1, 91,
+ 92, 57, 58, -1, -1, -1, 62, 63, 64, -1,
+ 66, 67, -1, 69, 70, 71, -1, -1, -1, 39,
+ -1, -1, -1, -1, -1, -1, 82, 83, 84, 85,
+ 86, -1, -1, -1, -1, 91, 92, 57, 58, -1,
+ -1, -1, 62, 63, 64, -1, 66, 67, -1, 69,
+ 70, 71, -1, -1, -1, 39, -1, -1, -1, -1,
+ -1, -1, 82, 83, 84, 85, 86, -1, -1, -1,
+ -1, 91, 92, 57, 58, -1, -1, -1, 62, 63,
+ 64, -1, 66, 67, -1, 69, 70, 71, -1, -1,
+ -1, 39, -1, -1, -1, -1, -1, -1, 82, 83,
+ 84, 85, 86, -1, -1, -1, -1, 91, 92, 57,
+ 58, -1, -1, -1, 62, 63, 64, -1, 66, 67,
+ -1, 69, 70, 71, -1, -1, -1, 39, -1, -1,
+ -1, -1, -1, -1, 82, 83, 84, 85, 86, -1,
+ -1, -1, -1, 91, 92, 57, 58, -1, -1, -1,
+ 62, 63, 64, -1, 66, 67, -1, 69, 70, 71,
+ -1, -1, -1, -1, 45, -1, -1, -1, -1, -1,
+ 82, 83, 84, 85, 86, -1, 57, 58, -1, 91,
+ 92, 62, 63, 64, -1, 66, 67, -1, 69, 70,
+ 71, -1, -1, -1, -1, -1, -1, 47, -1, -1,
+ 81, 82, 83, 84, 85, 86, -1, 57, 58, -1,
+ 91, 92, 62, 63, 64, -1, 66, 67, -1, 69,
+ 70, 71, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 82, 83, 84, 85, 86, -1, 57, 58,
+ -1, 91, 92, 62, 63, 64, -1, 66, 67, -1,
+ 69, 70, 71, -1, -1, -1, -1, -1, 77, 78,
+ -1, -1, -1, 82, 83, 84, 85, 86, -1, 57,
+ 58, -1, 91, 92, 62, 63, 64, -1, 66, 67,
+ -1, 69, 70, 71, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 81, 82, 83, 84, 85, 86, -1,
+ 57, 58, 90, 91, 92, 62, 63, 64, -1, 66,
+ 67, -1, 69, 70, 71, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 82, 83, 84, 85, 86,
+ -1, 57, 58, 90, 91, 92, 62, 63, 64, -1,
+ 66, 67, -1, 69, 70, 71, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 81, 82, 83, 84, 85,
+ 86, -1, 57, 58, -1, 91, 92, 62, 63, 64,
+ -1, 66, 67, -1, 69, 70, 71, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 82, 83, 84,
+ 85, 86, -1, 57, 58, -1, 91, 92, 62, 63,
+ 64, -1, 66, 67, -1, 69, 70, 71, -1, 63,
+ 64, -1, 66, 67, -1, 69, -1, -1, 82, -1,
+ -1, 85, 86, -1, -1, 89, -1, 91, 92, 83,
+ 84, 85, 86, -1, -1, -1, -1, 91, 92
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 1, 12, 13, 14, 15, 17, 18, 19, 20,
- 21, 22, 28, 30, 31, 32, 35, 40, 41, 42,
- 45, 49, 50, 51, 52, 55, 64, 69, 74, 75,
- 80, 86, 88, 89, 90, 91, 92, 99, 100, 101,
- 106, 107, 108, 111, 114, 115, 120, 79, 87, 21,
- 40, 89, 107, 107, 107, 107, 121, 80, 103, 41,
- 21, 109, 29, 34, 36, 37, 38, 39, 107, 112,
- 113, 21, 107, 46, 47, 13, 14, 21, 21, 21,
- 21, 107, 53, 112, 113, 21, 110, 107, 107, 107,
- 107, 107, 0, 87, 80, 72, 80, 98, 107, 107,
- 56, 57, 61, 62, 63, 65, 66, 67, 68, 73,
- 74, 75, 76, 77, 82, 83, 107, 84, 121, 121,
- 84, 107, 107, 36, 113, 116, 33, 21, 44, 72,
- 107, 44, 72, 43, 117, 46, 113, 84, 70, 71,
- 81, 88, 98, 107, 98, 107, 43, 72, 104, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 81, 21, 107, 103,
- 21, 107, 107, 44, 72, 107, 107, 103, 107, 21,
- 107, 107, 81, 104, 81, 87, 103, 107, 21, 118,
- 107, 107, 118, 105, 24, 44, 105, 90, 108, 84,
- 87, 87, 87, 91, 104, 44, 107, 104, 104, 21,
- 84, 119, 119, 27, 107, 104, 27, 48, 103, 26,
- 48, 95, 96, 102, 21, 105, 105, 41, 104, 105,
- 32, 105, 94, 95, 97, 102, 103, 96, 104, 98,
- 105, 104, 104, 97, 104, 98, 90, 48, 93, 43,
- 104, 27, 27, 27, 43, 104, 103, 104, 103, 27,
- 41, 32, 32, 105, 90, 91, 41, 104, 104
+ 0, 1, 11, 12, 13, 14, 16, 17, 18, 19,
+ 20, 21, 22, 24, 29, 31, 32, 33, 36, 41,
+ 42, 43, 46, 50, 51, 52, 53, 56, 65, 72,
+ 73, 74, 75, 76, 79, 80, 83, 84, 89, 93,
+ 97, 99, 100, 101, 102, 103, 110, 111, 112, 117,
+ 118, 119, 122, 125, 126, 133, 88, 98, 21, 41,
+ 100, 118, 118, 118, 89, 118, 134, 21, 89, 114,
+ 42, 21, 120, 30, 35, 37, 38, 39, 40, 118,
+ 123, 124, 21, 118, 47, 48, 12, 13, 21, 21,
+ 21, 21, 118, 54, 123, 124, 21, 121, 118, 118,
+ 118, 118, 118, 118, 21, 89, 118, 118, 118, 134,
+ 0, 98, 89, 81, 89, 109, 118, 118, 57, 58,
+ 62, 63, 64, 66, 67, 69, 70, 71, 82, 83,
+ 84, 85, 86, 91, 92, 118, 118, 134, 95, 134,
+ 134, 134, 95, 118, 118, 37, 124, 127, 34, 67,
+ 68, 21, 45, 81, 118, 45, 81, 44, 128, 47,
+ 124, 95, 39, 45, 39, 45, 39, 45, 39, 45,
+ 77, 78, 129, 21, 90, 94, 99, 109, 118, 109,
+ 118, 44, 81, 115, 118, 118, 118, 118, 118, 118,
+ 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
+ 118, 90, 118, 90, 21, 118, 114, 21, 118, 118,
+ 118, 118, 45, 81, 118, 118, 114, 118, 21, 118,
+ 118, 118, 118, 118, 118, 118, 118, 118, 118, 114,
+ 90, 95, 90, 115, 90, 98, 114, 118, 21, 131,
+ 118, 118, 131, 39, 39, 39, 39, 130, 134, 116,
+ 26, 45, 116, 101, 119, 95, 98, 98, 118, 118,
+ 118, 118, 131, 90, 98, 102, 115, 45, 118, 115,
+ 115, 21, 95, 132, 132, 98, 25, 118, 115, 25,
+ 49, 114, 28, 49, 106, 107, 113, 21, 116, 116,
+ 132, 115, 116, 116, 105, 106, 108, 113, 114, 107,
+ 115, 109, 116, 116, 115, 115, 108, 115, 109, 101,
+ 49, 104, 44, 25, 115, 25, 25, 25, 44, 115,
+ 114, 115, 114, 25, 116, 101, 102, 115, 115
};
#define yyerrok (yyerrstatus = 0)
@@ -1624,7 +1820,7 @@ yyparse ()
#endif
#endif
{
-
+
int yystate;
int yyn;
int yyresult;
@@ -1869,12 +2065,12 @@ yyreduce:
switch (yyn)
{
case 4:
-#line 107 "engines/director/lingo/lingo-gr.y"
+#line 119 "engines/director/lingo/lingo-gr.y"
{ yyerrok; ;}
break;
case 5:
-#line 110 "engines/director/lingo/lingo-gr.y"
+#line 122 "engines/director/lingo/lingo-gr.y"
{
g_lingo->_linenumber++;
g_lingo->_colnumber = 1;
@@ -1882,12 +2078,12 @@ yyreduce:
break;
case 10:
-#line 119 "engines/director/lingo/lingo-gr.y"
+#line 131 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_xpop); ;}
break;
case 12:
-#line 123 "engines/director/lingo/lingo-gr.y"
+#line 135 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_varpush);
g_lingo->codeString((yyvsp[(4) - (4)].s)->c_str());
@@ -1897,7 +2093,17 @@ yyreduce:
break;
case 13:
-#line 129 "engines/director/lingo/lingo-gr.y"
+#line 141 "engines/director/lingo/lingo-gr.y"
+ { (yyval.code) = g_lingo->code1(g_lingo->c_after); ;}
+ break;
+
+ case 14:
+#line 142 "engines/director/lingo/lingo-gr.y"
+ { (yyval.code) = g_lingo->code1(g_lingo->c_before); ;}
+ break;
+
+ case 15:
+#line 143 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_varpush);
g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str());
@@ -1906,8 +2112,8 @@ yyreduce:
delete (yyvsp[(2) - (4)].s); ;}
break;
- case 14:
-#line 135 "engines/director/lingo/lingo-gr.y"
+ case 16:
+#line 149 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(0); // Put dummy id
g_lingo->code1(g_lingo->c_theentityassign);
@@ -1918,8 +2124,8 @@ yyreduce:
(yyval.code) = (yyvsp[(4) - (4)].code); ;}
break;
- case 15:
-#line 143 "engines/director/lingo/lingo-gr.y"
+ case 17:
+#line 157 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_swap);
g_lingo->code1(g_lingo->c_theentityassign);
@@ -1930,8 +2136,8 @@ yyreduce:
(yyval.code) = (yyvsp[(5) - (5)].code); ;}
break;
- case 16:
-#line 151 "engines/director/lingo/lingo-gr.y"
+ case 18:
+#line 165 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_varpush);
g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str());
@@ -1940,8 +2146,8 @@ yyreduce:
delete (yyvsp[(2) - (4)].s); ;}
break;
- case 17:
-#line 157 "engines/director/lingo/lingo-gr.y"
+ case 19:
+#line 171 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(0); // Put dummy id
g_lingo->code1(g_lingo->c_theentityassign);
@@ -1952,8 +2158,8 @@ yyreduce:
(yyval.code) = (yyvsp[(4) - (4)].code); ;}
break;
- case 18:
-#line 165 "engines/director/lingo/lingo-gr.y"
+ case 20:
+#line 179 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_swap);
g_lingo->code1(g_lingo->c_theentityassign);
@@ -1964,55 +2170,61 @@ yyreduce:
(yyval.code) = (yyvsp[(5) - (5)].code); ;}
break;
- case 19:
-#line 174 "engines/director/lingo/lingo-gr.y"
+ case 21:
+#line 188 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_xpop); ;}
break;
- case 23:
-#line 183 "engines/director/lingo/lingo-gr.y"
+ case 25:
+#line 197 "engines/director/lingo/lingo-gr.y"
{
inst body = 0, end = 0;
- WRITE_UINT32(&body, (yyvsp[(5) - (8)].code));
- WRITE_UINT32(&end, (yyvsp[(6) - (8)].code));
- (*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 1] = body; /* body of loop */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 2] = end; ;}
+ WRITE_UINT32(&body, (yyvsp[(5) - (7)].code));
+ WRITE_UINT32(&end, (yyvsp[(6) - (7)].code));
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (7)].code) + 1] = body; /* body of loop */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (7)].code) + 2] = end; /* end, if cond fails */
+
+ checkEnd((yyvsp[(7) - (7)].s), "repeat", true); ;}
break;
- case 24:
-#line 194 "engines/director/lingo/lingo-gr.y"
+ case 26:
+#line 210 "engines/director/lingo/lingo-gr.y"
{
inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
- WRITE_UINT32(&init, (yyvsp[(3) - (11)].code));
- WRITE_UINT32(&finish, (yyvsp[(6) - (11)].code));
- WRITE_UINT32(&body, (yyvsp[(8) - (11)].code));
- WRITE_UINT32(&end, (yyvsp[(9) - (11)].code));
+ WRITE_UINT32(&init, (yyvsp[(3) - (10)].code));
+ WRITE_UINT32(&finish, (yyvsp[(6) - (10)].code));
+ WRITE_UINT32(&body, (yyvsp[(8) - (10)].code));
+ WRITE_UINT32(&end, (yyvsp[(9) - (10)].code));
WRITE_UINT32(&inc, 1);
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 1] = init; /* initial count value */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 2] = finish;/* final count value */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 3] = body; /* body of loop */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 4] = inc; /* increment */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 5] = end; ;}
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 1] = init; /* initial count value */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 2] = finish;/* final count value */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 3] = body; /* body of loop */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 4] = inc; /* increment */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 5] = end; /* end, if cond fails */
+
+ checkEnd((yyvsp[(10) - (10)].s), "repeat", true); ;}
break;
- case 25:
-#line 210 "engines/director/lingo/lingo-gr.y"
+ case 27:
+#line 228 "engines/director/lingo/lingo-gr.y"
{
inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
- WRITE_UINT32(&init, (yyvsp[(3) - (12)].code));
- WRITE_UINT32(&finish, (yyvsp[(7) - (12)].code));
- WRITE_UINT32(&body, (yyvsp[(9) - (12)].code));
- WRITE_UINT32(&end, (yyvsp[(10) - (12)].code));
+ WRITE_UINT32(&init, (yyvsp[(3) - (11)].code));
+ WRITE_UINT32(&finish, (yyvsp[(7) - (11)].code));
+ WRITE_UINT32(&body, (yyvsp[(9) - (11)].code));
+ WRITE_UINT32(&end, (yyvsp[(10) - (11)].code));
WRITE_UINT32(&inc, -1);
- (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 1] = init; /* initial count value */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 2] = finish;/* final count value */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 3] = body; /* body of loop */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 4] = inc; /* increment */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 5] = end; ;}
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 1] = init; /* initial count value */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 2] = finish;/* final count value */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 3] = body; /* body of loop */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 4] = inc; /* increment */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 5] = end; /* end, if cond fails */
+
+ checkEnd((yyvsp[(11) - (11)].s), "repeat", true); ;}
break;
- case 26:
-#line 222 "engines/director/lingo/lingo-gr.y"
+ case 28:
+#line 242 "engines/director/lingo/lingo-gr.y"
{
inst end = 0;
WRITE_UINT32(&end, (yyvsp[(3) - (3)].code));
@@ -2021,45 +2233,54 @@ yyreduce:
;}
break;
- case 27:
-#line 230 "engines/director/lingo/lingo-gr.y"
+ case 29:
+#line 250 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, end = 0;
- WRITE_UINT32(&then, (yyvsp[(5) - (8)].code));
- WRITE_UINT32(&end, (yyvsp[(6) - (8)].code));
- (*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 1] = then; /* thenpart */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 3] = end; /* end, if cond fails */
+ WRITE_UINT32(&then, (yyvsp[(5) - (7)].code));
+ WRITE_UINT32(&end, (yyvsp[(6) - (7)].code));
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (7)].code) + 1] = then; /* thenpart */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (7)].code) + 3] = end; /* end, if cond fails */
+
+ checkEnd((yyvsp[(7) - (7)].s), "if", true);
+
g_lingo->processIf(0, 0); ;}
break;
- case 28:
-#line 237 "engines/director/lingo/lingo-gr.y"
+ case 30:
+#line 260 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
- WRITE_UINT32(&then, (yyvsp[(5) - (11)].code));
- WRITE_UINT32(&else1, (yyvsp[(8) - (11)].code));
- WRITE_UINT32(&end, (yyvsp[(9) - (11)].code));
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 1] = then; /* thenpart */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 2] = else1; /* elsepart */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 3] = end; /* end, if cond fails */
+ WRITE_UINT32(&then, (yyvsp[(5) - (10)].code));
+ WRITE_UINT32(&else1, (yyvsp[(8) - (10)].code));
+ WRITE_UINT32(&end, (yyvsp[(9) - (10)].code));
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 1] = then; /* thenpart */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 2] = else1; /* elsepart */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 3] = end; /* end, if cond fails */
+
+ checkEnd((yyvsp[(10) - (10)].s), "if", true);
+
g_lingo->processIf(0, 0); ;}
break;
- case 29:
-#line 246 "engines/director/lingo/lingo-gr.y"
+ case 31:
+#line 272 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
- WRITE_UINT32(&then, (yyvsp[(5) - (11)].code));
- WRITE_UINT32(&else1, (yyvsp[(7) - (11)].code));
- WRITE_UINT32(&end, (yyvsp[(9) - (11)].code));
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 1] = then; /* thenpart */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 2] = else1; /* elsepart */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 3] = end; /* end, if cond fails */
- g_lingo->processIf(0, (yyvsp[(9) - (11)].code)); ;}
+ WRITE_UINT32(&then, (yyvsp[(5) - (10)].code));
+ WRITE_UINT32(&else1, (yyvsp[(7) - (10)].code));
+ WRITE_UINT32(&end, (yyvsp[(9) - (10)].code));
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 1] = then; /* thenpart */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 2] = else1; /* elsepart */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 3] = end; /* end, if cond fails */
+
+ checkEnd((yyvsp[(10) - (10)].s), "if", true);
+
+ g_lingo->processIf(0, (yyvsp[(9) - (10)].code)); ;}
break;
- case 30:
-#line 255 "engines/director/lingo/lingo-gr.y"
+ case 32:
+#line 284 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (6)].code));
@@ -2072,8 +2293,8 @@ yyreduce:
g_lingo->processIf(0, 0); ;}
break;
- case 31:
-#line 265 "engines/director/lingo/lingo-gr.y"
+ case 33:
+#line 294 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (10)].code));
@@ -2086,8 +2307,8 @@ yyreduce:
g_lingo->processIf(0, 0); ;}
break;
- case 32:
-#line 275 "engines/director/lingo/lingo-gr.y"
+ case 34:
+#line 304 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (10)].code));
@@ -2100,18 +2321,18 @@ yyreduce:
g_lingo->processIf(0, (yyvsp[(10) - (10)].code)); ;}
break;
- case 33:
-#line 286 "engines/director/lingo/lingo-gr.y"
+ case 35:
+#line 315 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = 0; ;}
break;
- case 34:
-#line 287 "engines/director/lingo/lingo-gr.y"
+ case 36:
+#line 316 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (3)].code); ;}
break;
- case 39:
-#line 298 "engines/director/lingo/lingo-gr.y"
+ case 41:
+#line 327 "engines/director/lingo/lingo-gr.y"
{
inst then = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (6)].code));
@@ -2120,8 +2341,8 @@ yyreduce:
g_lingo->codeLabel((yyvsp[(1) - (6)].code)); ;}
break;
- case 41:
-#line 307 "engines/director/lingo/lingo-gr.y"
+ case 43:
+#line 336 "engines/director/lingo/lingo-gr.y"
{
inst then = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (5)].code));
@@ -2130,23 +2351,23 @@ yyreduce:
g_lingo->codeLabel((yyvsp[(1) - (5)].code)); ;}
break;
- case 42:
-#line 315 "engines/director/lingo/lingo-gr.y"
+ case 44:
+#line 344 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(STOP); ;}
break;
- case 43:
-#line 316 "engines/director/lingo/lingo-gr.y"
+ case 45:
+#line 345 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code2(g_lingo->c_eq, STOP); ;}
break;
- case 45:
-#line 319 "engines/director/lingo/lingo-gr.y"
+ case 47:
+#line 348 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->code3(g_lingo->c_repeatwhilecode, STOP, STOP); ;}
break;
- case 46:
-#line 321 "engines/director/lingo/lingo-gr.y"
+ case 48:
+#line 350 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code3(g_lingo->c_repeatwithcode, STOP, STOP);
g_lingo->code3(STOP, STOP, STOP);
@@ -2154,8 +2375,8 @@ yyreduce:
delete (yyvsp[(3) - (3)].s); ;}
break;
- case 47:
-#line 327 "engines/director/lingo/lingo-gr.y"
+ case 49:
+#line 356 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_ifcode);
g_lingo->code3(STOP, STOP, STOP);
@@ -2163,8 +2384,8 @@ yyreduce:
g_lingo->codeLabel(0); ;}
break;
- case 48:
-#line 333 "engines/director/lingo/lingo-gr.y"
+ case 50:
+#line 362 "engines/director/lingo/lingo-gr.y"
{
inst skipEnd;
WRITE_UINT32(&skipEnd, 1); // We have to skip end to avoid multiple executions
@@ -2173,23 +2394,23 @@ yyreduce:
g_lingo->code1(skipEnd); ;}
break;
- case 49:
-#line 340 "engines/director/lingo/lingo-gr.y"
+ case 51:
+#line 369 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
- case 50:
-#line 342 "engines/director/lingo/lingo-gr.y"
+ case 52:
+#line 371 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(STOP); (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
- case 51:
-#line 344 "engines/director/lingo/lingo-gr.y"
+ case 53:
+#line 373 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
- case 54:
-#line 349 "engines/director/lingo/lingo-gr.y"
+ case 56:
+#line 378 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_whencode);
g_lingo->code1(STOP);
@@ -2197,49 +2418,56 @@ yyreduce:
delete (yyvsp[(2) - (3)].s); ;}
break;
- case 55:
-#line 355 "engines/director/lingo/lingo-gr.y"
+ case 57:
+#line 384 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->codeConst((yyvsp[(1) - (1)].i)); ;}
break;
- case 56:
-#line 356 "engines/director/lingo/lingo-gr.y"
+ case 58:
+#line 385 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_fconstpush);
g_lingo->codeFloat((yyvsp[(1) - (1)].f)); ;}
break;
- case 57:
-#line 359 "engines/director/lingo/lingo-gr.y"
+ case 59:
+#line 388 "engines/director/lingo/lingo-gr.y"
+ { // D3
+ (yyval.code) = g_lingo->code1(g_lingo->c_symbolpush);
+ g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); ;}
+ break;
+
+ case 60:
+#line 391 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_stringpush);
g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); ;}
break;
- case 58:
-#line 362 "engines/director/lingo/lingo-gr.y"
+ case 61:
+#line 394 "engines/director/lingo/lingo-gr.y"
{
- (yyval.code) = g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (1)].s)]->u.func);
+ (yyval.code) = g_lingo->code1(g_lingo->_builtins[*(yyvsp[(1) - (1)].s)]->u.func);
delete (yyvsp[(1) - (1)].s); ;}
break;
- case 59:
-#line 365 "engines/director/lingo/lingo-gr.y"
+ case 62:
+#line 397 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->codeFunc((yyvsp[(1) - (4)].s), (yyvsp[(3) - (4)].narg));
delete (yyvsp[(1) - (4)].s); ;}
break;
- case 60:
-#line 368 "engines/director/lingo/lingo-gr.y"
+ case 63:
+#line 400 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_eval);
g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str());
delete (yyvsp[(1) - (1)].s); ;}
break;
- case 61:
-#line 372 "engines/director/lingo/lingo-gr.y"
+ case 64:
+#line 404 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->codeConst(0); // Put dummy id
g_lingo->code1(g_lingo->c_theentitypush);
@@ -2249,8 +2477,8 @@ yyreduce:
g_lingo->code2(e, f); ;}
break;
- case 62:
-#line 379 "engines/director/lingo/lingo-gr.y"
+ case 65:
+#line 411 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_theentitypush);
inst e = 0, f = 0;
@@ -2259,257 +2487,327 @@ yyreduce:
g_lingo->code2(e, f); ;}
break;
- case 64:
-#line 386 "engines/director/lingo/lingo-gr.y"
+ case 67:
+#line 418 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_add); ;}
break;
- case 65:
-#line 387 "engines/director/lingo/lingo-gr.y"
+ case 68:
+#line 419 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_sub); ;}
break;
- case 66:
-#line 388 "engines/director/lingo/lingo-gr.y"
+ case 69:
+#line 420 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mul); ;}
break;
- case 67:
-#line 389 "engines/director/lingo/lingo-gr.y"
+ case 70:
+#line 421 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_div); ;}
break;
- case 68:
-#line 390 "engines/director/lingo/lingo-gr.y"
+ case 71:
+#line 422 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mod); ;}
break;
- case 69:
-#line 391 "engines/director/lingo/lingo-gr.y"
+ case 72:
+#line 423 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gt); ;}
break;
- case 70:
-#line 392 "engines/director/lingo/lingo-gr.y"
+ case 73:
+#line 424 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_lt); ;}
break;
- case 71:
-#line 393 "engines/director/lingo/lingo-gr.y"
+ case 74:
+#line 425 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_neq); ;}
break;
- case 72:
-#line 394 "engines/director/lingo/lingo-gr.y"
+ case 75:
+#line 426 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_ge); ;}
break;
- case 73:
-#line 395 "engines/director/lingo/lingo-gr.y"
+ case 76:
+#line 427 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_le); ;}
break;
- case 74:
-#line 396 "engines/director/lingo/lingo-gr.y"
+ case 77:
+#line 428 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_and); ;}
break;
- case 75:
-#line 397 "engines/director/lingo/lingo-gr.y"
+ case 78:
+#line 429 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_or); ;}
break;
- case 76:
-#line 398 "engines/director/lingo/lingo-gr.y"
+ case 79:
+#line 430 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_not); ;}
break;
- case 77:
-#line 399 "engines/director/lingo/lingo-gr.y"
+ case 80:
+#line 431 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_ampersand); ;}
break;
- case 78:
-#line 400 "engines/director/lingo/lingo-gr.y"
+ case 81:
+#line 432 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->code1(g_lingo->c_after); ;}
+ break;
+
+ case 82:
+#line 433 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_concat); ;}
break;
- case 79:
-#line 401 "engines/director/lingo/lingo-gr.y"
+ case 83:
+#line 434 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_contains); ;}
break;
- case 80:
-#line 402 "engines/director/lingo/lingo-gr.y"
+ case 84:
+#line 435 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_starts); ;}
break;
- case 81:
-#line 403 "engines/director/lingo/lingo-gr.y"
+ case 85:
+#line 436 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (2)].code); ;}
break;
- case 82:
-#line 404 "engines/director/lingo/lingo-gr.y"
+ case 86:
+#line 437 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;}
break;
- case 83:
-#line 405 "engines/director/lingo/lingo-gr.y"
+ case 87:
+#line 438 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (3)].code); ;}
break;
- case 84:
-#line 406 "engines/director/lingo/lingo-gr.y"
+ case 88:
+#line 439 "engines/director/lingo/lingo-gr.y"
+ { (yyval.code) = g_lingo->codeArray((yyvsp[(2) - (3)].narg)); ;}
+ break;
+
+ case 89:
+#line 440 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_intersects); ;}
break;
- case 85:
-#line 407 "engines/director/lingo/lingo-gr.y"
+ case 90:
+#line 441 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_within); ;}
break;
- case 86:
-#line 410 "engines/director/lingo/lingo-gr.y"
+ case 91:
+#line 442 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->code1(g_lingo->c_charOf); ;}
+ break;
+
+ case 92:
+#line 443 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->code1(g_lingo->c_charToOf); ;}
+ break;
+
+ case 93:
+#line 444 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->code1(g_lingo->c_itemOf); ;}
+ break;
+
+ case 94:
+#line 445 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->code1(g_lingo->c_itemToOf); ;}
+ break;
+
+ case 95:
+#line 446 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->code1(g_lingo->c_lineOf); ;}
+ break;
+
+ case 96:
+#line 447 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->code1(g_lingo->c_lineToOf); ;}
+ break;
+
+ case 97:
+#line 448 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->code1(g_lingo->c_wordOf); ;}
+ break;
+
+ case 98:
+#line 449 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->code1(g_lingo->c_wordToOf); ;}
+ break;
+
+ case 99:
+#line 452 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_printtop); ;}
break;
- case 89:
-#line 413 "engines/director/lingo/lingo-gr.y"
+ case 102:
+#line 455 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_exitRepeat); ;}
break;
- case 90:
-#line 414 "engines/director/lingo/lingo-gr.y"
+ case 103:
+#line 456 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeConst(0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret); ;}
break;
- case 93:
-#line 418 "engines/director/lingo/lingo-gr.y"
+ case 106:
+#line 460 "engines/director/lingo/lingo-gr.y"
{
- g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (2)].s)]->u.func);
+ g_lingo->code1(g_lingo->_builtins[*(yyvsp[(1) - (2)].s)]->u.func);
delete (yyvsp[(1) - (2)].s); ;}
break;
- case 94:
-#line 421 "engines/director/lingo/lingo-gr.y"
+ case 107:
+#line 463 "engines/director/lingo/lingo-gr.y"
{
- g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (2)].s)]->u.func);
+ g_lingo->code1(g_lingo->_builtins[*(yyvsp[(1) - (2)].s)]->u.func);
delete (yyvsp[(1) - (2)].s); ;}
break;
- case 95:
-#line 424 "engines/director/lingo/lingo-gr.y"
+ case 108:
+#line 466 "engines/director/lingo/lingo-gr.y"
{
- g_lingo->code2(g_lingo->c_voidpush, g_lingo->_handlers[*(yyvsp[(1) - (1)].s)]->u.func);
+ g_lingo->code2(g_lingo->c_voidpush, g_lingo->_builtins[*(yyvsp[(1) - (1)].s)]->u.func);
delete (yyvsp[(1) - (1)].s); ;}
break;
- case 96:
-#line 427 "engines/director/lingo/lingo-gr.y"
+ case 109:
+#line 469 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->codeFunc((yyvsp[(1) - (4)].s), (yyvsp[(3) - (4)].narg)); ;}
+ break;
+
+ case 110:
+#line 470 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;}
break;
- case 97:
-#line 428 "engines/director/lingo/lingo-gr.y"
+ case 111:
+#line 471 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->codeMe((yyvsp[(3) - (4)].s), 0); ;}
+ break;
+
+ case 112:
+#line 472 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->codeMe((yyvsp[(3) - (6)].s), (yyvsp[(5) - (6)].narg)); ;}
+ break;
+
+ case 113:
+#line 473 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_open); ;}
break;
- case 98:
-#line 429 "engines/director/lingo/lingo-gr.y"
+ case 114:
+#line 474 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;}
break;
- case 99:
-#line 432 "engines/director/lingo/lingo-gr.y"
+ case 115:
+#line 475 "engines/director/lingo/lingo-gr.y"
+ { Common::String s(*(yyvsp[(1) - (3)].s)); s += '-'; s += *(yyvsp[(2) - (3)].s); g_lingo->codeFunc(&s, (yyvsp[(3) - (3)].narg)); ;}
+ break;
+
+ case 116:
+#line 478 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
break;
- case 100:
-#line 433 "engines/director/lingo/lingo-gr.y"
+ case 117:
+#line 479 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;}
break;
- case 101:
-#line 436 "engines/director/lingo/lingo-gr.y"
+ case 118:
+#line 482 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_instance); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
break;
- case 102:
-#line 437 "engines/director/lingo/lingo-gr.y"
+ case 119:
+#line 483 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_instance); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;}
break;
- case 103:
-#line 448 "engines/director/lingo/lingo-gr.y"
+ case 120:
+#line 494 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoloop); ;}
break;
- case 104:
-#line 449 "engines/director/lingo/lingo-gr.y"
+ case 121:
+#line 495 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotonext); ;}
break;
- case 105:
-#line 450 "engines/director/lingo/lingo-gr.y"
+ case 122:
+#line 496 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoprevious); ;}
break;
- case 106:
-#line 451 "engines/director/lingo/lingo-gr.y"
+ case 123:
+#line 497 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(1);
g_lingo->code1(g_lingo->c_goto); ;}
break;
- case 107:
-#line 454 "engines/director/lingo/lingo-gr.y"
+ case 124:
+#line 500 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(3);
g_lingo->code1(g_lingo->c_goto); ;}
break;
- case 108:
-#line 457 "engines/director/lingo/lingo-gr.y"
+ case 125:
+#line 503 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(2);
g_lingo->code1(g_lingo->c_goto); ;}
break;
- case 113:
-#line 470 "engines/director/lingo/lingo-gr.y"
+ case 130:
+#line 516 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_playdone); ;}
break;
- case 114:
-#line 471 "engines/director/lingo/lingo-gr.y"
+ case 131:
+#line 517 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(1);
g_lingo->code1(g_lingo->c_play); ;}
break;
- case 115:
-#line 474 "engines/director/lingo/lingo-gr.y"
+ case 132:
+#line 520 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(3);
g_lingo->code1(g_lingo->c_play); ;}
break;
- case 116:
-#line 477 "engines/director/lingo/lingo-gr.y"
+ case 133:
+#line 523 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(2);
g_lingo->code1(g_lingo->c_play); ;}
break;
- case 117:
-#line 507 "engines/director/lingo/lingo-gr.y"
+ case 134:
+#line 553 "engines/director/lingo/lingo-gr.y"
{ g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
break;
- case 118:
-#line 508 "engines/director/lingo/lingo-gr.y"
+ case 135:
+#line 554 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret);
@@ -2517,53 +2815,76 @@ yyreduce:
g_lingo->_indef = false; ;}
break;
- case 119:
-#line 513 "engines/director/lingo/lingo-gr.y"
+ case 136:
+#line 559 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeFactory(*(yyvsp[(2) - (2)].s));
;}
break;
- case 120:
-#line 516 "engines/director/lingo/lingo-gr.y"
+ case 137:
+#line 562 "engines/director/lingo/lingo-gr.y"
{ g_lingo->_indef = true; ;}
break;
- case 121:
-#line 517 "engines/director/lingo/lingo-gr.y"
+ case 138:
+#line 563 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_procret);
g_lingo->define(*(yyvsp[(2) - (8)].s), (yyvsp[(4) - (8)].code), (yyvsp[(5) - (8)].narg) + 1, &g_lingo->_currentFactory);
g_lingo->_indef = false; ;}
break;
- case 122:
-#line 521 "engines/director/lingo/lingo-gr.y"
+ case 139:
+#line 567 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
+ break;
+
+ case 140:
+#line 568 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->_ignoreMe = true; ;}
+ break;
+
+ case 141:
+#line 568 "engines/director/lingo/lingo-gr.y"
+ {
+ g_lingo->codeConst(0); // Push fake value on stack
+ g_lingo->code1(g_lingo->c_procret);
+ g_lingo->define(*(yyvsp[(2) - (10)].s), (yyvsp[(4) - (10)].code), (yyvsp[(6) - (10)].narg));
+ g_lingo->_indef = false;
+ g_lingo->_ignoreMe = false;
+
+ checkEnd((yyvsp[(10) - (10)].s), (yyvsp[(2) - (10)].s)->c_str(), false);
+ ;}
+ break;
+
+ case 142:
+#line 578 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 0; ;}
break;
- case 123:
-#line 522 "engines/director/lingo/lingo-gr.y"
+ case 143:
+#line 579 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
break;
- case 124:
-#line 523 "engines/director/lingo/lingo-gr.y"
+ case 144:
+#line 580 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
break;
- case 125:
-#line 524 "engines/director/lingo/lingo-gr.y"
+ case 145:
+#line 581 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
break;
- case 126:
-#line 526 "engines/director/lingo/lingo-gr.y"
+ case 146:
+#line 583 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArgStore(); ;}
break;
- case 127:
-#line 530 "engines/director/lingo/lingo-gr.y"
+ case 147:
+#line 587 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_call);
g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str());
@@ -2572,24 +2893,24 @@ yyreduce:
g_lingo->code1(numpar); ;}
break;
- case 128:
-#line 538 "engines/director/lingo/lingo-gr.y"
+ case 148:
+#line 595 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 0; ;}
break;
- case 129:
-#line 539 "engines/director/lingo/lingo-gr.y"
+ case 149:
+#line 596 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 1; ;}
break;
- case 130:
-#line 540 "engines/director/lingo/lingo-gr.y"
+ case 150:
+#line 597 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
break;
/* Line 1267 of yacc.c. */
-#line 2593 "engines/director/lingo/lingo-gr.cpp"
+#line 2914 "engines/director/lingo/lingo-gr.cpp"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2803,6 +3124,6 @@ yyreturn:
}
-#line 543 "engines/director/lingo/lingo-gr.y"
+#line 600 "engines/director/lingo/lingo-gr.y"
diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h
index 46097085fe..37451f08f5 100644
--- a/engines/director/lingo/lingo-gr.h
+++ b/engines/director/lingo/lingo-gr.h
@@ -46,68 +46,77 @@
POINT = 262,
RECT = 263,
ARRAY = 264,
- SYMBOL = 265,
- OBJECT = 266,
- INT = 267,
- THEENTITY = 268,
- THEENTITYWITHID = 269,
- FLOAT = 270,
- BLTIN = 271,
- BLTINNOARGS = 272,
- BLTINNOARGSORONE = 273,
- BLTINONEARG = 274,
- BLTINARGLIST = 275,
+ OBJECT = 265,
+ INT = 266,
+ THEENTITY = 267,
+ THEENTITYWITHID = 268,
+ FLOAT = 269,
+ BLTIN = 270,
+ BLTINNOARGS = 271,
+ BLTINNOARGSORONE = 272,
+ BLTINONEARG = 273,
+ BLTINARGLIST = 274,
+ TWOWORDBUILTIN = 275,
ID = 276,
STRING = 277,
HANDLER = 278,
- tDOWN = 279,
- tELSE = 280,
- tNLELSIF = 281,
- tEND = 282,
- tEXIT = 283,
- tFRAME = 284,
- tGLOBAL = 285,
- tGO = 286,
- tIF = 287,
- tINTO = 288,
- tLOOP = 289,
- tMACRO = 290,
- tMOVIE = 291,
- tNEXT = 292,
- tOF = 293,
- tPREVIOUS = 294,
- tPUT = 295,
- tREPEAT = 296,
- tSET = 297,
- tTHEN = 298,
- tTO = 299,
- tWHEN = 300,
- tWITH = 301,
- tWHILE = 302,
- tNLELSE = 303,
- tFACTORY = 304,
- tMETHOD = 305,
- tOPEN = 306,
- tPLAY = 307,
- tDONE = 308,
- tPLAYACCEL = 309,
- tINSTANCE = 310,
- tGE = 311,
- tLE = 312,
- tGT = 313,
- tLT = 314,
- tEQ = 315,
- tNEQ = 316,
- tAND = 317,
- tOR = 318,
- tNOT = 319,
- tMOD = 320,
- tCONCAT = 321,
- tCONTAINS = 322,
- tSTARTS = 323,
- tSPRITE = 324,
- tINTERSECTS = 325,
- tWITHIN = 326
+ SYMBOL = 279,
+ ENDCLAUSE = 280,
+ tDOWN = 281,
+ tELSE = 282,
+ tNLELSIF = 283,
+ tEXIT = 284,
+ tFRAME = 285,
+ tGLOBAL = 286,
+ tGO = 287,
+ tIF = 288,
+ tINTO = 289,
+ tLOOP = 290,
+ tMACRO = 291,
+ tMOVIE = 292,
+ tNEXT = 293,
+ tOF = 294,
+ tPREVIOUS = 295,
+ tPUT = 296,
+ tREPEAT = 297,
+ tSET = 298,
+ tTHEN = 299,
+ tTO = 300,
+ tWHEN = 301,
+ tWITH = 302,
+ tWHILE = 303,
+ tNLELSE = 304,
+ tFACTORY = 305,
+ tMETHOD = 306,
+ tOPEN = 307,
+ tPLAY = 308,
+ tDONE = 309,
+ tPLAYACCEL = 310,
+ tINSTANCE = 311,
+ tGE = 312,
+ tLE = 313,
+ tGT = 314,
+ tLT = 315,
+ tEQ = 316,
+ tNEQ = 317,
+ tAND = 318,
+ tOR = 319,
+ tNOT = 320,
+ tMOD = 321,
+ tAFTER = 322,
+ tBEFORE = 323,
+ tCONCAT = 324,
+ tCONTAINS = 325,
+ tSTARTS = 326,
+ tCHAR = 327,
+ tITEM = 328,
+ tLINE = 329,
+ tWORD = 330,
+ tSPRITE = 331,
+ tINTERSECTS = 332,
+ tWITHIN = 333,
+ tON = 334,
+ tME = 335
};
#endif
/* Tokens. */
@@ -118,75 +127,84 @@
#define POINT 262
#define RECT 263
#define ARRAY 264
-#define SYMBOL 265
-#define OBJECT 266
-#define INT 267
-#define THEENTITY 268
-#define THEENTITYWITHID 269
-#define FLOAT 270
-#define BLTIN 271
-#define BLTINNOARGS 272
-#define BLTINNOARGSORONE 273
-#define BLTINONEARG 274
-#define BLTINARGLIST 275
+#define OBJECT 265
+#define INT 266
+#define THEENTITY 267
+#define THEENTITYWITHID 268
+#define FLOAT 269
+#define BLTIN 270
+#define BLTINNOARGS 271
+#define BLTINNOARGSORONE 272
+#define BLTINONEARG 273
+#define BLTINARGLIST 274
+#define TWOWORDBUILTIN 275
#define ID 276
#define STRING 277
#define HANDLER 278
-#define tDOWN 279
-#define tELSE 280
-#define tNLELSIF 281
-#define tEND 282
-#define tEXIT 283
-#define tFRAME 284
-#define tGLOBAL 285
-#define tGO 286
-#define tIF 287
-#define tINTO 288
-#define tLOOP 289
-#define tMACRO 290
-#define tMOVIE 291
-#define tNEXT 292
-#define tOF 293
-#define tPREVIOUS 294
-#define tPUT 295
-#define tREPEAT 296
-#define tSET 297
-#define tTHEN 298
-#define tTO 299
-#define tWHEN 300
-#define tWITH 301
-#define tWHILE 302
-#define tNLELSE 303
-#define tFACTORY 304
-#define tMETHOD 305
-#define tOPEN 306
-#define tPLAY 307
-#define tDONE 308
-#define tPLAYACCEL 309
-#define tINSTANCE 310
-#define tGE 311
-#define tLE 312
-#define tGT 313
-#define tLT 314
-#define tEQ 315
-#define tNEQ 316
-#define tAND 317
-#define tOR 318
-#define tNOT 319
-#define tMOD 320
-#define tCONCAT 321
-#define tCONTAINS 322
-#define tSTARTS 323
-#define tSPRITE 324
-#define tINTERSECTS 325
-#define tWITHIN 326
+#define SYMBOL 279
+#define ENDCLAUSE 280
+#define tDOWN 281
+#define tELSE 282
+#define tNLELSIF 283
+#define tEXIT 284
+#define tFRAME 285
+#define tGLOBAL 286
+#define tGO 287
+#define tIF 288
+#define tINTO 289
+#define tLOOP 290
+#define tMACRO 291
+#define tMOVIE 292
+#define tNEXT 293
+#define tOF 294
+#define tPREVIOUS 295
+#define tPUT 296
+#define tREPEAT 297
+#define tSET 298
+#define tTHEN 299
+#define tTO 300
+#define tWHEN 301
+#define tWITH 302
+#define tWHILE 303
+#define tNLELSE 304
+#define tFACTORY 305
+#define tMETHOD 306
+#define tOPEN 307
+#define tPLAY 308
+#define tDONE 309
+#define tPLAYACCEL 310
+#define tINSTANCE 311
+#define tGE 312
+#define tLE 313
+#define tGT 314
+#define tLT 315
+#define tEQ 316
+#define tNEQ 317
+#define tAND 318
+#define tOR 319
+#define tNOT 320
+#define tMOD 321
+#define tAFTER 322
+#define tBEFORE 323
+#define tCONCAT 324
+#define tCONTAINS 325
+#define tSTARTS 326
+#define tCHAR 327
+#define tITEM 328
+#define tLINE 329
+#define tWORD 330
+#define tSPRITE 331
+#define tINTERSECTS 332
+#define tWITHIN 333
+#define tON 334
+#define tME 335
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 69 "engines/director/lingo/lingo-gr.y"
+#line 79 "engines/director/lingo/lingo-gr.y"
{
Common::String *s;
int i;
@@ -197,7 +215,7 @@ typedef union YYSTYPE
Common::Array<double> *arr;
}
/* Line 1529 of yacc.c. */
-#line 201 "engines/director/lingo/lingo-gr.hpp"
+#line 219 "engines/director/lingo/lingo-gr.hpp"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index 9077f44876..778496bf94 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -63,6 +63,16 @@ void yyerror(const char *s) {
warning("%s at line %d col %d", s, g_lingo->_linenumber, g_lingo->_colnumber);
}
+void checkEnd(Common::String *token, const char *expect, bool required) {
+ if (required) {
+ if (token->compareToIgnoreCase(expect)) {
+ Common::String err = Common::String::format("end mismatch. Expected %s but got %s", expect, token->c_str());
+ yyerror(err.c_str());
+ }
+ }
+
+ delete token;
+}
%}
@@ -77,18 +87,20 @@ void yyerror(const char *s) {
}
%token UNARY
-%token CASTREF VOID VAR POINT RECT ARRAY SYMBOL OBJECT
+%token CASTREF VOID VAR POINT RECT ARRAY OBJECT
%token<i> INT
%token<e> THEENTITY THEENTITYWITHID
%token<f> FLOAT
-%token<s> BLTIN BLTINNOARGS BLTINNOARGSORONE BLTINONEARG BLTINARGLIST
-%token<s> ID STRING HANDLER
-%token tDOWN tELSE tNLELSIF tEND tEXIT tFRAME tGLOBAL tGO tIF tINTO tLOOP tMACRO
+%token<s> BLTIN BLTINNOARGS BLTINNOARGSORONE BLTINONEARG BLTINARGLIST TWOWORDBUILTIN
+%token<s> ID STRING HANDLER SYMBOL
+%token<s> ENDCLAUSE
+%token tDOWN tELSE tNLELSIF tEXIT tFRAME tGLOBAL tGO tIF tINTO tLOOP tMACRO
%token tMOVIE tNEXT tOF tPREVIOUS tPUT tREPEAT tSET tTHEN tTO tWHEN
%token tWITH tWHILE tNLELSE tFACTORY tMETHOD tOPEN tPLAY tDONE tPLAYACCEL tINSTANCE
%token tGE tLE tGT tLT tEQ tNEQ tAND tOR tNOT tMOD
-%token tCONCAT tCONTAINS tSTARTS
+%token tAFTER tBEFORE tCONCAT tCONTAINS tSTARTS tCHAR tITEM tLINE tWORD
%token tSPRITE tINTERSECTS tWITHIN
+%token tON tME
%type<code> asgn begin elseif elsestmtoneliner end expr if when repeatwhile repeatwith stmtlist
%type<narg> argdef arglist
@@ -126,6 +138,8 @@ asgn: tPUT expr tINTO ID {
g_lingo->code1(g_lingo->c_assign);
$$ = $2;
delete $4; }
+ | tPUT expr tAFTER expr { $$ = g_lingo->code1(g_lingo->c_after); } // D3
+ | tPUT expr tBEFORE expr { $$ = g_lingo->code1(g_lingo->c_before); } // D3
| tSET ID '=' expr {
g_lingo->code1(g_lingo->c_varpush);
g_lingo->codeString($2->c_str());
@@ -180,18 +194,20 @@ stmt: stmtoneliner
// statements
// end repeat
//
- | repeatwhile '(' cond ')' stmtlist end tEND tREPEAT {
+ | repeatwhile '(' cond ')' stmtlist end ENDCLAUSE {
inst body = 0, end = 0;
WRITE_UINT32(&body, $5);
WRITE_UINT32(&end, $6);
(*g_lingo->_currentScript)[$1 + 1] = body; /* body of loop */
- (*g_lingo->_currentScript)[$1 + 2] = end; } /* end, if cond fails */
+ (*g_lingo->_currentScript)[$1 + 2] = end; /* end, if cond fails */
+
+ checkEnd($7, "repeat", true); }
;
// repeat with index = start to end
// statements
// end repeat
//
- | repeatwith '=' expr end tTO expr end stmtlist end tEND tREPEAT {
+ | repeatwith '=' expr end tTO expr end stmtlist end ENDCLAUSE {
inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
WRITE_UINT32(&init, $3);
WRITE_UINT32(&finish, $6);
@@ -202,12 +218,14 @@ stmt: stmtoneliner
(*g_lingo->_currentScript)[$1 + 2] = finish;/* final count value */
(*g_lingo->_currentScript)[$1 + 3] = body; /* body of loop */
(*g_lingo->_currentScript)[$1 + 4] = inc; /* increment */
- (*g_lingo->_currentScript)[$1 + 5] = end; } /* end, if cond fails */
+ (*g_lingo->_currentScript)[$1 + 5] = end; /* end, if cond fails */
+
+ checkEnd($10, "repeat", true); }
// repeat with index = high down to low
// statements
// end repeat
//
- | repeatwith '=' expr end tDOWN tTO expr end stmtlist end tEND tREPEAT {
+ | repeatwith '=' expr end tDOWN tTO expr end stmtlist end ENDCLAUSE {
inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
WRITE_UINT32(&init, $3);
WRITE_UINT32(&finish, $7);
@@ -218,7 +236,9 @@ stmt: stmtoneliner
(*g_lingo->_currentScript)[$1 + 2] = finish;/* final count value */
(*g_lingo->_currentScript)[$1 + 3] = body; /* body of loop */
(*g_lingo->_currentScript)[$1 + 4] = inc; /* increment */
- (*g_lingo->_currentScript)[$1 + 5] = end; } /* end, if cond fails */
+ (*g_lingo->_currentScript)[$1 + 5] = end; /* end, if cond fails */
+
+ checkEnd($11, "repeat", true); }
| when expr end {
inst end = 0;
WRITE_UINT32(&end, $3);
@@ -227,14 +247,17 @@ stmt: stmtoneliner
}
;
-ifstmt: if cond tTHEN nl stmtlist end tEND tIF {
+ifstmt: if cond tTHEN nl stmtlist end ENDCLAUSE {
inst then = 0, end = 0;
WRITE_UINT32(&then, $5);
WRITE_UINT32(&end, $6);
(*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */
(*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */
+
+ checkEnd($7, "if", true);
+
g_lingo->processIf(0, 0); }
- | if cond tTHEN nl stmtlist end tNLELSE stmtlist end tEND tIF {
+ | if cond tTHEN nl stmtlist end tNLELSE stmtlist end ENDCLAUSE {
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, $5);
WRITE_UINT32(&else1, $8);
@@ -242,8 +265,11 @@ ifstmt: if cond tTHEN nl stmtlist end tEND tIF {
(*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */
(*g_lingo->_currentScript)[$1 + 2] = else1; /* elsepart */
(*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */
+
+ checkEnd($10, "if", true);
+
g_lingo->processIf(0, 0); }
- | if cond tTHEN nl stmtlist end begin elseifstmt end tEND tIF {
+ | if cond tTHEN nl stmtlist end begin elseifstmt end ENDCLAUSE {
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, $5);
WRITE_UINT32(&else1, $7);
@@ -251,6 +277,9 @@ ifstmt: if cond tTHEN nl stmtlist end tEND tIF {
(*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */
(*g_lingo->_currentScript)[$1 + 2] = else1; /* elsepart */
(*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */
+
+ checkEnd($10, "if", true);
+
g_lingo->processIf(0, $9); }
| if cond tTHEN begin stmtoneliner end {
inst then = 0, else1 = 0, end = 0;
@@ -356,11 +385,14 @@ expr: INT { $$ = g_lingo->codeConst($1); }
| FLOAT {
$$ = g_lingo->code1(g_lingo->c_fconstpush);
g_lingo->codeFloat($1); }
+ | SYMBOL { // D3
+ $$ = g_lingo->code1(g_lingo->c_symbolpush);
+ g_lingo->codeString($1->c_str()); }
| STRING {
$$ = g_lingo->code1(g_lingo->c_stringpush);
g_lingo->codeString($1->c_str()); }
| BLTINNOARGS {
- $$ = g_lingo->code1(g_lingo->_handlers[*$1]->u.func);
+ $$ = g_lingo->code1(g_lingo->_builtins[*$1]->u.func);
delete $1; }
| ID '(' arglist ')' {
$$ = g_lingo->codeFunc($1, $3);
@@ -397,14 +429,24 @@ expr: INT { $$ = g_lingo->codeConst($1); }
| expr tOR expr { g_lingo->code1(g_lingo->c_or); }
| tNOT expr %prec UNARY { g_lingo->code1(g_lingo->c_not); }
| expr '&' expr { g_lingo->code1(g_lingo->c_ampersand); }
+ | expr tAFTER expr { g_lingo->code1(g_lingo->c_after); }
| expr tCONCAT expr { g_lingo->code1(g_lingo->c_concat); }
| expr tCONTAINS expr { g_lingo->code1(g_lingo->c_contains); }
| expr tSTARTS expr { g_lingo->code1(g_lingo->c_starts); }
| '+' expr %prec UNARY { $$ = $2; }
| '-' expr %prec UNARY { $$ = $2; g_lingo->code1(g_lingo->c_negate); }
| '(' expr ')' { $$ = $2; }
+ | '[' arglist ']' { $$ = g_lingo->codeArray($2); }
| tSPRITE expr tINTERSECTS expr { g_lingo->code1(g_lingo->c_intersects); }
| tSPRITE expr tWITHIN expr { g_lingo->code1(g_lingo->c_within); }
+ | tCHAR expr tOF expr { g_lingo->code1(g_lingo->c_charOf); }
+ | tCHAR expr tTO expr tOF expr { g_lingo->code1(g_lingo->c_charToOf); }
+ | tITEM expr tOF expr { g_lingo->code1(g_lingo->c_itemOf); }
+ | tITEM expr tTO expr tOF expr { g_lingo->code1(g_lingo->c_itemToOf); }
+ | tLINE expr tOF expr { g_lingo->code1(g_lingo->c_lineOf); }
+ | tLINE expr tTO expr tOF expr { g_lingo->code1(g_lingo->c_lineToOf); }
+ | tWORD expr tOF expr { g_lingo->code1(g_lingo->c_wordOf); }
+ | tWORD expr tTO expr tOF expr { g_lingo->code1(g_lingo->c_wordToOf); }
;
func: tPUT expr { g_lingo->code1(g_lingo->c_printtop); }
@@ -416,17 +458,21 @@ func: tPUT expr { g_lingo->code1(g_lingo->c_printtop); }
| tGLOBAL globallist
| tINSTANCE instancelist
| BLTINONEARG expr {
- g_lingo->code1(g_lingo->_handlers[*$1]->u.func);
+ g_lingo->code1(g_lingo->_builtins[*$1]->u.func);
delete $1; }
| BLTINNOARGSORONE expr {
- g_lingo->code1(g_lingo->_handlers[*$1]->u.func);
+ g_lingo->code1(g_lingo->_builtins[*$1]->u.func);
delete $1; }
| BLTINNOARGSORONE {
- g_lingo->code2(g_lingo->c_voidpush, g_lingo->_handlers[*$1]->u.func);
+ g_lingo->code2(g_lingo->c_voidpush, g_lingo->_builtins[*$1]->u.func);
delete $1; }
+ | BLTINARGLIST '(' arglist ')' { g_lingo->codeFunc($1, $3); }
| BLTINARGLIST arglist { g_lingo->codeFunc($1, $2); }
+ | tME '(' ID ')' { g_lingo->codeMe($3, 0); }
+ | tME '(' ID ',' arglist ')' { g_lingo->codeMe($3, $5); }
| tOPEN expr tWITH expr { g_lingo->code1(g_lingo->c_open); }
| tOPEN expr { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); }
+ | TWOWORDBUILTIN ID arglist { Common::String s(*$1); s += '-'; s += *$2; g_lingo->codeFunc(&s, $3); }
;
globallist: ID { g_lingo->code1(g_lingo->c_global); g_lingo->codeString($1->c_str()); delete $1; }
@@ -518,6 +564,17 @@ defn: tMACRO ID { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); }
g_lingo->code1(g_lingo->c_procret);
g_lingo->define(*$2, $4, $5 + 1, &g_lingo->_currentFactory);
g_lingo->_indef = false; } ;
+ | tON ID { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); } // D3
+ begin { g_lingo->_ignoreMe = true; } argdef nl argstore stmtlist ENDCLAUSE {
+ g_lingo->codeConst(0); // Push fake value on stack
+ g_lingo->code1(g_lingo->c_procret);
+ g_lingo->define(*$2, $4, $6);
+ g_lingo->_indef = false;
+ g_lingo->_ignoreMe = false;
+
+ checkEnd($10, $2->c_str(), false);
+ }
+
argdef: /* nothing */ { $$ = 0; }
| ID { g_lingo->codeArg($1); $$ = 1; }
| argdef ',' ID { g_lingo->codeArg($3); $$ = $1 + 1; }
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 5c0eeedf7e..922425048e 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -34,7 +34,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -52,7 +52,7 @@ typedef uint64_t flex_uint64_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */
@@ -168,7 +168,7 @@ extern FILE *yyin, *yyout;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
-
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -225,7 +225,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -364,8 +364,8 @@ static void yy_fatal_error (yyconst char msg[] );
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 59
-#define YY_END_OF_BUFFER 60
+#define YY_NUM_RULES 68
+#define YY_END_OF_BUFFER 69
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -373,31 +373,35 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[206] =
+static yyconst flex_int16_t yy_accept[248] =
{ 0,
- 0, 0, 60, 58, 3, 56, 56, 58, 58, 55,
- 55, 55, 54, 55, 55, 52, 52, 52, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 2, 2, 3, 56, 0, 0, 0, 0,
- 0, 57, 51, 1, 53, 54, 50, 48, 49, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 18,
- 8, 52, 52, 52, 52, 52, 52, 52, 29, 52,
- 31, 52, 52, 52, 52, 52, 52, 52, 52, 42,
- 52, 52, 2, 2, 0, 1, 53, 4, 52, 52,
- 52, 52, 12, 52, 52, 52, 52, 0, 52, 52,
-
- 52, 52, 52, 25, 52, 52, 28, 52, 52, 52,
- 34, 52, 36, 52, 52, 52, 52, 52, 52, 0,
- 52, 6, 7, 11, 14, 52, 52, 52, 0, 52,
- 52, 21, 22, 52, 52, 52, 27, 30, 32, 52,
- 52, 52, 52, 0, 41, 46, 52, 44, 10, 52,
- 52, 15, 52, 17, 52, 52, 23, 52, 26, 52,
- 52, 52, 52, 40, 40, 47, 52, 0, 52, 52,
- 16, 52, 52, 24, 52, 35, 43, 37, 0, 40,
- 45, 0, 52, 13, 52, 52, 52, 0, 40, 9,
- 5, 19, 52, 33, 0, 40, 52, 0, 0, 20,
-
- 39, 0, 0, 38, 0
+ 0, 0, 69, 67, 3, 65, 65, 67, 67, 67,
+ 64, 64, 64, 63, 64, 64, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 2, 2, 3, 65, 0, 0,
+ 0, 0, 0, 66, 4, 60, 1, 62, 63, 59,
+ 57, 58, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 22, 12, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 35, 36, 61, 38,
+ 61, 61, 61, 61, 61, 61, 61, 61, 50, 61,
+ 61, 61, 2, 2, 0, 4, 1, 62, 61, 6,
+
+ 61, 61, 61, 61, 61, 61, 16, 61, 61, 61,
+ 61, 0, 61, 61, 61, 61, 61, 61, 61, 31,
+ 61, 61, 34, 61, 61, 61, 41, 61, 43, 61,
+ 61, 61, 61, 61, 61, 61, 0, 61, 61, 8,
+ 61, 10, 11, 15, 0, 16, 18, 61, 61, 61,
+ 0, 61, 61, 25, 26, 27, 28, 61, 61, 61,
+ 33, 37, 39, 61, 61, 61, 61, 0, 49, 54,
+ 61, 52, 56, 14, 5, 61, 61, 16, 16, 61,
+ 19, 61, 21, 61, 61, 29, 61, 32, 61, 61,
+ 61, 61, 48, 48, 55, 61, 0, 7, 61, 16,
+
+ 61, 20, 61, 61, 30, 61, 42, 51, 44, 0,
+ 0, 48, 53, 0, 61, 17, 61, 61, 61, 0,
+ 0, 0, 0, 48, 13, 9, 23, 61, 40, 0,
+ 0, 0, 48, 61, 0, 0, 0, 0, 24, 47,
+ 46, 47, 0, 0, 0, 45, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -405,17 +409,17 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 5, 1, 6, 1, 1, 7, 8, 1, 7,
- 7, 7, 7, 7, 9, 10, 7, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 7, 1, 12,
- 13, 14, 1, 1, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 24, 25, 26, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 24,
- 1, 1, 1, 7, 39, 1, 40, 41, 42, 43,
-
- 44, 45, 46, 47, 48, 24, 24, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- 62, 24, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 5, 1, 6, 7, 1, 8, 9, 1, 8,
+ 8, 8, 10, 8, 11, 12, 8, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 8, 1, 14,
+ 15, 16, 1, 1, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 26,
+ 8, 1, 8, 8, 41, 1, 42, 43, 44, 45,
+
+ 46, 47, 48, 49, 50, 26, 26, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 26, 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,
@@ -432,140 +436,164 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[63] =
+static yyconst flex_int32_t yy_meta[65] =
{ 0,
1, 2, 3, 3, 2, 1, 1, 1, 1, 1,
- 4, 1, 1, 1, 5, 5, 5, 5, 5, 5,
+ 1, 1, 4, 1, 1, 1, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 4, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 6, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5
+ 5, 5, 5, 5
} ;
-static yyconst flex_int16_t yy_base[211] =
+static yyconst flex_int16_t yy_base[259] =
{ 0,
- 0, 61, 156, 521, 65, 69, 73, 77, 148, 521,
- 104, 99, 54, 70, 91, 58, 0, 58, 59, 69,
- 74, 70, 70, 71, 88, 105, 105, 110, 82, 118,
- 117, 130, 177, 181, 185, 521, 189, 193, 197, 106,
- 94, 521, 521, 0, 82, 132, 521, 521, 521, 0,
- 84, 119, 169, 116, 120, 174, 186, 191, 180, 171,
- 0, 177, 183, 196, 182, 201, 181, 188, 0, 204,
- 0, 209, 206, 194, 201, 207, 212, 231, 228, 0,
- 233, 222, 271, 280, 230, 0, 80, 0, 230, 234,
- 238, 247, 0, 235, 236, 244, 264, 293, 255, 271,
-
- 267, 266, 278, 0, 279, 271, 0, 279, 269, 273,
- 0, 290, 0, 287, 282, 309, 289, 292, 296, 300,
- 307, 0, 0, 0, 0, 296, 310, 318, 310, 324,
- 311, 0, 0, 317, 318, 330, 0, 0, 0, 328,
- 337, 322, 323, 363, 0, 0, 334, 334, 202, 336,
- 330, 0, 338, 521, 340, 340, 0, 355, 0, 347,
- 348, 364, 354, 212, 387, 0, 361, 388, 367, 359,
- 0, 383, 382, 0, 369, 0, 0, 0, 402, 404,
- 0, 393, 383, 0, 401, 405, 384, 403, 427, 521,
- 0, 0, 395, 0, 256, 429, 401, 441, 448, 0,
-
- 453, 404, 459, 460, 521, 500, 502, 507, 511, 515
+ 0, 63, 160, 637, 67, 71, 75, 79, 140, 0,
+ 637, 133, 126, 54, 70, 94, 65, 67, 65, 61,
+ 71, 87, 72, 0, 103, 81, 119, 109, 135, 118,
+ 82, 112, 146, 155, 194, 208, 212, 637, 216, 181,
+ 220, 121, 99, 637, 0, 637, 0, 88, 95, 637,
+ 637, 637, 0, 118, 96, 105, 142, 177, 197, 173,
+ 183, 183, 210, 215, 204, 88, 0, 202, 217, 211,
+ 213, 225, 211, 228, 208, 216, 0, 0, 228, 0,
+ 235, 232, 220, 225, 227, 235, 255, 255, 0, 260,
+ 248, 251, 291, 300, 253, 0, 0, 84, 267, 0,
+
+ 260, 258, 263, 278, 280, 279, 314, 277, 282, 290,
+ 302, 321, 293, 300, 301, 311, 300, 301, 311, 0,
+ 312, 304, 0, 311, 303, 307, 0, 326, 0, 323,
+ 317, 364, 322, 332, 337, 345, 349, 343, 344, 0,
+ 354, 0, 0, 0, 189, 0, 0, 348, 358, 364,
+ 354, 365, 352, 0, 0, 0, 0, 357, 358, 368,
+ 0, 0, 0, 366, 377, 362, 363, 408, 0, 0,
+ 378, 378, 0, 237, 0, 384, 390, 0, 0, 387,
+ 0, 396, 637, 396, 392, 0, 398, 0, 397, 394,
+ 410, 399, 436, 450, 0, 405, 434, 0, 408, 0,
+
+ 405, 0, 429, 433, 0, 426, 0, 0, 0, 463,
+ 443, 462, 0, 449, 436, 0, 453, 456, 443, 485,
+ 463, 463, 464, 502, 637, 0, 0, 457, 0, 462,
+ 430, 475, 518, 475, 490, 524, 492, 529, 0, 637,
+ 530, 637, 538, 503, 539, 540, 637, 592, 594, 597,
+ 600, 606, 611, 616, 619, 624, 626, 631
} ;
-static yyconst flex_int16_t yy_def[211] =
+static yyconst flex_int16_t yy_def[259] =
{ 0,
- 205, 1, 205, 205, 205, 205, 205, 205, 206, 205,
- 205, 205, 205, 205, 205, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 205, 205, 205, 205, 205, 205, 205, 205,
- 206, 205, 205, 208, 205, 205, 205, 205, 205, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 205, 205, 205, 208, 205, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 205, 207, 207,
-
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 205,
- 207, 207, 207, 207, 207, 207, 207, 207, 205, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 209, 207, 207, 207, 207, 205, 207,
- 207, 207, 207, 205, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 209, 209, 207, 207, 205, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 205, 209,
- 207, 205, 207, 207, 207, 207, 207, 205, 209, 205,
- 207, 207, 207, 207, 205, 209, 207, 210, 205, 207,
-
- 210, 205, 205, 210, 0, 205, 205, 205, 205, 205
+ 247, 1, 247, 247, 247, 247, 247, 247, 248, 249,
+ 247, 247, 247, 247, 247, 247, 250, 250, 250, 250,
+ 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, 247, 247, 247, 247, 247, 247,
+ 247, 247, 248, 247, 251, 247, 252, 247, 247, 247,
+ 247, 247, 250, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 247, 247, 247, 251, 252, 247, 250, 250,
+
+ 250, 250, 250, 250, 250, 250, 253, 250, 250, 250,
+ 250, 247, 250, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, 250, 250, 247, 250, 250, 250,
+ 250, 250, 250, 250, 254, 255, 250, 250, 250, 250,
+ 247, 250, 250, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, 250, 250, 250, 256, 250, 250,
+ 250, 250, 250, 247, 250, 250, 250, 257, 255, 250,
+ 250, 250, 247, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 256, 256, 250, 250, 247, 250, 250, 257,
+
+ 250, 250, 250, 250, 250, 250, 250, 250, 250, 247,
+ 247, 256, 250, 247, 250, 250, 250, 250, 250, 247,
+ 247, 247, 247, 256, 247, 250, 250, 250, 250, 247,
+ 247, 247, 256, 250, 247, 258, 247, 247, 250, 247,
+ 258, 247, 247, 247, 247, 258, 0, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247
} ;
-static yyconst flex_int16_t yy_nxt[584] =
+static yyconst flex_int16_t yy_nxt[702] =
{ 0,
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 4,
- 13, 14, 10, 15, 16, 17, 18, 19, 20, 21,
- 22, 17, 23, 17, 24, 25, 26, 27, 28, 17,
- 29, 30, 31, 17, 17, 32, 17, 17, 17, 16,
- 17, 18, 19, 20, 21, 22, 17, 23, 24, 25,
- 26, 27, 28, 17, 29, 30, 31, 17, 17, 32,
- 17, 17, 33, 45, 46, 34, 35, 36, 36, 37,
- 38, 39, 39, 38, 38, 39, 39, 38, 37, 36,
- 36, 37, 47, 48, 51, 52, 53, 40, 57, 61,
- 87, 40, 87, 54, 59, 55, 62, 60, 63, 42,
-
- 75, 88, 64, 49, 58, 56, 65, 44, 51, 52,
- 53, 43, 40, 57, 61, 66, 40, 54, 59, 55,
- 62, 60, 63, 67, 69, 75, 88, 64, 58, 56,
- 85, 65, 68, 70, 72, 71, 76, 93, 79, 66,
- 73, 45, 46, 74, 80, 89, 77, 92, 67, 69,
- 78, 81, 82, 42, 85, 205, 68, 70, 72, 71,
- 205, 76, 93, 79, 73, 205, 205, 74, 80, 89,
- 77, 92, 98, 205, 78, 98, 81, 82, 83, 36,
- 36, 84, 84, 36, 36, 84, 35, 36, 36, 37,
- 37, 36, 36, 37, 38, 90, 94, 38, 38, 39,
-
- 39, 38, 95, 168, 91, 96, 168, 97, 99, 100,
- 101, 40, 102, 179, 103, 40, 179, 106, 104, 90,
- 107, 94, 108, 109, 110, 205, 111, 95, 91, 112,
- 96, 97, 99, 100, 101, 105, 40, 102, 103, 113,
- 40, 106, 114, 104, 107, 115, 116, 108, 109, 110,
- 111, 117, 122, 112, 119, 118, 205, 198, 205, 105,
- 198, 120, 121, 113, 123, 124, 114, 125, 126, 127,
- 115, 116, 83, 36, 36, 84, 117, 122, 119, 128,
- 118, 84, 36, 36, 84, 120, 121, 130, 123, 131,
- 124, 125, 126, 127, 98, 133, 134, 98, 132, 135,
-
- 205, 136, 205, 137, 128, 138, 139, 140, 141, 142,
- 144, 130, 143, 144, 131, 146, 147, 148, 149, 133,
- 134, 150, 132, 151, 135, 129, 136, 137, 152, 138,
- 139, 140, 153, 141, 142, 145, 143, 154, 155, 146,
- 147, 156, 148, 149, 157, 158, 150, 151, 159, 129,
- 160, 161, 166, 152, 162, 163, 167, 153, 169, 145,
- 170, 154, 171, 155, 144, 156, 172, 144, 157, 158,
- 205, 173, 174, 159, 175, 160, 161, 166, 162, 163,
- 176, 167, 177, 169, 170, 178, 171, 181, 179, 168,
- 172, 179, 168, 183, 165, 173, 184, 174, 175, 185,
-
- 186, 205, 187, 179, 176, 179, 179, 177, 179, 178,
- 182, 181, 190, 205, 191, 194, 180, 183, 165, 192,
- 184, 193, 195, 203, 185, 186, 187, 197, 179, 188,
- 199, 179, 200, 199, 189, 182, 205, 190, 191, 194,
- 180, 205, 198, 205, 192, 198, 193, 195, 203, 199,
- 205, 197, 199, 188, 205, 205, 200, 205, 189, 196,
- 204, 204, 205, 204, 204, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 202, 205, 205, 205, 205,
- 205, 205, 205, 196, 205, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 202,
-
- 41, 41, 205, 41, 41, 50, 50, 86, 86, 205,
- 86, 86, 164, 205, 205, 164, 201, 205, 205, 201,
- 3, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 11,
+ 13, 4, 14, 15, 11, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 24, 26, 27, 28, 29,
+ 30, 24, 31, 32, 33, 24, 24, 34, 24, 24,
+ 24, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 24, 31, 32, 33, 24,
+ 24, 34, 24, 24, 35, 48, 49, 36, 37, 38,
+ 38, 39, 40, 41, 41, 40, 40, 41, 41, 40,
+ 39, 38, 38, 39, 50, 51, 54, 56, 57, 112,
+ 59, 42, 112, 55, 58, 42, 98, 60, 65, 61,
+
+ 98, 66, 84, 63, 44, 70, 48, 49, 52, 62,
+ 71, 54, 56, 57, 59, 100, 42, 55, 58, 64,
+ 42, 60, 65, 61, 67, 66, 101, 84, 63, 75,
+ 70, 68, 85, 62, 71, 72, 47, 69, 76, 73,
+ 100, 46, 86, 64, 81, 44, 87, 95, 74, 67,
+ 82, 101, 99, 83, 75, 68, 77, 85, 102, 247,
+ 72, 69, 76, 78, 73, 79, 86, 80, 81, 88,
+ 87, 95, 74, 247, 82, 89, 99, 83, 90, 91,
+ 247, 77, 40, 102, 92, 40, 247, 78, 247, 79,
+ 145, 80, 247, 145, 88, 93, 38, 38, 94, 89,
+
+ 247, 42, 107, 90, 91, 103, 106, 108, 92, 94,
+ 38, 38, 94, 37, 38, 38, 39, 39, 38, 38,
+ 39, 40, 41, 41, 40, 104, 42, 107, 109, 103,
+ 106, 110, 108, 111, 105, 113, 114, 115, 197, 116,
+ 42, 197, 117, 118, 247, 119, 122, 120, 124, 104,
+ 123, 125, 126, 109, 127, 128, 110, 111, 105, 113,
+ 114, 129, 115, 116, 121, 42, 117, 130, 118, 119,
+ 122, 131, 120, 124, 123, 132, 125, 126, 127, 128,
+ 133, 247, 135, 136, 134, 129, 137, 138, 121, 139,
+ 140, 130, 93, 38, 38, 94, 131, 141, 142, 144,
+
+ 132, 94, 38, 38, 94, 133, 135, 136, 143, 134,
+ 137, 147, 138, 139, 140, 145, 148, 149, 145, 150,
+ 153, 141, 112, 142, 144, 112, 53, 152, 155, 154,
+ 157, 156, 143, 158, 159, 147, 160, 247, 161, 162,
+ 148, 149, 163, 164, 150, 153, 165, 166, 247, 167,
+ 170, 152, 155, 154, 157, 151, 156, 158, 171, 159,
+ 172, 160, 161, 162, 173, 168, 163, 164, 168, 174,
+ 177, 165, 166, 167, 170, 175, 176, 180, 181, 151,
+ 182, 184, 171, 183, 185, 172, 186, 187, 188, 173,
+ 189, 247, 169, 190, 174, 177, 191, 192, 195, 175,
+
+ 176, 180, 196, 181, 198, 182, 184, 183, 185, 168,
+ 186, 187, 168, 188, 199, 189, 169, 205, 190, 201,
+ 191, 192, 202, 195, 203, 204, 206, 196, 207, 198,
+ 208, 236, 209, 213, 236, 197, 215, 210, 197, 199,
+ 210, 194, 205, 201, 216, 211, 202, 217, 203, 204,
+ 206, 210, 207, 218, 210, 208, 209, 213, 214, 211,
+ 215, 219, 221, 210, 220, 194, 210, 220, 216, 226,
+ 225, 211, 217, 227, 228, 247, 229, 223, 218, 230,
+ 247, 212, 221, 214, 231, 219, 220, 221, 232, 220,
+ 247, 234, 222, 226, 224, 225, 235, 223, 227, 228,
+
+ 229, 223, 237, 210, 230, 212, 210, 221, 239, 231,
+ 240, 211, 242, 232, 222, 234, 222, 247, 224, 238,
+ 235, 223, 238, 247, 245, 236, 237, 211, 236, 247,
+ 243, 247, 239, 243, 247, 240, 233, 242, 222, 243,
+ 246, 246, 243, 246, 246, 247, 247, 247, 221, 245,
+ 247, 247, 247, 247, 247, 247, 247, 247, 244, 247,
+ 233, 247, 247, 223, 247, 247, 247, 244, 247, 247,
+ 247, 247, 247, 221, 247, 247, 247, 247, 247, 247,
+ 247, 247, 244, 247, 247, 247, 247, 223, 247, 247,
+ 247, 244, 43, 43, 247, 43, 43, 43, 45, 45,
+
+ 53, 53, 53, 96, 96, 96, 97, 97, 247, 97,
+ 97, 97, 146, 247, 146, 146, 146, 178, 247, 247,
+ 178, 178, 179, 179, 179, 193, 247, 247, 193, 200,
+ 200, 200, 241, 247, 247, 241, 3, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
+
+ 247
} ;
-static yyconst flex_int16_t yy_chk[584] =
+static yyconst flex_int16_t yy_chk[702] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -573,64 +601,78 @@ static yyconst flex_int16_t yy_chk[584] =
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, 2, 13, 13, 2, 5, 5, 5, 5,
- 6, 6, 6, 6, 7, 7, 7, 7, 8, 8,
- 8, 8, 14, 14, 16, 18, 19, 6, 21, 23,
- 87, 7, 45, 20, 22, 20, 23, 22, 24, 41,
-
- 29, 51, 25, 15, 21, 20, 25, 12, 16, 18,
- 19, 11, 6, 21, 23, 25, 7, 20, 22, 20,
- 23, 22, 24, 26, 27, 29, 51, 25, 21, 20,
- 40, 25, 26, 27, 28, 27, 30, 55, 31, 25,
- 28, 46, 46, 28, 31, 52, 30, 54, 26, 27,
- 30, 32, 32, 9, 40, 3, 26, 27, 28, 27,
- 0, 30, 55, 31, 28, 0, 0, 28, 31, 52,
- 30, 54, 60, 0, 30, 60, 32, 32, 33, 33,
- 33, 33, 34, 34, 34, 34, 35, 35, 35, 35,
- 37, 37, 37, 37, 38, 53, 56, 38, 39, 39,
-
- 39, 39, 57, 149, 53, 58, 149, 59, 62, 62,
- 63, 38, 64, 164, 65, 39, 164, 67, 66, 53,
- 68, 56, 70, 72, 73, 0, 74, 57, 53, 75,
- 58, 59, 62, 62, 63, 66, 38, 64, 65, 76,
- 39, 67, 77, 66, 68, 78, 79, 70, 72, 73,
- 74, 81, 90, 75, 82, 81, 0, 195, 0, 66,
- 195, 85, 89, 76, 91, 92, 77, 94, 95, 96,
- 78, 79, 83, 83, 83, 83, 81, 90, 82, 97,
- 81, 84, 84, 84, 84, 85, 89, 99, 91, 100,
- 92, 94, 95, 96, 98, 101, 102, 98, 100, 103,
-
- 0, 105, 0, 106, 97, 108, 109, 110, 112, 114,
- 116, 99, 115, 116, 100, 117, 118, 119, 120, 101,
- 102, 121, 100, 126, 103, 98, 105, 106, 127, 108,
- 109, 110, 128, 112, 114, 116, 115, 129, 130, 117,
- 118, 131, 119, 120, 134, 135, 121, 126, 136, 98,
- 140, 141, 147, 127, 142, 143, 148, 128, 150, 116,
- 151, 129, 153, 130, 144, 131, 155, 144, 134, 135,
- 0, 156, 158, 136, 160, 140, 141, 147, 142, 143,
- 161, 148, 162, 150, 151, 163, 153, 167, 165, 168,
- 155, 165, 168, 169, 144, 156, 170, 158, 160, 172,
-
- 173, 0, 175, 179, 161, 180, 179, 162, 180, 163,
- 168, 167, 182, 0, 183, 187, 165, 169, 144, 185,
- 170, 186, 188, 202, 172, 173, 175, 193, 189, 179,
- 196, 189, 197, 196, 180, 168, 0, 182, 183, 187,
- 165, 0, 198, 0, 185, 198, 186, 188, 202, 199,
- 0, 193, 199, 179, 201, 0, 197, 201, 180, 189,
- 203, 204, 0, 203, 204, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 199, 0, 0, 0, 0,
- 0, 0, 0, 189, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 199,
-
- 206, 206, 0, 206, 206, 207, 207, 208, 208, 0,
- 208, 208, 209, 0, 0, 209, 210, 0, 0, 210,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205
+ 1, 1, 1, 1, 2, 14, 14, 2, 5, 5,
+ 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,
+ 8, 8, 8, 8, 15, 15, 17, 18, 19, 66,
+ 20, 6, 66, 17, 19, 7, 98, 21, 23, 21,
+
+ 48, 23, 31, 22, 43, 26, 49, 49, 16, 21,
+ 26, 17, 18, 19, 20, 55, 6, 17, 19, 22,
+ 7, 21, 23, 21, 25, 23, 56, 31, 22, 28,
+ 26, 25, 32, 21, 26, 27, 13, 25, 28, 27,
+ 55, 12, 32, 22, 30, 9, 32, 42, 27, 25,
+ 30, 56, 54, 30, 28, 25, 29, 32, 57, 3,
+ 27, 25, 28, 29, 27, 29, 32, 29, 30, 33,
+ 32, 42, 27, 0, 30, 33, 54, 30, 34, 34,
+ 0, 29, 40, 57, 34, 40, 0, 29, 0, 29,
+ 145, 29, 0, 145, 33, 35, 35, 35, 35, 33,
+
+ 0, 40, 61, 34, 34, 58, 60, 62, 34, 36,
+ 36, 36, 36, 37, 37, 37, 37, 39, 39, 39,
+ 39, 41, 41, 41, 41, 59, 40, 61, 63, 58,
+ 60, 64, 62, 65, 59, 68, 68, 69, 174, 70,
+ 41, 174, 71, 72, 0, 73, 75, 74, 79, 59,
+ 76, 81, 82, 63, 83, 84, 64, 65, 59, 68,
+ 68, 85, 69, 70, 74, 41, 71, 86, 72, 73,
+ 75, 87, 74, 79, 76, 88, 81, 82, 83, 84,
+ 90, 0, 91, 92, 90, 85, 95, 99, 74, 101,
+ 102, 86, 93, 93, 93, 93, 87, 103, 104, 106,
+
+ 88, 94, 94, 94, 94, 90, 91, 92, 105, 90,
+ 95, 108, 99, 101, 102, 107, 109, 110, 107, 111,
+ 114, 103, 112, 104, 106, 112, 107, 113, 115, 114,
+ 117, 116, 105, 118, 119, 108, 121, 0, 122, 124,
+ 109, 110, 125, 126, 111, 114, 128, 130, 0, 131,
+ 133, 113, 115, 114, 117, 112, 116, 118, 134, 119,
+ 135, 121, 122, 124, 136, 132, 125, 126, 132, 137,
+ 141, 128, 130, 131, 133, 138, 139, 148, 149, 112,
+ 150, 152, 134, 151, 153, 135, 158, 159, 160, 136,
+ 164, 0, 132, 165, 137, 141, 166, 167, 171, 138,
+
+ 139, 148, 172, 149, 176, 150, 152, 151, 153, 168,
+ 158, 159, 168, 160, 177, 164, 132, 187, 165, 180,
+ 166, 167, 182, 171, 184, 185, 189, 172, 190, 176,
+ 191, 231, 192, 196, 231, 197, 199, 193, 197, 177,
+ 193, 168, 187, 180, 201, 193, 182, 203, 184, 185,
+ 189, 194, 190, 204, 194, 191, 192, 196, 197, 194,
+ 199, 206, 211, 212, 210, 168, 212, 210, 201, 215,
+ 214, 212, 203, 217, 218, 0, 219, 211, 204, 221,
+ 0, 194, 210, 197, 222, 206, 220, 211, 223, 220,
+ 0, 228, 210, 215, 212, 214, 230, 210, 217, 218,
+
+ 219, 211, 232, 224, 221, 194, 224, 210, 234, 222,
+ 235, 224, 237, 223, 220, 228, 210, 0, 212, 233,
+ 230, 210, 233, 0, 244, 236, 232, 233, 236, 0,
+ 238, 241, 234, 238, 241, 235, 224, 237, 220, 243,
+ 245, 246, 243, 245, 246, 0, 0, 0, 238, 244,
+ 0, 0, 0, 0, 0, 0, 0, 0, 238, 0,
+ 224, 0, 0, 238, 0, 0, 0, 243, 0, 0,
+ 0, 0, 0, 238, 0, 0, 0, 0, 0, 0,
+ 0, 0, 238, 0, 0, 0, 0, 238, 0, 0,
+ 0, 243, 248, 248, 0, 248, 248, 248, 249, 249,
+
+ 250, 250, 250, 251, 251, 251, 252, 252, 0, 252,
+ 252, 252, 253, 0, 253, 253, 253, 254, 0, 0,
+ 254, 254, 255, 255, 255, 256, 0, 0, 256, 257,
+ 257, 257, 258, 0, 0, 258, 247, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
+
+ 247
} ;
static yy_state_type yy_last_accepting_state;
@@ -669,7 +711,8 @@ char *yytext;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
-#line 25 "engines/director/lingo/lingo-lex.l"
+#define YY_NO_INPUT 1
+#line 28 "engines/director/lingo/lingo-lex.l"
#define FORBIDDEN_SYMBOL_ALLOW_ALL
@@ -704,7 +747,7 @@ static void countnl() {
g_lingo->_colnumber = strlen(p);
}
-#line 708 "engines/director/lingo/lingo-lex.cpp"
+#line 751 "engines/director/lingo/lingo-lex.cpp"
#define INITIAL 0
@@ -763,8 +806,6 @@ extern int yywrap (void );
#endif
#endif
- static void yyunput (int c,char *buf_ptr );
-
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
@@ -888,11 +929,11 @@ YY_DECL
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
-
-#line 69 "engines/director/lingo/lingo-lex.l"
+
+#line 72 "engines/director/lingo/lingo-lex.l"
-#line 896 "engines/director/lingo/lingo-lex.cpp"
+#line 937 "engines/director/lingo/lingo-lex.cpp"
if ( !(yy_init) )
{
@@ -946,13 +987,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 206 )
+ if ( yy_current_state >= 248 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 521 );
+ while ( yy_base[yy_current_state] != 637 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -978,194 +1019,239 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 71 "engines/director/lingo/lingo-lex.l"
+#line 74 "engines/director/lingo/lingo-lex.l"
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 72 "engines/director/lingo/lingo-lex.l"
+#line 75 "engines/director/lingo/lingo-lex.l"
{ count(); }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 73 "engines/director/lingo/lingo-lex.l"
+#line 76 "engines/director/lingo/lingo-lex.l"
{ count(); return ' '; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 75 "engines/director/lingo/lingo-lex.l"
-{ count(); return tAND; }
+#line 78 "engines/director/lingo/lingo-lex.l"
+{ count(); yylval.s = new Common::String(yytext); return SYMBOL; } // D3
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 76 "engines/director/lingo/lingo-lex.l"
-{ count(); return tCONTAINS; }
+#line 80 "engines/director/lingo/lingo-lex.l"
+{ count(); return tAFTER; } // D3
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 77 "engines/director/lingo/lingo-lex.l"
-{ count(); return tDONE; }
+#line 81 "engines/director/lingo/lingo-lex.l"
+{ count(); return tAND; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 78 "engines/director/lingo/lingo-lex.l"
-{ count(); return tDOWN; }
+#line 82 "engines/director/lingo/lingo-lex.l"
+{ count(); return tBEFORE; } // D3
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 79 "engines/director/lingo/lingo-lex.l"
-{ count(); return tIF; }
+#line 83 "engines/director/lingo/lingo-lex.l"
+{ count(); return tCHAR; } // D3
YY_BREAK
case 9:
-/* rule 9 can match eol */
YY_RULE_SETUP
-#line 80 "engines/director/lingo/lingo-lex.l"
-{ countnl(); return tNLELSIF; }
+#line 84 "engines/director/lingo/lingo-lex.l"
+{ count(); return tCONTAINS; }
YY_BREAK
case 10:
-/* rule 10 can match eol */
YY_RULE_SETUP
-#line 81 "engines/director/lingo/lingo-lex.l"
-{ countnl(); return tNLELSE; }
+#line 85 "engines/director/lingo/lingo-lex.l"
+{ count(); return tDONE; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 82 "engines/director/lingo/lingo-lex.l"
-{ count(); return tELSE; }
+#line 86 "engines/director/lingo/lingo-lex.l"
+{ count(); return tDOWN; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 83 "engines/director/lingo/lingo-lex.l"
-{ count(); return tEND; }
+#line 87 "engines/director/lingo/lingo-lex.l"
+{ count(); return tIF; }
YY_BREAK
case 13:
+/* rule 13 can match eol */
YY_RULE_SETUP
-#line 84 "engines/director/lingo/lingo-lex.l"
-{ count(); return tFACTORY; }
+#line 88 "engines/director/lingo/lingo-lex.l"
+{ countnl(); return tNLELSIF; }
YY_BREAK
case 14:
+/* rule 14 can match eol */
YY_RULE_SETUP
-#line 85 "engines/director/lingo/lingo-lex.l"
-{ count(); return tEXIT; }
+#line 89 "engines/director/lingo/lingo-lex.l"
+{ countnl(); return tNLELSE; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 86 "engines/director/lingo/lingo-lex.l"
-{ count(); return tFRAME; }
+#line 90 "engines/director/lingo/lingo-lex.l"
+{ count(); return tELSE; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 87 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGLOBAL; }
+#line 91 "engines/director/lingo/lingo-lex.l"
+{
+ count();
+
+ const char *ptr = &yytext[4]; // Skip 'end '
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
+ yylval.s = new Common::String(ptr);
+
+ return ENDCLAUSE;
+ }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 88 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGO; }
+#line 102 "engines/director/lingo/lingo-lex.l"
+{ count(); return tFACTORY; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 89 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGO; }
+#line 103 "engines/director/lingo/lingo-lex.l"
+{ count(); return tEXIT; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 90 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINSTANCE; }
+#line 104 "engines/director/lingo/lingo-lex.l"
+{ count(); return tFRAME; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 91 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINTERSECTS; }
+#line 105 "engines/director/lingo/lingo-lex.l"
+{ count(); return tGLOBAL; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 92 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINTO; }
+#line 106 "engines/director/lingo/lingo-lex.l"
+{ count(); return tGO; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 93 "engines/director/lingo/lingo-lex.l"
-{ count(); return tLOOP; }
+#line 107 "engines/director/lingo/lingo-lex.l"
+{ count(); return tGO; }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 94 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMACRO; }
+#line 108 "engines/director/lingo/lingo-lex.l"
+{ count(); return tINSTANCE; }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 95 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMETHOD; }
+#line 109 "engines/director/lingo/lingo-lex.l"
+{ count(); return tINTERSECTS; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 96 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMOD; }
+#line 110 "engines/director/lingo/lingo-lex.l"
+{ count(); return tINTO; }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 97 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMOVIE; }
+#line 111 "engines/director/lingo/lingo-lex.l"
+{ count(); return tITEM; }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 98 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNEXT; }
+#line 112 "engines/director/lingo/lingo-lex.l"
+{ count(); return tLINE; }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 99 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNOT; }
+#line 113 "engines/director/lingo/lingo-lex.l"
+{ count(); return tLOOP; }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 100 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOF; }
+#line 114 "engines/director/lingo/lingo-lex.l"
+{ count(); return tMACRO; }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 101 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOPEN; }
+#line 115 "engines/director/lingo/lingo-lex.l"
+{ count(); return tMETHOD; }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 102 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOR; }
+#line 116 "engines/director/lingo/lingo-lex.l"
+{ count(); return tMOD; }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 103 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPLAY; }
+#line 117 "engines/director/lingo/lingo-lex.l"
+{ count(); return tMOVIE; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 104 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPREVIOUS; }
+#line 118 "engines/director/lingo/lingo-lex.l"
+{ count(); return tNEXT; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 105 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPUT; }
+#line 119 "engines/director/lingo/lingo-lex.l"
+{ count(); return tNOT; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 106 "engines/director/lingo/lingo-lex.l"
-{ count(); return tREPEAT; }
+#line 120 "engines/director/lingo/lingo-lex.l"
+{ count(); return tOF; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 107 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSET; }
+#line 121 "engines/director/lingo/lingo-lex.l"
+{ count(); return tON; } // D3
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 108 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSTARTS; }
+#line 122 "engines/director/lingo/lingo-lex.l"
+{ count(); return tOPEN; }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 109 "engines/director/lingo/lingo-lex.l"
+#line 123 "engines/director/lingo/lingo-lex.l"
+{ count(); return tOR; }
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 124 "engines/director/lingo/lingo-lex.l"
+{ count(); return tPLAY; }
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 125 "engines/director/lingo/lingo-lex.l"
+{ count(); return tPREVIOUS; }
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 126 "engines/director/lingo/lingo-lex.l"
+{ count(); return tPUT; }
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 127 "engines/director/lingo/lingo-lex.l"
+{ count(); return tREPEAT; }
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 128 "engines/director/lingo/lingo-lex.l"
+{ count(); return tSET; }
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 129 "engines/director/lingo/lingo-lex.l"
+{ count(); return tSTARTS; }
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 130 "engines/director/lingo/lingo-lex.l"
{
count();
@@ -1175,9 +1261,9 @@ YY_RULE_SETUP
return THEENTITYWITHID;
}
YY_BREAK
-case 39:
+case 46:
YY_RULE_SETUP
-#line 117 "engines/director/lingo/lingo-lex.l"
+#line 138 "engines/director/lingo/lingo-lex.l"
{
count();
@@ -1219,9 +1305,44 @@ YY_RULE_SETUP
warning("Unhandled the entity %s", ptr);
}
YY_BREAK
-case 40:
+case 47:
YY_RULE_SETUP
-#line 157 "engines/director/lingo/lingo-lex.l"
+#line 178 "engines/director/lingo/lingo-lex.l"
+{
+ count();
+
+ const char *ptr = &yytext[4]; // Skip 'the '
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
+ Common::String field;
+ while (*ptr != ' ' && *ptr != '\t')
+ field += *ptr++;
+
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
+ field = Common::String::format("%d%s", g_lingo->_theEntities[ptr]->entity, field.c_str());
+
+ if (!g_lingo->_theEntityFields.contains(field)) {
+ error("Unhandled the field %s", ptr);
+ }
+
+ if (g_lingo->_theEntityFields[field]->entity != g_lingo->_theEntities[ptr]->entity)
+ error("Unsupported field '%s' for entity '%s'", field.c_str(), ptr);
+
+ yylval.e[0] = g_lingo->_theEntities[ptr]->entity;
+ yylval.e[1] = g_lingo->_theEntityFields[field]->field;
+
+ if (g_lingo->_theEntities[ptr]->hasId)
+ return THEENTITYWITHID;
+ else
+ return THEENTITY;
+ }
+ YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 209 "engines/director/lingo/lingo-lex.l"
{
count();
@@ -1242,81 +1363,98 @@ YY_RULE_SETUP
warning("Unhandled the entity %s", ptr);
}
YY_BREAK
-case 41:
+case 49:
YY_RULE_SETUP
-#line 176 "engines/director/lingo/lingo-lex.l"
+#line 228 "engines/director/lingo/lingo-lex.l"
{ count(); return tTHEN; }
YY_BREAK
-case 42:
+case 50:
YY_RULE_SETUP
-#line 177 "engines/director/lingo/lingo-lex.l"
+#line 229 "engines/director/lingo/lingo-lex.l"
{ count(); return tTO; }
YY_BREAK
-case 43:
+case 51:
YY_RULE_SETUP
-#line 178 "engines/director/lingo/lingo-lex.l"
+#line 230 "engines/director/lingo/lingo-lex.l"
{ count(); return tSPRITE; }
YY_BREAK
-case 44:
+case 52:
YY_RULE_SETUP
-#line 179 "engines/director/lingo/lingo-lex.l"
+#line 231 "engines/director/lingo/lingo-lex.l"
{ count(); return tWITH; }
YY_BREAK
-case 45:
+case 53:
YY_RULE_SETUP
-#line 180 "engines/director/lingo/lingo-lex.l"
+#line 232 "engines/director/lingo/lingo-lex.l"
{ count(); return tWITHIN; }
YY_BREAK
-case 46:
+case 54:
YY_RULE_SETUP
-#line 181 "engines/director/lingo/lingo-lex.l"
+#line 233 "engines/director/lingo/lingo-lex.l"
{ count(); return tWHEN; }
YY_BREAK
-case 47:
+case 55:
YY_RULE_SETUP
-#line 182 "engines/director/lingo/lingo-lex.l"
+#line 234 "engines/director/lingo/lingo-lex.l"
{ count(); return tWHILE; }
YY_BREAK
-case 48:
+case 56:
+YY_RULE_SETUP
+#line 235 "engines/director/lingo/lingo-lex.l"
+{ count(); return tWORD; }
+ YY_BREAK
+case 57:
YY_RULE_SETUP
-#line 184 "engines/director/lingo/lingo-lex.l"
+#line 237 "engines/director/lingo/lingo-lex.l"
{ count(); return tNEQ; }
YY_BREAK
-case 49:
+case 58:
YY_RULE_SETUP
-#line 185 "engines/director/lingo/lingo-lex.l"
+#line 238 "engines/director/lingo/lingo-lex.l"
{ count(); return tGE; }
YY_BREAK
-case 50:
+case 59:
YY_RULE_SETUP
-#line 186 "engines/director/lingo/lingo-lex.l"
+#line 239 "engines/director/lingo/lingo-lex.l"
{ count(); return tLE; }
YY_BREAK
-case 51:
+case 60:
YY_RULE_SETUP
-#line 187 "engines/director/lingo/lingo-lex.l"
+#line 240 "engines/director/lingo/lingo-lex.l"
{ count(); return tCONCAT; }
YY_BREAK
-case 52:
+case 61:
YY_RULE_SETUP
-#line 189 "engines/director/lingo/lingo-lex.l"
+#line 242 "engines/director/lingo/lingo-lex.l"
{
count();
yylval.s = new Common::String(yytext);
- if (g_lingo->_handlers.contains(yytext)) {
- if (g_lingo->_handlers[yytext]->type == BLTIN && g_lingo->_handlers[yytext]->parens == false) {
- if (g_lingo->_handlers[yytext]->nargs == 0) {
- if (g_lingo->_handlers[yytext]->maxArgs == 0)
+ if (g_lingo->_ignoreMe && yylval.s->equalsIgnoreCase("me"))
+ return ID;
+
+ if (g_lingo->_twoWordBuiltins.contains(yytext))
+ return TWOWORDBUILTIN;
+
+ // Special treatment of 'me'. First parameter is method name
+ if (!g_lingo->_currentFactory.empty()) {
+ if (yylval.s->equalsIgnoreCase("me"))
+ return tME;
+ }
+
+ if (g_lingo->_builtins.contains(yytext)) {
+ if (g_lingo->_builtins[yytext]->type == BLTIN && g_lingo->_builtins[yytext]->parens == false) {
+ if (g_lingo->_builtins[yytext]->nargs == 0) {
+ if (g_lingo->_builtins[yytext]->maxArgs == 0)
return BLTINNOARGS;
- else if (g_lingo->_handlers[yytext]->maxArgs == 1)
+ else if (g_lingo->_builtins[yytext]->maxArgs == 1)
return BLTINNOARGSORONE;
else
error("Incorrect setup for builtin: %s", yytext);
- } else if (g_lingo->_handlers[yytext]->nargs == 1 &&
- g_lingo->_handlers[yytext]->maxArgs == 1) {
+ } else if (g_lingo->_builtins[yytext]->nargs == 1 &&
+ g_lingo->_builtins[yytext]->maxArgs == 1) {
return BLTINONEARG;
- } else if (g_lingo->_handlers[yytext]->nargs == -1) {
+ } else if (g_lingo->_builtins[yytext]->nargs == -1) {
return BLTINARGLIST;
} else {
error("Incorrect setup for builtin: %s", yytext);
@@ -1327,43 +1465,43 @@ YY_RULE_SETUP
return ID;
}
YY_BREAK
-case 53:
+case 62:
YY_RULE_SETUP
-#line 215 "engines/director/lingo/lingo-lex.l"
+#line 280 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.f = atof(yytext); return FLOAT; }
YY_BREAK
-case 54:
+case 63:
YY_RULE_SETUP
-#line 216 "engines/director/lingo/lingo-lex.l"
+#line 281 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
YY_BREAK
-case 55:
+case 64:
YY_RULE_SETUP
-#line 217 "engines/director/lingo/lingo-lex.l"
+#line 282 "engines/director/lingo/lingo-lex.l"
{ count(); return *yytext; }
YY_BREAK
-case 56:
-/* rule 56 can match eol */
+case 65:
+/* rule 65 can match eol */
YY_RULE_SETUP
-#line 218 "engines/director/lingo/lingo-lex.l"
+#line 283 "engines/director/lingo/lingo-lex.l"
{ return '\n'; }
YY_BREAK
-case 57:
+case 66:
YY_RULE_SETUP
-#line 219 "engines/director/lingo/lingo-lex.l"
+#line 284 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
YY_BREAK
-case 58:
+case 67:
YY_RULE_SETUP
-#line 220 "engines/director/lingo/lingo-lex.l"
+#line 285 "engines/director/lingo/lingo-lex.l"
YY_BREAK
-case 59:
+case 68:
YY_RULE_SETUP
-#line 222 "engines/director/lingo/lingo-lex.l"
+#line 287 "engines/director/lingo/lingo-lex.l"
ECHO;
YY_BREAK
-#line 1367 "engines/director/lingo/lingo-lex.cpp"
+#line 1505 "engines/director/lingo/lingo-lex.cpp"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1641,7 +1779,7 @@ static int yy_get_next_buffer (void)
{
register yy_state_type yy_current_state;
register char *yy_cp;
-
+
yy_current_state = (yy_start);
yy_current_state += YY_AT_BOL();
@@ -1656,7 +1794,7 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 206 )
+ if ( yy_current_state >= 248 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1684,52 +1822,15 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 206 )
+ if ( yy_current_state >= 248 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 205);
+ yy_is_jam = (yy_current_state == 247);
return yy_is_jam ? 0 : yy_current_state;
}
- static void yyunput (int c, register char * yy_bp )
-{
- register char *yy_cp;
-
- yy_cp = (yy_c_buf_p);
-
- /* undo effects of setting up yytext */
- *yy_cp = (yy_hold_char);
-
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- register yy_size_t number_to_move = (yy_n_chars) + 2;
- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- register char *source =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
-
- while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
- *--dest = *--source;
-
- yy_cp += (int) (dest - source);
- yy_bp += (int) (dest - source);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
-
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- *--yy_cp = (char) c;
-
- (yytext_ptr) = yy_bp;
- (yy_hold_char) = *yy_cp;
- (yy_c_buf_p) = yy_cp;
-}
-
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
@@ -1739,7 +1840,7 @@ static int yy_get_next_buffer (void)
{
int c;
-
+
*(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
@@ -1808,12 +1909,12 @@ static int yy_get_next_buffer (void)
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
- *
+ *
* @note This function does not reset the start condition to @c INITIAL .
*/
void yyrestart (FILE * input_file )
{
-
+
if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
@@ -1826,11 +1927,11 @@ static int yy_get_next_buffer (void)
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
- *
+ *
*/
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
-
+
/* TODO. We should be able to replace this entire function body
* with
* yypop_buffer_state();
@@ -1870,13 +1971,13 @@ static void yy_load_buffer_state (void)
/** Allocate and initialize an input buffer state.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
+ *
* @return the allocated buffer state.
*/
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
-
+
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -1899,11 +2000,11 @@ static void yy_load_buffer_state (void)
/** Destroy the buffer.
* @param b a buffer created with yy_create_buffer()
- *
+ *
*/
void yy_delete_buffer (YY_BUFFER_STATE b )
{
-
+
if ( ! b )
return;
@@ -1919,7 +2020,7 @@ static void yy_load_buffer_state (void)
#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
-
+
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF.
@@ -1928,7 +2029,7 @@ extern int isatty (int );
{
int oerrno = errno;
-
+
yy_flush_buffer(b );
b->yy_input_file = file;
@@ -1944,13 +2045,13 @@ extern int isatty (int );
}
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
+
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
+ *
*/
void yy_flush_buffer (YY_BUFFER_STATE b )
{
@@ -1979,7 +2080,7 @@ extern int isatty (int );
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
- *
+ *
*/
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
@@ -2009,7 +2110,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
- *
+ *
*/
void yypop_buffer_state (void)
{
@@ -2033,7 +2134,7 @@ void yypop_buffer_state (void)
static void yyensure_buffer_stack (void)
{
yy_size_t num_to_alloc;
-
+
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
@@ -2046,9 +2147,9 @@ static void yyensure_buffer_stack (void)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
@@ -2076,13 +2177,13 @@ static void yyensure_buffer_stack (void)
/** Setup the input buffer state to scan directly from a user-specified character buffer.
* @param base the character buffer
* @param size the size in bytes of the character buffer
- *
- * @return the newly allocated buffer state object.
+ *
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -2111,14 +2212,14 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
- *
+ *
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
* yy_scan_bytes() instead.
*/
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
{
-
+
return yy_scan_bytes(yystr,strlen(yystr) );
}
@@ -2126,7 +2227,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
* scan from a @e copy of @a bytes.
* @param bytes the byte buffer to scan
* @param len the number of bytes in the buffer pointed to by @a bytes.
- *
+ *
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
@@ -2134,7 +2235,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len
YY_BUFFER_STATE b;
char *buf;
yy_size_t n, i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) yyalloc(n );
@@ -2188,16 +2289,16 @@ static void yy_fatal_error (yyconst char* msg )
/* Accessor methods (get/set functions) to struct members. */
/** Get the current line number.
- *
+ *
*/
int yyget_lineno (void)
{
-
+
return yylineno;
}
/** Get the input stream.
- *
+ *
*/
FILE *yyget_in (void)
{
@@ -2205,7 +2306,7 @@ FILE *yyget_in (void)
}
/** Get the output stream.
- *
+ *
*/
FILE *yyget_out (void)
{
@@ -2213,7 +2314,7 @@ FILE *yyget_out (void)
}
/** Get the length of the current token.
- *
+ *
*/
yy_size_t yyget_leng (void)
{
@@ -2221,7 +2322,7 @@ yy_size_t yyget_leng (void)
}
/** Get the current token.
- *
+ *
*/
char *yyget_text (void)
@@ -2231,18 +2332,18 @@ char *yyget_text (void)
/** Set the current line number.
* @param line_number
- *
+ *
*/
void yyset_lineno (int line_number )
{
-
+
yylineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
- *
+ *
* @see yy_switch_to_buffer
*/
void yyset_in (FILE * in_str )
@@ -2296,7 +2397,7 @@ static int yy_init_globals (void)
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy (void)
{
-
+
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
yy_delete_buffer(YY_CURRENT_BUFFER );
@@ -2363,7 +2464,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 222 "engines/director/lingo/lingo-lex.l"
+#line 287 "engines/director/lingo/lingo-lex.l"
@@ -2374,7 +2475,10 @@ namespace Director {
int Lingo::parse(const char *code) {
YY_BUFFER_STATE bp;
- yydebug = 0;
+ if (debugChannelSet(-1, kDebugLingoCompile))
+ yydebug = 1;
+ else
+ yydebug = 0;
yy_delete_buffer(YY_CURRENT_BUFFER);
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index c2a5b19fb9..5afe926913 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -21,6 +21,9 @@
*/
%option noyywrap
+%option nounput
+%option noinput
+
%{
#define FORBIDDEN_SYMBOL_ALLOW_ALL
@@ -37,12 +40,12 @@ static void count() {
g_lingo->_colnumber += strlen(yytext);
}
-#if defined(__PLAYSTATION2__) || defined(_MSC_VER)
+#if defined(__PLAYSTATION2__) || defined(_MSC_VER) || defined(__DC__)
// Stub for missing function
int isatty(int fileno) { return 0; }
#endif
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__DC__)
#define YY_NO_UNISTD_H
#endif
@@ -62,7 +65,7 @@ identifier [_[:alpha:]][_[:alnum:]]*
constfloat [[:digit:]]+\.[[:digit:]]*
constinteger [[:digit:]]+
conststring \"[^\"\r\n]*\"
-operator [-+*/%=^:,()><&]
+operator [-+*/%=^:,()><&\[\]]
newline [ \t]*[\n\r]
whitespace [\t ]
@@ -72,7 +75,12 @@ whitespace [\t ]
^{whitespace}+ { count(); }
[\t]+ { count(); return ' '; }
+[#]{identifier} { count(); yylval.s = new Common::String(yytext); return SYMBOL; } // D3
+
+(?i:after) { count(); return tAFTER; } // D3
(?i:and) { count(); return tAND; }
+(?i:before) { count(); return tBEFORE; } // D3
+(?i:char) { count(); return tCHAR; } // D3
(?i:contains) { count(); return tCONTAINS; }
(?i:done) { count(); return tDONE; }
(?i:down) { count(); return tDOWN; }
@@ -80,7 +88,17 @@ whitespace [\t ]
(?i:[\n\r]+[\t ]*else[\t ]+if) { countnl(); return tNLELSIF; }
(?i:[\n\r]+[\t ]*else) { countnl(); return tNLELSE; }
(?i:else) { count(); return tELSE; }
-(?i:end) { count(); return tEND; }
+(?i:end)([\t ]*{identifier})? {
+ count();
+
+ const char *ptr = &yytext[4]; // Skip 'end '
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
+ yylval.s = new Common::String(ptr);
+
+ return ENDCLAUSE;
+ }
(?i:factory) { count(); return tFACTORY; }
(?i:exit) { count(); return tEXIT; }
(?i:frame) { count(); return tFRAME; }
@@ -90,6 +108,8 @@ whitespace [\t ]
(?i:instance) { count(); return tINSTANCE; }
(?i:intersects) { count(); return tINTERSECTS; }
(?i:into) { count(); return tINTO; }
+(?i:item) { count(); return tITEM; }
+(?i:line) { count(); return tLINE; }
(?i:loop) { count(); return tLOOP; }
(?i:macro) { count(); return tMACRO; }
(?i:method) { count(); return tMETHOD; }
@@ -98,6 +118,7 @@ whitespace [\t ]
(?i:next) { count(); return tNEXT; }
(?i:not) { count(); return tNOT; }
(?i:of) { count(); return tOF; }
+(?i:on) { count(); return tON; } // D3
(?i:open) { count(); return tOPEN; }
(?i:or) { count(); return tOR; }
(?i:play) { count(); return tPLAY; }
@@ -154,6 +175,37 @@ whitespace [\t ]
warning("Unhandled the entity %s", ptr);
}
+(?i:the[ \t]+[[:alpha:]]+[ \t+](date|time)) {
+ count();
+
+ const char *ptr = &yytext[4]; // Skip 'the '
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
+ Common::String field;
+ while (*ptr != ' ' && *ptr != '\t')
+ field += *ptr++;
+
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
+ field = Common::String::format("%d%s", g_lingo->_theEntities[ptr]->entity, field.c_str());
+
+ if (!g_lingo->_theEntityFields.contains(field)) {
+ error("Unhandled the field %s", ptr);
+ }
+
+ if (g_lingo->_theEntityFields[field]->entity != g_lingo->_theEntities[ptr]->entity)
+ error("Unsupported field '%s' for entity '%s'", field.c_str(), ptr);
+
+ yylval.e[0] = g_lingo->_theEntities[ptr]->entity;
+ yylval.e[1] = g_lingo->_theEntityFields[field]->field;
+
+ if (g_lingo->_theEntities[ptr]->hasId)
+ return THEENTITYWITHID;
+ else
+ return THEENTITY;
+ }
(?i:the[ \t]+[[:alpha:]]+) {
count();
@@ -180,6 +232,7 @@ whitespace [\t ]
(?i:within) { count(); return tWITHIN; }
(?i:when) { count(); return tWHEN; }
(?i:while) { count(); return tWHILE; }
+(?i:word) { count(); return tWORD; }
[<][>] { count(); return tNEQ; }
[>][=] { count(); return tGE; }
@@ -190,19 +243,31 @@ whitespace [\t ]
count();
yylval.s = new Common::String(yytext);
- if (g_lingo->_handlers.contains(yytext)) {
- if (g_lingo->_handlers[yytext]->type == BLTIN && g_lingo->_handlers[yytext]->parens == false) {
- if (g_lingo->_handlers[yytext]->nargs == 0) {
- if (g_lingo->_handlers[yytext]->maxArgs == 0)
+ if (g_lingo->_ignoreMe && yylval.s->equalsIgnoreCase("me"))
+ return ID;
+
+ if (g_lingo->_twoWordBuiltins.contains(yytext))
+ return TWOWORDBUILTIN;
+
+ // Special treatment of 'me'. First parameter is method name
+ if (!g_lingo->_currentFactory.empty()) {
+ if (yylval.s->equalsIgnoreCase("me"))
+ return tME;
+ }
+
+ if (g_lingo->_builtins.contains(yytext)) {
+ if (g_lingo->_builtins[yytext]->type == BLTIN && g_lingo->_builtins[yytext]->parens == false) {
+ if (g_lingo->_builtins[yytext]->nargs == 0) {
+ if (g_lingo->_builtins[yytext]->maxArgs == 0)
return BLTINNOARGS;
- else if (g_lingo->_handlers[yytext]->maxArgs == 1)
+ else if (g_lingo->_builtins[yytext]->maxArgs == 1)
return BLTINNOARGSORONE;
else
error("Incorrect setup for builtin: %s", yytext);
- } else if (g_lingo->_handlers[yytext]->nargs == 1 &&
- g_lingo->_handlers[yytext]->maxArgs == 1) {
+ } else if (g_lingo->_builtins[yytext]->nargs == 1 &&
+ g_lingo->_builtins[yytext]->maxArgs == 1) {
return BLTINONEARG;
- } else if (g_lingo->_handlers[yytext]->nargs == -1) {
+ } else if (g_lingo->_builtins[yytext]->nargs == -1) {
return BLTINARGLIST;
} else {
error("Incorrect setup for builtin: %s", yytext);
@@ -228,7 +293,10 @@ namespace Director {
int Lingo::parse(const char *code) {
YY_BUFFER_STATE bp;
- yydebug = 0;
+ if (debugChannelSet(-1, kDebugLingoCompile))
+ yydebug = 1;
+ else
+ yydebug = 0;
yy_delete_buffer(YY_CURRENT_BUFFER);
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 270746678b..81dc490897 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -29,10 +29,13 @@ namespace Director {
class Sprite;
TheEntity entities[] = {
+ { kTheActorList, "actorList", false }, // D4 property
{ kTheBeepOn, "beepOn", false }, // D2 property
{ kTheButtonStyle, "buttonStyle", false }, // D2 p
- { kTheCast, "cast", true },
+ { kTheCast, "cast", true }, // D3
+ { kTheCastMembers, "castmembers", false }, // D3
{ kTheCenterStage, "centerStage", false }, // D2 p
+ { kTheChars, "chars", false }, // D3
{ kTheCheckBoxAccess, "checkBoxAccess", false }, // D2 p
{ kTheCheckBoxType, "checkBoxType", false }, // D2 p
{ kTheClickOn, "clickOn", false }, // D2 function
@@ -40,36 +43,46 @@ TheEntity entities[] = {
{ kTheColorQD, "colorQD", false }, // D2 f
{ kTheCommandDown, "commandDown", false }, // D2 f
{ kTheControlDown, "controlDown", false }, // D2 f
+ { kTheDate, "date", false }, // D3
{ kTheDoubleClick, "doubleClick", false }, // D2 f
{ kTheExitLock, "exitLock", false }, // D2 p
+ { kTheField, "field", true }, // D3
{ kTheFixStageSize, "fixStageSize", false }, // D2 p
- { kTheFloatPrecision, "floatPrecision", false },
+ { kTheFloatPrecision, "floatPrecision", false }, // D3 p
{ kTheFrame, "frame", false }, // D2 f
{ kTheFreeBlock, "freeBlock", false }, // D2 f
{ kTheFreeBytes, "freeBytes", false }, // D2 f
{ kTheFullColorPermit, "fullColorPermit", false }, // D2 p
{ kTheImageDirect, "imageDirect", false }, // D2 p
+ { kTheItems, "items", false }, // D3
{ kTheItemDelimiter, "itemDelimiter", false },
{ kTheKey, "key", false }, // D2 f
{ kTheKeyCode, "keyCode", false }, // D2 f
{ kTheKeyDownScript, "keyDownScript", false }, // D2 p
+ { kTheLabelList, "labelList", false }, // D3 f
{ kTheLastClick, "lastClick", false }, // D2 f
{ kTheLastEvent, "lastEvent", false }, // D2 f
{ kTheLastFrame, "lastFrame", false },
{ kTheLastKey, "lastKey", false }, // D2 f
{ kTheLastRoll, "lastRoll", false }, // D2 f
+ { kTheLines, "lines", false }, // D3
{ kTheMachineType, "machineType", false }, // D2 f
{ kTheMemorySize, "memorySize", false }, // D2 f
{ kTheMenu, "menu", true },
{ kTheMenus, "menus", false },
{ kTheMenuItem, "menuitem", true },
{ kTheMenuItems, "menuitems", false },
+ { kTheMouseCast, "mouseCast", false }, // D3 f
+ { kTheMouseChar, "mouseChar", false }, // D3 f
{ kTheMouseDown, "mouseDown", false }, // D2 f
{ kTheMouseDownScript, "mouseDownScript", false }, // D2 p
{ kTheMouseH, "mouseH", false }, // D2 f
+ { kTheMouseItem, "mouseItem", false }, // D3 f
+ { kTheMouseLine, "mouseLine", false }, // D3 f
{ kTheMouseUp, "mouseUp", false }, // D2 f
{ kTheMouseUpScript, "mouseUpScript", false }, // D2 p
{ kTheMouseV, "mouseV", false }, // D2 f
+ { kTheMouseWord, "mouseWord", false }, // D3 f
{ kTheMovie, "movie", false }, // D2 f
{ kTheMultiSound, "multiSound", false },
{ kTheOptionDown, "optionDown", false }, // D2 f
@@ -82,13 +95,16 @@ TheEntity entities[] = {
{ kTheRightMouseUp, "rightMouseUp", false },
{ kTheRomanLingo, "romanLingo", false },
{ kTheSelection, "selection", false }, // D2 f
+ { kTheSelEnd, "selEnd", false }, // D2 p
+ { kTheSelStart, "selStart", false }, // D2 p
{ kTheShiftDown, "shiftDown", false }, // D2 f
{ kTheSoundEnabled, "soundEnabled", false }, // D2 p
{ kTheSoundLevel, "soundLevel", false }, // D2 p
- { kTheSprite, "sprite", true },
+ { kTheSprite, "sprite", true }, // D4
{ kTheSqrt, "sqrt", false }, // D2 f
{ kTheStage, "stage", false },
{ kTheStageBottom, "stageBottom", false }, // D2 f
+ { kTheStageColor, "stageColor", false }, // D3 p
{ kTheStageLeft, "stageLeft", false }, // D2 f
{ kTheStageRight, "stageRight", false }, // D2 f
{ kTheStageTop, "stageTop", false }, // D2 f
@@ -101,8 +117,10 @@ TheEntity entities[] = {
{ kTheTimeoutMouse, "timeoutMouse", false }, // D2 p
{ kTheTimeoutPlay, "timeoutPlay", false }, // D2 p
{ kTheTimeoutScript, "timeoutScript", false }, // D2 p
+ { kTheTime, "time", false }, // D3 f
{ kTheTimer, "timer", false }, // D2 p
{ kTheWindow, "window", false },
+ { kTheWords, "words", false }, // D3
{ kTheNOEntity, NULL, false }
};
@@ -139,8 +157,11 @@ TheEntityField fields[] = {
{ kTheSprite, "volume", kTheVolume },
{ kTheSprite, "width", kTheWidth }, // D2 p
+ // the number of castmembers
+ { kTheCastMembers, "number", kTheNumber }, // D3 p
+
// Common cast fields
- { kTheCast, "castType", kTheCastType },
+ { kTheCast, "castType", kTheCastType }, // D4 p
{ kTheCast, "filename", kTheFilename },
{ kTheCast, "height", kTheHeight },
{ kTheCast, "loaded", kTheLoaded },
@@ -173,25 +194,45 @@ TheEntityField fields[] = {
// TextCast fields
{ kTheCast, "hilite", kTheHilite }, // D2 p
- { kTheCast, "selEnd", kTheSelEnd }, // D2 p
- { kTheCast, "selStart", kTheSelStart }, // D2 p
{ kTheCast, "size", kTheSize },
{ kTheCast, "text", kTheText }, // D2 p
+ // Field fields
+ { kTheField, "textAlign", kTheTextAlign }, // D3 p
+ { kTheField, "textFont", kTheTextFont }, // D3 p
+ { kTheField, "textHeight", kTheTextheight }, // D3 p
+ { kTheField, "textSize", kTheTextSize }, // D3 p
+ { kTheField, "textStyle", kTheTextStyle }, // D3 p
+
{ kTheWindow, "drawRect", kTheDrawRect },
{ kTheWindow, "filename", kTheFilename },
{ kTheWindow, "sourceRect", kTheSourceRect },
{ kTheWindow, "visible", kTheVisible },
- { kTheMenuItem, "checkmark", kTheCheckMark },
- { kTheMenuItem, "enabled", kTheEnabled },
- { kTheMenuItem, "name", kTheName },
- { kTheMenuItem, "script", kTheScript },
-
- { kTheMenu, "name", kTheName },
-
- { kTheMenuItems,"number", kTheNumber },
- { kTheMenus, "number", kTheNumber },
+ { kTheMenuItem, "checkmark", kTheCheckMark }, // D3 p
+ { kTheMenuItem, "enabled", kTheEnabled }, // D3 p
+ { kTheMenuItem, "name", kTheName }, // D3 p
+ { kTheMenuItem, "script", kTheScript }, // D3 p
+
+ { kTheMenu, "name", kTheName }, // D3 p
+
+ { kTheChars, "number", kTheNumber }, // D3 p
+ { kTheItems, "number", kTheNumber }, // D3 p
+ { kTheLines, "number", kTheNumber }, // D3 p
+ { kTheMenuItems,"number", kTheNumber }, // D3 p
+ { kTheMenus, "number", kTheNumber }, // D3 p
+ { kTheWords, "number", kTheNumber }, // D3 p
+
+ { kTheDate, "short", kTheShort }, // D3 f
+ { kTheDate, "long", kTheLong }, // D3 f
+ { kTheDate, "abbreviated", kTheAbbr }, // D3 f
+ { kTheDate, "abbrev", kTheAbbr }, // D3 f
+ { kTheDate, "abbr", kTheAbbr }, // D3 f
+ { kTheTime, "short", kTheShort }, // D3 f
+ { kTheTime, "long", kTheLong }, // D3 f
+ { kTheTime, "abbreviated", kTheAbbr }, // D3 f
+ { kTheTime, "abbrev", kTheAbbr }, // D3 f
+ { kTheTime, "abbr", kTheAbbr }, // D3 f
{ kTheNOEntity, NULL, kTheNOField }
};
diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h
index f68a81d363..82b679ee99 100644
--- a/engines/director/lingo/lingo-the.h
+++ b/engines/director/lingo/lingo-the.h
@@ -27,88 +27,104 @@ namespace Director {
enum TheEntityType {
kTheNOEntity = 0,
- kTheFrame = 1,
- kTheFreeBlock,
- kTheFreeBytes,
- kThePathName,
- kTheMenu,
- kTheMenuItem,
- kTheMenuItems,
- kTheMenus,
- kTheMovie,
- kTheMouseH,
- kTheMouseV,
- kTheMouseDownScript,
- kTheMouseUpScript,
-
- kTheSprite,
- kTheCast,
- kThePerFrameHook,
- kTheTicks,
- kTheTimer,
- kTheTimeoutKeydown,
- kTheTimeoutLapsed,
- kTheTimeoutLength,
- kTheTimeoutMouse,
- kTheTimeoutPlay,
- kTheTimeoutScript,
- kTheWindow,
-
+ kTheActorList = 1,
kTheBeepOn,
kTheButtonStyle,
+ kTheCast,
+ kTheCastMembers,
kTheCenterStage,
+ kTheChars,
kTheCheckBoxAccess,
kTheCheckBoxType,
kTheClickOn,
- kTheControlDown,
+ kTheColorDepth,
+ kTheColorQD,
kTheCommandDown,
+ kTheControlDown,
+ kTheDate,
kTheDoubleClick,
+ kTheExitLock,
+ kTheField,
kTheFixStageSize,
+ kTheFloatPrecision,
+ kTheFrame,
+ kTheFreeBlock,
+ kTheFreeBytes,
kTheFullColorPermit,
kTheImageDirect,
+ kTheItemDelimiter,
+ kTheItems,
kTheKey,
- kTheKeyDownScript,
kTheKeyCode,
+ kTheKeyDownScript,
+ kTheLabelList,
kTheLastClick,
kTheLastEvent,
kTheLastFrame,
kTheLastKey,
kTheLastRoll,
+ kTheLines,
kTheMachineType,
kTheMemorySize,
+ kTheMenu,
+ kTheMenuItem,
+ kTheMenuItems,
+ kTheMenus,
+ kTheMouseCast,
+ kTheMouseChar,
kTheMouseDown,
+ kTheMouseDownScript,
+ kTheMouseH,
+ kTheMouseItem,
+ kTheMouseLine,
kTheMouseUp,
+ kTheMouseUpScript,
+ kTheMouseV,
+ kTheMouseWord,
+ kTheMovie,
+ kTheMultiSound,
kTheOptionDown,
+ kThePathName,
kThePauseState,
- kTheRightMouseUp,
- kTheRightMouseDown,
- kTheSoundEnabled,
- kTheSoundLevel,
- kTheStillDown,
- kTheSwitchColorDepth,
+ kThePerFrameHook,
+ kThePreloadEventAbort,
kTheResult,
+ kTheRightMouseDown,
+ kTheRightMouseUp,
+ kTheRomanLingo,
kTheSelection,
+ kTheSelEnd,
+ kTheSelStart,
kTheShiftDown,
+ kTheSoundEnabled,
+ kTheSoundLevel,
+ kTheSprite,
kTheSqrt,
-
- kTheColorDepth,
- kTheColorQD,
- kTheExitLock,
- kTheFloatPrecision,
- kTheItemDelimiter,
- kTheMultiSound,
- kThePreloadEventAbort,
- kTheRomanLingo,
kTheStage,
kTheStageBottom,
+ kTheStageColor,
kTheStageLeft,
kTheStageRight,
- kTheStageTop
+ kTheStageTop,
+ kTheStillDown,
+ kTheSwitchColorDepth,
+ kTheTicks,
+ kTheTime,
+ kTheTimeoutKeydown,
+ kTheTimeoutLapsed,
+ kTheTimeoutLength,
+ kTheTimeoutMouse,
+ kTheTimeoutPlay,
+ kTheTimeoutScript,
+ kTheTimer,
+ kTheWindow,
+ kTheWords
};
enum TheFieldType {
kTheNOField = 0,
- kTheCastNum = 1,
+ kTheAbbr = 1,
+ kTheCastNum,
kTheCastType,
kTheCheckMark,
kTheController,
@@ -133,6 +149,7 @@ enum TheFieldType {
kTheInk,
kTheLeft,
kTheLineSize,
+ kTheLong,
kTheLoop,
kTheLoaded,
kTheModified,
@@ -151,19 +168,23 @@ enum TheFieldType {
kTheRect,
kTheRegPoint,
kTheRight,
+ kTheShort,
kTheStopTime,
kTheStretch,
kTheStartTime,
kTheScript,
kTheScriptNum,
kTheScriptText,
- kTheSelEnd,
- kTheSelStart,
kTheSize,
kTheStrech,
kTheSound,
kTheSourceRect,
kTheText,
+ kTheTextAlign,
+ kTheTextFont,
+ kTheTextheight,
+ kTheTextSize,
+ kTheTextStyle,
kTheTop,
kTheTrails,
kTheType,
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 9c6b586234..e6b4e11d49 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -34,7 +34,7 @@ Lingo *g_lingo;
struct EventHandlerType {
LEvent handler;
const char *name;
-} static const eventHanlerDescs[] = {
+} static const eventHandlerDescs[] = {
{ kEventPrepareMovie, "prepareMovie" },
{ kEventStartMovie, "startMovie" },
{ kEventStopMovie, "stopMovie" },
@@ -86,8 +86,10 @@ Symbol::Symbol() {
Lingo::Lingo(DirectorEngine *vm) : _vm(vm) {
g_lingo = this;
- for (const EventHandlerType *t = &eventHanlerDescs[0]; t->handler != kEventNone; ++t)
+ for (const EventHandlerType *t = &eventHandlerDescs[0]; t->handler != kEventNone; ++t) {
+ _eventHandlerTypeIds[t->name] = t->handler;
_eventHandlerTypes[t->handler] = t->name;
+ }
initBuiltIns();
initFuncs();
@@ -98,6 +100,7 @@ Lingo::Lingo(DirectorEngine *vm) : _vm(vm) {
_pc = 0;
_returning = false;
_indef = false;
+ _ignoreMe = false;
_linenumber = _colnumber = 0;
@@ -160,6 +163,7 @@ void Lingo::addCode(const char *code, ScriptType type, uint16 id) {
_currentScript = new ScriptData;
_currentScriptType = type;
_scripts[type][id] = _currentScript;
+ _currentEntityId = id;
_linenumber = _colnumber = 1;
_hadError = false;
@@ -267,17 +271,31 @@ ScriptType Lingo::event2script(LEvent ev) {
return kNoneScript;
}
-void Lingo::processEvent(LEvent event, int entityId) {
+Symbol *Lingo::getHandler(Common::String &name) {
+ if (!_eventHandlerTypeIds.contains(name))
+ return NULL;
+
+ uint32 entityIndex = ENTITY_INDEX(_eventHandlerTypeIds[name], _currentEntityId);
+ if (!_handlers.contains(entityIndex))
+ return NULL;
+
+ return _handlers[entityIndex];
+}
+
+void Lingo::processEvent(LEvent event, ScriptType st, int entityId) {
+ if (entityId <= 0)
+ return;
+
+ _currentEntityId = entityId;
+
if (!_eventHandlerTypes.contains(event))
error("processEvent: Unknown event %d for entity %d", event, entityId);
- ScriptType st = event2script(event);
-
- if (st != kNoneScript) {
- executeScript(st, entityId + 1);
- } else if (_handlers.contains(_eventHandlerTypes[event])) {
- call(_eventHandlerTypes[event], 0);
+ if (_handlers.contains(ENTITY_INDEX(event, entityId))) {
+ call(_eventHandlerTypes[event], 0); //D4+ Events
pop();
+ } else if (_scripts[st].contains(entityId)) {
+ executeScript(st, entityId + 1); //D3 list of scripts.
} else {
debugC(8, kDebugLingoExec, "STUB: processEvent(%s) for %d", _eventHandlerTypes[event], entityId);
}
@@ -455,7 +473,7 @@ void Lingo::runTests() {
stream->read(script, size);
- debugC(2, kDebugLingoCompile, "Compiling file %s of size %d, id: %d", fileList[i].c_str(), size, counter);
+ debug(">> Compiling file %s of size %d, id: %d", fileList[i].c_str(), size, counter);
_hadError = false;
addCode(script, kMovieScript, counter);
@@ -463,7 +481,7 @@ void Lingo::runTests() {
if (!_hadError)
executeScript(kMovieScript, counter);
else
- debugC(2, kDebugLingoCompile, "Skipping execution");
+ debug(">> Skipping execution");
free(script);
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 931ac7b6da..5d6c29b915 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -73,6 +73,7 @@ enum LEvent {
typedef void (*inst)(void);
#define STOP (inst)0
+#define ENTITY_INDEX(t,id) ((t) * 100000 + (id))
typedef Common::Array<inst> ScriptData;
typedef Common::Array<double> FloatArray;
@@ -178,8 +179,9 @@ public:
Common::String decodeInstruction(uint pc, uint *newPC = NULL);
ScriptType event2script(LEvent ev);
+ Symbol *getHandler(Common::String &name);
- void processEvent(LEvent event, int entityId);
+ void processEvent(LEvent event, ScriptType st, int entityId);
void initBuiltIns();
void initFuncs();
@@ -209,6 +211,7 @@ public:
int codeString(const char *s);
void codeLabel(int label);
int codeConst(int val);
+ int codeArray(int arraySize);
int calcStringAlignment(const char *s) {
return calcCodeAlignment(strlen(s) + 1);
@@ -221,6 +224,7 @@ public:
void codeArg(Common::String *s);
void codeArgStore();
int codeFunc(Common::String *s, int numpar);
+ int codeMe(Common::String *method, int numpar);
int codeFloat(double f);
void codeFactory(Common::String &s);
@@ -241,18 +245,30 @@ public:
static void c_not();
static void c_ampersand();
+ static void c_after();
+ static void c_before();
static void c_concat();
static void c_contains();
static void c_starts();
static void c_intersects();
static void c_within();
+ static void c_charOf();
+ static void c_charToOf();
+ static void c_itemOf();
+ static void c_itemToOf();
+ static void c_lineOf();
+ static void c_lineToOf();
+ static void c_wordOf();
+ static void c_wordToOf();
static void c_constpush();
static void c_voidpush();
static void c_fconstpush();
static void c_stringpush();
+ static void c_symbolpush();
static void c_varpush();
+ static void c_arraypush();
static void c_assign();
bool verify(Symbol *s);
static void c_eval();
@@ -304,7 +320,6 @@ public:
static void b_exp(int nargs);
static void b_float(int nargs);
static void b_integer(int nargs);
- static void b_integerp(int nargs);
static void b_log(int nargs);
static void b_pi(int nargs);
static void b_power(int nargs);
@@ -315,25 +330,59 @@ public:
static void b_chars(int nargs);
static void b_charToNum(int nargs);
+ static void b_delete(int nargs);
+ static void b_hilite(int nargs);
static void b_length(int nargs);
static void b_numToChar(int nargs);
static void b_offset(int nargs);
static void b_string(int nargs);
- static void b_stringp(int nargs);
+ static void b_add(int nargs);
+ static void b_addAt(int nargs);
+ static void b_addProp(int nargs);
+ static void b_append(int nargs);
+ static void b_count(int nargs);
+ static void b_deleteAt(int nargs);
+ static void b_deleteProp(int nargs);
+ static void b_findPos(int nargs);
+ static void b_findPosNear(int nargs);
+ static void b_getaProp(int nargs);
+ static void b_getAt(int nargs);
+ static void b_getLast(int nargs);
+ static void b_getOne(int nargs);
+ static void b_getPos(int nargs);
+ static void b_getProp(int nargs);
+ static void b_getPropAt(int nargs);
+ static void b_list(int nargs);
+ static void b_listP(int nargs);
+ static void b_max(int nargs);
+ static void b_min(int nargs);
+ static void b_setaProp(int nargs);
+ static void b_setAt(int nargs);
+ static void b_setProp(int nargs);
+ static void b_sort(int nargs);
+
+ static void b_floatP(int nargs);
static void b_ilk(int nargs);
+ static void b_integerp(int nargs);
+ static void b_objectp(int nargs);
+ static void b_stringp(int nargs);
+ static void b_symbolp(int nargs);
+
static void b_alert(int nargs);
static void b_cursor(int nargs);
- static void b_objectp(int nargs);
+ static void b_framesToHMS(int nargs);
+ static void b_HMStoFrames(int nargs);
static void b_printFrom(int nargs);
static void b_showGlobals(int nargs);
static void b_showLocals(int nargs);
- static void b_symbolp(int nargs);
static void b_value(int nargs);
static void b_constrainH(int nargs);
static void b_constrainV(int nargs);
+ static void b_duplicateCast(int nargs);
static void b_editableText(int nargs);
+ static void b_eraseCast(int nargs);
static void b_installMenu(int nargs);
static void b_label(int nargs);
static void b_marker(int nargs);
@@ -348,6 +397,7 @@ public:
static void b_updateStage(int nargs);
static void b_zoomBox(int nargs);
+ static void b_abort(int nargs);
static void b_continue(int nargs);
static void b_dontPassEvent(int nargs);
static void b_delay(int nargs);
@@ -355,6 +405,8 @@ public:
static void b_nothing(int nargs);
static void b_pause(int nargs);
static void b_playAccel(int nargs);
+ static void b_preLoad(int nargs);
+ static void b_preLoadCast(int nargs);
static void b_quit(int nargs);
static void b_restart(int nargs);
static void b_shutDown(int nargs);
@@ -366,14 +418,21 @@ public:
static void b_openDA(int nargs);
static void b_openResFile(int nargs);
static void b_openXlib(int nargs);
+ static void b_setCallBack(int nargs);
static void b_showResFile(int nargs);
static void b_showXlib(int nargs);
+ static void b_xFactoryList(int nargs);
static void b_point(int nargs);
static void b_beep(int nargs);
static void b_mci(int nargs);
static void b_mciwait(int nargs);
+ static void b_soundBusy(int nargs);
+ static void b_soundFadeIn(int nargs);
+ static void b_soundFadeOut(int nargs);
+ static void b_soundPlayFile(int nargs);
+ static void b_soundStop(int nargs);
static void b_backspace(int nargs);
static void b_empty(int nargs);
@@ -383,16 +442,22 @@ public:
static void b_return(int nargs);
static void b_tab(int nargs);
static void b_true(int nargs);
+ static void b_version(int nargs);
static void b_factory(int nargs);
void factoryCall(Common::String &name, int nargs);
+ static void b_field(int nargs);
+ static void b_me(int nargs);
+
void func_mci(Common::String &s);
void func_mciwait(Common::String &s);
+ void func_beep(int repeats);
void func_goto(Datum &frame, Datum &movie);
void func_gotoloop();
void func_gotonext();
void func_gotoprevious();
+ void func_cursor(int c);
public:
void setTheEntity(int entity, Datum &id, int field, Datum &d);
@@ -405,8 +470,10 @@ public:
public:
ScriptData *_currentScript;
ScriptType _currentScriptType;
+ uint16 _currentEntityId;
bool _returning;
bool _indef;
+ bool _ignoreMe;
Common::Array<CFrame *> _callstack;
Common::Array<Common::String *> _argstack;
@@ -414,7 +481,9 @@ public:
TheEntityFieldHash _theEntityFields;
Common::Array<int> _labelstack;
- SymbolHash _handlers;
+ SymbolHash _builtins;
+ Common::HashMap<Common::String, bool> _twoWordBuiltins;
+ Common::HashMap<uint32, Symbol *> _handlers;
int _linenumber;
int _colnumber;
@@ -428,6 +497,8 @@ public:
bool _exitRepeat;
+ bool _cursorOnStack;
+
private:
int parse(const char *code);
void parseMenu(const char *code);
@@ -436,6 +507,7 @@ private:
Datum pop(void);
Common::HashMap<uint32, const char *> _eventHandlerTypes;
+ Common::HashMap<Common::String, uint32> _eventHandlerTypeIds;
Common::HashMap<Common::String, Audio::AudioStream *> _audioAliases;
ScriptHash _scripts[kMaxScriptType + 1];
diff --git a/engines/director/lingo/tests/arrays.lingo b/engines/director/lingo/tests/arrays.lingo
new file mode 100644
index 0000000000..2d1c9ef93d
--- /dev/null
+++ b/engines/director/lingo/tests/arrays.lingo
@@ -0,0 +1,2 @@
+set a to [1, 2, 3]
+put a
diff --git a/engines/director/lingo/tests/events.lingo b/engines/director/lingo/tests/events.lingo
new file mode 100644
index 0000000000..a04a12da07
--- /dev/null
+++ b/engines/director/lingo/tests/events.lingo
@@ -0,0 +1,12 @@
+on exitFrame
+ beep
+end exitFrame
+
+on enterFrame me
+ beep
+end
+
+on annoy howMuch
+ beep random(howMuch)
+ alert "Aren't handlers fun?"
+end annoy
diff --git a/engines/director/lingo/tests/mci.lingo b/engines/director/lingo/tests/mci.lingo
index 04130bf907..c4d696e209 100644
--- a/engines/director/lingo/tests/mci.lingo
+++ b/engines/director/lingo/tests/mci.lingo
@@ -1,2 +1,9 @@
mci "open MM\T005045a.wav type WaveAudio alias T005045a"
mci "play T005045a from 22710 to 32872"
+
+sound playFile 1, "Jet Blast"
+sound fadeOut 1
+sound fadeOut 1, 20
+sound fadeIn 1
+sound fadeIn 1, 15
+sound stop 1
diff --git a/engines/director/lingo/tests/the.lingo b/engines/director/lingo/tests/the.lingo
index 65c0d6ea5c..f728fb7938 100644
--- a/engines/director/lingo/tests/the.lingo
+++ b/engines/director/lingo/tests/the.lingo
@@ -4,3 +4,8 @@ put 1.0 / 3
put the loch of sprite 4
set the loch of sprite 5 to 10
set the castnum of sprite 8 to the number of cast "A Blank Castmember"
+
+put the date
+put the long date
+put the abbreviated time
+put the short time
diff --git a/engines/director/module.mk b/engines/director/module.mk
index 38e3cfea4a..e947af4be7 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -6,6 +6,7 @@ MODULE_OBJS = \
detection.o \
director.o \
frame.o \
+ graphics.o \
images.o \
movie.o \
resource.o \
diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp
index 2f8ef3e432..da7f3b69b0 100644
--- a/engines/director/resource.cpp
+++ b/engines/director/resource.cpp
@@ -56,7 +56,7 @@ void DirectorEngine::loadEXE() {
if (!exeStream)
error("Failed to open EXE '%s'", getEXEName().c_str());
- _lingo->processEvent(kEventStart, 0);
+ _lingo->processEvent(kEventStart, kMovieScript, 0);
exeStream->seek(-4, SEEK_END);
exeStream->seek(exeStream->readUint32LE());
@@ -217,7 +217,7 @@ void DirectorEngine::loadSharedCastsFrom(Common::String filename) {
Common::Array<uint16> cast = shardcst->getResourceIDList(MKTAG('C','A','S','t'));
if (cast.size() > 0) {
for (Common::Array<uint16>::iterator iterator = cast.begin(); iterator != cast.end(); ++iterator)
- castScore->loadCastData(*shardcst->getResource(MKTAG('C','A','S','t'), *iterator), *iterator);
+ castScore->loadCastData(*shardcst->getResource(MKTAG('C','A','S','t'), *iterator), *iterator, NULL);
}
castScore->setSpriteCasts();
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 8a80e30765..979d29dba2 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -143,7 +143,7 @@ Score::Score(DirectorEngine *vm, Archive *archive) {
_movieArchive = archive;
_lingo = _vm->getLingo();
_soundManager = _vm->getSoundManager();
- _lingo->processEvent(kEventPrepareMovie, 0);
+ _lingo->processEvent(kEventPrepareMovie, kMovieScript, 0);
_movieScriptCount = 0;
_labels = NULL;
_font = NULL;
@@ -216,16 +216,19 @@ void Score::loadArchive() {
Common::Array<uint16> cast = _movieArchive->getResourceIDList(MKTAG('C','A','S','t'));
if (cast.size() > 0) {
- for (Common::Array<uint16>::iterator iterator = cast.begin(); iterator != cast.end(); ++iterator)
- loadCastData(*_movieArchive->getResource(MKTAG('C','A','S','t'), *iterator), *iterator);
+ for (Common::Array<uint16>::iterator iterator = cast.begin(); iterator != cast.end(); ++iterator) {
+ Common::SeekableSubReadStreamEndian *stream = _movieArchive->getResource(MKTAG('C', 'A', 'S', 't'), *iterator);
+ Resource res = _movieArchive->getResourceDetail(MKTAG('C', 'A', 'S', 't'), *iterator);
+ loadCastData(*stream, *iterator, &res);
+ }
}
setSpriteCasts();
- Common::Array<uint16> stxt = _movieArchive->getResourceIDList(MKTAG('S','T','X','T'));
- if (stxt.size() > 0) {
- loadScriptText(*_movieArchive->getResource(MKTAG('S','T','X','T'), *stxt.begin()));
- }
+ //Common::Array<uint16> stxt = _movieArchive->getResourceIDList(MKTAG('S','T','X','T'));
+ //if (stxt.size() > 0) {
+ // loadScriptText(*_movieArchive->getResource(MKTAG('S','T','X','T'), *stxt.begin()));
+ //}
}
Score::~Score() {
@@ -320,6 +323,7 @@ void Score::loadFrames(Common::SeekableSubReadStreamEndian &stream) {
}
Common::MemoryReadStreamEndian *str = new Common::MemoryReadStreamEndian(channelData, ARRAYSIZE(channelData), stream.isBE());
+ //Common::hexdump(channelData, ARRAYSIZE(channelData));
frame->readChannels(str);
delete str;
@@ -397,7 +401,7 @@ void Score::setSpriteCasts() {
}
}
-void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id) {
+void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id, Resource *res) {
// d4+ variant
if (stream.size() == 0)
return;
@@ -415,7 +419,7 @@ void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id)
uint32 size1, size2, size3, castType;
byte unk1 = 0, unk2 = 0, unk3 = 0;
- if (_vm->getVersion() < 5) {
+ if (_vm->getVersion() < 4) {
size1 = stream.readUint16();
size2 = stream.readUint32();
size3 = 0;
@@ -423,6 +427,12 @@ void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id)
unk1 = stream.readByte();
unk2 = stream.readByte();
unk3 = stream.readByte();
+ } else if (_vm->getVersion() < 5) {
+ size1 = stream.readUint16() + 2;
+ size2 = stream.readUint32();
+ size3 = 0;
+ castType = stream.readByte();
+ unk1 = stream.readByte();
} else {
// FIXME: only the cast type and the strings are good
castType = stream.readUint32();
@@ -436,7 +446,7 @@ void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id)
debugC(3, kDebugLoading, "CASt: id: %d type: %x size1: %d size2: %d (%x) size3: %d unk1: %d unk2: %d unk3: %d",
id, castType, size1, size2, size2, size3, unk1, unk2, unk3);
- byte *data = (byte *)calloc(size1, 1); // 16 is for bounding rects
+ byte *data = (byte *)calloc(size1 + 16, 1); // 16 is for bounding rects
stream.read(data, size1 + 16);
Common::MemoryReadStreamEndian castStream(data, size1 + 16, stream.isBE());
@@ -468,15 +478,23 @@ void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id)
_casts[id] = new ButtonCast(castStream, _vm->getVersion());
_casts[id]->type = kCastButton;
break;
- case kCastScript:
+ case kCastLingoScript:
+ warning("CASt: Script");
+ Common::hexdump(data, size1 + 16);
+
_casts[id] = new ScriptCast(castStream, _vm->getVersion());
- _casts[id]->type = kCastScript;
+ _casts[id]->type = kCastLingoScript;
break;
default:
warning("Score::loadCastData(): Unhandled cast type: %d", castType);
break;
}
+ if (res != NULL) {
+ for (uint child = 0; child < res->children.size(); child++)
+ _casts[id]->children.push_back(res->children[child]);
+ }
+
free(data);
if (size2) {
@@ -494,11 +512,21 @@ void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id)
CastInfo *ci = new CastInfo();
- ci->script = castStrings[0];
- ci->name = castStrings[1];
- ci->directory = castStrings[2];
- ci->fileName = castStrings[3];
- ci->type = castStrings[4];
+ if (castStrings.size() >= 5) {
+ ci->script = castStrings[0];
+ ci->name = castStrings[1];
+ ci->directory = castStrings[2];
+ ci->fileName = castStrings[3];
+ ci->type = castStrings[4];
+
+ if (!ci->script.empty()) {
+ //the script type here could be wrong!
+ if (ConfMan.getBool("dump_scripts"))
+ dumpScript(ci->script.c_str(), kCastScript, id);
+
+ _lingo->addCode(ci->script.c_str(), kCastScript, id);
+ }
+ }
_castsInfo[id] = ci;
}
@@ -650,6 +678,9 @@ void Score::dumpScript(const char *script, ScriptType type, uint16 id) {
case kSpriteScript:
typeName = "sprite";
break;
+ case kCastScript:
+ typeName = "cast";
+ break;
}
sprintf(buf, "./dumps/%s-%s-%d.txt", _macName.c_str(), typeName.c_str(), id);
@@ -802,7 +833,7 @@ Common::Array<Common::String> Score::loadStrings(Common::SeekableSubReadStreamEn
byte *data = (byte *)malloc(entries[count - 1]);
stream.read(data, entries[count - 1]);
- for (uint i = 0; i < count - 1; i++) {
+ for (uint16 i = 0; i < count - 1; i++) {
Common::String entryString;
for (uint j = entries[i]; j < entries[i + 1]; j++)
@@ -821,6 +852,9 @@ Common::Array<Common::String> Score::loadStrings(Common::SeekableSubReadStreamEn
}
void Score::loadFontMap(Common::SeekableSubReadStreamEndian &stream) {
+ if (stream.size() == 0)
+ return;
+
uint16 count = stream.readUint16();
uint32 offset = (count * 2) + 2;
uint16 currentRawPosition = offset;
@@ -870,10 +904,10 @@ void Score::startLoop() {
_stopPlay = false;
_nextFrameTime = 0;
- _lingo->processEvent(kEventStartMovie, 0);
+ _lingo->processEvent(kEventStartMovie, kMovieScript, 0);
_frames[_currentFrame]->prepareFrame(this);
- while (!_stopPlay && _currentFrame < _frames.size() - 2) {
+ while (!_stopPlay && _currentFrame < _frames.size()) {
debugC(1, kDebugImages, "Current frame: %d", _currentFrame);
update();
processEvents();
@@ -888,32 +922,36 @@ void Score::update() {
_surface->copyFrom(*_trailSurface);
// Enter and exit from previous frame (Director 4)
- _lingo->processEvent(kEventEnterFrame, _frames[_currentFrame]->_actionId);
- _lingo->processEvent(kEventExitFrame, _frames[_currentFrame]->_actionId);
+ _lingo->processEvent(kEventEnterFrame, kFrameScript, _frames[_currentFrame]->_actionId);
+ _lingo->processEvent(kEventExitFrame, kFrameScript, _frames[_currentFrame]->_actionId);
// TODO Director 6 - another order
// TODO Director 6 step: send beginSprite event to any sprites whose span begin in the upcoming frame
if (_vm->getVersion() >= 6) {
for (uint16 i = 0; i < CHANNEL_COUNT; i++) {
if (_frames[_currentFrame]->_sprites[i]->_enabled) {
- _lingo->processEvent(kEventBeginSprite, i);
+ //TODO: Check if this is also possibly a kSpriteScript?
+ _lingo->processEvent(kEventBeginSprite, kCastScript, _frames[_currentFrame]->_sprites[i]->_scriptId);
}
}
}
// TODO Director 6 step: send prepareFrame event to all sprites and the script channel in upcoming frame
if (_vm->getVersion() >= 6)
- _lingo->processEvent(kEventPrepareFrame, _currentFrame);
-
- _currentFrame++;
+ _lingo->processEvent(kEventPrepareFrame, kFrameScript, _currentFrame);
Common::SortedArray<Label *>::iterator i;
- for (i = _labels->begin(); i != _labels->end(); ++i) {
- if ((*i)->number == _currentFrame) {
- _currentLabel = (*i)->name;
+ if (_labels != NULL) {
+ for (i = _labels->begin(); i != _labels->end(); ++i) {
+ if ((*i)->number == _currentFrame) {
+ _currentLabel = (*i)->name;
+ }
}
}
+ _currentFrame++;
+ if (_currentFrame >= _frames.size()) return;
+
_frames[_currentFrame]->prepareFrame(this);
// Stage is drawn between the prepareFrame and enterFrame events (Lingo in a Nutshell)
@@ -951,8 +989,9 @@ void Score::update() {
}
void Score::processEvents() {
- if (_currentFrame > 0)
- _lingo->processEvent(kEventIdle, _currentFrame - 1);
+ //TODO: re-instate when we know which script to run.
+ //if (_currentFrame > 0)
+ // _lingo->processEvent(kEventIdle, _currentFrame - 1);
Common::Event event;
@@ -966,14 +1005,27 @@ void Score::processEvents() {
if (event.type == Common::EVENT_LBUTTONDOWN) {
Common::Point pos = g_system->getEventManager()->getMousePos();
- // TODO there is dont send frame id
- _lingo->processEvent(kEventMouseDown, _frames[_currentFrame]->getSpriteIDFromPos(pos));
+ //D3 doesn't have both mouse up and down.
+ if (_vm->getVersion() > 3) {
+ //TODO: check that this is the order of script execution!
+ uint16 spriteId = _frames[_currentFrame]->getSpriteIDFromPos(pos);
+ _lingo->processEvent(kEventMouseDown, kCastScript, _frames[_currentFrame]->_sprites[spriteId]->_castId);
+ _lingo->processEvent(kEventMouseDown, kSpriteScript, _frames[_currentFrame]->_sprites[spriteId]->_scriptId);
+ }
}
if (event.type == Common::EVENT_LBUTTONUP) {
Common::Point pos = g_system->getEventManager()->getMousePos();
- _lingo->processEvent(kEventMouseUp, _frames[_currentFrame]->getSpriteIDFromPos(pos));
+ uint16 spriteId = _frames[_currentFrame]->getSpriteIDFromPos(pos);
+ if (_vm->getVersion() > 3) {
+ //TODO: check that this is the order of script execution!
+ _lingo->processEvent(kEventMouseUp, kCastScript, _frames[_currentFrame]->_sprites[spriteId]->_castId);
+ _lingo->processEvent(kEventMouseUp, kSpriteScript, _frames[_currentFrame]->_sprites[spriteId]->_scriptId);
+ } else {
+ //D3 doesn't have cast member or sprite scripts. Just Frame Scripts.
+ _lingo->processEvent(kEventMouseUp, kFrameScript, _frames[_currentFrame]->_sprites[spriteId]->_scriptId);
+ }
}
if (event.type == Common::EVENT_KEYDOWN) {
@@ -997,7 +1049,8 @@ void Score::processEvents() {
warning("Keycode: %d", _vm->_keyCode);
}
- _lingo->processEvent(kEventKeyDown, 0);
+ //TODO: is movie script correct? Can this be elsewhere?
+ _lingo->processEvent(kEventKeyDown, kMovieScript, 0);
}
}
diff --git a/engines/director/score.h b/engines/director/score.h
index 49e4f357b0..9b92e48f93 100644
--- a/engines/director/score.h
+++ b/engines/director/score.h
@@ -25,6 +25,7 @@
#include "common/substream.h"
#include "common/rect.h"
+#include "director/archive.h"
namespace Graphics {
class ManagedSurface;
@@ -46,8 +47,9 @@ enum ScriptType {
kMovieScript = 0,
kSpriteScript = 1,
kFrameScript = 2,
+ kCastScript = 3,
kNoneScript = -1,
- kMaxScriptType = 2
+ kMaxScriptType = 3
};
class Score {
@@ -67,12 +69,13 @@ public:
Archive *getArchive() const { return _movieArchive; };
void loadConfig(Common::SeekableSubReadStreamEndian &stream);
void loadCastDataVWCR(Common::SeekableSubReadStreamEndian &stream);
- void loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id);
+ void loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id, Resource *res);
void setCurrentFrame(uint16 frameId) { _currentFrame = frameId; }
int getCurrentFrame() { return _currentFrame; }
Common::String getMacName() const { return _macName; }
Sprite *getSpriteById(uint16 id);
void setSpriteCasts();
+ Graphics::ManagedSurface *getSurface() { return _surface; }
private:
void update();
diff --git a/engines/director/sound.cpp b/engines/director/sound.cpp
index 1bd70d257d..0fc1a43666 100644
--- a/engines/director/sound.cpp
+++ b/engines/director/sound.cpp
@@ -34,6 +34,11 @@ DirectorSound::DirectorSound() {
_sound2 = new Audio::SoundHandle();
_scriptSound = new Audio::SoundHandle();
_mixer = g_system->getMixer();
+
+ _speaker = new Audio::PCSpeaker();
+ _pcSpeakerHandle = new Audio::SoundHandle();
+ _mixer->playStream(Audio::Mixer::kSFXSoundType,
+ _pcSpeakerHandle, _speaker, -1, 50, 0, DisposeAfterUse::NO, true);
}
DirectorSound::~DirectorSound() {
@@ -100,6 +105,11 @@ bool DirectorSound::isChannelActive(uint8 channelID) {
void DirectorSound::stopSound() {
_mixer->stopHandle(*_sound1);
_mixer->stopHandle(*_sound2);
+ _mixer->stopHandle(*_pcSpeakerHandle);
+}
+
+void DirectorSound::systemBeep() {
+ _speaker->play(Audio::PCSpeaker::kWaveFormSquare, 500, 150);
}
} // End of namespace Director
diff --git a/engines/director/sound.h b/engines/director/sound.h
index 0472da0ef7..6a770314a3 100644
--- a/engines/director/sound.h
+++ b/engines/director/sound.h
@@ -22,6 +22,7 @@
#include "audio/audiostream.h"
#include "audio/mixer.h"
+#include "audio/softsynth/pcspk.h"
#ifndef DIRECTOR_SOUND_H
#define DIRECTOR_SOUND_H
@@ -35,6 +36,8 @@ private:
Audio::SoundHandle *_sound2;
Audio::SoundHandle *_scriptSound;
Audio::Mixer *_mixer;
+ Audio::PCSpeaker *_speaker;
+ Audio::SoundHandle *_pcSpeakerHandle;
public:
DirectorSound();
@@ -43,6 +46,7 @@ public:
void playWAV(Common::String filename, uint8 channelID);
void playAIFF(Common::String filename, uint8 channelID);
void playMCI(Audio::AudioStream &stream, uint32 from, uint32 to);
+ void systemBeep();
bool isChannelActive(uint8 channelID);
void stopSound();
};
diff --git a/engines/director/sprite.cpp b/engines/director/sprite.cpp
index a59313ad33..62897ed6e6 100644
--- a/engines/director/sprite.cpp
+++ b/engines/director/sprite.cpp
@@ -38,7 +38,7 @@ Sprite::Sprite() {
_constraint = 0;
_moveable = 0;
_castId = 0;
- _backColor = 0;
+ _backColor = 255;
_foreColor = 0;
_left = 0;
_right = 0;
diff --git a/engines/director/sprite.h b/engines/director/sprite.h
index d248036693..d9b7729a87 100644
--- a/engines/director/sprite.h
+++ b/engines/director/sprite.h
@@ -106,7 +106,8 @@ public:
uint32 _unk3;
bool _enabled;
- byte _castId;
+ uint16 _castId;
+ byte _spriteType;
InkType _ink;
uint16 _trails;
Cast *_cast;
diff --git a/engines/drascula/POTFILES b/engines/drascula/POTFILES
index ea79f9e066..925b309996 100644
--- a/engines/drascula/POTFILES
+++ b/engines/drascula/POTFILES
@@ -1,2 +1,3 @@
+engines/drascula/drascula.cpp
engines/drascula/detection.cpp
engines/drascula/saveload.cpp
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index 8b3299aaa9..792b2720a9 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -1836,6 +1836,8 @@ void DrasculaEngine::animation_13_2() {
if (flags[41] == 0) {
playTalkSequence(13); // sequence 13, chapter 2
+ } else {
+ converse(2);
}
loadPic(964, frontSurface);
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index ab91056480..655af480f2 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -25,6 +25,7 @@
#include "common/file.h"
#include "common/config-manager.h"
#include "common/textconsole.h"
+#include "common/translation.h"
#include "backends/audiocd/audiocd.h"
@@ -955,12 +956,13 @@ void DrasculaEngine::hipo_sin_nadie(int counter){
bool DrasculaEngine::loadDrasculaDat() {
Common::File in;
+ Common::String filename = "drascula.dat";
int i;
- in.open("drascula.dat");
+ in.open(filename.c_str());
if (!in.isOpen()) {
- Common::String errorMessage = "You're missing the 'drascula.dat' file. Get it from the ScummVM website";
+ Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
GUIErrorMessage(errorMessage);
warning("%s", errorMessage.c_str());
@@ -974,7 +976,7 @@ bool DrasculaEngine::loadDrasculaDat() {
buf[8] = '\0';
if (strcmp(buf, "DRASCULA") != 0) {
- Common::String errorMessage = "File 'drascula.dat' is corrupt. Get it from the ScummVM website";
+ Common::String errorMessage = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
GUIErrorMessage(errorMessage);
warning("%s", errorMessage.c_str());
@@ -984,7 +986,9 @@ bool DrasculaEngine::loadDrasculaDat() {
ver = in.readByte();
if (ver != DRASCULA_DAT_VER) {
- Common::String errorMessage = Common::String::format("File 'drascula.dat' is wrong version. Expected %d but got %d. Get it from the ScummVM website", DRASCULA_DAT_VER, ver);
+ Common::String errorMessage = Common::String::format(
+ _("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+ filename.c_str(), DRASCULA_DAT_VER, 0, ver, 0);
GUIErrorMessage(errorMessage);
warning("%s", errorMessage.c_str());
diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp
index 8634b6c586..09ff3c6429 100644
--- a/engines/drascula/graphics.cpp
+++ b/engines/drascula/graphics.cpp
@@ -154,7 +154,7 @@ void DrasculaEngine::showFrame(Common::SeekableReadStream *stream, bool firstFra
}
void DrasculaEngine::copyBackground(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *src, byte *dest) {
- debug(1, "DrasculaEngine::copyBackground(xorg:%d, yorg:%d, xdes:%d, ydes:%d width:%d height:%d, src, dest)", xorg, yorg, xdes, ydes, width,height);
+ debug(5, "DrasculaEngine::copyBackground(xorg:%d, yorg:%d, xdes:%d, ydes:%d width:%d height:%d, src, dest)", xorg, yorg, xdes, ydes, width,height);
dest += xdes + ydes * 320;
src += xorg + yorg * 320;
/* Unoptimized code
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index eb6debe9e0..da80ef3c5f 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -259,6 +259,7 @@ namespace Fullpipe {
#define SND_CMN_032 3517
#define SND_CMN_054 4762
#define SND_CMN_055 4763
+#define SND_CMN_056 4772
#define SND_CMN_060 4921
#define SND_CMN_061 4922
#define SND_CMN_070 5199
@@ -367,6 +368,12 @@ namespace Fullpipe {
#define PIC_MSV_SPACE_D 5190
#define PIC_MSV_SPACE_L 5191
+// Demo screen
+#define PIC_POST_BGR 5396
+#define PIC_POST_TEXT 5397
+#define PIC_POST_BUTTON 5398
+#define SND_CMN_069 4969
+
// Intro
#define ANI_IN1MAN 5110
#define MSG_INTR_ENDINTRO 5139
diff --git a/engines/fullpipe/detection.cpp b/engines/fullpipe/detection.cpp
index e42de65543..e22bcd3d50 100644
--- a/engines/fullpipe/detection.cpp
+++ b/engines/fullpipe/detection.cpp
@@ -25,14 +25,24 @@
#include "engines/advancedDetector.h"
#include "common/file.h"
+#include "graphics/surface.h"
+
#include "fullpipe/fullpipe.h"
#include "fullpipe/gameloader.h"
namespace Fullpipe {
-const char *FullpipeEngine::getGameId() const {
- return _gameDescription->gameId;
+uint32 FullpipeEngine::getFeatures() const {
+ return _gameDescription->flags;
+}
+
+bool FullpipeEngine::isDemo() {
+ return _gameDescription->flags & ADGF_DEMO;
+}
+
+Common::Language FullpipeEngine::getLanguage() const {
+ return _gameDescription->language;
}
}
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 8a9b323761..9c474d111b 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -28,6 +28,7 @@
#include "audio/mixer.h"
#include "engines/util.h"
+#include "graphics/surface.h"
#include "fullpipe/fullpipe.h"
#include "fullpipe/gameloader.h"
@@ -271,6 +272,7 @@ Common::Error FullpipeEngine::loadGameState(int slot) {
else
return Common::kUnknownError;
}
+
Common::Error FullpipeEngine::saveGameState(int slot, const Common::String &description) {
if (_gameLoader->writeSavegame(_currentScene, getSavegameFile(slot)))
return Common::kNoError;
@@ -284,7 +286,8 @@ Common::Error FullpipeEngine::run() {
// Initialize backend
initGraphics(800, 600, true, &format);
- _backgroundSurface.create(800, 600, format);
+ _backgroundSurface = new Graphics::Surface;
+ _backgroundSurface->create(800, 600, format);
_origFormat = new Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
@@ -501,7 +504,9 @@ void FullpipeEngine::cleanup() {
stopAllSoundStreams();
delete _origFormat;
- _backgroundSurface.free();
+ _backgroundSurface->free();
+
+ delete _backgroundSurface;
}
void FullpipeEngine::updateScreen() {
@@ -603,5 +608,19 @@ void FullpipeEngine::disableSaves(ExCommand *ex) {
}
}
+bool FullpipeEngine::isSaveAllowed() {
+ if (!g_fp->_isSaveAllowed)
+ return false;
+
+ bool allowed = true;
+
+ for (Common::Array<MessageQueue *>::iterator s = g_fp->_globalMessageQueueList->begin(); s != g_fp->_globalMessageQueueList->end(); ++s) {
+ if (!(*s)->_isFinished && ((*s)->getFlags() & 1))
+ allowed = false;
+ }
+
+ return allowed;
+}
+
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index f6a8e00219..3733bed65d 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -30,8 +30,6 @@
#include "common/savefile.h"
#include "common/system.h"
-#include "graphics/transparent_surface.h"
-
#include "engines/engine.h"
#include "gui/debugger.h"
@@ -112,8 +110,9 @@ public:
// Detection related functions
const ADGameDescription *_gameDescription;
- const char *getGameId() const;
- Common::Platform getPlatform() const;
+ uint32 getFeatures() const;
+ bool isDemo();
+ Common::Language getLanguage() const;
Common::RandomSource *_rnd;
@@ -122,7 +121,7 @@ public:
void updateEvents();
- Graphics::Surface _backgroundSurface;
+ Graphics::Surface *_backgroundSurface;
Graphics::PixelFormat *_origFormat;
GameLoader *_gameLoader;
@@ -235,6 +234,7 @@ public:
void enableSaves() { _isSaveAllowed = true; }
void disableSaves(ExCommand *ex);
+ bool isSaveAllowed();
void initObjectStates();
void setLevelStates();
@@ -276,6 +276,7 @@ public:
void setObjectState(const char *name, int state);
int getObjectEnumState(const char *name, const char *state);
+ void sceneAutoScrolling();
bool sceneSwitcher(EntranceInfo *entrance);
Scene *accessScene(int sceneId);
void setSceneMusicParameters(GameVar *var);
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index 57bde97d9d..efa5f8c2c7 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -55,7 +55,6 @@ GameLoader::GameLoader() {
_inputController = new InputController();
_gameProject = 0;
- _gameName = 0;
addMessageHandlerByIndex(global_messageHandler2, 0, 0);
insertMessageHandler(global_messageHandler3, 0, 128);
@@ -78,7 +77,6 @@ GameLoader::GameLoader() {
}
GameLoader::~GameLoader() {
- free(_gameName);
delete _gameProject;
delete _interactionController;
delete _inputController;
@@ -112,7 +110,7 @@ bool GameLoader::load(MfcArchive &file) {
debugC(1, kDebugLoading, "GameLoader::load()");
_gameName = file.readPascalString();
- debugC(1, kDebugLoading, "_gameName: %s", _gameName);
+ debugC(1, kDebugLoading, "_gameName: %s", _gameName.c_str());
_gameProject = new GameProject();
@@ -125,7 +123,7 @@ bool GameLoader::load(MfcArchive &file) {
}
_gameName = file.readPascalString();
- debugC(1, kDebugLoading, "_gameName: %s", _gameName);
+ debugC(1, kDebugLoading, "_gameName: %s", _gameName.c_str());
_inventory.load(file);
@@ -355,6 +353,10 @@ bool preloadCallback(PreloadItem &pre, int flag) {
return true;
}
+void GameLoader::addPreloadItem(PreloadItem *item) {
+ _preloadItems.push_back(new PreloadItem(*item));
+}
+
bool GameLoader::preloadScene(int sceneId, int entranceId) {
debugC(0, kDebugLoading, "preloadScene(%d, %d), ", sceneId, entranceId);
diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h
index 6c41e1bd07..6180ab0347 100644
--- a/engines/fullpipe/gameloader.h
+++ b/engines/fullpipe/gameloader.h
@@ -105,6 +105,8 @@ class GameLoader : public CObject {
bool preloadScene(int sceneId, int entranceId);
bool unloadScene(int sceneId);
+ void addPreloadItem(PreloadItem *item);
+
void updateSystems(int counterdiff);
int getSceneTagBySceneId(int sceneId, SceneTag **st);
@@ -131,7 +133,7 @@ class GameLoader : public CObject {
int16 _field_FA;
PreloadItems _preloadItems;
GameVar *_gameVar;
- char *_gameName;
+ Common::String _gameName;
ExCommand _exCommand;
int _updateCounter;
int _preloadSceneId;
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index 4dec4b640c..619f41d6da 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -30,6 +30,7 @@
#include "fullpipe/gameloader.h"
#include "common/memstream.h"
+#include "graphics/transparent_surface.h"
namespace Fullpipe {
@@ -478,7 +479,7 @@ void Picture::freePicture() {
if (_bitmap) {
if (testFlags() && !_field_54) {
freeData();
- //free(_bitmap);
+ free(_bitmap);
_bitmap = 0;
}
}
@@ -677,8 +678,8 @@ void Picture::displayPicture() {
if (!_dataSize)
return;
- g_fp->_backgroundSurface.fillRect(Common::Rect(0, 0, 800, 600), 0);
- g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface.getBasePtr(0, 0), g_fp->_backgroundSurface.pitch, 0, 0, 800, 600);
+ g_fp->_backgroundSurface->fillRect(Common::Rect(0, 0, 800, 600), 0);
+ g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface->getBasePtr(0, 0), g_fp->_backgroundSurface->pitch, 0, 0, 800, 600);
draw(0, 0, 0, 0);
@@ -771,6 +772,7 @@ Bitmap::Bitmap() {
_flags = 0;
_surface = 0;
_flipping = Graphics::FLIP_NONE;
+ _copied_surface = false;
}
Bitmap::Bitmap(Bitmap *src) {
@@ -783,15 +785,16 @@ Bitmap::Bitmap(Bitmap *src) {
_height = src->_height;
_pixels = src->_pixels;
_surface = new Graphics::TransparentSurface(*src->_surface);
+ _copied_surface = true;
_flipping = src->_flipping;
}
Bitmap::~Bitmap() {
- if (_pixels)
- free(_pixels);
- _surface->free();
+ if (!_copied_surface)
+ _surface->free();
delete _surface;
+ _surface = 0;
_pixels = 0;
}
@@ -858,8 +861,8 @@ void Bitmap::putDib(int x, int y, int32 *palette, byte alpha) {
int alphac = TS_ARGB(0xff, alpha, 0xff, 0xff);
- _surface->blit(g_fp->_backgroundSurface, x1, y1, _flipping, &sub, alphac);
- g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface.getBasePtr(x1, y1), g_fp->_backgroundSurface.pitch, x1, y1, sub.width(), sub.height());
+ _surface->blit(*g_fp->_backgroundSurface, x1, y1, _flipping, &sub, alphac);
+ g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface->getBasePtr(x1, y1), g_fp->_backgroundSurface->pitch, x1, y1, sub.width(), sub.height());
}
bool Bitmap::putDibRB(int32 *palette) {
@@ -1255,7 +1258,7 @@ DynamicPhase *Shadows::findSize(int width, int height) {
void FullpipeEngine::drawAlphaRectangle(int x1, int y1, int x2, int y2, int alpha) {
for (int y = y1; y < y2; y++) {
- uint32 *ptr = (uint32 *)g_fp->_backgroundSurface.getBasePtr(x1, y);
+ uint32 *ptr = (uint32 *)g_fp->_backgroundSurface->getBasePtr(x1, y);
for (int x = x1; x < x2; x++) {
uint32 color = *ptr;
@@ -1274,8 +1277,8 @@ void FullpipeEngine::sceneFade(Scene *sc, bool direction) {
int ticks = g_fp->_system->getMillis();
sc->draw();
- drawAlphaRectangle(0, 0, g_fp->_backgroundSurface.w, g_fp->_backgroundSurface.h, direction ? dim : 255 - dim);
- g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface.getBasePtr(0, 0), g_fp->_backgroundSurface.pitch, 0, 0, 800, 600);
+ drawAlphaRectangle(0, 0, g_fp->_backgroundSurface->w, g_fp->_backgroundSurface->h, direction ? dim : 255 - dim);
+ g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface->getBasePtr(0, 0), g_fp->_backgroundSurface->pitch, 0, 0, 800, 600);
g_fp->_system->updateScreen();
ticks = g_fp->_system->getMillis() - ticks;
diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h
index 566586fb48..43c23b49bc 100644
--- a/engines/fullpipe/gfx.h
+++ b/engines/fullpipe/gfx.h
@@ -23,6 +23,11 @@
#ifndef FULLPIPE_GFX_H
#define FULLPIPE_GFX_H
+namespace Graphics {
+ struct Surface;
+ struct TransparentSurface;
+}
+
namespace Fullpipe {
class DynamicPhase;
@@ -40,6 +45,7 @@ struct Bitmap {
int _flags;
Graphics::TransparentSurface *_surface;
int _flipping;
+ bool _copied_surface;
Bitmap();
Bitmap(Bitmap *src);
diff --git a/engines/fullpipe/init.cpp b/engines/fullpipe/init.cpp
index 9602803010..db95cd88b8 100644
--- a/engines/fullpipe/init.cpp
+++ b/engines/fullpipe/init.cpp
@@ -57,7 +57,10 @@ void FullpipeEngine::initObjectStates() {
setObjectState(sO_FriesPit, getObjectEnumState(sO_FriesPit, sO_WithApple));
setObjectState(sO_Jug, getObjectEnumState(sO_Jug, sO_Blocked));
setObjectState(sO_RightStairs_9, getObjectEnumState(sO_RightStairs_9, sO_IsClosed));
- setObjectState(sO_Pipe_9, getObjectEnumState(sO_Pipe_9, sO_WithJug));
+ if (isDemo() && getLanguage() == Common::RU_RUS)
+ setObjectState(sO_Pipe_9, getObjectEnumState(sO_Pipe_9, sO_WithoutJug));
+ else
+ setObjectState(sO_Pipe_9, getObjectEnumState(sO_Pipe_9, sO_WithJug));
setObjectState(sO_Inflater, getObjectEnumState(sO_Inflater, sO_WithGum));
setObjectState(sO_Swingie, getObjectEnumState(sO_Swingie, sO_IsSwinging));
setObjectState(sO_DudeHasJumped, getObjectEnumState(sO_DudeHasJumped, sO_No));
diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp
index 55735624c6..4bcc2acc17 100644
--- a/engines/fullpipe/input.cpp
+++ b/engines/fullpipe/input.cpp
@@ -56,6 +56,9 @@ InputController::~InputController() {
removeMessageHandler(126, -1);
g_fp->_inputController = 0;
+
+ for (uint i = 0; i < _cursorsArray.size(); i++)
+ delete _cursorsArray[i];
}
void InputController::setInputDisabled(bool state) {
diff --git a/engines/fullpipe/messagehandlers.cpp b/engines/fullpipe/messagehandlers.cpp
index 947caadbcc..bd75e01232 100644
--- a/engines/fullpipe/messagehandlers.cpp
+++ b/engines/fullpipe/messagehandlers.cpp
@@ -188,11 +188,15 @@ int global_messageHandler1(ExCommand *cmd) {
}
break;
case '\t':
+ // Demo has no map
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS)
+ break;
+
if (g_fp->_flgCanOpenMap)
g_fp->openMap();
cmd->_messageKind = 0;
break;
- case 'p':
+ case Common::KEYCODE_F1:
if (g_fp->_flgCanOpenMap)
g_fp->openHelp();
cmd->_messageKind = 0;
@@ -308,7 +312,7 @@ int global_messageHandler2(ExCommand *cmd) {
ani->_callback2 = staticANIObjectCallback;
} else {
ani->setFlags40(false);
- ani->_callback2 = 0;
+ ani->_callback2 = 0; // Really NULL
}
}
break;
@@ -515,7 +519,7 @@ int global_messageHandler3(ExCommand *cmd) {
if (cmd->_objtype == kObjTypeObjstateCommand) {
ObjstateCommand *c = (ObjstateCommand *)cmd;
result = 1;
- g_fp->setObjectState(c->_objCommandName, c->_value);
+ g_fp->setObjectState(c->_objCommandName.c_str(), c->_value);
}
return result;
default:
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index a9fc5210a3..111c70ce05 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -232,20 +232,17 @@ Message::Message(int16 parentId, int messageKind, int x, int y, int a6, int a7,
ObjstateCommand::ObjstateCommand() {
_value = 0;
- _objCommandName = 0;
_objtype = kObjTypeObjstateCommand;
}
ObjstateCommand::ObjstateCommand(ObjstateCommand *src) : ExCommand(src) {
_value = src->_value;
- _objCommandName = (char *)calloc(strlen(src->_objCommandName) + 1, 1);
_objtype = kObjTypeObjstateCommand;
- strncpy(_objCommandName, src->_objCommandName, strlen(src->_objCommandName));
+ _objCommandName = src->_objCommandName;
}
ObjstateCommand::~ObjstateCommand() {
- free(_objCommandName);
}
bool ObjstateCommand::load(MfcArchive &file) {
@@ -273,7 +270,6 @@ MessageQueue::MessageQueue() {
_id = 0;
_isFinished = 0;
_flags = 0;
- _queueName = 0;
_counter = 0;
_field_38 = 0;
_flag1 = 0;
@@ -286,7 +282,6 @@ MessageQueue::MessageQueue(int dataId) {
_id = g_fp->_globalMessageQueueList->compact();
_isFinished = 0;
_flags = 0;
- _queueName = 0;
_counter = 0;
_field_38 = 0;
_flag1 = 0;
@@ -312,7 +307,7 @@ MessageQueue::MessageQueue(MessageQueue *src, int parId, int field_38) {
_id = g_fp->_globalMessageQueueList->compact();
_dataId = src->_dataId;
_flags = src->_flags;
- _queueName = 0;
+ _queueName = "";
g_fp->_globalMessageQueueList->addMessageQueue(this);
@@ -338,8 +333,6 @@ MessageQueue::~MessageQueue() {
}
finish();
-
- free(_queueName);
}
bool MessageQueue::load(MfcArchive &file) {
diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h
index b99b842bf9..0bdfb23835 100644
--- a/engines/fullpipe/messages.h
+++ b/engines/fullpipe/messages.h
@@ -94,7 +94,7 @@ class ExCommand2 : public ExCommand {
class ObjstateCommand : public ExCommand {
public:
- char *_objCommandName;
+ Common::String _objCommandName;
int _value;
public:
@@ -111,7 +111,7 @@ class MessageQueue : public CObject {
public:
int _id;
int _flags;
- char *_queueName;
+ Common::String _queueName;
int16 _dataId;
CObject *_field_14;
int _counter;
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index d1bda9dd40..3faa035c60 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -30,11 +30,14 @@
#include "fullpipe/modal.h"
#include "fullpipe/constants.h"
+#include "fullpipe/objectnames.h"
#include "graphics/palette.h"
+#include "graphics/surface.h"
#include "video/avi_decoder.h"
#include "engines/savestate.h"
+#include "engines/advancedDetector.h"
namespace Fullpipe {
@@ -225,6 +228,134 @@ void ModalIntro::update() {
void ModalIntro::finish() {
g_fp->_gameLoader->unloadScene(SC_INTRO2);
+
+ g_fp->_currentScene = g_fp->accessScene(SC_INTRO1);
+ g_fp->_gameLoader->preloadScene(SC_INTRO1, TrubaDown);
+
+ if (g_fp->_currentScene)
+ g_fp->_gameLoader->updateSystems(42);
+}
+
+ModalIntroDemo::ModalIntroDemo() {
+ _field_8 = 0;
+ _countDown = 50;
+ _stillRunning = 0;
+ _introFlags = 9;
+ g_vars->sceneIntro_skipIntro = false;
+ _sfxVolume = g_fp->_sfxVolume;
+}
+
+ModalIntroDemo::~ModalIntroDemo() {
+ g_fp->stopAllSounds();
+ g_fp->_sfxVolume = _sfxVolume;
+}
+
+bool ModalIntroDemo::handleMessage(ExCommand *message) {
+ if (message->_messageKind != 17)
+ return false;
+
+ if (message->_messageNum != 36)
+ return false;
+
+ if (message->_param != 13 && message->_param != 27 && message->_param != 32)
+ return false;
+
+ if (_introFlags & 0x8) {
+ _countDown = 0;
+ g_vars->sceneIntro_needBlackout = true;
+ return true;
+ } else if (_stillRunning) {
+ g_vars->sceneIntro_playing = false;
+ g_vars->sceneIntro_needBlackout = true;
+ }
+
+ return true;
+}
+
+bool ModalIntroDemo::init(int counterdiff) {
+ if (!g_vars->sceneIntro_playing) {
+ if (!_stillRunning) {
+ finish();
+ return false;
+ }
+
+ if (_introFlags & 0x10)
+ g_fp->_gameLoader->updateSystems(42);
+
+ _introFlags |= 2;
+
+ return true;
+ }
+
+ if (_introFlags & 8) {
+ _countDown--;
+
+ if (_countDown > 0)
+ return true;
+
+ if (_stillRunning > 0) {
+ _introFlags |= 2;
+ return true;
+ }
+
+ _countDown = 150;
+ _introFlags = (_introFlags & 0xf7) | 0x21;
+ g_fp->accessScene(SC_INTRO1)->getPictureObjectById(522, 0)->_flags &= 0xfffb;
+ } else {
+ if (!(_introFlags & 0x20))
+ return true;
+
+ _countDown--;
+
+ if (_countDown > 0)
+ return true;
+
+ if (_stillRunning > 0) {
+ _introFlags |= 2;
+ return true;
+ }
+
+ _introFlags &= 0xDF;
+
+ g_vars->sceneIntro_playing = false;
+ _stillRunning = 0;
+ }
+
+ return true;
+}
+
+void ModalIntroDemo::update() {
+ if (g_fp->_currentScene) {
+ if (_introFlags & 1) {
+ if (g_vars->sceneIntro_needBlackout) {
+ g_fp->drawAlphaRectangle(0, 0, 800, 600, 0);
+ g_vars->sceneIntro_needBlackout = 0;
+ } else {
+ g_fp->sceneFade(g_fp->_currentScene, true);
+ }
+ _stillRunning = 255;
+ _introFlags &= 0xfe;
+
+ if (_introFlags & 0x20)
+ g_fp->playSound(SND_INTR_019, 0);
+ } else if (_introFlags & 2) {
+ if (g_vars->sceneIntro_needBlackout) {
+ g_fp->drawAlphaRectangle(0, 0, 800, 600, 0);
+ g_vars->sceneIntro_needBlackout = 0;
+ _stillRunning = 0;
+ _introFlags &= 0xfd;
+ } else {
+ g_fp->sceneFade(g_fp->_currentScene, false);
+ _stillRunning = 0;
+ _introFlags &= 0xfd;
+ }
+ } else if (_stillRunning) {
+ g_fp->_currentScene->draw();
+ }
+ }
+}
+
+void ModalIntroDemo::finish() {
g_fp->_currentScene = g_fp->accessScene(SC_INTRO1);
g_fp->_gameLoader->preloadScene(SC_INTRO1, TrubaDown);
@@ -248,7 +379,11 @@ void ModalVideoPlayer::play(const char *filename) {
if (aviDecoder->needsUpdate()) {
const Graphics::Surface *frame = aviDecoder->decodeNextFrame();
if (frame) {
- g_fp->_system->copyRectToScreen(frame->getPixels(), frame->pitch, x, y, frame->w, frame->h);
+ Graphics::Surface *frameCopy = frame->convertTo(g_system->getScreenFormat());
+ g_fp->_system->copyRectToScreen(frameCopy->getPixels(), frameCopy->pitch,
+ x, y, frameCopy->w, frameCopy->h);
+ frameCopy->free();
+ delete frameCopy;
if (aviDecoder->hasDirtyPalette())
g_fp->_system->getPaletteManager()->setPalette(aviDecoder->getPalette(), 0, 256);
@@ -274,6 +409,7 @@ ModalMap::ModalMap() {
_mapScene = 0;
_pic = NULL;
_picI03 = NULL;
+ _highlightedPic = NULL;
_isRunning = false;
_rect1 = g_fp->_sceneRect;
_x = g_fp->_currentScene->_x;
@@ -300,6 +436,9 @@ ModalMap::~ModalMap() {
}
bool ModalMap::init(int counterdiff) {
+ if (_picI03)
+ return init2(counterdiff);
+
g_fp->setCursor(PIC_CSR_ITN);
if (_flag) {
@@ -327,6 +466,105 @@ bool ModalMap::init(int counterdiff) {
return _isRunning;
}
+bool ModalMap::init2(int counterdiff) {
+ g_fp->setCursor(PIC_CSR_DEFAULT);
+
+ _dragX = (int)((double)_dragX * 0.6666666666666666);
+ _dragY = (int)((double)_dragY * 0.6666666666666666);
+
+ if (800 - g_fp->_mouseScreenPos.x < 67) {
+ g_fp->setCursor(PIC_CSR_GOR);
+
+ _dragX = g_fp->_mouseScreenPos.x - 733;
+ _dragY = (int)((double)_dragY * 0.6666666666666666);
+ }
+
+ if (g_fp->_mouseScreenPos.x < 67) {
+ g_fp->setCursor(PIC_CSR_GOL);
+
+ this->_dragX = g_fp->_mouseScreenPos.x - 67;
+ this->_dragY = (int)((double)_dragY * 0.6666666666666666);
+ }
+
+ if (g_fp->_mouseScreenPos.y < 67) {
+ g_fp->setCursor(PIC_CSR_GOU);
+
+ _dragX = (int)((double)_dragX * 0.6666666666666666);
+ _dragY = g_fp->_mouseScreenPos.y - 67;
+ }
+
+ if (600 - g_fp->_mouseScreenPos.y < 87) {
+ g_fp->setCursor(PIC_CSR_GOD);
+
+ _dragX = (int)((double)_dragX * 0.6666666666666666);
+ _dragY = g_fp->_mouseScreenPos.y - 513;
+ }
+
+ g_fp->_sceneRect.translate(_dragX, _dragY);
+ _mapScene->updateScrolling2();
+ _rect2 = g_fp->_sceneRect;
+
+ PictureObject *hpic = getSceneHPicture(_mapScene->getPictureObjectAtPos(g_fp->_mouseVirtX, g_fp->_mouseVirtY));
+
+ if (hpic != _highlightedPic) {
+ if (_highlightedPic) {
+ _highlightedPic->_flags &= 0xFFFB;
+ _picI03->_flags &= 0xFFFB;
+ }
+
+ _highlightedPic = hpic;
+
+ if (hpic) {
+ PreloadItem pitem;
+
+ pitem.preloadId1 = g_fp->_currentScene->_sceneId;
+ pitem.sceneId = findMapSceneId(hpic->_id);
+
+ if (pitem.preloadId1 == pitem.sceneId || checkScenePass(&pitem)) {
+ _highlightedPic->_flags |= 4;
+
+ g_fp->playSound(SND_CMN_070, 0);
+ } else {
+ Common::Point p1, p2;
+
+ _picI03->getDimensions(&p1);
+ _highlightedPic->getDimensions(&p2);
+
+ _picI03->setOXY(_highlightedPic->_ox + p2.x / 2 - p1.x / 2, _highlightedPic->_oy + p2.y / 2 - p1.y / 2);
+ _picI03->_flags |= 4;
+ }
+ }
+ }
+
+ if (this->_highlightedPic) {
+ g_fp->setCursor(PIC_CSR_ITN);
+
+ _hotSpotDelay--;
+
+ if (_hotSpotDelay <= 0) {
+ _hotSpotDelay = 12;
+
+ if (_pic)
+ _pic->_flags ^= 4;
+ }
+ }
+
+ return _isRunning;
+}
+
+int ModalMap::findMapSceneId(int picId) {
+ for (uint i = 0; i < g_fp->_gameLoader->_preloadItems.size(); i++) {
+ PreloadItem *pitem = g_fp->_gameLoader->_preloadItems[i];
+
+ if (pitem->preloadId1 == SC_MAP && pitem->preloadId2 == picId) {
+ return pitem->sceneId;
+ }
+ }
+
+ return 0;
+}
+
+
void ModalMap::update() {
g_fp->_sceneRect = _rect2;
@@ -341,6 +579,13 @@ bool ModalMap::handleMessage(ExCommand *cmd) {
switch (cmd->_messageNum) {
case 29:
+ if (_picI03) {
+ if (_highlightedPic)
+ clickButton(_highlightedPic);
+
+ return false;
+ }
+
_flag = 1;
_mouseX = g_fp->_mouseScreenPos.x;
_mouseY = g_fp->_mouseScreenPos.y;
@@ -351,6 +596,9 @@ bool ModalMap::handleMessage(ExCommand *cmd) {
return false;
case 30:
+ if (_picI03)
+ return false;
+
_flag = 0;
return false;
@@ -394,7 +642,7 @@ void ModalMap::initMap() {
pic->_flags &= 0xfffb;
}
- pic = getScenePicture();
+ pic = getScenePicture(g_fp->_currentScene->_sceneId);
Common::Point point;
Common::Point point2;
@@ -407,6 +655,8 @@ void ModalMap::initMap() {
_rect2.right = _rect2.left + 800;
_rect2.bottom = _rect2.top + 600;
+ g_fp->_sceneRect = _rect2;
+
_mapScene->updateScrolling2();
_pic = _mapScene->getPictureObjectById(PIC_MAP_I02, 0);
@@ -426,8 +676,6 @@ void ModalMap::initMap() {
if (_picI03) {
_picI03->_flags &= 0xFFFB;
- } else {
- warning("No PIC_MAP_I03");
}
g_system->warpMouse(400, 300);
@@ -437,10 +685,61 @@ void ModalMap::initMap() {
g_fp->setArcadeOverlay(PIC_CSR_MAP);
}
-PictureObject *ModalMap::getScenePicture() {
+void ModalMap::clickButton(PictureObject *pic) {
+ if (g_fp->_currentScene == g_fp->_loaderScene) {
+ _isRunning = 0;
+ return;
+ }
+
+ PreloadItem *pitem = 0;
+
+ for (uint i = 0; i < g_fp->_gameLoader->_preloadItems.size(); i++)
+ if (g_fp->_gameLoader->_preloadItems[i]->preloadId2 == SC_MAP) {
+ pitem = g_fp->_gameLoader->_preloadItems[i];
+ break;
+ }
+
+ if (!pitem) {
+ PreloadItem preload;
+
+ preload.preloadId2 = SC_MAP;
+ g_fp->_gameLoader->addPreloadItem(&preload);
+ pitem = g_fp->_gameLoader->_preloadItems[g_fp->_gameLoader->_preloadItems.size() - 1];
+ }
+
+ PreloadItem *pitem2 = 0;
+
+ for (uint i = 0; i < g_fp->_gameLoader->_preloadItems.size(); i++)
+ if (g_fp->_gameLoader->_preloadItems[i]->preloadId1 == SC_MAP &&
+ g_fp->_gameLoader->_preloadItems[i]->preloadId2 == pic->_id) {
+ pitem2 = g_fp->_gameLoader->_preloadItems[i];
+ break;
+ }
+
+ if (pitem && pitem2) {
+ pitem->preloadId1 = g_fp->_currentScene->_sceneId;
+ pitem->sceneId = pitem2->sceneId;
+ pitem->param = pitem2->param;
+
+ if (pitem->preloadId1 == pitem2->sceneId) {
+ _isRunning = 0;
+ } else if (checkScenePass(pitem)) {
+ _isRunning = 0;
+
+ if (!g_fp->isSaveAllowed()) {
+ //g_fp->_gameLoader->loadAndDecryptSave("savetmp.sav");
+ }
+ g_fp->_gameLoader->preloadScene(pitem->preloadId1, SC_MAP);
+ } else {
+ g_fp->playSound(SND_CMN_056, 0);
+ }
+ }
+}
+
+PictureObject *ModalMap::getScenePicture(int sceneId) {
int picId = 0;
- switch (g_fp->_currentScene->_sceneId) {
+ switch (sceneId) {
case SC_1:
picId = PIC_MAP_S01;
break;
@@ -651,6 +950,82 @@ PictureObject *ModalMap::getSceneHPicture(PictureObject *obj) {
}
}
+bool ModalMap::isSceneEnabled(int sceneId) {
+ int id = getScenePicture(sceneId)->_id;
+
+ for (int i = 0; i < 200; i++) {
+ int mapPic = g_fp->_mapTable[i] >> 16;
+ if (!mapPic)
+ return false;
+
+ if (mapPic == id)
+ return (g_fp->_mapTable[i] & 0xffff) == 1;
+ }
+
+ return false;
+}
+
+bool ModalMap::checkScenePass(PreloadItem *item) {
+ bool res = true;
+
+ switch (item->preloadId1) {
+ case SC_13:
+ if (!isSceneEnabled(SC_14))
+ res = false;
+ break;
+
+ case SC_27:
+ if (item->sceneId == SC_25) {
+ item->param = TrubaRight;
+ } else {
+ res = false;
+ }
+ break;
+
+ case SC_25:
+ if (g_fp->getObjectState(sO_Board_25) != g_fp->getObjectEnumState(sO_Board_25, sO_NearDudesStairs)) {
+ res = false;
+ }
+ }
+
+ switch (item->sceneId) {
+ case SC_13:
+ if (isSceneEnabled(SC_14)) {
+ item->param = TrubaLeft;
+ break;
+ }
+ item->param = TrubaUp;
+ break;
+
+ case SC_27:
+ res = false;
+ break;
+
+ case SC_25:
+ if (g_fp->getObjectState(sO_Pool) != g_fp->getObjectEnumState(sO_Pool, sO_Empty)) {
+ if (g_fp->getObjectState(sO_Pool) != g_fp->getObjectEnumState(sO_Pool, sO_HalfFull))
+ res = false;
+ }
+ break;
+
+ case SC_29:
+ if (isSceneEnabled(SC_30)) {
+ item->param = TrubaLeft;
+ break;
+ }
+ item->param = TrubaUp;
+ break;
+ }
+
+ if ((item->sceneId != SC_37 && item->preloadId1 != SC_37)
+ || (g_fp->getObjectState(sO_Jawcrucnher) != g_fp->getObjectEnumState(sO_Jawcrucnher, sO_WithoutCarpet))) {
+ return res;
+ } else {
+ res = false;
+ }
+ return res;
+}
+
void FullpipeEngine::openMap() {
if (!_modalObject) {
ModalMap *map = new ModalMap;
@@ -1412,7 +1787,10 @@ void ModalHelp::launch() {
_mainMenuScene = g_fp->accessScene(SC_MAINMENU);
if (_mainMenuScene) {
- _bg = _mainMenuScene->getPictureObjectById(PIC_HLP_BGR, 0)->_picture;
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS)
+ _bg = _mainMenuScene->getPictureObjectById(364, 0)->_picture;
+ else
+ _bg = _mainMenuScene->getPictureObjectById(PIC_HLP_BGR, 0)->_picture;
_isRunning = 1;
}
}
@@ -1432,6 +1810,28 @@ ModalQuery::~ModalQuery() {
}
bool ModalQuery::create(Scene *sc, Scene *bgScene, int id) {
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS) {
+ _bg = sc->getPictureObjectById(386, 0);
+
+ if (!_bg)
+ return false;
+
+ _okBtn = sc->getPictureObjectById(392, 0);
+
+ if (!_okBtn)
+ return false;
+
+ _cancelBtn = sc->getPictureObjectById(396, 0);
+
+ if (!_cancelBtn)
+ return 0;
+
+ _queryResult = -1;
+ _bgScene = bgScene;
+
+ return true;
+ }
+
if (id == PIC_MEX_BGR) {
_bg = sc->getPictureObjectById(PIC_MEX_BGR, 0);
@@ -1446,7 +1846,7 @@ bool ModalQuery::create(Scene *sc, Scene *bgScene, int id) {
_cancelBtn = sc->getPictureObjectById(PIC_MEX_CANCEL, 0);
if (!_cancelBtn)
- return 0;
+ return false;
} else {
if (id != PIC_MOV_BGR)
return false;
@@ -1521,6 +1921,18 @@ bool ModalQuery::init(int counterdiff) {
if (_queryResult == -1) {
return true;
} else {
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS) {
+ if (!_queryResult)
+ return false;
+
+ ModalDemo *demo = new ModalDemo;
+ demo->launch();
+
+ g_fp->_modalObject = demo;
+
+ return true;
+ }
+
if (_bg->_id == PIC_MEX_BGR) {
_cancelBtn->_flags &= 0xFFFB;
_okBtn->_flags &= 0xFFFB;
@@ -1893,6 +2305,168 @@ void ModalSaveGame::saveload() {
}
}
+ModalDemo::ModalDemo() {
+ _bg = 0;
+ _button = 0;
+ _text = 0;
+
+ if (g_fp->getLanguage() == Common::RU_RUS) {
+ _clickedQuit = 0;
+ _countdown = -10;
+ } else {
+ _clickedQuit = -1;
+ _countdown = 1000;
+ }
+ _scene = 0;
+}
+
+ModalDemo::~ModalDemo() {
+ if (_bg)
+ _bg->_flags &= 0xFFFB;
+
+ _button->_flags &= 0xFFFB;
+ _text->_flags &= 0xFFFB;
+}
+
+bool ModalDemo::launch() {
+ Scene *sc = g_fp->accessScene(SC_MAINMENU);
+
+ if (g_fp->getLanguage() == Common::RU_RUS) {
+ _scene = sc;
+
+ for (uint i = 1; i < sc->_picObjList.size(); i++) {
+ if (((PictureObject *)sc->_picObjList[i])->_id == 399)
+ sc->_picObjList[i]->_flags |= 4;
+ else
+ sc->_picObjList[i]->_flags &= 0xFFFB;
+ }
+
+ _button = sc->getPictureObjectById(443, 0);
+ _text = sc->getPictureObjectById(402, 0);
+
+ _countdown = -10;
+
+ return true;
+ }
+
+ _bg = sc->getPictureObjectById(PIC_POST_BGR, 0);
+
+ if (!_bg)
+ return false;
+
+ _button = sc->getPictureObjectById(PIC_POST_BUTTON, 0);
+ _text = sc->getPictureObjectById(PIC_POST_TEXT, 0);
+
+ _clickedQuit = -1;
+
+ // fadeout
+ warning("STUB: ModelDemo: fadeout");
+ update();
+
+ g_fp->stopAllSoundStreams();
+ g_fp->stopAllSounds();
+ g_fp->playSound(SND_CMN_056, 0);
+ g_fp->playSound(SND_CMN_069, 1);
+
+ return true;
+}
+
+bool ModalDemo::init(int counterDiff) {
+ if (g_fp->getLanguage() == Common::RU_RUS)
+ return init2(counterDiff);
+
+ g_fp->_cursorId = PIC_CSR_DEFAULT;
+
+ if (_button->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y)) {
+ if (!(_button->_flags & 4))
+ g_fp->playSound(SND_CMN_070, 0);
+
+ _button->_flags |= 4;
+
+ g_fp->_cursorId = PIC_CSR_ITN;
+ } else {
+ _button->_flags &= 0xFFFB;
+ }
+
+ g_fp->setCursor(g_fp->_cursorId);
+
+ _countdown -= counterDiff;
+
+ if (_countdown <= 0)
+ _countdown = 1000;
+
+ if (_clickedQuit == -1)
+ return true;
+
+ g_system->openUrl("http://www.amazon.de/EuroVideo-Bildprogramm-GmbH-Full-Pipe/dp/B003TO51YE/ref=sr_1_1?ie=UTF8&s=videogames&qid=1279207213&sr=8-1");
+
+ g_fp->_gameContinue = false;
+
+ return false;
+}
+
+bool ModalDemo::init2(int counterDiff) {
+ if (_clickedQuit) {
+ g_system->openUrl("http://pipestudio.ru/fullpipe/");
+
+ g_fp->_gameContinue = false;
+
+ return false;
+ }
+
+ if (_countdown > 0) {
+ _countdown--;
+ } else {
+ _text->_flags ^= 4;
+ _countdown = 24;
+ }
+
+ if (_button->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y)) {
+ _button->_flags |= 4;
+
+ g_fp->_cursorId = PIC_CSR_ITN;
+ } else {
+ _button->_flags &= 0xFFFB;
+
+ g_fp->_cursorId = PIC_CSR_DEFAULT;
+ }
+
+ return true;
+}
+
+void ModalDemo::update() {
+ if (g_fp->getLanguage() == Common::RU_RUS) {
+ if (_countdown == -10)
+ g_fp->sceneFade(_scene, true);
+
+ _scene->draw();
+
+ return;
+ }
+
+ _bg->draw();
+
+ if (_button->_flags & 4)
+ _button->draw();
+
+ if (_text->_flags & 4)
+ _text->draw();
+}
+
+bool ModalDemo::handleMessage(ExCommand *cmd) {
+ if (cmd->_messageKind != 17)
+ return false;
+
+ if (cmd->_messageNum == 29) {
+ if (_button->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y))
+ _clickedQuit = 1;
+ } else if (cmd->_messageNum == 36 && (cmd->_param == 27 || g_fp->getLanguage() == Common::RU_RUS)) {
+ _clickedQuit = 1;
+ }
+
+ return false;
+}
+
void FullpipeEngine::openHelp() {
if (!_modalObject) {
ModalHelp *help = new ModalHelp;
@@ -1904,6 +2478,17 @@ void FullpipeEngine::openHelp() {
}
void FullpipeEngine::openMainMenu() {
+ if (isDemo() && getLanguage() == Common::RU_RUS) {
+ ModalQuery *q = new ModalQuery;
+
+ Scene *sc = accessScene(SC_MAINMENU);
+
+ q->create(sc, 0, 0);
+
+ g_fp->_modalObject = q;
+
+ return;
+ }
ModalMainMenu *menu = new ModalMainMenu;
menu->_parentObj = g_fp->_modalObject;
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index a8d8a811f5..ba8880827d 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -78,6 +78,26 @@ class ModalIntro : public BaseModalObject {
void finish();
};
+class ModalIntroDemo : public BaseModalObject {
+ int _field_8;
+ int _introFlags;
+ int _countDown;
+ int _stillRunning;
+ int _sfxVolume;
+
+ public:
+ ModalIntroDemo();
+ virtual ~ModalIntroDemo();
+
+ virtual bool pollEvent() { return true; }
+ virtual bool handleMessage(ExCommand *message);
+ virtual bool init(int counterdiff);
+ virtual void update();
+ virtual void saveload() {}
+
+ void finish();
+};
+
class ModalVideoPlayer : public BaseModalObject {
public:
@@ -94,6 +114,7 @@ class ModalMap : public BaseModalObject {
Scene *_mapScene;
PictureObject *_pic;
PictureObject *_picI03;
+ PictureObject *_highlightedPic;
bool _isRunning;
Common::Rect _rect1;
int _x;
@@ -113,12 +134,20 @@ class ModalMap : public BaseModalObject {
virtual bool pollEvent() { return true; }
virtual bool handleMessage(ExCommand *message);
virtual bool init(int counterdiff);
+ virtual bool init2(int counterdiff);
virtual void update();
virtual void saveload() {}
void initMap();
- PictureObject *getScenePicture();
+
+private:
+ PictureObject *getScenePicture(int sceneId);
PictureObject *getSceneHPicture(PictureObject *obj);
+ bool checkScenePass(PreloadItem *item);
+ bool isSceneEnabled(int sceneId);
+
+ int findMapSceneId(int picId);
+ void clickButton(PictureObject *pic);
};
class ModalFinal : public BaseModalObject {
@@ -291,6 +320,28 @@ public:
int _queryRes;
};
+class ModalDemo : public BaseModalObject {
+ PictureObject *_bg;
+ PictureObject *_button;
+ PictureObject *_text;
+ int _clickedQuit;
+ int _countdown;
+ Scene *_scene;
+
+ public:
+ ModalDemo();
+ virtual ~ModalDemo();
+
+ bool launch();
+
+ virtual bool pollEvent() { return true; }
+ virtual bool handleMessage(ExCommand *message);
+ virtual bool init(int counterdiff);
+ bool init2(int counterdiff);
+ virtual void update();
+ virtual void saveload() {}
+};
+
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk
index 62f9c5f77a..5dc6bb82c9 100644
--- a/engines/fullpipe/module.mk
+++ b/engines/fullpipe/module.mk
@@ -27,6 +27,7 @@ MODULE_OBJS = \
statics.o \
utils.o \
scenes/sceneIntro.o \
+ scenes/sceneIntroDemo.o \
scenes/scene01.o \
scenes/scene02.o \
scenes/scene03.o \
diff --git a/engines/fullpipe/objectnames.h b/engines/fullpipe/objectnames.h
index 0baf83b175..7af82ff62c 100644
--- a/engines/fullpipe/objectnames.h
+++ b/engines/fullpipe/objectnames.h
@@ -32,6 +32,7 @@ namespace Fullpipe {
#define sO_Pool "\xc1\xe0\xf1\xf1\xe5\xe9\xed" // "БаÑÑейн"
#define sO_TummyTrampie "\xc1\xe0\xf2\xf3\xf2\xe0" // "Батута"
#define sO_WithoutBoot "\xc1\xe5\xe7 \xe1\xee\xf2\xe8\xed\xea\xe0" // "Без ботинка"
+#define sO_WithoutJug "\xc1\xe5\xe7 \xe3\xee\xf0\xf8\xea\xe0" // "Без горшка"
#define sO_WithoutJugs "\xc1\xe5\xe7 \xe3\xee\xf0\xf8\xea\xee\xe2" // "Без горшков"
#define sO_WithoutCarpet "\xc1\xe5\xe7 \xea\xee\xe2\xf0\xe8\xea\xe0" // "Без коврика"
#define sO_WithoutCoin "\xc1\xe5\xe7 \xec\xee\xed\xe5\xf2\xfb" // "Без монеты"
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index b5258183b0..4e3678bfb4 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -31,6 +31,7 @@
#include "fullpipe/constants.h"
#include "common/algorithm.h"
+#include "graphics/surface.h"
namespace Fullpipe {
@@ -400,7 +401,7 @@ MessageQueue *Scene::getMessageQueueById(int messageId) {
MessageQueue *Scene::getMessageQueueByName(char *name) {
for (uint i = 0; i < _messageQueueList.size(); i++)
- if (!strcmp(_messageQueueList[i]->_queueName, name))
+ if (!strcmp(_messageQueueList[i]->_queueName.c_str(), name))
return _messageQueueList[i];
return 0;
@@ -534,7 +535,7 @@ void Scene::draw() {
updateScrolling();
// Clean previous stuff
- g_fp->_backgroundSurface.fillRect(Common::Rect(0, 0, 800, 600), 0);
+ g_fp->_backgroundSurface->fillRect(Common::Rect(0, 0, 800, 600), 0);
drawContent(60000, 0, true);
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 4b50763e8c..bb141d98c4 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -519,6 +519,17 @@ int FullpipeEngine::getSceneFromTag(int tag) {
return 1;
}
+void FullpipeEngine::sceneAutoScrolling() {
+ if (_aniMan2 == _aniMan && _currentScene && !_currentScene->_messageQueueId) {
+ if (800 - _mouseScreenPos.x >= 47 || _sceneRect.right >= _sceneWidth - 1 || _aniMan->_ox <= _sceneRect.left + 230) {
+ if (_mouseScreenPos.x < 47 && _sceneRect.left > 0 && _aniMan->_ox < _sceneRect.right - 230)
+ _currentScene->_x = -10;
+ } else {
+ _currentScene->_x = 10;
+ }
+ }
+}
+
bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
GameVar *sceneVar;
Common::Point sceneDim;
@@ -542,8 +553,8 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
_aniMan->setOXY(0, 0);
_aniMan->clearFlags();
- _aniMan->_callback1 = 0;
- _aniMan->_callback2 = 0;
+ _aniMan->_callback1 = 0; // Really NULL
+ _aniMan->_callback2 = 0; // Really NULL
_aniMan->_shadowsOn = 1;
_scrollSpeed = 8;
@@ -605,12 +616,23 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
case SC_INTRO1:
sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_INTRO1");
scene->preloadMovements(sceneVar);
- sceneIntro_initScene(scene);
+
+ if (!(g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS))
+ sceneIntro_initScene(scene);
+ else
+ sceneIntroDemo_initScene(scene);
+
_behaviorManager->initBehavior(scene, sceneVar);
scene->initObjectCursors("SC_INTRO1");
setSceneMusicParameters(sceneVar);
- addMessageHandler(sceneHandlerIntro, 2);
- _updateCursorCallback = sceneIntro_updateCursor;
+
+ if (!(g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS)) {
+ addMessageHandler(sceneHandlerIntro, 2);
+ _updateCursorCallback = sceneIntro_updateCursor;
+ } else {
+ addMessageHandler(sceneHandlerIntroDemo, 2);
+ _updateCursorCallback = sceneIntroDemo_updateCursor;
+ }
break;
case SC_1:
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index 2d30f54d52..1d54aef441 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -41,6 +41,10 @@ int sceneIntro_updateCursor();
void sceneIntro_initScene(Scene *sc);
int sceneHandlerIntro(ExCommand *cmd);
+int sceneIntroDemo_updateCursor();
+void sceneIntroDemo_initScene(Scene *sc);
+int sceneHandlerIntroDemo(ExCommand *cmd);
+
void scene01_fixEntrance();
void scene01_initScene(Scene *sc, int entrance);
int sceneHandler01(ExCommand *cmd);
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index d349783c10..0e5040097c 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -1447,7 +1447,11 @@ int sceneHandler04(ExCommand *ex) {
}
res = 1;
+ }
+
+ g_fp->sceneAutoScrolling();
+ if (g_fp->_aniMan2) {
if (g_vars->scene04_soundPlaying) {
if (g_fp->_aniMan->_movement) {
if (g_fp->_aniMan->_movement->_id == MV_MAN_TOLADDER) {
diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp
index 5fab4b5862..a6d93b69bd 100644
--- a/engines/fullpipe/scenes/scene06.cpp
+++ b/engines/fullpipe/scenes/scene06.cpp
@@ -82,7 +82,7 @@ void sceneHandler06_winArcade() {
g_fp->setObjectState(sO_ClockAxis, g_fp->getObjectEnumState(sO_ClockAxis, sO_WithoutHandle));
if (g_vars->scene06_arcadeEnabled) {
- g_fp->_aniMan->_callback2 = 0;
+ g_fp->_aniMan->_callback2 = 0; // Really NULL
g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000);
@@ -707,6 +707,8 @@ int sceneHandler06(ExCommand *ex) {
}
res = 1;
+
+ g_fp->sceneAutoScrolling();
}
if (g_vars->scene06_arcadeEnabled) {
if (g_vars->scene06_mumsyPos > -3)
diff --git a/engines/fullpipe/scenes/scene08.cpp b/engines/fullpipe/scenes/scene08.cpp
index b9aaabe1af..24b23c1506 100644
--- a/engines/fullpipe/scenes/scene08.cpp
+++ b/engines/fullpipe/scenes/scene08.cpp
@@ -33,9 +33,14 @@
#include "fullpipe/gameloader.h"
#include "fullpipe/behavior.h"
#include "fullpipe/interaction.h"
+#include "fullpipe/modal.h"
namespace Fullpipe {
+void scene08_clockCallback(int *phase) {
+ // do nothing
+}
+
void scene08_initScene(Scene *sc) {
g_vars->scene08_inArcade = false;
g_vars->scene08_inAir = false;
@@ -80,7 +85,7 @@ void scene08_initScene(Scene *sc) {
g_vars->scene08_snoringCountdown = 71;
}
- g_vars->scene08_clock->_callback2 = 0;
+ g_vars->scene08_clock->_callback2 = scene08_clockCallback;
if (g_fp->getObjectState(sO_StairsUp_8) == g_fp->getObjectEnumState(sO_StairsUp_8, sO_Broken)) {
g_vars->scene08_stairsVisible = false;
@@ -405,6 +410,15 @@ void sceneHandler08_checkEndArcade() {
if (y < 80) {
sceneHandler08_finishArcade();
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::DE_DEU) {
+ ModalDemo *demo = new ModalDemo;
+ demo->launch();
+
+ g_fp->_modalObject = demo;
+
+ return;
+ }
+
ExCommand *ex = new ExCommand(SC_8, 17, 0, 0, 0, 0, 1, 0, 0, 0);
ex->_messageNum = 61;
ex->_excFlags |= 2;
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index 3a8b937f24..169d06c331 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -33,7 +33,6 @@
#include "fullpipe/interaction.h"
#include "fullpipe/behavior.h"
-
namespace Fullpipe {
struct Hanger {
@@ -416,6 +415,10 @@ void sceneHandler09_hangerStartCycle() {
}
}
+void scene09_visCallback(int *phase) {
+ // do nothing
+}
+
int sceneHandler09(ExCommand *cmd) {
if (cmd->_messageKind != 17)
return 0;
@@ -459,6 +462,13 @@ int sceneHandler09(ExCommand *cmd) {
sceneHandler09_showBall();
break;
+ case 367:
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS) {
+ g_fp->_needRestart = true;
+ return 0;
+ }
+ break;
+
case 33:
{
int res = 0;
@@ -475,6 +485,8 @@ int sceneHandler09(ExCommand *cmd) {
g_fp->_currentScene->_x = x - g_fp->_sceneRect.right + 300;
res = 1;
+
+ g_fp->sceneAutoScrolling();
} else {
if (g_fp->_aniMan->_movement && g_fp->_aniMan->_movement->_id != MV_MAN9_SHOOT)
g_fp->_aniMan2 = g_fp->_aniMan;
@@ -497,7 +509,7 @@ int sceneHandler09(ExCommand *cmd) {
case 30:
if (g_vars->scene09_interactingHanger >= 0) {
if (ABS(g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->phase) < 15) {
- g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->ani->_callback2 = 0;
+ g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->ani->_callback2 = 0; // Really NULL
g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->ani->changeStatics2(ST_VSN_NORMAL);
}
}
@@ -538,7 +550,7 @@ int sceneHandler09(ExCommand *cmd) {
if (!g_vars->scene09_hangers[hng]->ani->_movement || g_vars->scene09_hangers[hng]->ani->_movement->_id != MV_VSN_CYCLE2) {
g_vars->scene09_hangers[hng]->ani->changeStatics2(ST_VSN_NORMAL);
g_vars->scene09_hangers[hng]->ani->startAnim(MV_VSN_CYCLE2, 0, -1);
- g_vars->scene09_hangers[hng]->ani->_callback2 = 0;
+ g_vars->scene09_hangers[hng]->ani->_callback2 = scene09_visCallback;
}
ExCommand *ex = new ExCommand(0, 35, SND_9_018, 0, 0, 0, 1, 0, 0, 0);
diff --git a/engines/fullpipe/scenes/scene11.cpp b/engines/fullpipe/scenes/scene11.cpp
index 8c3de9e11e..72af59aacf 100644
--- a/engines/fullpipe/scenes/scene11.cpp
+++ b/engines/fullpipe/scenes/scene11.cpp
@@ -671,6 +671,8 @@ int sceneHandler11(ExCommand *cmd) {
if (x >= 940)
g_vars->scene11_scrollIsMaximized = true;
+
+ g_fp->sceneAutoScrolling();
}
res = 1;
}
diff --git a/engines/fullpipe/scenes/scene13.cpp b/engines/fullpipe/scenes/scene13.cpp
index 12fe1dd35d..7b38442603 100644
--- a/engines/fullpipe/scenes/scene13.cpp
+++ b/engines/fullpipe/scenes/scene13.cpp
@@ -60,7 +60,7 @@ void scene13_initScene(Scene *sc) {
g_fp->playSound(SND_13_018, 1);
- g_vars->scene13_whirlgig->_callback2 = 0;
+ g_vars->scene13_whirlgig->_callback2 = 0; // Really NULL
} else {
g_vars->scene13_bridge->changeStatics2(ST_BDG_OPEN2);
@@ -167,7 +167,7 @@ void sceneHandler13_stopWhirlgig() {
}
void sceneHandler13_startWhirlgig() {
- g_vars->scene13_whirlgig->_callback2 = 0;
+ g_vars->scene13_whirlgig->_callback2 = 0; // Really NULL
g_fp->playSound(SND_13_018, 1);
g_fp->playSound(SND_13_034, 0);
@@ -348,6 +348,8 @@ int sceneHandler13(ExCommand *cmd) {
g_fp->_currentScene->_x = x - g_fp->_sceneRect.right + 300;
res = 1;
+
+ g_fp->sceneAutoScrolling();
} else {
x = g_vars->scene13_dudeX;
}
diff --git a/engines/fullpipe/scenes/scene14.cpp b/engines/fullpipe/scenes/scene14.cpp
index 977f3d95ac..d5070bb17b 100644
--- a/engines/fullpipe/scenes/scene14.cpp
+++ b/engines/fullpipe/scenes/scene14.cpp
@@ -380,7 +380,7 @@ void sceneHandler14_startArcade() {
}
void sceneHandler14_clearCallback() {
- g_fp->_aniMan->_callback2 = 0;
+ g_fp->_aniMan->_callback2 = 0; // Really NULL
g_vars->scene14_dudeIsKicking = false;
}
@@ -788,6 +788,8 @@ int sceneHandler14(ExCommand *cmd) {
if (x > g_fp->_sceneRect.right - g_vars->scene14_sceneDeltaX)
g_fp->_currentScene->_x = x + g_vars->scene14_sceneDiffX - g_fp->_sceneRect.right;
+
+ g_fp->sceneAutoScrolling();
}
if (g_vars->scene14_ballIsFlying)
diff --git a/engines/fullpipe/scenes/scene18and19.cpp b/engines/fullpipe/scenes/scene18and19.cpp
index a6f77a33fd..eb338ead88 100644
--- a/engines/fullpipe/scenes/scene18and19.cpp
+++ b/engines/fullpipe/scenes/scene18and19.cpp
@@ -774,6 +774,8 @@ int sceneHandler18(ExCommand *cmd) {
if (x > g_fp->_sceneRect.right - 200)
g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+ g_fp->sceneAutoScrolling();
}
if (g_vars->scene18_manIsReady && g_fp->_aniMan->_movement)
diff --git a/engines/fullpipe/scenes/scene21.cpp b/engines/fullpipe/scenes/scene21.cpp
index 1b232e1aee..7a61e4862d 100644
--- a/engines/fullpipe/scenes/scene21.cpp
+++ b/engines/fullpipe/scenes/scene21.cpp
@@ -129,6 +129,8 @@ int sceneHandler21(ExCommand *cmd) {
if (x > g_fp->_sceneRect.right - 200)
g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+ g_fp->sceneAutoScrolling();
}
if (g_vars->scene21_pipeIsOpen && !g_vars->scene21_wiggleTrigger)
diff --git a/engines/fullpipe/scenes/scene22.cpp b/engines/fullpipe/scenes/scene22.cpp
index 3af8bad456..5b9b091f36 100644
--- a/engines/fullpipe/scenes/scene22.cpp
+++ b/engines/fullpipe/scenes/scene22.cpp
@@ -381,6 +381,8 @@ int sceneHandler22(ExCommand *cmd) {
if (x > g_fp->_sceneRect.right - 200)
g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+ g_fp->sceneAutoScrolling();
+
g_fp->_behaviorManager->updateBehaviors();
g_fp->startSceneTrack();
diff --git a/engines/fullpipe/scenes/scene26.cpp b/engines/fullpipe/scenes/scene26.cpp
index 9706bd5927..0efabaeda8 100644
--- a/engines/fullpipe/scenes/scene26.cpp
+++ b/engines/fullpipe/scenes/scene26.cpp
@@ -69,6 +69,11 @@ int scene26_updateCursor() {
if (g_fp->_objectIdAtCursor != ANI_VENT || g_fp->_cursorId != PIC_CSR_DEFAULT) {
if (g_fp->_cursorId == PIC_CSR_ITN && g_fp->_objectIdAtCursor == PIC_SC26_LTRUBA)
g_fp->_cursorId = PIC_CSR_GOL;
+
+ // WORKAROUND: Fixing cursor
+ if (g_fp->_objectIdAtCursor == PIC_SC26_LTRUBA &&
+ (g_fp->_cursorId == PIC_CSR_GOU || g_fp->_cursorId == PIC_CSR_GOD || g_fp->_cursorId == PIC_CSR_GOR))
+ g_fp->_cursorId = PIC_CSR_GOL;
} else {
g_fp->_cursorId = PIC_CSR_ITN;
}
diff --git a/engines/fullpipe/scenes/scene27.cpp b/engines/fullpipe/scenes/scene27.cpp
index a6ddbab5e3..aaf7fab852 100644
--- a/engines/fullpipe/scenes/scene27.cpp
+++ b/engines/fullpipe/scenes/scene27.cpp
@@ -124,7 +124,7 @@ void sceneHandler27_winArcade() {
if (g_fp->getObjectState(sO_Driver) == g_fp->getObjectEnumState(sO_Driver, sO_WithSteering)) {
g_vars->scene27_dudeIsAiming = false;
- g_fp->_aniMan->_callback2 = 0;
+ g_fp->_aniMan->_callback2 = 0; // Really NULL
g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT);
sceneHandler27_driverGiveVent();
@@ -248,7 +248,7 @@ void sceneHandler27_startAiming() {
g_vars->scene27_dudeIsAiming = false;
g_vars->scene27_maxPhaseReached = false;
- g_fp->_aniMan->_callback2 = 0;
+ g_fp->_aniMan->_callback2 = 0; // Really NULL
g_vars->scene27_launchPhase = g_fp->_aniMan->_movement->_currDynamicPhaseIndex - 6;
diff --git a/engines/fullpipe/scenes/scene28.cpp b/engines/fullpipe/scenes/scene28.cpp
index 8d829d7b98..275c78802f 100644
--- a/engines/fullpipe/scenes/scene28.cpp
+++ b/engines/fullpipe/scenes/scene28.cpp
@@ -440,6 +440,8 @@ int sceneHandler28(ExCommand *cmd) {
if (x > g_fp->_sceneRect.right - 200)
g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+ g_fp->sceneAutoScrolling();
}
if (g_vars->scene28_darkeningObject) {
diff --git a/engines/fullpipe/scenes/scene32.cpp b/engines/fullpipe/scenes/scene32.cpp
index 9cd79d8115..593f7b446c 100644
--- a/engines/fullpipe/scenes/scene32.cpp
+++ b/engines/fullpipe/scenes/scene32.cpp
@@ -355,6 +355,8 @@ int sceneHandler32(ExCommand *cmd) {
if (x > g_fp->_sceneRect.right - 200)
g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+ g_fp->sceneAutoScrolling();
}
if (!g_vars->scene32_flag->_movement) {
diff --git a/engines/fullpipe/scenes/scene33.cpp b/engines/fullpipe/scenes/scene33.cpp
index 6a58cdf694..717e9f6572 100644
--- a/engines/fullpipe/scenes/scene33.cpp
+++ b/engines/fullpipe/scenes/scene33.cpp
@@ -296,6 +296,8 @@ int sceneHandler33(ExCommand *cmd) {
if (x > g_fp->_sceneRect.right - 200)
g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+ g_fp->sceneAutoScrolling();
}
if (g_vars->scene33_cube)
diff --git a/engines/fullpipe/scenes/scene34.cpp b/engines/fullpipe/scenes/scene34.cpp
index bc4ff18bae..69f3cd5293 100644
--- a/engines/fullpipe/scenes/scene34.cpp
+++ b/engines/fullpipe/scenes/scene34.cpp
@@ -457,6 +457,8 @@ int sceneHandler34(ExCommand *cmd) {
if (x > g_fp->_sceneRect.right - 200)
g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+ g_fp->sceneAutoScrolling();
}
--g_vars->scene34_fliesCountdown;
diff --git a/engines/fullpipe/scenes/scene35.cpp b/engines/fullpipe/scenes/scene35.cpp
index 3cdbb42c1e..e8b08b2614 100644
--- a/engines/fullpipe/scenes/scene35.cpp
+++ b/engines/fullpipe/scenes/scene35.cpp
@@ -236,6 +236,8 @@ int sceneHandler35(ExCommand *cmd) {
if (x > g_fp->_sceneRect.right - 200)
g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+ g_fp->sceneAutoScrolling();
}
if (g_vars->scene35_flowCounter > 0) {
diff --git a/engines/fullpipe/scenes/scene37.cpp b/engines/fullpipe/scenes/scene37.cpp
index ba181642df..bce28ef382 100644
--- a/engines/fullpipe/scenes/scene37.cpp
+++ b/engines/fullpipe/scenes/scene37.cpp
@@ -280,6 +280,8 @@ int sceneHandler37(ExCommand *cmd) {
if (x > g_fp->_sceneRect.right - 200)
g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+ g_fp->sceneAutoScrolling();
}
sceneHandler37_setRingsState();
diff --git a/engines/fullpipe/scenes/sceneIntroDemo.cpp b/engines/fullpipe/scenes/sceneIntroDemo.cpp
new file mode 100644
index 0000000000..ea3c469ffd
--- /dev/null
+++ b/engines/fullpipe/scenes/sceneIntroDemo.cpp
@@ -0,0 +1,94 @@
+/* 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 "fullpipe/fullpipe.h"
+
+#include "fullpipe/constants.h"
+#include "fullpipe/gameloader.h"
+#include "fullpipe/motion.h"
+#include "fullpipe/scenes.h"
+#include "fullpipe/modal.h"
+#include "fullpipe/statics.h"
+
+namespace Fullpipe {
+
+int sceneIntroDemo_updateCursor() {
+ g_fp->_cursorId = 0;
+
+ return 0;
+}
+
+void sceneIntroDemo_initScene(Scene *sc) {
+ g_vars->sceneIntro_needSleep = true;
+ g_vars->sceneIntro_needGetup = false;
+ g_vars->sceneIntro_playing = true;
+ g_vars->sceneIntro_needBlackout = false;
+
+ if (g_fp->_recordEvents || g_fp->_inputArFlag)
+ g_vars->sceneIntro_skipIntro = false;
+
+ g_fp->_modalObject = new ModalIntroDemo;
+}
+
+void sceneHandlerIntroDemo_part1() {
+ g_fp->_currentScene = g_fp->accessScene(SC_INTRO1);
+ chainQueue(QU_INTR_FINISH, 0);
+}
+
+void sceneHandlerIntroDemo_part2() {
+ chainQueue(QU_IN2_DO, 0);
+}
+
+int sceneHandlerIntroDemo(ExCommand *ex) {
+ if (ex->_messageKind != 17)
+ return 0;
+
+ switch (ex->_messageNum) {
+ case MSG_INTR_ENDINTRO:
+ g_vars->sceneIntro_playing = 0;
+ return 0;
+
+ case MSG_INTR_SWITCHTO1:
+ sceneHandlerIntroDemo_part1();
+ return 0;
+
+ case MSG_INTR_GETUPMAN:
+ g_vars->sceneIntro_needSleep = 0;
+ g_vars->sceneIntro_needGetup = 1;
+ return 0;
+
+ case MSG_INTR_SWITCHTO2:
+ sceneHandlerIntroDemo_part2();
+ return 0;
+
+ case 33:
+ g_fp->startSceneTrack();
+ break;
+
+ default:
+ return 0;
+ }
+
+ return 0;
+}
+
+} // End of namespace Fullpipe
diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index be539bc10e..1a88e47134 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -102,14 +102,12 @@ Sound::Sound() {
_soundData = 0;
_objectId = 0;
memset(_directSoundBuffers, 0, sizeof(_directSoundBuffers));
- _description = 0;
_volume = 100;
_handle = new Audio::SoundHandle();
}
Sound::~Sound() {
freeSound();
- free(_description);
delete _handle;
}
@@ -119,7 +117,7 @@ bool Sound::load(MfcArchive &file, NGIArchive *archive) {
MemoryObject::load(file);
_id = file.readUint32LE();
- _description = file.readPascalString();
+ /*_description = */file.readPascalString();
assert(g_fp->_gameProjectVersion >= 6);
diff --git a/engines/fullpipe/sound.h b/engines/fullpipe/sound.h
index 4066c5e99e..bfc38829d6 100644
--- a/engines/fullpipe/sound.h
+++ b/engines/fullpipe/sound.h
@@ -31,7 +31,6 @@ namespace Fullpipe {
class Sound : public MemoryObject {
int _id;
- char *_description;
int _directSoundBuffer;
int _directSoundBuffers[7];
byte *_soundData;
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index 4861699f7e..86865f928a 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -69,18 +69,21 @@ bool GameLoader::readSavegame(const char *fname) {
byte *map = (byte *)malloc(800);
saveFile->read(map, 800);
- MfcArchive temp(new Common::MemoryReadStream(map, 800));
+ Common::MemoryReadStream *tempStream = new Common::MemoryReadStream(map, 800);
+ MfcArchive temp(tempStream);
if (_savegameCallback)
_savegameCallback(&temp, false);
+ delete tempStream;
delete saveFile;
// Deobfuscate the data
for (int i = 0; i < header.encSize; i++)
data[i] -= i & 0x7f;
- MfcArchive *archive = new MfcArchive(new Common::MemoryReadStream(data, header.encSize));
+ Common::MemoryReadStream *archiveStream = new Common::MemoryReadStream(data, header.encSize);
+ MfcArchive *archive = new MfcArchive(archiveStream);
GameVar *var = (GameVar *)archive->readClass();
@@ -91,6 +94,7 @@ bool GameLoader::readSavegame(const char *fname) {
if (!v) {
warning("No state to save");
+ delete archiveStream;
delete archive;
return false;
}
@@ -121,6 +125,7 @@ bool GameLoader::readSavegame(const char *fname) {
_sc2array[i]._isLoaded = 0;
}
+ delete archiveStream;
delete archive;
getGameLoaderInventory()->rebuildItemRects();
@@ -288,8 +293,13 @@ bool FullpipeEngine::loadGam(const char *fname, int scene) {
addMessageHandlerByIndex(global_messageHandler1, 0, 4);
_inventory = getGameLoaderInventory();
- _inventory->setItemFlags(ANI_INV_MAP, 0x10003);
- _inventory->addItem(ANI_INV_MAP, 1);
+
+ if (isDemo() && getLanguage() == Common::RU_RUS) {
+ _inventory->addItem(ANI_INV_HAMMER, 1);
+ } else {
+ _inventory->setItemFlags(ANI_INV_MAP, 0x10003);
+ _inventory->addItem(ANI_INV_MAP, 1);
+ }
_inventory->rebuildItemRects();
@@ -333,8 +343,13 @@ bool FullpipeEngine::loadGam(const char *fname, int scene) {
_gameLoader->loadScene(SC_INTRO1);
_gameLoader->gotoScene(SC_INTRO1, TrubaUp);
} else {
- _gameLoader->loadScene(SC_1);
- _gameLoader->gotoScene(SC_1, TrubaLeft);
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS) {
+ _gameLoader->loadScene(SC_9);
+ _gameLoader->gotoScene(SC_9, TrubaDown);
+ } else {
+ _gameLoader->loadScene(SC_1);
+ _gameLoader->gotoScene(SC_1, TrubaLeft);
+ }
}
}
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index bf769e2f61..bc66ebf40b 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -137,8 +137,8 @@ StaticANIObject::StaticANIObject() {
_movement = 0;
_statics = 0;
_flags = 0;
- _callback1 = 0;
- _callback2 = 0;
+ _callback1 = 0; // Really NULL
+ _callback2 = 0; // Really NULL
_sceneId = -1;
_someDynamicPhaseIndex = -1;
@@ -552,6 +552,8 @@ void Movement::draw(bool flipFlag, int angle) {
} else {
bmp->putDib(x, y, (int32 *)_currDynamicPhase->_paletteData, _currDynamicPhase->_alpha);
}
+ //Prevent memory leak after new was used to create bmp in reverseImage()
+ delete bmp;
if (_currDynamicPhase->_rect->top) {
if (!_currDynamicPhase->_convertedBitmap) {
diff --git a/engines/hugo/POTFILES b/engines/hugo/POTFILES
index ff61e12ca5..b7b99ca095 100644
--- a/engines/hugo/POTFILES
+++ b/engines/hugo/POTFILES
@@ -1 +1,2 @@
+engines/hugo/hugo.cpp
engines/hugo/file.cpp
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 267eb08436..6881278cee 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -27,6 +27,7 @@
#include "common/debug-channels.h"
#include "common/config-manager.h"
#include "common/textconsole.h"
+#include "common/translation.h"
#include "hugo/hugo.h"
#include "hugo/console.h"
@@ -429,10 +430,11 @@ void HugoEngine::runMachine() {
*/
bool HugoEngine::loadHugoDat() {
Common::File in;
- in.open("hugo.dat");
+ Common::String filename = "hugo.dat";
+ in.open(filename.c_str());
if (!in.isOpen()) {
- Common::String errorMessage = "You're missing the 'hugo.dat' file. Get it from the ScummVM website";
+ Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
GUIErrorMessage(errorMessage);
warning("%s", errorMessage.c_str());
return false;
@@ -443,7 +445,7 @@ bool HugoEngine::loadHugoDat() {
in.read(buf, 4);
if (memcmp(buf, "HUGO", 4)) {
- Common::String errorMessage = "File 'hugo.dat' is corrupt. Get it from the ScummVM website";
+ Common::String errorMessage = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
GUIErrorMessage(errorMessage);
return false;
}
@@ -452,7 +454,9 @@ bool HugoEngine::loadHugoDat() {
int minVer = in.readByte();
if ((majVer != HUGO_DAT_VER_MAJ) || (minVer != HUGO_DAT_VER_MIN)) {
- Common::String errorMessage = Common::String::format("File 'hugo.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from the ScummVM website", HUGO_DAT_VER_MAJ, HUGO_DAT_VER_MIN, majVer, minVer);
+ Common::String errorMessage = Common::String::format(
+ _("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+ filename.c_str(),HUGO_DAT_VER_MAJ, HUGO_DAT_VER_MIN, majVer, minVer);
GUIErrorMessage(errorMessage);
return false;
}
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index 65f31985d6..5a45566c9a 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -161,7 +161,7 @@ bool StaticResource::loadStaticResourceFile() {
}
if (!foundWorkingKyraDat) {
- Common::String errorMessage = "You're missing the '" + StaticResource::staticDataFilename() + "' file or it got corrupted, (re)get it from the ScummVM website";
+ Common::String errorMessage = "You're missing the '" + StaticResource::staticDataFilename() + "' engine data file or it got corrupted.";
GUIErrorMessage(errorMessage);
error("%s", errorMessage.c_str());
}
diff --git a/engines/lure/POTFILES b/engines/lure/POTFILES
new file mode 100644
index 0000000000..d4fde2ab7b
--- /dev/null
+++ b/engines/lure/POTFILES
@@ -0,0 +1 @@
+engines/lure/lure.cpp
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index 45fe0af025..8eac519d8c 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -24,6 +24,7 @@
#include "common/debug-channels.h"
#include "common/system.h"
#include "common/savefile.h"
+#include "common/translation.h"
#include "engines/util.h"
@@ -60,7 +61,7 @@ Common::Error LureEngine::init() {
Common::File f;
VersionStructure version;
if (!f.open(SUPPORT_FILENAME)) {
- GUIError("Could not locate Lure support file");
+ GUIError(_("Unable to locate the '%s' engine data file."), SUPPORT_FILENAME);
return Common::kUnknownError;
}
@@ -69,10 +70,10 @@ Common::Error LureEngine::init() {
f.close();
if (READ_LE_UINT16(&version.id) != 0xffff) {
- GUIError("Error validating %s - file is invalid or out of date", SUPPORT_FILENAME);
+ GUIError(_("The '%s' engine data file is corrupt."), SUPPORT_FILENAME);
return Common::kUnknownError;
} else if ((version.vMajor != LURE_DAT_MAJOR) || (version.vMinor != LURE_DAT_MINOR)) {
- GUIError("Incorrect version of %s file - expected %d.%d but got %d.%d",
+ GUIError(_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
SUPPORT_FILENAME, LURE_DAT_MAJOR, LURE_DAT_MINOR,
version.vMajor, version.vMinor);
return Common::kUnknownError;
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp
index 3b7c3a244b..87d51619d8 100644
--- a/engines/macventure/gui.cpp
+++ b/engines/macventure/gui.cpp
@@ -335,7 +335,7 @@ WindowReference Gui::createInventoryWindow(ObjID objRef) {
Graphics::MacWindow *newWindow = _wm.addWindow(true, true, true);
WindowData newData;
GlobalSettings settings = _engine->getGlobalSettings();
- newData.refcon = (WindowReference)ABS(_inventoryWindows.size() + kInventoryStart); // This is a HACK
+ newData.refcon = (WindowReference)(_inventoryWindows.size() + kInventoryStart); // This is a HACK
if (_windowData->back().refcon < 0x80) { // There is already another inventory window
newData.bounds = _windowData->back().bounds; // Inventory windows are always last
diff --git a/engines/mads/screen.cpp b/engines/mads/screen.cpp
index 79d5256c1c..f5748116ad 100644
--- a/engines/mads/screen.cpp
+++ b/engines/mads/screen.cpp
@@ -155,7 +155,7 @@ void DirtyArea::setUISlot(const UISlot *slot) {
/*------------------------------------------------------------------------*/
-DirtyAreas::DirtyAreas(MADSEngine *vm) : _vm(vm) {
+DirtyAreas::DirtyAreas(MADSEngine *vm) /* : _vm(vm) */ {
DirtyArea::_vm = vm;
for (int i = 0; i < DIRTY_AREAS_SIZE; ++i) {
diff --git a/engines/mads/screen.h b/engines/mads/screen.h
index 15436942fe..92cd5bc0a2 100644
--- a/engines/mads/screen.h
+++ b/engines/mads/screen.h
@@ -96,8 +96,8 @@ public:
};
class DirtyAreas : public Common::Array<DirtyArea> {
-private:
- MADSEngine *_vm;
+//private:
+// MADSEngine *_vm;
public:
DirtyAreas(MADSEngine *vm);
diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp
index abc1322340..b78f71a71d 100644
--- a/engines/mohawk/cursors.cpp
+++ b/engines/mohawk/cursors.cpp
@@ -122,8 +122,13 @@ void MystCursorManager::setCursor(uint16 id) {
if (surface->format.bytesPerPixel == 1) {
// The transparent color is almost always 255, except for the main cursor (100)
// in the D'ni archive, where it is 0.
- // Using the color of the first pixel as the transparent color seems to always work.
- byte transparentColor = ((byte *)surface->getPixels())[0];
+ // Using the color of the first pixel as the transparent color for the main cursor always works.
+ byte transparentColor;
+ if (id == kDefaultMystCursor) {
+ transparentColor = ((byte *)surface->getPixels())[0];
+ } else {
+ transparentColor = 255;
+ }
CursorMan.replaceCursor(surface->getPixels(), surface->w, surface->h, hotspotX, hotspotY, transparentColor);
// We're using the screen palette for the original game, but we need
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 6b91e74bb2..e887436e98 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -401,6 +401,25 @@ bool MohawkEngine_Myst::skippableWait(uint32 duration) {
return skipped;
}
+void MohawkEngine_Myst::pollAndDiscardEvents() {
+ // Poll the events to update the mouse cursor position
+ Common::Event event;
+ while (_system->getEventManager()->pollEvent(event)) {
+ switch (event.type) {
+ case Common::EVENT_KEYDOWN:
+ switch (event.kbd.keycode) {
+ case Common::KEYCODE_SPACE:
+ pauseGame();
+ break;
+ default:
+ break;
+ }
+ default:
+ break;
+ }
+ }
+}
+
void MohawkEngine_Myst::changeToStack(uint16 stack, uint16 card, uint16 linkSrcSound, uint16 linkDstSound) {
debug(2, "changeToStack(%d)", stack);
diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h
index 0491e853b6..2414b71cb1 100644
--- a/engines/mohawk/myst.h
+++ b/engines/mohawk/myst.h
@@ -187,6 +187,7 @@ public:
uint16 getMainCursor() { return _mainCursor; }
void checkCursorHints();
MystArea *updateCurrentResource();
+ void pollAndDiscardEvents();
bool skippableWait(uint32 duration);
MystSoundBlock readSoundBlock(Common::ReadStream *stream) const;
diff --git a/engines/mohawk/myst_graphics.cpp b/engines/mohawk/myst_graphics.cpp
index 427fba4d22..333da402fa 100644
--- a/engines/mohawk/myst_graphics.cpp
+++ b/engines/mohawk/myst_graphics.cpp
@@ -243,6 +243,7 @@ void MystGraphics::runTransition(TransitionType type, Common::Rect rect, uint16
area.right = area.left + step;
_vm->_system->delayMillis(delay);
+ _vm->pollAndDiscardEvents();
copyBackBufferToScreen(area);
_vm->_system->updateScreen();
@@ -266,6 +267,7 @@ void MystGraphics::runTransition(TransitionType type, Common::Rect rect, uint16
area.left = area.right - step;
_vm->_system->delayMillis(delay);
+ _vm->pollAndDiscardEvents();
copyBackBufferToScreen(area);
_vm->_system->updateScreen();
@@ -309,6 +311,7 @@ void MystGraphics::runTransition(TransitionType type, Common::Rect rect, uint16
area.bottom = area.top + step;
_vm->_system->delayMillis(delay);
+ _vm->pollAndDiscardEvents();
copyBackBufferToScreen(area);
_vm->_system->updateScreen();
@@ -332,6 +335,7 @@ void MystGraphics::runTransition(TransitionType type, Common::Rect rect, uint16
area.top = area.bottom - step;
_vm->_system->delayMillis(delay);
+ _vm->pollAndDiscardEvents();
copyBackBufferToScreen(area);
_vm->_system->updateScreen();
@@ -456,6 +460,7 @@ void MystGraphics::transitionDissolve(Common::Rect rect, uint step) {
}
_vm->_system->unlockScreen();
+ _vm->pollAndDiscardEvents();
_vm->_system->updateScreen();
}
@@ -475,6 +480,7 @@ void MystGraphics::transitionSlideToLeft(Common::Rect rect, uint16 steps, uint16
simulatePreviousDrawDelay(dstRect);
_vm->_system->copyRectToScreen(_backBuffer->getBasePtr(dstRect.left, dstRect.top),
_backBuffer->pitch, srcRect.left, srcRect.top, srcRect.width(), srcRect.height());
+ _vm->pollAndDiscardEvents();
_vm->_system->updateScreen();
}
@@ -500,6 +506,7 @@ void MystGraphics::transitionSlideToRight(Common::Rect rect, uint16 steps, uint1
simulatePreviousDrawDelay(dstRect);
_vm->_system->copyRectToScreen(_backBuffer->getBasePtr(dstRect.left, dstRect.top),
_backBuffer->pitch, srcRect.left, srcRect.top, srcRect.width(), srcRect.height());
+ _vm->pollAndDiscardEvents();
_vm->_system->updateScreen();
}
@@ -525,6 +532,7 @@ void MystGraphics::transitionSlideToTop(Common::Rect rect, uint16 steps, uint16
simulatePreviousDrawDelay(dstRect);
_vm->_system->copyRectToScreen(_backBuffer->getBasePtr(dstRect.left, dstRect.top),
_backBuffer->pitch, srcRect.left, srcRect.top, srcRect.width(), srcRect.height());
+ _vm->pollAndDiscardEvents();
_vm->_system->updateScreen();
}
@@ -551,6 +559,7 @@ void MystGraphics::transitionSlideToBottom(Common::Rect rect, uint16 steps, uint
simulatePreviousDrawDelay(dstRect);
_vm->_system->copyRectToScreen(_backBuffer->getBasePtr(dstRect.left, dstRect.top),
_backBuffer->pitch, srcRect.left, srcRect.top, srcRect.width(), srcRect.height());
+ _vm->pollAndDiscardEvents();
_vm->_system->updateScreen();
}
@@ -575,6 +584,7 @@ void MystGraphics::transitionPartialToRight(Common::Rect rect, uint32 width, uin
simulatePreviousDrawDelay(dstRect);
_vm->_system->copyRectToScreen(_backBuffer->getBasePtr(dstRect.left, dstRect.top),
_backBuffer->pitch, srcRect.left, srcRect.top, srcRect.width(), srcRect.height());
+ _vm->pollAndDiscardEvents();
_vm->_system->updateScreen();
}
@@ -596,6 +606,7 @@ void MystGraphics::transitionPartialToLeft(Common::Rect rect, uint32 width, uint
simulatePreviousDrawDelay(dstRect);
_vm->_system->copyRectToScreen(_backBuffer->getBasePtr(dstRect.left, dstRect.top),
_backBuffer->pitch, srcRect.left, srcRect.top, srcRect.width(), srcRect.height());
+ _vm->pollAndDiscardEvents();
_vm->_system->updateScreen();
}
diff --git a/engines/mortevielle/POTFILES b/engines/mortevielle/POTFILES
new file mode 100644
index 0000000000..ee7ef3ed69
--- /dev/null
+++ b/engines/mortevielle/POTFILES
@@ -0,0 +1 @@
+engines/mortevielle/mortevielle.cpp
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp
index 4f0899deb4..59004cba7f 100644
--- a/engines/mortevielle/mortevielle.cpp
+++ b/engines/mortevielle/mortevielle.cpp
@@ -37,6 +37,7 @@
#include "common/system.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
+#include "common/translation.h"
#include "engines/util.h"
#include "engines/engine.h"
#include "graphics/palette.h"
@@ -302,7 +303,8 @@ Common::ErrorCode MortevielleEngine::loadMortDat() {
// Open the mort.dat file
if (!f.open(MORT_DAT)) {
- GUIErrorMessage("Could not locate 'mort.dat'.");
+ Common::String msg = Common::String::format(_("Unable to locate the '%s' engine data file."), MORT_DAT);
+ GUIErrorMessage(msg);
return Common::kReadingFailed;
}
@@ -310,16 +312,22 @@ Common::ErrorCode MortevielleEngine::loadMortDat() {
char fileId[4];
f.read(fileId, 4);
if (strncmp(fileId, "MORT", 4) != 0) {
- GUIErrorMessage("The located mort.dat data file is invalid");
+ Common::String msg = Common::String::format(_("The '%s' engine data file is corrupt."), MORT_DAT);
+ GUIErrorMessage(msg);
return Common::kReadingFailed;
}
// Check the version
- if (f.readByte() < MORT_DAT_REQUIRED_VERSION) {
- GUIErrorMessage("The located mort.dat data file is too old, please download an updated version on scummvm.org");
+ int majVer = f.readByte();
+ int minVer = f.readByte();
+
+ if (majVer < MORT_DAT_REQUIRED_VERSION) {
+ Common::String msg = Common::String::format(
+ _("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+ MORT_DAT, MORT_DAT_REQUIRED_VERSION, 0, majVer, minVer);
+ GUIErrorMessage(msg);
return Common::kReadingFailed;
}
- f.readByte(); // Minor version
// Loop to load resources from the data file
while (f.pos() < f.size()) {
diff --git a/engines/queen/display.cpp b/engines/queen/display.cpp
index b2213f7fee..0611381547 100644
--- a/engines/queen/display.cpp
+++ b/engines/queen/display.cpp
@@ -1625,7 +1625,7 @@ const uint8 Display::_fontRussian[] = {
0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xee, 0xc6, 0xfe, 0xfe, 0x00,
0x38, 0x6c, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0xfc, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xfc, 0x00,
0xfc, 0xc6, 0xc6, 0xfc, 0xc6, 0xc6, 0xfc, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00,
- 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfc, 0x00, 0xfe, 0xc0, 0xc0, 0xf8, 0xc0, 0xc0, 0xfe, 0x00,
+ 0x1e, 0x26, 0x66, 0x66, 0x66, 0x66, 0xff, 0x00, 0xfe, 0xc0, 0xc0, 0xf8, 0xc0, 0xc0, 0xfe, 0x00,
0xd6, 0xd6, 0xd6, 0x7c, 0xd6, 0xd6, 0xd6, 0x00, 0x7c, 0xc6, 0x06, 0x1c, 0x06, 0xc6, 0x7c, 0x00,
0xc6, 0xc6, 0xce, 0xde, 0xf6, 0xe6, 0xc6, 0x00, 0xd6, 0xd6, 0xc6, 0xce, 0xde, 0xf6, 0xe6, 0x00,
0xc6, 0xcc, 0xd8, 0xf0, 0xd8, 0xcc, 0xc6, 0x00, 0x3c, 0x66, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00,
@@ -1633,7 +1633,7 @@ const uint8 Display::_fontRussian[] = {
0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00,
0xfc, 0xc6, 0xc6, 0xc6, 0xfc, 0xc0, 0xc0, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00,
0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x7c, 0x00,
- 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x00, 0xc6, 0xc6, 0x6c, 0x38, 0x6c, 0xc6, 0xc6, 0x00,
+ 0x7c, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x00, 0xc6, 0xc6, 0x6c, 0x38, 0x6c, 0xc6, 0xc6, 0x00,
0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xff, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x00,
0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x00, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xff, 0x01,
0xe0, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x7c, 0x00, 0xc6, 0xc6, 0xc6, 0xf6, 0xde, 0xde, 0xf6, 0x00,
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index cfbc2f3a34..f1bb8d3e7f 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -2213,12 +2213,27 @@ bool Console::segmentInfo(int nr) {
break;
#ifdef ENABLE_SCI32
- case SEG_TYPE_ARRAY:
+ case SEG_TYPE_ARRAY: {
+ ArrayTable &table = *(ArrayTable *)mobj;
debugPrintf("SCI32 arrays\n");
+ for (uint i = 0; i < table.size(); ++i) {
+ if (table.isValidEntry(i)) {
+ debugPrintf(" [%04x] %s\n", i, table[i].toDebugString().c_str());
+ }
+ }
break;
- case SEG_TYPE_BITMAP:
- debugPrintf("SCI32 bitmaps\n");
+ }
+
+ case SEG_TYPE_BITMAP: {
+ BitmapTable &table = *(BitmapTable *)mobj;
+ debugPrintf("SCI32 bitmaps (total %d)\n", table.entries_used);
+ for (uint i = 0; i < table.size(); ++i) {
+ if (table.isValidEntry(i)) {
+ debugPrintf(" [%04x] %s\n", i, table[i].toString().c_str());
+ }
+ }
break;
+ }
#endif
default :
@@ -4663,13 +4678,7 @@ void Console::printBitmap(reg_t reg) {
const SciBitmap &bitmap = table->at(reg.getOffset());
- debugPrintf("SCI32 bitmap (%dx%d; res %dx%d; origin %dx%d; skip color %u; %s; %s):\n",
- bitmap.getWidth(), bitmap.getHeight(),
- bitmap.getXResolution(), bitmap.getYResolution(),
- bitmap.getOrigin().x, bitmap.getOrigin().y,
- bitmap.getSkipColor(),
- bitmap.getRemap() ? "remap" : "no remap",
- bitmap.getShouldGC() ? "GC" : "no GC");
+ debugPrintf("SCI32 bitmap (%s):\n", bitmap.toString().c_str());
Common::hexdump((const byte *) bitmap.getRawData(), bitmap.getRawSize(), 16, 0);
}
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index e3167503ee..5270398899 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -883,11 +883,24 @@ Common::Error SciEngine::saveGameState(int slot, const Common::String &desc) {
}
bool SciEngine::canLoadGameStateCurrently() {
+#ifdef ENABLE_SCI32
+ if (getSciVersion() >= SCI_VERSION_2) {
+ switch (getGameId()) {
+ case GID_PHANTASMAGORIA:
+ case GID_HOYLE5:
+ return false;
+ default:
+ break;
+ }
+ }
+#endif
+
return !_gamestate->executionStackBase;
}
bool SciEngine::canSaveGameStateCurrently() {
- return !_gamestate->executionStackBase;
+ // see comment about kSupportsSavingDuringRuntime in SciEngine::hasFeature
+ return false;
}
} // End of namespace Sci
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 4a3d13cbed..90b9412b9a 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -183,7 +183,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "9dd015e79cac4f91e7de805448f39775", 1912},
{"resource.000", 0, "e4efcd042f86679dd4e1834bb3a38edb", 3770943},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO3(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO7(GUIO_NOSUBTITLES, GUIO_NOMUSIC, GUIO_NOSPEECH, GUIO_NOSFX, GUIO_NOMIDI, GUIO_NOLAUNCHLOAD, GUIO_NOASPECT) },
#endif
// Christmas Card 1988 - English DOS
@@ -722,14 +722,10 @@ static const struct ADGameDescription SciGameDescriptions[] = {
Common::EN_ANY, Common::kPlatformDOS, 0, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#ifdef ENABLE_SCI32
-#define GUIO_GK1_FLOPPY GUIO4(GUIO_NOSPEECH, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
-#define GUIO_GK1_CD GUIO4(GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_HIGH_RESOLUTION_GRAPHICS, \
- GAMEOPTION_FB01_MIDI)
+#define GUIO_GK1_FLOPPY GUIO2(GUIO_NOSPEECH, \
+ GAMEOPTION_ORIGINAL_SAVELOAD)
+#define GUIO_GK1_CD GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, \
+ GAMEOPTION_HIGH_RESOLUTION_GRAPHICS)
#define GUIO_GK1_MAC GUIO_GK1_FLOPPY
// Gabriel Knight - English DOS Floppy
@@ -840,16 +836,21 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK | ADGF_UNSTABLE, GUIO_GK1_MAC },
-#define GUIO_GK2_DEMO GUIO5(GUIO_NOSPEECH, \
- GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
-#define GUIO_GK2 GUIO5(GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
+#undef GUIO_GK1_FLOPPY
+#undef GUIO_GK1_CD
+#undef GUIO_GK1_MAC
+
+#define GUIO_GK2_DEMO GUIO6(GUIO_NOSUBTITLES, \
+ GUIO_NOMUSIC, \
+ GUIO_NOSPEECH, \
+ GUIO_NOMIDI, \
+ GUIO_NOLAUNCHLOAD, \
+ GUIO_NOASPECT)
+#define GUIO_GK2 GUIO5(GUIO_NOSUBTITLES, \
+ GUIO_NOMIDI, \
GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
+ GAMEOPTION_ENABLE_BLACK_LINED_VIDEO)
#define GUIO_GK2_MAC GUIO_GK2
// Gabriel Knight 2 - English Windows Non-Interactive Demo
@@ -916,6 +917,10 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK | ADGF_CD | ADGF_UNSTABLE, GUIO_GK2_MAC },
+#undef GUIO_GK2_DEMO
+#undef GUIO_GK2
+#undef GUIO_GK2_MAC
+
#endif // ENABLE_SCI32
// Hoyle 1 - English DOS (supplied by ssburnout in bug report #3049193)
@@ -1129,9 +1134,9 @@ static const struct ADGameDescription SciGameDescriptions[] = {
Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#ifdef ENABLE_SCI32
-#define GUIO_HOYLE5 GUIO3(GUIO_NOSPEECH, \
- GUIO_NOASPECT, \
- GUIO_NOLAUNCHLOAD)
+#define GUIO_HOYLE5 GUIO3(GUIO_NOMIDI, \
+ GUIO_NOLAUNCHLOAD, \
+ GUIO_NOASPECT)
// Hoyle 5 (Hoyle Classic Games) - Windows demo
{"hoyle5", "Demo", {
@@ -1180,6 +1185,8 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_HOYLE5 },
+#undef GUIO_HOYLE5
+
#endif // ENABLE_SCI32
// ImagiNation Network (INN) Demo
@@ -1561,6 +1568,21 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ // King's Quest 5 - English DOS Floppy (from telanus, bug report Trac#9624)
+ // Game version 0.000.062
+ {"kq5", "", {
+ {"resource.map", 0, "86a4ae3fafb1bbcc81b78cf427e45ba0", 8184},
+ {"resource.001", 0, "51797b784eccab97d1d4b1f8dc3ef671", 1099768},
+ {"resource.002", 0, "93c6f0fc7682fda52a632f34bcc1c975", 1060941},
+ {"resource.003", 0, "44388574401a25938f660dca90bdd040", 1109594},
+ {"resource.000", 0, "a591bd4b879fc832b8095c0b3befe9e2", 276351},
+ {"resource.007", 0, "a4cb2eba783a7b05f5b005d47bd94936", 1133814},
+ {"resource.004", 0, "464109fa0fd76f722fff73fd26e98271", 1153791},
+ {"resource.005", 0, "3c292d392c3cc3b532e9063d0d1fb7aa", 1032802},
+ {"resource.006", 0, "0380ee8181b39a8d7b66daf61a5b7d51", 921308},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
// King's Quest V DOS 0.000.062 EGA (5 x 5.25" disks)
// Supplied by ssburnout in bug report #3046780
{"kq5", "EGA", {
@@ -1781,15 +1803,12 @@ static const struct ADGameDescription SciGameDescriptions[] = {
#ifdef ENABLE_SCI32
-#define GUIO_KQ7_DEMO GUIO5(GUIO_NOSPEECH, \
- GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
-#define GUIO_KQ7 GUIO4(GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
+#define GUIO_KQ7_DEMO GUIO4(GUIO_NOSUBTITLES, \
+ GUIO_NOSPEECH, \
+ GUIO_NOLAUNCHLOAD, \
+ GUIO_NOASPECT)
+#define GUIO_KQ7 GUIO2(GUIO_NOASPECT, \
+ GAMEOPTION_ORIGINAL_SAVELOAD)
// King's Quest 7 - English Windows (from the King's Quest Collection)
// Executable scanning reports "2.100.002", VERSION file reports "1.4"
@@ -1866,13 +1885,16 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_UNSTABLE | ADGF_CD, GUIO_KQ7_DEMO },
+#undef GUIO_KQ7_DEMO
+#undef GUIO_KQ7
+
// King's Questions mini-game from the King's Quest Collection
// SCI interpreter version 2.000.000
{"kquestions", "", {
{"resource.000", 0, "9b1cddecd4f0720d83661ba7aed28891", 162697},
{"resource.map", 0, "93a2251fa64e729d7a7d2fe56b217c8e", 502},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO3(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO6(GUIO_NOSUBTITLES, GUIO_NOMUSIC, GUIO_NOSPEECH, GUIO_NOSFX, GUIO_NOMIDI, GUIO_NOLAUNCHLOAD) },
#endif // ENABLE_SCI32
@@ -2569,10 +2591,8 @@ static const struct ADGameDescription SciGameDescriptions[] = {
#ifdef ENABLE_SCI32
-#define GUIO_LSL6HIRES GUIO4(GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
+#define GUIO_LSL6HIRES GUIO2(GUIO_NOASPECT, \
+ GAMEOPTION_ORIGINAL_SAVELOAD)
// Larry 6 - English/German DOS CD - HIRES
// SCI interpreter version 2.100.002
@@ -2598,16 +2618,17 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::FR_FRA, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LSL6HIRES },
-#define GUIO_LSL7_DEMO GUIO5(GUIO_NOSPEECH, \
- GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
-#define GUIO_LSL7 GUIO5(GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
+#undef GUIO_LSL6HIRES
+
+// TODO: Correct GUIOs
+#define GUIO_LSL7_DEMO GUIO4(GUIO_NOASPECT, \
+ GUIO_NOMIDI, \
+ GUIO_NOLAUNCHLOAD, \
+ GAMEOPTION_ORIGINAL_SAVELOAD)
+#define GUIO_LSL7 GUIO4(GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
+ GUIO_NOMIDI, \
+ GAMEOPTION_ORIGINAL_SAVELOAD)
// Larry 7 - English DOS Demo (provided by richiefs in bug report #2670691)
// SCI interpreter version 2.100.002
@@ -2657,23 +2678,23 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"ressci.000", 0, "32792f9bc1bf3633a88b382bb3f6e40d", 67071418},
AD_LISTEND},
Common::ES_ESP, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LSL7 },
+
+#undef GUIO_LSL7_DEMO
+#undef GUIO_LSL7
+
#endif
-#define GUIO_LIGHTHOUSE_DEMO GUIO5(GUIO_NOSPEECH, \
+// TODO: Correct GUIOs
+#define GUIO_LIGHTHOUSE_DEMO GUIO3(GUIO_NOSPEECH, \
GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
-#define GUIO_LIGHTHOUSE GUIO6(GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
- GUIO_NOSPEECH, \
+ GAMEOPTION_ORIGINAL_SAVELOAD)
+#define GUIO_LIGHTHOUSE GUIO3(GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
+ GAMEOPTION_ORIGINAL_SAVELOAD)
// Lighthouse - English Windows Demo (from jvprat)
// Executable scanning reports "2.100.002", VERSION file reports "1.00"
- {"lighthouse", "Demo", {
+ {"lighthouse", "Non-interactive Demo", {
{"resource.map", 0, "543124606352bfa5e07696ddf2a669be", 64},
{"resource.000", 0, "5d7714416b612463d750fb9c5690c859", 28952},
AD_LISTEND},
@@ -2717,6 +2738,10 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"ressci.002", 0, "3c8d627c555b0e3e4f1d9955bc0f0df4", 94631127},
AD_LISTEND},
Common::ES_ESP, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LIGHTHOUSE },
+
+#undef GUIO_LIGHTHOUSE_DEMO
+#undef GUIO_LIGHTHOUSE
+
#endif // ENABLE_SCI3_GAMES
#endif // ENABLE_SCI32
@@ -2839,10 +2864,8 @@ static const struct ADGameDescription SciGameDescriptions[] = {
#ifdef ENABLE_SCI32
-#define GUIO_MOTHERGOOSEHIRES GUIO4(GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
+#define GUIO_MOTHERGOOSEHIRES GUIO2(GUIO_NOASPECT, \
+ GAMEOPTION_ORIGINAL_SAVELOAD)
// Mixed-Up Mother Goose Deluxe - English Windows/DOS CD (supplied by markcoolio in bug report #2723810)
// Executable scanning reports "2.100.002"
@@ -2859,6 +2882,9 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"ressci.000", 0, "227685bc59d90821978d330713e44a7a", 17205800},
AD_LISTEND},
Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_MOTHERGOOSEHIRES },
+
+#undef GUIO_MOTHERGOOSEHIRES
+
#endif // ENABLE_SCI32
// Ms. Astro Chicken - English DOS
@@ -2871,18 +2897,12 @@ static const struct ADGameDescription SciGameDescriptions[] = {
#ifdef ENABLE_SCI32
-#define GUIO_PHANTASMAGORIA_DEMO GUIO6(GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
- GUIO_NOSPEECH, \
+#define GUIO_PHANTASMAGORIA_DEMO GUIO4(GUIO_NOSUBTITLES, \
GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
+ GUIO_NOLAUNCHLOAD, \
+ GAMEOPTION_ENABLE_BLACK_LINED_VIDEO)
#define GUIO_PHANTASMAGORIA GUIO_PHANTASMAGORIA_DEMO
-#define GUIO_PHANTASMAGORIA_MAC GUIO5(GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
- GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
+#define GUIO_PHANTASMAGORIA_MAC GUIO_PHANTASMAGORIA_DEMO
// Phantasmagoria - English DOS/Windows (from csnover)
// Windows executable scanning reports "2.100.002" - "Aug 06 1995"
@@ -3003,10 +3023,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformMacintosh, ADGF_CD | ADGF_MACRESFORK | ADGF_UNSTABLE, GUIO_PHANTASMAGORIA_MAC },
+#undef GUIO_PHANTASMAGORIA_DEMO
+#undef GUIO_PHANTASMAGORIA
+#undef GUIO_PHANTASMAGORIA_MAC
+
#ifdef ENABLE_SCI3_GAMES
-#define GUIO_PHANTASMAGORIA2 GUIO5(GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
- GUIO_NOSPEECH, \
+// TODO: Correct GUIOs
+#define GUIO_PHANTASMAGORIA2 GUIO4(GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
GUIO_NOASPECT, \
GUIO_NOMIDI, \
GAMEOPTION_ORIGINAL_SAVELOAD)
@@ -3294,14 +3318,10 @@ static const struct ADGameDescription SciGameDescriptions[] = {
#ifdef ENABLE_SCI32
-#define GUIO_PQ4_FLOPPY GUIO4(GUIO_NOSPEECH, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
-#define GUIO_PQ4_CD GUIO4(GAMEOPTION_HIGH_RESOLUTION_GRAPHICS, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
+#define GUIO_PQ4_FLOPPY GUIO2(GUIO_NOSPEECH, \
+ GAMEOPTION_ORIGINAL_SAVELOAD)
+#define GUIO_PQ4_CD GUIO2(GAMEOPTION_HIGH_RESOLUTION_GRAPHICS, \
+ GAMEOPTION_ORIGINAL_SAVELOAD)
// Police Quest 4 - English DOS CD (from the Police Quest Collection)
// Executable scanning reports "2.100.002", VERSION file reports "1.100.000"
@@ -3343,16 +3363,17 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::DE_DEU, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_PQ4_FLOPPY },
-#define GUIO_PQSWAT_DEMO GUIO5(GUIO_NOSPEECH, \
+#undef GUIO_PQ4_FLOPPY
+#undef GUIO_PQ4_CD
+
+#define GUIO_PQSWAT_DEMO GUIO4(GUIO_NOSUBTITLES, \
+ GUIO_NOSPEECH, \
GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
-#define GUIO_PQSWAT GUIO5(GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
+ GUIO_NOLAUNCHLOAD)
+#define GUIO_PQSWAT GUIO4(GUIO_NOMIDI, \
GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
+ GAMEOPTION_ENABLE_BLACK_LINED_VIDEO)
// Police Quest: SWAT - English DOS/Windows Demo (from jvprat)
// Executable scanning reports "2.100.002", VERSION file reports "0.001.200"
@@ -3384,6 +3405,10 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"ressci.004", 0, "b7e619e6ecf62fe65d5116a3a422e5f0", 46223872},
AD_LISTEND},
Common::EN_ANY, Common::kPlatformWindows, ADGF_CD | ADGF_UNSTABLE, GUIO_PQSWAT },
+
+#undef GUIO_PQSWAT_DEMO
+#undef GUIO_PQSWAT
+
#endif // ENABLE_SCI32
// Quest for Glory 1 / Hero's Quest - English DOS 3.5" Floppy (supplied by merkur in bug report #2718784)
@@ -3742,13 +3767,9 @@ static const struct ADGameDescription SciGameDescriptions[] = {
#ifdef ENABLE_SCI32
-#define GUIO_QFG4_FLOPPY GUIO4(GUIO_NOSPEECH, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
-#define GUIO_QFG4_CD GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
+#define GUIO_QFG4_FLOPPY GUIO2(GUIO_NOSPEECH, \
+ GAMEOPTION_ORIGINAL_SAVELOAD)
+#define GUIO_QFG4_CD GUIO1(GAMEOPTION_ORIGINAL_SAVELOAD)
// Quest for Glory 4 1.1 Floppy - English DOS (supplied by markcool in bug report #2723852)
// SCI interpreter version 2.000.000 (a guess?)
@@ -3790,12 +3811,18 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformWindows, ADGF_CD | ADGF_UNSTABLE, GUIO_QFG4_CD },
-#define GUIO_RAMA_DEMO GUIO5(GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
+#undef GUIO_QFG4_FLOPPY
+#undef GUIO_QFG4_CD
+
+// TODO: Correct GUIOs
+#define GUIO_RAMA_DEMO GUIO4(GUIO_NOMIDI, \
+ GUIO_NOLAUNCHLOAD, \
+ GUIO_NOASPECT, \
+ GAMEOPTION_ENABLE_BLACK_LINED_VIDEO)
+#define GUIO_RAMA GUIO4(GUIO_NOMIDI, \
GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
-#define GUIO_RAMA GUIO_RAMA_DEMO
+ GAMEOPTION_ENABLE_BLACK_LINED_VIDEO)
// RAMA - English DOS/Windows Demo
// Executable scanning reports "2.100.002", VERSION file reports "000.000.008"
@@ -3847,13 +3874,21 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.001", 0, "70ba2ff04a2b7fb2c52420ba7fbd47c2", 8338},
AD_LISTEND},
Common::IT_ITA, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_RAMA },
+
+#undef GUIO_RAMA_DEMO
+#undef GUIO_RAMA
+
#endif // ENABLE_SCI3_GAMES
-#define GUIO_SHIVERS_DEMO GUIO4(GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
+#define GUIO_SHIVERS_DEMO GUIO5(GUIO_NOSUBTITLES, \
+ GUIO_NOSPEECH, \
+ GUIO_NOMIDI, \
+ GUIO_NOLAUNCHLOAD, \
+ GUIO_NOASPECT)
+#define GUIO_SHIVERS GUIO4(GUIO_NOMIDI, \
+ GUIO_NOASPECT, \
GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
-#define GUIO_SHIVERS GUIO_SHIVERS_DEMO
+ GAMEOPTION_ENABLE_BLACK_LINED_VIDEO)
// Shivers - English Windows (from jvprat)
// Executable scanning reports "2.100.002", VERSION file reports "1.02"
@@ -3878,6 +3913,9 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_UNSTABLE, GUIO_SHIVERS },
+#undef GUIO_SHIVERS_DEMO
+#undef GUIO_SHIVERS
+
// Shivers 2 doesn't contain SCI scripts. The whole game logic has
// been reimplemented from SCI in native code placed in DLL files.
// Each room has its own DLL file, and some SCI functions have been
@@ -4077,6 +4115,20 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ // Space Quest 3 - English DOS (from telanus, bug report Trac#9626)
+ // Game version 1.0P 1989-03-22
+ // SCI interpreter version 0.000.453
+ {"sq3", "", {
+ {"resource.map", 0, "6dd8f59dd8a0c8131f34b159044e645e", 5598},
+ {"resource.001", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 170496},
+ {"resource.002", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 312537},
+ {"resource.003", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 325576},
+ {"resource.004", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 321377},
+ {"resource.005", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 328162},
+ {"resource.006", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 356560},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
// Space Quest 3 - English DOS (from abevi, bug report #2612718)
{"sq3", "", {
{"resource.map", 0, "eca165515c6b62b05fa86b7d8f727660", 5598},
@@ -4435,16 +4487,11 @@ static const struct ADGameDescription SciGameDescriptions[] = {
#ifdef ENABLE_SCI32
-#define GUIO_SQ6_DEMO GUIO5(GUIO_NOSPEECH, \
- GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
- GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
-#define GUIO_SQ6 GUIO5(GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
- GUIO_NOASPECT, \
- GAMEOPTION_PREFER_DIGITAL_SFX, \
+#define GUIO_SQ6_DEMO GUIO2(GUIO_NOLAUNCHLOAD, \
+ GUIO_NOASPECT)
+#define GUIO_SQ6 GUIO3(GUIO_NOASPECT, \
GAMEOPTION_ORIGINAL_SAVELOAD, \
- GAMEOPTION_FB01_MIDI)
+ GAMEOPTION_ENABLE_BLACK_LINED_VIDEO)
// Space Quest 6 - English DOS/Win3.11 CD (from the Space Quest Collection)
// Executable scanning reports "2.100.002", VERSION file reports "1.0"
@@ -4485,6 +4532,10 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "ab12724e078dea34b624e0d2a38dcd7c", 2272050},
AD_LISTEND},
Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO | ADGF_UNSTABLE, GUIO_SQ6_DEMO },
+
+#undef GUIO_SQ6_DEMO
+#undef GUIO_SQ6
+
#endif // ENABLE_SCI32
// The Island of Dr. Brain - English DOS CD (from jvprat)
@@ -4513,13 +4564,13 @@ static const struct ADGameDescription SciGameDescriptions[] = {
#ifdef ENABLE_SCI32
-#define GUIO_TORIN_DEMO GUIO3(GUIO_NOASPECT, \
- GUIO_NOMIDI, \
- GAMEOPTION_ORIGINAL_SAVELOAD)
-#define GUIO_TORIN GUIO4(GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
+#define GUIO_TORIN_DEMO GUIO3(GUIO_NOMIDI, \
+ GUIO_NOLAUNCHLOAD, \
+ GUIO_NOASPECT)
+#define GUIO_TORIN GUIO4(GUIO_NOMIDI, \
GUIO_NOASPECT, \
- GUIO_NOMIDI, \
- GAMEOPTION_ORIGINAL_SAVELOAD)
+ GAMEOPTION_ORIGINAL_SAVELOAD, \
+ GAMEOPTION_ENABLE_BLACK_LINED_VIDEO)
#define GUIO_TORIN_MAC GUIO_TORIN
// Torin's Passage - English Windows Interactive Demo
@@ -4609,6 +4660,11 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"Data7", 0, "2afd9b5434102b89610916b904c3f73a", 7627374},
AD_LISTEND},
Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK | ADGF_UNSTABLE | ADGF_CD, GUIO_TORIN_MAC },
+
+#undef GUIO_TORIN_DEMO
+#undef GUIO_TORIN
+#undef GUIO_TORIN_MAC
+
#endif // ENABLE_SCI32
// SCI Fanmade Games
diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h
index 36b0d06360..8f84bbacad 100644
--- a/engines/sci/engine/features.h
+++ b/engines/sci/engine/features.h
@@ -128,6 +128,23 @@ public:
g_sci->getGameId() != GID_SQ6 &&
g_sci->getGameId() != GID_GK2;
}
+
+ inline bool usesAlternateSelectors() const {
+ return g_sci->getGameId() == GID_PHANTASMAGORIA2;
+ }
+
+ inline bool hasEmptyScaleDrawHack() const {
+ // Yes: KQ7 (all), PQ4CD, QFG4CD, SQ6, Phant1
+ // No: All SCI2, all SCI3, GK2, LSL6hires, PQ:SWAT, Torin
+ // Unknown: Hoyle5, MGDX, Shivers
+ const SciGameId &gid = g_sci->getGameId();
+ return getSciVersion() > SCI_VERSION_2 &&
+ getSciVersion() < SCI_VERSION_2_1_LATE &&
+ gid != GID_LSL6HIRES &&
+ gid != GID_GK2 &&
+ gid != GID_PQSWAT &&
+ gid != GID_TORIN;
+ }
#endif
/**
diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp
index d46d68d9df..75aa4fa2ca 100644
--- a/engines/sci/engine/file.cpp
+++ b/engines/sci/engine/file.cpp
@@ -78,7 +78,7 @@ class SaveFileRewriteStream : public MemoryDynamicRWStream {
public:
SaveFileRewriteStream(Common::String fileName,
Common::SeekableReadStream *inFile,
- bool truncate, bool compress);
+ kFileOpenMode mode, bool compress);
virtual ~SaveFileRewriteStream();
virtual uint32 write(const void *dataPtr, uint32 dataSize) { _changed = true; return MemoryDynamicRWStream::write(dataPtr, dataSize); }
@@ -93,15 +93,21 @@ protected:
SaveFileRewriteStream::SaveFileRewriteStream(Common::String fileName,
Common::SeekableReadStream *inFile,
- bool truncate,
+ kFileOpenMode mode,
bool compress)
: MemoryDynamicRWStream(DisposeAfterUse::YES),
_fileName(fileName), _compress(compress)
{
+ const bool truncate = mode == _K_FILE_MODE_CREATE;
+ const bool seekToEnd = mode == _K_FILE_MODE_OPEN_OR_CREATE;
+
if (!truncate && inFile) {
unsigned int s = inFile->size();
ensureCapacity(s);
inFile->read(_data, s);
+ if (seekToEnd) {
+ seek(0, SEEK_END);
+ }
_changed = false;
} else {
_changed = true;
@@ -162,7 +168,7 @@ uint findFreeFileHandle(EngineState *s) {
* for reading only.
*/
-reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool unwrapFilename) {
+reg_t file_open(EngineState *s, const Common::String &filename, kFileOpenMode mode, bool unwrapFilename) {
Common::String englishName = g_sci->getSciLanguageString(filename, K_LANG_ENGLISH);
englishName.toLowercase();
@@ -194,14 +200,22 @@ reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool u
if (s->currentRoomNumber() == 52)
isCompressed = false;
break;
+#ifdef ENABLE_SCI32
+ // Phantasmagoria game scripts create their own save files, so they are
+ // interoperable with the original interpreter just by renaming them as long
+ // as they are not compressed. They are also never larger than a couple
+ // hundred bytes, so compression does not do much here anyway
+ case GID_PHANTASMAGORIA:
+ isCompressed = false;
+ break;
+#endif
default:
break;
}
#ifdef ENABLE_SCI32
- if (mode != _K_FILE_MODE_OPEN_OR_FAIL && (
- (g_sci->getGameId() == GID_PHANTASMAGORIA && (filename == "phantsg.dir" || filename == "chase.dat")) ||
- (g_sci->getGameId() == GID_PQSWAT && filename == "swat.dat"))) {
+ if ((g_sci->getGameId() == GID_PHANTASMAGORIA && (filename == "phantsg.dir" || filename == "chase.dat" || filename == "tmp.dat")) ||
+ (g_sci->getGameId() == GID_PQSWAT && filename == "swat.dat")) {
debugC(kDebugLevelFile, " -> file_open opening %s for rewriting", wrappedName.c_str());
inFile = saveFileMan->openForLoading(wrappedName);
@@ -210,8 +224,13 @@ reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool u
if (!inFile)
inFile = SearchMan.createReadStreamForMember(englishName);
+ if (mode == _K_FILE_MODE_OPEN_OR_FAIL && !inFile) {
+ debugC(kDebugLevelFile, " -> file_open(_K_FILE_MODE_OPEN_OR_FAIL): failed to open file '%s'", englishName.c_str());
+ return SIGNAL_REG;
+ }
+
SaveFileRewriteStream *stream;
- stream = new SaveFileRewriteStream(wrappedName, inFile, mode == _K_FILE_MODE_CREATE, isCompressed);
+ stream = new SaveFileRewriteStream(wrappedName, inFile, mode, isCompressed);
delete inFile;
diff --git a/engines/sci/engine/file.h b/engines/sci/engine/file.h
index 0154338f6c..1c9a092063 100644
--- a/engines/sci/engine/file.h
+++ b/engines/sci/engine/file.h
@@ -28,7 +28,7 @@
namespace Sci {
-enum {
+enum kFileOpenMode {
_K_FILE_MODE_OPEN_OR_CREATE = 0,
_K_FILE_MODE_OPEN_OR_FAIL = 1,
_K_FILE_MODE_CREATE = 2
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 85cad99226..1845ecaac5 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -989,10 +989,8 @@ void script_adjust_opcode_formats() {
}
if (getSciVersion() >= SCI_VERSION_3) {
- // TODO: There are also opcodes in
- // here to get the superclass, and possibly the species too.
- g_sci->_opcode_formats[0x4d/2][0] = Script_None;
- g_sci->_opcode_formats[0x4e/2][0] = Script_None;
+ g_sci->_opcode_formats[op_info][0] = Script_None;
+ g_sci->_opcode_formats[op_superP][0] = Script_None;
}
#endif
}
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 03c8a673a8..335fec06ad 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -591,6 +591,7 @@ reg_t kListIndexOf(EngineState *s, int argc, reg_t *argv);
reg_t kListEachElementDo(EngineState *s, int argc, reg_t *argv);
reg_t kListFirstTrue(EngineState *s, int argc, reg_t *argv);
reg_t kListAllTrue(EngineState *s, int argc, reg_t *argv);
+reg_t kListSort(EngineState *s, int argc, reg_t *argv);
reg_t kEditText(EngineState *s, int argc, reg_t *argv);
reg_t kSetScroll(EngineState *s, int argc, reg_t *argv);
@@ -636,7 +637,12 @@ reg_t kMessageBox(EngineState *s, int argc, reg_t *argv);
reg_t kGetConfig(EngineState *s, int argc, reg_t *argv);
reg_t kGetSierraProfileInt(EngineState *s, int argc, reg_t *argv);
reg_t kPrintDebug(EngineState *s, int argc, reg_t *argv);
+
reg_t kCelInfo(EngineState *s, int argc, reg_t *argv);
+reg_t kCelInfoGetOriginX(EngineState *s, int argc, reg_t *argv);
+reg_t kCelInfoGetOriginY(EngineState *s, int argc, reg_t *argv);
+reg_t kCelInfoGetPixel(EngineState *s, int argc, reg_t *argv);
+
reg_t kSetLanguage(EngineState *s, int argc, reg_t *argv);
reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv);
reg_t kSetFontHeight(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 8093147cb4..ac4987e603 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -287,7 +287,7 @@ static const SciKernelMapSubEntry kPalVary_subops[] = {
{ SIG_SCI32, 6, MAP_CALL(PalVaryPauseResume), "i", NULL },
{ SIG_SCI32, 7, MAP_CALL(PalVarySetTarget), "i", NULL },
{ SIG_SCI32, 8, MAP_CALL(PalVarySetStart), "i", NULL },
- { SIG_SCI32, 9, MAP_CALL(PalVaryMergeStart), "i", NULL },
+ { SIG_SCI32, 9, MAP_CALL(PalVaryMergeStart), "i", kPalVaryMergeStart_workarounds },
#endif
SCI_SUBOPENTRY_TERMINATOR
};
@@ -429,12 +429,12 @@ static const SciKernelMapSubEntry kList_subops[] = {
{ SIG_SINCE_SCI21, 14, MAP_CALL(MoveToEnd), "ln", NULL },
{ SIG_SINCE_SCI21, 15, MAP_CALL(FindKey), "l.", NULL },
{ SIG_SINCE_SCI21, 16, MAP_CALL(DeleteKey), "l.", NULL },
- { SIG_SINCE_SCI21, 17, MAP_CALL(ListAt), "li", NULL },
+ { SIG_SINCE_SCI21, 17, MAP_CALL(ListAt), "li", kListAt_workarounds },
{ SIG_SINCE_SCI21, 18, MAP_CALL(ListIndexOf) , "l[io]", NULL },
{ SIG_SINCE_SCI21, 19, MAP_CALL(ListEachElementDo), "li(.*)", NULL },
{ SIG_SINCE_SCI21, 20, MAP_CALL(ListFirstTrue), "li(.*)", NULL },
{ SIG_SINCE_SCI21, 21, MAP_CALL(ListAllTrue), "li(.*)", NULL },
- { SIG_SINCE_SCI21, 22, MAP_CALL(Sort), "ooo", NULL },
+ { SIG_SINCE_SCI21, 22, MAP_CALL(ListSort), "li(i)", NULL },
SCI_SUBOPENTRY_TERMINATOR
};
@@ -511,8 +511,8 @@ static const SciKernelMapSubEntry kArray_subops[] = {
{ SIG_SCI32, 1, MAP_CALL(ArrayGetSize), "r", NULL },
{ SIG_SCI32, 2, MAP_CALL(ArrayGetElement), "ri", NULL },
{ SIG_SCI32, 3, MAP_CALL(ArraySetElements), "ri(.*)", kArraySetElements_workarounds },
- { SIG_SCI32, 4, MAP_CALL(ArrayFree), "r", NULL },
- { SIG_SCI32, 5, MAP_CALL(ArrayFill), "riii", NULL },
+ { SIG_SCI32, 4, MAP_CALL(ArrayFree), "[0r]", NULL },
+ { SIG_SCI32, 5, MAP_CALL(ArrayFill), "riii", kArrayFill_workarounds },
{ SIG_SCI32, 6, MAP_CALL(ArrayCopy), "ririi", NULL },
// there is no subop 7
{ SIG_SCI32, 8, MAP_CALL(ArrayDuplicate), "r", NULL },
@@ -531,7 +531,7 @@ static const SciKernelMapSubEntry kString_subops[] = {
{ SIG_THRU_SCI21MID, 2, MAP_CALL(StringGetChar), "ri", NULL },
{ SIG_THRU_SCI21MID, 3, MAP_CALL(ArraySetElements), "ri(i*)", kArraySetElements_workarounds },
{ SIG_THRU_SCI21MID, 4, MAP_CALL(StringFree), "[0r]", NULL },
- { SIG_THRU_SCI21MID, 5, MAP_CALL(ArrayFill), "rii", NULL },
+ { SIG_THRU_SCI21MID, 5, MAP_CALL(ArrayFill), "rii", kArrayFill_workarounds },
{ SIG_THRU_SCI21MID, 6, MAP_CALL(ArrayCopy), "ririi", NULL },
{ SIG_SCI32, 7, MAP_CALL(StringCompare), "rr(i)", NULL },
@@ -560,6 +560,16 @@ static const SciKernelMapSubEntry kString_subops[] = {
};
// version, subId, function-mapping, signature, workarounds
+static const SciKernelMapSubEntry kCelInfo_subops[] = {
+ { SIG_SINCE_SCI21MID, 0, MAP_CALL(CelInfoGetOriginX), "iii", NULL },
+ { SIG_SINCE_SCI21MID, 1, MAP_CALL(CelInfoGetOriginY), "iii", NULL },
+ { SIG_SINCE_SCI21MID, 2, MAP_EMPTY(CelInfo), "iii", NULL },
+ { SIG_SINCE_SCI21MID, 3, MAP_EMPTY(CelInfo), "iii", NULL },
+ { SIG_SINCE_SCI21MID, 4, MAP_CALL(CelInfoGetPixel), "iiiii", NULL },
+ SCI_SUBOPENTRY_TERMINATOR
+};
+
+// version, subId, function-mapping, signature, workarounds
static const SciKernelMapSubEntry kScrollWindow_subops[] = {
{ SIG_SCI32, 0, MAP_CALL(ScrollWindowCreate), "oi", NULL },
{ SIG_SCI32, 1, MAP_CALL(ScrollWindowAdd), "iriii(i)", kScrollWindowAdd_workarounds },
@@ -743,7 +753,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(Platform), SIG_SCI16, SIGFOR_ALL, "(.*)", NULL, NULL },
#ifdef ENABLE_SCI32
{ "Platform", kPlatform32, SIG_SCI32, SIGFOR_MAC, "(.*)", NULL, NULL },
- { "Platform", kPlatform32, SIG_SCI32, SIGFOR_ALL, "(i)", NULL, NULL },
+ { "Platform", kPlatform32, SIG_SCI32, SIGFOR_ALL, "(i)", NULL, kPlatform32_workarounds },
#endif
{ MAP_CALL(Portrait), SIG_EVERYWHERE, "i(.*)", NULL, NULL }, // subop
{ MAP_CALL(PrevNode), SIG_EVERYWHERE, "n", NULL, NULL },
@@ -850,7 +860,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(DeletePlane), SIG_EVERYWHERE, "o", NULL, NULL },
{ MAP_CALL(DeleteScreenItem), SIG_EVERYWHERE, "o", NULL, NULL },
{ "DisposeTextBitmap", kBitmapDestroy, SIG_SCI2, SIGFOR_ALL, "[r!]", NULL, NULL },
- { MAP_CALL(FrameOut), SIG_EVERYWHERE, "(i)", NULL, NULL },
+ { MAP_CALL(FrameOut), SIG_EVERYWHERE, "(i)", NULL, kFrameOut_workarounds },
{ MAP_CALL(GetHighPlanePri), SIG_EVERYWHERE, "", NULL, NULL },
{ MAP_CALL(InPolygon), SIG_EVERYWHERE, "iio", NULL, NULL },
{ MAP_CALL(IsHiRes), SIG_EVERYWHERE, "", NULL, NULL },
@@ -868,7 +878,8 @@ static SciKernelMapEntry s_kernelMap[] = {
// our own memory manager and garbage collector, thus we simply call FlushResources, which in turn invokes
// our garbage collector (i.e. the SCI0-SCI1.1 semantics).
{ "Purge", kFlushResources, SIG_EVERYWHERE, "i", NULL, NULL },
- { MAP_CALL(SetShowStyle), SIG_EVERYWHERE, "ioiiiii([ri])(i)", NULL, NULL },
+ { MAP_CALL(SetShowStyle), SIG_THRU_SCI21MID, SIGFOR_ALL, "ioiiiii([ri])(i)", NULL, NULL },
+ { MAP_CALL(SetShowStyle), SIG_SINCE_SCI21LATE, SIGFOR_ALL, "ioiiiiii(r)(i)", NULL, NULL },
{ MAP_CALL(String), SIG_EVERYWHERE, "(.*)", kString_subops, NULL },
{ MAP_CALL(UpdatePlane), SIG_EVERYWHERE, "o", NULL, NULL },
{ MAP_CALL(UpdateScreenItem), SIG_EVERYWHERE, "o", NULL, NULL },
@@ -932,7 +943,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(WinHelp), SIG_EVERYWHERE, "(.*)", NULL, NULL },
{ MAP_CALL(GetConfig), SIG_EVERYWHERE, "ro", NULL, NULL },
{ MAP_CALL(GetSierraProfileInt), SIG_EVERYWHERE, "rri", NULL, NULL },
- { MAP_CALL(CelInfo), SIG_SINCE_SCI21MID, SIGFOR_ALL, "iiiiii", NULL, NULL },
+ { MAP_CALL(CelInfo), SIG_SINCE_SCI21MID, SIGFOR_ALL, "(.*)", kCelInfo_subops, NULL },
{ MAP_CALL(SetLanguage), SIG_SINCE_SCI21MID, SIGFOR_ALL, "r", NULL, NULL },
{ MAP_CALL(ScrollWindow), SIG_EVERYWHERE, "i(.*)", kScrollWindow_subops, NULL },
{ MAP_CALL(SetFontRes), SIG_SCI21EARLY, SIGFOR_ALL, "ii", NULL, NULL },
@@ -986,11 +997,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_DUMMY(GetSaveCDisc), SIG_EVERYWHERE, "(.*)", NULL, NULL },
{ MAP_DUMMY(TestPoly), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- // SCI2.1 unmapped functions - TODO!
-
- // SetHotRectangles - used by Phantasmagoria 1, script 64981 (used in the chase scene)
- // <lskovlun> The idea, if I understand correctly, is that the engine generates events
- // of a special HotRect type continuously when the mouse is on that rectangle
+ // Used by Phantasmagoria 1, script 64981 (used in the chase scene)
{ MAP_CALL(SetHotRectangles), SIG_SINCE_SCI21MID, SIGFOR_ALL, "i(r)", NULL, NULL },
// Used by SQ6 to scroll through the inventory via the up/down buttons
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 6aad256664..7bc3c2d212 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -46,7 +46,7 @@
namespace Sci {
-extern reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool unwrapFilename);
+extern reg_t file_open(EngineState *s, const Common::String &filename, kFileOpenMode mode, bool unwrapFilename);
extern FileHandle *getFileFromHandle(EngineState *s, uint handle);
extern int fgets_wrapper(EngineState *s, char *dest, int maxsize, int handle);
extern void listSavegames(Common::Array<SavegameDesc> &saves);
@@ -283,7 +283,7 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) {
return SIGNAL_REG;
}
- int mode = argv[1].toUint16();
+ kFileOpenMode mode = (kFileOpenMode)argv[1].toUint16();
bool unwrapFilename = true;
// SQ4 floppy prepends /\ to the filenames
@@ -427,6 +427,13 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) {
return make_reg(0, handle);
}
}
+ } else if (g_sci->getGameId() == GID_PQSWAT) {
+ // PQSWAT tries to create subdirectories for each game profile
+ for (Common::String::iterator it = name.begin(); it != name.end(); ++it) {
+ if (*it == '\\') {
+ *it = '_';
+ }
+ }
}
// See kMakeSaveCatName
@@ -526,7 +533,6 @@ reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) {
uint bytesWritten = 0;
bool success = false;
s->_segMan->memcpy((byte *)buf, argv[1], size);
- debugC(kDebugLevelFile, "kFileIO(writeRaw): %d, %d", handle, size);
FileHandle *f = getFileFromHandle(s, handle);
if (f) {
@@ -534,6 +540,8 @@ reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) {
success = !f->_out->err();
}
+ debugC(kDebugLevelFile, "kFileIO(writeRaw): %d, %d (%d, %d)", handle, size, bytesWritten, success);
+
delete[] buf;
#ifdef ENABLE_SCI32
@@ -645,7 +653,7 @@ reg_t kFileIOWriteString(EngineState *s, int argc, reg_t *argv) {
FileHandle *f = getFileFromHandle(s, handle);
- if (f) {
+ if (f && f->_out) {
f->_out->write(str.c_str(), str.size());
if (getSciVersion() <= SCI_VERSION_0_LATE)
return s->r_acc; // SCI0 semantics: no value returned
@@ -659,22 +667,21 @@ reg_t kFileIOWriteString(EngineState *s, int argc, reg_t *argv) {
reg_t kFileIOSeek(EngineState *s, int argc, reg_t *argv) {
uint16 handle = argv[0].toUint16();
- uint16 offset = ABS<int16>(argv[1].toSint16()); // can be negative
+ int16 offset = argv[1].toSint16();
uint16 whence = argv[2].toUint16();
debugC(kDebugLevelFile, "kFileIO(seek): %d, %d, %d", handle, offset, whence);
FileHandle *f = getFileFromHandle(s, handle);
if (f && f->_in) {
- // Backward seeking isn't supported in zip file streams, thus adapt the
- // parameters accordingly if games ask for such a seek mode. A known
- // case where this is requested is the save file manager in Phantasmagoria
- if (whence == SEEK_END) {
- whence = SEEK_SET;
- offset = f->_in->size() - offset;
+ const bool success = f->_in->seek(offset, whence);
+ if (getSciVersion() >= SCI_VERSION_2) {
+ if (success) {
+ return make_reg(0, f->_in->pos());
+ }
+ return SIGNAL_REG;
}
-
- return make_reg(0, f->_in->seek(offset, whence));
+ return make_reg(0, success);
} else if (f && f->_out) {
error("kFileIOSeek: Unsupported seek operation on a writeable stream (offset: %d, whence: %d)", offset, whence);
}
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index d4377417a8..f6aeeb7f9e 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -389,13 +389,13 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) {
pFadeArray = NULL_REG;
divisions = argc > 7 ? argv[7].toSint16() : -1;
}
- // SCI 2.1mid–2.1late
- else if (getSciVersion() < SCI_VERSION_3) {
+ // SCI 2.1mid
+ else if (getSciVersion() < SCI_VERSION_2_1_LATE) {
blackScreen = 0;
pFadeArray = argc > 7 ? argv[7] : NULL_REG;
divisions = argc > 8 ? argv[8].toSint16() : -1;
}
- // SCI 3
+ // SCI 2.1late-3
else {
blackScreen = argv[7].toSint16();
pFadeArray = argc > 8 ? argv[8] : NULL_REG;
@@ -406,14 +406,6 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) {
error("Illegal show style %d for plane %04x:%04x", type, PRINT_REG(planeObj));
}
-// TODO: Reuse later for SCI2 and SCI3 implementation and then discard
-// warning("kSetShowStyle: effect %d, plane: %04x:%04x (%s), sec: %d, "
-// "dir: %d, prio: %d, animate: %d, ref frame: %d, black screen: %d, "
-// "pFadeArray: %04x:%04x (%s), divisions: %d",
-// type, PRINT_REG(planeObj), s->_segMan->getObjectName(planeObj), seconds,
-// back, priority, animate, refFrame, blackScreen,
-// PRINT_REG(pFadeArray), s->_segMan->getObjectName(pFadeArray), divisions);
-
// NOTE: The order of planeObj and showStyle are reversed
// because this is how SCI3 called the corresponding method
// on the KernelMgr
@@ -438,31 +430,28 @@ reg_t kCelWide32(EngineState *s, int argc, reg_t *argv) {
return make_reg(0, mulru(celObj._width, Ratio(g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth, celObj._xResolution)));
}
+// Used by Shivers 1, room 23601 to determine what blocks on the red door
+// puzzle board are occupied by pieces already, and by Phantasmagoria 2 when
+// saving the game from the in-game UI
reg_t kCelInfo(EngineState *s, int argc, reg_t *argv) {
- // Used by Shivers 1, room 23601 to determine what blocks on the red door puzzle board
- // are occupied by pieces already
-
- CelObjView view(argv[1].toUint16(), argv[2].toSint16(), argv[3].toSint16());
+ if (!s)
+ return make_reg(0, getSciVersion());
+ error("not supposed to call this");
+}
- int16 result = 0;
+reg_t kCelInfoGetOriginX(EngineState *s, int argc, reg_t *argv) {
+ CelObjView view(argv[0].toUint16(), argv[1].toSint16(), argv[2].toSint16());
+ return make_reg(0, view._origin.x);
+}
- switch (argv[0].toUint16()) {
- case 0:
- result = view._origin.x;
- break;
- case 1:
- result = view._origin.y;
- break;
- case 2:
- case 3:
- // null operation
- break;
- case 4:
- result = view.readPixel(argv[4].toSint16(), argv[5].toSint16(), view._mirrorX);
- break;
- }
+reg_t kCelInfoGetOriginY(EngineState *s, int argc, reg_t *argv) {
+ CelObjView view(argv[0].toUint16(), argv[1].toSint16(), argv[2].toSint16());
+ return make_reg(0, view._origin.y);
+}
- return make_reg(0, result);
+reg_t kCelInfoGetPixel(EngineState *s, int argc, reg_t *argv) {
+ CelObjView view(argv[0].toUint16(), argv[1].toSint16(), argv[2].toSint16());
+ return make_reg(0, view.readPixel(argv[4].toSint16(), argv[5].toSint16(), view._mirrorX));
}
reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv) {
@@ -484,10 +473,18 @@ reg_t kScrollWindowCreate(EngineState *s, int argc, reg_t *argv) {
const reg_t plane = readSelector(segMan, object, SELECTOR(plane));
Common::Rect rect;
- rect.left = readSelectorValue(segMan, object, SELECTOR(nsLeft));
- rect.top = readSelectorValue(segMan, object, SELECTOR(nsTop));
- rect.right = readSelectorValue(segMan, object, SELECTOR(nsRight)) + 1;
- rect.bottom = readSelectorValue(segMan, object, SELECTOR(nsBottom)) + 1;
+
+ if (g_sci->_features->usesAlternateSelectors()) {
+ rect.left = readSelectorValue(segMan, object, SELECTOR(left));
+ rect.top = readSelectorValue(segMan, object, SELECTOR(top));
+ rect.right = readSelectorValue(segMan, object, SELECTOR(right)) + 1;
+ rect.bottom = readSelectorValue(segMan, object, SELECTOR(bottom)) + 1;
+ } else {
+ rect.left = readSelectorValue(segMan, object, SELECTOR(nsLeft));
+ rect.top = readSelectorValue(segMan, object, SELECTOR(nsTop));
+ rect.right = readSelectorValue(segMan, object, SELECTOR(nsRight)) + 1;
+ rect.bottom = readSelectorValue(segMan, object, SELECTOR(nsBottom)) + 1;
+ }
const Common::Point position(rect.left, rect.top);
return g_sci->_gfxControls32->makeScrollWindow(rect, position, plane, foreColor, backColor, fontId, alignment, borderColor, maxNumEntries);
@@ -648,16 +645,9 @@ reg_t kBitmapCreate(EngineState *s, int argc, reg_t *argv) {
}
reg_t kBitmapDestroy(EngineState *s, int argc, reg_t *argv) {
- const reg_t &addr = argv[0];
- const SegmentObj *const segment = s->_segMan->getSegmentObj(addr.getSegment());
-
- if (segment != nullptr &&
- segment->getType() == SEG_TYPE_BITMAP &&
- segment->isValidOffset(addr.getOffset())) {
-
- s->_segMan->freeBitmap(addr);
+ if (s->_segMan->isValidAddr(argv[0], SEG_TYPE_BITMAP)) {
+ s->_segMan->freeBitmap(argv[0]);
}
-
return s->r_acc;
}
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 16ce2363d7..305d459ac1 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -302,14 +302,14 @@ reg_t kAddToEnd(EngineState *s, int argc, reg_t *argv) {
reg_t kAddAfter(EngineState *s, int argc, reg_t *argv) {
List *list = s->_segMan->lookupList(argv[0]);
- Node *firstnode = argv[1].isNull() ? NULL : s->_segMan->lookupNode(argv[1]);
- Node *newnode = s->_segMan->lookupNode(argv[2]);
+ Node *firstNode = s->_segMan->lookupNode(argv[1]);
+ Node *newNode = s->_segMan->lookupNode(argv[2]);
#ifdef CHECK_LISTS
checkListPointer(s->_segMan, argv[0]);
#endif
- if (!newnode) {
+ if (!newNode) {
error("New 'node' %04x:%04x is not a node", PRINT_REG(argv[2]));
return NULL_REG;
}
@@ -320,22 +320,64 @@ reg_t kAddAfter(EngineState *s, int argc, reg_t *argv) {
}
if (argc == 4)
- newnode->key = argv[3];
+ newNode->key = argv[3];
- if (firstnode) { // We're really appending after
- reg_t oldnext = firstnode->succ;
+ if (firstNode) { // We're really appending after
+ const reg_t oldNext = firstNode->succ;
- newnode->pred = argv[1];
- firstnode->succ = argv[2];
- newnode->succ = oldnext;
+ newNode->pred = argv[1];
+ firstNode->succ = argv[2];
+ newNode->succ = oldNext;
- if (oldnext.isNull()) // Appended after last node?
+ if (oldNext.isNull()) // Appended after last node?
// Set new node as last list node
list->last = argv[2];
else
- s->_segMan->lookupNode(oldnext)->pred = argv[2];
+ s->_segMan->lookupNode(oldNext)->pred = argv[2];
- } else { // !firstnode
+ } else {
+ addToFront(s, argv[0], argv[2]); // Set as initial list node
+ }
+
+ return s->r_acc;
+}
+
+reg_t kAddBefore(EngineState *s, int argc, reg_t *argv) {
+ List *list = s->_segMan->lookupList(argv[0]);
+ Node *firstNode = s->_segMan->lookupNode(argv[1]);
+ Node *newNode = s->_segMan->lookupNode(argv[2]);
+
+#ifdef CHECK_LISTS
+ checkListPointer(s->_segMan, argv[0]);
+#endif
+
+ if (!newNode) {
+ error("New 'node' %04x:%04x is not a node", PRINT_REG(argv[2]));
+ return NULL_REG;
+ }
+
+ if (argc != 3 && argc != 4) {
+ error("kAddBefore: Haven't got 3 or 4 arguments, aborting");
+ return NULL_REG;
+ }
+
+ if (argc == 4)
+ newNode->key = argv[3];
+
+ if (firstNode) { // We're really appending before
+ const reg_t oldPred = firstNode->pred;
+
+ newNode->succ = argv[1];
+ firstNode->pred = argv[2];
+ newNode->pred = oldPred;
+
+ if (oldPred.isNull()) // Appended before first node?
+ // Set new node as first list node
+ list->first = argv[2];
+ else
+ s->_segMan->lookupNode(oldPred)->succ = argv[2];
+
+ } else {
addToFront(s, argv[0], argv[2]); // Set as initial list node
}
@@ -544,7 +586,8 @@ reg_t kListIndexOf(EngineState *s, int argc, reg_t *argv) {
}
reg_t kListEachElementDo(EngineState *s, int argc, reg_t *argv) {
- List *list = s->_segMan->lookupList(argv[0]);
+ const reg_t listReg = argv[0];
+ List *list = s->_segMan->lookupList(listReg);
Node *curNode = s->_segMan->lookupNode(list->first);
Selector slc = argv[1].toUint16();
@@ -585,13 +628,16 @@ reg_t kListEachElementDo(EngineState *s, int argc, reg_t *argv) {
curNode = s->_segMan->lookupNode(list->nextNodes[list->numRecursions]);
}
- --list->numRecursions;
+ if (s->_segMan->isValidAddr(listReg, SEG_TYPE_LISTS)) {
+ --list->numRecursions;
+ }
return s->r_acc;
}
reg_t kListFirstTrue(EngineState *s, int argc, reg_t *argv) {
- List *list = s->_segMan->lookupList(argv[0]);
+ const reg_t listReg = argv[0];
+ List *list = s->_segMan->lookupList(listReg);
Node *curNode = s->_segMan->lookupNode(list->first);
Selector slc = argv[1].toUint16();
@@ -636,13 +682,16 @@ reg_t kListFirstTrue(EngineState *s, int argc, reg_t *argv) {
curNode = s->_segMan->lookupNode(list->nextNodes[list->numRecursions]);
}
- --list->numRecursions;
+ if (s->_segMan->isValidAddr(listReg, SEG_TYPE_LISTS)) {
+ --list->numRecursions;
+ }
return s->r_acc;
}
reg_t kListAllTrue(EngineState *s, int argc, reg_t *argv) {
- List *list = s->_segMan->lookupList(argv[0]);
+ const reg_t listReg = argv[0];
+ List *list = s->_segMan->lookupList(listReg);
Node *curNode = s->_segMan->lookupNode(list->first);
reg_t curObject;
@@ -681,7 +730,53 @@ reg_t kListAllTrue(EngineState *s, int argc, reg_t *argv) {
curNode = s->_segMan->lookupNode(list->nextNodes[list->numRecursions]);
}
- --list->numRecursions;
+ if (s->_segMan->isValidAddr(listReg, SEG_TYPE_LISTS)) {
+ --list->numRecursions;
+ }
+
+ return s->r_acc;
+}
+
+reg_t kListSort(EngineState *s, int argc, reg_t *argv) {
+ List *list = s->_segMan->lookupList(argv[0]);
+ const int16 selector = argv[1].toSint16();
+ const bool isDescending = argc > 2 ? (bool)argv[2].toUint16() : false;
+
+ reg_t firstNode = list->first;
+ for (reg_t node = firstNode; node != NULL_REG; node = s->_segMan->lookupNode(firstNode)->succ) {
+
+ reg_t a;
+ if (selector == -1) {
+ a = s->_segMan->lookupNode(node)->value;
+ } else {
+ a = readSelector(s->_segMan, s->_segMan->lookupNode(node)->value, selector);
+ }
+
+ firstNode = node;
+ for (reg_t newNode = s->_segMan->lookupNode(node)->succ; newNode != NULL_REG; newNode = s->_segMan->lookupNode(newNode)->succ) {
+ reg_t b;
+ if (selector == -1) {
+ b = s->_segMan->lookupNode(newNode)->value;
+ } else {
+ b = readSelector(s->_segMan, s->_segMan->lookupNode(newNode)->value, selector);
+ }
+
+ if ((!isDescending && b < a) || (isDescending && a < b)) {
+ firstNode = newNode;
+ a = b;
+ }
+ }
+
+ if (firstNode != node) {
+ reg_t buf[4] = { argv[0], s->_segMan->lookupNode(firstNode)->key };
+ kDeleteKey(s, 2, buf);
+
+ buf[1] = node;
+ buf[2] = firstNode;
+ buf[3] = s->_segMan->lookupNode(firstNode)->value;
+ kAddBefore(s, 4, buf);
+ }
+ }
return s->r_acc;
}
@@ -692,11 +787,6 @@ reg_t kList(EngineState *s, int argc, reg_t *argv) {
error("not supposed to call this");
}
-reg_t kAddBefore(EngineState *s, int argc, reg_t *argv) {
- error("Unimplemented function kAddBefore called");
- return s->r_acc;
-}
-
reg_t kMoveToFront(EngineState *s, int argc, reg_t *argv) {
error("Unimplemented function kMoveToFront called");
return s->r_acc;
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index 0e29ccf783..77ef92b349 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -102,15 +102,9 @@ reg_t kLock(EngineState *s, int argc, reg_t *argv) {
}
reg_t kResCheck(EngineState *s, int argc, reg_t *argv) {
- Resource *res = NULL;
+ Resource *res = nullptr;
ResourceType restype = g_sci->getResMan()->convertResType(argv[0].toUint16());
- if (restype == kResourceTypeVMD) {
- char fileName[10];
- sprintf(fileName, "%d.vmd", argv[1].toUint16());
- return make_reg(0, Common::File::exists(fileName));
- }
-
if ((restype == kResourceTypeAudio36) || (restype == kResourceTypeSync36)) {
if (argc >= 6) {
uint noun = argv[2].toUint16() & 0xff;
@@ -124,7 +118,16 @@ reg_t kResCheck(EngineState *s, int argc, reg_t *argv) {
res = g_sci->getResMan()->testResource(ResourceId(restype, argv[1].toUint16()));
}
- return make_reg(0, res != NULL);
+#ifdef ENABLE_SCI32
+ // GK2 stores some VMDs inside of resource volumes, but usually they are
+ // streamed from the filesystem
+ if (res == nullptr && restype == kResourceTypeVMD) {
+ const Common::String fileName = Common::String::format("%u.vmd", argv[1].toUint16());
+ return make_reg(0, Common::File::exists(fileName));
+ }
+#endif
+
+ return make_reg(0, res != nullptr);
}
reg_t kClone(EngineState *s, int argc, reg_t *argv) {
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index ed53b8d52f..4a5e4f3df6 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -493,10 +493,8 @@ reg_t kSetLanguage(EngineState *s, int argc, reg_t *argv) {
// Basically, it instructs the interpreter to switch the audio resources
// (resource.aud and associated map files) and load them from the "Spanish"
// subdirectory instead.
- Common::String audioDirectory = s->_segMan->getString(argv[0]);
- //warning("SetLanguage: set audio resource directory to '%s'", audioDirectory.c_str());
+ const Common::String audioDirectory = s->_segMan->getString(argv[0]);
g_sci->getResMan()->changeAudioDirectory(audioDirectory);
-
return s->r_acc;
}
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index ab1f0210e7..ae91ef088a 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -663,9 +663,7 @@ reg_t kStringGetChar(EngineState *s, int argc, reg_t *argv) {
}
reg_t kStringFree(EngineState *s, int argc, reg_t *argv) {
- if (!argv[0].isNull()) {
- s->_segMan->freeArray(argv[0]);
- }
+ s->_segMan->freeArray(argv[0]);
return s->r_acc;
}
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 720f6783ee..5184874064 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -764,17 +764,33 @@ void GfxPalette::saveLoadWithSerializer(Common::Serializer &s) {
palVaryRemoveTimer();
s.syncAsSint32LE(_palVaryResourceId);
- if (_palVaryResourceId != -1) {
- palVarySaveLoadPalette(s, &_palVaryOriginPalette);
- palVarySaveLoadPalette(s, &_palVaryTargetPalette);
+ if (_palVaryResourceId != -1 || s.getVersion() >= 40) {
+ if (_palVaryResourceId != -1) {
+ palVarySaveLoadPalette(s, &_palVaryOriginPalette);
+ palVarySaveLoadPalette(s, &_palVaryTargetPalette);
+ }
s.syncAsSint16LE(_palVaryStep);
s.syncAsSint16LE(_palVaryStepStop);
s.syncAsSint16LE(_palVaryDirection);
s.syncAsUint16LE(_palVaryTicks);
s.syncAsSint32LE(_palVaryPaused);
+ if (s.getVersion() >= 40)
+ s.syncAsSint32LE(_palVarySignal);
}
- _palVarySignal = 0;
+ if (s.isLoading() && s.getVersion() < 40) {
+ // Reset _palVaryPaused to 0 when loading an old savegame.
+ // Before version 40, we didn't restore or reset _palVaryPaused.
+ // In QfG3 this could get it stuck at positive values (bug #9674).
+ //
+ // Other SCI11 games don't appear to use palVaryPaused at all.
+ // (Looked at eq2, freddy, kq6, lb2, mgoose11, pq1, qg1, sq4, sq5)
+ _palVaryPaused = 0;
+
+ // Clear any pending updates, since _palVarySignal also wasn't saved
+ // before version 40.
+ _palVarySignal = 0;
+ }
if (s.isLoading() && _palVaryResourceId != -1) {
palVaryInstallTimer();
diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h
index 873394aebb..a75db25bf9 100644
--- a/engines/sci/engine/savegame.h
+++ b/engines/sci/engine/savegame.h
@@ -37,6 +37,7 @@ struct EngineState;
*
* Version - new/changed feature
* =============================
+ * 40 - always store palvary variables
* 39 - Accurate SCI32 arrays/strings, score metadata, avatar metadata
* 38 - SCI32 cursor
* 37 - Segment entry data changed to pointers
@@ -64,7 +65,7 @@ struct EngineState;
*/
enum {
- CURRENT_SAVEGAME_VERSION = 39,
+ CURRENT_SAVEGAME_VERSION = 40,
MINIMUM_SAVEGAME_VERSION = 14
};
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index dbc351d8f2..b2d66d0170 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -105,6 +105,7 @@ static const char *const selectorNameTable[] = {
"setLoop", // Laura Bow 1 Colonel's Bequest
#ifdef ENABLE_SCI32
"newWith", // SCI2 array script
+ "scrollSelections", // GK2
#endif
NULL
};
@@ -137,7 +138,8 @@ enum ScriptPatcherSelectors {
SELECTOR_setLoop
#ifdef ENABLE_SCI32
,
- SELECTOR_newWith
+ SELECTOR_newWith,
+ SELECTOR_scrollSelections
#endif
};
@@ -1012,11 +1014,40 @@ static const SciScriptPatcherEntry gk1Signatures[] = {
#pragma mark -
#pragma mark Gabriel Knight 2
-// script, description, signature patch
+// The down scroll button in GK2 jumps up a pixel on mousedown because there is
+// a send to scrollSelections using an immediate value 1, which means to scroll
+// up by 1 pixel. This patch fixes the send to scrollSelections by passing the
+// button's delta instead of 1.
+//
+// Applies to at least: English CD 1.00, English Steam 1.01
+// Responsible method: ScrollButton::track
+static const uint16 gk2InvScrollSignature[] = {
+ 0x7e, SIG_ADDTOOFFSET(2), // line whatever
+ SIG_MAGICDWORD,
+ 0x38, SIG_SELECTOR16(scrollSelections), // pushi $2c3
+ 0x78, // push1
+ 0x78, // push1
+ 0x63, 0x98, // pToa $98
+ 0x4a, SIG_UINT16(0x06), // send $6
+ SIG_END
+};
+
+static const uint16 gk2InvScrollPatch[] = {
+ 0x38, PATCH_SELECTOR16(scrollSelections), // pushi $2c3
+ 0x78, // push1
+ 0x67, 0x9a, // pTos $9a (delta)
+ 0x63, 0x98, // pToa $98
+ 0x4a, PATCH_UINT16(0x06), // send $6
+ 0x18, 0x18, // waste bytes
+ PATCH_END
+};
+
+// script, description, signature patch
static const SciScriptPatcherEntry gk2Signatures[] = {
- { true, 64990, "increase number of save games", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 },
- { true, 64990, "increase number of save games", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 },
- { true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch },
+ { true, 64990, "increase number of save games", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 },
+ { true, 64990, "increase number of save games", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 },
+ { true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch },
+ { true, 23, "inventory starts scroll down in the wrong direction", 1, gk2InvScrollSignature, gk2InvScrollPatch },
SCI_SIGNATUREENTRY_TERMINATOR
};
@@ -1488,6 +1519,7 @@ static const uint16 kq6CDPatchAudioTextSupport2[] = {
// Additional patch specifically for King's Quest 6
// Fixes special windows, used for example in the Pawn shop (room 280),
// when the man in a robe complains about no more mints.
+// Or also in room 300 at the cliffs (aka copy protection), when Alexander falls down the cliffs.
// We have to change even more code, because the game uses PODialog class for
// text windows and myDialog class for audio. Both are saved to KQ6Print::dialog
// Sadly PODialog is created during KQ6Print::addText, myDialog is set during
@@ -1514,13 +1546,34 @@ static const uint16 kq6CDSignatureAudioTextSupport3[] = {
};
static const uint16 kq6CDPatchAudioTextSupport3[] = {
- 0x31, 0x5c, // adjust jump to reuse audio mode addText-calling code
- PATCH_ADDTOOFFSET(102),
- 0x48, // ret
- 0x48, // ret (waste byte)
+ 0x31, 0x68, // adjust jump to reuse audio mode addText-calling code
+ PATCH_ADDTOOFFSET(+85), // right at the MAGIC_DWORD
+ // check, if text is supposed to be shown. If yes, skip the follow-up check (param[1])
+ 0x89, 0x5a, // lsg global[5Ah]
+ 0x35, 0x01, // ldi 01
+ 0x12, // and
+ 0x2f, 0x07, // bt [skip over param check]
+ // original code, checks param[1]
+ 0x8f, 0x01, // lsp param[1]
+ 0x35, 0x01, // ldi 01
+ 0x1a, // eq?
+ 0x31, 0x10, // bnt [code to set property repressText to 1], adjusted
+ // use myDialog class, so that text box automatically disappears (this is not done for text only mode, like in the original)
0x72, 0x0e, 0x00, // lofsa myDialog
0x65, 0x12, // aTop dialog
- 0x33, 0xed, // jump back to audio mode addText-calling code
+ // followed by original addText-calling code
+ 0x38,
+ PATCH_GETORIGINALBYTE(+95),
+ PATCH_GETORIGINALBYTE(+96), // pushi addText
+ 0x78, // push1
+ 0x8f, 0x02, // lsp param[2]
+ 0x59, 0x03, // &rest 03
+ 0x54, 0x06, // self 06
+ 0x48, // ret
+
+ 0x35, 0x01, // ldi 01
+ 0x65, 0x2e, // aTop repressText
+ 0x48, // ret
PATCH_END
};
@@ -2842,6 +2895,43 @@ static const SciScriptPatcherEntry mothergoose256Signatures[] = {
#ifdef ENABLE_SCI32
#pragma mark -
+#pragma mark Mixed-up Mother Goose Deluxe
+
+// The game uses pic 10005 to render the Sierra logo, but then it also
+// initialises a logo object with view 502 on the same priority as the pic. In
+// the original interpreter, it is dumb luck which is drawn first (based on the
+// order of the memory IDs), though usually the pic is drawn first because not
+// many objects have been created at the start of the game. In ScummVM, the
+// renderer guarantees a sort order based on the creation order of screen items,
+// and since the view is created after the pic, it wins and is drawn on top.
+// This patch stops the view object from being created at all.
+//
+// Applies to at least: English CD from King's Quest Collection
+// Responsible method: sShowLogo::changeState
+static const uint16 mothergooseHiresSignatureLogo[] = {
+ 0x38, SIG_UINT16(0x8e), // pushi $8e
+ SIG_MAGICDWORD,
+ 0x76, // push0
+ 0x72, SIG_UINT16(0x82), // lofsa logo[82]
+ 0x4a, SIG_UINT16(0x04), // send $4
+ SIG_END
+};
+
+static const uint16 mothergooseHiresPatchLogo[] = {
+ 0x18, 0x18, 0x18, // waste bytes
+ 0x18, // waste bytes
+ 0x18, 0x18, 0x18, // waste bytes
+ 0x18, 0x18, 0x18, // waste bytes
+ PATCH_END
+};
+
+// script, description, signature patch
+static const SciScriptPatcherEntry mothergooseHiresSignatures[] = {
+ { true, 108, "bad logo rendering", 1, mothergooseHiresSignatureLogo, mothergooseHiresPatchLogo },
+ SCI_SIGNATUREENTRY_TERMINATOR
+};
+
+#pragma mark -
#pragma mark Phantasmagoria
// script, description, signature patch
@@ -4601,7 +4691,7 @@ static const uint16 sq6SlowTransitionSignature1[] = {
};
static const uint16 sq6SlowTransitionPatch1[] = {
- 0x38, SIG_UINT16(180), // pushi 180
+ 0x38, SIG_UINT16(500), // pushi 500
PATCH_END
};
@@ -5125,6 +5215,10 @@ void ScriptPatcher::processScript(uint16 scriptNr, byte *scriptData, const uint3
signatureTable = mothergoose256Signatures;
break;
#ifdef ENABLE_SCI32
+ case GID_MOTHERGOOSEHIRES:
+ signatureTable = mothergooseHiresSignatures;
+ break;
+
case GID_PHANTASMAGORIA:
signatureTable = phantasmagoriaSignatures;
break;
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 9ed97723d0..54b925a1b6 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -99,17 +99,6 @@ reg_t disassemble(EngineState *s, reg32_t pos, reg_t objAddr, bool printBWTag, b
debugN("%04x:%04x: ", PRINT_REG(pos));
- if (opcode == op_pushSelf) { // 0x3e (62)
- if ((opsize & 1) && g_sci->getGameId() != GID_FANMADE) {
- // Debug opcode op_file
- debugN("file \"%s\"\n", scr + pos.getOffset() + 1); // +1: op_pushSelf size
- retval.incOffset(bytecount - 1);
- return retval;
- }
- }
-
- opsize &= 1; // byte if true, word if false
-
if (printBytecode) {
if (pos.getOffset() + bytecount > scr_size) {
warning("Operation arguments extend beyond end of script");
@@ -123,9 +112,18 @@ reg_t disassemble(EngineState *s, reg32_t pos, reg_t objAddr, bool printBWTag, b
debugN(" ");
}
+ opsize &= 1; // byte if true, word if false
+
if (printBWTag)
debugN("[%c] ", opsize ? 'B' : 'W');
+ if (opcode == op_pushSelf && opsize && g_sci->getGameId() != GID_FANMADE) { // 0x3e (62)
+ // Debug opcode op_file
+ debugN("file \"%s\"\n", scr + pos.getOffset() + 1); // +1: op_pushSelf size
+ retval.incOffset(bytecount - 1);
+ return retval;
+ }
+
#ifndef REDUCE_MEMORY_USAGE
debugN("%-5s", opcodeNames[opcode]);
#endif
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 35a655fb4c..23d1942dd3 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -796,7 +796,7 @@ size_t SegManager::strlen(reg_t str) {
}
-Common::String SegManager::getString(reg_t pointer, int entries) {
+Common::String SegManager::getString(reg_t pointer) {
Common::String ret;
if (pointer.isNull())
return ret; // empty text
@@ -806,10 +806,7 @@ Common::String SegManager::getString(reg_t pointer, int entries) {
warning("SegManager::getString(): Attempt to dereference invalid pointer %04x:%04x", PRINT_REG(pointer));
return ret;
}
- if (entries > src_r.maxSize) {
- warning("Trying to dereference pointer %04x:%04x beyond end of segment", PRINT_REG(pointer));
- return ret;
- }
+
if (src_r.isRaw)
ret = (char *)src_r.raw;
else {
@@ -895,6 +892,11 @@ SciArray *SegManager::lookupArray(reg_t addr) {
}
void SegManager::freeArray(reg_t addr) {
+ // SSCI memory manager ignores attempts to free null handles
+ if (addr.isNull()) {
+ return;
+ }
+
if (_heap[addr.getSegment()]->getType() != SEG_TYPE_ARRAY)
error("Attempt to use non-array %04x:%04x as array", PRINT_REG(addr));
diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h
index c409744711..916b813eb5 100644
--- a/engines/sci/engine/seg_manager.h
+++ b/engines/sci/engine/seg_manager.h
@@ -304,11 +304,10 @@ public:
* Return the string referenced by pointer.
* pointer can point to either a raw or non-raw segment.
* @param pointer The pointer to dereference
- * @parm entries The number of values expected (for checking)
* @return The string referenced, or an empty string if not enough
* entries were available.
*/
- Common::String getString(reg_t pointer, int entries = 0);
+ Common::String getString(reg_t pointer);
/**
@@ -433,6 +432,13 @@ public:
reg_t getParserPtr() const { return _parserPtr; }
#ifdef ENABLE_SCI32
+ bool isValidAddr(reg_t reg, SegmentType expected) const {
+ SegmentObj *mobj = getSegmentObj(reg.getSegment());
+ return (mobj &&
+ mobj->getType() == expected &&
+ mobj->isValidOffset(reg.getOffset()));
+ }
+
SciArray *allocateArray(SciArrayType type, uint16 size, reg_t *addr);
SciArray *lookupArray(reg_t addr);
void freeArray(reg_t addr);
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h
index e8f0be3a79..7e2189ea68 100644
--- a/engines/sci/engine/segment.h
+++ b/engines/sci/engine/segment.h
@@ -542,7 +542,14 @@ public:
*/
reg_t getAsID(const uint16 index) {
if (getSciVersion() >= SCI_VERSION_3) {
- resize(index);
+ // SCI3 resizes arrays automatically when out-of-bounds indices are
+ // passed, but it has an off-by-one error, always passing the index
+ // instead of `index + 1` on a read. This happens to work in SSCI
+ // only because the resize method there actually allocates memory
+ // for `index + 25` elements when growing the array, and it always
+ // grows the array on its first resize because it decides whether to
+ // grow based on byte size including an extra array header.
+ resize(index + 1);
} else {
assert(index < _size);
}
@@ -573,7 +580,8 @@ public:
*/
void setFromID(const uint16 index, const reg_t value) {
if (getSciVersion() >= SCI_VERSION_3) {
- resize(index);
+ // This code is different from SSCI; see getAsID for an explanation
+ resize(index + 1);
} else {
assert(index < _size);
}
@@ -599,7 +607,8 @@ public:
assert(_type == kArrayTypeInt16);
if (getSciVersion() >= SCI_VERSION_3) {
- resize(index);
+ // This code is different from SSCI; see getAsID for an explanation
+ resize(index + 1);
} else {
assert(index < _size);
}
@@ -616,6 +625,7 @@ public:
assert(_type == kArrayTypeInt16);
if (getSciVersion() >= SCI_VERSION_3) {
+ // This code is different from SSCI; see getAsID for an explanation
resize(index + 1);
} else {
assert(index < _size);
@@ -632,7 +642,8 @@ public:
assert(_type == kArrayTypeString || _type == kArrayTypeByte);
if (getSciVersion() >= SCI_VERSION_3) {
- resize(index);
+ // This code is different from SSCI; see getAsID for an explanation
+ resize(index + 1);
} else {
assert(index < _size);
}
@@ -648,7 +659,8 @@ public:
assert(_type == kArrayTypeString || _type == kArrayTypeByte);
if (getSciVersion() >= SCI_VERSION_3) {
- resize(index);
+ // This code is different from SSCI; see getAsID for an explanation
+ resize(index + 1);
} else {
assert(index < _size);
}
@@ -664,7 +676,8 @@ public:
assert(_type == kArrayTypeID || _type == kArrayTypeInt16);
if (getSciVersion() >= SCI_VERSION_3) {
- resize(index);
+ // This code is different from SSCI; see getAsID for an explanation
+ resize(index + 1);
} else {
assert(index < _size);
}
@@ -791,15 +804,15 @@ public:
while (*source != '\0' && *source != showChar && *source <= kWhitespaceBoundary) {
++source;
}
- strcpy((char *)target, (char *)source);
+ memmove(target, source, Common::strnlen((char *)source, _size - 1) + 1);
}
if (flags & kArrayTrimRight) {
source = data + strlen((char *)data) - 1;
while (source > data && *source != showChar && *source <= kWhitespaceBoundary) {
+ *source = '\0';
--source;
}
- *source = '\0';
}
if (flags & kArrayTrimCenter) {
@@ -855,6 +868,29 @@ public:
Common::strlcpy((char *)_data, string.c_str(), string.size() + 1);
}
+ Common::String toDebugString() const {
+ const char *type;
+ switch(_type) {
+ case kArrayTypeID:
+ type = "reg_t";
+ break;
+ case kArrayTypeByte:
+ type = "byte";
+ break;
+ case kArrayTypeInt16:
+ type = "int16";
+ break;
+ case kArrayTypeString:
+ type = "string";
+ break;
+ case kArrayTypeInvalid:
+ type = "invalid";
+ break;
+ }
+
+ return Common::String::format("type %s; %u entries; %u bytes", type, size(), byteSize());
+ }
+
protected:
void *_data;
SciArrayType _type;
@@ -1136,8 +1172,20 @@ public:
*pixel++ = (uint8)color;
}
}
+
+ Common::String toString() const {
+ return Common::String::format("%dx%d; res %dx%d; origin %dx%d; skip color %u; %s; %s)",
+ getWidth(), getHeight(),
+ getXResolution(), getYResolution(),
+ getOrigin().x, getOrigin().y,
+ getSkipColor(),
+ getRemap() ? "remap" : "no remap",
+ getShouldGC() ? "GC" : "no GC");
+ }
};
+#undef BITMAP_PROPERTY
+
struct BitmapTable : public SegmentObjTable<SciBitmap> {
BitmapTable() : SegmentObjTable<SciBitmap>(SEG_TYPE_BITMAP) {}
diff --git a/engines/sci/engine/selector.cpp b/engines/sci/engine/selector.cpp
index 585b0ef2c2..2bc4051a79 100644
--- a/engines/sci/engine/selector.cpp
+++ b/engines/sci/engine/selector.cpp
@@ -21,6 +21,7 @@
*/
#include "sci/sci.h"
+#include "sci/engine/features.h"
#include "sci/engine/kernel.h"
#include "sci/engine/state.h"
#include "sci/engine/selector.h"
@@ -57,11 +58,11 @@ void Kernel::mapSelectors() {
FIND_SELECTOR(nsTop);
FIND_SELECTOR(nsLeft);
FIND_SELECTOR(nsBottom);
+ FIND_SELECTOR(nsRight);
FIND_SELECTOR(lsTop);
FIND_SELECTOR(lsLeft);
FIND_SELECTOR(lsBottom);
FIND_SELECTOR(lsRight);
- FIND_SELECTOR(nsRight);
FIND_SELECTOR(signal);
FIND_SELECTOR(illegalBits);
FIND_SELECTOR(brTop);
@@ -173,6 +174,7 @@ void Kernel::mapSelectors() {
FIND_SELECTOR(left);
FIND_SELECTOR(bottom);
FIND_SELECTOR(right);
+ FIND_SELECTOR(seenRect);
FIND_SELECTOR(resY);
FIND_SELECTOR(resX);
FIND_SELECTOR(dimmed);
@@ -214,9 +216,16 @@ reg_t readSelector(SegManager *segMan, reg_t object, Selector selectorId) {
#ifdef ENABLE_SCI32
void updateInfoFlagViewVisible(Object *obj, int index) {
- // TODO: Make this correct for all SCI versions
- // Selectors 26 through 44 are selectors for View script objects in SQ6
- if (index >= 26 && index <= 44 && getSciVersion() >= SCI_VERSION_2) {
+ int minIndex, maxIndex;
+ if (g_sci->_features->usesAlternateSelectors()) {
+ minIndex = 24;
+ maxIndex = 43;
+ } else {
+ minIndex = 26;
+ maxIndex = 44;
+ }
+
+ if (index >= minIndex && index <= maxIndex && getSciVersion() >= SCI_VERSION_2) {
obj->setInfoSelectorFlag(kInfoFlagViewVisible);
}
}
diff --git a/engines/sci/engine/selector.h b/engines/sci/engine/selector.h
index f2d06d1cf4..8d1edeb489 100644
--- a/engines/sci/engine/selector.h
+++ b/engines/sci/engine/selector.h
@@ -135,12 +135,8 @@ struct SelectorCache {
Selector bitmap; // Used to hold the text bitmap for SCI32 texts
Selector plane;
- Selector top;
- Selector left;
- Selector bottom;
- Selector right;
- Selector resX;
- Selector resY;
+ Selector top, left, bottom, right;
+ Selector resX, resY;
Selector fore;
Selector back;
@@ -153,6 +149,7 @@ struct SelectorCache {
Selector mirrored;
Selector visible;
+ Selector seenRect;
Selector useInsetRect;
Selector inTop, inLeft, inBottom, inRight;
Selector textTop, textLeft, textBottom, textRight;
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 8e407a6ab9..74a2841521 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -1043,7 +1043,7 @@ void run_vm(EngineState *s) {
break;
- case op_infoToa: // (38)
+ case op_info: // (38)
if (getSciVersion() < SCI_VERSION_3)
error("Dummy opcode 0x%x called", opcode); // should never happen
@@ -1053,7 +1053,7 @@ void run_vm(EngineState *s) {
PUSH32(obj->getInfoSelector());
break;
- case op_superToa: // (39)
+ case op_superP: // (39)
if (getSciVersion() < SCI_VERSION_3)
error("Dummy opcode 0x%x called", opcode); // should never happen
diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h
index 13f60fd49c..18549e3a0e 100644
--- a/engines/sci/engine/vm.h
+++ b/engines/sci/engine/vm.h
@@ -198,8 +198,8 @@ enum SciOpcodes {
op_calle = 0x23, // 035
op_ret = 0x24, // 036
op_send = 0x25, // 037
- op_infoToa = 0x26, // 038
- op_superToa = 0x27, // 039
+ op_info = 0x26, // 038
+ op_superP = 0x27, // 039
op_class = 0x28, // 040
// dummy 0x29, // 041
op_self = 0x2a, // 042
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 4e9c59b225..560a383e24 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -125,6 +125,23 @@ static const uint16 sig_uninitread_hoyle4_1[] = {
SIG_END
};
+// Game: Hoyle 5
+// Calling method: export 2
+// Subroutine offset: 0x2fb2 (script 300)
+// Applies to at least: English PC demo
+static const uint16 sig_uninitread_hoyle5_1[] = {
+
+ 0x7e, SIG_ADDTOOFFSET(2), // line N
+ 0x7d, 0x68, 0x65, 0x61, 0x72,
+ 0x74, 0x73, 0x2e, 0x73,
+ 0x63, 0x00, // file "hearts.sc"
+ 0x3f, 0x01, // link 01
+ 0x7e, SIG_ADDTOOFFSET(2), // line N
+ 0x39, 0x4b, // pushi 4bh
+ 0x78, // push1
+ SIG_END
+};
+
// Game: Jones in the fast lane
// Calling method: weekendText::draw
// Subroutine offset: 0x03d3 (script 232)
@@ -280,6 +297,10 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_HOYLE4, 500, 17, 1, "Character", "say", NULL, 504, { WORKAROUND_FAKE, 0 } }, // sometimes while playing Cribbage (e.g. when the opponent says "Last Card") - bug #5662
{ GID_HOYLE4, 800, 870, 0, "EuchreStrategy", "thinkLead", NULL, 0, { WORKAROUND_FAKE, 0 } }, // while playing Euchre, happens at least on 2nd or 3rd turn - bug #6602
{ GID_HOYLE4, -1, 937, 0, "IconBar", "dispatchEvent", NULL, 408, { WORKAROUND_FAKE, 0 } }, // pressing ENTER on scoreboard while mouse is not on OK button, may not happen all the time - bug #6603
+ { GID_HOYLE5, -1, 14, -1, NULL, "select", NULL, 1, { WORKAROUND_FAKE, 0 } }, // dragging the sliders in game settings
+ { GID_HOYLE5, -1, 64937, -1, NULL, "select", NULL, 7, { WORKAROUND_FAKE, 0 } }, // clicking the "control" and "options" buttons in the icon bar
+ { GID_HOYLE5, -1, 64937, -1, "IconBar", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // clicking on any button in the icon bar
+ { GID_HOYLE5, 300, 300, 0, "", "export 2", sig_uninitread_hoyle5_1, 0, { WORKAROUND_FAKE, 0 } }, // after passing around cards in hearts
{ GID_ISLANDBRAIN, 100, 937, 0, "IconBar", "dispatchEvent", NULL, 58, { WORKAROUND_FAKE, 0 } }, // when using ENTER at the startup menu - bug #5241
{ GID_ISLANDBRAIN, 140, 140, 0, "piece", "init", NULL, 3, { WORKAROUND_FAKE, 1 } }, // first puzzle right at the start, some initialization variable. bnt is done on it, and it should be non-0
{ GID_ISLANDBRAIN, 200, 268, 0, "anElement", "select", NULL, 0, { WORKAROUND_FAKE, 0 } }, // elements puzzle, gets used before super TextIcon
@@ -321,6 +342,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_LSL6HIRES, -1, 85, 0, "LL6Inv", "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when creating a new game
{ GID_LSL6HIRES, -1, 64950, 1, "Feature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // at least when entering swimming pool area
{ GID_LSL6HIRES, -1, 64964, 0, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // during the game
+ { GID_LSL7, -1, 64017, 0, "oFlags", "clear", NULL, 0, { WORKAROUND_FAKE, 0 } }, // demo version, when it starts, and whenever the player chooses to go to the "Strip Liar's Dice" mini game
{ GID_MOTHERGOOSE256, -1, 0, 0, "MG", "doit", NULL, 5, { WORKAROUND_FAKE, 0 } }, // SCI1.1: When moving the cursor all the way to the left during the game - bug #5224
{ GID_MOTHERGOOSE256, -1, 992, 0, "AIPath", "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Happens in the demo and full version. In the demo, it happens when walking two screens from mother goose's house to the north. In the full version, it happens in rooms 7 and 23 - bug #5269
{ GID_MOTHERGOOSE256, 90, 90, 0, "introScript", "changeState", NULL, 65, { WORKAROUND_FAKE, 0 } }, // SCI1(CD): At the very end, after the game is completed and restarted - bug #5626
@@ -330,7 +352,11 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_PEPPER, -1, 894, 0, "Package", "doVerb", NULL, 3, { WORKAROUND_FAKE, 0 } }, // using the hand on the book in the inventory - bug #5154
{ GID_PEPPER, 150, 928, 0, "Narrator", "startText", NULL, 0, { WORKAROUND_FAKE, 0 } }, // happens during the non-interactive demo of Pepper
{ GID_PQ4, -1, 25, 0, "iconToggle", "select", NULL, 1, { WORKAROUND_FAKE, 0 } }, // when toggling the icon bar to auto-hide or not
+ { GID_PQ4, 275, 64964, -1, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // when Sherry walks out of the morgue on day 3
+ { GID_PQ4, 240, 64964, -1, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // when encountering Sherry and the reporter outside the morgue at the end of day 3
{ GID_PQSWAT, -1, 64950, 0, NULL, "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Using any menus in-game
+ { GID_PQSWAT, -1, 73, 0, "theLashInterface", "transmit", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Clicking the transmit button in LASH
+ { GID_PQSWAT, 2990, 2990, 0, "talkToSchienbly", "changeState", NULL, 1, { WORKAROUND_FAKE, 0 } }, // When the video of Schienbly talking for the first time ends
{ GID_QFG1, -1, 210, 0, "Encounter", "init", sig_uninitread_qfg1_1, 0, { WORKAROUND_FAKE, 0 } }, // qfg1/hq1: going to the brigands hideout
{ GID_QFG1VGA, 16, 16, 0, "lassoFailed", "changeState", NULL, -1, { WORKAROUND_FAKE, 0 } }, // qfg1vga: casting the "fetch" spell in the screen with the flowers, temps 0 and 1 - bug #5309
{ GID_QFG1VGA, -1, 210, 0, "Encounter", "init", sig_uninitread_qfg1vga_1, 0, { WORKAROUND_FAKE, 0 } }, // qfg1vga: going to the brigands hideout - bug #5515
@@ -356,9 +382,8 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_QFG4, -1, 64917, -1, "Plane", "setBitmap", NULL, 3, { WORKAROUND_FAKE, 0 } }, // floppy version, happens sometimes in fight scenes
{ GID_QFG4, 520, 64950, 0, "fLake2", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // CD version, at the lake, when meeting the Rusalka and attempting to leave
{ GID_QFG4, 800, 64950, 0, "View", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // CD version, in the room with the spider pillar, when climbing on the pillar
- { GID_RAMA, 12, 64950, -1, "InterfaceFeature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Demo, right when it starts
- { GID_RAMA, 12, 64950, -1, "hiliteOptText", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Demo, right when it starts
- { GID_RAMA, 12, 64950, -1, "View", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Demo, right when it starts
+ { GID_RAMA, -1, 64950, -1, "InterfaceFeature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When clicking on the main game interface
+ { GID_RAMA, -1, 64950, -1, "View", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When clicking on main menu buttons
{ GID_SHIVERS, -1, 952, 0, "SoundManager", "stop", NULL, 2, { WORKAROUND_FAKE, 0 } }, // Just after Sierra logo
{ GID_SHIVERS, -1, 64950, 0, "Feature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When clicking on the locked door at the beginning
{ GID_SHIVERS, -1, 64950, 0, "View", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When clicking on the gargoyle eye at the beginning
@@ -400,7 +425,13 @@ const SciWorkaroundEntry kAbs_workarounds[] = {
// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
const SciWorkaroundEntry kArraySetElements_workarounds[] = {
{ GID_GK1, 302, 64918, 0, "Str", "callKernel", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when erasing a letter on the wall in St Louis Cemetery
- { GID_PHANTASMAGORIA,902, 64918, 0, "Str", "callKernel", NULL, 0, { WORKAROUND_FAKE, 0 } }, // tries to set an element of a string array to the ego object when starting a new game and selecting a chapter above 1
+ { GID_PHANTASMAGORIA, -1, 64918, 0, "Str", "callKernel", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when starting a new game and selecting a chapter above 1, or when quitting the chase (in every chase room), or when completing chase successfully
+ SCI_WORKAROUNDENTRY_TERMINATOR
+};
+
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+const SciWorkaroundEntry kArrayFill_workarounds[] = {
+ { GID_PQ4, 540, 64918, 0, "Str", "callKernel", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when clicking on Hate Crimes in the computer on day 2
SCI_WORKAROUNDENTRY_TERMINATOR
};
@@ -500,7 +531,8 @@ const SciWorkaroundEntry kDisplay_workarounds[] = {
{ GID_LONGBOW, 220, 220, 0, "moveOn", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during second room "Outwit and outfight..."
{ GID_LONGBOW, 210, 210, 0, "mama", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during third room "Fall under the spell..."
{ GID_LONGBOW, 320, 320, 0, "flyin", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during fourth room "Conspiracies, love..."
- { GID_PQ2, 23, 23, 0, "rm23Script", "elements", sig_kDisplay_pq2_1, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of pate's file - 0x75 as id - bug #5223
+ { GID_PQ2, 23, 23, 0, "rm23Script", "elements", sig_kDisplay_pq2_1, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of files in jail - 0x75 as id - bug #5223
+ { GID_PQ2, 23, 23, 0, "rm23Script", "handleEvent", sig_kDisplay_pq2_1, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of file in jail - 0x75 as id - bug #9670
{ GID_QFG1, 11, 11, 0, "battle", "init", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: When entering battle, 0x75 as id
{ GID_SQ4, 397, 0, 0, "", "export 12", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // FLOPPY: when going into the computer store - bug #5227
{ GID_SQ4, 391, 391, 0, "doCatalog", "changeState", sig_kDisplay_sq4_1, 0, { WORKAROUND_IGNORE, 0 } }, // CD: clicking on catalog in roboter sale - a parameter is an object
@@ -530,7 +562,10 @@ const SciWorkaroundEntry kDoSoundPlay_workarounds[] = {
{ GID_LSL6HIRES, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
{ GID_QFG4, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
{ GID_PQ4, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
+ { GID_KQ7, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument
+ { GID_SQ6, -1, 0, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Demo passes an extra null argument on startup
{ GID_GK1, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Mac version always passes an extra null argument
+ { GID_GK2, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Demo passes an extra null argument when clicking on buttons
SCI_WORKAROUNDENTRY_TERMINATOR
};
@@ -555,6 +590,7 @@ const SciWorkaroundEntry kGetAngle_workarounds[] = {
// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
const SciWorkaroundEntry kFileIOOpen_workarounds[] = {
{ GID_TORIN, 61000, 61000, 0, "roSierraLogo", "init", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Missing second argument when the game checks for autosave.cat after the Sierra logo
+ { GID_TORIN, 61100, 61100, 0, "roPickAChapter", "init", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Missing second argument when the game checks for autosave.cat after the Sierra logo in the demo
SCI_WORKAROUNDENTRY_TERMINATOR
};
@@ -565,6 +601,17 @@ const SciWorkaroundEntry kFindKey_workarounds[] = {
SCI_WORKAROUNDENTRY_TERMINATOR
};
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+const SciWorkaroundEntry kFrameOut_workarounds[] = {
+ { GID_PQ4, 360, 360, 0, "copCarInset", "init", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When clicking hand on the impounded police car on day 3
+ { GID_PQ4, 360, 360, 0, "copCarInset", "dispose", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When exiting the impounded police car on day 3
+ { GID_PQ4, 275, 275, 0, "checkSherry", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When encountering Sherry and Sam in the morgue on day 3
+ { GID_PQ4, 725, 725, 0, "fridgeInset", "init", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When opening the refrigerator at the end of day 4
+ { GID_PQ4, 725, 725, 0, "fridgeInset", "dispose", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When exiting the refrigerator at the end of day 4
+ { GID_PQ4, 735, 735, 0, "medInset", "dispose", NULL, 0, { WORKAROUND_STILLCALL, 1 } }, // When exiting the medicine cabinet at the end of day 4
+ SCI_WORKAROUNDENTRY_TERMINATOR
+};
+
// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
const SciWorkaroundEntry kGraphDrawLine_workarounds[] = {
{ GID_ISLANDBRAIN, 300, 300, 0, "dudeViewer", "show", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when looking at the gene explanation chart, gets called with 1 extra parameter
@@ -665,6 +712,12 @@ const SciWorkaroundEntry kIsObject_workarounds[] = {
SCI_WORKAROUNDENTRY_TERMINATOR
};
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+const SciWorkaroundEntry kListAt_workarounds[] = {
+ { GID_HOYLE5, 100, 64999, 0, "theHands", "at", NULL, 0, { WORKAROUND_FAKE, 0 } }, // After the first hand is dealt in Crazy Eights game in demo, an object is passed instead of a number
+ SCI_WORKAROUNDENTRY_TERMINATOR
+};
+
// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
const SciWorkaroundEntry kMemory_workarounds[] = {
{ GID_LAURABOW2, -1, 999, 0, "", "export 6", NULL, 0, { WORKAROUND_FAKE, 0 } }, // during the intro, when exiting the train (room 160), talking to Mr. Augustini, etc. - bug #4944
@@ -691,6 +744,18 @@ const SciWorkaroundEntry kPalVarySetPercent_workarounds[] = {
};
// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+const SciWorkaroundEntry kPalVaryMergeStart_workarounds[] = {
+ { GID_PQ4, 170, 170, 0, "getHit", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Three extra parameters passed during the gunfight at the end of day 1
+ SCI_WORKAROUNDENTRY_TERMINATOR
+};
+
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+const SciWorkaroundEntry kPlatform32_workarounds[] = {
+ { GID_HOYLE5, -1, 0, 0, "hoyle4", "newRoom", NULL, 0, { WORKAROUND_FAKE, 1 } }, // at the start of the game, incorrectly uses SCI16 calling convention for kPlatform
+ SCI_WORKAROUNDENTRY_TERMINATOR
+};
+
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
const SciWorkaroundEntry kRandom_workarounds[] = {
{ GID_TORIN, 51400,64928, 0, "Blink", "init", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when Lycentia knocks Torin out after he removes her collar
{ GID_TORIN, 51400,64928, 0, "Blink", "cycleDone", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when Lycentia knocks Torin out after he removes her collar
@@ -807,15 +872,6 @@ const SciWorkaroundEntry kScrollWindowAdd_workarounds[] = {
};
SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroundEntry *workaroundList, SciCallOrigin *trackOrigin) {
- // HACK for SCI3: Temporarily ignore this
- if (getSciVersion() == SCI_VERSION_3) {
- warning("SCI3 HACK: trackOriginAndFindWorkaround() called, ignoring");
- SciWorkaroundSolution sci3IgnoreForNow;
- sci3IgnoreForNow.type = WORKAROUND_FAKE;
- sci3IgnoreForNow.value = 0;
- return sci3IgnoreForNow;
- }
-
const EngineState *state = g_sci->getEngineState();
ExecStack *lastCall = state->xs;
const SciGameId gameId = g_sci->getGameId();
diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h
index 2d72ae5811..cb928faf09 100644
--- a/engines/sci/engine/workarounds.h
+++ b/engines/sci/engine/workarounds.h
@@ -72,6 +72,7 @@ extern const SciWorkaroundEntry kDoSoundPlay_workarounds[];
extern const SciWorkaroundEntry kDoSoundFade_workarounds[];
extern const SciWorkaroundEntry kFileIOOpen_workarounds[];
extern const SciWorkaroundEntry kFindKey_workarounds[];
+extern const SciWorkaroundEntry kFrameOut_workarounds[];
extern const SciWorkaroundEntry kDeleteKey_workarounds[];
extern const SciWorkaroundEntry kGetAngle_workarounds[];
extern const SciWorkaroundEntry kGraphDrawLine_workarounds[];
@@ -82,16 +83,20 @@ extern const SciWorkaroundEntry kGraphFillBoxForeground_workarounds[];
extern const SciWorkaroundEntry kGraphFillBoxAny_workarounds[];
extern const SciWorkaroundEntry kGraphRedrawBox_workarounds[];
extern const SciWorkaroundEntry kIsObject_workarounds[];
+extern const SciWorkaroundEntry kListAt_workarounds[];
extern const SciWorkaroundEntry kMemory_workarounds[];
extern const SciWorkaroundEntry kMoveCursor_workarounds[];
extern const SciWorkaroundEntry kNewWindow_workarounds[];
extern const SciWorkaroundEntry kPalVarySetPercent_workarounds[];
+extern const SciWorkaroundEntry kPalVaryMergeStart_workarounds[];
+extern const SciWorkaroundEntry kPlatform32_workarounds[];
extern const SciWorkaroundEntry kRandom_workarounds[];
extern const SciWorkaroundEntry kReadNumber_workarounds[];
extern const SciWorkaroundEntry kResCheck_workarounds[];
extern const SciWorkaroundEntry kPaletteUnsetFlag_workarounds[];
extern const SciWorkaroundEntry kSetCursor_workarounds[];
extern const SciWorkaroundEntry kArraySetElements_workarounds[];
+extern const SciWorkaroundEntry kArrayFill_workarounds[];
extern const SciWorkaroundEntry kSetPort_workarounds[];
extern const SciWorkaroundEntry kStrAt_workarounds[];
extern const SciWorkaroundEntry kStrCpy_workarounds[];
diff --git a/engines/sci/graphics/celobj32.cpp b/engines/sci/graphics/celobj32.cpp
index 09ea05bd59..8540b636fc 100644
--- a/engines/sci/graphics/celobj32.cpp
+++ b/engines/sci/graphics/celobj32.cpp
@@ -21,6 +21,7 @@
*/
#include "sci/resource.h"
+#include "sci/engine/features.h"
#include "sci/engine/seg_manager.h"
#include "sci/engine/state.h"
#include "sci/graphics/celobj32.h"
@@ -175,6 +176,10 @@ struct SCALER_Scale {
// so just always make the reader decompress an entire
// line of source data when scaling
_reader(celObj, celObj._width) {
+#ifndef NDEBUG
+ assert(_minX <= _maxX);
+#endif
+
// In order for scaling ratios to apply equally across objects that
// start at different positions on the screen (like the cels of a
// picture), the pixels that are read from the source bitmap must all
@@ -772,6 +777,14 @@ void CelObj::drawUncompHzFlipNoMDNoSkip(Buffer &target, const Common::Rect &targ
}
void CelObj::scaleDrawNoMD(Buffer &target, const Ratio &scaleX, const Ratio &scaleY, const Common::Rect &targetRect, const Common::Point &scaledPosition) const {
+ // In SSCI the checks are > because their rects are BR-inclusive;
+ // our checks are >= because our rects are BR-exclusive
+ if (g_sci->_features->hasEmptyScaleDrawHack() &&
+ (targetRect.left >= targetRect.right ||
+ targetRect.top >= targetRect.bottom)) {
+ return;
+ }
+
if (_drawMirrored)
render<MAPPER_NoMD, SCALER_Scale<true, READER_Compressed> >(target, targetRect, scaledPosition, scaleX, scaleY);
else
@@ -779,6 +792,14 @@ void CelObj::scaleDrawNoMD(Buffer &target, const Ratio &scaleX, const Ratio &sca
}
void CelObj::scaleDrawUncompNoMD(Buffer &target, const Ratio &scaleX, const Ratio &scaleY, const Common::Rect &targetRect, const Common::Point &scaledPosition) const {
+ // In SSCI the checks are > because their rects are BR-inclusive;
+ // our checks are >= because our rects are BR-exclusive
+ if (g_sci->_features->hasEmptyScaleDrawHack() &&
+ (targetRect.left >= targetRect.right ||
+ targetRect.top >= targetRect.bottom)) {
+ return;
+ }
+
if (_drawMirrored) {
render<MAPPER_NoMD, SCALER_Scale<true, READER_Uncompressed> >(target, targetRect, scaledPosition, scaleX, scaleY);
} else {
@@ -949,6 +970,9 @@ CelObjView::CelObjView(const GuiResourceId viewId, const int16 loopNo, const int
_width = READ_SCI11ENDIAN_UINT16(celHeader);
_height = READ_SCI11ENDIAN_UINT16(celHeader + 2);
_origin.x = _width / 2 - (int16)READ_SCI11ENDIAN_UINT16(celHeader + 4);
+ if (g_sci->_features->usesAlternateSelectors() && _mirrorX) {
+ _origin.x = _width - _origin.x - 1;
+ }
_origin.y = _height - (int16)READ_SCI11ENDIAN_UINT16(celHeader + 6) - 1;
_skipColor = celHeader[8];
_compressionType = (CelCompressionType)celHeader[9];
diff --git a/engines/sci/graphics/celobj32.h b/engines/sci/graphics/celobj32.h
index 03d950a3c3..70cbd09e7d 100644
--- a/engines/sci/graphics/celobj32.h
+++ b/engines/sci/graphics/celobj32.h
@@ -122,6 +122,18 @@ struct CelInfo32 {
inline bool operator!=(const CelInfo32 &other) {
return !(*this == other);
}
+
+ inline Common::String toString() const {
+ if (type == kCelTypeView) {
+ return Common::String::format("view %u, loop %d, cel %d", resourceId, loopNo, celNo);
+ } else if (type == kCelTypePic) {
+ return Common::String::format("pic %u", resourceId);
+ } else if (kCelTypeColor) {
+ return Common::String::format("color %d", color);
+ } else if (type == kCelTypeMem) {
+ return Common::String::format("mem %04x:%04x", PRINT_REG(bitmap));
+ }
+ }
};
class CelObj;
diff --git a/engines/sci/graphics/cursor32.cpp b/engines/sci/graphics/cursor32.cpp
index 2f2611c769..6bb1323cac 100644
--- a/engines/sci/graphics/cursor32.cpp
+++ b/engines/sci/graphics/cursor32.cpp
@@ -278,6 +278,7 @@ void GfxCursor32::setView(const GuiResourceId viewId, const int16 loopNo, const
}
_cursorBack.data = (byte *)realloc(_cursorBack.data, _width * _height);
+ memset(_cursorBack.data, 0, _width * _height);
_drawBuff1.data = (byte *)realloc(_drawBuff1.data, _width * _height);
_drawBuff2.data = (byte *)realloc(_drawBuff2.data, _width * _height * 4);
_savedVmapRegion.data = (byte *)realloc(_savedVmapRegion.data, _width * _height);
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index bf43c8b63b..464b28a2ba 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -35,6 +35,8 @@
#include "sci/sci.h"
#include "sci/console.h"
+#include "sci/event.h"
+#include "sci/engine/features.h"
#include "sci/engine/kernel.h"
#include "sci/engine/state.h"
#include "sci/engine/selector.h"
@@ -84,16 +86,21 @@ GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitio
switch (g_sci->getGameId()) {
case GID_HOYLE5:
- case GID_GK2:
case GID_LIGHTHOUSE:
case GID_LSL7:
case GID_PHANTASMAGORIA2:
- case GID_PQSWAT:
case GID_TORIN:
case GID_RAMA:
_currentBuffer.scriptWidth = 640;
_currentBuffer.scriptHeight = 480;
break;
+ case GID_GK2:
+ case GID_PQSWAT:
+ if (!g_sci->isDemo()) {
+ _currentBuffer.scriptWidth = 640;
+ _currentBuffer.scriptHeight = 480;
+ }
+ break;
default:
// default script width for other games is 320x200
break;
@@ -501,6 +508,14 @@ void GfxFrameout::kernelAddPicAt(const reg_t planeObject, const GuiResourceId pi
#pragma mark Rendering
void GfxFrameout::frameOut(const bool shouldShowBits, const Common::Rect &eraseRect) {
+ // In SSCI, mouse events were received via hardware interrupt, so the mouse
+ // cursor would always get updated whenever the user moved the mouse. Since
+ // we must poll for mouse events instead, poll here so that the mouse gets
+ // updated with its current position at render time. If we do not do this,
+ // the mouse gets "stuck" during loops that do not make calls to kGetEvent,
+ // like transitions and the benchmarking loop at the start of every game.
+ g_sci->getEventManager()->getSciEvent(SCI_EVENT_PEEK);
+
RobotDecoder &robotPlayer = g_sci->_video32->getRobotPlayer();
const bool robotIsActive = robotPlayer.getStatus() != RobotDecoder::kRobotStatusUninitialized;
@@ -1153,10 +1168,13 @@ void GfxFrameout::showBits() {
byte *sourceBuffer = (byte *)_currentBuffer.getPixels() + rounded.top * _currentBuffer.screenWidth + rounded.left;
- // TODO: Sometimes transition screen items generate zero-dimension
- // show rectangles. Is this a bug?
+ // Sometimes screen items (especially from SCI2.1early transitions, like
+ // in the asteroids minigame in PQ4) generate zero-dimension show
+ // rectangles. In SSCI, zero-dimension rectangles are OK (they just
+ // result in no copy), but OSystem::copyRectToScreen will assert on
+ // them, so we need to check for zero-dimensions rectangles and ignore
+ // them explicitly
if (rounded.width() == 0 || rounded.height() == 0) {
- warning("Zero-dimension show rectangle ignored");
continue;
}
@@ -1368,10 +1386,18 @@ bool GfxFrameout::kernelSetNowSeen(const reg_t screenItemObject) const {
}
Common::Rect result = screenItem->getNowSeenRect(*plane);
- writeSelectorValue(_segMan, screenItemObject, SELECTOR(nsLeft), result.left);
- writeSelectorValue(_segMan, screenItemObject, SELECTOR(nsTop), result.top);
- writeSelectorValue(_segMan, screenItemObject, SELECTOR(nsRight), result.right - 1);
- writeSelectorValue(_segMan, screenItemObject, SELECTOR(nsBottom), result.bottom - 1);
+
+ if (g_sci->_features->usesAlternateSelectors()) {
+ writeSelectorValue(_segMan, screenItemObject, SELECTOR(left), result.left);
+ writeSelectorValue(_segMan, screenItemObject, SELECTOR(top), result.top);
+ writeSelectorValue(_segMan, screenItemObject, SELECTOR(right), result.right - 1);
+ writeSelectorValue(_segMan, screenItemObject, SELECTOR(bottom), result.bottom - 1);
+ } else {
+ writeSelectorValue(_segMan, screenItemObject, SELECTOR(nsLeft), result.left);
+ writeSelectorValue(_segMan, screenItemObject, SELECTOR(nsTop), result.top);
+ writeSelectorValue(_segMan, screenItemObject, SELECTOR(nsRight), result.right - 1);
+ writeSelectorValue(_segMan, screenItemObject, SELECTOR(nsBottom), result.bottom - 1);
+ }
return true;
}
diff --git a/engines/sci/graphics/paint32.cpp b/engines/sci/graphics/paint32.cpp
index bf7c73623e..8a63365f03 100644
--- a/engines/sci/graphics/paint32.cpp
+++ b/engines/sci/graphics/paint32.cpp
@@ -121,7 +121,7 @@ void GfxPaint32::plotter(int x, int y, int color, void *data) {
reg_t GfxPaint32::makeLineBitmap(const Common::Point &startPoint, const Common::Point &endPoint, const int16 priority, const uint8 color, const LineStyle style, uint16 pattern, uint8 thickness, Common::Rect &outRect) {
const uint8 skipColor = color != kDefaultSkipColor ? kDefaultSkipColor : 0;
- // Line thickness is expected to be 2 * thickness + 1
+ // Line thickness is expected to be 2n + 1
thickness = (MAX<uint8>(1, thickness) - 1) | 1;
const uint8 halfThickness = thickness >> 1;
@@ -130,8 +130,8 @@ reg_t GfxPaint32::makeLineBitmap(const Common::Point &startPoint, const Common::
outRect.left = MIN<int16>(startPoint.x, endPoint.x);
outRect.top = MIN<int16>(startPoint.y, endPoint.y);
- outRect.right = MAX<int16>(startPoint.x, endPoint.x) + 1 + 1; // rect lower edge + thickness offset
- outRect.bottom = MAX<int16>(startPoint.y, endPoint.y) + 1 + 1; // rect lower edge + thickness offset
+ outRect.right = MAX<int16>(startPoint.x, endPoint.x) + 1;
+ outRect.bottom = MAX<int16>(startPoint.y, endPoint.y) + 1;
outRect.grow(halfThickness);
outRect.clip(Common::Rect(scriptWidth, scriptHeight));
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index 1514ad838f..6fe1fb1b49 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -852,6 +852,7 @@ void GfxPalette::palVaryCallback(void *refCon) {
}
void GfxPalette::palVaryIncreaseSignal() {
+ // FIXME: increments from another thread aren't guaranteed to be atomic
if (!_palVaryPaused)
_palVarySignal++;
}
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index 75a885da57..864327feaa 100644
--- a/engines/sci/graphics/picture.cpp
+++ b/engines/sci/graphics/picture.cpp
@@ -1212,6 +1212,7 @@ void GfxPicture::vectorPatternTexturedBox(Common::Rect box, byte color, byte pri
void GfxPicture::vectorPatternCircle(Common::Rect box, byte size, byte color, byte prio, byte control) {
byte flag = _screen->getDrawingMask(color, prio, control);
+ assert(size < ARRAYSIZE(vectorPatternCircles));
const byte *circleData = vectorPatternCircles[size];
byte bitmap = *circleData;
byte bitNo = 0;
@@ -1219,21 +1220,23 @@ void GfxPicture::vectorPatternCircle(Common::Rect box, byte size, byte color, by
for (y = box.top; y < box.bottom; y++) {
for (x = box.left; x < box.right; x++) {
+ if (bitNo == 8) {
+ circleData++;
+ bitmap = *circleData;
+ bitNo = 0;
+ }
if (bitmap & 1) {
_screen->vectorPutPixel(x, y, flag, color, prio, control);
}
bitNo++;
- if (bitNo == 8) {
- circleData++; bitmap = *circleData; bitNo = 0;
- } else {
- bitmap = bitmap >> 1;
- }
+ bitmap >>= 1;
}
}
}
void GfxPicture::vectorPatternTexturedCircle(Common::Rect box, byte size, byte color, byte prio, byte control, byte texture) {
byte flag = _screen->getDrawingMask(color, prio, control);
+ assert(size < ARRAYSIZE(vectorPatternCircles));
const byte *circleData = vectorPatternCircles[size];
byte bitmap = *circleData;
byte bitNo = 0;
@@ -1242,6 +1245,11 @@ void GfxPicture::vectorPatternTexturedCircle(Common::Rect box, byte size, byte c
for (y = box.top; y < box.bottom; y++) {
for (x = box.left; x < box.right; x++) {
+ if (bitNo == 8) {
+ circleData++;
+ bitmap = *circleData;
+ bitNo = 0;
+ }
if (bitmap & 1) {
if (*textureData) {
_screen->vectorPutPixel(x, y, flag, color, prio, control);
@@ -1249,11 +1257,7 @@ void GfxPicture::vectorPatternTexturedCircle(Common::Rect box, byte size, byte c
textureData++;
}
bitNo++;
- if (bitNo == 8) {
- circleData++; bitmap = *circleData; bitNo = 0;
- } else {
- bitmap = bitmap >> 1;
- }
+ bitmap >>= 1;
}
}
}
diff --git a/engines/sci/graphics/plane32.cpp b/engines/sci/graphics/plane32.cpp
index f56df4dced..aa8cd52d42 100644
--- a/engines/sci/graphics/plane32.cpp
+++ b/engines/sci/graphics/plane32.cpp
@@ -44,8 +44,10 @@ void DrawList::add(ScreenItem *screenItem, const Common::Rect &rect) {
#pragma mark -
#pragma mark Plane
uint16 Plane::_nextObjectId = 20000;
+uint32 Plane::_nextCreationId = 0;
Plane::Plane(const Common::Rect &gameRect, PlanePictureCodes pictureId) :
+_creationId(_nextCreationId++),
_pictureId(pictureId),
_mirrored(false),
_type(kPlaneTypeColored),
@@ -65,6 +67,7 @@ _gameRect(gameRect) {
}
Plane::Plane(reg_t object) :
+_creationId(_nextCreationId++),
_type(kPlaneTypeColored),
_priorityChanged(false),
_object(object),
@@ -77,10 +80,17 @@ _moved(0) {
_vanishingPoint.x = readSelectorValue(segMan, object, SELECTOR(vanishingX));
_vanishingPoint.y = readSelectorValue(segMan, object, SELECTOR(vanishingY));
- _gameRect.left = readSelectorValue(segMan, object, SELECTOR(inLeft));
- _gameRect.top = readSelectorValue(segMan, object, SELECTOR(inTop));
- _gameRect.right = readSelectorValue(segMan, object, SELECTOR(inRight)) + 1;
- _gameRect.bottom = readSelectorValue(segMan, object, SELECTOR(inBottom)) + 1;
+ if (g_sci->_features->usesAlternateSelectors()) {
+ _gameRect.left = readSelectorValue(segMan, object, SELECTOR(left));
+ _gameRect.top = readSelectorValue(segMan, object, SELECTOR(top));
+ _gameRect.right = readSelectorValue(segMan, object, SELECTOR(right)) + 1;
+ _gameRect.bottom = readSelectorValue(segMan, object, SELECTOR(bottom)) + 1;
+ } else {
+ _gameRect.left = readSelectorValue(segMan, object, SELECTOR(inLeft));
+ _gameRect.top = readSelectorValue(segMan, object, SELECTOR(inTop));
+ _gameRect.right = readSelectorValue(segMan, object, SELECTOR(inRight)) + 1;
+ _gameRect.bottom = readSelectorValue(segMan, object, SELECTOR(inBottom)) + 1;
+ }
convertGameRectToPlaneRect();
_back = readSelectorValue(segMan, object, SELECTOR(back));
@@ -94,6 +104,7 @@ _moved(0) {
}
Plane::Plane(const Plane &other) :
+_creationId(other._creationId),
_pictureId(other._pictureId),
_mirrored(other._mirrored),
_type(other._type),
@@ -106,6 +117,7 @@ _screenRect(other._screenRect),
_screenItemList(other._screenItemList) {}
void Plane::operator=(const Plane &other) {
+ _creationId = other._creationId;
_gameRect = other._gameRect;
_planeRect = other._planeRect;
_vanishingPoint = other._vanishingPoint;
@@ -120,6 +132,7 @@ void Plane::operator=(const Plane &other) {
void Plane::init() {
_nextObjectId = 20000;
+ _nextCreationId = 0;
}
void Plane::convertGameRectToPlaneRect() {
@@ -144,11 +157,12 @@ void Plane::printDebugInfo(Console *con) const {
name = g_sci->getEngineState()->_segMan->getObjectName(_object);
}
- con->debugPrintf("%04x:%04x (%s): type %d, prio %d, pic %d, mirror %d, back %d\n",
+ con->debugPrintf("%04x:%04x (%s): type %d, prio %d, ins %u, pic %d, mirror %d, back %d\n",
PRINT_REG(_object),
name.c_str(),
_type,
_priority,
+ _creationId,
_pictureId,
_mirrored,
_back
@@ -508,7 +522,7 @@ void Plane::calcLists(Plane &visiblePlane, const PlaneList &planeList, DrawList
const ScreenItem *drawnItem = drawListEntry->screenItem;
if (
- (newItem->_priority > drawnItem->_priority || (newItem->_priority == drawnItem->_priority && newItem->_object > drawnItem->_object)) &&
+ (newItem->_priority > drawnItem->_priority || (newItem->_priority == drawnItem->_priority && newItem->_creationId > drawnItem->_creationId)) &&
drawListEntry->rect.intersects(newItem->_screenRect)
) {
mergeToDrawList(j, drawListEntry->rect.findIntersectingRect(newItem->_screenRect), drawList);
@@ -822,10 +836,18 @@ void Plane::update(const reg_t object) {
SegManager *segMan = g_sci->getEngineState()->_segMan;
_vanishingPoint.x = readSelectorValue(segMan, object, SELECTOR(vanishingX));
_vanishingPoint.y = readSelectorValue(segMan, object, SELECTOR(vanishingY));
- _gameRect.left = readSelectorValue(segMan, object, SELECTOR(inLeft));
- _gameRect.top = readSelectorValue(segMan, object, SELECTOR(inTop));
- _gameRect.right = readSelectorValue(segMan, object, SELECTOR(inRight)) + 1;
- _gameRect.bottom = readSelectorValue(segMan, object, SELECTOR(inBottom)) + 1;
+
+ if (g_sci->_features->usesAlternateSelectors()) {
+ _gameRect.left = readSelectorValue(segMan, object, SELECTOR(left));
+ _gameRect.top = readSelectorValue(segMan, object, SELECTOR(top));
+ _gameRect.right = readSelectorValue(segMan, object, SELECTOR(right)) + 1;
+ _gameRect.bottom = readSelectorValue(segMan, object, SELECTOR(bottom)) + 1;
+ } else {
+ _gameRect.left = readSelectorValue(segMan, object, SELECTOR(inLeft));
+ _gameRect.top = readSelectorValue(segMan, object, SELECTOR(inTop));
+ _gameRect.right = readSelectorValue(segMan, object, SELECTOR(inRight)) + 1;
+ _gameRect.bottom = readSelectorValue(segMan, object, SELECTOR(inBottom)) + 1;
+ }
convertGameRectToPlaneRect();
_priority = readSelectorValue(segMan, object, SELECTOR(priority));
diff --git a/engines/sci/graphics/plane32.h b/engines/sci/graphics/plane32.h
index 964d20ca12..a34df1cc1a 100644
--- a/engines/sci/graphics/plane32.h
+++ b/engines/sci/graphics/plane32.h
@@ -110,6 +110,20 @@ private:
static uint16 _nextObjectId;
/**
+ * A serial used to identify the creation order of
+ * planes, to ensure a stable sort order for planes
+ * with identical priorities.
+ */
+ static uint32 _nextCreationId;
+
+ /**
+ * The creation order number, which ensures a stable
+ * sort when planes with identical priorities are added
+ * to the plane list.
+ */
+ uint32 _creationId;
+
+ /**
* For planes that are used to render picture data, the
* resource ID of the picture to be displayed. This
* value may also be one of the special
@@ -261,7 +275,9 @@ public:
}
if (_priority == other._priority) {
- return _object < other._object;
+ // This is different than SSCI; see ScreenItem::operator< for an
+ // explanation
+ return _creationId < other._creationId;
}
return false;
diff --git a/engines/sci/graphics/screen_item32.cpp b/engines/sci/graphics/screen_item32.cpp
index 9b0d390cc3..4757770dc0 100644
--- a/engines/sci/graphics/screen_item32.cpp
+++ b/engines/sci/graphics/screen_item32.cpp
@@ -22,6 +22,7 @@
#include "sci/console.h"
#include "sci/resource.h"
+#include "sci/engine/features.h"
#include "sci/engine/kernel.h"
#include "sci/engine/selector.h"
#include "sci/engine/state.h"
@@ -34,8 +35,10 @@ namespace Sci {
#pragma mark ScreenItem
uint16 ScreenItem::_nextObjectId = 20000;
+uint32 ScreenItem::_nextCreationId = 0;
ScreenItem::ScreenItem(const reg_t object) :
+_creationId(_nextCreationId++),
_celObj(nullptr),
_object(object),
_pictureId(-1),
@@ -51,6 +54,7 @@ _drawBlackLines(false) {
}
ScreenItem::ScreenItem(const reg_t plane, const CelInfo32 &celInfo) :
+_creationId(_nextCreationId++),
_plane(plane),
_useInsetRect(false),
_z(0),
@@ -67,6 +71,7 @@ _mirrorX(false),
_drawBlackLines(false) {}
ScreenItem::ScreenItem(const reg_t plane, const CelInfo32 &celInfo, const Common::Rect &rect) :
+_creationId(_nextCreationId++),
_plane(plane),
_useInsetRect(false),
_z(0),
@@ -87,6 +92,7 @@ _drawBlackLines(false) {
}
ScreenItem::ScreenItem(const reg_t plane, const CelInfo32 &celInfo, const Common::Point &position, const ScaleInfo &scaleInfo) :
+_creationId(_nextCreationId++),
_plane(plane),
_scale(scaleInfo),
_useInsetRect(false),
@@ -104,6 +110,7 @@ _mirrorX(false),
_drawBlackLines(false) {}
ScreenItem::ScreenItem(const ScreenItem &other) :
+_creationId(other._creationId),
_plane(other._plane),
_scale(other._scale),
_useInsetRect(other._useInsetRect),
@@ -131,6 +138,7 @@ void ScreenItem::operator=(const ScreenItem &other) {
_celObj = nullptr;
}
+ _creationId = other._creationId;
_screenRect = other._screenRect;
_mirrorX = other._mirrorX;
_useInsetRect = other._useInsetRect;
@@ -148,6 +156,7 @@ ScreenItem::~ScreenItem() {
void ScreenItem::init() {
_nextObjectId = 20000;
+ _nextCreationId = 0;
}
void ScreenItem::setFromObject(SegManager *segMan, const reg_t object, const bool updateCel, const bool updateBitmap) {
@@ -169,7 +178,7 @@ void ScreenItem::setFromObject(SegManager *segMan, const reg_t object, const boo
// single location
Resource *view = g_sci->getResMan()->findResource(ResourceId(kResourceTypeView, _celInfo.resourceId), false);
if (!view) {
- error("Failed to load resource %d", _celInfo.resourceId);
+ error("Failed to load %s", _celInfo.toString().c_str());
}
// NOTE: +2 because the header size field itself is excluded from
@@ -230,14 +239,26 @@ void ScreenItem::setFromObject(SegManager *segMan, const reg_t object, const boo
_z = readSelectorValue(segMan, object, SELECTOR(z));
_position.y -= _z;
- if (readSelectorValue(segMan, object, SELECTOR(useInsetRect))) {
- _useInsetRect = true;
- _insetRect.left = readSelectorValue(segMan, object, SELECTOR(inLeft));
- _insetRect.top = readSelectorValue(segMan, object, SELECTOR(inTop));
- _insetRect.right = readSelectorValue(segMan, object, SELECTOR(inRight)) + 1;
- _insetRect.bottom = readSelectorValue(segMan, object, SELECTOR(inBottom)) + 1;
+ if (g_sci->_features->usesAlternateSelectors()) {
+ if (readSelectorValue(segMan, object, SELECTOR(seenRect))) {
+ _useInsetRect = true;
+ _insetRect.left = readSelectorValue(segMan, object, SELECTOR(left));
+ _insetRect.top = readSelectorValue(segMan, object, SELECTOR(top));
+ _insetRect.right = readSelectorValue(segMan, object, SELECTOR(right)) + 1;
+ _insetRect.bottom = readSelectorValue(segMan, object, SELECTOR(bottom)) + 1;
+ } else {
+ _useInsetRect = false;
+ }
} else {
- _useInsetRect = false;
+ if (readSelectorValue(segMan, object, SELECTOR(useInsetRect))) {
+ _useInsetRect = true;
+ _insetRect.left = readSelectorValue(segMan, object, SELECTOR(inLeft));
+ _insetRect.top = readSelectorValue(segMan, object, SELECTOR(inTop));
+ _insetRect.right = readSelectorValue(segMan, object, SELECTOR(inRight)) + 1;
+ _insetRect.bottom = readSelectorValue(segMan, object, SELECTOR(inBottom)) + 1;
+ } else {
+ _useInsetRect = false;
+ }
}
segMan->getObject(object)->clearInfoSelectorFlag(kInfoFlagViewVisible);
@@ -434,7 +455,11 @@ void ScreenItem::calcRects(const Plane &plane) {
_screenRect = _screenItemRect;
- if (_screenRect.intersects(plane._screenRect)) {
+ // PQ4CD creates screen items with invalid rects; SSCI does not care
+ // about this, but `Common::Rect::clip` does, so we need to check
+ // whether or not the rect is actually valid before clipping and only
+ // clip valid rects
+ if (_screenRect.intersects(plane._screenRect) && _screenRect.isValidRect()) {
_screenRect.clip(plane._screenRect);
} else {
_screenRect.right = 0;
@@ -476,10 +501,11 @@ CelObj &ScreenItem::getCelObj() const {
}
void ScreenItem::printDebugInfo(Console *con) const {
- con->debugPrintf("%04x:%04x (%s), prio %d, x %d, y %d, z: %d, scaledX: %d, scaledY: %d flags: %d\n",
+ con->debugPrintf("%04x:%04x (%s), prio %d, ins %u, x %d, y %d, z: %d, scaledX: %d, scaledY: %d flags: %d\n",
_object.getSegment(), _object.getOffset(),
g_sci->getEngineState()->_segMan->getObjectName(_object),
_priority,
+ _creationId,
_position.x,
_position.y,
_z,
@@ -492,30 +518,8 @@ void ScreenItem::printDebugInfo(Console *con) const {
con->debugPrintf(" inset rect: (%d, %d, %d, %d)\n", PRINT_RECT(_insetRect));
}
- Common::String celType;
- switch (_celInfo.type) {
- case kCelTypePic:
- celType = "pic";
- break;
- case kCelTypeView:
- celType = "view";
- break;
- case kCelTypeColor:
- celType = "color";
- break;
- case kCelTypeMem:
- celType = "mem";
- break;
- }
+ con->debugPrintf(" %s\n", _celInfo.toString().c_str());
- con->debugPrintf(" type: %s, res %d, loop %d, cel %d, bitmap %04x:%04x, color: %d\n",
- celType.c_str(),
- _celInfo.resourceId,
- _celInfo.loopNo,
- _celInfo.celNo,
- PRINT_REG(_celInfo.bitmap),
- _celInfo.color
- );
if (_celObj != nullptr) {
con->debugPrintf(" width %d, height %d, x-resolution %d, y-resolution %d\n",
_celObj->_width,
diff --git a/engines/sci/graphics/screen_item32.h b/engines/sci/graphics/screen_item32.h
index 009b608f18..c2c4e43358 100644
--- a/engines/sci/graphics/screen_item32.h
+++ b/engines/sci/graphics/screen_item32.h
@@ -61,6 +61,13 @@ private:
*/
static uint16 _nextObjectId;
+ /**
+ * A serial used to identify the creation order of
+ * screen items, to ensure a stable sort order for
+ * screen items with identical priorities and z-indexes.
+ */
+ static uint32 _nextCreationId;
+
public:
/**
* The parent plane of this screen item.
@@ -120,6 +127,13 @@ private:
public:
/**
+ * The creation order number, which ensures a stable
+ * sort when screen items with identical priorities and
+ * z-indexes are added to the screen item list.
+ */
+ uint32 _creationId;
+
+ /**
* A descriptor for the cel object represented by the
* screen item.
*/
@@ -242,7 +256,26 @@ public:
}
if (_position.y + _z == other._position.y + other._z) {
- return _object < other._object;
+ // SSCI's last resort comparison here is to compare the _object
+ // IDs, but this is wrong and randomly breaks (at least):
+ //
+ // (1) the death dialog at the end of Phant1, where the ID of
+ // the text is often higher than the ID of the border;
+ // (2) text-based buttons and dialogues in Hoyle5, where the ID
+ // of the text is often lower than the ID of the
+ // button/dialogue background.
+ //
+ // This occurs because object IDs (in both ScummVM and SSCI) are
+ // reused, so objects created later may receive a lower ID,
+ // which makes them sort lower when the programmer intended them
+ // to sort higher.
+ //
+ // To fix this problem, we give each ScreenItem a monotonically
+ // increasing insertion ID at construction time, and compare
+ // these insertion IDs instead. They are more stable and cause
+ // objects with identical priority and z-index to be rendered in
+ // the order that they were created.
+ return _creationId < other._creationId;
}
}
@@ -260,7 +293,9 @@ public:
}
if (_position.y + _z == other._position.y + other._z) {
- return _object > other._object;
+ // This is different than SSCI; see ScreenItem::operator< for an
+ // explanation
+ return _creationId > other._creationId;
}
}
diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp
index 7375fdeffd..181dabc9a8 100644
--- a/engines/sci/graphics/text32.cpp
+++ b/engines/sci/graphics/text32.cpp
@@ -505,12 +505,12 @@ int16 GfxText32::getTextWidth(const uint index, uint length) const {
if (length > 0 && currentChar == 'f') {
GuiResourceId fontId = 0;
- do {
+ while (length > 0 && *text >= '0' && *text <= '9') {
currentChar = *text++;
--length;
fontId = fontId * 10 + currentChar - '0';
- } while (length > 0 && *text >= '0' && *text <= '9');
+ }
if (length > 0) {
font = _cache->getFont(fontId);
diff --git a/engines/sci/graphics/transitions32.cpp b/engines/sci/graphics/transitions32.cpp
index bad0185179..bc2825ba77 100644
--- a/engines/sci/graphics/transitions32.cpp
+++ b/engines/sci/graphics/transitions32.cpp
@@ -41,8 +41,7 @@ static int16 divisionsDefaults[2][16] = {
};
GfxTransitions32::GfxTransitions32(SegManager *segMan) :
- _segMan(segMan),
- _throttleState(0) {
+ _segMan(segMan) {
for (int i = 0; i < 236; i += 2) {
_styleRanges[i] = 0;
_styleRanges[i + 1] = -1;
@@ -67,17 +66,8 @@ GfxTransitions32::~GfxTransitions32() {
_scrolls.clear();
}
-void GfxTransitions32::throttle() {
- uint8 throttleTime;
- if (_throttleState == 2) {
- throttleTime = 34;
- _throttleState = 0;
- } else {
- throttleTime = 33;
- ++_throttleState;
- }
-
- g_sci->getEngineState()->speedThrottler(throttleTime);
+void GfxTransitions32::throttle(const uint32 ms) {
+ g_sci->getEngineState()->speedThrottler(ms);
g_sci->getEngineState()->_throttleTrigger = true;
}
@@ -329,16 +319,20 @@ void GfxTransitions32::kernelSetShowStyle(const uint16 argc, const reg_t planeOb
if (createNewEntry) {
if (getSciVersion() <= SCI_VERSION_2_1_EARLY) {
switch (entry->type) {
+ case kShowStyleWipeLeft:
+ case kShowStyleWipeRight:
+ configure21EarlyHorizontalWipe(*entry, priority);
+ break;
case kShowStyleIrisOut:
case kShowStyleIrisIn:
configure21EarlyIris(*entry, priority);
- break;
+ break;
case kShowStyleDissolve:
configure21EarlyDissolve(*entry, priority, plane->_gameRect);
- break;
+ break;
default:
// do nothing
- break;
+ break;
}
}
@@ -387,6 +381,8 @@ ShowStyleList::iterator GfxTransitions32::deleteShowStyle(const ShowStyleList::i
g_sci->_gfxFrameout->deleteScreenItem(*showStyle->bitmapScreenItem);
}
break;
+ case kShowStyleWipeLeft:
+ case kShowStyleWipeRight:
case kShowStyleIrisOut:
case kShowStyleIrisIn:
if (getSciVersion() <= SCI_VERSION_2_1_EARLY) {
@@ -416,6 +412,33 @@ ShowStyleList::iterator GfxTransitions32::deleteShowStyle(const ShowStyleList::i
return _showStyles.erase(showStyle);
}
+void GfxTransitions32::configure21EarlyHorizontalWipe(PlaneShowStyle &showStyle, const int16 priority) {
+ showStyle.numEdges = 1;
+ const int divisions = showStyle.divisions;
+ showStyle.screenItems.reserve(divisions);
+
+ CelInfo32 celInfo;
+ celInfo.type = kCelTypeColor;
+ celInfo.color = showStyle.color;
+
+ for (int i = 0; i < divisions; ++i) {
+ Common::Rect rect;
+ rect.left = showStyle.width * i / divisions;
+ rect.top = 0;
+ rect.right = showStyle.width * (i + 1) / divisions;
+ rect.bottom = showStyle.height;
+ showStyle.screenItems.push_back(new ScreenItem(showStyle.plane, celInfo, rect));
+ showStyle.screenItems.back()->_priority = priority;
+ showStyle.screenItems.back()->_fixedPriority = true;
+ }
+
+ if (showStyle.fadeUp) {
+ for (int i = 0; i < divisions; ++i) {
+ g_sci->_gfxFrameout->addScreenItem(*showStyle.screenItems[i]);
+ }
+ }
+}
+
void GfxTransitions32::configure21EarlyIris(PlaneShowStyle &showStyle, const int16 priority) {
showStyle.numEdges = 4;
const int numScreenItems = showStyle.numEdges * showStyle.divisions;
@@ -516,13 +539,23 @@ bool GfxTransitions32::processShowStyle(PlaneShowStyle &showStyle, uint32 now) {
case kShowStyleHShutterIn:
case kShowStyleVShutterOut:
case kShowStyleVShutterIn:
- case kShowStyleWipeLeft:
- case kShowStyleWipeRight:
case kShowStyleWipeUp:
case kShowStyleWipeDown:
case kShowStyleDissolveNoMorph:
case kShowStyleMorph:
return processMorph(showStyle);
+ case kShowStyleWipeLeft:
+ if (getSciVersion() > SCI_VERSION_2_1_EARLY) {
+ return processMorph(showStyle);
+ } else {
+ return processWipe(-1, showStyle);
+ }
+ case kShowStyleWipeRight:
+ if (getSciVersion() > SCI_VERSION_2_1_EARLY) {
+ return processMorph(showStyle);
+ } else {
+ return processWipe(1, showStyle);
+ }
case kShowStyleDissolve:
if (getSciVersion() > SCI_VERSION_2_1_EARLY) {
return processMorph(showStyle);
@@ -618,11 +651,15 @@ void GfxTransitions32::processVShutterIn(PlaneShowStyle &showStyle) {
}
void GfxTransitions32::processWipeLeft(PlaneShowStyle &showStyle) {
- error("WipeLeft is not known to be used by any game. Please submit a bug report with details about the game you were playing and what you were doing that triggered this error. Thanks!");
+ if (getSciVersion() > SCI_VERSION_2_1_EARLY) {
+ error("WipeLeft is not known to be used by any SCI2.1mid+ game. Please submit a bug report with details about the game you were playing and what you were doing that triggered this error. Thanks!");
+ }
}
void GfxTransitions32::processWipeRight(PlaneShowStyle &showStyle) {
- error("WipeRight is not known to be used by any game. Please submit a bug report with details about the game you were playing and what you were doing that triggered this error. Thanks!");
+ if (getSciVersion() > SCI_VERSION_2_1_EARLY) {
+ error("WipeRight is not known to be used by any SCI2.1mid+ game. Please submit a bug report with details about the game you were playing and what you were doing that triggered this error. Thanks!");
+ }
}
void GfxTransitions32::processWipeUp(PlaneShowStyle &showStyle) {
@@ -936,7 +973,7 @@ void GfxTransitions32::processScrolls() {
}
}
- throttle();
+ throttle(33);
}
void GfxTransitions32::kernelSetScroll(const reg_t planeId, const int16 deltaX, const int16 deltaY, const GuiResourceId pictureId, const bool animate, const bool mirrorX) {
@@ -1005,7 +1042,7 @@ void GfxTransitions32::kernelSetScroll(const reg_t planeId, const int16 deltaX,
while (!finished && !g_engine->shouldQuit()) {
finished = processScroll(*scroll);
g_sci->_gfxFrameout->frameOut(true);
- throttle();
+ throttle(33);
}
}
diff --git a/engines/sci/graphics/transitions32.h b/engines/sci/graphics/transitions32.h
index 12e0d64ec7..685012fada 100644
--- a/engines/sci/graphics/transitions32.h
+++ b/engines/sci/graphics/transitions32.h
@@ -239,11 +239,20 @@ private:
SegManager *_segMan;
/**
- * Throttles transition playback to prevent transitions from being instant
- * on fast computers.
- */
- void throttle();
- int8 _throttleState;
+ * Throttles transition playback to prevent transitions from being
+ * instantaneous on modern computers.
+ *
+ * kSetShowStyle transitions are throttled at 10ms intervals, under the
+ * assumption that the default fade transition of 101 divisions was designed
+ * to finish in one second. Empirically, this seems to roughly match the
+ * speed of DOSBox, and feels reasonable.
+ *
+ * Transitions using kSetScroll (used in the LSL6hires intro) need to be
+ * slower, so they get throttled at 33ms instead of 10ms. This value was
+ * chosen by gut feel, as these scrolling transitions are instantaneous in
+ * DOSBox.
+ */
+ void throttle(const uint32 ms = 10);
void clearShowRects();
void addShowRect(const Common::Rect &rect);
@@ -322,6 +331,12 @@ private:
ShowStyleList::iterator deleteShowStyle(const ShowStyleList::iterator &showStyle);
/**
+ * Initializes the given PlaneShowStyle for a
+ * horizontal wipe effect for SCI2 to 2.1early.
+ */
+ void configure21EarlyHorizontalWipe(PlaneShowStyle &showStyle, const int16 priority);
+
+ /**
* Initializes the given PlaneShowStyle for an
* iris effect for SCI2 to 2.1early.
*/
diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp
index 6eae4cca87..f4eb2c2da0 100644
--- a/engines/sci/graphics/video32.cpp
+++ b/engines/sci/graphics/video32.cpp
@@ -39,6 +39,7 @@
#include "sci/graphics/palette32.h" // for GfxPalette32
#include "sci/graphics/plane32.h" // for Plane, PlanePictureCodes::kP...
#include "sci/graphics/screen_item32.h" // for ScaleInfo, ScreenItem, Scale...
+#include "sci/resource.h" // for ResourceManager, ResourceId,...
#include "sci/sci.h" // for SciEngine, g_sci, getSciVersion
#include "sci/sound/audio32.h" // for Audio32
#include "sci/video/seq_decoder.h" // for SEQDecoder
@@ -71,12 +72,13 @@ void SEQPlayer::play(const Common::String &fileName, const int16 numTicks, const
// mechanism that is very similar to that used by the VMD player, which
// allows the SEQ to be drawn into a bitmap ScreenItem and displayed using
// the normal graphics system.
- SciBitmap &bitmap = *_segMan->allocateBitmap(&_bitmap, _decoder->getWidth(), _decoder->getHeight(), kDefaultSkipColor, 0, 0, kLowResX, kLowResY, 0, false, false);
+ reg_t bitmapId;
+ SciBitmap &bitmap = *_segMan->allocateBitmap(&bitmapId, _decoder->getWidth(), _decoder->getHeight(), kDefaultSkipColor, 0, 0, kLowResX, kLowResY, 0, false, false);
bitmap.getBuffer().fillRect(Common::Rect(_decoder->getWidth(), _decoder->getHeight()), 0);
CelInfo32 celInfo;
celInfo.type = kCelTypeMem;
- celInfo.bitmap = _bitmap;
+ celInfo.bitmap = bitmapId;
_plane = new Plane(Common::Rect(kLowResX, kLowResY), kPlanePicColored);
g_sci->_gfxFrameout->addPlane(*_plane);
@@ -94,20 +96,19 @@ void SEQPlayer::play(const Common::String &fileName, const int16 numTicks, const
while (!g_engine->shouldQuit() && !_decoder->endOfVideo()) {
g_sci->sleep(_decoder->getTimeToNextFrame());
- renderFrame();
+ renderFrame(bitmap);
}
- _segMan->freeBitmap(_screenItem->_celInfo.bitmap);
+ _segMan->freeBitmap(bitmapId);
g_sci->_gfxFrameout->deletePlane(*_plane);
g_sci->_gfxFrameout->frameOut(true);
_screenItem = nullptr;
_plane = nullptr;
}
-void SEQPlayer::renderFrame() const {
+void SEQPlayer::renderFrame(SciBitmap &bitmap) const {
const Graphics::Surface *surface = _decoder->decodeNextFrame();
- SciBitmap &bitmap = *_segMan->lookupBitmap(_bitmap);
bitmap.getBuffer().copyRectToSurface(*surface, 0, 0, Common::Rect(surface->w, surface->h));
const bool dirtyPalette = _decoder->hasDirtyPalette();
@@ -139,6 +140,7 @@ AVIPlayer::AVIPlayer(SegManager *segMan, EventManager *eventMan) :
_scaleBuffer(nullptr),
_plane(nullptr),
_screenItem(nullptr),
+ _bitmap(NULL_REG),
_status(kAVINotOpen) {}
AVIPlayer::~AVIPlayer() {
@@ -326,6 +328,10 @@ AVIPlayer::IOStatus AVIPlayer::close() {
_decoder->close();
_status = kAVINotOpen;
+ if (_bitmap != NULL_REG) {
+ _segMan->freeBitmap(_bitmap);
+ _bitmap = NULL_REG;
+ }
g_sci->_gfxFrameout->deletePlane(*_plane);
_plane = nullptr;
_screenItem = nullptr;
@@ -490,6 +496,7 @@ VMDPlayer::VMDPlayer(SegManager *segMan, EventManager *eventMan) :
_isOpen(false),
_isInitialized(false),
+ _bundledVmd(nullptr),
_yieldFrame(0),
_yieldInterval(0),
_lastYieldedFrameNo(0),
@@ -534,15 +541,29 @@ VMDPlayer::IOStatus VMDPlayer::open(const Common::String &fileName, const OpenFl
g_sci->_audio32->stop(kAllChannels);
}
- if (_decoder->loadFile(fileName)) {
+ Resource *bundledVmd = g_sci->getResMan()->findResource(ResourceId(kResourceTypeVMD, fileName.asUint64()), true);
+
+ if (bundledVmd != nullptr) {
+ Common::SeekableReadStream *stream = bundledVmd->makeStream();
+ if (_decoder->loadStream(stream)) {
+ _bundledVmd = bundledVmd;
+ _isOpen = true;
+ } else {
+ delete stream;
+ g_sci->getResMan()->unlockResource(bundledVmd);
+ }
+ } else if (_decoder->loadFile(fileName)) {
+ _isOpen = true;
+ }
+
+ if (_isOpen) {
if (flags & kOpenFlagMute) {
_decoder->setVolume(0);
}
- _isOpen = true;
return kIOSuccess;
- } else {
- return kIOError;
}
+
+ return kIOError;
}
void VMDPlayer::init(const int16 x, const int16 y, const PlayFlags flags, const int16 boostPercent, const int16 boostStartColor, const int16 boostEndColor) {
@@ -569,9 +590,15 @@ VMDPlayer::IOStatus VMDPlayer::close() {
_isInitialized = false;
_ignorePalettes = false;
+ if (_bundledVmd) {
+ g_sci->getResMan()->unlockResource(_bundledVmd);
+ _bundledVmd = nullptr;
+ }
+
+ _segMan->freeBitmap(_screenItem->_celInfo.bitmap);
+
if (!_planeIsOwned && _screenItem != nullptr) {
g_sci->_gfxFrameout->deleteScreenItem(*_screenItem);
- _segMan->freeBitmap(_screenItem->_celInfo.bitmap);
_screenItem = nullptr;
} else if (_plane != nullptr) {
g_sci->_gfxFrameout->deletePlane(*_plane);
diff --git a/engines/sci/graphics/video32.h b/engines/sci/graphics/video32.h
index 4fc627e674..5ed8fd954a 100644
--- a/engines/sci/graphics/video32.h
+++ b/engines/sci/graphics/video32.h
@@ -73,14 +73,9 @@ private:
ScreenItem *_screenItem;
/**
- * The bitmap used to render video output.
- */
- reg_t _bitmap;
-
- /**
* Renders a single frame of video.
*/
- void renderFrame() const;
+ void renderFrame(SciBitmap &bitmap) const;
};
#pragma mark -
@@ -326,6 +321,13 @@ private:
bool _isInitialized;
/**
+ * The Resource object for VMDs that are read out
+ * of a resource bundle instead of being streamed
+ * from the filesystem.
+ */
+ Resource *_bundledVmd;
+
+ /**
* For VMDs played with the `kEventFlagToFrame` flag,
* the target frame for yielding back to the SCI VM.
*/
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 364ea2a0ac..77c3d4e637 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -1507,7 +1507,7 @@ void ResourceManager::readResourcePatchesBase36() {
// The S/T prefixes often conflict with non-patch files and generate
// spurious warnings about invalid patches
- if (name.hasSuffix(".DLL") || name.hasSuffix(".EXE") || name.hasSuffix(".TXT")) {
+ if (name.hasSuffix(".DLL") || name.hasSuffix(".EXE") || name.hasSuffix(".TXT") || name.hasSuffix(".OLD")) {
continue;
}
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index e601a1c434..5589129553 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -372,7 +372,7 @@ public:
void setAudioLanguage(int language);
int getAudioLanguage() const;
- void changeAudioDirectory(Common::String path);
+ void changeAudioDirectory(const Common::String &path);
bool isGMTrackIncluded();
bool isSci11Mac() const { return _volVersion == kResVersionSci11Mac; }
ViewType getViewType() const { return _viewType; }
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index 7757445bc1..f17a684cc9 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -964,33 +964,50 @@ bool ResourceManager::addAudioSources() {
return true;
}
-void ResourceManager::changeAudioDirectory(Common::String path) {
- // TODO: This implementation is broken.
- return;
-
-#if 0
- // Remove all of the audio map resource sources, as well as the audio resource sources
- for (Common::List<ResourceSource *>::iterator it = _sources.begin(); it != _sources.end();) {
- ResourceSource *source = *it;
- ResSourceType sourceType = source->getSourceType();
-
- // Remove the resource source, if it's an audio map or an audio file
- if (sourceType == kSourceIntMap || sourceType == kSourceAudioVolume) {
- // Don't remove 65535.map (the SFX map) or resource.sfx
- if (source->_volumeNumber == 65535 || source->getLocationName() == "RESOURCE.SFX") {
- ++it;
+void ResourceManager::changeAudioDirectory(const Common::String &path) {
+ // Resources must be cleared before ResourceSources because the destructor
+ // of a Resource accesses its own ResourceSource
+ ResourceMap::iterator resIt = _resMap.begin();
+ while (resIt != _resMap.end()) {
+ Resource *resource = resIt->_value;
+ ResourceType type = resource->getType();
+ if (type == kResourceTypeMap ||
+ type == kResourceTypeAudio36 ||
+ type == kResourceTypeSync36) {
+
+ if (type == kResourceTypeMap && resource->getNumber() == 65535) {
+ ++resIt;
continue;
}
- // erase() will move the iterator to the next element
- it = _sources.erase(it);
+ if (resource->_status == kResStatusLocked) {
+ resource->_lockers = 1;
+ unlockResource(resource);
+ }
+ if (resource->_status == kResStatusEnqueued) {
+ removeFromLRU(resource);
+ }
+ delete resource;
+ _resMap.erase(resIt);
+ }
+
+ ++resIt;
+ }
+
+ Common::List<ResourceSource *>::iterator sourceIt = _sources.begin();
+ while (sourceIt != _sources.end()) {
+ ResourceSource *source = *sourceIt;
+ ResSourceType sourceType = source->getSourceType();
+ if ((sourceType == kSourceIntMap && source->_volumeNumber != 65535) ||
+ (sourceType == kSourceAudioVolume && source->getLocationName() != "RESOURCE.SFX")) {
+
+ sourceIt = _sources.erase(sourceIt);
delete source;
} else {
- ++it;
+ ++sourceIt;
}
}
- // Now, readd the audio resource sources
Common::String mapName = "MAP";
Common::String audioResourceName = "RESOURCE.AUD";
if (!path.empty()) {
@@ -1002,16 +1019,14 @@ void ResourceManager::changeAudioDirectory(Common::String path) {
Common::List<ResourceId>::iterator it;
for (it = resources.begin(); it != resources.end(); ++it) {
// Don't readd 65535.map or resource.sfx
- if ((it->getNumber() == 65535))
+ if (it->getNumber() == 65535)
continue;
ResourceSource *src = addSource(new IntMapResourceSource(mapName, 0, it->getNumber()));
addSource(new AudioVolumeResourceSource(this, audioResourceName, src, 0));
}
- // Rescan the newly added resources
scanNewSources();
-#endif
}
} // End of namespace Sci
diff --git a/engines/sci/sci.h b/engines/sci/sci.h
index a36ae001f4..b3ec3259a6 100644
--- a/engines/sci/sci.h
+++ b/engines/sci/sci.h
@@ -226,7 +226,7 @@ enum SciVersion {
SCI_VERSION_1_1, // Dr. Brain 2, EcoQuest 1 CD, EcoQuest 2, KQ6, QFG3, SQ4CD, XMAS 1992 and many more
SCI_VERSION_2, // GK1, PQ4 floppy, QFG4 floppy
SCI_VERSION_2_1_EARLY, // GK2 demo, KQ7 1.4/1.51, LSL6 hires, PQ4CD, QFG4CD
- SCI_VERSION_2_1_MIDDLE, // GK2, KQ7 2.00b, MUMG Deluxe, Phantasmagoria 1, PQ:SWAT, Shivers 1, SQ6, Torin
+ SCI_VERSION_2_1_MIDDLE, // GK2, Hoyle 5, KQ7 2.00b, MUMG Deluxe, Phantasmagoria 1, PQ:SWAT, Shivers 1, SQ6, Torin
SCI_VERSION_2_1_LATE, // demos of LSL7, Lighthouse, RAMA
SCI_VERSION_3 // LSL7, Lighthouse, RAMA, Phantasmagoria 2
};
diff --git a/engines/sci/sound/audio32.cpp b/engines/sci/sound/audio32.cpp
index d5a7ae14b8..ca2402c859 100644
--- a/engines/sci/sound/audio32.cpp
+++ b/engines/sci/sound/audio32.cpp
@@ -159,9 +159,7 @@ int Audio32::writeAudioInternal(Audio::AudioStream *const sourceStream, Audio::R
// mono, in which case we need to request half
// as many samples from the mono stream and let
// the converter double them for stereo output
- if (!sourceStream->isStereo()) {
- samplesToRead >>= 1;
- }
+ samplesToRead >>= 1;
int samplesWritten = 0;
@@ -182,12 +180,10 @@ int Audio32::writeAudioInternal(Audio::AudioStream *const sourceStream, Audio::R
samplesToRead -= loopSamplesWritten;
samplesWritten += loopSamplesWritten;
- targetBuffer += loopSamplesWritten << 1;
+ targetBuffer += loopSamplesWritten << (sourceStream->isStereo() ? 0 : 1);
} while (loop && samplesToRead > 0);
- if (!sourceStream->isStereo()) {
- samplesWritten <<= 1;
- }
+ samplesWritten <<= 1;
return samplesWritten;
}
diff --git a/engines/sci/sound/decoders/sol.cpp b/engines/sci/sound/decoders/sol.cpp
index ee1ba35406..2dbe98c9e0 100644
--- a/engines/sci/sound/decoders/sol.cpp
+++ b/engines/sci/sound/decoders/sol.cpp
@@ -50,32 +50,42 @@ static const uint16 tableDPCM16[128] = {
static const byte tableDPCM8[8] = { 0, 1, 2, 3, 6, 10, 15, 21 };
/**
+ * Decompresses one channel of 16-bit DPCM compressed audio.
+ */
+static void deDPCM16Channel(int16 *out, int16 &sample, uint8 delta) {
+ if (delta & 0x80) {
+ sample -= tableDPCM16[delta & 0x7f];
+ } else {
+ sample += tableDPCM16[delta];
+ }
+ sample = CLIP<int16>(sample, -32768, 32767);
+ *out = TO_LE_16(sample);
+}
+
+/**
* Decompresses 16-bit DPCM compressed audio. Each byte read
* outputs one sample into the decompression buffer.
*/
-static void deDPCM16(int16 *out, Common::ReadStream &audioStream, const uint32 numBytes, int16 &sample) {
+static void deDPCM16Mono(int16 *out, Common::ReadStream &audioStream, const uint32 numBytes, int16 &sample) {
for (uint32 i = 0; i < numBytes; ++i) {
const uint8 delta = audioStream.readByte();
- if (delta & 0x80) {
- sample -= tableDPCM16[delta & 0x7f];
- } else {
- sample += tableDPCM16[delta];
- }
- sample = CLIP<int16>(sample, -32768, 32767);
- *out++ = TO_LE_16(sample);
+ deDPCM16Channel(out++, sample, delta);
}
}
-void deDPCM16(int16 *out, const byte *in, const uint32 numBytes, int16 &sample) {
+// Used by Robot
+void deDPCM16Mono(int16 *out, const byte *in, const uint32 numBytes, int16 &sample) {
for (uint32 i = 0; i < numBytes; ++i) {
const uint8 delta = *in++;
- if (delta & 0x80) {
- sample -= tableDPCM16[delta & 0x7f];
- } else {
- sample += tableDPCM16[delta];
- }
- sample = CLIP<int16>(sample, -32768, 32767);
- *out++ = TO_LE_16(sample);
+ deDPCM16Channel(out++, sample, delta);
+ }
+}
+
+static void deDPCM16Stereo(int16 *out, Common::ReadStream &audioStream, const uint32 numBytes, int16 &sampleL, int16 &sampleR) {
+ assert((numBytes % 2) == 0);
+ for (uint32 i = 0; i < numBytes / 2; ++i) {
+ deDPCM16Channel(out++, sampleL, audioStream.readByte());
+ deDPCM16Channel(out++, sampleR, audioStream.readByte());
}
}
@@ -98,7 +108,7 @@ static void deDPCM8Nibble(int16 *out, uint8 &sample, uint8 delta) {
* Decompresses 8-bit DPCM compressed audio. Each byte read
* outputs two samples into the decompression buffer.
*/
-static void deDPCM8(int16 *out, Common::ReadStream &audioStream, uint32 numBytes, uint8 &sample) {
+static void deDPCM8Mono(int16 *out, Common::ReadStream &audioStream, uint32 numBytes, uint8 &sample) {
for (uint32 i = 0; i < numBytes; ++i) {
const uint8 delta = audioStream.readByte();
deDPCM8Nibble(out++, sample, delta >> 4);
@@ -106,6 +116,14 @@ static void deDPCM8(int16 *out, Common::ReadStream &audioStream, uint32 numBytes
}
}
+static void deDPCM8Stereo(int16 *out, Common::ReadStream &audioStream, uint32 numBytes, uint8 &sampleL, uint8 &sampleR) {
+ for (uint32 i = 0; i < numBytes; ++i) {
+ const uint8 delta = audioStream.readByte();
+ deDPCM8Nibble(out++, sampleL, delta >> 4);
+ deDPCM8Nibble(out++, sampleR, delta & 0xf);
+ }
+}
+
# pragma mark -
template<bool STEREO, bool S16BIT>
@@ -120,9 +138,9 @@ SOLStream<STEREO, S16BIT>::SOLStream(Common::SeekableReadStream *stream, const D
// carried values for each channel separately. See
// 60900.aud from Lighthouse for an example stereo file
if (S16BIT) {
- _dpcmCarry16 = 0;
+ _dpcmCarry16.l = _dpcmCarry16.r = 0;
} else {
- _dpcmCarry8 = 0x80;
+ _dpcmCarry8.l = _dpcmCarry8.r = 0x80;
}
const uint8 compressionRatio = 2;
@@ -143,9 +161,9 @@ bool SOLStream<STEREO, S16BIT>::seek(const Audio::Timestamp &where) {
}
if (S16BIT) {
- _dpcmCarry16 = 0;
+ _dpcmCarry16.l = _dpcmCarry16.r = 0;
} else {
- _dpcmCarry8 = 0x80;
+ _dpcmCarry8.l = _dpcmCarry8.r = 0x80;
}
return _stream->seek(_dataOffset, SEEK_SET);
@@ -171,9 +189,17 @@ int SOLStream<STEREO, S16BIT>::readBuffer(int16 *buffer, const int numSamples) {
}
if (S16BIT) {
- deDPCM16(buffer, *_stream, bytesToRead, _dpcmCarry16);
+ if (STEREO) {
+ deDPCM16Stereo(buffer, *_stream, bytesToRead, _dpcmCarry16.l, _dpcmCarry16.r);
+ } else {
+ deDPCM16Mono(buffer, *_stream, bytesToRead, _dpcmCarry16.l);
+ }
} else {
- deDPCM8(buffer, *_stream, bytesToRead, _dpcmCarry8);
+ if (STEREO) {
+ deDPCM8Stereo(buffer, *_stream, bytesToRead, _dpcmCarry8.l, _dpcmCarry8.r);
+ } else {
+ deDPCM8Mono(buffer, *_stream, bytesToRead, _dpcmCarry8.l);
+ }
}
const int samplesRead = bytesToRead * samplesPerByte;
diff --git a/engines/sci/sound/decoders/sol.h b/engines/sci/sound/decoders/sol.h
index 1046d0b213..31914c0926 100644
--- a/engines/sci/sound/decoders/sol.h
+++ b/engines/sci/sound/decoders/sol.h
@@ -61,8 +61,8 @@ private:
* The last sample from the previous DPCM decode.
*/
union {
- int16 _dpcmCarry16;
- uint8 _dpcmCarry8;
+ struct { int16 l; int16 r; } _dpcmCarry16;
+ struct { uint8 l; uint8 r; } _dpcmCarry8;
};
/**
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 487d30e840..488bd0360c 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -127,7 +127,8 @@ void SciMusic::init() {
_pMidiDrv->setTimerCallback(this, &miditimerCallback);
_dwTempo = _pMidiDrv->getBaseTempo();
} else {
- if (g_sci->getGameId() == GID_FUNSEEKER) {
+ if (g_sci->getGameId() == GID_FUNSEEKER ||
+ (g_sci->getGameId() == GID_GK2 && g_sci->isDemo())) {
// HACK: The Fun Seeker's Guide demo doesn't have patch 3 and the version
// of the Adlib driver (adl.drv) that it includes is unsupported. That demo
// doesn't have any sound anyway, so this shouldn't be fatal.
diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp
index 446b986581..0cb4831159 100644
--- a/engines/sci/video/robot_decoder.cpp
+++ b/engines/sci/video/robot_decoder.cpp
@@ -43,7 +43,7 @@ namespace Sci {
#pragma mark RobotAudioStream
-extern void deDPCM16(int16 *out, const byte *in, const uint32 numBytes, int16 &sample);
+extern void deDPCM16Mono(int16 *out, const byte *in, const uint32 numBytes, int16 &sample);
RobotAudioStream::RobotAudioStream(const int32 bufferSize) :
_loopBuffer((byte *)malloc(bufferSize)),
@@ -181,7 +181,7 @@ void RobotAudioStream::fillRobotBuffer(const RobotAudioPacket &packet, const int
}
int16 carry = 0;
- deDPCM16((int16 *)_decompressionBuffer, packet.data, packet.dataSize, carry);
+ deDPCM16Mono((int16 *)_decompressionBuffer, packet.data, packet.dataSize, carry);
_decompressionBufferPosition = packet.position;
}
@@ -1436,6 +1436,14 @@ void RobotDecoder::doVersion5(const bool shouldSubmitAudio) {
_screenItemList[i] = nullptr;
}
}
+
+ if (screenItemCount < oldScreenItemCount) {
+ _screenItemList.resize(screenItemCount);
+ _screenItemX.resize(screenItemCount);
+ _screenItemY.resize(screenItemCount);
+ _originalScreenItemX.resize(screenItemCount);
+ _originalScreenItemY.resize(screenItemCount);
+ }
}
void RobotDecoder::createCels5(const byte *rawVideoData, const int16 numCels, const bool usePalette) {
diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp
index c2ca557ec2..ab244c1f84 100644
--- a/engines/sky/compact.cpp
+++ b/engines/sky/compact.cpp
@@ -126,11 +126,11 @@ static const uint32 turnTableOffsets[] = {
SkyCompact::SkyCompact() {
_cptFile = new Common::File();
- if (!_cptFile->open("sky.cpt")) {
- GUI::MessageDialog dialog(_("Unable to find \"sky.cpt\" file!\n"
- "Please download it from www.scummvm.org"), _("OK"), NULL);
- dialog.runModal();
- error("Unable to find \"sky.cpt\" file\nPlease download it from www.scummvm.org");
+ Common::String filename = "sky.cpt";
+ if (!_cptFile->open(filename.c_str())) {
+ Common::String msg = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
+ GUIErrorMessage(msg);
+ error("%s", msg.c_str());
}
uint16 fileVersion = _cptFile->readUint16LE();
@@ -138,7 +138,7 @@ SkyCompact::SkyCompact() {
error("unknown \"sky.cpt\" version");
if (SKY_CPT_SIZE != _cptFile->size()) {
- GUI::MessageDialog dialog(_("The \"sky.cpt\" file has an incorrect size.\nPlease (re)download it from www.scummvm.org"), _("OK"), NULL);
+ GUI::MessageDialog dialog(_("The \"sky.cpt\" engine data file has an incorrect size."), _("OK"), NULL);
dialog.runModal();
error("Incorrect sky.cpt size (%d, expected: %d)", _cptFile->size(), SKY_CPT_SIZE);
}
diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp
index ad656ac8df..207db3b497 100644
--- a/engines/sky/logic.cpp
+++ b/engines/sky/logic.cpp
@@ -245,7 +245,7 @@ void Logic::arAnim() {
// fine because the later collision will almost certainly
// take longer to clear than the earlier one.
- if (collide(_skyCompact->fetchCpt(_compact->waitingFor))) {
+ if (isCollision(_skyCompact->fetchCpt(_compact->waitingFor))) {
stopAndWait();
return;
}
@@ -280,7 +280,7 @@ void Logic::arAnim() {
if (cpt->screen != _compact->screen) // is it on our screen?
continue;
- if (collide(cpt)) { // check for a hit
+ if (isCollision(cpt)) { // check for a hit
// ok, we've hit a mega
// is it moving... or something else?
@@ -627,7 +627,7 @@ void Logic::stopped() {
Compact *cpt = _skyCompact->fetchCpt(_compact->waitingFor);
if (cpt)
- if (!cpt->mood && collide(cpt))
+ if (!cpt->mood && isCollision(cpt))
return;
// we are free, continue processing the script
@@ -720,88 +720,56 @@ void Logic::simpleAnim() {
logicScript();
}
-bool Logic::collide(Compact *cpt) {
- MegaSet *m1 = SkyCompact::getMegaSet(_compact);
- MegaSet *m2 = SkyCompact::getMegaSet(cpt);
+/** Checks if the currently processed object in _compact collides
+ with the one given as parameter */
+bool Logic::isCollision(Compact *other) {
+ MegaSet *thisMegaSet = SkyCompact::getMegaSet(_compact);
+ MegaSet *otherMegaSet = SkyCompact::getMegaSet(other);
// target's base coordinates
- uint16 x = cpt->xcood & 0xfff8;
- uint16 y = cpt->ycood & 0xfff8;
-
- // The collision is direction dependent
- switch (_compact->dir) {
- case 0: // looking up
- x -= m1->colOffset; // compensate for inner x offsets
- x += m2->colOffset;
-
- if ((x + m2->colWidth) < _compact->xcood) // their rightmost
- return false;
-
- x -= m1->colWidth; // our left, their right
- if (x >= _compact->xcood)
- return false;
-
- y += 8; // bring them down a line
- if (y == _compact->ycood)
- return true;
-
- y += 8; // bring them down a line
- if (y == _compact->ycood)
- return true;
-
- return false;
- case 1: // looking down
- x -= m1->colOffset; // compensate for inner x offsets
- x += m2->colOffset;
-
- if ((x + m2->colWidth) < _compact->xcood) // their rightmoast
- return false;
-
- x -= m1->colWidth; // our left, their right
- if (x >= _compact->xcood)
- return false;
-
- y -= 8; // bring them up a line
- if (y == _compact->ycood)
- return true;
-
- y -= 8; // bring them up a line
- if (y == _compact->ycood)
- return true;
-
- return false;
- case 2: // looking left
-
- if (y != _compact->ycood)
- return false;
-
- x += m2->lastChr;
- if (x == _compact->xcood)
- return true;
-
- x -= 8; // out another one
- if (x == _compact->xcood)
- return true;
-
- return false;
- case 3: // looking right
- case 4: // talking (not sure if this makes sense...)
-
- if (y != _compact->ycood)
- return false;
-
- x -= m1->lastChr; // last block
- if (x == _compact->xcood)
- return true;
+ uint16 otherX = other->xcood & ~7;
+ uint16 otherY = other->ycood & ~7;
+ if ((_compact->dir == UPY) || (_compact->dir == DOWNY)) { // If we're looking up or down...
+ otherX -= thisMegaSet->colOffset; // ...then compensate inner otherX offsets
+ otherX += otherMegaSet->colOffset;
+ }
- x -= 8; // out another block
- if (x != _compact->xcood)
+ if ((_compact->dir == UPY) || (_compact->dir == DOWNY)) {
+ // Check X coordinate, same for facing up or down
+ if (otherX + otherMegaSet->colWidth < _compact->xcood) // their rightmost
+ return false; // other is left of us
+
+ if (otherX - thisMegaSet->colWidth >= _compact->xcood) // our left, their right
+ return false; // other is right of us
+ // Check Y coordinate according to actual direction
+ if (_compact->dir == UPY) {
+ if (otherY + 8 == _compact->ycood)
+ return true;
+ if (otherY + 16 == _compact->ycood)
+ return true;
+ } else {
+ if (otherY - 8 == _compact->ycood)
+ return true;
+ if (otherY - 16 == _compact->ycood)
+ return true;
+ }
+ } else {
+ // Facing left, right (or talking, which probably never happens)
+ if (otherY != _compact->ycood)
return false;
-
- return true;
- default:
- error("Unknown Direction: %d", _compact->dir);
+ if (_compact->dir == LEFTY) { // looking left
+ if (otherX + otherMegaSet->lastChr == _compact->xcood)
+ return true;
+ if (otherX + otherMegaSet->lastChr - 8 == _compact->xcood)
+ return true;
+ } else {
+ if (otherX - thisMegaSet->lastChr == _compact->xcood)
+ return true;
+ if (otherX - thisMegaSet->lastChr - 8 == _compact->xcood)
+ return true;
+ }
}
+ return false;
}
void Logic::runGetOff() {
diff --git a/engines/sky/logic.h b/engines/sky/logic.h
index 8507fe7398..cd83e1a5f8 100644
--- a/engines/sky/logic.h
+++ b/engines/sky/logic.h
@@ -164,7 +164,7 @@ protected:
void push(uint32);
uint32 pop();
void checkModuleLoaded(uint16 moduleNo);
- bool collide(Compact *cpt);
+ bool isCollision(Compact *cpt);
void initScriptVariables();
void mainAnim();
void runGetOff();
diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp
index 3cf566a0e5..b7e0d558f1 100644
--- a/engines/teenagent/resources.cpp
+++ b/engines/teenagent/resources.cpp
@@ -91,9 +91,10 @@ void Resources::precomputeDialogOffsets() {
bool Resources::loadArchives(const ADGameDescription *gd) {
Common::File *dat_file = new Common::File();
- if (!dat_file->open("teenagent.dat")) {
+ Common::String filename = "teenagent.dat";
+ if (!dat_file->open(filename.c_str())) {
delete dat_file;
- Common::String errorMessage = _("You're missing the 'teenagent.dat' file. Get it from the ScummVM website");
+ Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
warning("%s", errorMessage.c_str());
GUIErrorMessage(errorMessage);
return false;
diff --git a/engines/titanic/carry/arm.cpp b/engines/titanic/carry/arm.cpp
index 1f77247e93..5105ea81b4 100644
--- a/engines/titanic/carry/arm.cpp
+++ b/engines/titanic/carry/arm.cpp
@@ -84,7 +84,7 @@ void CArm::load(SimpleFile *file) {
bool CArm::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
_field138 = 0;
- _fieldE0 = 1;
+ _canTake = true;
CString name = getName();
if (name == "Arm1") {
@@ -137,7 +137,7 @@ bool CArm::UseWithOtherMsg(CUseWithOtherMsg *msg) {
}
bool CArm::MouseDragStartMsg(CMouseDragStartMsg *msg) {
- if (!_fieldE0) {
+ if (!_canTake) {
CShowTextMsg textMsg(YOU_CANT_GET_THIS);
textMsg.execute("PET");
} else if (checkStartDragging(msg)) {
@@ -178,7 +178,7 @@ bool CArm::MaitreDHappyMsg(CMaitreDHappyMsg *msg) {
}
_field158 = 1;
- _fieldE0 = 1;
+ _canTake = true;
return true;
}
diff --git a/engines/titanic/carry/auditory_centre.cpp b/engines/titanic/carry/auditory_centre.cpp
index 0bda975a36..5d6fd1437e 100644
--- a/engines/titanic/carry/auditory_centre.cpp
+++ b/engines/titanic/carry/auditory_centre.cpp
@@ -39,7 +39,7 @@ void CAuditoryCentre::load(SimpleFile *file) {
}
bool CAuditoryCentre::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
- _fieldE0 = 1;
+ _canTake = true;
setVisible(true);
return true;
}
diff --git a/engines/titanic/carry/bowl_ear.cpp b/engines/titanic/carry/bowl_ear.cpp
index 852a77899a..ac28439de4 100644
--- a/engines/titanic/carry/bowl_ear.cpp
+++ b/engines/titanic/carry/bowl_ear.cpp
@@ -55,7 +55,7 @@ bool CBowlEar::ReplaceBowlAndNutsMsg(CReplaceBowlAndNutsMsg *msg) {
bool CBowlEar::NutPuzzleMsg(CNutPuzzleMsg *msg) {
if (msg->_value == "BowlUnlocked")
- _fieldE0 = 1;
+ _canTake = true;
return true;
}
diff --git a/engines/titanic/carry/bridge_piece.cpp b/engines/titanic/carry/bridge_piece.cpp
index 487ea32df6..f90f7cbd4d 100644
--- a/engines/titanic/carry/bridge_piece.cpp
+++ b/engines/titanic/carry/bridge_piece.cpp
@@ -77,7 +77,7 @@ bool CBridgePiece::UseWithOtherMsg(CUseWithOtherMsg *msg) {
} else if (name == "SeasonBridge") {
frameMsg._frameNumber = 3;
} else if (name == "BeamBridge") {
- frameMsg._frameNumber = 0;
+ frameMsg._frameNumber = 4;
}
frameMsg.execute(shipSetting);
diff --git a/engines/titanic/carry/carry.cpp b/engines/titanic/carry/carry.cpp
index 4f8df11260..f6403b18b9 100644
--- a/engines/titanic/carry/carry.cpp
+++ b/engines/titanic/carry/carry.cpp
@@ -44,7 +44,7 @@ BEGIN_MESSAGE_MAP(CCarry, CGameObject)
ON_MESSAGE(PassOnDragStartMsg)
END_MESSAGE_MAP()
-CCarry::CCarry() : CGameObject(), _fieldDC(0), _fieldE0(1),
+CCarry::CCarry() : CGameObject(), _fieldDC(0), _canTake(true),
_field100(0), _field104(0), _field108(0), _field10C(0),
_itemFrame(0), _enterFrame(0), _enterFrameSet(false), _visibleFrame(0),
_string1("None"),
@@ -59,7 +59,7 @@ void CCarry::save(SimpleFile *file, int indent) {
file->writePoint(_origPos, indent);
file->writeQuotedLine(_fullViewName, indent);
file->writeNumberLine(_fieldDC, indent);
- file->writeNumberLine(_fieldE0, indent);
+ file->writeNumberLine(_canTake, indent);
file->writeQuotedLine(_string3, indent);
file->writeQuotedLine(_string4, indent);
file->writePoint(_tempPos, indent);
@@ -81,7 +81,7 @@ void CCarry::load(SimpleFile *file) {
_origPos = file->readPoint();
_fullViewName = file->readString();
_fieldDC = file->readNumber();
- _fieldE0 = file->readNumber();
+ _canTake = file->readNumber();
_string3 = file->readString();
_string4 = file->readString();
_tempPos = file->readPoint();
@@ -101,7 +101,7 @@ bool CCarry::MouseDragStartMsg(CMouseDragStartMsg *msg) {
CString name = getName();
debugC(ERROR_BASIC, kDebugScripts, "MosueDragStartMsg - %s", name.c_str());
- if (_fieldE0) {
+ if (_canTake) {
if (checkStartDragging(msg)) {
CPassOnDragStartMsg startMsg(msg->_mousePos);
startMsg.execute(this);
@@ -123,7 +123,7 @@ bool CCarry::MouseDragMoveMsg(CMouseDragMoveMsg *msg) {
}
bool CCarry::MouseDragEndMsg(CMouseDragEndMsg *msg) {
- debugC(ERROR_BASIC, kDebugScripts, "MosueDragEndMsg");
+ debugC(ERROR_BASIC, kDebugScripts, "MouseDragEndMsg");
showMouse();
if (msg->_dropTarget) {
@@ -149,8 +149,7 @@ bool CCarry::MouseDragEndMsg(CMouseDragEndMsg *msg) {
return true;
}
- CString viewName = getViewFullName();
- if (viewName.empty() || msg->_mousePos.y >= 360) {
+ if (!compareViewNameTo(_fullViewName) || msg->_mousePos.y >= 360) {
sleep(250);
petAddToInventory();
} else {
@@ -184,8 +183,7 @@ bool CCarry::UseWithOtherMsg(CUseWithOtherMsg *msg) {
CShowTextMsg textMsg(_string3);
textMsg.execute("PET");
- _fullViewName = getViewFullName();
- if (_fullViewName.empty() || _bounds.top >= 360) {
+ if (!compareViewNameTo(_fullViewName) || _bounds.top >= 360) {
sleep(250);
petAddToInventory();
} else {
diff --git a/engines/titanic/carry/carry.h b/engines/titanic/carry/carry.h
index 06e446a1b5..cb53df47a5 100644
--- a/engines/titanic/carry/carry.h
+++ b/engines/titanic/carry/carry.h
@@ -59,7 +59,7 @@ protected:
int _visibleFrame;
public:
CString _string1;
- int _fieldE0;
+ bool _canTake;
Point _origPos;
CString _fullViewName;
public:
diff --git a/engines/titanic/carry/carry_parrot.cpp b/engines/titanic/carry/carry_parrot.cpp
index ed86384147..c97adc080c 100644
--- a/engines/titanic/carry/carry_parrot.cpp
+++ b/engines/titanic/carry/carry_parrot.cpp
@@ -42,13 +42,13 @@ BEGIN_MESSAGE_MAP(CCarryParrot, CCarry)
ON_MESSAGE(ActMsg)
END_MESSAGE_MAP()
-CCarryParrot::CCarryParrot() : CCarry(), _string6("PerchedParrot"),
+CCarryParrot::CCarryParrot() : CCarry(), _parrotName("PerchedParrot"),
_timerId(0), _freeCounter(0), _feathersFlag(false) {
}
void CCarryParrot::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeQuotedLine(_string6, indent);
+ file->writeQuotedLine(_parrotName, indent);
file->writeNumberLine(_timerId, indent);
file->writeNumberLine(_freeCounter, indent);
file->writeNumberLine(_feathersFlag, indent);
@@ -58,7 +58,7 @@ void CCarryParrot::save(SimpleFile *file, int indent) {
void CCarryParrot::load(SimpleFile *file) {
file->readNumber();
- _string6 = file->readString();
+ _parrotName = file->readString();
_timerId = file->readNumber();
_freeCounter = file->readNumber();
_feathersFlag = file->readNumber();
@@ -67,7 +67,7 @@ void CCarryParrot::load(SimpleFile *file) {
}
bool CCarryParrot::PETGainedObjectMsg(CPETGainedObjectMsg *msg) {
- CParrot::_v4 = 4;
+ CParrot::_state = PARROT_4;
CActMsg actMsg("Shut");
actMsg.execute("ParrotCage");
@@ -75,7 +75,7 @@ bool CCarryParrot::PETGainedObjectMsg(CPETGainedObjectMsg *msg) {
}
bool CCarryParrot::TimerMsg(CTimerMsg *msg) {
- if (CParrot::_v4 == 1 || CParrot::_v4 == 4) {
+ if (CParrot::_state == PARROT_1 || CParrot::_state == PARROT_4) {
if (++_freeCounter >= 30) {
CActMsg actMsg("FreeParrot");
actMsg.execute(this);
@@ -93,8 +93,8 @@ bool CCarryParrot::IsParrotPresentMsg(CIsParrotPresentMsg *msg) {
bool CCarryParrot::LeaveViewMsg(CLeaveViewMsg *msg) {
if (_visible) {
setVisible(false);
- _fieldE0 = 0;
- CParrot::_v4 = 2;
+ _canTake = false;
+ CParrot::_state = PARROT_ESCAPED;
}
return true;
@@ -105,14 +105,11 @@ bool CCarryParrot::MouseDragEndMsg(CMouseDragEndMsg *msg) {
if (msg->_mousePos.y >= 360) {
petAddToInventory();
- return true;
- }
-
- if (compareViewNameTo("ParrotLobby.Node 1.N")) {
+ } else if (compareViewNameTo("ParrotLobby.Node 1.N")) {
if (msg->_mousePos.x >= 75 && msg->_mousePos.x <= 565 &&
!CParrot::_v2 && !CCage::_open) {
setVisible(false);
- _fieldE0 = 0;
+ _canTake = false;
CTreeItem *perchedParrot = findUnder(getRoot(), "PerchedParrot");
detach();
addUnder(perchedParrot);
@@ -122,8 +119,8 @@ bool CCarryParrot::MouseDragEndMsg(CMouseDragEndMsg *msg) {
backMsg.execute(perchedParrot);
} else {
setVisible(false);
- _fieldE0 = 0;
- CParrot::_v4 = 2;
+ _canTake = false;
+ CParrot::_state = PARROT_ESCAPED;
playSound("z#475.wav");
sound8(true);
moveUnder(findRoom());
@@ -138,7 +135,7 @@ bool CCarryParrot::MouseDragEndMsg(CMouseDragEndMsg *msg) {
charMsg.execute(this, nullptr, 0);
} else {
setVisible(false);
- _fieldE0 = 0;
+ _canTake = false;
playSound("z#475.wav");
sound8(true);
moveUnder(findRoom());
@@ -150,7 +147,7 @@ bool CCarryParrot::MouseDragEndMsg(CMouseDragEndMsg *msg) {
}
bool CCarryParrot::PassOnDragStartMsg(CPassOnDragStartMsg *msg) {
- if (CParrot::_v4 != 3) {
+ if (CParrot::_state != PARROT_MAILED) {
moveToView();
setPosition(Point(0, 0));
setVisible(true);
@@ -161,21 +158,22 @@ bool CCarryParrot::PassOnDragStartMsg(CPassOnDragStartMsg *msg) {
_timerId = addTimer(1000, 1000);
_freeCounter = 0;
- CParrot::_v4 = 1;
+ CParrot::_state = PARROT_1;
msg->_value3 = 1;
return CCarry::PassOnDragStartMsg(msg);
}
- CTrueTalkNPC *npc = dynamic_cast<CTrueTalkNPC *>(getRoot()->findByName(_string6));
+ CTrueTalkNPC *npc = dynamic_cast<CTrueTalkNPC *>(getRoot()->findByName(_parrotName));
if (npc)
startTalking(npc, 0x446BF);
- _fieldE0 = 0;
+ _canTake = false;
playSound("z#475.wav");
moveUnder(findRoom());
- msg->_value4 = 1;
+ CParrot::_state = PARROT_ESCAPED;
+ msg->_value4 = 1;
return true;
}
@@ -183,7 +181,7 @@ bool CCarryParrot::PreEnterViewMsg(CPreEnterViewMsg *msg) {
loadSurface();
CCarryParrot *parrot = dynamic_cast<CCarryParrot *>(getRoot()->findByName("CarryParrot"));
if (parrot)
- parrot->_fieldE0 = 0;
+ parrot->_canTake = false;
return true;
}
@@ -191,24 +189,21 @@ bool CCarryParrot::PreEnterViewMsg(CPreEnterViewMsg *msg) {
bool CCarryParrot::UseWithCharMsg(CUseWithCharMsg *msg) {
CSuccUBus *succubus = dynamic_cast<CSuccUBus *>(msg->_character);
if (succubus)
- CParrot::_v4 = 3;
+ CParrot::_state = PARROT_MAILED;
return CCarry::UseWithCharMsg(msg);
}
bool CCarryParrot::ActMsg(CActMsg *msg) {
- if (msg->_action == "FreeParrot" && (CParrot::_v4 == 4 || CParrot::_v4 == 1)) {
- CTrueTalkNPC *npc = dynamic_cast<CTrueTalkNPC *>(getRoot()->findByName(_string6));
+ if (msg->_action == "FreeParrot" && (CParrot::_state == PARROT_4 || CParrot::_state == PARROT_1)) {
+ CTrueTalkNPC *npc = dynamic_cast<CTrueTalkNPC *>(getRoot()->findByName(_parrotName));
if (npc)
startTalking(npc, 0x446BF);
setVisible(false);
- _fieldE0 = 0;
+ _canTake = false;
- if (CParrot::_v4 == 4) {
- CActMsg actMsg("Shut");
- actMsg.execute("ParrotCage");
- } else {
+ if (CParrot::_state == PARROT_4) {
playSound("z#475.wav");
if (!_feathersFlag) {
@@ -221,13 +216,17 @@ bool CCarryParrot::ActMsg(CActMsg *msg) {
_feathersFlag = true;
}
- getPetControl()->removeFromInventory(this);
- getPetControl()->setAreaChangeType(1);
+ CPetControl *pet = getPetControl();
+ pet->removeFromInventory(this);
+ pet->setAreaChangeType(1);
moveUnder(getRoom());
+ } else {
+ CActMsg actMsg("Shut");
+ actMsg.execute("ParrotCage");
}
- CParrot::_v4 = 2;
- stopTimer(_timerId);
+ CParrot::_state = PARROT_ESCAPED;
+ stopAnimTimer(_timerId);
_timerId = 0;
}
diff --git a/engines/titanic/carry/carry_parrot.h b/engines/titanic/carry/carry_parrot.h
index c42475e5f0..e165482edc 100644
--- a/engines/titanic/carry/carry_parrot.h
+++ b/engines/titanic/carry/carry_parrot.h
@@ -42,7 +42,7 @@ class CCarryParrot : public CCarry {
bool UseWithCharMsg(CUseWithCharMsg *msg);
bool ActMsg(CActMsg *msg);
private:
- CString _string6;
+ CString _parrotName;
int _timerId;
int _freeCounter;
bool _feathersFlag;
diff --git a/engines/titanic/carry/crushed_tv.cpp b/engines/titanic/carry/crushed_tv.cpp
index 486537d28e..17d9bab9f1 100644
--- a/engines/titanic/carry/crushed_tv.cpp
+++ b/engines/titanic/carry/crushed_tv.cpp
@@ -47,7 +47,7 @@ void CCrushedTV::load(SimpleFile *file) {
bool CCrushedTV::ActMsg(CActMsg *msg) {
if (msg->_action == "SmashTV") {
setVisible(true);
- _fieldE0 = 1;
+ _canTake = true;
}
return true;
diff --git a/engines/titanic/carry/ear.cpp b/engines/titanic/carry/ear.cpp
index a2234bc6dc..580ebd662f 100644
--- a/engines/titanic/carry/ear.cpp
+++ b/engines/titanic/carry/ear.cpp
@@ -45,7 +45,7 @@ void CEar::load(SimpleFile *file) {
bool CEar::ActMsg(CActMsg *msg) {
if (msg->_action == "MusicSolved")
- _fieldE0 = true;
+ _canTake = true;
return true;
}
diff --git a/engines/titanic/carry/eye.cpp b/engines/titanic/carry/eye.cpp
index 20e4ef3eac..148d2ea154 100644
--- a/engines/titanic/carry/eye.cpp
+++ b/engines/titanic/carry/eye.cpp
@@ -63,13 +63,14 @@ bool CEye::UseWithOtherMsg(CUseWithOtherMsg *msg) {
headMsg.execute(isEquals("Eye1") ? "Eye1Slot" : "Eye2Slot");
} else if (msg->_other->isEquals("LiftbotWithoutHead")) {
CPetControl *pet = getPetControl();
- if (!CLift::_v1 && pet->getRoomsElevatorNum() == 4) {
+ if (!CLift::_hasHead && pet->getRoomsElevatorNum() == 4) {
_eyeFlag = true;
setPosition(_origPos);
setVisible(false);
CActMsg actMsg1(getName());
actMsg1.execute("GetLiftEye");
+ CTelevision::_eyeFlag = true;
CActMsg actMsg2("AddWrongHead");
actMsg2.execute("FaultyLiftbot");
}
@@ -84,7 +85,7 @@ bool CEye::UseWithCharMsg(CUseWithCharMsg *msg) {
CLift *lift = dynamic_cast<CLift *>(msg->_character);
if (lift && lift->getName() == "Well") {
CPetControl *pet = getPetControl();
- if (!CLift::_v1 && pet->getRoomsElevatorNum() == 4) {
+ if (!CLift::_hasHead && pet->getRoomsElevatorNum() == 4) {
_eyeFlag = true;
setPosition(_origPos);
setVisible(false);
diff --git a/engines/titanic/carry/fruit.cpp b/engines/titanic/carry/fruit.cpp
index 68f3af7229..a2d1d91cb0 100644
--- a/engines/titanic/carry/fruit.cpp
+++ b/engines/titanic/carry/fruit.cpp
@@ -60,7 +60,7 @@ bool CFruit::UseWithCharMsg(CUseWithCharMsg *msg) {
if (msg->_character->isEquals("Barbot") && msg->_character->_visible) {
CActMsg actMsg("Fruit");
actMsg.execute(msg->_character);
- _fieldE0 = 0;
+ _canTake = false;
setVisible(false);
return true;
} else {
diff --git a/engines/titanic/carry/hammer.cpp b/engines/titanic/carry/hammer.cpp
index 88c766d564..e62b61d7d4 100644
--- a/engines/titanic/carry/hammer.cpp
+++ b/engines/titanic/carry/hammer.cpp
@@ -43,7 +43,7 @@ void CHammer::load(SimpleFile *file) {
}
bool CHammer::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
- _fieldE0 = 1;
+ _canTake = true;
return true;
}
diff --git a/engines/titanic/carry/head_piece.cpp b/engines/titanic/carry/head_piece.cpp
index 34850488a7..1ce1d5ba1e 100644
--- a/engines/titanic/carry/head_piece.cpp
+++ b/engines/titanic/carry/head_piece.cpp
@@ -70,7 +70,7 @@ bool CHeadPiece::PETGainedObjectMsg(CPETGainedObjectMsg *msg) {
bool CHeadPiece::MouseDragStartMsg(CMouseDragStartMsg *msg) {
if (!checkPoint(msg->_mousePos, false, true)) {
return false;
- } else if (!_fieldE0) {
+ } else if (!_canTake) {
return true;
}
diff --git a/engines/titanic/carry/key.cpp b/engines/titanic/carry/key.cpp
index 187ff1b6c3..e8c144139a 100644
--- a/engines/titanic/carry/key.cpp
+++ b/engines/titanic/carry/key.cpp
@@ -43,7 +43,7 @@ void CKey::load(SimpleFile *file) {
}
bool CKey::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
- _fieldE0 = 1;
+ _canTake = true;
setVisible(true);
return true;
}
diff --git a/engines/titanic/carry/liftbot_head.cpp b/engines/titanic/carry/liftbot_head.cpp
index 5f516fcf8c..227a06a7bc 100644
--- a/engines/titanic/carry/liftbot_head.cpp
+++ b/engines/titanic/carry/liftbot_head.cpp
@@ -50,7 +50,7 @@ void CLiftbotHead::load(SimpleFile *file) {
bool CLiftbotHead::UseWithOtherMsg(CUseWithOtherMsg *msg) {
if (msg->_other->getName() == "LiftbotWithoutHead") {
CPetControl *pet = getPetControl();
- if (CLift::_v1 == 1 && pet->getRoomsElevatorNum() == 4) {
+ if (!CLift::_hasHead && pet->getRoomsElevatorNum() == 4) {
_flag = true;
CActMsg actMsg("AddRightHead");
actMsg.execute("FaultyLiftbot");
@@ -67,7 +67,7 @@ bool CLiftbotHead::UseWithCharMsg(CUseWithCharMsg *msg) {
CLift *lift = dynamic_cast<CLift *>(msg->_character);
if (lift) {
CPetControl *pet = getPetControl();
- if (lift->isEquals("Well") && !CLift::_v1 && pet->getRoomsElevatorNum() == 4) {
+ if (lift->isEquals("Well") && !CLift::_hasHead && pet->getRoomsElevatorNum() == 4) {
_flag = true;
CActMsg actMsg("AddRightHead");
actMsg.execute(lift);
diff --git a/engines/titanic/carry/long_stick.cpp b/engines/titanic/carry/long_stick.cpp
index 16cd69e373..77f888b6d8 100644
--- a/engines/titanic/carry/long_stick.cpp
+++ b/engines/titanic/carry/long_stick.cpp
@@ -60,7 +60,7 @@ bool CLongStick::UseWithOtherMsg(CUseWithOtherMsg *msg) {
}
bool CLongStick::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
- _fieldE0 = 1;
+ _canTake = true;
return true;
}
diff --git a/engines/titanic/carry/maitred_right_arm.cpp b/engines/titanic/carry/maitred_right_arm.cpp
index 5cec6be9bd..e61a711197 100644
--- a/engines/titanic/carry/maitred_right_arm.cpp
+++ b/engines/titanic/carry/maitred_right_arm.cpp
@@ -42,7 +42,7 @@ bool CMaitreDRightArm::DropZoneLostObjectMsg(CDropZoneLostObjectMsg *msg) {
CActMsg actMsg("LoseArm");
actMsg.execute("MaitreDBody");
actMsg.execute("MaitreD Arm Holder");
- _fieldE0 = 1;
+ _canTake = true;
return true;
}
diff --git a/engines/titanic/carry/phonograph_ear.cpp b/engines/titanic/carry/phonograph_ear.cpp
index 95297a77a1..df0445d164 100644
--- a/engines/titanic/carry/phonograph_ear.cpp
+++ b/engines/titanic/carry/phonograph_ear.cpp
@@ -43,7 +43,7 @@ void CPhonographEar::load(SimpleFile *file) {
}
bool CPhonographEar::CorrectMusicPlayedMsg(CCorrectMusicPlayedMsg *msg) {
- _fieldE0 = true;
+ _canTake = true;
return true;
}
diff --git a/engines/titanic/carry/photograph.cpp b/engines/titanic/carry/photograph.cpp
index 039efd0252..76487cae12 100644
--- a/engines/titanic/carry/photograph.cpp
+++ b/engines/titanic/carry/photograph.cpp
@@ -93,7 +93,7 @@ bool CPhotograph::PETGainedObjectMsg(CPETGainedObjectMsg *msg) {
bool CPhotograph::ActMsg(CActMsg *msg) {
if (msg->_action == "BecomeGettable") {
- _fieldE0 = 1;
+ _canTake = true;
_cursorId = CURSOR_HAND;
}
diff --git a/engines/titanic/carry/speech_centre.cpp b/engines/titanic/carry/speech_centre.cpp
index 29ced484a5..859d70c304 100644
--- a/engines/titanic/carry/speech_centre.cpp
+++ b/engines/titanic/carry/speech_centre.cpp
@@ -51,7 +51,7 @@ void CSpeechCentre::load(SimpleFile *file) {
bool CSpeechCentre::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
if (_field13C == 1 && _season == "Autumn")
- _fieldE0 = true;
+ _canTake = true;
return true;
}
diff --git a/engines/titanic/carry/vision_centre.cpp b/engines/titanic/carry/vision_centre.cpp
index f81e35fa4f..7e3afb5046 100644
--- a/engines/titanic/carry/vision_centre.cpp
+++ b/engines/titanic/carry/vision_centre.cpp
@@ -41,12 +41,12 @@ void CVisionCentre::load(SimpleFile *file) {
}
bool CVisionCentre::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
- _fieldE0 = true;
+ _canTake = true;
return true;
}
bool CVisionCentre::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
- if (_fieldE0) {
+ if (_canTake) {
return CBrain::MouseButtonDownMsg(msg);
} else {
petDisplayMessage(1, NICE_IF_TAKE_BUT_CANT);
@@ -55,7 +55,7 @@ bool CVisionCentre::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
}
bool CVisionCentre::MouseDragStartMsg(CMouseDragStartMsg *msg) {
- if (_fieldE0) {
+ if (_canTake) {
return CBrain::MouseDragStartMsg(msg);
} else {
petDisplayMessage(1, NICE_IF_TAKE_BUT_CANT);
diff --git a/engines/titanic/continue_save_dialog.h b/engines/titanic/continue_save_dialog.h
index 58c7deef00..b6d9aebfac 100644
--- a/engines/titanic/continue_save_dialog.h
+++ b/engines/titanic/continue_save_dialog.h
@@ -28,7 +28,7 @@
#include "titanic/support/image.h"
#include "titanic/support/rect.h"
#include "titanic/support/string.h"
-#include "titanic/pet_control/pet_text.h"
+#include "titanic/gfx/text_control.h"
namespace Titanic {
@@ -43,7 +43,7 @@ class CContinueSaveDialog : public CEventTarget {
};
private:
Common::Array<SaveEntry> _saves;
- CPetText _slotNames[5];
+ CTextControl _slotNames[5];
int _highlightedSlot, _selectedSlot;
Point _mousePos;
bool _evilTwinShown;
diff --git a/engines/titanic/core/background.cpp b/engines/titanic/core/background.cpp
index 792cd28346..9f22f1e992 100644
--- a/engines/titanic/core/background.cpp
+++ b/engines/titanic/core/background.cpp
@@ -30,7 +30,7 @@ BEGIN_MESSAGE_MAP(CBackground, CGameObject)
ON_MESSAGE(VisibleMsg)
END_MESSAGE_MAP()
-CBackground::CBackground() : CGameObject(), _startFrame(0), _endFrame(0), _fieldDC(0) {
+CBackground::CBackground() : CGameObject(), _startFrame(0), _endFrame(0), _isBlocking(false) {
}
void CBackground::save(SimpleFile *file, int indent) {
@@ -39,7 +39,7 @@ void CBackground::save(SimpleFile *file, int indent) {
file->writeNumberLine(_endFrame, indent);
file->writeQuotedLine(_string1, indent);
file->writeQuotedLine(_string2, indent);
- file->writeNumberLine(_fieldDC, indent);
+ file->writeNumberLine(_isBlocking, indent);
CGameObject::save(file, indent);
}
@@ -50,14 +50,14 @@ void CBackground::load(SimpleFile *file) {
_endFrame = file->readNumber();
_string1 = file->readString();
_string2 = file->readString();
- _fieldDC = file->readNumber();
+ _isBlocking = file->readNumber();
CGameObject::load(file);
}
bool CBackground::StatusChangeMsg(CStatusChangeMsg *msg) {
setVisible(true);
- if (_fieldDC) {
+ if (_isBlocking) {
playMovie(_startFrame, _endFrame, MOVIE_GAMESTATE);
} else {
playMovie(_startFrame, _endFrame, 0);
@@ -71,7 +71,7 @@ bool CBackground::SetFrameMsg(CSetFrameMsg *msg) {
}
bool CBackground::VisibleMsg(CVisibleMsg *msg) {
- setVisible(msg->_visible);
+ setVisible(!_visible);
return true;
}
diff --git a/engines/titanic/core/background.h b/engines/titanic/core/background.h
index b7f160db28..6a1e4fd103 100644
--- a/engines/titanic/core/background.h
+++ b/engines/titanic/core/background.h
@@ -38,7 +38,7 @@ protected:
int _endFrame;
CString _string1;
CString _string2;
- int _fieldDC;
+ bool _isBlocking;
public:
CLASSDEF;
CBackground();
diff --git a/engines/titanic/core/drop_target.cpp b/engines/titanic/core/drop_target.cpp
index 13a31c3f8a..ffeab03545 100644
--- a/engines/titanic/core/drop_target.cpp
+++ b/engines/titanic/core/drop_target.cpp
@@ -34,7 +34,7 @@ BEGIN_MESSAGE_MAP(CDropTarget, CGameObject)
END_MESSAGE_MAP()
CDropTarget::CDropTarget() : CGameObject(), _itemFrame(0),
- _itemMatchSize(0), _showItem(false), _fieldF4(0), _dropFrame(0),
+ _itemMatchSize(0), _showItem(false), _dropEnabled(false), _dropFrame(0),
_dragFrame(0), _dragCursorId(CURSOR_ARROW), _dropCursorId(CURSOR_HAND),
_clipFlags(20) {
}
@@ -48,7 +48,7 @@ void CDropTarget::save(SimpleFile *file, int indent) {
file->writeQuotedLine(_soundName, indent);
file->writeNumberLine(_showItem, indent);
file->writeQuotedLine(_itemName, indent);
- file->writeNumberLine(_fieldF4, indent);
+ file->writeNumberLine(_dropEnabled, indent);
file->writeNumberLine(_dropFrame, indent);
file->writeNumberLine(_dragFrame, indent);
file->writeQuotedLine(_clipName, indent);
@@ -68,7 +68,7 @@ void CDropTarget::load(SimpleFile *file) {
_soundName = file->readString();
_showItem = file->readNumber();
_itemName = file->readString();
- _fieldF4 = file->readNumber();
+ _dropEnabled = file->readNumber();
_dropFrame = file->readNumber();
_dragFrame = file->readNumber();
_clipName = file->readString();
@@ -113,12 +113,13 @@ bool CDropTarget::DropObjectMsg(CDropObjectMsg *msg) {
}
bool CDropTarget::MouseDragStartMsg(CMouseDragStartMsg *msg) {
+ CTreeItem *dragItem = msg->_dragItem;
if (!checkStartDragging(msg))
return false;
- //msg->_dragItem = msg->_dragItem;
+ msg->_dragItem = dragItem;
CGameObject *obj = dynamic_cast<CGameObject *>(findByName(_itemName));
- if (_itemName.empty() || _fieldF4 || !obj)
+ if (_itemName.empty() || _dropEnabled || !obj)
return false;
CDropZoneLostObjectMsg lostMsg;
@@ -134,7 +135,7 @@ bool CDropTarget::MouseDragStartMsg(CMouseDragStartMsg *msg) {
msg->_dragItem = obj;
CPassOnDragStartMsg passMsg(msg->_mousePos, 1);
passMsg.execute(obj);
- setVisible(true);
+ obj->setVisible(true);
}
return true;
@@ -160,7 +161,7 @@ bool CDropTarget::EnterViewMsg(CEnterViewMsg *msg) {
bool CDropTarget::VisibleMsg(CVisibleMsg *msg) {
setVisible(msg->_visible);
- _fieldF4 = !msg->_visible;
+ _dropEnabled = !msg->_visible;
return true;
}
diff --git a/engines/titanic/core/drop_target.h b/engines/titanic/core/drop_target.h
index e07b640c9f..bdf8891789 100644
--- a/engines/titanic/core/drop_target.h
+++ b/engines/titanic/core/drop_target.h
@@ -42,7 +42,7 @@ protected:
CString _soundName;
bool _showItem;
CString _itemName;
- int _fieldF4;
+ bool _dropEnabled;
int _dropFrame;
int _dragFrame;
CString _clipName;
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index 3a5f6567a6..3e1cb0858c 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -59,11 +59,11 @@ CGameObject::CGameObject(): CNamedItem() {
_field34 = 0;
_field38 = 0;
_field3C = 0;
- _field40 = 0;
+ _nonvisual = false;
_field44 = 0xF0;
_field48 = 0xF0;
_field4C = 0xFF;
- _isMail = false;
+ _isPendingMail = false;
_destRoomFlags = 0;
_roomFlags = 0;
_visible = true;
@@ -106,7 +106,7 @@ void CGameObject::save(SimpleFile *file, int indent) {
file->writeNumberLine(_cursorId, indent + 1);
_movieClips.save(file, indent + 1);
file->writeNumberLine(_field60, indent + 1);
- file->writeNumberLine(_field40, indent + 1);
+ file->writeNumberLine(_nonvisual, indent + 1);
file->writeQuotedLine(_resource, indent + 1);
file->writeBounds(_bounds, indent + 1);
@@ -119,7 +119,7 @@ void CGameObject::save(SimpleFile *file, int indent) {
file->writeNumberLine(_field4C, indent + 1);
file->writeNumberLine(_fieldB8, indent + 1);
file->writeNumberLine(_visible, indent + 1);
- file->writeNumberLine(_isMail, indent + 1);
+ file->writeNumberLine(_isPendingMail, indent + 1);
file->writeNumberLine(_destRoomFlags, indent + 1);
file->writeNumberLine(_roomFlags, indent + 1);
@@ -157,7 +157,7 @@ void CGameObject::load(SimpleFile *file) {
// Deliberate fall-through
case 3:
- _field40 = file->readNumber();
+ _nonvisual = file->readNumber();
// Deliberate fall-through
case 2:
@@ -174,7 +174,7 @@ void CGameObject::load(SimpleFile *file) {
_field4C = file->readNumber();
_fieldB8 = file->readNumber();
_visible = file->readNumber() != 0;
- _isMail = file->readNumber();
+ _isPendingMail = file->readNumber();
_destRoomFlags = file->readNumber();
_roomFlags = file->readNumber();
@@ -203,8 +203,8 @@ void CGameObject::draw(CScreenManager *screenManager) {
return;
}
- if (_field40) {
- // If a text object is defined, handle drawing it
+ if (_nonvisual) {
+ // If a text is defined, handle drawing it
if (_text && _bounds.intersects(getGameManager()->_bounds))
_text->draw(screenManager);
@@ -265,11 +265,11 @@ void CGameObject::stopMovie() {
_surface->stopMovie();
}
-bool CGameObject::checkPoint(const Point &pt, bool ignore40, bool visibleOnly) {
+bool CGameObject::checkPoint(const Point &pt, bool ignoreSurface, bool visibleOnly) {
if ((!_visible && visibleOnly) || !_bounds.contains(pt))
return false;
- if (ignore40 || _field40)
+ if (ignoreSurface || _nonvisual)
return true;
if (!_surface) {
@@ -548,6 +548,10 @@ void CGameObject::sound8(bool flag) const {
}
void CGameObject::setVisible(bool val) {
+ if (_name.contains("ylinder")) {
+ warning("TODO");
+ }
+
if (val != _visible) {
_visible = val;
makeDirty();
@@ -867,10 +871,10 @@ CViewItem *CGameObject::parseView(const CString &viewString) {
// Ensure we have the specified room
if (project) {
- if (room->getName() != roomName) {
+ if (room->getName().compareToIgnoreCase(roomName)) {
// Scan for the correct room
for (room = project->findFirstRoom();
- room && room->getName() != roomName;
+ room && room->getName().compareToIgnoreCase(roomName);
room = project->findNextRoom(room)) ;
}
}
@@ -879,13 +883,13 @@ CViewItem *CGameObject::parseView(const CString &viewString) {
// Find the designated node within the room
CNodeItem *node = dynamic_cast<CNodeItem *>(room->findChildInstanceOf(CNodeItem::_type));
- while (node && node->getName() != nodeName)
+ while (node && node->getName().compareToIgnoreCase(nodeName))
node = dynamic_cast<CNodeItem *>(room->findNextInstanceOf(CNodeItem::_type, node));
if (!node)
return nullptr;
CViewItem *view = dynamic_cast<CViewItem *>(node->findChildInstanceOf(CViewItem::_type));
- while (view && view->getName() != viewName)
+ while (view && view->getName().compareToIgnoreCase(viewName))
view = dynamic_cast<CViewItem *>(node->findNextInstanceOf(CViewItem::_type, view));
if (!view)
return nullptr;
@@ -1046,12 +1050,12 @@ Season CGameObject::stateGetSeason() const {
return getGameManager()->_gameState._seasonNum;
}
-void CGameObject::stateSet24() {
- getGameManager()->_gameState.set24(1);
+void CGameObject::stateSetParrotMet() {
+ getGameManager()->_gameState.setParrotMet(true);
}
-int CGameObject::stateGet24() const {
- return getGameManager()->_gameState.get24();
+bool CGameObject::stateGetParrotMet() const {
+ return getGameManager()->_gameState.getParrotMet();
}
void CGameObject::stateInc38() {
@@ -1081,10 +1085,11 @@ void CGameObject::setMovieFrameRate(double rate) {
void CGameObject::setText(const CString &str, int border, int borderRight) {
if (!_text)
- _text = new CPetText();
+ _text = new CTextControl();
_textBorder = border;
_textBorderRight = borderRight;
+ setTextBounds();
_text->setText(str);
CScreenManager *screenManager = getGameManager()->setScreenManager();
_text->scrollToTop(screenManager);
@@ -1092,7 +1097,7 @@ void CGameObject::setText(const CString &str, int border, int borderRight) {
void CGameObject::setTextHasBorders(bool hasBorders) {
if (!_text)
- _text = new CPetText();
+ _text = new CTextControl();
_text->setHasBorder(hasBorders);
}
@@ -1108,14 +1113,14 @@ void CGameObject::setTextBounds() {
void CGameObject::setTextColor(byte r, byte g, byte b) {
if (!_text)
- _text = new CPetText();
+ _text = new CTextControl();
_text->setColor(r, g, b);
}
void CGameObject::setTextFontNumber(int fontNumber) {
if (!_text)
- _text = new CPetText();
+ _text = new CTextControl();
_text->setFontNumber(fontNumber);
}
@@ -1132,11 +1137,13 @@ CTextCursor *CGameObject::getTextCursor() const {
void CGameObject::scrollTextUp() {
if (_text)
_text->scrollUp(CScreenManager::_screenManagerPtr);
+ makeDirty();
}
void CGameObject::scrollTextDown() {
if (_text)
_text->scrollDown(CScreenManager::_screenManagerPtr);
+ makeDirty();
}
void CGameObject::lockMouse() {
@@ -1451,10 +1458,10 @@ CGameObject *CGameObject::findMail(uint roomFlags) const {
return mailMan ? mailMan->findMail(roomFlags) : nullptr;
}
-void CGameObject::removeMail(uint destRoomFlags, uint newRoomFlags) {
+void CGameObject::sendMail(uint currRoomFlags, uint newRoomFlags) {
CMailMan *mailMan = getMailMan();
if (mailMan)
- mailMan->removeMail(destRoomFlags, newRoomFlags);
+ mailMan->sendMail(currRoomFlags, newRoomFlags);
}
void CGameObject::resetMail() {
@@ -1604,10 +1611,10 @@ int CGameObject::petGetRoomsWellEntry() const {
return petControl ? petControl->getRoomsWellEntry() : 0;
}
-void CGameObject::petSetRooms1D4(int v) {
+void CGameObject::petSetRoomsElevatorBroken(bool flag) {
CPetControl *pet = getPetControl();
if (pet)
- pet->setRooms1D4(v);
+ pet->setRoomsElevatorBroken(flag);
}
void CGameObject::petOnSummonBot(const CString &name, int val) {
diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h
index 9417fd7aa3..629c6a038d 100644
--- a/engines/titanic/core/game_object.h
+++ b/engines/titanic/core/game_object.h
@@ -34,7 +34,7 @@
#include "titanic/support/strings.h"
#include "titanic/support/movie_clip.h"
#include "titanic/pet_control/pet_section.h"
-#include "titanic/pet_control/pet_text.h"
+#include "titanic/gfx/text_control.h"
#include "titanic/game_state.h"
namespace Titanic {
@@ -79,7 +79,7 @@ protected:
double _field34;
double _field38;
double _field3C;
- int _field40;
+ bool _nonvisual;
int _field44;
int _field48;
int _field4C;
@@ -87,7 +87,7 @@ protected:
int _initialFrame;
CMovieRangeInfoList _movieRangeInfoList;
int _frameNumber;
- CPetText *_text;
+ CTextControl *_text;
uint _textBorder;
uint _textBorderRight;
int _field9C;
@@ -519,57 +519,12 @@ protected:
void setMovieFrameRate(double rate);
/**
- * Set up the text and borders for the object
- */
- void setText(const CString &str, int border = 0, int borderRight = 0);
-
- /**
- * Sets whether the text will use borders
- */
- void setTextHasBorders(bool hasBorders);
-
- /**
- * Sets the bounds for a previously defined text area
- */
- void setTextBounds();
-
- /**
- * Sets the color for the object's text
- */
- void setTextColor(byte r, byte g, byte b);
-
- /**
- * Sets the font number to use for text
- */
- void setTextFontNumber(int fontNumber);
-
- /**
- * Gets the width of the text contents
- */
- int getTextWidth() const;
-
- /**
- * Returns the text cursor
- */
- CTextCursor *getTextCursor() const;
-
- /**
- * Scroll text up
- */
- void scrollTextUp();
-
- /**
- * Scroll text down
- */
- void scrollTextDown();
-
- /**
* Gets a new random number
*/
int getRandomNumber(int max, int *oldVal = nullptr);
public:
Rect _bounds;
- bool _isMail;
+ bool _isPendingMail;
uint _destRoomFlags;
uint _roomFlags;
int _field60;
@@ -644,7 +599,7 @@ public:
* Checks the passed point is validly in the object,
* with extra checking of object flags status
*/
- bool checkPoint(const Point &pt, bool ignore40 = false, bool visibleOnly = false);
+ bool checkPoint(const Point &pt, bool ignoreSurface = false, bool visibleOnly = false);
/**
* Set the position of the object
@@ -748,11 +703,6 @@ public:
CGameObject *getHiddenObject(const CString &name) const;
/**
- * Sets up credits text
- */
- void createCredits();
-
- /**
* Support function for drag moving
*/
void dragMove(const Point &pt);
@@ -764,6 +714,58 @@ public:
bool compareRoomFlags(int mode, uint flags1, uint flags2);
+ /*--- Text display methods ---*/
+
+ /**
+ * Sets up credits text
+ */
+ void createCredits();
+
+ /**
+ * Set up the text and borders for the object
+ */
+ void setText(const CString &str, int border = 0, int borderRight = 0);
+
+ /**
+ * Sets whether the text will use borders
+ */
+ void setTextHasBorders(bool hasBorders);
+
+ /**
+ * Sets the bounds for a previously defined text area
+ */
+ void setTextBounds();
+
+ /**
+ * Sets the color for the object's text
+ */
+ void setTextColor(byte r, byte g, byte b);
+
+ /**
+ * Sets the font number to use for text
+ */
+ void setTextFontNumber(int fontNumber);
+
+ /**
+ * Gets the width of the text contents
+ */
+ int getTextWidth() const;
+
+ /**
+ * Scroll text up
+ */
+ void scrollTextUp();
+
+ /**
+ * Scroll text down
+ */
+ void scrollTextDown();
+
+ /**
+ * Returns the text cursor
+ */
+ CTextCursor *getTextCursor() const;
+
/*--- CGameManager Methods ---*/
/**
@@ -797,9 +799,9 @@ public:
void addMail(uint destRoomFlags);
/**
- * Remove an object from the mail list
+ * Sends a pending mail object to a given destination
*/
- void removeMail(uint destRoomFlags, uint newRoomFlags);
+ void sendMail(uint currRoomFlags, uint newRoomFlags);
/**
* Return the full Id of the current view in a
@@ -908,8 +910,10 @@ public:
*/
void petSetRoomsWellEntry(int entryNum);
- void petSetRooms1D4(int v);
-
+ /**
+ * Sets the flag for whether elevator 4 has yet been fixed
+ */
+ void petSetRoomsElevatorBroken(bool flag);
/**
* Show the PET
@@ -991,8 +995,16 @@ public:
*/
Season stateGetSeason() const;
- void stateSet24();
- int stateGet24() const;
+ /**
+ * Sets the flag for the parrot having been met
+ */
+ void stateSetParrotMet();
+
+ /**
+ * Returns whether the parrot has been met
+ */
+ bool stateGetParrotMet() const;
+
void stateInc38();
int stateGet38() const;
diff --git a/engines/titanic/core/mail_man.cpp b/engines/titanic/core/mail_man.cpp
index 851e52694d..a34c69674b 100644
--- a/engines/titanic/core/mail_man.cpp
+++ b/engines/titanic/core/mail_man.cpp
@@ -56,22 +56,22 @@ void CMailMan::addMail(CGameObject *obj, uint destRoomFlags) {
void CMailMan::setMailDest(CGameObject *obj, uint roomFlags) {
obj->_destRoomFlags = roomFlags;
obj->_roomFlags = 0;
- obj->_isMail = true;
+ obj->_isPendingMail = true;
}
CGameObject *CMailMan::findMail(uint roomFlags) const {
for (CGameObject *obj = getFirstObject(); obj; obj = getNextObject(obj)) {
- if (obj->_isMail && obj->_destRoomFlags == roomFlags)
+ if (obj->_isPendingMail && obj->_destRoomFlags == roomFlags)
return obj;
}
return nullptr;
}
-void CMailMan::removeMail(uint destRoomFlags, uint newRoomFlags) {
+void CMailMan::sendMail(uint currRoomFlags, uint newRoomFlags) {
for (CGameObject *obj = getFirstObject(); obj; obj = getNextObject(obj)) {
- if (obj->_isMail && obj->_destRoomFlags == destRoomFlags) {
- obj->_isMail = false;
+ if (obj->_isPendingMail && obj->_destRoomFlags == currRoomFlags) {
+ obj->_isPendingMail = false;
obj->_roomFlags = newRoomFlags;
break;
}
diff --git a/engines/titanic/core/mail_man.h b/engines/titanic/core/mail_man.h
index 0a8d5fa90a..b5d6a153fc 100644
--- a/engines/titanic/core/mail_man.h
+++ b/engines/titanic/core/mail_man.h
@@ -71,9 +71,9 @@ public:
CGameObject *findMail(uint roomFlags) const;
/**
- * Remove a mail item
+ * Sends a pending mail object to a given destination
*/
- void removeMail(uint destRoomFlags, uint newRoomFlags);
+ void sendMail(uint currRoomFlags, uint newRoomFlags);
void resetValue() { _value = 0; }
};
diff --git a/engines/titanic/core/project_item.cpp b/engines/titanic/core/project_item.cpp
index af67f69580..1093a5c6e7 100644
--- a/engines/titanic/core/project_item.cpp
+++ b/engines/titanic/core/project_item.cpp
@@ -158,8 +158,8 @@ void CProjectItem::loadGame(int slotId) {
CompressedFile file;
// Clear any existing project contents and call preload code
- clear();
preLoad();
+ clear();
// Open either an existing savegame slot or the new game template
if (slotId >= 0) {
@@ -309,6 +309,10 @@ void CProjectItem::saveData(SimpleFile *file, CTreeItem *item) const {
void CProjectItem::preLoad() {
if (_gameManager)
_gameManager->preLoad();
+
+ CScreenManager *scrManager = CScreenManager::_currentScreenManagerPtr;
+ if (scrManager)
+ scrManager->preLoad();
}
void CProjectItem::postLoad() {
diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp
index 73b4bf861f..f718ba79b3 100644
--- a/engines/titanic/core/saveable_object.cpp
+++ b/engines/titanic/core/saveable_object.cpp
@@ -1473,6 +1473,9 @@ void CSaveableObject::initClassList() {
ADDFN(CEnterNodeMsg, CMessage);
ADDFN(CEnterRoomMsg, CMessage);
ADDFN(CEnterViewMsg, CMessage);
+ ADDFN(CPreEnterNodeMsg, CMessage);
+ ADDFN(CPreEnterRoomMsg, CMessage);
+ ADDFN(CPreEnterViewMsg, CMessage);
ADDFN(CPreSaveMsg, CMessage);
ADDFN(CProdMaitreDMsg, CMessage);
ADDFN(CPumpingMsg, CMessage);
diff --git a/engines/titanic/core/turn_on_turn_off.cpp b/engines/titanic/core/turn_on_turn_off.cpp
index 6498c226a0..a6051c7c6f 100644
--- a/engines/titanic/core/turn_on_turn_off.cpp
+++ b/engines/titanic/core/turn_on_turn_off.cpp
@@ -30,7 +30,7 @@ BEGIN_MESSAGE_MAP(CTurnOnTurnOff, CBackground)
END_MESSAGE_MAP()
CTurnOnTurnOff::CTurnOnTurnOff() : CBackground(), _startFrameOn(0),
- _endFrameOn(0), _startFrameOff(0), _endFrameOff(0), _fieldF0(false) {
+ _endFrameOn(0), _startFrameOff(0), _endFrameOff(0), _isOn(false) {
}
void CTurnOnTurnOff::save(SimpleFile *file, int indent) {
@@ -39,7 +39,7 @@ void CTurnOnTurnOff::save(SimpleFile *file, int indent) {
file->writeNumberLine(_endFrameOn, indent);
file->writeNumberLine(_startFrameOff, indent);
file->writeNumberLine(_endFrameOff, indent);
- file->writeNumberLine(_fieldF0, indent);
+ file->writeNumberLine(_isOn, indent);
CBackground::save(file, indent);
}
@@ -50,30 +50,30 @@ void CTurnOnTurnOff::load(SimpleFile *file) {
_endFrameOn = file->readNumber();
_startFrameOff = file->readNumber();
_endFrameOff = file->readNumber();
- _fieldF0 = file->readNumber();
+ _isOn = file->readNumber();
CBackground::load(file);
}
bool CTurnOnTurnOff::TurnOn(CTurnOn *msg) {
- if (!_fieldF0) {
- if (_fieldDC)
+ if (!_isOn) {
+ if (_isBlocking)
playMovie(_startFrameOn, _endFrameOn, MOVIE_GAMESTATE);
else
playMovie(_startFrameOn, _endFrameOn, MOVIE_NOTIFY_OBJECT);
- _fieldF0 = true;
+ _isOn = true;
}
return true;
}
bool CTurnOnTurnOff::TurnOff(CTurnOff *msg) {
- if (!_fieldF0) {
- if (_fieldDC)
+ if (_isOn) {
+ if (_isBlocking)
playMovie(_startFrameOff, _endFrameOff, MOVIE_GAMESTATE);
else
playMovie(_startFrameOff, _endFrameOff, MOVIE_NOTIFY_OBJECT);
- _fieldF0 = true;
+ _isOn = false;
}
return true;
diff --git a/engines/titanic/core/turn_on_turn_off.h b/engines/titanic/core/turn_on_turn_off.h
index c09f0e0d7d..1749394819 100644
--- a/engines/titanic/core/turn_on_turn_off.h
+++ b/engines/titanic/core/turn_on_turn_off.h
@@ -36,7 +36,7 @@ private:
int _endFrameOn;
int _startFrameOff;
int _endFrameOff;
- bool _fieldF0;
+ bool _isOn;
public:
CLASSDEF;
CTurnOnTurnOff();
diff --git a/engines/titanic/core/view_item.cpp b/engines/titanic/core/view_item.cpp
index c25461f5cc..9109bcc5b2 100644
--- a/engines/titanic/core/view_item.cpp
+++ b/engines/titanic/core/view_item.cpp
@@ -195,6 +195,8 @@ bool CViewItem::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
linkItem = dynamic_cast<CLinkItem *>(
findNextInstanceOf(CLinkItem::_type, linkItem));
}
+
+ handleMouseMsg(msg, false);
}
}
}
diff --git a/engines/titanic/events.cpp b/engines/titanic/events.cpp
index 97f9a86eb3..d29a19dec6 100644
--- a/engines/titanic/events.cpp
+++ b/engines/titanic/events.cpp
@@ -127,7 +127,7 @@ bool Events::checkForNextFrameCounter() {
}
uint32 Events::getTicksCount() const {
- return g_system->getMillis();
+ return _frameCounter * GAME_FRAME_TIME;
}
void Events::sleep(uint time) {
diff --git a/engines/titanic/game/announce.cpp b/engines/titanic/game/announce.cpp
index 74c126476f..16298f7b99 100644
--- a/engines/titanic/game/announce.cpp
+++ b/engines/titanic/game/announce.cpp
@@ -30,14 +30,14 @@ BEGIN_MESSAGE_MAP(CAnnounce, CGameObject)
ON_MESSAGE(ActMsg)
END_MESSAGE_MAP()
-CAnnounce::CAnnounce() : _nameIndex(0), _soundHandle(0), _leaveFlag(1), _enabled(false) {
+CAnnounce::CAnnounce() : _nameIndex(0), _soundHandle(0), _notActivatedFlag(true), _enabled(false) {
}
void CAnnounce::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeNumberLine(_nameIndex, indent);
file->writeNumberLine(_soundHandle, indent);
- file->writeNumberLine(_leaveFlag, indent);
+ file->writeNumberLine(_notActivatedFlag, indent);
file->writeNumberLine(_enabled, indent);
CGameObject::save(file, indent);
@@ -47,7 +47,7 @@ void CAnnounce::load(SimpleFile *file) {
file->readNumber();
_nameIndex = file->readNumber();
_soundHandle = file->readNumber();
- _leaveFlag = file->readNumber();
+ _notActivatedFlag = file->readNumber();
_enabled = file->readNumber();
CGameObject::load(file);
@@ -97,6 +97,7 @@ bool CAnnounce::TimerMsg(CTimerMsg *msg) {
break;
}
+ // Schedule another announcement for a random future time
addTimer(1, 300000 + getRandomNumber(30000), 0);
if (getRandomNumber(3) == 0)
addTimer(2, 4000, 0);
@@ -111,9 +112,10 @@ bool CAnnounce::TimerMsg(CTimerMsg *msg) {
}
bool CAnnounce::LeaveRoomMsg(CLeaveRoomMsg *msg) {
- if (_leaveFlag) {
+ // The very first time the player leaves the Embarklation Lobby, start announcements
+ if (_notActivatedFlag) {
addTimer(1, 1000, 0);
- _leaveFlag = 0;
+ _notActivatedFlag = false;
_enabled = true;
}
@@ -121,6 +123,7 @@ bool CAnnounce::LeaveRoomMsg(CLeaveRoomMsg *msg) {
}
bool CAnnounce::ActMsg(CActMsg *msg) {
+ // Handle enabling or disabling announcements
if (msg->_action == "Enable")
_enabled = true;
else if (msg->_action == "Disable")
diff --git a/engines/titanic/game/announce.h b/engines/titanic/game/announce.h
index 9bf060daae..caacb8ffa1 100644
--- a/engines/titanic/game/announce.h
+++ b/engines/titanic/game/announce.h
@@ -35,7 +35,7 @@ class CAnnounce : public CGameObject {
private:
int _nameIndex;
int _soundHandle;
- bool _leaveFlag;
+ bool _notActivatedFlag;
bool _enabled;
public:
CLASSDEF;
diff --git a/engines/titanic/game/broken_pell_base.cpp b/engines/titanic/game/broken_pell_base.cpp
index 02c2d873ac..a3825d503e 100644
--- a/engines/titanic/game/broken_pell_base.cpp
+++ b/engines/titanic/game/broken_pell_base.cpp
@@ -33,7 +33,7 @@ void CBrokenPellBase::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeNumberLine(_v1, indent);
file->writeNumberLine(_v2, indent);
- file->writeNumberLine(_fieldE0, indent);
+ file->writeNumberLine(_exitAction, indent);
CBackground::save(file, indent);
}
@@ -41,7 +41,7 @@ void CBrokenPellBase::load(SimpleFile *file) {
file->readNumber();
_v1 = file->readNumber();
_v2 = file->readNumber();
- _fieldE0 = file->readNumber();
+ _exitAction = file->readNumber();
CBackground::load(file);
}
diff --git a/engines/titanic/game/broken_pell_base.h b/engines/titanic/game/broken_pell_base.h
index 4ca7eddd20..c5b27d88bf 100644
--- a/engines/titanic/game/broken_pell_base.h
+++ b/engines/titanic/game/broken_pell_base.h
@@ -33,10 +33,10 @@ protected:
static bool _v1;
static int _v2;
- int _fieldE0;
+ int _exitAction;
public:
CLASSDEF;
- CBrokenPellBase() : CBackground(), _fieldE0(0) {}
+ CBrokenPellBase() : CBackground(), _exitAction(0) {}
/**
* Save the data for the class to file
diff --git a/engines/titanic/game/broken_pellerator.cpp b/engines/titanic/game/broken_pellerator.cpp
index 8fb7244b7e..d3664acccd 100644
--- a/engines/titanic/game/broken_pellerator.cpp
+++ b/engines/titanic/game/broken_pellerator.cpp
@@ -34,8 +34,8 @@ END_MESSAGE_MAP()
void CBrokenPellerator::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeQuotedLine(_string2, indent);
- file->writeQuotedLine(_string3, indent);
+ file->writeQuotedLine(_exitLeftView, indent);
+ file->writeQuotedLine(_exitRightView, indent);
file->writeQuotedLine(_string4, indent);
file->writeQuotedLine(_string5, indent);
@@ -44,8 +44,8 @@ void CBrokenPellerator::save(SimpleFile *file, int indent) {
void CBrokenPellerator::load(SimpleFile *file) {
file->readNumber();
- _string2 = file->readString();
- _string3 = file->readString();
+ _exitLeftView = file->readString();
+ _exitRightView = file->readString();
_string4 = file->readString();
_string5 = file->readString();
@@ -86,15 +86,15 @@ bool CBrokenPellerator::ActMsg(CActMsg *msg) {
CStatusChangeMsg statusMsg;
statusMsg.execute("PickupHose");
} else {
- _fieldE0 = 0;
+ _exitAction = 0;
bool closeFlag = msg->_action == "Close";
if (msg->_action == "CloseLeft") {
closeFlag = true;
- _fieldE0 = 1;
+ _exitAction = 1;
}
if (msg->_action == "CloseRight") {
closeFlag = true;
- _fieldE0 = 2;
+ _exitAction = 2;
}
if (closeFlag) {
@@ -105,18 +105,18 @@ bool CBrokenPellerator::ActMsg(CActMsg *msg) {
else
playMovie(14, 28, MOVIE_NOTIFY_OBJECT);
} else {
- switch (_fieldE0) {
+ switch (_exitAction) {
case 1:
- changeView(_string2);
+ changeView(_exitLeftView);
break;
case 2:
- changeView(_string3);
+ changeView(_exitRightView);
break;
default:
break;
}
- _fieldE0 = 0;
+ _exitAction = 0;
}
}
}
@@ -126,23 +126,25 @@ bool CBrokenPellerator::ActMsg(CActMsg *msg) {
bool CBrokenPellerator::MovieEndMsg(CMovieEndMsg *msg) {
if (msg->_endFrame == 14) {
+ // Pellerator has been opened, so let the hose be picked up (if it's still there)
CStatusChangeMsg statusMsg;
statusMsg._newStatus = 1;
statusMsg.execute("PickUpHose");
}
if (msg->_endFrame == 28) {
+ // Pellerator has been closed, so disable the hose (if it's still there)
CStatusChangeMsg statusMsg;
statusMsg._newStatus = 0;
statusMsg.execute("PickUpHose");
}
- switch (_fieldE0) {
+ switch (_exitAction) {
case 1:
- changeView(_string2);
+ changeView(_exitLeftView);
break;
case 2:
- changeView(_string3);
+ changeView(_exitRightView);
break;
default:
break;
diff --git a/engines/titanic/game/broken_pellerator.h b/engines/titanic/game/broken_pellerator.h
index 3b8c3ba587..f243f4ebfe 100644
--- a/engines/titanic/game/broken_pellerator.h
+++ b/engines/titanic/game/broken_pellerator.h
@@ -34,8 +34,8 @@ class CBrokenPellerator : public CBrokenPellBase {
bool ActMsg(CActMsg *msg);
bool MovieEndMsg(CMovieEndMsg *msg);
private:
- CString _string2;
- CString _string3;
+ CString _exitLeftView;
+ CString _exitRightView;
CString _string4;
CString _string5;
public:
diff --git a/engines/titanic/game/broken_pellerator_froz.cpp b/engines/titanic/game/broken_pellerator_froz.cpp
index 690ab76820..7025b37a0c 100644
--- a/engines/titanic/game/broken_pellerator_froz.cpp
+++ b/engines/titanic/game/broken_pellerator_froz.cpp
@@ -85,15 +85,15 @@ bool CBrokenPelleratorFroz::ActMsg(CActMsg *msg) {
statusMsg._newStatus = 0;
statusMsg.execute("FPickUpHose");
} else {
- _fieldE0 = 0;
+ _exitAction = 0;
bool closeFlag = msg->_action == "Close";
if (msg->_action == "CloseLeft") {
closeFlag = true;
- _fieldE0 = 1;
+ _exitAction = 1;
}
if (msg->_action == "CloseRight") {
closeFlag = true;
- _fieldE0 = 2;
+ _exitAction = 2;
}
if (closeFlag) {
@@ -104,7 +104,7 @@ bool CBrokenPelleratorFroz::ActMsg(CActMsg *msg) {
else
playMovie(72, 84, MOVIE_NOTIFY_OBJECT);
} else {
- switch (_fieldE0) {
+ switch (_exitAction) {
case 1:
changeView(_string2);
break;
@@ -115,7 +115,7 @@ bool CBrokenPelleratorFroz::ActMsg(CActMsg *msg) {
break;
}
- _fieldE0 = 0;
+ _exitAction = 0;
}
}
}
@@ -136,12 +136,12 @@ bool CBrokenPelleratorFroz::MovieEndMsg(CMovieEndMsg *msg) {
statusMsg.execute("FPickUpHose");
}
- if (_fieldE0 == 1) {
+ if (_exitAction == 1) {
changeView(_string2);
- _fieldE0 = 0;
- } else if (_fieldE0 == 2) {
+ _exitAction = 0;
+ } else if (_exitAction == 2) {
changeView(_string3);
- _fieldE0 = 0;
+ _exitAction = 0;
}
return true;
diff --git a/engines/titanic/game/cage.cpp b/engines/titanic/game/cage.cpp
index bbac384cea..11f5837e4c 100644
--- a/engines/titanic/game/cage.cpp
+++ b/engines/titanic/game/cage.cpp
@@ -53,7 +53,7 @@ void CCage::load(SimpleFile *file) {
}
bool CCage::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
- if (CParrot::_v4 && !CParrot::_v5) {
+ if (CParrot::_state != PARROT_IN_CAGE && !CParrot::_v5) {
CActMsg actMsg(_open ? "Open" : "Shut");
actMsg.execute(this);
}
@@ -88,7 +88,7 @@ bool CCage::MovieEndMsg(CMovieEndMsg *msg) {
_open = clipExistsByEnd("Shut", msg->_endFrame);
CStatusChangeMsg statusMsg;
- statusMsg._newStatus = _open ? 1 : (CParrot::_v4 == 0 ? 1 : 0);
+ statusMsg._newStatus = _open ? 1 : (CParrot::_state == PARROT_IN_CAGE ? 1 : 0);
statusMsg.execute("PerchCoreHolder");
return true;
@@ -96,14 +96,14 @@ bool CCage::MovieEndMsg(CMovieEndMsg *msg) {
bool CCage::PreEnterViewMsg(CPreEnterViewMsg *msg) {
loadSurface();
- _open = CParrot::_v4 != 0;
+ _open = CParrot::_state != PARROT_IN_CAGE;
loadFrame(_open ? 8 : 0);
return true;
}
bool CCage::MouseMoveMsg(CMouseMoveMsg *msg) {
- _cursorId = CParrot::_v4 && !CParrot::_v5 ? CURSOR_ACTIVATE : CURSOR_ARROW;
+ _cursorId = CParrot::_state != PARROT_IN_CAGE && !CParrot::_v5 ? CURSOR_ACTIVATE : CURSOR_ARROW;
return true;
}
diff --git a/engines/titanic/game/cell_point_button.cpp b/engines/titanic/game/cell_point_button.cpp
index 207dd73543..2afcf39f48 100644
--- a/engines/titanic/game/cell_point_button.cpp
+++ b/engines/titanic/game/cell_point_button.cpp
@@ -30,33 +30,33 @@ BEGIN_MESSAGE_MAP(CCellPointButton, CBackground)
END_MESSAGE_MAP()
CCellPointButton::CCellPointButton() : CBackground() {
- _fieldE0 = 0;
- _fieldE4 = 0;
- _fieldE8 = 0;
- _fieldEC = 0;
+ _unused1 = 0;
+ _unused2 = 0;
+ _unused3 = 0;
+ _unused4 = 0;
_regionNum = 0;
- _fieldF4 = 0;
- _fieldF8 = 0;
- _fieldFC = 0;
- _field100 = 0;
- _field104 = 0;
- _field108 = 1;
+ _unused5 = 0;
+ _unused6 = 0;
+ _unused7 = 0;
+ _unused8 = 0;
+ _unused9 = 0;
+ _unused10 = 1;
}
void CCellPointButton::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_fieldE0, indent);
- file->writeNumberLine(_fieldE4, indent);
- file->writeNumberLine(_fieldE8, indent);
- file->writeNumberLine(_fieldEC, indent);
+ file->writeNumberLine(_unused1, indent);
+ file->writeNumberLine(_unused2, indent);
+ file->writeNumberLine(_unused3, indent);
+ file->writeNumberLine(_unused4, indent);
file->writeNumberLine(_regionNum, indent);
- file->writeNumberLine(_fieldF4, indent);
- file->writeNumberLine(_fieldF8, indent);
- file->writeNumberLine(_fieldFC, indent);
- file->writeNumberLine(_field100, indent);
- file->writeNumberLine(_field104, indent);
- file->writeNumberLine(_field108, indent);
- file->writeQuotedLine(_string3, indent);
+ file->writeNumberLine(_unused5, indent);
+ file->writeNumberLine(_unused6, indent);
+ file->writeNumberLine(_unused7, indent);
+ file->writeNumberLine(_unused8, indent);
+ file->writeNumberLine(_unused9, indent);
+ file->writeNumberLine(_unused10, indent);
+ file->writeQuotedLine(_npcName, indent);
file->writeNumberLine(_dialNum, indent);
CBackground::save(file, indent);
@@ -64,18 +64,18 @@ void CCellPointButton::save(SimpleFile *file, int indent) {
void CCellPointButton::load(SimpleFile *file) {
file->readNumber();
- _fieldE0 = file->readNumber();
- _fieldE4 = file->readNumber();
- _fieldE8 = file->readNumber();
- _fieldEC = file->readNumber();
+ _unused1 = file->readNumber();
+ _unused2 = file->readNumber();
+ _unused3 = file->readNumber();
+ _unused4 = file->readNumber();
_regionNum = file->readNumber();
- _fieldF4 = file->readNumber();
- _fieldF8 = file->readNumber();
- _fieldFC = file->readNumber();
- _field100 = file->readNumber();
- _field104 = file->readNumber();
- _field108 = file->readNumber();
- _string3 = file->readString();
+ _unused5 = file->readNumber();
+ _unused6 = file->readNumber();
+ _unused7 = file->readNumber();
+ _unused8 = file->readNumber();
+ _unused9 = file->readNumber();
+ _unused10 = file->readNumber();
+ _npcName = file->readString();
_dialNum = file->readNumber();
CBackground::load(file);
@@ -83,20 +83,20 @@ void CCellPointButton::load(SimpleFile *file) {
bool CCellPointButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
if (getRandomNumber(2) == 0) {
- CParrotSpeakMsg speakMsg("Cellpoints", _string3);
+ CParrotSpeakMsg speakMsg("Cellpoints", _npcName);
speakMsg.execute("PerchedParrot");
}
playMovie(0);
_regionNum = _regionNum ? 0 : 1;
playSound("z#425.wav");
- talkSetDialRegion(_string3, _dialNum, _regionNum);
+ talkSetDialRegion(_npcName, _dialNum, _regionNum);
return true;
}
bool CCellPointButton::EnterViewMsg(CEnterViewMsg *msg) {
- _regionNum = talkGetDialRegion(_string3, _dialNum);
+ _regionNum = talkGetDialRegion(_npcName, _dialNum);
return true;
}
diff --git a/engines/titanic/game/cell_point_button.h b/engines/titanic/game/cell_point_button.h
index 33f58cbb83..bee73441a8 100644
--- a/engines/titanic/game/cell_point_button.h
+++ b/engines/titanic/game/cell_point_button.h
@@ -32,18 +32,18 @@ class CCellPointButton : public CBackground {
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
bool EnterViewMsg(CEnterViewMsg *msg);
public:
- int _fieldE0;
- int _fieldE4;
- int _fieldE8;
- int _fieldEC;
+ int _unused1;
+ int _unused2;
+ int _unused3;
+ int _unused4;
int _regionNum;
- int _fieldF4;
- int _fieldF8;
- int _fieldFC;
- int _field100;
- int _field104;
- int _field108;
- CString _string3;
+ int _unused5;
+ int _unused6;
+ int _unused7;
+ int _unused8;
+ int _unused9;
+ int _unused10;
+ CString _npcName;
int _dialNum;
public:
CLASSDEF;
diff --git a/engines/titanic/game/fan_control.cpp b/engines/titanic/game/fan_control.cpp
index b3c3b2e816..ca664764ea 100644
--- a/engines/titanic/game/fan_control.cpp
+++ b/engines/titanic/game/fan_control.cpp
@@ -32,17 +32,17 @@ BEGIN_MESSAGE_MAP(CFanControl, CGameObject)
ON_MESSAGE(TimerMsg)
END_MESSAGE_MAP()
-CFanControl::CFanControl() : CGameObject(), _state(-1),
- _enabled(false), _fieldC4(0), _fieldC8(false), _fieldCC(0) {
+CFanControl::CFanControl() : CGameObject(), _state(-1), _enabled(false),
+ _starlings(false), _fanOn(false), _starlingsDying(false) {
}
void CFanControl::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeNumberLine(_state, indent);
file->writeNumberLine(_enabled, indent);
- file->writeNumberLine(_fieldC4, indent);
- file->writeNumberLine(_fieldC8, indent);
- file->writeNumberLine(_fieldCC, indent);
+ file->writeNumberLine(_starlings, indent);
+ file->writeNumberLine(_fanOn, indent);
+ file->writeNumberLine(_starlingsDying, indent);
CGameObject::save(file, indent);
}
@@ -51,9 +51,9 @@ void CFanControl::load(SimpleFile *file) {
file->readNumber();
_state = file->readNumber();
_enabled = file->readNumber();
- _fieldC4 = file->readNumber();
- _fieldC8 = file->readNumber();
- _fieldCC = file->readNumber();
+ _starlings = file->readNumber();
+ _fanOn = file->readNumber();
+ _starlingsDying = file->readNumber();
CGameObject::load(file);
}
@@ -64,22 +64,23 @@ bool CFanControl::ActMsg(CActMsg *msg) {
else if (msg->_action == "DisableObject")
_enabled = false;
else if (msg->_action == "StarlingsDead") {
- _fieldC4 = 0;
+ _starlings = false;
decTransitions();
- _fieldCC = 0;
+ _starlingsDying = false;
}
return true;
}
bool CFanControl::StatusChangeMsg(CStatusChangeMsg *msg) {
- if (!_fieldCC) {
+ if (!_starlingsDying) {
playSound("z#42.wav");
if (_enabled) {
switch (msg->_newStatus) {
case 1:
- _fieldC8 = !_fieldC8;
- if (_fieldC8) {
+ // Fan Power button
+ _fanOn = !_fanOn;
+ if (_fanOn) {
playMovie(6, 8, 0);
_state = 0;
} else {
@@ -104,7 +105,8 @@ bool CFanControl::StatusChangeMsg(CStatusChangeMsg *msg) {
break;
case 2:
- if (_fieldC8) {
+ // Fan Speed button
+ if (_fanOn) {
_state = (_state + 1) % 4;
switch (_state) {
case 0:
@@ -115,9 +117,10 @@ bool CFanControl::StatusChangeMsg(CStatusChangeMsg *msg) {
playMovie(8, 12, 0);
break;
case 2:
- if (_fieldC4) {
+ if (_starlings) {
+ // It's puret time
incTransitions();
- _fieldCC = 1;
+ _starlingsDying = true;
playMovie(12, 18, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
} else {
playMovie(12, 18, 0);
@@ -146,16 +149,20 @@ bool CFanControl::StatusChangeMsg(CStatusChangeMsg *msg) {
bool CFanControl::EnterViewMsg(CEnterViewMsg *msg) {
switch (_state) {
- case 0:
+ case -1:
+ // Fan off
loadFrame(6);
break;
- case 1:
+ case 0:
+ // Low speed
loadFrame(4);
break;
- case 2:
+ case 1:
+ // Medium speed
loadFrame(0);
break;
- case 3:
+ case 2:
+ // High speed
loadFrame(18);
break;
default:
diff --git a/engines/titanic/game/fan_control.h b/engines/titanic/game/fan_control.h
index 1f7402db12..063243c164 100644
--- a/engines/titanic/game/fan_control.h
+++ b/engines/titanic/game/fan_control.h
@@ -37,9 +37,9 @@ class CFanControl : public CGameObject {
public:
int _state;
bool _enabled;
- int _fieldC4;
- bool _fieldC8;
- int _fieldCC;
+ bool _starlings;
+ bool _fanOn;
+ bool _starlingsDying;
public:
CLASSDEF;
CFanControl();
diff --git a/engines/titanic/game/get_lift_eye2.cpp b/engines/titanic/game/get_lift_eye2.cpp
index 914f306f0e..afb2266348 100644
--- a/engines/titanic/game/get_lift_eye2.cpp
+++ b/engines/titanic/game/get_lift_eye2.cpp
@@ -59,12 +59,13 @@ void CGetLiftEye2::load(SimpleFile *file) {
bool CGetLiftEye2::ActMsg(CActMsg *msg) {
*_destObject = msg->_action;
setVisible(true);
+ _cursorId = CURSOR_HAND;
return true;
}
bool CGetLiftEye2::EnterRoomMsg(CEnterRoomMsg *msg) {
CPetControl *pet = getPetControl();
- if (pet->getRoomsElevatorNum() == 4 && CLift::_v1 == 1 && !CLift::_v6) {
+ if (pet->getRoomsElevatorNum() == 4 && CLift::_hasHead && !CLift::_hasCorrectHead) {
_cursorId = CURSOR_HAND;
setVisible(true);
} else {
diff --git a/engines/titanic/game/hammer_dispensor.cpp b/engines/titanic/game/hammer_dispensor.cpp
index bc6a3d5ad8..2450868b14 100644
--- a/engines/titanic/game/hammer_dispensor.cpp
+++ b/engines/titanic/game/hammer_dispensor.cpp
@@ -32,13 +32,13 @@ BEGIN_MESSAGE_MAP(CHammerDispensor, CBackground)
END_MESSAGE_MAP()
CHammerDispensor::CHammerDispensor() : CBackground(),
- _fieldE0(false), _fieldE4(true), _state(0) {
+ _isOpen(false), _panUp(true), _state(0) {
}
void CHammerDispensor::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_fieldE0, indent);
- file->writeNumberLine(_fieldE4, indent);
+ file->writeNumberLine(_isOpen, indent);
+ file->writeNumberLine(_panUp, indent);
file->writeNumberLine(_state, indent);
CBackground::save(file, indent);
@@ -46,44 +46,44 @@ void CHammerDispensor::save(SimpleFile *file, int indent) {
void CHammerDispensor::load(SimpleFile *file) {
file->readNumber();
- _fieldE0 = file->readNumber();
- _fieldE4 = file->readNumber();
+ _isOpen = file->readNumber();
+ _panUp = file->readNumber();
_state = file->readNumber();
CBackground::load(file);
}
bool CHammerDispensor::ActMsg(CActMsg *msg) {
- if (msg->_action == "DispenseHammer" && !_fieldE0) {
+ if (msg->_action == "DispenseHammer" && !_isOpen) {
_state = 1;
playMovie(15, 31, MOVIE_NOTIFY_OBJECT);
- _fieldE0 = true;
+ _isOpen = true;
}
- if (msg->_action == "HammerTaken" && _fieldE0)
+ if (msg->_action == "HammerTaken" && _isOpen)
loadFrame(32);
return true;
}
bool CHammerDispensor::EnterViewMsg(CEnterViewMsg *msg) {
- if (_fieldE4) {
+ if (_panUp) {
playMovie(7, 14, 0);
- _fieldE4 = false;
+ _panUp = false;
}
return true;
}
bool CHammerDispensor::LeaveViewMsg(CLeaveViewMsg *msg) {
- _fieldE4 = true;
- _fieldE0 = 0;
- _state = 2;
-
- if (_fieldE0)
+ if (_isOpen)
playMovie(32, 50, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
else
playMovie(0, 7, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
+
+ _panUp = true;
+ _isOpen = false;
+ _state = 2;
return true;
}
diff --git a/engines/titanic/game/hammer_dispensor.h b/engines/titanic/game/hammer_dispensor.h
index 2383a3349e..f93f4141ab 100644
--- a/engines/titanic/game/hammer_dispensor.h
+++ b/engines/titanic/game/hammer_dispensor.h
@@ -34,8 +34,8 @@ class CHammerDispensor : public CBackground {
bool LeaveViewMsg(CLeaveViewMsg *msg);
bool MovieEndMsg(CMovieEndMsg *msg);
private:
- bool _fieldE0;
- bool _fieldE4;
+ bool _isOpen;
+ bool _panUp;
int _state;
public:
CLASSDEF;
diff --git a/engines/titanic/game/hammer_dispensor_button.cpp b/engines/titanic/game/hammer_dispensor_button.cpp
index 89d37a0476..661a92eb17 100644
--- a/engines/titanic/game/hammer_dispensor_button.cpp
+++ b/engines/titanic/game/hammer_dispensor_button.cpp
@@ -34,36 +34,36 @@ BEGIN_MESSAGE_MAP(CHammerDispensorButton, CStartAction)
END_MESSAGE_MAP()
CHammerDispensorButton::CHammerDispensorButton() : CStartAction(),
- _fieldF8(0), _fieldFC(0), _field100(0), _btnPos(Point(56, 6)),
- _field10C(nullptr), _field110(0) {
+ _active(false), _open(false), _hitCounter(0), _btnPos(Point(56, 6)),
+ _perch(nullptr), _hammerTaken(0) {
}
void CHammerDispensorButton::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_fieldF8, indent);
- file->writeNumberLine(_fieldFC, indent);
- file->writeNumberLine(_field100, indent);
+ file->writeNumberLine(_active, indent);
+ file->writeNumberLine(_open, indent);
+ file->writeNumberLine(_hitCounter, indent);
file->writeNumberLine(_btnPos.x, indent);
file->writeNumberLine(_btnPos.y, indent);
- file->writeNumberLine(_field110, indent);
+ file->writeNumberLine(_hammerTaken, indent);
CStartAction::save(file, indent);
}
void CHammerDispensorButton::load(SimpleFile *file) {
file->readNumber();
- _fieldF8 = file->readNumber();
- _fieldFC = file->readNumber();
- _field100 = file->readNumber();
+ _active = file->readNumber();
+ _open = file->readNumber();
+ _hitCounter = file->readNumber();
_btnPos.x = file->readNumber();
_btnPos.y = file->readNumber();
- _field110 = file->readNumber();
+ _hammerTaken = file->readNumber();
CStartAction::load(file);
}
bool CHammerDispensorButton::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
- _fieldF8 = 1;
+ _active = true;
return true;
}
@@ -75,54 +75,47 @@ bool CHammerDispensorButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
bool CHammerDispensorButton::ActMsg(CActMsg *msg) {
if (msg->_action == "HammerTaken")
- _field110 = true;
+ _hammerTaken = true;
return true;
}
bool CHammerDispensorButton::FrameMsg(CFrameMsg *msg) {
- if (!_fieldF8)
+ if (!_active)
return true;
- if (!_field10C) {
+ if (!_perch) {
CGameObject *obj = getDraggingObject();
if (obj) {
if (obj->isEquals("Perch") && getView() == findView())
- _field10C = obj;
+ _perch = static_cast<CPerch *>(obj);
}
}
- if (_field10C) {
- Point pt(_btnPos.x + _bounds.left, _btnPos.y + _bounds.top);
+ if (_perch) {
+ Point pt(_btnPos.x + _perch->_bounds.left, _btnPos.y + _perch->_bounds.top);
bool flag = checkPoint(pt, true);
- switch (_fieldFC) {
- case 0:
+ if (!_open) {
if (flag) {
playSound("z#93.wav");
- if (++_field100 == 5) {
- if (!_field110) {
+ if (++_hitCounter == 5) {
+ if (!_hammerTaken) {
CActMsg actMsg(_msgAction);
actMsg.execute(_msgTarget);
}
setVisible(false);
- _fieldF8 = 0;
- _field100 = 0;
+ _active = false;
+ _hitCounter = 0;
}
- _fieldFC = 1;
+ _open = true;
}
- break;
-
- case 1:
+ } else {
if (!flag) {
- _fieldFC = 0;
- ++_field100;
+ _open = false;
+ ++_hitCounter;
}
- break;
-
- default:
- break;
}
}
@@ -130,15 +123,15 @@ bool CHammerDispensorButton::FrameMsg(CFrameMsg *msg) {
}
bool CHammerDispensorButton::LeaveViewMsg(CLeaveViewMsg *msg) {
- _field10C = nullptr;
- _field100 = 0;
- _fieldFC = 0;
+ _perch = nullptr;
+ _hitCounter = 0;
+ _open = false;
return true;
}
bool CHammerDispensorButton::EnterViewMsg(CEnterViewMsg *msg) {
setVisible(true);
- _fieldF8 = 1;
+ _active = true;
return true;
}
diff --git a/engines/titanic/game/hammer_dispensor_button.h b/engines/titanic/game/hammer_dispensor_button.h
index f497b9dae1..0194021943 100644
--- a/engines/titanic/game/hammer_dispensor_button.h
+++ b/engines/titanic/game/hammer_dispensor_button.h
@@ -24,6 +24,7 @@
#define TITANIC_HAMMER_DISPENSOR_BUTTON_H
#include "titanic/game/start_action.h"
+#include "titanic/carry/perch.h"
namespace Titanic {
@@ -36,12 +37,12 @@ class CHammerDispensorButton : public CStartAction {
bool LeaveViewMsg(CLeaveViewMsg *msg);
bool EnterViewMsg(CEnterViewMsg *msg);
private:
- int _fieldF8;
- int _fieldFC;
- int _field100;
+ bool _active;
+ bool _open;
+ int _hitCounter;
Point _btnPos;
- CGameObject *_field10C;
- int _field110;
+ CPerch *_perch;
+ bool _hammerTaken;
public:
CLASSDEF;
CHammerDispensorButton();
diff --git a/engines/titanic/game/maitred/maitred_arm_holder.cpp b/engines/titanic/game/maitred/maitred_arm_holder.cpp
index 75d95640d2..51c19561a7 100644
--- a/engines/titanic/game/maitred/maitred_arm_holder.cpp
+++ b/engines/titanic/game/maitred/maitred_arm_holder.cpp
@@ -40,7 +40,7 @@ void CMaitreDArmHolder::load(SimpleFile *file) {
}
bool CMaitreDArmHolder::MaitreDArmHolder(CMaitreDArmHolder *msg) {
- _fieldF4 = 0;
+ _dropEnabled = false;
return true;
}
diff --git a/engines/titanic/game/missiveomat.cpp b/engines/titanic/game/missiveomat.cpp
index 8f7845bc3f..fa0a9d7c74 100644
--- a/engines/titanic/game/missiveomat.cpp
+++ b/engines/titanic/game/missiveomat.cpp
@@ -34,8 +34,8 @@ BEGIN_MESSAGE_MAP(CMissiveOMat, CGameObject)
ON_MESSAGE(LeaveViewMsg)
END_MESSAGE_MAP()
-CMissiveOMat::CMissiveOMat() : CGameObject(), _mode(1),
- _totalMessages(0), _messageNum(0), _personIndex(-1) {
+CMissiveOMat::CMissiveOMat() : CGameObject(), _mode(MMODE_USERNAME),
+ _totalMessages(0), _messageNum(0), _account(NO_ACCOUNT) {
// Load data for the messages, their from and to names
loadArray(_welcomeMessages, "TEXT/MISSIVEOMAT/WELCOME", 3);
loadArray(_messages, "TEXT/MISSIVEOMAT/MESSAGES", 58);
@@ -55,129 +55,150 @@ void CMissiveOMat::save(SimpleFile *file, int indent) {
file->writeNumberLine(_mode, indent);
file->writeNumberLine(_totalMessages, indent);
file->writeNumberLine(_messageNum, indent);
- file->writeQuotedLine(_string1, indent);
- file->writeQuotedLine(_string2, indent);
- file->writeNumberLine(_personIndex, indent);
+ file->writeQuotedLine(_username, indent);
+ file->writeQuotedLine(_password, indent);
+ file->writeNumberLine(_account, indent);
CGameObject::save(file, indent);
}
void CMissiveOMat::load(SimpleFile *file) {
file->readNumber();
- _mode = file->readNumber();
+ _mode = (MissiveOMatMode)file->readNumber();
_totalMessages = file->readNumber();
_messageNum = file->readNumber();
- _string1 = file->readString();
- _string2 = file->readString();
- _personIndex = file->readNumber();
+ _username = file->readString();
+ _password = file->readString();
+ _account = (MissiveOMatAccount)file->readNumber();
CGameObject::load(file);
}
bool CMissiveOMat::EnterViewMsg(CEnterViewMsg *msg) {
- CMissiveOMatActionMsg actionMsg(9);
+ CMissiveOMatActionMsg actionMsg(MESSAGE_9);
actionMsg.execute(this);
return true;
}
bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
CTreeItem *loginControl = findRoom()->findByName("MissiveOMat Login Control");
- CTreeItem *welcome = findRoom()->findByName("MissiveOMat Welcome");
- CTreeItem *scrollUp = findRoom()->findByName("MissiveOMat ScrollUp Button");
CEditControlMsg editMsg;
switch (_mode) {
- case 1: {
+ case MMODE_USERNAME:
+ if (!msg->_key)
+ return true;
+
playSound("z#228.wav");
- editMsg._mode = 6;
+ editMsg._mode = EDIT_KEYPRESS;
editMsg._param = msg->_key;
editMsg.execute(loginControl);
if (editMsg._param == 1000) {
- editMsg._mode = 3;
+ // Get the username
+ editMsg._mode = EDIT_GET_TEXT;
editMsg.execute(loginControl);
+ _username = editMsg._text;
+ _username.toLowercase();
- _string1 = editMsg._text;
- if (!_string1.empty()) {
+ // Next ask for the password
+ if (!_username.empty()) {
loadFrame(2);
- _mode = 2;
+ _mode = MMODE_PASSWORD;
- editMsg._mode = 1;
+ editMsg._mode = EDIT_CLEAR;
editMsg.execute(loginControl);
- editMsg._mode = 10;
+ editMsg._mode = EDIT_BORDERS;
editMsg._param = 24;
editMsg.execute(loginControl);
}
}
break;
- }
- case 2: {
+ case MMODE_PASSWORD:
+ if (!msg->_key)
+ return true;
+
playSound("z#228.wav");
- editMsg._mode = 6;
+ editMsg._mode = EDIT_KEYPRESS;
editMsg._param = msg->_key;
editMsg.execute(loginControl);
- _string2 = editMsg._text;
- if (_string1 == "Droot Scraliontis") {
- _string1 = "Scraliontis";
- } else if (_string1 == "Antar Brobostigon") {
- _string1 = "Brobostigon";
- } else if (_string1 == "colin") {
- _string1 = "Leovinus";
- }
-
- bool flag = false;
- if (_string1 == "Leovinus") {
- if (_string2 == "Other") {
- flag = true;
- _personIndex = 0;
- }
- } else if (_string1 == "Scraliontis") {
- if (_string2 == "This") {
- flag = true;
- _personIndex = 1;
+ if (editMsg._param == 1000) {
+ // Get the password
+ editMsg._mode = EDIT_GET_TEXT;
+ editMsg.execute(loginControl);
+ _password = editMsg._text;
+ _password.toLowercase();
+
+ // Handle special variations of the names
+ if (_username == "droot scraliontis") {
+ _username = "scraliontis";
+ } else if (_username == "antar brobostigon") {
+ _username = "brobostigon";
+ } else if (_username == "colin") {
+ _username = "leovinus";
}
- } else if (_string1 == "Brobostigon") {
- if (_string2 == "That") {
- flag = true;
- _personIndex = 2;
+
+ // Check whether a valid username and password has been entered
+ static const char *const PASSWORDS_EN[3] = { "other", "this", "that" };
+ static const char *const PASSWORDS_DE[3] = { "t'ok", "t'ik", "t'ak" };
+ static const char *const *pwds = g_vm->isGerman() ? PASSWORDS_DE : PASSWORDS_EN;
+
+ bool validFlag = false;
+ if ((_username == "leovinus" && _password == pwds[0]) ||
+ (_username == "scummvm")) {
+ validFlag = true;
+ _account = LEOVINUS;
+ } else if (_username == "scraliontis" && _password == pwds[1]) {
+ validFlag = true;
+ _account = SCRALIONTIS;
+ } else if (_username == "brobostigon" && _password == pwds[2]) {
+ validFlag = true;
+ _account = BROBOSTIGON;
}
- }
- if (flag) {
- _mode = 4;
- loadFrame(4);
- editMsg._mode = 1;
- editMsg.execute(loginControl);
+ if (validFlag) {
+ // Credentials were valid, so log in
+ _mode = MMODE_LOGGED_IN;
+ loadFrame(4);
+ editMsg._mode = EDIT_CLEAR;
+ editMsg.execute(loginControl);
- getTextCursor()->hide();
- editMsg._mode = 13;
- editMsg.execute(loginControl);
+ CRoomItem *room = findRoom();
+ CTreeItem *welcome = room->findByName("MissiveOMat Welcome");
+ CTreeItem *scrollUp = room->findByName("MissiveOMat ScrollUp Button");
+ CTreeItem *scrollDown = room->findByName("MissiveOMat ScrollDown Button");
+ CTreeItem *ok = room->findByName("MissiveOMat OK Button");
- editMsg._mode = 12;
- editMsg.execute(welcome);
+ getTextCursor()->hide();
+ editMsg._mode = EDIT_HIDE;
+ editMsg.execute(loginControl);
- editMsg._mode = 2;
- editMsg._text = _welcomeMessages[_personIndex];
- editMsg.execute(welcome);
+ editMsg._mode = EDIT_SHOW;
+ editMsg.execute(welcome);
- editMsg._mode = 12;
- editMsg._text = "MissiveOMat OK Button";
- editMsg.execute(welcome);
- editMsg.execute(scrollUp);
- } else {
- _mode = 3;
- loadFrame(3);
- addTimer(1500);
+ editMsg._mode = EDIT_SET_TEXT;
+ editMsg._text = _welcomeMessages[_account];
+ editMsg.execute(welcome);
- editMsg._mode = 1;
- editMsg.execute(loginControl);
+ editMsg._mode = EDIT_SHOW;
+ editMsg.execute(ok);
+ editMsg.execute(scrollUp);
+ editMsg.execute(scrollDown);
+ } else {
+ // Credentials were invalid, so access denied
+ _mode = MMODE_DENIED;
+ loadFrame(3);
+ addTimer(1500);
+
+ editMsg._mode = EDIT_CLEAR;
+ editMsg.execute(loginControl);
- getTextCursor()->hide();
+ getTextCursor()->hide();
+ }
}
break;
- }
default:
break;
@@ -187,10 +208,14 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
}
bool CMissiveOMat::TimerMsg(CTimerMsg *msg) {
- if (_mode == 3) {
+ if (_mode == MMODE_DENIED) {
+ // Reset back to asking for a login username
+ _mode = MMODE_USERNAME;
+ loadFrame(1);
+
CTreeItem *loginControl = findRoom()->findByName("MissiveOMat Login Control");
CEditControlMsg editMsg;
- editMsg._mode = 10;
+ editMsg._mode = EDIT_BORDERS;
editMsg._param = 8;
editMsg.execute(loginControl);
}
@@ -199,16 +224,17 @@ bool CMissiveOMat::TimerMsg(CTimerMsg *msg) {
}
bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) {
- CTreeItem *welcome = findByName("MissiveOMat Welcome");
+ CGameObject *welcome = static_cast<CGameObject *>(findByName("MissiveOMat Welcome"));
switch (msg->_action) {
case MESSAGE_SHOW: {
- CTreeItem *btnOk = findRoom()->findByName("MissiveOMat OK Button");
- CTreeItem *btnNext = findRoom()->findByName("MissiveOMat Next Button");
- CTreeItem *btnPrev = findRoom()->findByName("MissiveOMat Prev Button");
- CTreeItem *btnLogout = findRoom()->findByName("MissiveOMat Logout Button");
+ CRoomItem *room = findRoom();
+ CTreeItem *btnOk = room->findByName("MissiveOMat OK Button");
+ CTreeItem *btnNext = room->findByName("MissiveOMat Next Button");
+ CTreeItem *btnPrev = room->findByName("MissiveOMat Prev Button");
+ CTreeItem *btnLogout = room->findByName("MissiveOMat Logout Button");
- _mode = MESSAGE_5;
+ _mode = MMODE_5;
CVisibleMsg visibleMsg;
visibleMsg._visible = false;
visibleMsg.execute(btnOk);
@@ -219,7 +245,7 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) {
_messageNum = 0;
_totalMessages = 0;
- CString *strP = &_messages[_personIndex * 19];
+ CString *strP = &_messages[_account * 19];
for (_totalMessages = 0; !strP->empty(); ++strP, ++_totalMessages)
;
@@ -256,58 +282,58 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) {
case MESSAGE_DOWN:
if (welcome)
- scrollTextDown();
+ welcome->scrollTextDown();
break;
case MESSAGE_UP:
if (welcome)
- scrollTextUp();
+ welcome->scrollTextUp();
break;
case REDRAW_MESSAGE:
if (welcome) {
CString str = CString::format(
"Missive %d of %d.\nFrom: %s\nTo: %s\n\n%s\n",
- _messageNum + 1, _totalMessages, _from[_messageNum].c_str(),
- _to[_messageNum].c_str(), _messages[_messageNum].c_str());
+ _messageNum + 1, _totalMessages, _from[_account * 19 + _messageNum].c_str(),
+ _to[_account * 19 + _messageNum].c_str(), _messages[_account * 19 + _messageNum].c_str());
- setText(str);
+ welcome->setText(str);
}
break;
case MESSAGE_9: {
loadFrame(1);
- _mode = MESSAGE_NONE;
- _personIndex = -1;
-
- static const char *const WIDGETS[7] = {
- "MissiveOMat Login Control", "MissiveOMat OK Button",
- "MissiveOMat Next Button", "MissiveOMat Prev Button",
- "MissiveOMat Logout Button", "MissiveOMat ScrollDown Button",
- "MissiveOMat ScrollUp Button"
+ _mode = MMODE_USERNAME;
+ _account = NO_ACCOUNT;
+
+ static const char *const WIDGETS[8] = {
+ "MissiveOMat Login Control", "MissiveOMat Welcome",
+ "MissiveOMat OK Button", "MissiveOMat Next Button",
+ "MissiveOMat Prev Button", "MissiveOMat Logout Button",
+ "MissiveOMat ScrollDown Button", "MissiveOMat ScrollUp Button"
};
CEditControlMsg editMsg;
- for (int idx = 0; idx < 7; ++idx) {
- editMsg._mode = 0;
+ for (int idx = 0; idx < 8; ++idx) {
+ editMsg._mode = EDIT_INIT;
editMsg._param = 12;
editMsg.execute(WIDGETS[idx]);
- editMsg._mode = 1;
+ editMsg._mode = EDIT_CLEAR;
editMsg.execute(WIDGETS[idx]);
- editMsg._mode = 13;
+ editMsg._mode = EDIT_HIDE;
editMsg.execute(WIDGETS[idx]);
}
- editMsg._mode = 12;
+ editMsg._mode = EDIT_SHOW;
editMsg.execute("MissiveOMat Login Control");
- editMsg._mode = 10;
+ editMsg._mode = EDIT_BORDERS;
editMsg._param = 8;
editMsg.execute("MissiveOMat Login Control");
- editMsg._mode = 8;
+ editMsg._mode = EDIT_SHOW_CURSOR;
editMsg.execute("MissiveOMat Login Control");
- _string1.clear();
- _string2.clear();
+ _username.clear();
+ _password.clear();
break;
}
@@ -320,7 +346,7 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) {
bool CMissiveOMat::LeaveViewMsg(CLeaveViewMsg *msg) {
CEditControlMsg editMsg;
- editMsg._mode = 9;
+ editMsg._mode = EDIT_HIDE_CURSOR;
editMsg.execute("MissiveOMat Login Control");
petShowCursor();
diff --git a/engines/titanic/game/missiveomat.h b/engines/titanic/game/missiveomat.h
index 9810fcc403..c8441edff2 100644
--- a/engines/titanic/game/missiveomat.h
+++ b/engines/titanic/game/missiveomat.h
@@ -27,10 +27,16 @@
namespace Titanic {
-enum MissiveOMatAction {
- MESSAGE_NONE = 1, MESSAGE_SHOW = 2, NEXT_MESSAGE = 3, PRIOR_MESSAGE = 4,
- MESSAGE_5 = 5, MESSAGE_DOWN = 6, MESSAGE_UP = 7, REDRAW_MESSAGE = 8,
- MESSAGE_9 = 9
+enum MissiveOMatMode {
+ MMODE_USERNAME = 1,
+ MMODE_PASSWORD = 2,
+ MMODE_DENIED = 3,
+ MMODE_LOGGED_IN = 4,
+ MMODE_5 = 5
+};
+
+enum MissiveOMatAccount {
+ NO_ACCOUNT = -1, LEOVINUS = 0, SCRALIONTIS = 1, BROBOSTIGON = 2
};
class CMissiveOMat : public CGameObject {
@@ -48,12 +54,12 @@ private:
private:
void loadArray(CString *arr, const CString &resName, int count);
public:
- int _mode;
+ MissiveOMatMode _mode;
int _totalMessages;
int _messageNum;
- CString _string1;
- CString _string2;
- int _personIndex;
+ CString _username;
+ CString _password;
+ MissiveOMatAccount _account;
public:
CLASSDEF;
CMissiveOMat();
diff --git a/engines/titanic/game/missiveomat_button.cpp b/engines/titanic/game/missiveomat_button.cpp
index b7ad7f8f6f..8c1f6c51c6 100644
--- a/engines/titanic/game/missiveomat_button.cpp
+++ b/engines/titanic/game/missiveomat_button.cpp
@@ -40,7 +40,7 @@ void CMissiveOMatButton::save(SimpleFile *file, int indent) {
void CMissiveOMatButton::load(SimpleFile *file) {
file->readNumber();
- _buttonId = file->readNumber();
+ _buttonId = (MissiveOMatAction)file->readNumber();
CEditControl::load(file);
}
diff --git a/engines/titanic/game/missiveomat_button.h b/engines/titanic/game/missiveomat_button.h
index 6dbfd4cd56..b029f6ce85 100644
--- a/engines/titanic/game/missiveomat_button.h
+++ b/engines/titanic/game/missiveomat_button.h
@@ -24,6 +24,7 @@
#define TITANIC_MISSIVEOMAT_BUTTON_H
#include "titanic/gfx/edit_control.h"
+#include "titanic/messages/messages.h"
namespace Titanic {
@@ -33,10 +34,10 @@ class CMissiveOMatButton : public CEditControl {
bool VisibleMsg(CVisibleMsg *msg);
bool MouseDoubleClickMsg(CMouseDoubleClickMsg *msg);
public:
- int _buttonId;
+ MissiveOMatAction _buttonId;
public:
CLASSDEF;
- CMissiveOMatButton() : CEditControl(), _buttonId(2) {}
+ CMissiveOMatButton() : CEditControl(), _buttonId(MESSAGE_SHOW) {}
/**
* Save the data for the class to file
diff --git a/engines/titanic/game/music_system_lock.cpp b/engines/titanic/game/music_system_lock.cpp
index 074864e7c3..e28882f600 100644
--- a/engines/titanic/game/music_system_lock.cpp
+++ b/engines/titanic/game/music_system_lock.cpp
@@ -50,14 +50,16 @@ bool CMusicSystemLock::DropObjectMsg(CDropObjectMsg *msg) {
playMovie(MOVIE_NOTIFY_OBJECT);
}
- return true;
+ return false;
}
bool CMusicSystemLock::MovieEndMsg(CMovieEndMsg *msg) {
CTreeItem *phonograph = findRoom()->findByName("Restaurant Phonograph");
+
+ // Toggle the locked status of the music system
CQueryPhonographState queryMsg;
queryMsg.execute(phonograph);
- CLockPhonographMsg lockMsg(queryMsg._value);
+ CLockPhonographMsg lockMsg(!queryMsg._value);
lockMsg.execute(phonograph, nullptr, MSGFLAG_SCAN);
setVisible(false);
diff --git a/engines/titanic/game/nose_holder.cpp b/engines/titanic/game/nose_holder.cpp
index ac6c10dafd..d00c7b372e 100644
--- a/engines/titanic/game/nose_holder.cpp
+++ b/engines/titanic/game/nose_holder.cpp
@@ -33,25 +33,25 @@ BEGIN_MESSAGE_MAP(CNoseHolder, CDropTarget)
END_MESSAGE_MAP()
CNoseHolder::CNoseHolder() : CDropTarget(), _dragObject(nullptr),
- _field11C(0) {
+ _draggingFeather(false) {
}
void CNoseHolder::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_field11C, indent);
+ file->writeNumberLine(_draggingFeather, indent);
CDropTarget::save(file, indent);
}
void CNoseHolder::load(SimpleFile *file) {
file->readNumber();
- _field11C = file->readNumber();
+ _draggingFeather = file->readNumber();
CDropTarget::load(file);
}
bool CNoseHolder::ActMsg(CActMsg *msg) {
- if (msg->_action == "Sneeze" && !_itemName.empty() && _fieldF4) {
+ if (msg->_action == "Sneeze" && !_itemName.empty() && _dropEnabled) {
CProximity prox;
prox._positioningMode = POSMODE_VECTOR;
playSound("z#35.wav", prox);
@@ -78,13 +78,12 @@ bool CNoseHolder::FrameMsg(CFrameMsg *msg) {
}
if (_dragObject) {
- if (!checkPoint(Point(_dragObject->_bounds.left,
- _dragObject->_bounds.top))) {
- _field11C = false;
- } else if (!_field11C) {
+ if (!checkPoint(Point(_dragObject->_bounds.left, _dragObject->_bounds.top), true)) {
+ _draggingFeather = false;
+ } else if (!_draggingFeather) {
CActMsg actMsg("Sneeze");
actMsg.execute(this);
- _field11C = true;
+ _draggingFeather = true;
}
}
@@ -92,9 +91,9 @@ bool CNoseHolder::FrameMsg(CFrameMsg *msg) {
}
bool CNoseHolder::LeaveViewMsg(CLeaveViewMsg *msg) {
- _field11C = false;
+ _draggingFeather = false;
_dragObject = nullptr;
- if (_fieldF4) {
+ if (_dropEnabled) {
loadFrame(_dropFrame);
setVisible(false);
}
@@ -103,7 +102,7 @@ bool CNoseHolder::LeaveViewMsg(CLeaveViewMsg *msg) {
}
bool CNoseHolder::MovieEndMsg(CMovieEndMsg *msg) {
- if (_fieldF4) {
+ if (_dropEnabled) {
loadFrame(_dropFrame);
setVisible(false);
}
@@ -112,7 +111,7 @@ bool CNoseHolder::MovieEndMsg(CMovieEndMsg *msg) {
}
bool CNoseHolder::EnterViewMsg(CEnterViewMsg *msg) {
- if (_fieldF4)
+ if (_dropEnabled)
setVisible(false);
return CDropTarget::EnterViewMsg(msg);
diff --git a/engines/titanic/game/nose_holder.h b/engines/titanic/game/nose_holder.h
index 7b3fbba625..ef20b6f78e 100644
--- a/engines/titanic/game/nose_holder.h
+++ b/engines/titanic/game/nose_holder.h
@@ -36,7 +36,7 @@ class CNoseHolder : public CDropTarget {
bool EnterViewMsg(CEnterViewMsg *msg);
private:
CGameObject *_dragObject;
- int _field11C;
+ bool _draggingFeather;
public:
CLASSDEF;
CNoseHolder();
diff --git a/engines/titanic/game/parrot/parrot_nut_eater.cpp b/engines/titanic/game/parrot/parrot_nut_eater.cpp
index 49b8de509f..b9697d7b61 100644
--- a/engines/titanic/game/parrot/parrot_nut_eater.cpp
+++ b/engines/titanic/game/parrot/parrot_nut_eater.cpp
@@ -66,6 +66,7 @@ bool CParrotNutEater::ReplaceBowlAndNutsMsg(CReplaceBowlAndNutsMsg *msg) {
bool CParrotNutEater::NutPuzzleMsg(CNutPuzzleMsg *msg) {
if (msg->_value == "Jiggle") {
+ setVisible(true);
playMovie(MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
movieEvent(68);
movieEvent(132);
diff --git a/engines/titanic/game/parrot/parrot_perch_holder.cpp b/engines/titanic/game/parrot/parrot_perch_holder.cpp
index b1a7dabfbf..557f70437a 100644
--- a/engines/titanic/game/parrot/parrot_perch_holder.cpp
+++ b/engines/titanic/game/parrot/parrot_perch_holder.cpp
@@ -45,10 +45,10 @@ void CParrotPerchHolder::load(SimpleFile *file) {
}
bool CParrotPerchHolder::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
- if (CParrot::_v1) {
+ if (!CParrot::_v1) {
if (CCage::_open) {
petDisplayMessage(CANNOT_TAKE_CAGE_LOCKED);
- } else if (!CParrot::_v4) {
+ } else if (CParrot::_state == PARROT_IN_CAGE) {
CTrueTalkTriggerActionMsg triggerMsg(280252, 0, 0);
triggerMsg.execute(getRoot(), CParrot::_type,
MSGFLAG_CLASS_DEF | MSGFLAG_BREAK_IF_HANDLED | MSGFLAG_SCAN);
@@ -59,7 +59,7 @@ bool CParrotPerchHolder::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
}
bool CParrotPerchHolder::StatusChangeMsg(CStatusChangeMsg *msg) {
- _fieldF4 = msg->_newStatus;
+ _dropEnabled = msg->_newStatus;
return true;
}
diff --git a/engines/titanic/game/parrot/player_meets_parrot.cpp b/engines/titanic/game/parrot/player_meets_parrot.cpp
index cdb14516bf..e573ba41c9 100644
--- a/engines/titanic/game/parrot/player_meets_parrot.cpp
+++ b/engines/titanic/game/parrot/player_meets_parrot.cpp
@@ -39,7 +39,7 @@ void CPlayerMeetsParrot::load(SimpleFile *file) {
}
bool CPlayerMeetsParrot::EnterRoomMsg(CEnterRoomMsg *msg) {
- stateSet24();
+ stateSetParrotMet();
return true;
}
diff --git a/engines/titanic/game/pet/pet_sounds.cpp b/engines/titanic/game/pet/pet_sounds.cpp
index c7f3cd3bf8..b2c9902cc8 100644
--- a/engines/titanic/game/pet/pet_sounds.cpp
+++ b/engines/titanic/game/pet/pet_sounds.cpp
@@ -44,7 +44,7 @@ void CPETSounds::load(SimpleFile *file) {
bool CPETSounds::PETPlaySoundMsg(CPETPlaySoundMsg *msg) {
if (msg->_soundNum == 1) {
playSound("z#65.wav");
- } else if (msg->_soundNum == 2 && stateGet24()) {
+ } else if (msg->_soundNum == 2 && stateGetParrotMet()) {
uint ticks = getTicksCount();
if (!_ticks || ticks > (_ticks + 12000)) {
playSound("z#36.wav");
diff --git a/engines/titanic/game/phonograph_lid.cpp b/engines/titanic/game/phonograph_lid.cpp
index d1ab478f3d..e4e5f4882c 100644
--- a/engines/titanic/game/phonograph_lid.cpp
+++ b/engines/titanic/game/phonograph_lid.cpp
@@ -47,18 +47,18 @@ bool CPhonographLid::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
CQueryPhonographState stateMsg;
stateMsg.execute(getParent(), nullptr, MSGFLAG_SCAN);
if (stateMsg._value) {
+ petDisplayMessage(0, LOCKED_MUSIC_SYSTEM);
+ } else {
if (_open) {
+ playMovie(27, 55, 0);
+ } else {
CGameObject *lock = dynamic_cast<CGameObject *>(findByName("Music System Lock"));
if (lock)
lock->setVisible(false);
playMovie(0, 27, 0);
- } else {
- playMovie(27, 55, 0);
}
_open = !_open;
- } else {
- petDisplayMessage(0, LOCKED_MUSIC_SYSTEM);
}
return true;
diff --git a/engines/titanic/game/pickup/pick_up_hose.cpp b/engines/titanic/game/pickup/pick_up_hose.cpp
index d07088cefd..442c43f9b0 100644
--- a/engines/titanic/game/pickup/pick_up_hose.cpp
+++ b/engines/titanic/game/pickup/pick_up_hose.cpp
@@ -72,13 +72,13 @@ bool CPickUpHose::MouseDragStartMsg(CMouseDragStartMsg *msg) {
if (hose) {
CVisibleMsg visibleMsg;
- visibleMsg.execute(this);
- moveUnder(view);
+ visibleMsg.execute(hose);
+ hose->moveUnder(view);
CPassOnDragStartMsg passMsg(msg->_mousePos, 1);
passMsg.execute("Hose");
- msg->_dragItem = getRoot()->findByName("Hose");
+ msg->_dragItem = hose;
_cursorId = CURSOR_IGNORE;
CActMsg actMsg("PlayerGetsHose");
@@ -91,7 +91,7 @@ bool CPickUpHose::MouseDragStartMsg(CMouseDragStartMsg *msg) {
bool CPickUpHose::StatusChangeMsg(CStatusChangeMsg *msg) {
_cursorId = msg->_newStatus == 1 ? CURSOR_HAND : CURSOR_IGNORE;
- return true;
+ return CPickUp::StatusChangeMsg(msg);
}
bool CPickUpHose::EnterViewMsg(CEnterViewMsg *msg) {
diff --git a/engines/titanic/game/restaurant_cylinder_holder.cpp b/engines/titanic/game/restaurant_cylinder_holder.cpp
index adf029d8f7..5fb8c97cde 100644
--- a/engines/titanic/game/restaurant_cylinder_holder.cpp
+++ b/engines/titanic/game/restaurant_cylinder_holder.cpp
@@ -71,7 +71,7 @@ bool CRestaurantCylinderHolder::EjectCylinderMsg(CEjectCylinderMsg *msg) {
if (_field118) {
playClip(hasCylinder ? "CloseHolder_Full" : "CloseHolder_Empty",
MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
- _fieldF4 = 1;
+ _dropEnabled = true;
} else {
playClip(hasCylinder ? "OpenHolder_Full" : "OpenHolder_Empty",
MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
@@ -109,7 +109,7 @@ bool CRestaurantCylinderHolder::MovieEndMsg(CMovieEndMsg *msg) {
readyMsg.execute(_target);
} else {
_field118 = true;
- _fieldF4 = false;
+ _dropEnabled = false;
_cursorId = findByName("Phonograph Cylinder") ? _dropCursorId : _dragCursorId;
}
diff --git a/engines/titanic/game/start_action.cpp b/engines/titanic/game/start_action.cpp
index ab356ea1f4..c4f8db8190 100644
--- a/engines/titanic/game/start_action.cpp
+++ b/engines/titanic/game/start_action.cpp
@@ -50,14 +50,13 @@ void CStartAction::load(SimpleFile *file) {
}
bool CStartAction::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
- // Dispatch the desired action to the desired target
- CActMsg actMsg(_msgAction);
- actMsg.execute(_msgTarget);
-
return true;
}
bool CStartAction::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
+ // Dispatch the desired action to the desired target
+ CActMsg actMsg(_msgAction);
+ actMsg.execute(_msgTarget);
return true;
}
diff --git a/engines/titanic/game/sweet_bowl.cpp b/engines/titanic/game/sweet_bowl.cpp
index 29d8044a85..7a3832e7c2 100644
--- a/engines/titanic/game/sweet_bowl.cpp
+++ b/engines/titanic/game/sweet_bowl.cpp
@@ -48,7 +48,7 @@ bool CSweetBowl::MovieEndMsg(CMovieEndMsg *msg) {
bool CSweetBowl::EnterViewMsg(CEnterViewMsg *msg) {
setVisible(false);
loadSound("b#43.wav");
- playSound("b#42.wav");
+ loadSound("b#42.wav");
return true;
}
diff --git a/engines/titanic/game/television.cpp b/engines/titanic/game/television.cpp
index 390d8553a6..a0499f1d39 100644
--- a/engines/titanic/game/television.cpp
+++ b/engines/titanic/game/television.cpp
@@ -246,7 +246,7 @@ bool CTelevision::MovieEndMsg(CMovieEndMsg *msg) {
debugC(kDebugScripts, "Assigned room - %d", roomFlags);
magazine->addMail(roomFlags);
- magazine->removeMail(roomFlags, roomFlags);
+ magazine->sendMail(roomFlags, roomFlags);
}
loadFrame(561);
diff --git a/engines/titanic/game/tow_parrot_nav.cpp b/engines/titanic/game/tow_parrot_nav.cpp
index 57f1649add..b8a99a5f1b 100644
--- a/engines/titanic/game/tow_parrot_nav.cpp
+++ b/engines/titanic/game/tow_parrot_nav.cpp
@@ -44,7 +44,7 @@ bool CTOWParrotNav::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
actMsg.execute("PerchedParrot");
CString clipString = "_EXIT,36,1,N,9,3,N";
- if (CParrot::_v4)
+ if (CParrot::_state != PARROT_IN_CAGE)
clipString += 'a';
changeView("ParrotLobby.Node 3.N", clipString);
diff --git a/engines/titanic/game/transport/lift.cpp b/engines/titanic/game/transport/lift.cpp
index 114e840007..a6f45bda98 100644
--- a/engines/titanic/game/transport/lift.cpp
+++ b/engines/titanic/game/transport/lift.cpp
@@ -35,56 +35,56 @@ BEGIN_MESSAGE_MAP(CLift, CTransport)
ON_MESSAGE(ActMsg)
END_MESSAGE_MAP()
-int CLift::_v1;
+bool CLift::_hasHead;
+bool CLift::_hasCorrectHead;
int CLift::_elevator1Floor;
int CLift::_elevator2Floor;
int CLift::_elevator3Floor;
int CLift::_elevator4Floor;
-int CLift::_v6;
void CLift::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_v1, indent);
+ file->writeNumberLine(_hasHead, indent);
file->writeNumberLine(_elevator1Floor, indent);
file->writeNumberLine(_elevator2Floor, indent);
file->writeNumberLine(_elevator3Floor, indent);
file->writeNumberLine(_elevator4Floor, indent);
file->writeNumberLine(_liftNum, indent);
- file->writeNumberLine(_v6, indent);
+ file->writeNumberLine(_hasCorrectHead, indent);
CTransport::save(file, indent);
}
void CLift::load(SimpleFile *file) {
file->readNumber();
- _v1 = file->readNumber();
+ _hasHead = file->readNumber();
_elevator1Floor = file->readNumber();
_elevator2Floor = file->readNumber();
_elevator3Floor = file->readNumber();
_elevator4Floor = file->readNumber();
_liftNum = file->readNumber();
- _v6 = file->readNumber();
+ _hasCorrectHead = file->readNumber();
CTransport::load(file);
}
bool CLift::StatusChangeMsg(CStatusChangeMsg *msg) {
CPetControl *pet = getPetControl();
- if ((!_v1 && pet->getRoomsElevatorNum() == 4) ||
- (!_v6 && pet->getRoomsElevatorNum() == 4))
+ if ((!_hasHead && pet->getRoomsElevatorNum() == 4) ||
+ (!_hasCorrectHead && pet->getRoomsElevatorNum() == 4))
return true;
int oldFloorNum = msg->_oldStatus;
int floorNum = msg->_newStatus;
- int oldClass = 0, newClass = 0;
- if (oldFloorNum == 19)
- oldClass = 2;
- if (oldFloorNum == 27)
+ int oldClass = 1, newClass = 1;
+ if (oldFloorNum > 27)
oldClass = 3;
- if (floorNum == 19)
- newClass = 2;
- if (floorNum == 27)
+ else if (oldFloorNum > 19)
+ oldClass = 2;
+ if (floorNum > 27)
newClass = 3;
+ else if (floorNum > 19)
+ newClass = 2;
static const int UP_FRAME_NUMBERS[40] = {
0, 8, 13, 18, 23, 28, 33, 38, 43, 48, 53, 58,
@@ -96,7 +96,7 @@ bool CLift::StatusChangeMsg(CStatusChangeMsg *msg) {
598, 589, 584, 579, 574, 569, 564, 559, 554, 549,
544, 539, 534, 529, 524, 519, 514, 509, 504, 479,
474, 469, 464, 459, 454, 449, 444, 369, 364, 359,
- 354, 349, 344, 339, 334, 329, 324, 319
+ 354, 349, 344, 339, 334, 329, 324, 319, 299
};
if (pet)
@@ -139,8 +139,8 @@ bool CLift::StatusChangeMsg(CStatusChangeMsg *msg) {
if (floorNum < oldFloorNum) {
// Animate lift going down
- _startFrame = DOWN_FRAME_NUMBERS[floorNum - 1];
- _endFrame = DOWN_FRAME_NUMBERS[oldFloorNum - 1];
+ _startFrame = DOWN_FRAME_NUMBERS[oldFloorNum - 1];
+ _endFrame = DOWN_FRAME_NUMBERS[floorNum - 1];
if (oldClass == newClass) {
debugStr = CString::format("Same (%d-%d)", _startFrame, _endFrame);
@@ -245,7 +245,7 @@ bool CLift::EnterRoomMsg(CEnterRoomMsg *msg) {
loadSound("z#519.wav");
loadSound("z#518.wav");
- if (elevNum == 4 && _v1 == 1 && !_v6) {
+ if (elevNum == 4 && _hasHead && !_hasCorrectHead) {
CVisibleMsg visibleMsg;
visibleMsg.execute("GetLiftEye");
}
@@ -272,8 +272,8 @@ bool CLift::LeaveRoomMsg(CLeaveRoomMsg *msg) {
stopGlobalSound(true, -1);
CPetControl *pet = getPetControl();
- if (pet->getRoomsElevatorNum() == 4 && _v1 == 1 && !_v6) {
- CVisibleMsg visibleMsg;
+ if (pet->getRoomsElevatorNum() == 4 && _hasHead && !_hasCorrectHead) {
+ CVisibleMsg visibleMsg(false);
visibleMsg.execute("Eye2");
}
@@ -282,25 +282,25 @@ bool CLift::LeaveRoomMsg(CLeaveRoomMsg *msg) {
bool CLift::ActMsg(CActMsg *msg) {
if (msg->_action == "LoseHead") {
- _v1 = 0;
- _v6 = 0;
+ _hasHead = false;
+ _hasCorrectHead = false;
CActMsg actMsg1("Lift.Node 2.N");
actMsg1.execute("RPanInLiftW");
CActMsg actMsg2("Lift.Node 2.S");
actMsg2.execute("LPanInLiftW");
} else if (msg->_action == "AddWrongHead") {
- _v1 = 1;
- _v6 = 0;
+ _hasHead = true;
+ _hasCorrectHead = false;
CActMsg actMsg1("Lift.Node 1.N");
actMsg1.execute("RPanInLiftW");
CActMsg actMsg2("Lift.Node 1.S");
actMsg2.execute("LPanInLiftW");
} else if (msg->_action == "AddRightHead") {
- _v1 = 1;
- _v6 = 1;
- petSetRooms1D4(0);
+ _hasHead = true;
+ _hasCorrectHead = true;
+ petSetRoomsElevatorBroken(false);
CActMsg actMsg1("Lift.Node 1.N");
actMsg1.execute("RPanInLiftW");
diff --git a/engines/titanic/game/transport/lift.h b/engines/titanic/game/transport/lift.h
index c69f7a02e6..3f2fca6c7e 100644
--- a/engines/titanic/game/transport/lift.h
+++ b/engines/titanic/game/transport/lift.h
@@ -37,12 +37,12 @@ class CLift : public CTransport {
bool LeaveRoomMsg(CLeaveRoomMsg *msg);
bool ActMsg(CActMsg *msg);
public:
- static int _v1;
+ static bool _hasHead;
+ static bool _hasCorrectHead;
static int _elevator1Floor;
static int _elevator2Floor;
static int _elevator3Floor;
static int _elevator4Floor;
- static int _v6;
int _liftNum;
public:
diff --git a/engines/titanic/game/transport/lift_indicator.cpp b/engines/titanic/game/transport/lift_indicator.cpp
index df0ff397da..563e888b3c 100644
--- a/engines/titanic/game/transport/lift_indicator.cpp
+++ b/engines/titanic/game/transport/lift_indicator.cpp
@@ -151,7 +151,7 @@ bool CLiftindicator::PETActivateMsg(CPETActivateMsg *msg) {
} else {
_endFrame = pet->getRoomsFloorNum();
- if (petGetRoomsWellEntry() == 4 && !CLift::_v6
+ if (petGetRoomsWellEntry() == 4 && !CLift::_hasCorrectHead
&& pet->getRoomsFloorNum() != CLift::_elevator4Floor) {
petDisplayMessage(1, ELEVATOR_NON_FUNCTIONAL);
} else {
diff --git a/engines/titanic/game_manager.cpp b/engines/titanic/game_manager.cpp
index 9e107c92b9..fb05705347 100644
--- a/engines/titanic/game_manager.cpp
+++ b/engines/titanic/game_manager.cpp
@@ -220,6 +220,9 @@ void CGameManager::updateMovies() {
if (movie->_handled)
continue;
+ // Flag the movie to have been handled
+ movie->_handled = true;
+
CMovieEventList eventsList;
if (!movie->handleEvents(eventsList))
movie->removeFromPlayingMovies();
@@ -247,8 +250,6 @@ void CGameManager::updateMovies() {
eventsList.remove(movieEvent);
}
- // Flag the movie as having been handled
- movie->_handled = true;
repeatFlag = true;
break;
}
diff --git a/engines/titanic/game_state.cpp b/engines/titanic/game_state.cpp
index e75f0975c3..49779ad745 100644
--- a/engines/titanic/game_state.cpp
+++ b/engines/titanic/game_state.cpp
@@ -46,7 +46,7 @@ bool CGameStateMovieList::empty() {
CGameState::CGameState(CGameManager *gameManager) :
_gameManager(gameManager), _gameLocation(this), _passengerClass(NO_CLASS),
_priorClass(NO_CLASS), _mode(GSMODE_NONE), _seasonNum(SEASON_SUMMER),
- _petActive(false), _field1C(false), _quitGame(false), _field24(0),
+ _petActive(false), _field1C(false), _quitGame(false), _parrotMet(false),
_nodeChangeCtr(0), _nodeEnterTicks(0), _field38(0) {
}
@@ -55,7 +55,7 @@ void CGameState::save(SimpleFile *file) const {
file->writeNumber(_passengerClass);
file->writeNumber(_priorClass);
file->writeNumber(_seasonNum);
- file->writeNumber(_field24);
+ file->writeNumber(_parrotMet);
file->writeNumber(_field38);
_gameLocation.save(file);
file->writeNumber(_field1C);
@@ -66,7 +66,7 @@ void CGameState::load(SimpleFile *file) {
_passengerClass = (PassengerClass)file->readNumber();
_priorClass = (PassengerClass)file->readNumber();
_seasonNum = (Season)file->readNumber();
- _field24 = file->readNumber();
+ _parrotMet = file->readNumber();
_field38 = file->readNumber();
_gameLocation.load(file);
@@ -83,11 +83,11 @@ void CGameState::setMode(GameStateMode newMode) {
_gameManager->lockInputHandler();
if (sm && sm->_mouseCursor)
- sm->_mouseCursor->hide();
+ sm->_mouseCursor->setBusy();
} else if (newMode != GSMODE_CUTSCENE && _mode == GSMODE_CUTSCENE) {
if (sm && sm->_mouseCursor)
- sm->_mouseCursor->show();
+ sm->_mouseCursor->clearBusy();
if (_gameManager)
_gameManager->unlockInputHandler();
diff --git a/engines/titanic/game_state.h b/engines/titanic/game_state.h
index 965735026c..5d0f67c02c 100644
--- a/engines/titanic/game_state.h
+++ b/engines/titanic/game_state.h
@@ -71,7 +71,7 @@ public:
bool _petActive;
bool _field1C;
bool _quitGame;
- int _field24;
+ bool _parrotMet;
uint _nodeChangeCtr;
uint32 _nodeEnterTicks;
Point _mousePos;
@@ -141,8 +141,16 @@ public:
_seasonNum = (Season)(((int)_seasonNum + 1) & 3);
}
- void set24(int v) { _field24 = v; }
- int get24() const { return _field24; }
+ /**
+ * Sets whether the parrot has been met
+ */
+ void setParrotMet(bool flag) { _parrotMet = flag; }
+
+ /**
+ * Gets whether the parrot has been met
+ */
+ bool getParrotMet() const { return _parrotMet; }
+
int getNodeChangedCtr() const { return _nodeChangeCtr; }
uint32 getNodeEnterTicks() const { return _nodeEnterTicks; }
void inc38() { ++_field38; }
diff --git a/engines/titanic/gfx/edit_control.cpp b/engines/titanic/gfx/edit_control.cpp
index 3f3c4d4035..33707f93f6 100644
--- a/engines/titanic/gfx/edit_control.cpp
+++ b/engines/titanic/gfx/edit_control.cpp
@@ -26,15 +26,16 @@ namespace Titanic {
BEGIN_MESSAGE_MAP(CEditControl, CGameObject)
ON_MESSAGE(EditControlMsg)
+ ON_MESSAGE(MouseWheelMsg)
END_MESSAGE_MAP()
-CEditControl::CEditControl() : CGameObject(), _fieldBC(false), _fontNumber(0), _fieldD4(2),
- _textR(0), _textG(0), _textB(0), _fieldF0(0), _fieldF4(0) {
+CEditControl::CEditControl() : CGameObject(), _showCursor(false), _fontNumber(0), _fieldD4(2),
+ _textR(0), _textG(0), _textB(0), _fieldF0(0), _isPassword(false) {
}
void CEditControl::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_fieldBC, indent);
+ file->writeNumberLine(_showCursor, indent);
file->writeNumberLine(_editLeft, indent);
file->writeNumberLine(_editBottom, indent);
file->writeNumberLine(_editHeight, indent);
@@ -46,14 +47,14 @@ void CEditControl::save(SimpleFile *file, int indent) {
file->writeNumberLine(_textB, indent);
file->writeQuotedLine(_text, indent);
file->writeNumberLine(_fieldF0, indent);
- file->writeNumberLine(_fieldF4, indent);
+ file->writeNumberLine(_isPassword, indent);
CGameObject::save(file, indent);
}
void CEditControl::load(SimpleFile *file) {
file->readNumber();
- _fieldBC = file->readNumber();
+ _showCursor = file->readNumber();
_editLeft = file->readNumber();
_editBottom = file->readNumber();
_editHeight = file->readNumber();
@@ -65,67 +66,68 @@ void CEditControl::load(SimpleFile *file) {
_textB = file->readNumber();
_text = file->readString();
_fieldF0 = file->readNumber();
- _fieldF4 = file->readNumber();
+ _isPassword = file->readNumber();
CGameObject::load(file);
}
bool CEditControl::EditControlMsg(CEditControlMsg *msg) {
switch (msg->_mode) {
- case 0:
- if (!_editLeft) {
- _editHeight = _bounds.height();
- _editBottom = _bounds.bottom;
- _editLeft = _bounds.left + _bounds.width() / 2;
- _maxTextChars = msg->_param;
- setTextFontNumber(_fontNumber);
+ case EDIT_INIT: {
+ // WORKAROUND: Fix original bug where MissiveOMat username & password
+ // text weren't initialised after the first time you use the MissiveOMat
+ _editHeight = _bounds.height();
+ _editBottom = _bounds.bottom;
+ _editLeft = _bounds.left + _bounds.width() / 2;
+ _maxTextChars = msg->_param;
+ setTextFontNumber(_fontNumber);
- CEditControlMsg ctlMsg;
- ctlMsg._mode = 10;
- ctlMsg._param = _fieldD4;
- ctlMsg.execute(this);
+ CEditControlMsg ctlMsg;
+ ctlMsg._mode = EDIT_BORDERS;
+ ctlMsg._param = _fieldD4;
+ ctlMsg.execute(this);
- ctlMsg._mode = 11;
- ctlMsg._textR = _textR;
- ctlMsg._textG = _textG;
- ctlMsg._textB = _textB;
- ctlMsg.execute(this);
- }
+ ctlMsg._mode = EDIT_SET_COLOR;
+ ctlMsg._textR = _textR;
+ ctlMsg._textG = _textG;
+ ctlMsg._textB = _textB;
+ ctlMsg.execute(this);
break;
+ }
- case 1: {
+ case EDIT_CLEAR: {
_text = "";
CEditControlMsg ctlMsg;
- ctlMsg._mode = 14;
+ ctlMsg._mode = EDIT_RENDER;
ctlMsg.execute(this);
break;
}
- case 2: {
+ case EDIT_SET_TEXT: {
_text = msg->_text;
CEditControlMsg ctlMsg;
- ctlMsg._mode = 14;
+ ctlMsg._mode = EDIT_RENDER;
ctlMsg.execute(this);
break;
}
- case 3:
+ case EDIT_GET_TEXT:
msg->_text = _text;
break;
- case 4:
+ case EDIT_LENGTH:
msg->_param = _text.size();
break;
- case 5:
+ case EDIT_MAX_LENGTH:
_maxTextChars = msg->_param;
break;
- case 6:
+ case EDIT_KEYPRESS:
if (msg->_param == 8 && !_text.empty()) {
_text = _text.left(_text.size() - 1);
CEditControlMsg ctlMsg;
- ctlMsg._mode = 14;
+ ctlMsg._mode = EDIT_RENDER;
ctlMsg.execute(this);
} else if (msg->_param == 13) {
msg->_param = 1000;
@@ -135,32 +137,32 @@ bool CEditControl::EditControlMsg(CEditControlMsg *msg) {
_text += c;
CEditControlMsg ctlMsg;
- ctlMsg._mode = 14;
+ ctlMsg._mode = EDIT_RENDER;
ctlMsg.execute(this);
}
break;
- case 7:
+ case EDIT_SET_FONT:
setTextFontNumber(msg->_param);
break;
- case 8:
- if (!_fieldBC) {
- _fieldBC = true;
+ case EDIT_SHOW_CURSOR:
+ if (!_showCursor) {
+ _showCursor = true;
CEditControlMsg ctlMsg;
- ctlMsg._mode = 14;
+ ctlMsg._mode = EDIT_RENDER;
ctlMsg.execute(this);
}
break;
- case 9:
- if (_fieldBC) {
- _fieldBC = false;
+ case EDIT_HIDE_CURSOR:
+ if (_showCursor) {
+ _showCursor = false;
getTextCursor()->hide();
}
break;
- case 10: {
+ case EDIT_BORDERS: {
setTextHasBorders((msg->_param & 1) != 0);
if (msg->_param & 4)
_fieldF0 = 1;
@@ -169,28 +171,28 @@ bool CEditControl::EditControlMsg(CEditControlMsg *msg) {
else
_fieldF0 = 0;
- _fieldF4 = msg->_param & 0x10;
+ _isPassword = (msg->_param & 0x10) != 0;
CEditControlMsg ctlMsg;
- ctlMsg._mode = 14;
+ ctlMsg._mode = EDIT_RENDER;
ctlMsg.execute(this);
break;
}
- case 11:
+ case EDIT_SET_COLOR:
setTextColor(msg->_textR, msg->_textG, msg->_textB);
break;
- case 12:
+ case EDIT_SHOW:
setVisible(true);
break;
- case 13:
+ case EDIT_HIDE:
setVisible(false);
break;
- case 14: {
+ case EDIT_RENDER: {
makeDirty();
- CString str = _fieldF4 ? CString('*', _text.size()) : _text;
+ CString str = _isPassword ? CString('*', _text.size()) : _text;
setText(str);
int textWidth = getTextWidth();
@@ -201,7 +203,7 @@ bool CEditControl::EditControlMsg(CEditControlMsg *msg) {
makeDirty();
}
- if (_fieldBC) {
+ if (_showCursor) {
CTextCursor *textCursor = getTextCursor();
textCursor->show();
textCursor->setPos(Point(_bounds.left + textWidth + 1, _bounds.top + 3));
@@ -219,4 +221,15 @@ bool CEditControl::EditControlMsg(CEditControlMsg *msg) {
return true;
}
+bool CEditControl::MouseWheelMsg(CMouseWheelMsg *msg) {
+ if (_name != "MissiveOMat Welcome")
+ return false;
+
+ if (msg->_wheelUp)
+ scrollTextUp();
+ else
+ scrollTextDown();
+ return true;
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/gfx/edit_control.h b/engines/titanic/gfx/edit_control.h
index 6c02f7afb9..5ed91c9e84 100644
--- a/engines/titanic/gfx/edit_control.h
+++ b/engines/titanic/gfx/edit_control.h
@@ -30,8 +30,9 @@ namespace Titanic {
class CEditControl : public CGameObject {
DECLARE_MESSAGE_MAP;
bool EditControlMsg(CEditControlMsg *msg);
+ bool MouseWheelMsg(CMouseWheelMsg *msg);
protected:
- bool _fieldBC;
+ bool _showCursor;
int _editLeft;
int _editBottom;
int _editHeight;
@@ -43,7 +44,7 @@ protected:
byte _textB;
CString _text;
int _fieldF0;
- int _fieldF4;
+ bool _isPassword;
public:
CLASSDEF;
CEditControl();
diff --git a/engines/titanic/pet_control/pet_text.cpp b/engines/titanic/gfx/text_control.cpp
index 7bb0bad16e..f731dbb340 100644
--- a/engines/titanic/pet_control/pet_text.cpp
+++ b/engines/titanic/gfx/text_control.cpp
@@ -20,12 +20,12 @@
*
*/
-#include "titanic/pet_control/pet_text.h"
+#include "titanic/gfx/text_control.h"
#include "titanic/titanic.h"
namespace Titanic {
-CPetText::CPetText(uint count) :
+CTextControl::CTextControl(uint count) :
_stringsMerged(false), _maxCharsPerLine(-1), _lineCount(0),
_displayEndCharIndex(-1), _unused1(0), _unused2(0), _unused3(0),
_backR(0xff), _backG(0xff), _backB(0xff),
@@ -35,18 +35,18 @@ CPetText::CPetText(uint count) :
setupArrays(count);
}
-void CPetText::setupArrays(int count) {
+void CTextControl::setupArrays(int count) {
freeArrays();
if (count < 10 || count > 60)
count = 10;
_array.resize(count);
}
-void CPetText::freeArrays() {
+void CTextControl::freeArrays() {
_array.clear();
}
-void CPetText::setup() {
+void CTextControl::setup() {
for (int idx = 0; idx < (int)_array.size(); ++idx) {
_array[idx]._line.clear();
setLineColor(idx, _textR, _textG, _textB);
@@ -57,16 +57,16 @@ void CPetText::setup() {
_stringsMerged = false;
}
-void CPetText::setLineColor(uint lineNum, uint col) {
+void CTextControl::setLineColor(uint lineNum, uint col) {
setLineColor(lineNum, col & 0xff, (col >> 8) & 0xff, (col >> 16) & 0xff);
}
-void CPetText::setLineColor(uint lineNum, byte r, byte g, byte b) {
+void CTextControl::setLineColor(uint lineNum, byte r, byte g, byte b) {
_array[lineNum]._rgb = getColorText(r, g, b);
_stringsMerged = false;
}
-CString CPetText::getColorText(byte r, byte g, byte b) {
+CString CTextControl::getColorText(byte r, byte g, byte b) {
char buffer[6];
if (!r)
r = 1;
@@ -85,7 +85,7 @@ CString CPetText::getColorText(byte r, byte g, byte b) {
return CString(buffer);
}
-void CPetText::load(SimpleFile *file, int param) {
+void CTextControl::load(SimpleFile *file, int param) {
if (!param) {
uint numLines = file->readNumber();
int charsPerLine = file->readNumber();
@@ -116,7 +116,7 @@ void CPetText::load(SimpleFile *file, int param) {
}
}
-void CPetText::save(SimpleFile *file, int indent) {
+void CTextControl::save(SimpleFile *file, int indent) {
int numLines = _lineCount + 1;
file->writeNumberLine(_array.size(), indent);
@@ -143,7 +143,7 @@ void CPetText::save(SimpleFile *file, int indent) {
}
}
-void CPetText::draw(CScreenManager *screenManager) {
+void CTextControl::draw(CScreenManager *screenManager) {
Rect tempRect = _bounds;
if (_hasBorder) {
@@ -179,7 +179,7 @@ void CPetText::draw(CScreenManager *screenManager) {
screenManager->setFontNumber(oldFontNumber);
}
-void CPetText::mergeStrings() {
+void CTextControl::mergeStrings() {
if (!_stringsMerged) {
_lines.clear();
@@ -193,14 +193,14 @@ void CPetText::mergeStrings() {
}
}
-void CPetText::resize(uint count) {
+void CTextControl::resize(uint count) {
if (!count || _array.size() == count)
return;
_array.clear();
_array.resize(count);
}
-CString CPetText::getText() const {
+CString CTextControl::getText() const {
CString result = "";
for (int idx = 0; idx <= _lineCount; ++idx)
result += _array[idx]._line;
@@ -208,16 +208,16 @@ CString CPetText::getText() const {
return result;
}
-void CPetText::setText(const CString &str) {
+void CTextControl::setText(const CString &str) {
setup();
appendText(str);
}
-void CPetText::setText(StringId stringId) {
+void CTextControl::setText(StringId stringId) {
setText(g_vm->_strings[stringId]);
}
-void CPetText::appendText(const CString &str) {
+void CTextControl::appendText(const CString &str) {
int lineSize = _array[_lineCount]._line.size();
int strSize = str.size();
@@ -236,33 +236,34 @@ void CPetText::appendText(const CString &str) {
_stringsMerged = false;
}
-void CPetText::setColor(uint col) {
+void CTextControl::setColor(uint col) {
_textR = col & 0xff;
_textG = (col >> 8) & 0xff;
_textB = (col >> 16) & 0xff;
}
-void CPetText::setColor(byte r, byte g, byte b) {
+void CTextControl::setColor(byte r, byte g, byte b) {
_textR = r;
_textG = g;
_textB = b;
}
-void CPetText::remapColors(uint count, uint *srcColors, uint *destColors) {
- if (_lineCount >= 0) {
- for (int lineNum = 0; lineNum <= _lineCount; ++lineNum) {
- // Get the rgb values
- uint r = _array[lineNum]._rgb[1];
- uint g = _array[lineNum]._rgb[2];
- uint b = _array[lineNum]._rgb[3];
- uint color = r | (g << 8) | (b << 16);
-
- for (uint index = 0; index < count; ++index) {
- if (color == srcColors[index]) {
- // Found a match, so replace the color
- setLineColor(lineNum, destColors[lineNum]);
- break;
- }
+void CTextControl::remapColors(uint count, uint *srcColors, uint *destColors) {
+ for (int lineNum = 0; lineNum <= _lineCount; ++lineNum) {
+ if (_array[lineNum]._rgb.empty())
+ continue;
+
+ // Get the rgb values
+ uint r = _array[lineNum]._rgb[1];
+ uint g = _array[lineNum]._rgb[2];
+ uint b = _array[lineNum]._rgb[3];
+ uint color = r | (g << 8) | (b << 16);
+
+ for (uint index = 0; index < count; ++index) {
+ if (color == srcColors[index]) {
+ // Found a match, so replace the color
+ setLineColor(lineNum, destColors[lineNum]);
+ break;
}
}
}
@@ -270,12 +271,12 @@ void CPetText::remapColors(uint count, uint *srcColors, uint *destColors) {
_stringsMerged = false;
}
-void CPetText::setMaxCharsPerLine(int maxChars) {
+void CTextControl::setMaxCharsPerLine(int maxChars) {
if (maxChars >= -1 && maxChars < 257)
_maxCharsPerLine = maxChars;
}
-void CPetText::updateStr3(int lineNum) {
+void CTextControl::updateStr3(int lineNum) {
if (_npcFlag > 0 && _npcId > 0) {
char line[5];
line[0] = line[3] = TEXTCMD_NPC;
@@ -289,7 +290,7 @@ void CPetText::updateStr3(int lineNum) {
}
}
-int CPetText::getTextWidth(CScreenManager *screenManager) {
+int CTextControl::getTextWidth(CScreenManager *screenManager) {
mergeStrings();
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
int textWidth = screenManager->stringWidth(_lines);
@@ -298,7 +299,7 @@ int CPetText::getTextWidth(CScreenManager *screenManager) {
return textWidth;
}
-int CPetText::getTextHeight(CScreenManager *screenManager) {
+int CTextControl::getTextHeight(CScreenManager *screenManager) {
mergeStrings();
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
int textHeight = screenManager->getTextBounds(_lines, _bounds.width() - 4);
@@ -307,63 +308,63 @@ int CPetText::getTextHeight(CScreenManager *screenManager) {
return textHeight;
}
-void CPetText::deleteLastChar() {
+void CTextControl::deleteLastChar() {
if (!_array[_lineCount]._line.empty()) {
_array[_lineCount]._line.deleteLastChar();
_stringsMerged = false;
}
}
-void CPetText::setNPC(int npcFlag, int npcId) {
+void CTextControl::setNPC(int npcFlag, int npcId) {
_npcFlag = npcFlag;
_npcId = npcId;
}
-void CPetText::scrollUp(CScreenManager *screenManager) {
+void CTextControl::scrollUp(CScreenManager *screenManager) {
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
_scrollTop -= screenManager->getFontHeight();
constrainScrollUp(screenManager);
screenManager->setFontNumber(oldFontNumber);
}
-void CPetText::scrollDown(CScreenManager *screenManager) {
+void CTextControl::scrollDown(CScreenManager *screenManager) {
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
_scrollTop += screenManager->getFontHeight();
constrainScrollDown(screenManager);
screenManager->setFontNumber(oldFontNumber);
}
-void CPetText::scrollUpPage(CScreenManager *screenManager) {
+void CTextControl::scrollUpPage(CScreenManager *screenManager) {
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
_scrollTop -= getPageHeight(screenManager);
constrainScrollUp(screenManager);
screenManager->setFontNumber(oldFontNumber);
}
-void CPetText::scrollDownPage(CScreenManager *screenManager) {
+void CTextControl::scrollDownPage(CScreenManager *screenManager) {
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
_scrollTop += getPageHeight(screenManager);
constrainScrollDown(screenManager);
screenManager->setFontNumber(oldFontNumber);
}
-void CPetText::scrollToTop(CScreenManager *screenManager) {
+void CTextControl::scrollToTop(CScreenManager *screenManager) {
_scrollTop = 0;
}
-void CPetText::scrollToBottom(CScreenManager *screenManager) {
+void CTextControl::scrollToBottom(CScreenManager *screenManager) {
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
_scrollTop = getTextHeight(screenManager);
constrainScrollDown(screenManager);
screenManager->setFontNumber(oldFontNumber);
}
-void CPetText::constrainScrollUp(CScreenManager *screenManager) {
+void CTextControl::constrainScrollUp(CScreenManager *screenManager) {
if (_scrollTop < 0)
_scrollTop = 0;
}
-void CPetText::constrainScrollDown(CScreenManager *screenManager) {
+void CTextControl::constrainScrollDown(CScreenManager *screenManager) {
// Figure out the maximum scroll amount allowed
int maxScroll = getTextHeight(screenManager) - _bounds.height() - 4;
if (maxScroll < 0)
@@ -373,7 +374,7 @@ void CPetText::constrainScrollDown(CScreenManager *screenManager) {
_scrollTop = maxScroll;
}
-int CPetText::getPageHeight(CScreenManager *screenManager) {
+int CTextControl::getPageHeight(CScreenManager *screenManager) {
int textHeight = _bounds.height();
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
int fontHeight = screenManager->getFontHeight();
@@ -389,16 +390,16 @@ int CPetText::getPageHeight(CScreenManager *screenManager) {
}
}
-void CPetText::addLine(const CString &str) {
+void CTextControl::addLine(const CString &str) {
addLine(str, _textR, _textG, _textB);
}
-void CPetText::addLine(const CString &str, uint color) {
+void CTextControl::addLine(const CString &str, uint color) {
addLine(str, color & 0xff, (color >> 8) & 0xff,
(color >> 16) & 0xff);
}
-void CPetText::addLine(const CString &str, byte r, byte g, byte b) {
+void CTextControl::addLine(const CString &str, byte r, byte g, byte b) {
if (_lineCount == ((int)_array.size() - 1)) {
// Lines array is full
if (_array.size() > 1) {
@@ -415,7 +416,7 @@ void CPetText::addLine(const CString &str, byte r, byte g, byte b) {
++_lineCount;
}
-bool CPetText::handleKey(char c) {
+bool CTextControl::handleKey(char c) {
switch (c) {
case (char)Common::KEYCODE_BACKSPACE:
deleteLastChar();
@@ -433,7 +434,7 @@ bool CPetText::handleKey(char c) {
return false;
}
-void CPetText::showCursor(int mode) {
+void CTextControl::showCursor(int mode) {
CScreenManager *screenManager = CScreenManager::setCurrent();
_textCursor = screenManager->_textCursor;
if (_textCursor) {
@@ -447,7 +448,7 @@ void CPetText::showCursor(int mode) {
}
}
-void CPetText::hideCursor() {
+void CTextControl::hideCursor() {
if (_textCursor) {
_textCursor->setMode(-1);
_textCursor->hide();
@@ -455,7 +456,7 @@ void CPetText::hideCursor() {
}
}
-int CPetText::getNPCNum(uint ident, uint startIndex) {
+int CTextControl::getNPCNum(uint ident, uint startIndex) {
if (!_stringsMerged) {
mergeStrings();
if (!_stringsMerged)
@@ -482,7 +483,7 @@ int CPetText::getNPCNum(uint ident, uint startIndex) {
return -1;
}
-void CPetText::setFontNumber(int fontNumber) {
+void CTextControl::setFontNumber(int fontNumber) {
if (fontNumber >= 0 && fontNumber <= 2)
_fontNumber = fontNumber;
}
diff --git a/engines/titanic/pet_control/pet_text.h b/engines/titanic/gfx/text_control.h
index 9b2f47274c..d4ef19a7cf 100644
--- a/engines/titanic/pet_control/pet_text.h
+++ b/engines/titanic/gfx/text_control.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef TITANIC_PET_TEXT_H
-#define TITANIC_PET_TEXT_H
+#ifndef TITANIC_TEXT_CONTROL_H
+#define TITANIC_TEXT_CONTROL_H
#include "common/keyboard.h"
#include "titanic/support/simple_file.h"
@@ -30,7 +30,7 @@
namespace Titanic {
-class CPetText {
+class CTextControl {
struct ArrayEntry {
CString _line;
CString _rgb;
@@ -91,7 +91,7 @@ private:
*/
int getPageHeight(CScreenManager *screenManager);
public:
- CPetText(uint count = 10);
+ CTextControl(uint count = 10);
/**
* Set up the control
@@ -282,4 +282,4 @@ public:
} // End of namespace Titanic
-#endif /* TITANIC_PET_TEXT_H */
+#endif /* TITANIC_TEXT_CONTROL_H */
diff --git a/engines/titanic/input_handler.cpp b/engines/titanic/input_handler.cpp
index e2d1bd7a32..cb1e3c9c68 100644
--- a/engines/titanic/input_handler.cpp
+++ b/engines/titanic/input_handler.cpp
@@ -32,7 +32,7 @@ namespace Titanic {
CInputHandler::CInputHandler(CGameManager *owner) :
_gameManager(owner), _inputTranslator(nullptr), _dragging(false),
_buttonDown(false), _dragItem(nullptr), _lockCount(0),
- _singleton(false) {
+ _abortMessage(false) {
CScreenManager::_screenManagerPtr->_inputHandler = this;
}
@@ -59,7 +59,7 @@ void CInputHandler::decLockCount() {
}
_buttonDown = _inputTranslator->isMousePressed();
- _singleton = true;
+ _abortMessage = true;
}
}
@@ -75,11 +75,11 @@ void CInputHandler::handleMessage(CMessage &msg, bool respectLock) {
void CInputHandler::processMessage(CMessage *msg) {
const CMouseMsg *mouseMsg = dynamic_cast<const CMouseMsg *>(msg);
- _singleton = false;
+ _abortMessage = false;
dispatchMessage(msg);
- if (_singleton) {
- _singleton = false;
+ if (_abortMessage) {
+ _abortMessage = false;
} else if (mouseMsg) {
// Keep the game state mouse position up to date
if (_mousePos != mouseMsg->_mousePos) {
@@ -100,8 +100,8 @@ void CInputHandler::processMessage(CMessage *msg) {
CMouseDragMoveMsg moveMsg(_mousePos);
moveMsg.execute(_dragItem);
}
- } else {
- if (mouseMsg->isButtonUpMsg() && _dragItem) {
+ } else if (mouseMsg->isButtonUpMsg()) {
+ if (_dragItem) {
// Mouse drag ended
CGameObject *target = dragEnd(_mousePos, _dragItem);
CMouseDragEndMsg endMsg(_mousePos, target);
@@ -132,7 +132,7 @@ void CInputHandler::processMessage(CMessage *msg) {
if (_dragItem) {
CMouseDragMoveMsg moveMsg(_dragStartPos);
- dispatchMessage(&moveMsg);
+ moveMsg.execute(_dragItem);
}
_dragging = true;
@@ -155,7 +155,7 @@ CGameObject *CInputHandler::dragEnd(const Point &pt, CTreeItem *dragItem) {
if (!view)
return nullptr;
- // Scan through the view items to find the item being dropped on
+ // Scan through the view items to find the element being dropped on
CGameObject *target = nullptr;
for (CTreeItem *treeItem = view->scan(view); treeItem; treeItem = treeItem->scan(view)) {
CGameObject *gameObject = dynamic_cast<CGameObject *>(treeItem);
diff --git a/engines/titanic/input_handler.h b/engines/titanic/input_handler.h
index d5f29b7921..5f0be04f1a 100644
--- a/engines/titanic/input_handler.h
+++ b/engines/titanic/input_handler.h
@@ -56,7 +56,7 @@ public:
Point _dragStartPos;
Point _mousePos;
int _lockCount;
- bool _singleton;
+ bool _abortMessage;
public:
CInputHandler(CGameManager *owner);
~CInputHandler();
diff --git a/engines/titanic/messages/messages.h b/engines/titanic/messages/messages.h
index a40477a702..0cbb4b0e76 100644
--- a/engines/titanic/messages/messages.h
+++ b/engines/titanic/messages/messages.h
@@ -87,6 +87,7 @@ class CRoomItem;
class CNodeItem;
class CViewItem;
class CMusicPlayer;
+class CMovePlayerTo;
class CMessage : public CSaveableObject {
private:
@@ -148,9 +149,27 @@ public:
virtual bool isLeaveViewMsg() const;
};
+enum EditControlAction {
+ EDIT_INIT = 0,
+ EDIT_CLEAR = 1,
+ EDIT_SET_TEXT = 2,
+ EDIT_GET_TEXT = 3,
+ EDIT_LENGTH = 4,
+ EDIT_MAX_LENGTH = 5,
+ EDIT_KEYPRESS = 6,
+ EDIT_SET_FONT = 7,
+ EDIT_SHOW_CURSOR = 8,
+ EDIT_HIDE_CURSOR = 9,
+ EDIT_BORDERS = 10,
+ EDIT_SET_COLOR = 11,
+ EDIT_SHOW = 12,
+ EDIT_HIDE = 13,
+ EDIT_RENDER = 14
+};
+
class CEditControlMsg : public CMessage {
public:
- int _mode;
+ EditControlAction _mode;
int _param;
CString _text;
byte _textR;
@@ -158,7 +177,7 @@ public:
byte _textB;
public:
CLASSDEF;
- CEditControlMsg() : _mode(0), _param(0), _textR(0), _textG(0), _textB(0) {}
+ CEditControlMsg() : _mode(EDIT_INIT), _param(0), _textR(0), _textG(0), _textB(0) {}
static bool isSupportedBy(const CTreeItem *item) {
return CMessage::supports(item, _type);
@@ -197,6 +216,12 @@ public:
}
};
+enum MissiveOMatAction {
+ MESSAGE_NONE = 1, MESSAGE_SHOW = 2, NEXT_MESSAGE = 3, PRIOR_MESSAGE = 4,
+ MESSAGE_5 = 5, MESSAGE_DOWN = 6, MESSAGE_UP = 7, REDRAW_MESSAGE = 8,
+ MESSAGE_9 = 9
+};
+
MESSAGE1(CActMsg, CString, action, "");
MESSAGE1(CActivationmsg, CString, value, "");
MESSAGE1(CAddHeadPieceMsg, CString, value, "NULL");
@@ -260,7 +285,7 @@ MESSAGE1(CLoadSuccessMsg, int, ticks, 0);
MESSAGE1(CLockPhonographMsg, int, value, 0);
MESSAGE0(CMaitreDDefeatedMsg);
MESSAGE0(CMaitreDHappyMsg);
-MESSAGE1(CMissiveOMatActionMsg, int, action, 0);
+MESSAGE1(CMissiveOMatActionMsg, MissiveOMatAction, action, MESSAGE_NONE);
MESSAGE0(CMoveToStartPosMsg);
MESSAGE2(CMovieEndMsg, int, startFrame, 0, int, endFrame, 0);
MESSAGE2(CMovieFrameMsg, int, frameNumber, 0, int, value2, 0);
@@ -274,7 +299,7 @@ MESSAGE0(CNPCQueueIdleAnimMsg);
MESSAGE1(CNutPuzzleMsg, CString, value, "");
MESSAGE1(COnSummonBotMsg, int, value, 0);
MESSAGE0(COpeningCreditsMsg);
-MESSAGE1(CPanningAwayFromParrotMsg, CTreeItem *, target, nullptr);
+MESSAGE1(CPanningAwayFromParrotMsg, CMovePlayerTo *, target, nullptr);
MESSAGE2(CParrotSpeakMsg, CString, target, "", CString, action, "");
MESSAGE2(CParrotTriesChickenMsg, int, value1, 0, int, value2, 0);
MESSAGE1(CPhonographPlayMsg, int, value, 0);
diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk
index e802456c5a..51c77ba1dd 100644
--- a/engines/titanic/module.mk
+++ b/engines/titanic/module.mk
@@ -280,6 +280,7 @@ MODULE_OBJS := \
gfx/chev_right_on.o \
gfx/chev_send_rec_switch.o \
gfx/edit_control.o \
+ gfx/text_control.o \
gfx/elevator_button.o \
gfx/get_from_succ.o \
gfx/helmet_on_off.o \
@@ -398,7 +399,6 @@ MODULE_OBJS := \
pet_control/pet_show_translation.o \
pet_control/pet_slider.o \
pet_control/pet_sound.o \
- pet_control/pet_text.o \
sound/auto_music_player.o \
sound/auto_music_player_base.o \
sound/auto_sound_player.o \
diff --git a/engines/titanic/moves/enter_exit_first_class_state.cpp b/engines/titanic/moves/enter_exit_first_class_state.cpp
index efdead533a..4b58c1b86d 100644
--- a/engines/titanic/moves/enter_exit_first_class_state.cpp
+++ b/engines/titanic/moves/enter_exit_first_class_state.cpp
@@ -21,6 +21,7 @@
*/
#include "titanic/moves/enter_exit_first_class_state.h"
+#include "titanic/titanic.h"
namespace Titanic {
@@ -30,13 +31,13 @@ END_MESSAGE_MAP()
void CEnterExitFirstClassState::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeQuotedLine(_viewName, indent);
+ file->writeQuotedLine(g_vm->_stateRoomExitView, indent);
CGameObject::save(file, indent);
}
void CEnterExitFirstClassState::load(SimpleFile *file) {
file->readNumber();
- _viewName = file->readString();
+ g_vm->_stateRoomExitView = file->readString();
CGameObject::load(file);
}
@@ -44,10 +45,12 @@ bool CEnterExitFirstClassState::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
switch (getPassengerClass()) {
case 1:
if (compareRoomNameTo("1stClassLobby")) {
- _viewName = getRoomNodeName() + ".E";
- changeView(_viewName);
+ // Entering room, so save where you were and change to stateroom
+ g_vm->_stateRoomExitView = getRoomNodeName() + ".E";
+ changeView("1stClassState.Node 1.S");
} else if (compareRoomNameTo("1stClassState")) {
- changeView(_viewName);
+ // Return to where you entered room from
+ changeView(g_vm->_stateRoomExitView);
}
break;
diff --git a/engines/titanic/moves/enter_exit_first_class_state.h b/engines/titanic/moves/enter_exit_first_class_state.h
index fe63e553de..ea5c52a35e 100644
--- a/engines/titanic/moves/enter_exit_first_class_state.h
+++ b/engines/titanic/moves/enter_exit_first_class_state.h
@@ -30,8 +30,6 @@ namespace Titanic {
class CEnterExitFirstClassState : public CGameObject {
DECLARE_MESSAGE_MAP;
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
-private:
- CString _viewName;
public:
CLASSDEF;
diff --git a/engines/titanic/moves/enter_sec_class_state.cpp b/engines/titanic/moves/enter_sec_class_state.cpp
index 853a00d590..af2bc4ac00 100644
--- a/engines/titanic/moves/enter_sec_class_state.cpp
+++ b/engines/titanic/moves/enter_sec_class_state.cpp
@@ -52,7 +52,7 @@ bool CEnterSecClassState::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
playSound("b#105.wav");
petDisplayMessage(1, CLASS_NOT_PERMITTED_IN_AREA);
} else if (!compareRoomNameTo("SecClassLittleLift") || _mode == 2) {
- CActMsg actMsg(getFullViewName().deleteRight(3) + ".S");
+ CActMsg actMsg(getFullViewName().deleteRight(2) + ".S");
actMsg.execute("SecClassRoomLeaver");
changeView("secClassState.Node 01.N");
}
diff --git a/engines/titanic/moves/restaurant_pan_handler.cpp b/engines/titanic/moves/restaurant_pan_handler.cpp
index d93e331254..58305fd6b8 100644
--- a/engines/titanic/moves/restaurant_pan_handler.cpp
+++ b/engines/titanic/moves/restaurant_pan_handler.cpp
@@ -55,8 +55,8 @@ bool CRestaurantPanHandler::ArmPickedUpFromTableMsg(CArmPickedUpFromTableMsg *ms
}
bool CRestaurantPanHandler::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
- _destination = _armPickedUp ? _armDestination : _armlessDestination;
- changeView(_destination);
+ CString clipName = _armPickedUp ? _armDestination : _armlessDestination;
+ changeView(_destination, clipName);
return true;
}
diff --git a/engines/titanic/npcs/bilge_succubus.cpp b/engines/titanic/npcs/bilge_succubus.cpp
index d0a5dc17ae..36627842a5 100644
--- a/engines/titanic/npcs/bilge_succubus.cpp
+++ b/engines/titanic/npcs/bilge_succubus.cpp
@@ -42,26 +42,26 @@ BEGIN_MESSAGE_MAP(CBilgeSuccUBus, CSuccUBus)
END_MESSAGE_MAP()
CBilgeSuccUBus::CBilgeSuccUBus() : CSuccUBus(),
- _bilgeStartFrame1(-1), _bilgeEndFrame1(-1),
- _bilgeStartFrame2(-1), _bilgeEndFrame2(-1) {
+ _sneezing2StartFrame(-1), _sneezing2EndFrame(-1),
+ _sneezing1StartFrame(-1), _sneezing1EndFrame(-1) {
}
void CBilgeSuccUBus::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_bilgeStartFrame1, indent);
- file->writeNumberLine(_bilgeEndFrame1, indent);
- file->writeNumberLine(_bilgeStartFrame2, indent);
- file->writeNumberLine(_bilgeEndFrame2, indent);
+ file->writeNumberLine(_sneezing2StartFrame, indent);
+ file->writeNumberLine(_sneezing2EndFrame, indent);
+ file->writeNumberLine(_sneezing1StartFrame, indent);
+ file->writeNumberLine(_sneezing1EndFrame, indent);
CSuccUBus::save(file, indent);
}
void CBilgeSuccUBus::load(SimpleFile *file) {
file->readNumber();
- _bilgeStartFrame1 = file->readNumber();
- _bilgeEndFrame1 = file->readNumber();
- _bilgeStartFrame2 = file->readNumber();
- _bilgeEndFrame2 = file->readNumber();
+ _sneezing2StartFrame = file->readNumber();
+ _sneezing2EndFrame = file->readNumber();
+ _sneezing1StartFrame = file->readNumber();
+ _sneezing1EndFrame = file->readNumber();
CSuccUBus::load(file);
}
@@ -74,10 +74,10 @@ bool CBilgeSuccUBus::PETReceiveMsg(CPETReceiveMsg *msg) {
CPetControl *pet = getPetControl();
if (_v2) {
- if (_startFrame4 >= 0)
- playMovie(_startFrame4, _endFrame4, MOVIE_GAMESTATE);
- if (_startFrame5 >= 0)
- playMovie(_startFrame5, _endFrame5, MOVIE_GAMESTATE);
+ if (_receiveStartFrame >= 0)
+ playMovie(_receiveStartFrame, _receiveEndFrame, MOVIE_GAMESTATE);
+ if (_afterReceiveStartFrame >= 0)
+ playMovie(_afterReceiveStartFrame, _afterReceiveEndFrame, MOVIE_GAMESTATE);
playSound("z#28.wav", 70);
} else if (!_enabled) {
@@ -93,8 +93,8 @@ bool CBilgeSuccUBus::PETReceiveMsg(CPETReceiveMsg *msg) {
if (mailObject) {
_mailP = mailObject;
- if (_startFrame4 >= 0)
- playMovie(_startFrame4, _endFrame4, MOVIE_GAMESTATE);
+ if (_receiveStartFrame >= 0)
+ playMovie(_receiveStartFrame, _receiveEndFrame, MOVIE_GAMESTATE);
} else {
petDisplayMessage(2, NOTHING_TO_DELIVER);
}
@@ -116,14 +116,13 @@ bool CBilgeSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
return true;
}
- _field19C = 0;
+ _sendLost = false;
_mailP = mailObject;
uint roomFlags = _roomFlags;
- if (!pet->testRooms5(roomFlags) ||
- getPassengerClass() > pet->getMailDest(roomFlags)) {
+ if (!pet->isSuccUBusDest(roomFlags) || pet->getMailDestClass(roomFlags) < getPassengerClass()) {
roomFlags = pet->getSpecialRoomFlags("BilgeRoom");
- _field19C = 1;
+ _sendLost = true;
}
_isChicken = mailObject->getName() == "Chicken";
@@ -135,42 +134,42 @@ bool CBilgeSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
startTalking(this, 230022);
_field158 = 1;
- if (_startFrame3 >= 0)
- playMovie(_startFrame3, _endFrame3, MOVIE_NOTIFY_OBJECT);
+ if (_sendStartFrame >= 0)
+ playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT);
- if (_bilgeStartFrame1 >= 0) {
- playMovie(_startFrame12, _endFrame12, MOVIE_GAMESTATE);
- playMovie(_bilgeStartFrame2, _bilgeEndFrame2, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
- playMovie(_bilgeStartFrame1, _bilgeEndFrame1, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
+ if (_sneezing2StartFrame >= 0) {
+ playMovie(_trayOutStartFrame, _trayOutEndFrame, MOVIE_GAMESTATE);
+ playMovie(_sneezing1StartFrame, _sneezing1EndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
+ playMovie(_sneezing2StartFrame, _sneezing2EndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
incTransitions();
}
} else {
startTalking(this, 230012);
_field158 = 2;
- if (_startFrame3 >= 0)
- playMovie(_startFrame3, _endFrame3, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
- if (_startFrame4 >= 0)
- playMovie(_startFrame4, _endFrame4, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
- if (_startFrame5 >= 0)
- playMovie(_startFrame5, _endFrame5, MOVIE_GAMESTATE);
+ if (_sendStartFrame >= 0)
+ playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
+ if (_receiveStartFrame >= 0)
+ playMovie(_receiveStartFrame, _receiveEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
+ if (_afterReceiveStartFrame >= 0)
+ playMovie(_afterReceiveStartFrame, _afterReceiveEndFrame, MOVIE_GAMESTATE);
}
} else {
if (_isFeathers) {
startTalking(this, 230022);
_field158 = 3;
- if (_startFrame3 >= 0)
- playMovie(_startFrame3, _endFrame3, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
- if (_startFrame4 >= 0)
- playMovie(_startFrame4, _endFrame4, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
- if (_startFrame5 >= 0)
- playMovie(_startFrame5, _endFrame5, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
+ if (_sendStartFrame >= 0)
+ playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
+ if (_receiveStartFrame >= 0)
+ playMovie(_receiveStartFrame, _receiveEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
+ if (_afterReceiveStartFrame >= 0)
+ playMovie(_afterReceiveStartFrame, _afterReceiveEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
} else {
- removeMail(petRoomFlags, roomFlags);
+ sendMail(petRoomFlags, roomFlags);
startTalking(this, 230012);
- if (_startFrame3 >= 0) {
+ if (_sendStartFrame >= 0) {
_field158 = 4;
- playMovie(_startFrame3, _endFrame3, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
+ playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
}
}
}
@@ -181,14 +180,14 @@ bool CBilgeSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
CPetControl *pet = getPetControl();
- if (msg->_endFrame == _endFrame12) {
- if (_startFrame10 >= 0)
+ if (msg->_endFrame == _trayOutEndFrame) {
+ if (_offStartFrame >= 0)
playSound("z#27.wav");
- } else if (msg->_endFrame == _endFrame10) {
+ } else if (msg->_endFrame == _offEndFrame) {
if (_startFrame11 >= 0)
playSound("z#30.wav");
} else {
- if (_endFrame9 == _endFrame10 && pet) {
+ if (msg->_endFrame == _onEndFrame && pet) {
if (_v2) {
startTalking(this, getRandomNumber(1) ? 230062 : 230063);
} else if (!findMail(pet->getRoomFlags())) {
@@ -206,9 +205,8 @@ bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
break;
}
}
- }
- if (msg->_endFrame == _endFrame3) {
+ } else if (msg->_endFrame == _sendEndFrame) {
switch (_field158) {
case 1:
stopSound(_soundHandle);
@@ -236,11 +234,7 @@ bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
CSUBTransition transMsg;
transMsg.execute(this);
- } else if (msg->_endFrame == _bilgeEndFrame2) {
- playSound("z#25.wav", 70);
- playSound("z#24.wav", 70);
-
- } else if (msg->_endFrame == _endFrame4) {
+ } else if (msg->_endFrame == _receiveEndFrame) {
if (_mailP) {
_mailP->petAddToInventory();
CVisibleMsg visibleMsg(true);
@@ -253,7 +247,11 @@ bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
transMsg.execute(this);
}
- } else if (msg->_endFrame == _bilgeEndFrame1) {
+ } else if (msg->_endFrame == _sneezing1EndFrame) {
+ playSound("z#25.wav", 70);
+ playSound("z#24.wav", 70);
+
+ } else if (msg->_endFrame == _sneezing2EndFrame) {
changeView("BilgeRoomWith.Node 1.N", "");
_v2 = 0;
resetMail();
@@ -342,14 +340,14 @@ bool CBilgeSuccUBus::SubAcceptCCarryMsg(CSubAcceptCCarryMsg *msg) {
bool chickenFlag = chicken ? chicken->_string6 == "None" : false;
if (chickenFlag) {
- if (_startFrame2 >= 0) {
+ if (_okStartFrame >= 0) {
startTalking(this, 70219);
- playMovie(_startFrame2, _endFrame2, 0);
+ playMovie(_okStartFrame, _okEndFrame, 0);
}
- if (_startFrame3 >= 0) {
+ if (_sendStartFrame >= 0) {
_field158 = 5;
- playMovie(_startFrame3, _endFrame3, MOVIE_NOTIFY_OBJECT);
+ playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT);
}
CViewItem *view = parseView(item->_fullViewName);
@@ -365,8 +363,8 @@ bool CBilgeSuccUBus::SubAcceptCCarryMsg(CSubAcceptCCarryMsg *msg) {
}
} else {
item->addMail(petRoomFlags);
- if (_startFrame2 >= 0)
- playMovie(_startFrame2, _endFrame2, 0);
+ if (_okStartFrame >= 0)
+ playMovie(_okStartFrame, _okEndFrame, 0);
petSetArea(PET_REMOTE);
CSUBTransition transMsg;
@@ -397,7 +395,7 @@ bool CBilgeSuccUBus::LeaveViewMsg(CLeaveViewMsg *msg) {
if (_enabled) {
_enabled = false;
- if (_startFrame10 >= 0)
+ if (_offStartFrame >= 0)
playSound("z#27.wav");
}
@@ -419,13 +417,13 @@ bool CBilgeSuccUBus::TurnOn(CTurnOn *msg) {
CPetControl *pet = getPetControl();
if (pet) {
- if (_startFrame9 >= 0) {
- playMovie(_startFrame9, _endFrame9, MOVIE_NOTIFY_OBJECT);
+ if (_onStartFrame >= 0) {
+ playMovie(_onStartFrame, _onEndFrame, MOVIE_NOTIFY_OBJECT);
playSound("z#26.wav");
}
- if (mailExists(pet->getRoomFlags()) && _startFrame2 >= 0)
- playMovie(_startFrame2, _endFrame2, 0);
+ if (mailExists(pet->getRoomFlags()) && _okStartFrame >= 0)
+ playMovie(_okStartFrame, _okEndFrame, 0);
_enabled = true;
CSUBTransition transMsg;
@@ -442,18 +440,18 @@ bool CBilgeSuccUBus::TurnOn(CTurnOn *msg) {
bool CBilgeSuccUBus::TurnOff(CTurnOff *msg) {
CPetControl *pet = getPetControl();
- if (pet && mailExists(pet->getRoomFlags()) && _startFrame12 >= 0)
- playMovie(_startFrame12, _endFrame12, MOVIE_NOTIFY_OBJECT);
- else if (_endFrame12 >= 0)
- playMovie(_endFrame12, _endFrame12, MOVIE_NOTIFY_OBJECT);
+ if (pet && mailExists(pet->getRoomFlags()) && _trayOutStartFrame >= 0)
+ playMovie(_trayOutStartFrame, _trayOutEndFrame, MOVIE_NOTIFY_OBJECT);
+ else if (_trayOutEndFrame >= 0)
+ playMovie(_trayOutEndFrame, _trayOutEndFrame, MOVIE_NOTIFY_OBJECT);
if (_soundHandle != -1) {
stopSound(_soundHandle);
_soundHandle = -1;
}
- if (_startFrame10 >= 0)
- playMovie(_startFrame10, _endFrame10, MOVIE_NOTIFY_OBJECT);
+ if (_offStartFrame >= 0)
+ playMovie(_offStartFrame, _offEndFrame, MOVIE_NOTIFY_OBJECT);
_enabled = false;
performAction(true);
diff --git a/engines/titanic/npcs/bilge_succubus.h b/engines/titanic/npcs/bilge_succubus.h
index 754949a306..b56716d110 100644
--- a/engines/titanic/npcs/bilge_succubus.h
+++ b/engines/titanic/npcs/bilge_succubus.h
@@ -41,10 +41,10 @@ class CBilgeSuccUBus : public CSuccUBus {
bool TurnOn(CTurnOn *msg);
bool TurnOff(CTurnOff *msg);
public:
- int _bilgeStartFrame1;
- int _bilgeEndFrame1;
- int _bilgeStartFrame2;
- int _bilgeEndFrame2;
+ int _sneezing2StartFrame;
+ int _sneezing2EndFrame;
+ int _sneezing1StartFrame;
+ int _sneezing1EndFrame;
public:
CLASSDEF;
CBilgeSuccUBus();
diff --git a/engines/titanic/npcs/parrot.cpp b/engines/titanic/npcs/parrot.cpp
index c3702e17d4..9e6366ace2 100644
--- a/engines/titanic/npcs/parrot.cpp
+++ b/engines/titanic/npcs/parrot.cpp
@@ -48,7 +48,7 @@ END_MESSAGE_MAP()
int CParrot::_v1;
int CParrot::_v2;
int CParrot::_v3;
-int CParrot::_v4;
+ParrotState CParrot::_state;
int CParrot::_v5;
CParrot::CParrot() : CTrueTalkNPC() {
@@ -56,12 +56,12 @@ CParrot::CParrot() : CTrueTalkNPC() {
_string2 = "CarryParrot";
_field118 = 1;
_field11C = 25;
- _field120 = 0;
- _field124 = 73;
- _field128 = 58;
+ _lastSpeakTime = 0;
+ _newXp = 73;
+ _newXc = 58;
_field12C = 0;
_field130 = 0;
- _field134 = nullptr;
+ _panTarget = nullptr;
_field138 = 851;
_field13C = 851;
_field140 = 265;
@@ -126,12 +126,12 @@ void CParrot::save(SimpleFile *file, int indent) {
file->writeQuotedLine(_string2, indent);
file->writeNumberLine(_field118, indent);
file->writeNumberLine(_field11C, indent);
- file->writeNumberLine(_field120, indent);
- file->writeNumberLine(_field124, indent);
- file->writeNumberLine(_field128, indent);
+ file->writeNumberLine(_lastSpeakTime, indent);
+ file->writeNumberLine(_newXp, indent);
+ file->writeNumberLine(_newXc, indent);
file->writeNumberLine(_field12C, indent);
file->writeNumberLine(_field130, indent);
- file->writeNumberLine(_v4, indent);
+ file->writeNumberLine(_state, indent);
file->writeNumberLine(_v5, indent);
CTrueTalkNPC::save(file, indent);
@@ -150,12 +150,12 @@ void CParrot::load(SimpleFile *file) {
_string2 = file->readString();
_field118 = file->readNumber();
_field11C = file->readNumber();
- _field120 = file->readNumber();
- _field124 = file->readNumber();
- _field128 = file->readNumber();
+ _lastSpeakTime = file->readNumber();
+ _newXp = file->readNumber();
+ _newXc = file->readNumber();
_field12C = file->readNumber();
_field130 = file->readNumber();
- _v4 = file->readNumber();
+ _state = (ParrotState)file->readNumber();
_v5 = file->readNumber();
CTrueTalkNPC::load(file);
@@ -175,13 +175,13 @@ bool CParrot::ActMsg(CActMsg *msg) {
statusMsg.execute("PerchCoreHolder");
}
} else if (msg->_action == "StartChickenDrag") {
- if (!_v4) {
+ if (_state == PARROT_IN_CAGE) {
stopMovie();
startTalking(this, 280275, findView());
_field12C = 0;
}
} else if (msg->_action == "EnteringFromTOW" &&
- (_v4 == 0 || _v4 == 2)) {
+ (_state == PARROT_IN_CAGE || _state == PARROT_ESCAPED)) {
if (_v2) {
_v2 = 2;
} else {
@@ -190,7 +190,7 @@ bool CParrot::ActMsg(CActMsg *msg) {
detach();
attach(cageBar);
- _v4 = 0;
+ _state = PARROT_IN_CAGE;
CActMsg actMsg1("OpenNow");
actMsg1.execute("ParrotCage");
CActMsg actMsg2("GainParrot");
@@ -219,17 +219,17 @@ bool CParrot::MovieEndMsg(CMovieEndMsg *msg) {
CActMsg actMsg1("LoseParrot");
actMsg1.execute("ParrotLobbyController");
- if (_field134) {
+ if (_panTarget) {
CActMsg actMsg2("PanAwayFromParrot");
- actMsg2.execute(_field134);
- _field134 = nullptr;
+ actMsg2.execute(_panTarget);
+ _panTarget = nullptr;
} else {
CActMsg actMsg2("Shut");
actMsg2.execute("ParrotCage");
}
_npcFlags &= ~NPCFLAG_2000000;
- _v4 = 2;
+ _state = PARROT_ESCAPED;
} else if (_npcFlags & NPCFLAG_10000) {
if (_npcFlags & NPCFLAG_20000) {
_npcFlags = (_npcFlags & ~NPCFLAG_20000) | NPCFLAG_40000;
@@ -243,7 +243,7 @@ bool CParrot::MovieEndMsg(CMovieEndMsg *msg) {
int xp = _bounds.left + _bounds.width() / 2;
if (_npcFlags & NPCFLAG_100000) {
- if ((xp - _field128) > 32) {
+ if ((xp - _newXc) > 32) {
setPosition(Point(_bounds.left - 40, _bounds.top));
playClip("Walk Left Loop", MOVIE_NOTIFY_OBJECT);
movieEvent(236);
@@ -253,7 +253,7 @@ bool CParrot::MovieEndMsg(CMovieEndMsg *msg) {
_npcFlags = (_npcFlags & ~NPCFLAG_40000) | NPCFLAG_80000;
}
} else {
- if ((_field128 - xp) > 32) {
+ if ((_newXc - xp) > 32) {
playClip("Walk Right Loop", MOVIE_NOTIFY_OBJECT);
movieEvent(244);
} else {
@@ -347,8 +347,8 @@ bool CParrot::EnterViewMsg(CEnterViewMsg *msg) {
"Talking5", "Talking6", "Talking7", nullptr
};
- if (!_v4) {
- setPosition(Point(_field124, _bounds.top));
+ if (_state == PARROT_IN_CAGE) {
+ setPosition(Point(_newXp, _bounds.top));
_field118 = 1;
_npcFlags &= ~(NPCFLAG_10000 | NPCFLAG_20000 | NPCFLAG_40000 | NPCFLAG_80000 | NPCFLAG_100000 | NPCFLAG_200000 | NPCFLAG_400000);
loadFrame(0);
@@ -369,7 +369,7 @@ bool CParrot::EnterViewMsg(CEnterViewMsg *msg) {
}
bool CParrot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
- if (_v4) {
+ if (_state != PARROT_MAILED) {
CViewItem *view = msg->_param2 ? findView() : nullptr;
startTalking(this, msg->_action, view);
}
@@ -378,7 +378,7 @@ bool CParrot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
}
bool CParrot::MouseDragStartMsg(CMouseDragStartMsg *msg) {
- if (_field118 && !_v4 && checkPoint(msg->_mousePos, false, true)) {
+ if (_field118 && _state == PARROT_IN_CAGE && checkPoint(msg->_mousePos, false, true)) {
setVisible(false);
CRoomItem *room = findRoom();
@@ -388,7 +388,7 @@ bool CParrot::MouseDragStartMsg(CMouseDragStartMsg *msg) {
CCarry *item = dynamic_cast<CCarry *>(getRoot()->findByName(_string2));
if (item) {
- item->_fieldE0 = 1;
+ item->_canTake = true;
CPassOnDragStartMsg passMsg;
passMsg._mousePos = msg->_mousePos;
passMsg.execute(item);
@@ -396,10 +396,11 @@ bool CParrot::MouseDragStartMsg(CMouseDragStartMsg *msg) {
CActMsg actMsg("LoseParrot");
actMsg.execute("ParrotLobbyController");
+ return true;
}
}
- return true;
+ return false;
}
bool CParrot::LeaveViewMsg(CLeaveViewMsg *msg) {
@@ -415,7 +416,7 @@ bool CParrot::ParrotSpeakMsg(CParrotSpeakMsg *msg) {
"Lift", "ServiceElevator", "Dome", "Home", "MoonEmbLobby", nullptr
};
- if (!stateGet24() || _v4 == 3 || compareViewNameTo("Titania.Node 18.N"))
+ if (!stateGetParrotMet() || _state == PARROT_MAILED || compareViewNameTo("Titania.Node 18.N"))
return true;
// Check for rooms not to speak in
@@ -425,7 +426,7 @@ bool CParrot::ParrotSpeakMsg(CParrotSpeakMsg *msg) {
}
// Don't have the parrot speak too often
- if ((getTicksCount() - _field120) < 20000 || _speechCounter)
+ if ((getTicksCount() - _lastSpeakTime) < 20000 || _speechCounter)
return true;
playSound("z#475.wav", 50);
@@ -472,7 +473,7 @@ bool CParrot::ParrotSpeakMsg(CParrotSpeakMsg *msg) {
}
}
- _field120 = getTicksCount();
+ _lastSpeakTime = getTicksCount();
return true;
}
@@ -483,7 +484,7 @@ bool CParrot::NPCPlayTalkingAnimationMsg(CNPCPlayTalkingAnimationMsg *msg) {
};
if (!(_npcFlags & (NPCFLAG_10000 | NPCFLAG_20000 | NPCFLAG_40000 | NPCFLAG_80000 | NPCFLAG_100000 | NPCFLAG_200000 | NPCFLAG_400000))
- && _visible && !_v4) {
+ && _visible && _state == PARROT_IN_CAGE) {
if (!compareViewNameTo("ParrotLobby.Node 1.N"))
msg->_names = NAMES;
}
@@ -498,7 +499,7 @@ bool CParrot::NPCPlayIdleAnimationMsg(CNPCPlayIdleAnimationMsg *msg) {
};
if (!(_npcFlags & (NPCFLAG_10000 | NPCFLAG_20000 | NPCFLAG_40000 | NPCFLAG_80000 | NPCFLAG_100000 | NPCFLAG_200000 | NPCFLAG_400000))
- && _visible && !_v4 && !compareViewNameTo("ParrotLobby.Node 1.N")) {
+ && _visible && _state == PARROT_IN_CAGE && !compareViewNameTo("ParrotLobby.Node 1.N")) {
CGameObject *dragItem = getDraggingObject();
if (!dragItem || dragItem->getName() == "Chicken") {
if (!_v5 ||getRandomNumber(3) != 0) {
@@ -563,9 +564,9 @@ bool CParrot::NPCPlayIdleAnimationMsg(CNPCPlayIdleAnimationMsg *msg) {
}
bool CParrot::FrameMsg(CFrameMsg *msg) {
- if (compareViewNameTo("ParrotLobby.Node 1.N"))
+ if (!compareViewNameTo("ParrotLobby.Node 1.N"))
return false;
- if (_v4)
+ if (_state != PARROT_IN_CAGE)
return true;
Point pt = getMousePos();
@@ -573,12 +574,14 @@ bool CParrot::FrameMsg(CFrameMsg *msg) {
int xp = _bounds.left + _bounds.width() / 2;
if ((_npcFlags & NPCFLAG_400000) && !hasActiveMovie()) {
- _field128 = xp - (_field124 + _bounds.width() / 2);
+ _newXc = _newXp + _bounds.width() / 2;
+ int xDiff = ABS(xp - _newXc);
- if (xp < 64) {
- if (_field134) {
+ if (xDiff < 64) {
+ if (_panTarget) {
CActMsg actMsg("PanAwayFromParrot");
- actMsg.execute(_field134);
+ actMsg.execute(_panTarget);
+ _panTarget = nullptr;
}
_npcFlags &= ~(NPCFLAG_10000 | NPCFLAG_20000 | NPCFLAG_40000
@@ -600,14 +603,14 @@ bool CParrot::FrameMsg(CFrameMsg *msg) {
return false;
}
- _field128 = CLIP((int)pt.x, 230, 480);
+ _newXc = CLIP((int)pt.x, 230, 480);
if ((_npcFlags & NPCFLAG_10000) || hasActiveMovie())
return true;
- if (_field128 > 64) {
+ if (_newXc > 64) {
_npcFlags |= NPCFLAG_10000 | NPCFLAG_20000;
- if (_field128 >= xp) {
+ if (_newXc >= xp) {
setPosition(Point(_bounds.left + 30, _bounds.top));
_npcFlags |= NPCFLAG_200000;
playClip("Walk Right Intro", MOVIE_NOTIFY_OBJECT);
@@ -706,7 +709,7 @@ bool CParrot::PutParrotBackMsg(CPutParrotBackMsg *msg) {
int xp = CLIP(msg->_value, 230, 480);
setVisible(true);
moveToView();
- _v4 = 0;
+ _state = PARROT_IN_CAGE;
setPosition(Point(xp - _bounds.width() / 2, _bounds.top));
playRandomClip(NAMES, MOVIE_NOTIFY_OBJECT);
@@ -718,7 +721,7 @@ bool CParrot::PutParrotBackMsg(CPutParrotBackMsg *msg) {
}
bool CParrot::PreEnterViewMsg(CPreEnterViewMsg *msg) {
- if (!_v4) {
+ if (_state == PARROT_IN_CAGE) {
loadMovie("z167.avi", false);
loadFrame(0);
}
@@ -727,19 +730,19 @@ bool CParrot::PreEnterViewMsg(CPreEnterViewMsg *msg) {
}
bool CParrot::PanningAwayFromParrotMsg(CPanningAwayFromParrotMsg *msg) {
- if (_v4) {
+ if (_state != PARROT_IN_CAGE) {
CActMsg actMsg("PanAwayFromParrot");
actMsg.execute(msg->_target);
- _field134 = 0;
+ _panTarget = nullptr;
} else if (_v2) {
- _field134 = msg->_target;
+ _panTarget = msg->_target;
loadMovie("z168.avi", false);
stopMovie();
playClip("Take Off", MOVIE_NOTIFY_OBJECT);
_npcFlags |= NPCFLAG_2000000;
} else {
_npcFlags |= NPCFLAG_400000;
- _field134 = msg->_target;
+ _panTarget = msg->_target;
stopMovie();
}
@@ -747,7 +750,7 @@ bool CParrot::PanningAwayFromParrotMsg(CPanningAwayFromParrotMsg *msg) {
}
bool CParrot::LeaveRoomMsg(CLeaveRoomMsg *msg) {
- if (!_v4)
+ if (_state == PARROT_IN_CAGE)
startTalking(this, 280259);
return true;
diff --git a/engines/titanic/npcs/parrot.h b/engines/titanic/npcs/parrot.h
index 93e0643857..ce0397fb71 100644
--- a/engines/titanic/npcs/parrot.h
+++ b/engines/titanic/npcs/parrot.h
@@ -24,9 +24,15 @@
#define TITANIC_PARROT_H
#include "titanic/npcs/true_talk_npc.h"
+#include "titanic/moves/move_player_to.h"
namespace Titanic {
+enum ParrotState {
+ PARROT_IN_CAGE = 0, PARROT_1 = 1, PARROT_ESCAPED = 2,
+ PARROT_MAILED = 3, PARROT_4 = 4
+};
+
class CParrot : public CTrueTalkNPC {
DECLARE_MESSAGE_MAP;
bool ActMsg(CActMsg *msg);
@@ -49,19 +55,19 @@ public:
static int _v1;
static int _v2;
static int _v3;
- static int _v4;
+ static ParrotState _state;
static int _v5;
private:
int _field108;
CString _string2;
int _field118;
int _field11C;
- int _field120;
- int _field124;
- int _field128;
+ uint _lastSpeakTime;
+ int _newXp;
+ int _newXc;
int _field12C;
int _field130;
- CTreeItem *_field134;
+ CMovePlayerTo *_panTarget;
int _field138;
int _field13C;
int _field140;
diff --git a/engines/titanic/npcs/parrot_succubus.cpp b/engines/titanic/npcs/parrot_succubus.cpp
index 657bde5b66..08866f187d 100644
--- a/engines/titanic/npcs/parrot_succubus.cpp
+++ b/engines/titanic/npcs/parrot_succubus.cpp
@@ -78,7 +78,7 @@ bool CParrotSuccUBus::HoseConnectedMsg(CHoseConnectedMsg *msg) {
if (_enabled) {
_enabled = false;
} else {
- playMovie(_startFrame9, _endFrame9, 0);
+ playMovie(_onStartFrame, _onEndFrame, 0);
playSound("z#26.wav");
}
diff --git a/engines/titanic/npcs/starlings.cpp b/engines/titanic/npcs/starlings.cpp
index 7e5907f577..ff1c40cf29 100644
--- a/engines/titanic/npcs/starlings.cpp
+++ b/engines/titanic/npcs/starlings.cpp
@@ -29,34 +29,39 @@ BEGIN_MESSAGE_MAP(CStarlings, CCharacter)
ON_MESSAGE(StatusChangeMsg)
END_MESSAGE_MAP()
-CStarlings::CStarlings() : CCharacter(), _enabled(false) {
+bool CStarlings::_dead;
+
+CStarlings::CStarlings() : CCharacter() {
}
void CStarlings::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_enabled, indent);
+ file->writeNumberLine(_dead, indent);
CCharacter::save(file, indent);
}
void CStarlings::load(SimpleFile *file) {
file->readNumber();
- _enabled = file->readNumber();
+ _dead = file->readNumber();
CCharacter::load(file);
}
bool CStarlings::EnterViewMsg(CEnterViewMsg *msg) {
- if (_enabled)
+ if (_dead)
+ // Tis but a flesh wound
setVisible(false);
else
+ // Repeatedly play the starlings flying
playMovie(MOVIE_REPEAT);
return true;
}
bool CStarlings::StatusChangeMsg(CStatusChangeMsg *msg) {
- _enabled = msg->_newStatus == 1;
- setVisible(!_enabled);
+ // I'm not dead.. I'm getting better.
+ _dead = msg->_newStatus == 1;
+ setVisible(!_dead);
return true;
}
diff --git a/engines/titanic/npcs/starlings.h b/engines/titanic/npcs/starlings.h
index 1998e6490d..4885777087 100644
--- a/engines/titanic/npcs/starlings.h
+++ b/engines/titanic/npcs/starlings.h
@@ -32,7 +32,8 @@ class CStarlings : public CCharacter {
bool EnterViewMsg(CEnterViewMsg *msg);
bool StatusChangeMsg(CStatusChangeMsg *msg);
private:
- bool _enabled;
+ // This needs to be static to be shared across all starling instances
+ static bool _dead;
public:
CLASSDEF;
CStarlings();
diff --git a/engines/titanic/npcs/succubus.cpp b/engines/titanic/npcs/succubus.cpp
index af859f9f3c..a05cc71d00 100644
--- a/engines/titanic/npcs/succubus.cpp
+++ b/engines/titanic/npcs/succubus.cpp
@@ -57,22 +57,22 @@ CSuccUBus::CSuccUBus() : CTrueTalkNPC() {
_endFrame8 = -1;
_startFrame11 = -1;
_endFrame11 = -1;
- _startFrame3 = 68;
- _endFrame3 = 168;
- _startFrame4 = 168;
- _endFrame4 = 248;
- _startFrame9 = 0;
- _endFrame9 = 0x0E;
- _startFrame10 = 0x0E;
- _endFrame10 = 27;
- _startFrame2 = 40;
- _endFrame2 = 68;
+ _sendStartFrame = 68;
+ _sendEndFrame = 168;
+ _receiveStartFrame = 168;
+ _receiveEndFrame = 248;
+ _onStartFrame = 0;
+ _onEndFrame = 0x0E;
+ _offStartFrame = 0x0E;
+ _offEndFrame = 27;
+ _okStartFrame = 40;
+ _okEndFrame = 68;
_field140 = 1;
_mailP = nullptr;
- _startFrame5 = 0;
- _endFrame5 = 0;
- _startFrame12 = 224;
- _endFrame12 = 248;
+ _afterReceiveStartFrame = 0;
+ _afterReceiveEndFrame = 0;
+ _trayOutStartFrame = 224;
+ _trayOutEndFrame = 248;
_field158 = 0;
_field15C = 0;
_string2 = "NULL";
@@ -82,16 +82,16 @@ CSuccUBus::CSuccUBus() : CTrueTalkNPC() {
_field184 = 15;
_field188 = 0;
_rect2 = Rect(0, 0, 240, 340);
- _field19C = 0;
+ _sendLost = false;
_soundHandle = -1;
_isChicken = false;
_isFeathers = false;
_field1AC = 0;
_field1B0 = 0;
- _startFrame6 = 303;
- _endFrame6 = 312;
- _startFrame7 = 313;
- _endFrame7 = 325;
+ _emptyStartFrame = 303;
+ _emptyEndFrame = 312;
+ _smokeStartFrame = 313;
+ _smokeEndFrame = 325;
_field1C4 = 326;
_field1C8 = 347;
_field1CC = 348;
@@ -108,23 +108,23 @@ void CSuccUBus::save(SimpleFile *file, int indent) {
file->writeNumberLine(_endFrame8, indent);
file->writeNumberLine(_startFrame11, indent);
file->writeNumberLine(_endFrame11, indent);
- file->writeNumberLine(_startFrame3, indent);
- file->writeNumberLine(_endFrame3, indent);
- file->writeNumberLine(_startFrame4, indent);
- file->writeNumberLine(_endFrame4, indent);
- file->writeNumberLine(_startFrame9, indent);
- file->writeNumberLine(_endFrame9, indent);
- file->writeNumberLine(_startFrame10, indent);
- file->writeNumberLine(_endFrame10, indent);
- file->writeNumberLine(_startFrame2, indent);
- file->writeNumberLine(_endFrame2, indent);
+ file->writeNumberLine(_sendStartFrame, indent);
+ file->writeNumberLine(_sendEndFrame, indent);
+ file->writeNumberLine(_receiveStartFrame, indent);
+ file->writeNumberLine(_receiveEndFrame, indent);
+ file->writeNumberLine(_onStartFrame, indent);
+ file->writeNumberLine(_onEndFrame, indent);
+ file->writeNumberLine(_offStartFrame, indent);
+ file->writeNumberLine(_offEndFrame, indent);
+ file->writeNumberLine(_okStartFrame, indent);
+ file->writeNumberLine(_okEndFrame, indent);
file->writeNumberLine(_field140, indent);
file->writeNumberLine(_v2, indent);
- file->writeNumberLine(_startFrame5, indent);
- file->writeNumberLine(_endFrame5, indent);
- file->writeNumberLine(_startFrame12, indent);
- file->writeNumberLine(_endFrame12, indent);
+ file->writeNumberLine(_afterReceiveStartFrame, indent);
+ file->writeNumberLine(_afterReceiveEndFrame, indent);
+ file->writeNumberLine(_trayOutStartFrame, indent);
+ file->writeNumberLine(_trayOutEndFrame, indent);
file->writeNumberLine(_field158, indent);
file->writeNumberLine(_field15C, indent);
@@ -141,16 +141,16 @@ void CSuccUBus::save(SimpleFile *file, int indent) {
file->writeNumberLine(_rect2.top, indent);
file->writeNumberLine(_rect2.right, indent);
file->writeNumberLine(_rect2.bottom, indent);
- file->writeNumberLine(_field19C, indent);
+ file->writeNumberLine(_sendLost, indent);
file->writeNumberLine(_soundHandle, indent);
file->writeNumberLine(_isChicken, indent);
file->writeNumberLine(_isFeathers, indent);
file->writeNumberLine(_field1AC, indent);
file->writeNumberLine(_field1B0, indent);
- file->writeNumberLine(_startFrame6, indent);
- file->writeNumberLine(_endFrame6, indent);
- file->writeNumberLine(_startFrame7, indent);
- file->writeNumberLine(_endFrame7, indent);
+ file->writeNumberLine(_emptyStartFrame, indent);
+ file->writeNumberLine(_emptyEndFrame, indent);
+ file->writeNumberLine(_smokeStartFrame, indent);
+ file->writeNumberLine(_smokeEndFrame, indent);
file->writeNumberLine(_field1C4, indent);
file->writeNumberLine(_field1C8, indent);
file->writeNumberLine(_field1CC, indent);
@@ -172,23 +172,23 @@ void CSuccUBus::load(SimpleFile *file) {
_endFrame8 = file->readNumber();
_startFrame11 = file->readNumber();
_endFrame11 = file->readNumber();
- _startFrame3 = file->readNumber();
- _endFrame3 = file->readNumber();
- _startFrame4 = file->readNumber();
- _endFrame4 = file->readNumber();
- _startFrame9 = file->readNumber();
- _endFrame9 = file->readNumber();
- _startFrame10 = file->readNumber();
- _endFrame10 = file->readNumber();
- _startFrame2 = file->readNumber();
- _endFrame2 = file->readNumber();
+ _sendStartFrame = file->readNumber();
+ _sendEndFrame = file->readNumber();
+ _receiveStartFrame = file->readNumber();
+ _receiveEndFrame = file->readNumber();
+ _onStartFrame = file->readNumber();
+ _onEndFrame = file->readNumber();
+ _offStartFrame = file->readNumber();
+ _offEndFrame = file->readNumber();
+ _okStartFrame = file->readNumber();
+ _okEndFrame = file->readNumber();
_field140 = file->readNumber();
_v2 = file->readNumber();
- _startFrame5 = file->readNumber();
- _endFrame5 = file->readNumber();
- _startFrame12 = file->readNumber();
- _endFrame12 = file->readNumber();
+ _afterReceiveStartFrame = file->readNumber();
+ _afterReceiveEndFrame = file->readNumber();
+ _trayOutStartFrame = file->readNumber();
+ _trayOutEndFrame = file->readNumber();
_field158 = file->readNumber();
_field15C = file->readNumber();
@@ -205,16 +205,16 @@ void CSuccUBus::load(SimpleFile *file) {
_rect2.top = file->readNumber();
_rect2.right = file->readNumber();
_rect2.bottom = file->readNumber();
- _field19C = file->readNumber();
+ _sendLost = file->readNumber();
_soundHandle = file->readNumber();
_isChicken = file->readNumber();
_isFeathers = file->readNumber();
_field1AC = file->readNumber();
_field1B0 = file->readNumber();
- _startFrame6 = file->readNumber();
- _endFrame6 = file->readNumber();
- _startFrame7 = file->readNumber();
- _endFrame7 = file->readNumber();
+ _emptyStartFrame = file->readNumber();
+ _emptyEndFrame = file->readNumber();
+ _smokeStartFrame = file->readNumber();
+ _smokeEndFrame = file->readNumber();
_field1C4 = file->readNumber();
_field1C8 = file->readNumber();
_field1CC = file->readNumber();
@@ -297,13 +297,13 @@ bool CSuccUBus::SubAcceptCCarryMsg(CSubAcceptCCarryMsg *msg) {
CSUBTransition transMsg;
transMsg.execute(this);
} else {
- if (_startFrame2 >= 0) {
+ if (_okStartFrame >= 0) {
startTalking(this, 70219, findView());
- playMovie(_startFrame2, _endFrame2, 0);
+ playMovie(_okStartFrame, _okEndFrame, 0);
}
- if (_startFrame3 >= 0) {
- playMovie(_startFrame3, _endFrame3, MOVIE_NOTIFY_OBJECT);
+ if (_sendStartFrame >= 0) {
+ playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT);
_field158 = 2;
}
@@ -340,8 +340,8 @@ bool CSuccUBus::LeaveViewMsg(CLeaveViewMsg *msg) {
petDisplayMessage(2, BLANK);
if (_startFrame8 >= 0)
loadFrame(_startFrame8);
- else if (!_field15C && _startFrame9 >= 0)
- loadFrame(_startFrame9);
+ else if (!_field15C && _onStartFrame >= 0)
+ loadFrame(_onStartFrame);
petClear();
if (_soundHandle != -1) {
@@ -351,7 +351,7 @@ bool CSuccUBus::LeaveViewMsg(CLeaveViewMsg *msg) {
if (_enabled) {
_enabled = false;
- if (_startFrame10 >= 0)
+ if (_offStartFrame >= 0)
playSound("z#27.wav", 100);
if (_field15C)
@@ -397,14 +397,12 @@ bool CSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
petDisplayMessage(2, NOTHING_IN_SUCCUBUS_TRAY);
} else {
- _field19C = 0;
+ _sendLost = false;
CRoomFlags roomFlags = _roomFlags;
- if (!pet->testRooms5(roomFlags) || getPassengerClass() > 0) {
+ if (!pet->isSuccUBusDest(roomFlags) || pet->getMailDestClass(roomFlags) < getPassengerClass()) {
roomFlags = pet->getSpecialRoomFlags("BilgeRoom");
- _field19C = 1;
- } else {
- pet->getMailDest(roomFlags);
+ _sendLost = true;
}
_isFeathers = mailObject->getName() == "Feathers";
@@ -415,38 +413,40 @@ bool CSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
incTransitions();
if (_isFeathers) {
- _field19C = 0;
- removeMail(destRoomFlags, roomFlags);
+ // The feather has special handling to be rejected by the SuccUBus
+ _sendLost = false;
+ sendMail(destRoomFlags, roomFlags);
pet->phonographAction("");
- if (_startFrame2 >= 0) {
- playMovie(_startFrame2, _endFrame2, 0);
+ if (_okStartFrame >= 0) {
+ playMovie(_okStartFrame, _okEndFrame, 0);
startTalking(this, 230022, findView());
}
_field158 = 1;
- if (_startFrame3 >= 0)
- playMovie(_startFrame3, _endFrame3, 0);
+ if (_sendStartFrame >= 0)
+ playMovie(_sendStartFrame, _sendEndFrame, 0);
- if (_startFrame4 >= 0) {
+ if (_receiveStartFrame >= 0) {
_mailP = mailObject;
- playMovie(_startFrame4, _endFrame4, MOVIE_NOTIFY_OBJECT);
+ playMovie(_receiveStartFrame, _receiveEndFrame, MOVIE_NOTIFY_OBJECT);
}
- if (_startFrame5 >= 0) {
- playMovie(_startFrame5, _endFrame5, 0);
+ if (_afterReceiveStartFrame >= 0) {
+ playMovie(_afterReceiveStartFrame, _afterReceiveEndFrame, 0);
}
} else {
- removeMail(pet->getRoomFlags(), roomFlags);
+ // Send the mail to the destination
+ sendMail(pet->getRoomFlags(), roomFlags);
pet->phonographAction("");
- if (_startFrame2 >= 0) {
- playMovie(_startFrame2, _endFrame2, 0);
+ if (_okStartFrame >= 0) {
+ playMovie(_okStartFrame, _okEndFrame, 0);
startTalking(this, 230012, findView());
}
- if (_startFrame3 >= 0)
- playMovie(_startFrame3, _endFrame3, MOVIE_NOTIFY_OBJECT);
+ if (_sendStartFrame >= 0)
+ playMovie(_sendStartFrame, _sendEndFrame, MOVIE_NOTIFY_OBJECT);
}
}
@@ -465,6 +465,7 @@ bool CSuccUBus::PETReceiveMsg(CPETReceiveMsg *msg) {
uint petRoomFlags = pet->getRoomFlags();
if (mailExists(petRoomFlags)) {
+ // There's already something to send in the tray, so you can't receive
switch (getRandomNumber(2)) {
case 0:
startTalking(this, 70080, findView());
@@ -482,24 +483,26 @@ bool CSuccUBus::PETReceiveMsg(CPETReceiveMsg *msg) {
CGameObject *mailObject = findMailByFlags(
_v3 && compareRoomNameTo("Titania") ? 3 : _field140, petRoomFlags);
if (!mailObject) {
+ // No mail for this SuccUBus
if (getRandomNumber(1) == 0) {
startTalking(this, 70104, findView());
} else {
startTalking(this, 70105, findView());
}
- playMovie(_startFrame6, _endFrame6, 0);
- playMovie(_startFrame7, _endFrame7, 0);
+ playMovie(_emptyStartFrame, _emptyEndFrame, 0);
+ playMovie(_smokeStartFrame, _smokeEndFrame, 0);
petDisplayMessage(2, NOTHING_TO_DELIVER);
} else {
+ // Receive the mail addressed to this SuccUBus
_mailP = mailObject;
startTalking(this, 230004, findView());
- if (_startFrame4 >= 0) {
+ if (_receiveStartFrame >= 0) {
_field158 = 1;
_field1D8 = 1;
incTransitions();
- playMovie(_startFrame4, _endFrame4, MOVIE_NOTIFY_OBJECT);
+ playMovie(_receiveStartFrame, _receiveEndFrame, MOVIE_NOTIFY_OBJECT);
}
}
}
@@ -511,7 +514,7 @@ bool CSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
CPetControl *pet = getPetControl();
uint petRoomFlags = pet ? pet->getRoomFlags() : 0;
- if (msg->_endFrame == _endFrame10) {
+ if (msg->_endFrame == _offEndFrame) {
if (_startFrame11 >= 0)
playSound("z#30.wav", 100);
@@ -524,7 +527,7 @@ bool CSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
}
}
- if (msg->_endFrame == _endFrame9) {
+ if (msg->_endFrame == _onEndFrame) {
bool flag = false;
if (pet && !mailExists(petRoomFlags)) {
@@ -585,14 +588,14 @@ bool CSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
}
}
- if (msg->_endFrame == _endFrame3) {
+ if (msg->_endFrame == _sendEndFrame) {
if (_field158 == 1) {
startTalking(this, 230022, findView());
} else if (_field158 == 2) {
startTalking(this, 230017, findView());
- } else if (_field19C) {
+ } else if (_sendLost) {
startTalking(this, 230019, findView());
- _field19C = 0;
+ _sendLost = false;
} else if (_isChicken) {
startTalking(this, 230018, findView());
_isChicken = false;
@@ -609,7 +612,7 @@ bool CSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
transMsg.execute(this);
}
- if (msg->_endFrame == _endFrame4) {
+ if (msg->_endFrame == _receiveEndFrame) {
// SuccUBus disgorged mail
if (pet && _mailP) {
_mailP->setMailDest(petRoomFlags);
@@ -661,8 +664,8 @@ bool CSuccUBus::TurnOn(CTurnOn *msg) {
playSound("z#30.wav", 100);
}
- if (_startFrame9 >= 0) {
- playMovie(_startFrame9, _endFrame9, MOVIE_NOTIFY_OBJECT);
+ if (_onStartFrame >= 0) {
+ playMovie(_onStartFrame, _onEndFrame, MOVIE_NOTIFY_OBJECT);
playSound("z#26.wav", 100);
}
@@ -689,9 +692,9 @@ bool CSuccUBus::TurnOff(CTurnOff *msg) {
_soundHandle = -1;
}
- if (_startFrame10 >= 0) {
+ if (_offStartFrame >= 0) {
playSound("z#27.wav", 100);
- playMovie(_startFrame10, _endFrame10, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
+ playMovie(_offStartFrame, _offEndFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
}
if (!_field15C && _startFrame11 >= 0)
diff --git a/engines/titanic/npcs/succubus.h b/engines/titanic/npcs/succubus.h
index 7ca8037a0a..d996bcdc68 100644
--- a/engines/titanic/npcs/succubus.h
+++ b/engines/titanic/npcs/succubus.h
@@ -56,22 +56,22 @@ protected:
int _endFrame8;
int _startFrame11;
int _endFrame11;
- int _startFrame3;
- int _endFrame3;
- int _startFrame4;
- int _endFrame4;
- int _startFrame9;
- int _endFrame9;
- int _startFrame10;
- int _endFrame10;
- int _startFrame2;
- int _endFrame2;
+ int _sendStartFrame;
+ int _sendEndFrame;
+ int _receiveStartFrame;
+ int _receiveEndFrame;
+ int _onStartFrame;
+ int _onEndFrame;
+ int _offStartFrame;
+ int _offEndFrame;
+ int _okStartFrame;
+ int _okEndFrame;
int _field140;
CGameObject *_mailP;
- int _startFrame5;
- int _endFrame5;
- int _startFrame12;
- int _endFrame12;
+ int _afterReceiveStartFrame;
+ int _afterReceiveEndFrame;
+ int _trayOutStartFrame;
+ int _trayOutEndFrame;
int _field158;
bool _field15C;
CString _string2;
@@ -84,16 +84,16 @@ protected:
int _field190;
int _field194;
int _field198;
- int _field19C;
+ bool _sendLost;
int _soundHandle;
bool _isChicken;
bool _isFeathers;
int _field1AC;
int _field1B0;
- int _startFrame6;
- int _endFrame6;
- int _startFrame7;
- int _endFrame7;
+ int _emptyStartFrame;
+ int _emptyEndFrame;
+ int _smokeStartFrame;
+ int _smokeEndFrame;
int _field1C4;
int _field1C8;
int _field1CC;
diff --git a/engines/titanic/npcs/summon_bots.cpp b/engines/titanic/npcs/summon_bots.cpp
index 6d71847548..3a4cccaa4a 100644
--- a/engines/titanic/npcs/summon_bots.cpp
+++ b/engines/titanic/npcs/summon_bots.cpp
@@ -68,13 +68,13 @@ bool CSummonBots::SummonBotMsg(CSummonBotMsg *msg) {
if (!_fieldC8)
return false;
- if (petDismissBot("BellBot"))
+ if (!petDismissBot("BellBot"))
petOnSummonBot("Bellbot", msg->_value);
} else if (msg->_npcName == "DoorBot") {
if (!_fieldCC)
return false;
- if (petDismissBot("Doorbot"))
+ if (!petDismissBot("Doorbot"))
petOnSummonBot("Doorbot", msg->_value);
} else {
return false;
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index 423f87cd8c..55b2ecc24b 100644
--- a/engines/titanic/pet_control/pet_control.cpp
+++ b/engines/titanic/pet_control/pet_control.cpp
@@ -212,7 +212,7 @@ void CPetControl::resetActiveNPC() {
}
PetArea CPetControl::setArea(PetArea newArea, bool forceChange) {
- if ((!forceChange && newArea == _currentArea) || !isAreaActive())
+ if ((!forceChange && newArea == _currentArea) || !isAreaUnlocked())
return _currentArea;
// Signal the currently active area that it's being left
@@ -271,7 +271,7 @@ bool CPetControl::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
return false;
bool result = false;
- if (isAreaActive())
+ if (isAreaUnlocked())
result = _frame.MouseButtonDownMsg(msg);
if (!result) {
@@ -302,7 +302,7 @@ bool CPetControl::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
return false;
bool result = false;
- if (isAreaActive())
+ if (isAreaUnlocked())
result = _frame.MouseButtonUpMsg(msg);
if (!result)
@@ -699,11 +699,11 @@ void CPetControl::resetDials0() {
_conversations.resetDials0();
}
-int CPetControl::getMailDest(const CRoomFlags &roomFlags) const {
+PassengerClass CPetControl::getMailDestClass(const CRoomFlags &roomFlags) const {
if (!roomFlags.isSuccUBusRoomFlags())
- return (int)roomFlags.getPassengerClassNum();
+ return roomFlags.getPassengerClassNum();
- return roomFlags.getSuccUBusNum(roomFlags.getSuccUBusRoomName());
+ return roomFlags.getSuccUBusClass(roomFlags.getSuccUBusRoomName());
}
void CPetControl::starsSetButtons(int val1, int val2) {
diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h
index 34d1330b52..a63c29d6b3 100644
--- a/engines/titanic/pet_control/pet_control.h
+++ b/engines/titanic/pet_control/pet_control.h
@@ -354,7 +354,7 @@ public:
/**
* Returns true if the PET is currently unlocked
*/
- bool isAreaActive() const { return _areaLockCount == 0; }
+ bool isAreaUnlocked() const { return _areaLockCount == 0; }
/**
* Increment the number of PET area (tab) locks
@@ -522,11 +522,14 @@ public:
}
/**
- * Get mail destination given the specified flags
+ * Get the passenger class of the specified room flags
*/
- int getMailDest(const CRoomFlags &roomFlags) const;
+ PassengerClass getMailDestClass(const CRoomFlags &roomFlags) const;
- bool testRooms5(uint roomFlags) {
+ /**
+ * Returns whether the given room flags specify a location with a SuccUBus
+ */
+ bool isSuccUBusDest(uint roomFlags) {
return CRoomFlags(roomFlags).not5();
}
@@ -551,8 +554,11 @@ public:
return _rooms.getAssignedElevatorNum();
}
- void setRooms1D4(int val) {
- _rooms.set1D4(val);
+ /**
+ * Sets the flag for whether elevator 4 has yet been fixed
+ */
+ void setRoomsElevatorBroken(bool flag) {
+ _rooms.setElevatorBroken(flag);
}
bool isRoom59706() const {
diff --git a/engines/titanic/pet_control/pet_conversations.cpp b/engines/titanic/pet_control/pet_conversations.cpp
index 8f317ed279..f7cfedf8c4 100644
--- a/engines/titanic/pet_control/pet_conversations.cpp
+++ b/engines/titanic/pet_control/pet_conversations.cpp
@@ -265,7 +265,7 @@ void CPetConversations::leave() {
}
void CPetConversations::timerExpired(int val) {
- if (val == 1) {
+ if (val != 1) {
CPetSection::timerExpired(val);
} else {
CString name = _field418 ? _npcName : getActiveNPCName();
@@ -532,30 +532,31 @@ void CPetConversations::updateDial(uint dialNum, const CString &npcName) {
_npcLevels[dialNum] = newLevel;
}
-uint CPetConversations::getDialLevel(uint dialNum, TTnpcScript *script, int v) {
- bool flag = v != 0;
-
+uint CPetConversations::getDialLevel(uint dialNum, TTnpcScript *script, bool flag) {
if (!script)
return 0;
else
return MAX(script->getDialLevel(dialNum, flag), 15);
}
-void CPetConversations::npcDialChange(uint dialNum, int oldLevel, int newLevel) {
- const uint range1[2] = { 0, 21 };
- const uint range2[2] = { 22, 43 };
+void CPetConversations::npcDialChange(uint dialNum, uint oldLevel, uint newLevel) {
+ const uint ascending[2] = { 0, 21 };
+ const uint descending[2] = { 43, 22 };
+ assert(oldLevel <= 100 && newLevel <= 100);
if (newLevel != oldLevel) {
- uint src = range1[0], dest = range1[1];
- if (oldLevel < newLevel) {
- src = range2[0];
- dest = range2[1];
+ debugC(ERROR_DETAILED, kDebugScripts, "Dial %d change from %d to %d",
+ dialNum, oldLevel, newLevel);
+ uint src = ascending[0], dest = ascending[1];
+ if (newLevel < oldLevel) {
+ src = descending[0];
+ dest = descending[1];
}
- int64 val1 = (oldLevel * dest) + (100 - oldLevel) * src;
+ uint val1 = (oldLevel * dest) + (100 - oldLevel) * src;
uint startFrame = val1 / 100;
- int64 val2 = (newLevel * dest) + (100 - newLevel) * src;
+ uint val2 = (newLevel * dest) + (100 - newLevel) * src;
uint endFrame = val2 / 100;
if (startFrame != endFrame)
diff --git a/engines/titanic/pet_control/pet_conversations.h b/engines/titanic/pet_control/pet_conversations.h
index 1837e5df2a..37d216ed2f 100644
--- a/engines/titanic/pet_control/pet_conversations.h
+++ b/engines/titanic/pet_control/pet_conversations.h
@@ -24,7 +24,7 @@
#define TITANIC_PET_CONVERSATIONS_H
#include "titanic/pet_control/pet_section.h"
-#include "titanic/pet_control/pet_text.h"
+#include "titanic/gfx/text_control.h"
#include "titanic/pet_control/pet_gfx_element.h"
#include "titanic/true_talk/true_talk_manager.h"
@@ -48,8 +48,8 @@ private:
CPetGfxElement _splitter;
CPetGfxElement _npcIcons[9];
int _npcNum;
- CPetText _log;
- CPetText _textInput;
+ CTextControl _log;
+ CTextControl _textInput;
bool _logChanged;
int _field418;
CString _npcName;
@@ -122,12 +122,12 @@ private:
/**
* Get a dial level
*/
- uint getDialLevel(uint dialNum, TTnpcScript *script, int v = 1);
+ uint getDialLevel(uint dialNum, TTnpcScript *script, bool flag = true);
/**
* Called when the dial for an NPC is being changed
*/
- void npcDialChange(uint dialNum, int oldLevel, int newLevel);
+ void npcDialChange(uint dialNum, uint oldLevel, uint newLevel);
public:
CPetConversations();
virtual ~CPetConversations() {}
diff --git a/engines/titanic/pet_control/pet_drag_chev.cpp b/engines/titanic/pet_control/pet_drag_chev.cpp
index 957fe5295c..4b54d3e69c 100644
--- a/engines/titanic/pet_control/pet_drag_chev.cpp
+++ b/engines/titanic/pet_control/pet_drag_chev.cpp
@@ -59,6 +59,7 @@ bool CPetDragChev::MouseDragEndMsg(CMouseDragEndMsg *msg) {
if (succubus) {
CSetChevRoomBits chevMsg(_destRoomFlags);
chevMsg.execute(succubus);
+ petMoveToHiddenRoom();
} else {
CPetControl *petControl = getPetControl();
if (!petControl || !petControl->contains(msg->_mousePos)
diff --git a/engines/titanic/pet_control/pet_glyphs.cpp b/engines/titanic/pet_control/pet_glyphs.cpp
index ed043811ce..b42b87199b 100644
--- a/engines/titanic/pet_control/pet_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_glyphs.cpp
@@ -39,7 +39,7 @@ void CPetGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool isHi
}
void CPetGlyph::updateTooltip() {
- CPetText *petText = getPetSection()->getText();
+ CTextControl *petText = getPetSection()->getText();
if (petText) {
petText->setColor(getPetSection()->getColor(0));
getTooltip(petText);
diff --git a/engines/titanic/pet_control/pet_glyphs.h b/engines/titanic/pet_control/pet_glyphs.h
index ac008c5ab0..6229d17994 100644
--- a/engines/titanic/pet_control/pet_glyphs.h
+++ b/engines/titanic/pet_control/pet_glyphs.h
@@ -35,7 +35,7 @@ namespace Titanic {
class CPetGlyphs;
class CPetSection;
-class CPetText;
+class CTextControl;
enum GlyphActionMode { ACTION_REMOVE = 0, ACTION_REMOVED = 1, ACTION_CHANGE = 2 };
@@ -177,7 +177,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text) {}
+ virtual void getTooltip(CTextControl *text) {}
/**
* Saves the data for the glyph
diff --git a/engines/titanic/pet_control/pet_inventory.cpp b/engines/titanic/pet_control/pet_inventory.cpp
index c1eb0754a2..aa1bb31809 100644
--- a/engines/titanic/pet_control/pet_inventory.cpp
+++ b/engines/titanic/pet_control/pet_inventory.cpp
@@ -94,6 +94,15 @@ bool CPetInventory::VirtualKeyCharMsg(CVirtualKeyCharMsg *msg) {
return _items.VirtualKeyCharMsg(msg);
}
+bool CPetInventory::MouseWheelMsg(CMouseWheelMsg *msg) {
+ if (msg->_wheelUp)
+ _items.scrollLeft();
+ else
+ _items.scrollRight();
+
+ return true;
+}
+
CGameObject *CPetInventory::dragEnd(const Point &pt) const {
return _items.getObjectAt(pt);
}
diff --git a/engines/titanic/pet_control/pet_inventory.h b/engines/titanic/pet_control/pet_inventory.h
index 5433feae95..7efc0755d8 100644
--- a/engines/titanic/pet_control/pet_inventory.h
+++ b/engines/titanic/pet_control/pet_inventory.h
@@ -26,7 +26,7 @@
#include "titanic/support/simple_file.h"
#include "titanic/pet_control/pet_section.h"
#include "titanic/pet_control/pet_inventory_glyphs.h"
-#include "titanic/pet_control/pet_text.h"
+#include "titanic/gfx/text_control.h"
namespace Titanic {
@@ -35,7 +35,7 @@ namespace Titanic {
*/
class CPetInventory : public CPetSection {
private:
- CPetText _text;
+ CTextControl _text;
CPetInventoryGlyphs _items;
CGameObject *_itemBackgrounds[46];
CGameObject *_itemGlyphs[46];
@@ -94,6 +94,7 @@ public:
virtual bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
virtual bool MouseDoubleClickMsg(CMouseDoubleClickMsg *msg);
virtual bool VirtualKeyCharMsg(CVirtualKeyCharMsg *msg);
+ virtual bool MouseWheelMsg(CMouseWheelMsg *msg);
/**
* Returns item a drag-drop operation has dropped on, if any
@@ -133,7 +134,7 @@ public:
/**
* Get a reference to the tooltip text associated with the section
*/
- virtual CPetText *getText() { return &_text; }
+ virtual CTextControl *getText() { return &_text; }
/**
* Special retrieval of glyph background image
diff --git a/engines/titanic/pet_control/pet_inventory_glyphs.cpp b/engines/titanic/pet_control/pet_inventory_glyphs.cpp
index d7918cf860..9d745d8806 100644
--- a/engines/titanic/pet_control/pet_inventory_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_inventory_glyphs.cpp
@@ -118,15 +118,15 @@ bool CPetInventoryGlyph::dragGlyph(const Point &topLeft, CMouseDragStartMsg *msg
petControl->removeFromInventory(_item, carryParcel, false, true);
petControl->removeFromInventory(_item, false, false);
- carryParcel->setPosition(Point(msg->_mousePos.x - carryParcel->getBounds().width() / 2,
- msg->_mousePos.y - carryParcel->getBounds().height() / 2));
+ carryParcel->setPosition(Point(msg->_mousePos.x - carryParcel->_bounds.width() / 2,
+ msg->_mousePos.y - carryParcel->_bounds.height() / 2));
carryParcel->setPosition(Point(SCREEN_WIDTH, SCREEN_HEIGHT));
item = carryParcel;
} else {
petControl->removeFromInventory(_item, false, true);
- _item->setPosition(Point(msg->_mousePos.x - _item->getBounds().width() / 2,
- msg->_mousePos.y - _item->getBounds().height() / 2));
+ _item->setPosition(Point(msg->_mousePos.x - _item->_bounds.width() / 2,
+ msg->_mousePos.y - _item->_bounds.height() / 2));
_item->setVisible(true);
}
@@ -138,12 +138,12 @@ bool CPetInventoryGlyph::dragGlyph(const Point &topLeft, CMouseDragStartMsg *msg
petControl->setAreaChangeType(1);
return true;
} else {
- petControl->addToInventory(carryParcel);
+ petControl->addToInventory(item);
return false;
}
}
-void CPetInventoryGlyph::getTooltip(CPetText *text) {
+void CPetInventoryGlyph::getTooltip(CTextControl *text) {
if (text) {
text->setText("");
diff --git a/engines/titanic/pet_control/pet_inventory_glyphs.h b/engines/titanic/pet_control/pet_inventory_glyphs.h
index 508db67f2d..e843cf53f9 100644
--- a/engines/titanic/pet_control/pet_inventory_glyphs.h
+++ b/engines/titanic/pet_control/pet_inventory_glyphs.h
@@ -106,7 +106,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
/**
* Return whether the glyph is currently valid
diff --git a/engines/titanic/pet_control/pet_load.cpp b/engines/titanic/pet_control/pet_load.cpp
index 3d67cf6d71..81ea85874f 100644
--- a/engines/titanic/pet_control/pet_load.cpp
+++ b/engines/titanic/pet_control/pet_load.cpp
@@ -50,7 +50,7 @@ bool CPetLoad::MouseButtonUpMsg(const Point &pt) {
}
}
-void CPetLoad::getTooltip(CPetText *text) {
+void CPetLoad::getTooltip(CTextControl *text) {
text->setText("Load the game.");
}
diff --git a/engines/titanic/pet_control/pet_load.h b/engines/titanic/pet_control/pet_load.h
index 5669991b59..103477a2f5 100644
--- a/engines/titanic/pet_control/pet_load.h
+++ b/engines/titanic/pet_control/pet_load.h
@@ -47,7 +47,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
/**
* Highlights a save slot
diff --git a/engines/titanic/pet_control/pet_load_save.h b/engines/titanic/pet_control/pet_load_save.h
index 26ddec0ff9..5bdb2b5485 100644
--- a/engines/titanic/pet_control/pet_load_save.h
+++ b/engines/titanic/pet_control/pet_load_save.h
@@ -24,7 +24,7 @@
#define TITANIC_PET_LOAD_SAVE_H
#include "titanic/pet_control/pet_glyphs.h"
-#include "titanic/pet_control/pet_text.h"
+#include "titanic/gfx/text_control.h"
namespace Titanic {
@@ -52,7 +52,7 @@ private:
*/
bool isSlotHighlighted(int index, const Point &pt);
protected:
- CPetText _slotNames[SAVEGAME_SLOTS_COUNT];
+ CTextControl _slotNames[SAVEGAME_SLOTS_COUNT];
bool _slotInUse[SAVEGAME_SLOTS_COUNT];
CPetGfxElement _btnLoadSave;
CPetGfxElement _gutter;
diff --git a/engines/titanic/pet_control/pet_quit.cpp b/engines/titanic/pet_control/pet_quit.cpp
index a6fb22d7e1..0d94474f99 100644
--- a/engines/titanic/pet_control/pet_quit.cpp
+++ b/engines/titanic/pet_control/pet_quit.cpp
@@ -83,7 +83,7 @@ bool CPetQuit::MouseButtonUpMsg(const Point &pt) {
}
}
-void CPetQuit::getTooltip(CPetText *text) {
+void CPetQuit::getTooltip(CTextControl *text) {
text->setText("Quit the game.");
}
diff --git a/engines/titanic/pet_control/pet_quit.h b/engines/titanic/pet_control/pet_quit.h
index b775000933..7eeedaf701 100644
--- a/engines/titanic/pet_control/pet_quit.h
+++ b/engines/titanic/pet_control/pet_quit.h
@@ -25,13 +25,13 @@
#include "titanic/pet_control/pet_gfx_element.h"
#include "titanic/pet_control/pet_glyphs.h"
-#include "titanic/pet_control/pet_text.h"
+#include "titanic/gfx/text_control.h"
namespace Titanic {
class CPetQuit : public CPetGlyph {
private:
- CPetText _text;
+ CTextControl _text;
CPetGfxElement _btnYes;
public:
/**
@@ -62,12 +62,12 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
/**
* Get a reference to the tooltip text associated with the section
*/
- virtual CPetText *getText() { return &_text; }
+ virtual CTextControl *getText() { return &_text; }
};
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_real_life.h b/engines/titanic/pet_control/pet_real_life.h
index 7c7101a84b..294f9a3f9f 100644
--- a/engines/titanic/pet_control/pet_real_life.h
+++ b/engines/titanic/pet_control/pet_real_life.h
@@ -25,7 +25,7 @@
#include "titanic/pet_control/pet_section.h"
#include "titanic/pet_control/pet_glyphs.h"
-#include "titanic/pet_control/pet_text.h"
+#include "titanic/gfx/text_control.h"
namespace Titanic {
@@ -35,7 +35,7 @@ class CPetSaveGlyphs : public CPetGlyphs {
class CPetRealLife : public CPetSection {
private:
CPetGlyphs _glyphs;
- CPetText _text;
+ CTextControl _text;
private:
/**
* Does setup
@@ -124,7 +124,7 @@ public:
/**
* Get a reference to the tooltip text associated with the section
*/
- virtual CPetText *getText() { return &_text; }
+ virtual CTextControl *getText() { return &_text; }
};
diff --git a/engines/titanic/pet_control/pet_remote.cpp b/engines/titanic/pet_control/pet_remote.cpp
index 9123959b62..0293ec93a1 100644
--- a/engines/titanic/pet_control/pet_remote.cpp
+++ b/engines/titanic/pet_control/pet_remote.cpp
@@ -112,12 +112,12 @@ bool CPetRemote::reset() {
_up.reset("PetUp", _petControl, MODE_UNSELECTED);
_down.reset("PetDown", _petControl, MODE_UNSELECTED);
- _left.reset("PetLeftUp", _petControl, MODE_SELECTED);
- _left.reset("PetLeft", _petControl, MODE_UNSELECTED);
- _right.reset("PetRightUp", _petControl, MODE_SELECTED);
- _right.reset("PetRight", _petControl, MODE_UNSELECTED);
- _top.reset("PetTopUp", _petControl, MODE_SELECTED);
- _top.reset("PetTop", _petControl, MODE_UNSELECTED);
+ _left.reset("PetLeftUp", _petControl, MODE_UNSELECTED);
+ _left.reset("PetLeft", _petControl, MODE_SELECTED);
+ _right.reset("PetRightUp", _petControl, MODE_UNSELECTED);
+ _right.reset("PetRight", _petControl, MODE_SELECTED);
+ _top.reset("PetTopUp", _petControl, MODE_UNSELECTED);
+ _top.reset("PetTop", _petControl, MODE_SELECTED);
_bottom.reset("PetBottomUp", _petControl, MODE_UNSELECTED);
_bottom.reset("PetBottom", _petControl, MODE_SELECTED);
_action.reset("PetActionUp", _petControl, MODE_UNSELECTED);
@@ -202,7 +202,7 @@ void CPetRemote::enterRoom(CRoomItem *room) {
}
}
-CPetText *CPetRemote::getText() {
+CTextControl *CPetRemote::getText() {
return &_text;
}
diff --git a/engines/titanic/pet_control/pet_remote.h b/engines/titanic/pet_control/pet_remote.h
index 9cd9c1e9d7..008c6459df 100644
--- a/engines/titanic/pet_control/pet_remote.h
+++ b/engines/titanic/pet_control/pet_remote.h
@@ -27,7 +27,7 @@
#include "titanic/pet_control/pet_section.h"
#include "titanic/pet_control/pet_glyphs.h"
#include "titanic/pet_control/pet_remote_glyphs.h"
-#include "titanic/pet_control/pet_text.h"
+#include "titanic/gfx/text_control.h"
namespace Titanic {
@@ -45,7 +45,7 @@ private:
CPetGfxElement _send;
CPetGfxElement _receive;
CPetGfxElement _call;
- CPetText _text;
+ CTextControl _text;
private:
/**
* Setup the control
@@ -137,7 +137,7 @@ public:
/**
* Get a reference to the tooltip text associated with the section
*/
- virtual CPetText *getText();
+ virtual CTextControl *getText();
/**
* Get an element from the section by a designated Id
diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp
index 0116aa9156..7f52ca7ee9 100644
--- a/engines/titanic/pet_control/pet_remote_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp
@@ -81,7 +81,7 @@ bool CBasicRemoteGlyph::MouseButtonUpMsg(const Point &pt) {
return false;
}
-void CBasicRemoteGlyph::getTooltip(CPetText *text) {
+void CBasicRemoteGlyph::getTooltip(CTextControl *text) {
text->setText(_tooltip);
}
@@ -160,7 +160,7 @@ bool CRemoteGotoGlyph::MouseButtonUpMsg(const Point &pt) {
return true;
}
-void CRemoteGotoGlyph::getTooltip(CPetText *text) {
+void CRemoteGotoGlyph::getTooltip(CTextControl *text) {
text->setText(_tooltip);
}
@@ -172,7 +172,7 @@ bool CTelevisionControlGlyph::setup(CPetControl *petControl, CPetGlyphs *owner)
if (owner) {
_up = getElement(1);
_down = getElement(2);
- _onOff = getElement(4);
+ _onOff = getElement(0);
}
return true;
@@ -216,7 +216,7 @@ bool CTelevisionControlGlyph::MouseButtonUpMsg(const Point &pt) {
return false;
}
-void CTelevisionControlGlyph::getTooltip(CPetText *text) {
+void CTelevisionControlGlyph::getTooltip(CTextControl *text) {
text->setText(TELEVISION_CONTROL);
}
@@ -280,7 +280,7 @@ bool CEntertainmentDeviceGlyph::MouseButtonUpMsg(const Point &pt) {
return false;
}
-void CEntertainmentDeviceGlyph::getTooltip(CPetText *text) {
+void CEntertainmentDeviceGlyph::getTooltip(CTextControl *text) {
text->setText(OPERATE_ENTERTAINMENT);
}
@@ -328,13 +328,13 @@ bool COperateLightsGlyph::MouseButtonUpMsg(const Point &pt) {
getOwner()->generateMessage(RMSG_UP, "Light");
else if (_down && _down->MouseButtonUpMsg(pt))
getOwner()->generateMessage(RMSG_DOWN, "Light");
- else
+ else if (_activate && _activate->MouseButtonUpMsg(pt))
getOwner()->generateMessage(RMSG_ACTIVATE, "Light");
return true;
}
-void COperateLightsGlyph::getTooltip(CPetText *text) {
+void COperateLightsGlyph::getTooltip(CTextControl *text) {
text->setText(OPERATE_LIGHTS);
}
@@ -346,7 +346,7 @@ bool CDeployFloralGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
return true;
}
-void CDeployFloralGlyph::getTooltip(CPetText *text) {
+void CDeployFloralGlyph::getTooltip(CTextControl *text) {
text->setText(DEPLOY_FLORAL_ENHANCEMENT);
}
@@ -359,7 +359,7 @@ bool CDeployFullyRelaxationGlyph::setup(CPetControl *petControl, CPetGlyphs *own
return true;
}
-void CDeployFullyRelaxationGlyph::getTooltip(CPetText *text) {
+void CDeployFullyRelaxationGlyph::getTooltip(CTextControl *text) {
text->setText(DEPLOY_FULLY_RELAXATION);
}
@@ -371,7 +371,7 @@ bool CDeployComfortGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
return true;
}
-void CDeployComfortGlyph::getTooltip(CPetText *text) {
+void CDeployComfortGlyph::getTooltip(CTextControl *text) {
text->setText(DEPLOY_COMFORT_WORKSTATION);
}
@@ -383,7 +383,7 @@ bool CDeployMinorStorageGlyph::setup(CPetControl *petControl, CPetGlyphs *owner)
return true;
}
-void CDeployMinorStorageGlyph::getTooltip(CPetText *text) {
+void CDeployMinorStorageGlyph::getTooltip(CTextControl *text) {
text->setText(DEPLOY_MINOR_STORAGE);
}
@@ -395,7 +395,7 @@ bool CDeployMajorRelaxationGlyph::setup(CPetControl *petControl, CPetGlyphs *own
return true;
}
-void CDeployMajorRelaxationGlyph::getTooltip(CPetText *text) {
+void CDeployMajorRelaxationGlyph::getTooltip(CTextControl *text) {
text->setText(DEPLOY_MAJOR_RELAXATION);
}
@@ -407,7 +407,7 @@ bool CInflateRelaxationGlyph::setup(CPetControl *petControl, CPetGlyphs *owner)
return true;
}
-void CInflateRelaxationGlyph::getTooltip(CPetText *text) {
+void CInflateRelaxationGlyph::getTooltip(CTextControl *text) {
text->setText(INFLATE_RELAXATION_DEVICE);
}
@@ -419,7 +419,7 @@ bool CDeployMaintenanceGlyph::setup(CPetControl *petControl, CPetGlyphs *owner)
return true;
}
-void CDeployMaintenanceGlyph::getTooltip(CPetText *text) {
+void CDeployMaintenanceGlyph::getTooltip(CTextControl *text) {
text->setText(DEPLOY_MAINTENANCE_HUB);
}
@@ -431,7 +431,7 @@ bool CDeployWorkSurfaceGlyph::setup(CPetControl *petControl, CPetGlyphs *owner)
return true;
}
-void CDeployWorkSurfaceGlyph::getTooltip(CPetText *text) {
+void CDeployWorkSurfaceGlyph::getTooltip(CTextControl *text) {
text->setText(DEPLOY_EXECUTIVE_SURFACE);
}
@@ -443,7 +443,7 @@ bool CDeployMinorRelaxationGlyph::setup(CPetControl *petControl, CPetGlyphs *own
return true;
}
-void CDeployMinorRelaxationGlyph::getTooltip(CPetText *text) {
+void CDeployMinorRelaxationGlyph::getTooltip(CTextControl *text) {
text->setText(DEPLOY_MINOR_RELAXATION);
}
@@ -455,7 +455,7 @@ bool CDeploySinkGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
return true;
}
-void CDeploySinkGlyph::getTooltip(CPetText *text) {
+void CDeploySinkGlyph::getTooltip(CTextControl *text) {
text->setText(DEPLOY_SINK);
}
@@ -467,7 +467,7 @@ bool CDeployMajorStorageGlyph::setup(CPetControl *petControl, CPetGlyphs *owner)
return true;
}
-void CDeployMajorStorageGlyph::getTooltip(CPetText *text) {
+void CDeployMajorStorageGlyph::getTooltip(CTextControl *text) {
text->setText(DEPLOY_MAJOR_STORAGE);
}
@@ -515,7 +515,7 @@ bool CSuccubusDeliveryGlyph::MouseButtonUpMsg(const Point &pt) {
return true;
}
-void CSuccubusDeliveryGlyph::getTooltip(CPetText *text) {
+void CSuccubusDeliveryGlyph::getTooltip(CTextControl *text) {
text->setText(SUCCUBUS_DELIVERY_SYSTEM);
}
@@ -554,7 +554,7 @@ bool CNavigationControllerGlyph::MouseButtonUpMsg(const Point &pt) {
return true;
}
-void CNavigationControllerGlyph::getTooltip(CPetText *text) {
+void CNavigationControllerGlyph::getTooltip(CTextControl *text) {
text->setText(NAVIGATION_CONTROLLER);
}
diff --git a/engines/titanic/pet_control/pet_remote_glyphs.h b/engines/titanic/pet_control/pet_remote_glyphs.h
index 691a70f609..0a035ec03a 100644
--- a/engines/titanic/pet_control/pet_remote_glyphs.h
+++ b/engines/titanic/pet_control/pet_remote_glyphs.h
@@ -116,7 +116,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CToggleRemoteGlyph : public CPetRemoteGlyph {
@@ -181,7 +181,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CSummonElevatorGlyph : public CBasicRemoteGlyph {
@@ -225,7 +225,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CEntertainmentDeviceGlyph : public CToggleRemoteGlyph {
@@ -259,7 +259,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
@@ -293,7 +293,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CDeployFloralGlyph : public CToggleRemoteGlyph {
@@ -320,7 +320,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CDeployFullyRelaxationGlyph : public CToggleRemoteGlyph {
@@ -347,7 +347,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CDeployComfortGlyph : public CToggleRemoteGlyph {
@@ -374,7 +374,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CDeployMinorStorageGlyph : public CToggleRemoteGlyph {
@@ -401,7 +401,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CDeployMajorRelaxationGlyph : public CToggleRemoteGlyph {
@@ -428,7 +428,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CInflateRelaxationGlyph : public CToggleRemoteGlyph {
@@ -455,7 +455,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CDeployMaintenanceGlyph : public CToggleRemoteGlyph {
@@ -482,7 +482,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CDeployWorkSurfaceGlyph : public CToggleRemoteGlyph {
@@ -509,7 +509,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CDeployMinorRelaxationGlyph : public CToggleRemoteGlyph {
@@ -536,7 +536,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CDeploySinkGlyph : public CToggleRemoteGlyph {
@@ -563,7 +563,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CDeployMajorStorageGlyph : public CToggleRemoteGlyph {
@@ -590,7 +590,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CSuccubusDeliveryGlyph : public CPetRemoteGlyph {
@@ -623,7 +623,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CNavigationControllerGlyph : public CPetRemoteGlyph {
@@ -657,7 +657,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
class CGotoBottomOfWellGlyph : public CRemoteGotoGlyph {
diff --git a/engines/titanic/pet_control/pet_rooms.cpp b/engines/titanic/pet_control/pet_rooms.cpp
index ebf8381eed..88d9df15cd 100644
--- a/engines/titanic/pet_control/pet_rooms.cpp
+++ b/engines/titanic/pet_control/pet_rooms.cpp
@@ -30,8 +30,8 @@ CPetRooms::CPetRooms() :
_chevRightOnDim(nullptr), _chevRightOffDim(nullptr),
_chevLeftOnLit(nullptr), _chevLeftOffLit(nullptr),
_chevRightOnLit(nullptr), _chevRightOffLit(nullptr),
- _floorNum(0), _elevatorNum(0), _roomNum(0), _field1CC(0),
- _wellEntry(0), _field1D4(0) {
+ _floorNum(1), _elevatorNum(0), _roomNum(0), _field1CC(1),
+ _wellEntry(0), _elevatorBroken(true) {
}
bool CPetRooms::setup(CPetControl *petControl) {
@@ -97,8 +97,8 @@ bool CPetRooms::VirtualKeyCharMsg(CVirtualKeyCharMsg *msg) {
}
bool CPetRooms::checkDragEnd(CGameObject *item) {
- // Ignore any item drops except valid mail items
- if (!item->_isMail)
+ // Ignore any item drops except onto mail items
+ if (!item->_isPendingMail)
return false;
uint roomFlags = item->_destRoomFlags;
@@ -141,7 +141,7 @@ void CPetRooms::load(SimpleFile *file, int param) {
_roomNum = file->readNumber();
_field1CC = file->readNumber();
_wellEntry = file->readNumber();
- _field1D4 = file->readNumber();
+ _elevatorBroken = file->readNumber();
}
}
@@ -157,7 +157,7 @@ void CPetRooms::save(SimpleFile *file, int indent) {
file->writeNumberLine(_roomNum, indent);
file->writeNumberLine(_field1CC, indent);
file->writeNumberLine(_wellEntry, indent);
- file->writeNumberLine(_field1D4, indent);
+ file->writeNumberLine(_elevatorBroken, indent);
}
void CPetRooms::enter(PetArea oldArea) {
@@ -170,7 +170,7 @@ void CPetRooms::enterRoom(CRoomItem *room) {
resetHighlight();
}
-CPetText *CPetRooms::getText() {
+CTextControl *CPetRooms::getText() {
return &_text;
}
@@ -285,7 +285,7 @@ void CPetRooms::reassignRoom(PassengerClass passClassNum) {
glyph->setMode(RGM_PREV_ASSIGNED_ROOM);
CRoomFlags roomFlags;
- roomFlags.setRandomLocation(passClassNum, _field1D4);
+ roomFlags.setRandomLocation(passClassNum, _elevatorBroken);
glyph = addRoom(roomFlags, true);
if (glyph) {
// Flag the new room as assigned to the player, and highlight it
diff --git a/engines/titanic/pet_control/pet_rooms.h b/engines/titanic/pet_control/pet_rooms.h
index efc7e3c969..6b71359ce6 100644
--- a/engines/titanic/pet_control/pet_rooms.h
+++ b/engines/titanic/pet_control/pet_rooms.h
@@ -24,7 +24,7 @@
#define TITANIC_PET_ROOMS_H
#include "titanic/pet_control/pet_section.h"
-#include "titanic/pet_control/pet_text.h"
+#include "titanic/gfx/text_control.h"
#include "titanic/pet_control/pet_rooms_glyphs.h"
#include "titanic/game_location.h"
@@ -43,13 +43,13 @@ private:
CGameObject *_chevRightOnLit;
CGameObject *_chevRightOffLit;
CPetGfxElement _plinth;
- CPetText _text;
+ CTextControl _text;
int _floorNum;
int _elevatorNum;
int _roomNum;
int _field1CC;
int _wellEntry;
- int _field1D4;
+ bool _elevatorBroken;
private:
/**
* Setup the control
@@ -141,7 +141,7 @@ public:
/**
* Get a reference to the tooltip text associated with the section
*/
- virtual CPetText *getText();
+ virtual CTextControl *getText();
/**
* Special retrieval of glyph background image
@@ -212,7 +212,7 @@ public:
*/
int getWellEntry() const { return _wellEntry; }
- void set1D4(int val) { _field1D4 = val; }
+ void setElevatorBroken(bool flag) { _elevatorBroken = flag; }
};
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.cpp b/engines/titanic/pet_control/pet_rooms_glyphs.cpp
index e911759f25..a69704c7a5 100644
--- a/engines/titanic/pet_control/pet_rooms_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_rooms_glyphs.cpp
@@ -124,7 +124,7 @@ bool CPetRoomsGlyph::dragGlyph(const Point &topLeft, CMouseDragStartMsg *msg) {
if (chevron) {
chevron->_destRoomFlags = _roomFlags;
- chevron->_isMail = _mailFlag != 0;
+ chevron->_isPendingMail = _mailFlag != 0;
petControl->removeFromInventory(chevron, false, false);
chevron->loadSurface();
@@ -141,19 +141,19 @@ bool CPetRoomsGlyph::dragGlyph(const Point &topLeft, CMouseDragStartMsg *msg) {
return false;
}
-void CPetRoomsGlyph::getTooltip(CPetText *text) {
+void CPetRoomsGlyph::getTooltip(CTextControl *text) {
CRoomFlags roomFlags(_roomFlags);
CPetRooms *owner = static_cast<CPetRooms *>(getPetSection());
- CString msg;
+ CString prefix;
if (isCurrentlyAssigned()) {
- msg = "Your assigned room: ";
+ prefix = "Your assigned room: ";
} else if (isPreviouslyAssigned()) {
- msg = "A previously assigned room: ";
+ prefix = "A previously assigned room: ";
} else if (!_mailFlag) {
- msg = "Saved Chevron: ";
+ prefix = "Saved Chevron: ";
} else if (_mailFlag == 1 && owner->getRoomFlags() == _roomFlags) {
- msg = "Current location: ";
+ prefix = "Current location: ";
}
// Get the room description
@@ -165,7 +165,7 @@ void CPetRoomsGlyph::getTooltip(CPetText *text) {
}
roomStr += " (shift-click edits)";
- text->setText(roomStr);
+ text->setText(prefix + roomStr);
}
void CPetRoomsGlyph::saveGlyph(SimpleFile *file, int indent) {
diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.h b/engines/titanic/pet_control/pet_rooms_glyphs.h
index 6c51b6f875..3a43bdc06c 100644
--- a/engines/titanic/pet_control/pet_rooms_glyphs.h
+++ b/engines/titanic/pet_control/pet_rooms_glyphs.h
@@ -89,7 +89,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
/**
* Saves the data for the glyph
diff --git a/engines/titanic/pet_control/pet_save.cpp b/engines/titanic/pet_control/pet_save.cpp
index 60afa11ab4..00dbfa6b4a 100644
--- a/engines/titanic/pet_control/pet_save.cpp
+++ b/engines/titanic/pet_control/pet_save.cpp
@@ -64,7 +64,7 @@ void CPetSave::highlightCurrent(const Point &pt) {
highlightSave(_savegameSlotNum);
}
-void CPetSave::getTooltip(CPetText *text) {
+void CPetSave::getTooltip(CTextControl *text) {
text->setText("Save the game.");
}
diff --git a/engines/titanic/pet_control/pet_save.h b/engines/titanic/pet_control/pet_save.h
index 39a25eb087..9b3c11566f 100644
--- a/engines/titanic/pet_control/pet_save.h
+++ b/engines/titanic/pet_control/pet_save.h
@@ -57,7 +57,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
/**
* Called on a highlighted item when PET area is entered
diff --git a/engines/titanic/pet_control/pet_section.cpp b/engines/titanic/pet_control/pet_section.cpp
index aced697705..2c2238e3f9 100644
--- a/engines/titanic/pet_control/pet_section.cpp
+++ b/engines/titanic/pet_control/pet_section.cpp
@@ -39,7 +39,7 @@ static const uint PALETTE3[5] = {
};
void CPetSection::displayMessage(const CString &msg) {
- CPetText *text = getText();
+ CTextControl *text = getText();
if (text) {
text->setColor(getColor(1));
@@ -64,7 +64,7 @@ void CPetSection::removeText(int duration) {
}
void CPetSection::removeText() {
- CPetText *text = getText();
+ CTextControl *text = getText();
if (text)
text->setup();
}
diff --git a/engines/titanic/pet_control/pet_section.h b/engines/titanic/pet_control/pet_section.h
index c68aa90411..e245d5176b 100644
--- a/engines/titanic/pet_control/pet_section.h
+++ b/engines/titanic/pet_control/pet_section.h
@@ -35,7 +35,7 @@ enum PetArea {
class CPetControl;
class CPetElement;
-class CPetText;
+class CTextControl;
class CScreenManager;
class CRoomItem;
@@ -170,7 +170,7 @@ public:
/**
* Get a reference to the tooltip text associated with the section
*/
- virtual CPetText *getText() { return nullptr; }
+ virtual CTextControl *getText() { return nullptr; }
/**
* Removes text after a given duration
diff --git a/engines/titanic/pet_control/pet_sound.cpp b/engines/titanic/pet_control/pet_sound.cpp
index e9958c67be..f4d45038e9 100644
--- a/engines/titanic/pet_control/pet_sound.cpp
+++ b/engines/titanic/pet_control/pet_sound.cpp
@@ -275,7 +275,7 @@ bool CPetSound::MouseButtonUpMsg(const Point &pt) {
return true;
}
-void CPetSound::getTooltip(CPetText *text) {
+void CPetSound::getTooltip(CTextControl *text) {
text->setText("Change the volume settings.");
}
diff --git a/engines/titanic/pet_control/pet_sound.h b/engines/titanic/pet_control/pet_sound.h
index c4b663ad44..fed4f43f92 100644
--- a/engines/titanic/pet_control/pet_sound.h
+++ b/engines/titanic/pet_control/pet_sound.h
@@ -25,7 +25,7 @@
#include "titanic/pet_control/pet_glyphs.h"
#include "titanic/pet_control/pet_gfx_element.h"
-#include "titanic/pet_control/pet_text.h"
+#include "titanic/gfx/text_control.h"
#include "titanic/pet_control/pet_slider.h"
namespace Titanic {
@@ -39,10 +39,10 @@ private:
CPetSlider _musicVolume;
CPetSlider _parrotVolume;
CPetSlider _speechVolume;
- CPetText _textMasterVolume;
- CPetText _textMusicVolume;
- CPetText _textParrotVolume;
- CPetText _textSpeechVolume;
+ CTextControl _textMasterVolume;
+ CTextControl _textMusicVolume;
+ CTextControl _textParrotVolume;
+ CTextControl _textSpeechVolume;
CPetSlider *_draggingSlider;
int _draggingSliderNum;
private:
@@ -96,7 +96,7 @@ public:
/**
* Returns the tooltip text for when the glyph is selected
*/
- virtual void getTooltip(CPetText *text);
+ virtual void getTooltip(CTextControl *text);
};
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_starfield.h b/engines/titanic/pet_control/pet_starfield.h
index 6c47f47d67..ec96fb93ef 100644
--- a/engines/titanic/pet_control/pet_starfield.h
+++ b/engines/titanic/pet_control/pet_starfield.h
@@ -24,7 +24,7 @@
#define TITANIC_PET_STARFIELD_H
#include "titanic/pet_control/pet_section.h"
-#include "titanic/pet_control/pet_text.h"
+#include "titanic/gfx/text_control.h"
#include "titanic/pet_control/pet_gfx_element.h"
namespace Titanic {
@@ -39,7 +39,7 @@ private:
CPetGfxElement _leds[6];
Rect _rect1;
int _field18C;
- CPetText _text;
+ CTextControl _text;
bool _photoOn;
bool _hasReference;
private:
diff --git a/engines/titanic/pet_control/pet_translation.cpp b/engines/titanic/pet_control/pet_translation.cpp
index fe6c37c8ab..9509047325 100644
--- a/engines/titanic/pet_control/pet_translation.cpp
+++ b/engines/titanic/pet_control/pet_translation.cpp
@@ -61,8 +61,8 @@ void CPetTranslation::clearTranslation() {
void CPetTranslation::addTranslation(const CString &str1, const CString &str2) {
CString msg = CString::format("%s%s - %s%s",
- CPetText::getColorText(0, 0x80, 0).c_str(), str1.c_str(),
- CPetText::getColorText(0, 0, 0).c_str(), str2.c_str());
+ CTextControl::getColorText(0, 0x80, 0).c_str(), str1.c_str(),
+ CTextControl::getColorText(0, 0, 0).c_str(), str2.c_str());
_message.addLine(msg);
_petControl->makeDirty();
}
diff --git a/engines/titanic/pet_control/pet_translation.h b/engines/titanic/pet_control/pet_translation.h
index 26070d6e59..ce12be454e 100644
--- a/engines/titanic/pet_control/pet_translation.h
+++ b/engines/titanic/pet_control/pet_translation.h
@@ -24,14 +24,14 @@
#define TITANIC_PET_TRANSLATION_H
#include "titanic/pet_control/pet_section.h"
-#include "titanic/pet_control/pet_text.h"
+#include "titanic/gfx/text_control.h"
namespace Titanic {
class CPetTranslation : public CPetSection {
private:
- CPetText _message;
- CPetText _tooltip;
+ CTextControl _message;
+ CTextControl _tooltip;
private:
/**
* Setup the control
@@ -87,7 +87,7 @@ public:
/**
* Get a reference to the tooltip text associated with the section
*/
- virtual CPetText *getText() { return &_tooltip; }
+ virtual CTextControl *getText() { return &_tooltip; }
/**
* Clear any current translation text
diff --git a/engines/titanic/room_flags.cpp b/engines/titanic/room_flags.cpp
index be9acb9627..57156f0655 100644
--- a/engines/titanic/room_flags.cpp
+++ b/engines/titanic/room_flags.cpp
@@ -41,7 +41,7 @@ struct TransportFlagsEntry {
struct SuccUBusFlagsEntry {
const char *const _roomName;
uint _roomFlags;
- uint _succubusNum;
+ PassengerClass _classNum;
};
#define TRANSPORT_ROOMS_SIZE 6
@@ -56,23 +56,23 @@ const TransportFlagsEntry TRANSPORT_ROOMS[TRANSPORT_ROOMS_SIZE] = {
#define SUCCUBUS_ROOMS_SIZE 17
const SuccUBusFlagsEntry SUCCUBUS_ROOMS[SUCCUBUS_ROOMS_SIZE] = {
- { "ParrotLobby", 0x1D0D9, 3 },
- { "SculptureChamber", 0x465FB, 2 },
- { "Bar", 0x0B3D97, 2 },
- { "EmbLobby", 0x0CC971, 3 },
- { "MoonEmbLobby", 0x0CC971, 3 },
- { "MusicRoom", 0x0F34DB, 2 },
- { "MusicRoomLobby", 0x0F34DB, 2 },
- { "Titania", 0x8A397, 3 },
- { "BottomOfWell", 0x59FAD, 3 },
- { "Arboretum", 0x4D6AF, 1 },
- { "PromenadeDeck", 0x79C45, 2 },
- { "1stClassRestaurant", 0x896B9, 1 },
- { "CreatorsChamber", 0x2F86D, 2 },
- { "CreatorsChamberOn", 0x2F86D, 2 },
- { "BilgeRoom", 0x3D94B, 3 },
- { "BilgeRoomWith", 0x3D94B, 3 },
- { "Bridge", 0x39FCB, 3 }
+ { "ParrotLobby", 0x1D0D9, THIRD_CLASS },
+ { "SculptureChamber", 0x465FB, SECOND_CLASS },
+ { "Bar", 0x0B3D97, SECOND_CLASS },
+ { "EmbLobby", 0x0CC971, THIRD_CLASS },
+ { "MoonEmbLobby", 0x0CC971, THIRD_CLASS },
+ { "MusicRoom", 0x0F34DB, SECOND_CLASS },
+ { "MusicRoomLobby", 0x0F34DB, SECOND_CLASS },
+ { "Titania", 0x8A397, THIRD_CLASS },
+ { "BottomOfWell", 0x59FAD, THIRD_CLASS },
+ { "Arboretum", 0x4D6AF, FIRST_CLASS },
+ { "PromenadeDeck", 0x79C45, SECOND_CLASS },
+ { "1stClassRestaurant", 0x896B9, FIRST_CLASS },
+ { "CreatorsChamber", 0x2F86D, SECOND_CLASS },
+ { "CreatorsChamberOn", 0x2F86D, SECOND_CLASS },
+ { "BilgeRoom", 0x3D94B, THIRD_CLASS },
+ { "BilgeRoomWith", 0x3D94B, THIRD_CLASS },
+ { "Bridge", 0x39FCB, THIRD_CLASS }
};
int CRoomFlags::getConditionally() const {
@@ -301,8 +301,10 @@ void CRoomFlags::setFloorNum(uint floorNum) {
break;
case 1:
base = 0xD0;
+ break;
case 2:
base = 0xE0;
+ break;
case 3:
base = 0xF0;
break;
@@ -353,13 +355,13 @@ uint CRoomFlags::getSpecialRoomFlags(const CString &roomName) {
return 0;
}
-uint CRoomFlags::getSuccUBusNum(const CString &roomName) const {
+PassengerClass CRoomFlags::getSuccUBusClass(const CString &roomName) const {
for (int idx = 0; idx < SUCCUBUS_ROOMS_SIZE; ++idx) {
if (roomName == SUCCUBUS_ROOMS[idx]._roomName)
- return SUCCUBUS_ROOMS[idx]._succubusNum;
+ return SUCCUBUS_ROOMS[idx]._classNum;
}
- return 0;
+ return NO_CLASS;
}
CString CRoomFlags::getSuccUBusRoomName() const {
@@ -470,7 +472,7 @@ bool CRoomFlags::compareLocation(uint flags1, uint flags2) {
CRoomFlags f1(flags1);
CRoomFlags f2(flags2);
- return f1.getElevatorNum() == f2.getElevatorBits() &&
+ return f1.getElevatorNum() == f2.getElevatorNum() &&
f1.getFloorNum() == f2.getFloorNum() &&
f1.getRoomNum() == f2.getRoomNum();
}
diff --git a/engines/titanic/room_flags.h b/engines/titanic/room_flags.h
index 8e86bf707e..e2fb91015a 100644
--- a/engines/titanic/room_flags.h
+++ b/engines/titanic/room_flags.h
@@ -209,9 +209,9 @@ public:
void setRandomLocation(PassengerClass classNum, bool flag);
/**
- * Gets the succubus number associated with a given room
+ * Gets the passenger class for a succubus associated with a given room
*/
- uint getSuccUBusNum(const CString &roomName) const;
+ PassengerClass getSuccUBusClass(const CString &roomName) const;
/**
* Gets the succubus room name associated with the current room flags
diff --git a/engines/titanic/sound/auto_music_player_base.cpp b/engines/titanic/sound/auto_music_player_base.cpp
index 49ae906e91..b000d8f90d 100644
--- a/engines/titanic/sound/auto_music_player_base.cpp
+++ b/engines/titanic/sound/auto_music_player_base.cpp
@@ -90,7 +90,7 @@ bool CAutoMusicPlayerBase::ChangeMusicMsg(CChangeMusicMsg *msg) {
}
}
- if (_isRepeated && msg->_flags == 2) {
+ if (!_isRepeated && msg->_flags == 2) {
_isRepeated = true;
playGlobalSound(_filename, _volumeMode, _initialMute, true, 0);
}
diff --git a/engines/titanic/sound/season_noises.cpp b/engines/titanic/sound/season_noises.cpp
index 14689d5337..5f139e728f 100644
--- a/engines/titanic/sound/season_noises.cpp
+++ b/engines/titanic/sound/season_noises.cpp
@@ -31,7 +31,7 @@ BEGIN_MESSAGE_MAP(CSeasonNoises, CViewAutoSoundPlayer)
ON_MESSAGE(LoadSuccessMsg)
END_MESSAGE_MAP()
-CSeasonNoises::CSeasonNoises() : CViewAutoSoundPlayer(), _seasonNumber(0),
+CSeasonNoises::CSeasonNoises() : CViewAutoSoundPlayer(), _seasonNumber(SEASON_SUMMER),
_springName("NULL"), _summerName("NULL"), _autumnName("NULL"), _winterName("NULL") {
}
@@ -48,7 +48,7 @@ void CSeasonNoises::save(SimpleFile *file, int indent) {
void CSeasonNoises::load(SimpleFile *file) {
file->readNumber();
- _seasonNumber = file->readNumber();
+ _seasonNumber = (Season)file->readNumber();
_springName = file->readString();
_summerName = file->readString();
_autumnName = file->readString();
@@ -58,7 +58,7 @@ void CSeasonNoises::load(SimpleFile *file) {
}
bool CSeasonNoises::ChangeSeasonMsg(CChangeSeasonMsg *msg) {
- _seasonNumber = (_seasonNumber + 1) % 4;
+ _seasonNumber = (Season)(((int)_seasonNumber + 1) % 4);
CActMsg actMsg("Update");
actMsg.execute(this);
@@ -67,6 +67,7 @@ bool CSeasonNoises::ChangeSeasonMsg(CChangeSeasonMsg *msg) {
bool CSeasonNoises::EnterViewMsg(CEnterViewMsg *msg) {
CActMsg actMsg("Update");
+ actMsg.execute(this);
return true;
}
@@ -74,18 +75,18 @@ bool CSeasonNoises::ActMsg(CActMsg *msg) {
msg->_action = "Update";
switch (_seasonNumber) {
- case 0:
- _filename = _springName;
- break;
- case 1:
+ case SEASON_SUMMER:
_filename = _summerName;
break;
- case 2:
+ case SEASON_AUTUMN:
_filename = _autumnName;
break;
- case 3:
+ case SEASON_WINTER:
_filename = _winterName;
break;
+ case SEASON_SPRING:
+ _filename = _springName;
+ break;
default:
break;
}
diff --git a/engines/titanic/sound/season_noises.h b/engines/titanic/sound/season_noises.h
index 796628d10d..cab8d5907f 100644
--- a/engines/titanic/sound/season_noises.h
+++ b/engines/titanic/sound/season_noises.h
@@ -34,7 +34,7 @@ class CSeasonNoises : public CViewAutoSoundPlayer {
bool ActMsg(CActMsg *msg);
bool LoadSuccessMsg(CLoadSuccessMsg *msg);
private:
- int _seasonNumber;
+ Season _seasonNumber;
CString _springName;
CString _summerName;
CString _autumnName;
diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp
index 5f8e53caf3..a3cdae9635 100644
--- a/engines/titanic/sound/sound_manager.cpp
+++ b/engines/titanic/sound/sound_manager.cpp
@@ -443,7 +443,7 @@ void QSoundManager::updateVolume(int channel, uint panRate) {
case 3:
case 4:
case 5:
- volume = (24525 * volume) / 100;
+ volume = (75 * volume) / 100;
break;
case 6:
case 7:
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp
index 6240de951c..22b3e98c16 100644
--- a/engines/titanic/support/avi_surface.cpp
+++ b/engines/titanic/support/avi_surface.cpp
@@ -132,18 +132,21 @@ bool AVISurface::startAtFrame(int frameNumber) {
if (frameNumber == -1)
// Default to starting frame of first movie range
frameNumber = _movieRangeInfo.front()->_startFrame;
- if (_isReversed && frameNumber == _decoder->getFrameCount())
+ if (_isReversed && frameNumber == (int)_decoder->getFrameCount())
--frameNumber;
- // Get the initial frame
- seekToFrame(frameNumber);
- renderFrame();
-
// Start the playback
_decoder->start();
+
+ // Seek to the starting frame
+ seekToFrame(frameNumber);
+
+ // If we're in reverse playback, set the decoder to play in reverse
if (_isReversed)
_decoder->setRate(-1.0);
+ renderFrame();
+
return true;
}
@@ -155,12 +158,9 @@ void AVISurface::seekToFrame(uint frameNumber) {
_decoder->seekToFrame(frameNumber);
_currentFrame = (int)frameNumber;
}
-
- renderFrame();
}
void AVISurface::setReversed(bool isReversed) {
- _decoder->setReverse(isReversed);
_isReversed = isReversed;
}
@@ -196,8 +196,8 @@ bool AVISurface::handleEvents(CMovieEventList &events) {
if (isPlaying()) {
if (newFrame != getFrame()) {
// The frame has been changed, so move to new position
- setReversed(info->_isReversed);
seekToFrame(newFrame);
+ renderFrame();
}
// Get any events for the given position
@@ -273,12 +273,14 @@ void AVISurface::setupDecompressor() {
}
void AVISurface::copyMovieFrame(const Graphics::Surface &src, Graphics::ManagedSurface &dest) {
- assert(src.w == dest.w && src.h == dest.h);
+ // WORKAROUND: A bad video in the Promenade has a frame with a width slightly larger
+ // than the defined width for the movie it's in. Hence the assert below is >=
+ assert(src.w >= dest.w && src.h == dest.h);
if (src.format.bytesPerPixel == 1) {
// Paletted 8-bit, so convert to 16-bit and copy over
Graphics::Surface *s = src.convertTo(dest.format, _decoder->getPalette());
- dest.blitFrom(*s);
+ dest.blitFrom(*s, Common::Rect(0, 0, dest.w, dest.h), Common::Point(0, 0));
s->free();
delete s;
} else if (src.format.bytesPerPixel == 2) {
diff --git a/engines/titanic/support/mouse_cursor.cpp b/engines/titanic/support/mouse_cursor.cpp
index 6300f65a3b..c6942510cc 100644
--- a/engines/titanic/support/mouse_cursor.cpp
+++ b/engines/titanic/support/mouse_cursor.cpp
@@ -192,6 +192,14 @@ void CMouseCursor::enableControl() {
CScreenManager::_screenManagerPtr->_inputHandler->decLockCount();
}
+void CMouseCursor::setBusy() {
+ setCursor(CURSOR_HOURGLASS);
+}
+
+void CMouseCursor::clearBusy() {
+ setCursor(CURSOR_ARROW);
+}
+
void CMouseCursor::setPosition(const Point &pt, double duration) {
_moveStartPos = g_vm->_events->getMousePos();
_moveDestPos = pt;
diff --git a/engines/titanic/support/mouse_cursor.h b/engines/titanic/support/mouse_cursor.h
index 1662ce743d..d61e5fe0bc 100644
--- a/engines/titanic/support/mouse_cursor.h
+++ b/engines/titanic/support/mouse_cursor.h
@@ -144,6 +144,17 @@ public:
void enableControl();
/**
+ * Shows the busy cursor
+ */
+ void setBusy();
+
+ /**
+ * Resets the cursor back to normal
+ */
+ void clearBusy();
+
+
+ /**
* Move the mouse to a new position
*/
void setPosition(const Point &pt, double duration);
diff --git a/engines/titanic/support/screen_manager.cpp b/engines/titanic/support/screen_manager.cpp
index 553486d094..cc9054e688 100644
--- a/engines/titanic/support/screen_manager.cpp
+++ b/engines/titanic/support/screen_manager.cpp
@@ -73,6 +73,11 @@ int CScreenManager::setFontNumber(int fontNumber) {
return oldFontNumber;
}
+void CScreenManager::preLoad() {
+ if (_textCursor)
+ _textCursor->hide();
+}
+
/*------------------------------------------------------------------------*/
OSScreenManager::OSScreenManager(TitanicEngine *vm): CScreenManager(vm),
diff --git a/engines/titanic/support/screen_manager.h b/engines/titanic/support/screen_manager.h
index a7c929fb5f..7140001bd4 100644
--- a/engines/titanic/support/screen_manager.h
+++ b/engines/titanic/support/screen_manager.h
@@ -228,6 +228,11 @@ public:
* Set the current font number
*/
int setFontNumber(int fontNumber);
+
+ /**
+ * Called when a game is about to be loaded
+ */
+ void preLoad();
};
class OSScreenManager: CScreenManager {
diff --git a/engines/titanic/support/strings.h b/engines/titanic/support/strings.h
index e82f882028..97928dc6e8 100644
--- a/engines/titanic/support/strings.h
+++ b/engines/titanic/support/strings.h
@@ -162,6 +162,10 @@ enum StringId {
CLASS_2,
CLASS_3,
CLASS_NONE,
+ YOUR_ASSIGNED_ROOM,
+ PREVIOUSLY_ASSIGNED_ROOM,
+ SAVED_CHEVRON,
+ CURRENT_LOCATION,
// German version only
DE_SUMMER,
diff --git a/engines/titanic/titanic.cpp b/engines/titanic/titanic.cpp
index e80dc54bcb..48feab5aa4 100644
--- a/engines/titanic/titanic.cpp
+++ b/engines/titanic/titanic.cpp
@@ -41,6 +41,7 @@
#include "titanic/moves/enter_exit_first_class_state.h"
#include "titanic/moves/enter_exit_sec_class_mini_lift.h"
#include "titanic/moves/exit_pellerator.h"
+#include "titanic/pet_control/pet_control.h"
#include "titanic/support/simple_file.h"
#include "titanic/true_talk/tt_npc_script.h"
@@ -169,11 +170,20 @@ void TitanicEngine::setRoomNames() {
bool TitanicEngine::canLoadGameStateCurrently() {
- return _window->_inputAllowed;
+ if (!_window->_inputAllowed)
+ return false;
+ CProjectItem *project = _window->_gameManager->_project;
+ if (project) {
+ CPetControl *pet = project->getPetControl();
+ if (pet && !pet->isAreaUnlocked())
+ return false;
+ }
+
+ return true;
}
bool TitanicEngine::canSaveGameStateCurrently() {
- return _window->_inputAllowed;
+ return canLoadGameStateCurrently();
}
Common::Error TitanicEngine::loadGameState(int slot) {
diff --git a/engines/titanic/titanic.h b/engines/titanic/titanic.h
index d8e0f880f7..43f3fa07f3 100644
--- a/engines/titanic/titanic.h
+++ b/engines/titanic/titanic.h
@@ -123,6 +123,7 @@ public:
StringArray _itemIds;
StringArray _roomNames;
Strings _strings;
+ CString _stateRoomExitView;
public:
TitanicEngine(OSystem *syst, const TitanicGameDescription *gameDesc);
virtual ~TitanicEngine();
diff --git a/engines/titanic/true_talk/barbot_script.cpp b/engines/titanic/true_talk/barbot_script.cpp
index ad10f5a57f..d79ebedf4d 100644
--- a/engines/titanic/true_talk/barbot_script.cpp
+++ b/engines/titanic/true_talk/barbot_script.cpp
@@ -748,7 +748,7 @@ done:
return 2;
}
- addResponse(getDialogueId(250082 + getRandomNumber(100) <= 89 ? 128 : 0));
+ addResponse(getDialogueId(250082 + (getRandomNumber(100) <= 89 ? 128 : 0)));
}
}
@@ -776,7 +776,7 @@ ScriptChangedResult BarbotScript::scriptChanged(const TTroomScript *roomScript,
resetFlags();
} else {
if (!getValue(28) || !fn10(true)) {
- addResponse(getDialogueId(251627 + getValue(28) ? -1034 : 0));
+ addResponse(getDialogueId(251627 + (getValue(28) ? -1034 : 0)));
applyResponse();
}
@@ -1009,7 +1009,7 @@ uint BarbotScript::getDialsBitset() const {
bits = 1;
if (!getDialRegion(1))
bits |= 2;
- if (!getDialRegion(2))
+ if (getDialRegion(2))
bits |= 4;
return bits;
@@ -1147,9 +1147,10 @@ int BarbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScrip
if (id) {
addResponse(getDialogueId(id));
applyResponse();
+ return 2;
}
- return 2;
+ return 0;
}
void BarbotScript::setDialRegion(int dialNum, int region) {
diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp
index 795e160092..446a32eaae 100644
--- a/engines/titanic/true_talk/true_talk_manager.cpp
+++ b/engines/titanic/true_talk/true_talk_manager.cpp
@@ -352,7 +352,7 @@ void CTrueTalkManager::setDialogue(CTrueTalkNPC *npc, TTroomScript *roomScript,
TTtalker *talker = new TTtalker(this, npc);
_talkers.push_back(talker);
- bool isParrot = npc->getName().contains("parrot");
+ bool isParrot = npc->getName().containsIgnoreCase("parrot");
triggerNPC(npc);
playSpeech(talker, roomScript, view, isParrot);
talker->speechStarted(dialogueStr, _titleEngine._indexes[0], speechDuration);
@@ -538,9 +538,10 @@ void CTrueTalkManager::playSpeech(TTtalker *talker, TTroomScript *roomScript, CV
if (!milli)
continue;
+#ifdef SPATIAL_SOUND
if (idx == 0)
g_vm->_events->sleep(milli);
-#ifdef SPATIAL_SOUND
+
// TODO: Figure out if these below are needed. It kinda looks like they were
// simply playing the same speech at different spatial co-ordinates. And since
// we don't support spatial processing in ScummVM yet, they're being left disabled
diff --git a/engines/titanic/true_talk/tt_concept.cpp b/engines/titanic/true_talk/tt_concept.cpp
index cd24d7cc36..5d538606e4 100644
--- a/engines/titanic/true_talk/tt_concept.cpp
+++ b/engines/titanic/true_talk/tt_concept.cpp
@@ -28,7 +28,8 @@
namespace Titanic {
TTconcept::TTconcept() : _string1(" "), _string2(" "),
- _scriptP(nullptr), _wordP(nullptr), _status(SS_VALID) {
+ _nextP(nullptr), _scriptP(nullptr), _wordP(nullptr), _status(SS_VALID),
+ _scriptType(ST_UNKNOWN_SCRIPT), _field14(0), _field20(0), _field34(0) {
if (setStatus())
setScriptType(ST_UNKNOWN_SCRIPT);
else
@@ -36,8 +37,8 @@ TTconcept::TTconcept() : _string1(" "), _string2(" "),
}
TTconcept::TTconcept(TTscriptBase *script, ScriptType scriptType) :
- _string1(" "), _string2(" "), _wordP(nullptr), _scriptP(nullptr),
- _status(SS_VALID) {
+ _string1(" "), _string2(" "), _nextP(nullptr), _wordP(nullptr), _scriptP(nullptr),
+ _status(SS_VALID), _scriptType(ST_UNKNOWN_SCRIPT), _field14(0), _field20(0), _field34(0) {
if (!script->getStatus()) {
setScriptType(scriptType);
_scriptP = script;
@@ -51,8 +52,8 @@ TTconcept::TTconcept(TTscriptBase *script, ScriptType scriptType) :
}
TTconcept::TTconcept(TTword *word, ScriptType scriptType) :
- _string1(" "), _string2(" "), _wordP(nullptr), _scriptP(nullptr),
- _status(SS_VALID) {
+ _string1(" "), _string2(" "), _nextP(nullptr), _wordP(nullptr), _scriptP(nullptr),
+ _status(SS_VALID), _scriptType(ST_UNKNOWN_SCRIPT), _field14(0), _field20(0), _field34(0) {
if (!word || !setStatus() || word->getStatus()) {
_status = SS_5;
} else {
@@ -66,8 +67,9 @@ TTconcept::TTconcept(TTword *word, ScriptType scriptType) :
}
TTconcept::TTconcept(TTconcept &src) :
- _string1(src._string1), _string2(src._string2),
- _wordP(nullptr), _scriptP(nullptr), _status(SS_VALID) {
+ _string1(src._string1), _string2(src._string2), _nextP(nullptr),
+ _wordP(nullptr), _scriptP(nullptr), _status(SS_VALID),
+ _scriptType(ST_UNKNOWN_SCRIPT), _field14(0), _field20(0), _field34(0) {
if (src.getStatus()) {
_status = SS_5;
} else {
diff --git a/engines/titanic/true_talk/tt_npc_script.cpp b/engines/titanic/true_talk/tt_npc_script.cpp
index 527e33f14c..ba205b6498 100644
--- a/engines/titanic/true_talk/tt_npc_script.cpp
+++ b/engines/titanic/true_talk/tt_npc_script.cpp
@@ -406,15 +406,17 @@ void TTnpcScript::save(SimpleFile *file) {
file->writeNumber(_dialDelta);
file->writeNumber(_field7C);
+ // Write out the dial values
file->writeNumber(10);
for (int idx = 0; idx < 10; ++idx)
- file->writeNumber(_data[idx]);
+ file->writeNumber(_dialValues[idx]);
}
void TTnpcScript::load(SimpleFile *file) {
loadBody(file);
int count = file->readNumber();
+ assert(count == 4);
_rangeResetCtr = file->readNumber();
_currentDialNum = file->readNumber();
_dialDelta = file->readNumber();
@@ -423,22 +425,23 @@ void TTnpcScript::load(SimpleFile *file) {
for (int idx = count; idx > 4; --idx)
file->readNumber();
+ // Read in the dial values
count = file->readNumber();
for (int idx = 0; idx < count; ++idx) {
int v = file->readNumber();
if (idx < 10)
- _data[idx] = v;
+ _dialValues[idx] = v;
}
}
void TTnpcScript::saveBody(SimpleFile *file) {
- int count = proc31();
+ int count = getRangesCount();
file->writeNumber(count);
if (count > 0) {
for (uint idx = 0; idx < _ranges.size(); ++idx) {
const TTscriptRange &item = _ranges[idx];
- if (item._mode == SF_RANDOM && item._priorIndex) {
+ if (item._mode != SF_RANDOM && item._priorIndex) {
file->writeNumber(item._id);
file->writeNumber(item._priorIndex);
}
@@ -464,7 +467,7 @@ void TTnpcScript::loadBody(SimpleFile *file) {
}
}
-int TTnpcScript::proc31() const {
+int TTnpcScript::getRangesCount() const {
int count = 0;
for (uint idx = 0; idx < _ranges.size(); ++idx) {
const TTscriptRange &item = _ranges[idx];
diff --git a/engines/titanic/true_talk/tt_npc_script.h b/engines/titanic/true_talk/tt_npc_script.h
index bdca568b09..e5be7d7296 100644
--- a/engines/titanic/true_talk/tt_npc_script.h
+++ b/engines/titanic/true_talk/tt_npc_script.h
@@ -308,7 +308,11 @@ public:
virtual void load(SimpleFile *file);
virtual void saveBody(SimpleFile *file);
virtual void loadBody(SimpleFile *file);
- virtual int proc31() const;
+
+ /**
+ * Returns the number of range records that are non-random
+ */
+ virtual int getRangesCount() const;
/**
* Sets a given dial to be pointing in a specified region (0 to 2)
diff --git a/engines/titanic/true_talk/tt_sentence.cpp b/engines/titanic/true_talk/tt_sentence.cpp
index 451582383d..5a5bff7af8 100644
--- a/engines/titanic/true_talk/tt_sentence.cpp
+++ b/engines/titanic/true_talk/tt_sentence.cpp
@@ -43,7 +43,7 @@ TTsentence::TTsentence(int inputCtr, const TTstring &line, CScriptHandler *owner
TTroomScript *roomScript, TTnpcScript *npcScript) :
_owner(owner), _category(1), _inputCtr(inputCtr), _field34(0),
_field38(0), _initialLine(line), _nodesP(nullptr), _roomScript(roomScript),
- _npcScript(npcScript), _field58(0), _field5C(0) {
+ _npcScript(npcScript), _field58(5), _field5C(5) {
_status = _initialLine.isValid() && _normalizedLine.isValid() ? SS_11: SS_VALID;
}
@@ -212,7 +212,7 @@ bool TTsentence::fn2(int slotIndex, const TTstring &str, const TTconceptNode *no
if (g_vm->_exeResources._owner->_concept1P && (slotIndex == 0 ||
slotIndex == 2 || slotIndex == 3 || slotIndex == 4 || slotIndex == 5)) {
- if (str == g_vm->_exeResources._owner->_concept2P->getText() &&
+ if (str == g_vm->_exeResources._owner->_concept1P->getText() &&
(conceptText == "it" || conceptText == "that" || conceptText == "he" ||
conceptText == "she" || conceptText == "him" || conceptText == "her" ||
conceptText == "them" || conceptText == "they" || conceptText == "those" ||
@@ -221,7 +221,7 @@ bool TTsentence::fn2(int slotIndex, const TTstring &str, const TTconceptNode *no
}
if (g_vm->_exeResources._owner->_concept1P && (slotIndex == 0 || slotIndex == 2)) {
- if (conceptText == "?" && str == g_vm->_exeResources._owner->_concept2P->getText()) {
+ if (conceptText == "?" && str == g_vm->_exeResources._owner->_concept1P->getText()) {
delete concept;
concept = getFrameSlot(5, node);
conceptText = concept->getText();
diff --git a/engines/titanic/true_talk/tt_string_node.cpp b/engines/titanic/true_talk/tt_string_node.cpp
index 5a21d73a9b..60c506e8cd 100644
--- a/engines/titanic/true_talk/tt_string_node.cpp
+++ b/engines/titanic/true_talk/tt_string_node.cpp
@@ -25,7 +25,8 @@
namespace Titanic {
-TTstringNode::TTstringNode() : TTnode() {
+TTstringNode::TTstringNode() : TTnode(), _file(HANDLE_STDIN),
+ _mode(0), _field1C(0) {
}
void TTstringNode::initialize(int mode) {
diff --git a/engines/titanic/true_talk/tt_synonym.cpp b/engines/titanic/true_talk/tt_synonym.cpp
index bb78e734ca..4629351f12 100644
--- a/engines/titanic/true_talk/tt_synonym.cpp
+++ b/engines/titanic/true_talk/tt_synonym.cpp
@@ -24,19 +24,17 @@
namespace Titanic {
-TTsynonym::TTsynonym() : TTstringNode(), _file(HANDLE_STDIN),
- _mode(0), _field1C(0) {
+TTsynonym::TTsynonym() : TTstringNode() {
}
-TTsynonym::TTsynonym(const TTsynonym *src) : TTstringNode(),
- _mode(0), _field1C(0) {
+TTsynonym::TTsynonym(const TTsynonym *src) : TTstringNode() {
_string = src->_string;
initialize(src->_mode);
_file = src->_file;
}
TTsynonym::TTsynonym(int mode, const char *str, FileHandle file) :
- TTstringNode(), _mode(0), _field1C(0) {
+ TTstringNode() {
_string = str;
initialize(mode);
_file = file;
diff --git a/engines/titanic/true_talk/tt_synonym.h b/engines/titanic/true_talk/tt_synonym.h
index d5dc2be09e..09f4617cf1 100644
--- a/engines/titanic/true_talk/tt_synonym.h
+++ b/engines/titanic/true_talk/tt_synonym.h
@@ -30,11 +30,6 @@ namespace Titanic {
class TTsynonym : public TTstringNode {
public:
- TTstring _string;
- FileHandle _file;
- int _mode;
- int _field1C;
-public:
TTsynonym();
TTsynonym(const TTsynonym *src);
TTsynonym(int mode, const char *str, FileHandle file);
diff --git a/engines/tony/POTFILES b/engines/tony/POTFILES
new file mode 100644
index 0000000000..a2e3c09eab
--- /dev/null
+++ b/engines/tony/POTFILES
@@ -0,0 +1 @@
+engines/tony/tony.cpp
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index c51f449aa1..8a7b676918 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -27,6 +27,7 @@
#include "common/events.h"
#include "common/file.h"
#include "common/installshield_cab.h"
+#include "common/translation.h"
#include "tony/tony.h"
#include "tony/custom.h"
#include "tony/debugger.h"
@@ -189,11 +190,12 @@ Common::ErrorCode TonyEngine::init() {
bool TonyEngine::loadTonyDat() {
Common::String msg;
Common::File in;
+ Common::String filename = "tony.dat";
- in.open("tony.dat");
+ in.open(filename.c_str());
if (!in.isOpen()) {
- msg = "You're missing the 'tony.dat' file. Get it from the ScummVM website";
+ msg = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
GUIErrorMessage(msg);
warning("%s", msg.c_str());
return false;
@@ -205,7 +207,7 @@ bool TonyEngine::loadTonyDat() {
buf[4] = '\0';
if (strcmp(buf, "TONY")) {
- msg = "File 'tony.dat' is corrupt. Get it from the ScummVM website";
+ msg = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
GUIErrorMessage(msg);
warning("%s", msg.c_str());
return false;
@@ -215,7 +217,9 @@ bool TonyEngine::loadTonyDat() {
int minVer = in.readByte();
if ((majVer != TONY_DAT_VER_MAJ) || (minVer != TONY_DAT_VER_MIN)) {
- msg = Common::String::format("File 'tony.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from the ScummVM website", TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer);
+ msg = Common::String::format(
+ _("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+ filename.c_str(), TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer);
GUIErrorMessage(msg);
warning("%s", msg.c_str());
@@ -251,7 +255,7 @@ bool TonyEngine::loadTonyDat() {
int numVariant = in.readUint16BE();
if (expectedLangVariant > numVariant - 1) {
- msg = Common::String::format("Font variant not present in 'tony.dat'. Get it from the ScummVM website");
+ msg = Common::String::format(_("Font variant not present in '%s' engine data file."), filename.c_str());
GUIErrorMessage(msg);
warning("%s", msg.c_str());
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 43fb3a1b1f..dc1c515e1c 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -4909,12 +4909,13 @@ void ToonEngine::createShadowLUT() {
bool ToonEngine::loadToonDat() {
Common::File in;
Common::String msg;
+ Common::String filename = "toon.dat";
int majVer, minVer;
- in.open("toon.dat");
+ in.open(filename.c_str());
if (!in.isOpen()) {
- msg = _("You're missing the 'toon.dat' file. Get it from the ScummVM website");
+ msg = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
GUIErrorMessage(msg);
warning("%s", msg.c_str());
return false;
@@ -4926,7 +4927,7 @@ bool ToonEngine::loadToonDat() {
buf[4] = '\0';
if (strcmp(buf, "TOON")) {
- msg = _("File 'toon.dat' is corrupt. Get it from the ScummVM website");
+ msg = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
GUIErrorMessage(msg);
warning("%s", msg.c_str());
return false;
@@ -4936,7 +4937,9 @@ bool ToonEngine::loadToonDat() {
minVer = in.readByte();
if ((majVer != TOON_DAT_VER_MAJ) || (minVer != TOON_DAT_VER_MIN)) {
- msg = Common::String::format(_("File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from the ScummVM website"), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer);
+ msg = Common::String::format(
+ _("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+ filename.c_str(), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer);
GUIErrorMessage(msg);
warning("%s", msg.c_str());
diff --git a/engines/wage/detection_tables.h b/engines/wage/detection_tables.h
index 836a3f14d2..c4262cd40d 100644
--- a/engines/wage/detection_tables.h
+++ b/engines/wage/detection_tables.h
@@ -78,9 +78,9 @@ static const ADGameDescription gameDescriptions[] = {
FANGAME("Find the Heart", "a6834cb230cea1953f5bf1f8f7aacabd", 105871), // Standalone
FANGAMEN("Fortune Teller", "Fortune Teller 1.1", "7d2628eeea67b33379e01c0aef8dd196", 73931),
FANGAMEN("Haunted House", "Haunted House 1.5", "5db2f95c7abaa9d060b94271a5bc57f8", 177500),
- // Cropped graphics on first scene
+ // Cropped graphics on first scene, cannot pass to in-game
FANGAME("Intro to Gothic", "6f732eaad6e3b85795f8ee6c6a40d837", 208067),
- // No Next button in intro
+ // Lots of unhandled comparisons
FANGAME("Jamie the Demon Slayer", "fa0ca9618c18425b6d9bf913f762d91b", 232789),
FANGAMEN("Journey", "The Journey 1.6.2 US", "e66f37472e1414a088eb5d5acc4df794", 820572),
FANGAMEN("Jumble", "LSJUMBLE", "7c46851d2f90c7da9efe40b1688869c2", 647339), // Original file name is "LSJUMBLE† "
@@ -89,7 +89,6 @@ static const ADGameDescription gameDescriptions[] = {
FANGAME("Karth of the Jungle II", "32161b27de894fd9e3f054afc4013f34", 201053),
FANGAMEN("Little Pythagoras", "Little Pythagoras 1.1.1", "75906fa955de695ac3e8164e7d88ac7b", 628821),
FANGAME("Lost Crystal", "d5e27a83f2884a24c6ec26c6cb776fe9", 771072),
- // Crash in design drawing on startup
FANGAMEN("Lost In Kookyville", "Lost In Kookyville 1.2.4", "5ab6259706b33230dbfba05618c2c5c9", 721569),
FANGAME("Magic Rings", "450e986694b96f3b9e6cc64e57b753dc", 109044),
// No way to click on the house
@@ -123,13 +122,11 @@ static const ADGameDescription gameDescriptions[] = {
FANGAMEN("Pyramid of Ert", "Pyramid of Ert V1.2", "fb931cd35440a66864a434c773b496da", 315783),
FANGAME("Queen Quest", "8273e29afe64a984eb0ce7b43fdf3a59", 57039), // alt version
FANGAME("Quest for T-Rex", "f16f2cd525c9aeb4733295d8d842b902", 592584),
- // Crash in console rendering on the initial scene
FANGAME("Quest for the Dark Sword", "4815d9a770904b26c463b7e4fcd121c7", 572576),
FANGAME("Radical Castle", "09b70763c7a48a76240bd0e42737caaa", 355601),
FANGAME("Radical Castle 1.0", "8ae2e29ffeca52a5c7fae66dec4764a3", 347278),
BIGGAME("raysmaze", "v1.5", "Ray's Maze1.5", "521583e59bdc1d611f963cef1dc25869", 1408516),
BIGGAME("raysmaze", "v1.5/alt", "Ray's Maze1.5", "120e65bec953b981b2e0aed45ad45d70", 1408516),
- // Next button is not visible
FANGAME("Ray's World Builder Demo", "d252ee8e38c9abc50455d071a367d031", 116056),
// Unhandled comparison case
FANGAME("Sands of Time", "b00ea866cb04cd87124e5720bc2c84c7", 122672), // Original file name "Sands of Time†"
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index ef3cc2d84f..24779b9793 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -361,6 +361,12 @@ bool BaseGame::initConfManSettings() {
_debugShowFPS = false;
}
+ if (ConfMan.hasKey("bilinear_filtering")) {
+ _bilinearFiltering = ConfMan.getBool("bilinear_filtering");
+ } else {
+ _bilinearFiltering = false;
+ }
+
if (ConfMan.hasKey("disable_smartcache")) {
_smartCache = ConfMan.getBool("disable_smartcache");
} else {
diff --git a/engines/wintermute/base/base_game.h b/engines/wintermute/base/base_game.h
index 6aacc1feab..46484cc5ca 100644
--- a/engines/wintermute/base/base_game.h
+++ b/engines/wintermute/base/base_game.h
@@ -101,7 +101,7 @@ public:
virtual bool displayDebugInfo();
void setShowFPS(bool enabled) { _debugShowFPS = enabled; }
-
+ bool getBilinearFiltering() { return _bilinearFiltering; }
bool getSuspendedRendering() const { return _suspendedRendering; }
TTextEncoding _textEncoding;
@@ -279,6 +279,7 @@ protected:
VideoTheoraPlayer *_theoraPlayer;
private:
bool _debugShowFPS;
+ bool _bilinearFiltering;
void *_debugLogFile;
void DEBUG_DebugDisable();
void DEBUG_DebugEnable(const char *filename = nullptr);
diff --git a/engines/wintermute/base/file/base_disk_file.cpp b/engines/wintermute/base/file/base_disk_file.cpp
index d0c51616f4..0684b3f591 100644
--- a/engines/wintermute/base/file/base_disk_file.cpp
+++ b/engines/wintermute/base/file/base_disk_file.cpp
@@ -29,6 +29,7 @@
#include "engines/wintermute/dcgf.h"
#include "engines/wintermute/base/file/base_disk_file.h"
#include "engines/wintermute/base/base_file_manager.h"
+#include "engines/wintermute/utils/path_util.h"
#include "common/stream.h"
#include "common/memstream.h"
#include "common/file.h"
@@ -37,6 +38,7 @@
#include "common/tokenizer.h"
#include "common/config-manager.h"
+
namespace Wintermute {
void correctSlashes(Common::String &fileName) {
@@ -150,7 +152,7 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename) {
}
// File wasn't found in SearchMan, try to parse the path as a relative path.
if (!file) {
- Common::FSNode searchNode = getNodeForRelativePath(filename);
+ Common::FSNode searchNode = getNodeForRelativePath(PathUtil::normalizeFileName(filename));
if (searchNode.exists() && !searchNode.isDirectory() && searchNode.isReadable()) {
file = searchNode.createReadStream();
}
diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.cpp b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
index afe884300a..acc9530684 100644
--- a/engines/wintermute/base/gfx/osystem/render_ticket.cpp
+++ b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
@@ -27,6 +27,7 @@
*/
+#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/base/gfx/osystem/render_ticket.h"
#include "engines/wintermute/base/gfx/osystem/base_surface_osystem.h"
#include "graphics/transform_tools.h"
@@ -59,7 +60,12 @@ RenderTicket::RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *s
// TransformTools.)
if (_transform._angle != Graphics::kDefaultAngle) {
Graphics::TransparentSurface src(*_surface, false);
- Graphics::Surface *temp = src.rotoscale(transform);
+ Graphics::Surface *temp;
+ if (owner->_gameRef->getBilinearFiltering()) {
+ temp = src.rotoscaleT<Graphics::FILTER_BILINEAR>(transform);
+ } else {
+ temp = src.rotoscaleT<Graphics::FILTER_NEAREST>(transform);
+ }
_surface->free();
delete _surface;
_surface = temp;
@@ -67,7 +73,12 @@ RenderTicket::RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *s
dstRect->height() != srcRect->height()) &&
_transform._numTimesX * _transform._numTimesY == 1) {
Graphics::TransparentSurface src(*_surface, false);
- Graphics::Surface *temp = src.scale(dstRect->width(), dstRect->height());
+ Graphics::Surface *temp;
+ if (owner->_gameRef->getBilinearFiltering()) {
+ temp = src.scaleT<Graphics::FILTER_BILINEAR>(dstRect->width(), dstRect->height());
+ } else {
+ temp = src.scaleT<Graphics::FILTER_NEAREST>(dstRect->width(), dstRect->height());
+ }
_surface->free();
delete _surface;
_surface = temp;
diff --git a/engines/wintermute/dctypes.h b/engines/wintermute/dctypes.h
index 90340f437d..571ce21931 100644
--- a/engines/wintermute/dctypes.h
+++ b/engines/wintermute/dctypes.h
@@ -37,9 +37,6 @@
namespace Wintermute {
-//typedef std::string AnsiString;
-//typedef std::string Utf8String;
-//typedef std::wstring WideString;
typedef Common::String AnsiString;
typedef Common::String Utf8String;
typedef Common::U32String WideString;
diff --git a/engines/wintermute/detection.cpp b/engines/wintermute/detection.cpp
index 4e8eab505f..9ccb75d62f 100644
--- a/engines/wintermute/detection.cpp
+++ b/engines/wintermute/detection.cpp
@@ -59,8 +59,19 @@ static const ADExtraGuiOptionsMap gameGuiOptions[] = {
_s("Show the current number of frames per second in the upper left corner"),
"show_fps",
false
+ },
+ },
+
+ {
+ GAMEOPTION_BILINEAR,
+ {
+ _s("Sprite bilinear filtering (SLOW)"),
+ _s("Apply bilinear filtering to individual sprites"),
+ "bilinear_filtering",
+ false
}
},
+
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
@@ -76,7 +87,7 @@ class WintermuteMetaEngine : public AdvancedMetaEngine {
public:
WintermuteMetaEngine() : AdvancedMetaEngine(Wintermute::gameDescriptions, sizeof(WMEGameDescription), Wintermute::wintermuteGames, gameGuiOptions) {
_singleId = "wintermute";
- _guiOptions = GUIO2(GUIO_NOMIDI, GAMEOPTION_SHOW_FPS);
+ _guiOptions = GUIO3(GUIO_NOMIDI, GAMEOPTION_SHOW_FPS, GAMEOPTION_BILINEAR);
_maxScanDepth = 2;
_directoryGlobs = directoryGlobs;
}
diff --git a/engines/wintermute/detection_tables.h b/engines/wintermute/detection_tables.h
index 68985d8d0c..5b87dd439c 100644
--- a/engines/wintermute/detection_tables.h
+++ b/engines/wintermute/detection_tables.h
@@ -23,6 +23,7 @@
namespace Wintermute {
#define GAMEOPTION_SHOW_FPS GUIO_GAMEOPTIONS1
+#define GAMEOPTION_BILINEAR GUIO_GAMEOPTIONS2
static const PlainGameDescriptor wintermuteGames[] = {
{"5ld", "Five Lethal Demons"},
@@ -42,6 +43,8 @@ static const PlainGameDescriptor wintermuteGames[] = {
{"conspiracao", "Conspiracao Dumont"},
{"corrosion", "Corrosion: Cold Winter Waiting"},
{"deadcity", "Dead City"},
+ {"dfafadventure", "DFAF Adventure"},
+ {"dreamcat", "Dreamcat"},
{"dreaming", "Des Reves Elastiques Avec Mille Insectes Nommes Georges"},
{"dirtysplit", "Dirty Split"},
{"dreamscape", "Dreamscape"},
@@ -60,6 +63,7 @@ static const PlainGameDescriptor wintermuteGames[] = {
{"mirage", "Mirage"},
{"nighttrain", "Night Train"},
{"oknytt", "Oknytt"},
+ {"openquest", "Open Quest"},
{"paintaria", "Paintaria"},
{"pigeons", "Pigeons in the Park"},
{"projectdoom", "Project: Doom"},
@@ -237,6 +241,9 @@ static const WMEGameDescription gameDescriptions[] = {
WME_WINENTRY("deadcity", "",
WME_ENTRY2s("russian.dcp", "a0ae71e9e1185596fffb07ad2c951eb9", 653317,
"data.dcp", "7ebfd50d1a22370ed7b079bcaa631d62", 9070205), Common::RU_RUS, ADGF_UNSTABLE, LATEST_VERSION),
+ // DFAF Adventure
+ WME_WINENTRY("dfafadventure", "",
+ WME_ENTRY1s("data.dcp","5704ebef961176f647742aa66bd09352", 10083417), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION),
// Dirty Split (Czech)
WME_WINENTRY("dirtysplit", "",
WME_ENTRY2s("czech.dcp", "08a71446467cf8f9444cfea446b46ad6", 127697934,
@@ -262,6 +269,9 @@ static const WMEGameDescription gameDescriptions[] = {
// Des Reves Elastiques Avec Mille Insectes Nommes Georges
WME_WINENTRY("dreaming", "",
WME_ENTRY1s("data.dcp", "4af26d97ea063fc1277ce30ae431de90", 8804073), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION),
+ // Dreamcat
+ WME_WINENTRY("dreamcat", "",
+ WME_ENTRY1s("data.dcp","189bd4eef29034f4ff4ed30120eaac4e", 7758040), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION),
// Dreamscape
WME_WINENTRY("dreamscape", "",
WME_ENTRY1s("data.dcp", "7a5752ed4446c862be9f02d7932acf54", 17034377), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION),
@@ -366,6 +376,9 @@ static const WMEGameDescription gameDescriptions[] = {
WME_WINENTRY("oknytt", "Version 1.13",
WME_ENTRY2s("spanish.dcp", "10c46152cb29581671f3b6b7c229c957", 319406572,
"d_sounds.dcp", "7d04dff8ca11174486bd4b7a80fdcabb", 154943401), Common::ES_ESP, ADGF_UNSTABLE, LATEST_VERSION),
+ // Open Quest
+ WME_WINENTRY("openquest", "",
+ WME_ENTRY1s("data.dcp", "16893e3fc15a211a49654ae66f684f28", 82281736), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION),
// Night Train Demo
WME_WINENTRY("nighttrain", "",
WME_ENTRY1s("data.dcp", "5a027ef84b083a730c9a4c85ec1d3a32", 131760816), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION),
diff --git a/engines/wintermute/utils/path_util.cpp b/engines/wintermute/utils/path_util.cpp
index 71311713af..8518f8968f 100644
--- a/engines/wintermute/utils/path_util.cpp
+++ b/engines/wintermute/utils/path_util.cpp
@@ -32,8 +32,8 @@
namespace Wintermute {
//////////////////////////////////////////////////////////////////////////
-AnsiString PathUtil::unifySeparators(const AnsiString &path) {
- AnsiString newPath = path;
+Common::String PathUtil::unifySeparators(const Common::String &path) {
+ Common::String newPath = path;
for (uint32 i = 0; i < newPath.size(); i++) {
if (newPath[i] == '\\') {
@@ -45,16 +45,16 @@ AnsiString PathUtil::unifySeparators(const AnsiString &path) {
}
//////////////////////////////////////////////////////////////////////////
-AnsiString PathUtil::normalizeFileName(const AnsiString &path) {
- AnsiString newPath = unifySeparators(path);
+Common::String PathUtil::normalizeFileName(const Common::String &path) {
+ Common::String newPath = unifySeparators(path);
newPath.toLowercase();
return newPath;
}
//////////////////////////////////////////////////////////////////////////
-AnsiString PathUtil::combine(const AnsiString &path1, const AnsiString &path2) {
- AnsiString newPath1 = unifySeparators(path1);
- AnsiString newPath2 = unifySeparators(path2);
+Common::String PathUtil::combine(const Common::String &path1, const Common::String &path2) {
+ Common::String newPath1 = unifySeparators(path1);
+ Common::String newPath2 = unifySeparators(path2);
if (!newPath1.hasSuffix("/") && !newPath2.hasPrefix("/")) {
newPath1 += "/";
@@ -63,29 +63,37 @@ AnsiString PathUtil::combine(const AnsiString &path1, const AnsiString &path2) {
return newPath1 + newPath2;
}
+bool PathUtil::hasTrailingSlash(const Common::String &path) {
+ return (path.size() > 0 && path[path.size() - 1 ] == '/');
+}
+
//////////////////////////////////////////////////////////////////////////
-AnsiString PathUtil::getDirectoryName(const AnsiString &path) {
- AnsiString newPath = unifySeparators(path);
+Common::String PathUtil::getDirectoryName(const Common::String &path) {
+ Common::String newPath = unifySeparators(path);
Common::String filename = getFileName(path);
- return Common::String(path.c_str(), path.size() - filename.size());
+ if (hasTrailingSlash(newPath)) {
+ return path;
+ } else {
+ return Common::String(path.c_str(), path.size() - filename.size());
+ }
}
//////////////////////////////////////////////////////////////////////////
-AnsiString PathUtil::getFileName(const AnsiString &path) {
- AnsiString newPath = unifySeparators(path);
+Common::String PathUtil::getFileName(const Common::String &path) {
+ Common::String newPath = unifySeparators(path);
Common::String lastPart = Common::lastPathComponent(newPath, '/');
- if (lastPart[lastPart.size() - 1 ] != '/') {
- return lastPart;
+ if (hasTrailingSlash(newPath)) {
+ return Common::String("");
} else {
- return path;
+ return lastPart;
}
}
//////////////////////////////////////////////////////////////////////////
-AnsiString PathUtil::getFileNameWithoutExtension(const AnsiString &path) {
- AnsiString fileName = getFileName(path);
+Common::String PathUtil::getFileNameWithoutExtension(const Common::String &path) {
+ Common::String fileName = getFileName(path);
// TODO: Prettify this.
- AnsiString extension = Common::lastPathComponent(fileName, '.');
+ Common::String extension = Common::lastPathComponent(fileName, '.');
for (uint32 i = 0; i < extension.size() + 1; i++) {
fileName.deleteLastChar();
}
@@ -93,8 +101,8 @@ AnsiString PathUtil::getFileNameWithoutExtension(const AnsiString &path) {
}
//////////////////////////////////////////////////////////////////////////
-AnsiString PathUtil::getExtension(const AnsiString &path) {
- AnsiString fileName = getFileName(path);
+Common::String PathUtil::getExtension(const Common::String &path) {
+ Common::String fileName = getFileName(path);
return Common::lastPathComponent(path, '.');
}
diff --git a/engines/wintermute/utils/path_util.h b/engines/wintermute/utils/path_util.h
index 264dc5d241..8050cdfae2 100644
--- a/engines/wintermute/utils/path_util.h
+++ b/engines/wintermute/utils/path_util.h
@@ -35,13 +35,14 @@ namespace Wintermute {
class PathUtil {
public:
- static AnsiString unifySeparators(const AnsiString &path);
- static AnsiString normalizeFileName(const AnsiString &path);
- static AnsiString combine(const AnsiString &path1, const AnsiString &path2);
- static AnsiString getDirectoryName(const AnsiString &path);
- static AnsiString getFileName(const AnsiString &path);
- static AnsiString getFileNameWithoutExtension(const AnsiString &path);
- static AnsiString getExtension(const AnsiString &path);
+ static Common::String unifySeparators(const Common::String &path);
+ static Common::String normalizeFileName(const Common::String &path);
+ static Common::String combine(const Common::String &path1, const Common::String &path2);
+ static Common::String getDirectoryName(const Common::String &path);
+ static Common::String getFileName(const Common::String &path);
+ static Common::String getFileNameWithoutExtension(const Common::String &path);
+ static Common::String getExtension(const Common::String &path);
+ static bool hasTrailingSlash(const Common::String &path);
};
} // End of namespace Wintermute
diff --git a/engines/xeen/worldofxeen/clouds_cutscenes.cpp b/engines/xeen/worldofxeen/clouds_cutscenes.cpp
index 32209a766b..82a7d7c0ca 100644
--- a/engines/xeen/worldofxeen/clouds_cutscenes.cpp
+++ b/engines/xeen/worldofxeen/clouds_cutscenes.cpp
@@ -391,7 +391,8 @@ bool CloudsCutscenes::showCloudsEnding() {
prec.clear();
// Show swirling vortex
- SpriteResource vort[21], cast[6], darkLord[4];
+ // TODO? SpriteResource vort[21];
+ SpriteResource cast[6], darkLord[4];
for (int idx = 1; idx < 7; ++idx)
cast[idx - 1].load(Common::String::format("cast%02u.end", idx));
for (int idx = 1; idx < 4; ++idx)
diff --git a/graphics/macgui/macfontmanager.h b/graphics/macgui/macfontmanager.h
index 09fd0aeaca..61c050b1cf 100644
--- a/graphics/macgui/macfontmanager.h
+++ b/graphics/macgui/macfontmanager.h
@@ -48,8 +48,13 @@ enum {
enum {
kMacFontRegular,
- kMacFontBold,
- kMacFontItalic
+ kMacFontBold = 1,
+ kMacFontItalic = 2,
+ kMacFontUnderline = 4,
+ kMacFontOutline = 8,
+ kMacFontShadow = 16,
+ kMacFontCondense = 32,
+ kMacFontExtend = 64
};
class BdfFont;
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
new file mode 100644
index 0000000000..abf1e4fc38
--- /dev/null
+++ b/graphics/macgui/mactext.cpp
@@ -0,0 +1,158 @@
+/* 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 "graphics/macgui/mactext.h"
+#include "graphics/font.h"
+
+namespace Graphics {
+
+MacText::MacText(Common::String s, Graphics::Font *font, int fgcolor, int bgcolor, int maxWidth) {
+ _str = s;
+ _font = font;
+ _fgcolor = fgcolor;
+ _bgcolor = bgcolor;
+ _maxWidth = maxWidth;
+ _surface = nullptr;
+
+ _interLinear = 0; // 0 pixels between the lines by default
+
+ if (_maxWidth == -1)
+ _textMaxWidth = 1000000; // Some big value
+ else
+ _textMaxWidth = -1;
+
+ splitString(_str);
+
+ _fullRefresh = true;
+}
+
+void MacText::splitString(Common::String &str) {
+ const char *s = str.c_str();
+
+ Common::String tmp;
+ bool prevCR = false;
+
+ while (*s) {
+ if (*s == '\n' && prevCR) { // trean \r\n as one
+ prevCR = false;
+ continue;
+ }
+
+ if (*s == '\r')
+ prevCR = true;
+
+ if (*s == '\r' || *s == '\n') {
+ _maxWidth = MIN(_font->wordWrapText(tmp, _maxWidth, _text), _maxWidth);
+
+ tmp.clear();
+
+ continue;
+ }
+
+ tmp += *s;
+ }
+
+ if (tmp.size())
+ _maxWidth = MIN(_font->wordWrapText(tmp, _maxWidth, _text), _maxWidth);
+}
+
+void MacText::reallocSurface() {
+ int lineH = _font->getFontHeight() + _interLinear;
+ // round to closest 10
+ int requiredH = (_text.size() + (_text.size() * 10 + 9) / 10) * lineH;
+ int surfW = _maxWidth == -1 ? _textMaxWidth : _maxWidth;
+
+ if (!_surface) {
+ _surface = new ManagedSurface(surfW, requiredH);
+
+ return;
+ }
+
+ if (_surface->h < requiredH) {
+ // realloc surface and copy old content
+ ManagedSurface *n = new ManagedSurface(surfW, requiredH);
+ n->blitFrom(*_surface, Common::Point(0, 0));
+
+ delete _surface;
+ _surface = n;
+ }
+}
+
+void MacText::render() {
+ if (_fullRefresh) {
+ render(0, _text.size());
+
+ _fullRefresh = false;
+ }
+}
+
+void MacText::render(int from, int to) {
+ reallocSurface();
+
+ from = MAX<int>(0, from);
+ to = MIN<int>(to, _text.size());
+
+ int lineH = _font->getFontHeight() + _interLinear;
+ int y = from * lineH;
+
+ // Clear the screen
+ _surface->fillRect(Common::Rect(0, y, _surface->w, to * lineH), _bgcolor);
+
+ for (int i = from; i < to; i++) {
+ _font->drawString(_surface, _text[i], 0, y, _textMaxWidth, _fgcolor);
+
+ y += _font->getFontHeight() + _interLinear;
+ }
+
+}
+
+void MacText::draw(ManagedSurface *g, int x, int y, int w, int h, int xoff, int yoff) {
+ render();
+
+ if (x + w < _surface->w || y + h < _surface->h) {
+ g->fillRect(Common::Rect(x, y, x + w, y + w), _bgcolor);
+ }
+
+ g->blitFrom(*_surface, Common::Rect(MIN<int>(_surface->w, x), MIN<int>(_surface->h, y),
+ MIN<int>(_surface->w, x + w), MIN<int>(_surface->w, y + w)),
+ Common::Point(xoff, yoff));
+}
+
+void MacText::appendText(Common::String str) {
+ int oldLen = _text.size();
+
+ splitString(str);
+
+ render(oldLen + 1, _text.size());
+}
+
+void MacText::replaceLastLine(Common::String str) {
+ int oldLen = MAX<int>(0, _text.size() - 1);
+
+ if (_text.size())
+ _text.pop_back();
+
+ splitString(str);
+
+ render(oldLen, _text.size());
+}
+
+} // End of namespace Graphics
diff --git a/graphics/macgui/mactext.h b/graphics/macgui/mactext.h
new file mode 100644
index 0000000000..e035eb123f
--- /dev/null
+++ b/graphics/macgui/mactext.h
@@ -0,0 +1,66 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef GRAPHICS_MACGUI_MACTEXT_H
+#define GRAPHICS_MACGUI_MACTEXT_H
+
+#include "graphics/fontman.h"
+#include "graphics/managed_surface.h"
+
+namespace Graphics {
+
+class MacText {
+public:
+ MacText(Common::String s, Graphics::Font *font, int fgcolor, int bgcolor, int maxWidth = -1);
+
+ void setInterLinear(int interLinear) { _interLinear = interLinear; }
+
+ void draw(ManagedSurface *g, int x, int y, int w, int h, int xoff, int yoff);
+ void appendText(Common::String str);
+ void replaceLastLine(Common::String str);
+
+private:
+ void splitString(Common::String &s);
+ void render();
+ void render(int from, int to);
+ void calcMaxWidth();
+ void reallocSurface();
+
+private:
+ Common::String _str;
+ Graphics::Font *_font;
+ int _fgcolor, _bgcolor;
+
+ int _maxWidth;
+ int _interLinear;
+
+ Common::Array<Common::String> _text;
+
+ int _textMaxWidth;
+
+ Graphics::ManagedSurface *_surface;
+ bool _fullRefresh;
+};
+
+} // End of namespace Graphics
+
+#endif
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp
index 42cab7cf8e..77f22a191d 100644
--- a/graphics/macgui/macwindowmanager.cpp
+++ b/graphics/macgui/macwindowmanager.cpp
@@ -88,6 +88,60 @@ static const byte macCursorBeam[] = {
3, 3, 0, 3, 0, 3, 3, 3, 3, 3, 3,
0, 0, 3, 3, 3, 0, 0, 3, 3, 3, 3,
};
+static const byte macCursorCrossHair[] = {
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+static const byte macCursorWatch[] = {
+ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0,
+ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0,
+ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0,
+ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
+ 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1,
+ 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0,
+ 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,
+ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0,
+ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0,
+ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0,
+ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0,
+};
+static const byte macCursorCrossBar[] = {
+ 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0,
+ 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0,
+ 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0,
+ 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0,
+ 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0,
+ 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1,
+ 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1,
+ 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1,
+ 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1,
+ 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0,
+ 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0,
+ 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
MacWindowManager::MacWindowManager() {
_screen = 0;
@@ -163,18 +217,8 @@ void MacWindowManager::removeWindow(MacWindow *target) {
_needsRemoval = true;
}
-struct PlotData {
- Graphics::ManagedSurface *surface;
- MacPatterns *patterns;
- uint fillType;
- int thickness;
-
- PlotData(Graphics::ManagedSurface *s, MacPatterns *p, int f, int t) :
- surface(s), patterns(p), fillType(f), thickness(t) {}
-};
-
-static void drawPixel(int x, int y, int color, void *data) {
- PlotData *p = (PlotData *)data;
+void macDrawPixel(int x, int y, int color, void *data) {
+ MacPlotData *p = (MacPlotData *)data;
if (p->fillType > p->patterns->size())
return;
@@ -188,7 +232,7 @@ static void drawPixel(int x, int y, int color, void *data) {
*((byte *)p->surface->getBasePtr(xu, yu)) =
(pat[yu % 8] & (1 << (7 - xu % 8))) ?
- color : kColorWhite;
+ color : p->bgColor;
}
} else {
int x1 = x;
@@ -203,7 +247,7 @@ static void drawPixel(int x, int y, int color, void *data) {
uint yu = (uint)y;
*((byte *)p->surface->getBasePtr(xu, yu)) =
(pat[yu % 8] & (1 << (7 - xu % 8))) ?
- color : kColorWhite;
+ color : p->bgColor;
}
}
}
@@ -211,9 +255,9 @@ static void drawPixel(int x, int y, int color, void *data) {
void MacWindowManager::drawDesktop() {
Common::Rect r(_screen->getBounds());
- PlotData pd(_screen, &_patterns, kPatternCheckers, 1);
+ MacPlotData pd(_screen, &_patterns, kPatternCheckers, 1);
- Graphics::drawRoundRect(r, kDesktopArc, kColorBlack, true, drawPixel, &pd);
+ Graphics::drawRoundRect(r, kDesktopArc, kColorBlack, true, macDrawPixel, &pd);
g_system->copyRectToScreen(_screen->getPixels(), _screen->pitch, 0, 0, _screen->w, _screen->h);
}
@@ -327,6 +371,22 @@ void MacWindowManager::pushArrowCursor() {
CursorMan.pushCursor(macCursorArrow, 11, 16, 1, 1, 3);
}
+void MacWindowManager::pushBeamCursor() {
+ CursorMan.pushCursor(macCursorBeam, 11, 16, 1, 1, 3);
+}
+
+void MacWindowManager::pushCrossHairCursor() {
+ CursorMan.pushCursor(macCursorCrossHair, 11, 16, 1, 1, 3);
+}
+
+void MacWindowManager::pushCrossBarCursor() {
+ CursorMan.pushCursor(macCursorCrossBar, 11, 16, 1, 1, 3);
+}
+
+void MacWindowManager::pushWatchCursor() {
+ CursorMan.pushCursor(macCursorWatch, 11, 16, 1, 1, 3);
+}
+
void MacWindowManager::popCursor() {
CursorMan.popCursor();
}
diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h
index 3449ab13c2..8f04861b68 100644
--- a/graphics/macgui/macwindowmanager.h
+++ b/graphics/macgui/macwindowmanager.h
@@ -65,6 +65,20 @@ class MacFontManager;
typedef Common::Array<byte *> MacPatterns;
+struct MacPlotData {
+ Graphics::ManagedSurface *surface;
+ MacPatterns *patterns;
+ uint fillType;
+ int thickness;
+ uint bgColor;
+
+ MacPlotData(Graphics::ManagedSurface *s, MacPatterns *p, int f, int t, uint bg = kColorWhite) :
+ surface(s), patterns(p), fillType(f), thickness(t), bgColor(bg) {
+ }
+};
+
+void macDrawPixel(int x, int y, int color, void *data);
+
/**
* A manager class to handle window creation, destruction,
* drawing, moving and event handling.
@@ -143,9 +157,12 @@ public:
* @return A MacPatterns object reference with the patterns.
*/
MacPatterns &getPatterns() { return _patterns; }
- void drawFilledRoundRect(ManagedSurface *surface, Common::Rect &rect, int arc, int color);
void pushArrowCursor();
+ void pushBeamCursor();
+ void pushCrossHairCursor();
+ void pushCrossBarCursor();
+ void pushWatchCursor();
void popCursor();
public:
diff --git a/graphics/module.mk b/graphics/module.mk
index b6e704bc29..51e2ef7f2d 100644
--- a/graphics/module.mk
+++ b/graphics/module.mk
@@ -14,6 +14,7 @@ MODULE_OBJS := \
maccursor.o \
macgui/macfontmanager.o \
macgui/macmenu.o \
+ macgui/mactext.o \
macgui/macwindow.o \
macgui/macwindowborder.o \
macgui/macwindowmanager.o \
diff --git a/graphics/transparent_surface.cpp b/graphics/transparent_surface.cpp
index 7ef7d00286..48e6da6c79 100644
--- a/graphics/transparent_surface.cpp
+++ b/graphics/transparent_surface.cpp
@@ -37,8 +37,6 @@
#include "graphics/transparent_surface.h"
#include "graphics/transform_tools.h"
-//#define ENABLE_BILINEAR
-
namespace Graphics {
static const int kBModShift = 0;//img->format.bShift;
@@ -676,8 +674,10 @@ systems.
+struct tColorRGBA { byte r; byte g; byte b; byte a; };
-TransparentSurface *TransparentSurface::rotoscale(const TransformStruct &transform) const {
+template <TFilteringMode filteringMode>
+TransparentSurface *TransparentSurface::rotoscaleT(const TransformStruct &transform) const {
assert(transform._angle != 0); // This would not be ideal; rotoscale() should never be called in conditional branches where angle = 0 anyway.
@@ -704,7 +704,6 @@ TransparentSurface *TransparentSurface::rotoscale(const TransformStruct &transfo
float invCos = cos(invAngle * M_PI / 180.0);
float invSin = sin(invAngle * M_PI / 180.0);
- struct tColorRGBA { byte r; byte g; byte b; byte a; };
int icosx = (int)(invCos * (65536.0f * kDefaultZoomX / transform._zoom.x));
int isinx = (int)(invSin * (65536.0f * kDefaultZoomX / transform._zoom.x));
int icosy = (int)(invCos * (65536.0f * kDefaultZoomY / transform._zoom.y));
@@ -739,50 +738,50 @@ TransparentSurface *TransparentSurface::rotoscale(const TransformStruct &transfo
dy = sh - dy;
}
-#ifdef ENABLE_BILINEAR
- if ((dx > -1) && (dy > -1) && (dx < sw) && (dy < sh)) {
- const tColorRGBA *sp = (const tColorRGBA *)getBasePtr(dx, dy);
- tColorRGBA c00, c01, c10, c11, cswap;
- c00 = *sp;
- sp += 1;
- c01 = *sp;
- sp += (this->pitch / 4);
- c11 = *sp;
- sp -= 1;
- c10 = *sp;
- if (flipx) {
- cswap = c00; c00=c01; c01=cswap;
- cswap = c10; c10=c11; c11=cswap;
+ if (filteringMode == FILTER_BILINEAR) {
+ if ((dx > -1) && (dy > -1) && (dx < sw) && (dy < sh)) {
+ const tColorRGBA *sp = (const tColorRGBA *)getBasePtr(dx, dy);
+ tColorRGBA c00, c01, c10, c11, cswap;
+ c00 = *sp;
+ sp += 1;
+ c01 = *sp;
+ sp += (this->pitch / 4);
+ c11 = *sp;
+ sp -= 1;
+ c10 = *sp;
+ if (flipx) {
+ cswap = c00; c00=c01; c01=cswap;
+ cswap = c10; c10=c11; c11=cswap;
+ }
+ if (flipy) {
+ cswap = c00; c00=c10; c10=cswap;
+ cswap = c01; c01=c11; c11=cswap;
+ }
+ /*
+ * Interpolate colors
+ */
+ int ex = (sdx & 0xffff);
+ int ey = (sdy & 0xffff);
+ int t1, t2;
+ t1 = ((((c01.r - c00.r) * ex) >> 16) + c00.r) & 0xff;
+ t2 = ((((c11.r - c10.r) * ex) >> 16) + c10.r) & 0xff;
+ pc->r = (((t2 - t1) * ey) >> 16) + t1;
+ t1 = ((((c01.g - c00.g) * ex) >> 16) + c00.g) & 0xff;
+ t2 = ((((c11.g - c10.g) * ex) >> 16) + c10.g) & 0xff;
+ pc->g = (((t2 - t1) * ey) >> 16) + t1;
+ t1 = ((((c01.b - c00.b) * ex) >> 16) + c00.b) & 0xff;
+ t2 = ((((c11.b - c10.b) * ex) >> 16) + c10.b) & 0xff;
+ pc->b = (((t2 - t1) * ey) >> 16) + t1;
+ t1 = ((((c01.a - c00.a) * ex) >> 16) + c00.a) & 0xff;
+ t2 = ((((c11.a - c10.a) * ex) >> 16) + c10.a) & 0xff;
+ pc->a = (((t2 - t1) * ey) >> 16) + t1;
}
- if (flipy) {
- cswap = c00; c00=c10; c10=cswap;
- cswap = c01; c01=c11; c11=cswap;
+ } else {
+ if ((dx >= 0) && (dy >= 0) && (dx < srcW) && (dy < srcH)) {
+ const tColorRGBA *sp = (const tColorRGBA *)getBasePtr(dx, dy);
+ *pc = *sp;
}
- /*
- * Interpolate colors
- */
- int ex = (sdx & 0xffff);
- int ey = (sdy & 0xffff);
- int t1, t2;
- t1 = ((((c01.r - c00.r) * ex) >> 16) + c00.r) & 0xff;
- t2 = ((((c11.r - c10.r) * ex) >> 16) + c10.r) & 0xff;
- pc->r = (((t2 - t1) * ey) >> 16) + t1;
- t1 = ((((c01.g - c00.g) * ex) >> 16) + c00.g) & 0xff;
- t2 = ((((c11.g - c10.g) * ex) >> 16) + c10.g) & 0xff;
- pc->g = (((t2 - t1) * ey) >> 16) + t1;
- t1 = ((((c01.b - c00.b) * ex) >> 16) + c00.b) & 0xff;
- t2 = ((((c11.b - c10.b) * ex) >> 16) + c10.b) & 0xff;
- pc->b = (((t2 - t1) * ey) >> 16) + t1;
- t1 = ((((c01.a - c00.a) * ex) >> 16) + c00.a) & 0xff;
- t2 = ((((c11.a - c10.a) * ex) >> 16) + c10.a) & 0xff;
- pc->a = (((t2 - t1) * ey) >> 16) + t1;
}
-#else
- if ((dx >= 0) && (dy >= 0) && (dx < srcW) && (dy < srcH)) {
- const tColorRGBA *sp = (const tColorRGBA *)getBasePtr(dx, dy);
- *pc = *sp;
- }
-#endif
sdx += icosx;
sdy += isiny;
pc++;
@@ -791,7 +790,8 @@ TransparentSurface *TransparentSurface::rotoscale(const TransformStruct &transfo
return target;
}
-TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight) const {
+template <TFilteringMode filteringMode>
+TransparentSurface *TransparentSurface::scaleT(uint16 newWidth, uint16 newHeight) const {
Common::Rect srcRect(0, 0, (int16)w, (int16)h);
Common::Rect dstRect(0, 0, (int16)newWidth, (int16)newHeight);
@@ -807,173 +807,169 @@ TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight)
target->create((uint16)dstW, (uint16)dstH, this->format);
-#ifdef ENABLE_BILINEAR
+ if (filteringMode == FILTER_BILINEAR) {
- // NB: The actual order of these bytes may not be correct, but
- // since all values are treated equal, that does not matter.
- struct tColorRGBA { byte r; byte g; byte b; byte a; };
+ bool flipx = false, flipy = false; // TODO: See mirroring comment in RenderTicket ctor
- bool flipx = false, flipy = false; // TODO: See mirroring comment in RenderTicket ctor
+ int *sax = new int[dstW + 1];
+ int *say = new int[dstH + 1];
+ assert(sax && say);
+
+ /*
+ * Precalculate row increments
+ */
+ int spixelw = (srcW - 1);
+ int spixelh = (srcH - 1);
+ int sx = (int) (65536.0f * (float) spixelw / (float) (dstW - 1));
+ int sy = (int) (65536.0f * (float) spixelh / (float) (dstH - 1));
+
+ /* Maximum scaled source size */
+ int ssx = (srcW << 16) - 1;
+ int ssy = (srcH << 16) - 1;
+
+ /* Precalculate horizontal row increments */
+ int csx = 0;
+ int *csax = sax;
+ for (int x = 0; x <= dstW; x++) {
+ *csax = csx;
+ csax++;
+ csx += sx;
- int *sax = new int[dstW + 1];
- int *say = new int[dstH + 1];
- assert(sax && say);
-
- /*
- * Precalculate row increments
- */
- int spixelw = (srcW - 1);
- int spixelh = (srcH - 1);
- int sx = (int) (65536.0f * (float) spixelw / (float) (dstW - 1));
- int sy = (int) (65536.0f * (float) spixelh / (float) (dstH - 1));
-
- /* Maximum scaled source size */
- int ssx = (srcW << 16) - 1;
- int ssy = (srcH << 16) - 1;
-
- /* Precalculate horizontal row increments */
- int csx = 0;
- int *csax = sax;
- for (int x = 0; x <= dstW; x++) {
- *csax = csx;
- csax++;
- csx += sx;
-
- /* Guard from overflows */
- if (csx > ssx) {
- csx = ssx;
+ /* Guard from overflows */
+ if (csx > ssx) {
+ csx = ssx;
+ }
}
- }
- /* Precalculate vertical row increments */
- int csy = 0;
- int *csay = say;
- for (int y = 0; y <= dstH; y++) {
- *csay = csy;
- csay++;
- csy += sy;
-
- /* Guard from overflows */
- if (csy > ssy) {
- csy = ssy;
+ /* Precalculate vertical row increments */
+ int csy = 0;
+ int *csay = say;
+ for (int y = 0; y <= dstH; y++) {
+ *csay = csy;
+ csay++;
+ csy += sy;
+
+ /* Guard from overflows */
+ if (csy > ssy) {
+ csy = ssy;
+ }
}
- }
- const tColorRGBA *sp = (const tColorRGBA *) getBasePtr(0, 0);
- tColorRGBA *dp = (tColorRGBA *) target->getBasePtr(0, 0);
- int spixelgap = srcW;
+ const tColorRGBA *sp = (const tColorRGBA *) getBasePtr(0, 0);
+ tColorRGBA *dp = (tColorRGBA *) target->getBasePtr(0, 0);
+ int spixelgap = srcW;
- if (flipx) {
- sp += spixelw;
- }
- if (flipy) {
- sp += spixelgap * spixelh;
- }
+ if (flipx) {
+ sp += spixelw;
+ }
+ if (flipy) {
+ sp += spixelgap * spixelh;
+ }
- csay = say;
- for (int y = 0; y < dstH; y++) {
- const tColorRGBA *csp = sp;
- csax = sax;
- for (int x = 0; x < dstW; x++) {
- /*
- * Setup color source pointers
- */
- int ex = (*csax & 0xffff);
- int ey = (*csay & 0xffff);
- int cx = (*csax >> 16);
- int cy = (*csay >> 16);
-
- const tColorRGBA *c00, *c01, *c10, *c11;
- c00 = sp;
- c01 = sp;
- c10 = sp;
- if (cy < spixelh) {
- if (flipy) {
- c10 -= spixelgap;
- } else {
- c10 += spixelgap;
+ csay = say;
+ for (int y = 0; y < dstH; y++) {
+ const tColorRGBA *csp = sp;
+ csax = sax;
+ for (int x = 0; x < dstW; x++) {
+ /*
+ * Setup color source pointers
+ */
+ int ex = (*csax & 0xffff);
+ int ey = (*csay & 0xffff);
+ int cx = (*csax >> 16);
+ int cy = (*csay >> 16);
+
+ const tColorRGBA *c00, *c01, *c10, *c11;
+ c00 = sp;
+ c01 = sp;
+ c10 = sp;
+ if (cy < spixelh) {
+ if (flipy) {
+ c10 -= spixelgap;
+ } else {
+ c10 += spixelgap;
+ }
}
- }
- c11 = c10;
- if (cx < spixelw) {
+ c11 = c10;
+ if (cx < spixelw) {
+ if (flipx) {
+ c01--;
+ c11--;
+ } else {
+ c01++;
+ c11++;
+ }
+ }
+
+ /*
+ * Draw and interpolate colors
+ */
+ int t1, t2;
+ t1 = ((((c01->r - c00->r) * ex) >> 16) + c00->r) & 0xff;
+ t2 = ((((c11->r - c10->r) * ex) >> 16) + c10->r) & 0xff;
+ dp->r = (((t2 - t1) * ey) >> 16) + t1;
+ t1 = ((((c01->g - c00->g) * ex) >> 16) + c00->g) & 0xff;
+ t2 = ((((c11->g - c10->g) * ex) >> 16) + c10->g) & 0xff;
+ dp->g = (((t2 - t1) * ey) >> 16) + t1;
+ t1 = ((((c01->b - c00->b) * ex) >> 16) + c00->b) & 0xff;
+ t2 = ((((c11->b - c10->b) * ex) >> 16) + c10->b) & 0xff;
+ dp->b = (((t2 - t1) * ey) >> 16) + t1;
+ t1 = ((((c01->a - c00->a) * ex) >> 16) + c00->a) & 0xff;
+ t2 = ((((c11->a - c10->a) * ex) >> 16) + c10->a) & 0xff;
+ dp->a = (((t2 - t1) * ey) >> 16) + t1;
+
+ /*
+ * Advance source pointer x
+ */
+ int *salastx = csax;
+ csax++;
+ int sstepx = (*csax >> 16) - (*salastx >> 16);
if (flipx) {
- c01--;
- c11--;
+ sp -= sstepx;
} else {
- c01++;
- c11++;
+ sp += sstepx;
}
- }
-
- /*
- * Draw and interpolate colors
- */
- int t1, t2;
- t1 = ((((c01->r - c00->r) * ex) >> 16) + c00->r) & 0xff;
- t2 = ((((c11->r - c10->r) * ex) >> 16) + c10->r) & 0xff;
- dp->r = (((t2 - t1) * ey) >> 16) + t1;
- t1 = ((((c01->g - c00->g) * ex) >> 16) + c00->g) & 0xff;
- t2 = ((((c11->g - c10->g) * ex) >> 16) + c10->g) & 0xff;
- dp->g = (((t2 - t1) * ey) >> 16) + t1;
- t1 = ((((c01->b - c00->b) * ex) >> 16) + c00->b) & 0xff;
- t2 = ((((c11->b - c10->b) * ex) >> 16) + c10->b) & 0xff;
- dp->b = (((t2 - t1) * ey) >> 16) + t1;
- t1 = ((((c01->a - c00->a) * ex) >> 16) + c00->a) & 0xff;
- t2 = ((((c11->a - c10->a) * ex) >> 16) + c10->a) & 0xff;
- dp->a = (((t2 - t1) * ey) >> 16) + t1;
+ /*
+ * Advance destination pointer x
+ */
+ dp++;
+ }
/*
- * Advance source pointer x
+ * Advance source pointer y
*/
- int *salastx = csax;
- csax++;
- int sstepx = (*csax >> 16) - (*salastx >> 16);
- if (flipx) {
- sp -= sstepx;
+ int *salasty = csay;
+ csay++;
+ int sstepy = (*csay >> 16) - (*salasty >> 16);
+ sstepy *= spixelgap;
+ if (flipy) {
+ sp = csp - sstepy;
} else {
- sp += sstepx;
+ sp = csp + sstepy;
}
-
- /*
- * Advance destination pointer x
- */
- dp++;
- }
- /*
- * Advance source pointer y
- */
- int *salasty = csay;
- csay++;
- int sstepy = (*csay >> 16) - (*salasty >> 16);
- sstepy *= spixelgap;
- if (flipy) {
- sp = csp - sstepy;
- } else {
- sp = csp + sstepy;
}
- }
- delete[] sax;
- delete[] say;
+ delete[] sax;
+ delete[] say;
-#else
-
- int *scaleCacheX = new int[dstW];
- for (int x = 0; x < dstW; x++) {
- scaleCacheX[x] = (x * srcW) / dstW;
- }
+ } else {
- for (int y = 0; y < dstH; y++) {
- uint32 *destP = (uint32 *)target->getBasePtr(0, y);
- const uint32 *srcP = (const uint32 *)getBasePtr(0, (y * srcH) / dstH);
+ int *scaleCacheX = new int[dstW];
for (int x = 0; x < dstW; x++) {
- *destP++ = srcP[scaleCacheX[x]];
+ scaleCacheX[x] = (x * srcW) / dstW;
}
- }
- delete[] scaleCacheX;
-#endif
+ for (int y = 0; y < dstH; y++) {
+ uint32 *destP = (uint32 *)target->getBasePtr(0, y);
+ const uint32 *srcP = (const uint32 *)getBasePtr(0, (y * srcH) / dstH);
+ for (int x = 0; x < dstW; x++) {
+ *destP++ = srcP[scaleCacheX[x]];
+ }
+ }
+ delete[] scaleCacheX;
+
+ }
return target;
@@ -1057,4 +1053,18 @@ TransparentSurface *TransparentSurface::convertTo(const PixelFormat &dstFormat,
return surface;
}
+
+template TransparentSurface *TransparentSurface::rotoscaleT<FILTER_NEAREST>(const TransformStruct &transform) const;
+template TransparentSurface *TransparentSurface::rotoscaleT<FILTER_BILINEAR>(const TransformStruct &transform) const;
+template TransparentSurface *TransparentSurface::scaleT<FILTER_NEAREST>(uint16 newWidth, uint16 newHeight) const;
+template TransparentSurface *TransparentSurface::scaleT<FILTER_BILINEAR>(uint16 newWidth, uint16 newHeight) const;
+
+TransparentSurface *TransparentSurface::rotoscale(const TransformStruct &transform) const {
+ return rotoscaleT<FILTER_BILINEAR>(transform);
+}
+
+TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight) const {
+ return scaleT<FILTER_NEAREST>(newWidth, newHeight);
+}
+
} // End of namespace Graphics
diff --git a/graphics/transparent_surface.h b/graphics/transparent_surface.h
index 8654183548..6fcdac1735 100644
--- a/graphics/transparent_surface.h
+++ b/graphics/transparent_surface.h
@@ -68,6 +68,11 @@ enum AlphaType {
ALPHA_FULL = 2
};
+enum TFilteringMode {
+ FILTER_NEAREST = 0,
+ FILTER_BILINEAR = 1
+};
+
/**
* A transparent graphics surface, which implements alpha blitting.
*/
@@ -141,8 +146,10 @@ struct TransparentSurface : public Graphics::Surface {
* @param newHeight the resulting height.
* @see TransformStruct
*/
- TransparentSurface *scale(uint16 newWidth, uint16 newHeight) const;
+ template <TFilteringMode filteringMode>
+ TransparentSurface *scaleT(uint16 newWidth, uint16 newHeight) const;
+ TransparentSurface *scale(uint16 newWidth, uint16 newHeight) const;
/**
* @brief Rotoscale function; this returns a transformed version of this surface after rotation and
* scaling. Please do not use this if angle == 0, use plain old scaling function.
@@ -150,6 +157,9 @@ struct TransparentSurface : public Graphics::Surface {
* @param transform a TransformStruct wrapping the required info. @see TransformStruct
*
*/
+ template <TFilteringMode filteringMode>
+ TransparentSurface *rotoscaleT(const TransformStruct &transform) const;
+
TransparentSurface *rotoscale(const TransformStruct &transform) const;
TransparentSurface *convertTo(const PixelFormat &dstFormat, const byte *palette = 0) const;
diff --git a/gui/KeysDialog.cpp b/gui/KeysDialog.cpp
index 7adb20a379..fcf9201877 100644
--- a/gui/KeysDialog.cpp
+++ b/gui/KeysDialog.cpp
@@ -68,7 +68,7 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
case kListSelectionChangedCmd:
if (_actionsList->getSelected() >= 0) {
- char selection[100];
+ Common::String selection;
uint16 key = Actions::Instance()->getMapping(_actionsList->getSelected());
#ifdef __SYMBIAN32__
@@ -77,9 +77,9 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
key = key - Common::ASCII_F1 + SDLK_F1;
#endif
if (key != 0)
- sprintf(selection, _("Associated key : %s"), SDL_GetKeyName((SDLKey)key));
+ selection = Common::String::format(_("Associated key : %s"), SDL_GetKeyName((SDLKey)key));
else
- sprintf(selection, _("Associated key : none"));
+ selection = Common::String::format(_("Associated key : none"));
_keyMapping->setLabel(selection);
_keyMapping->draw();
@@ -89,7 +89,7 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
if (_actionsList->getSelected() < 0) {
_actionTitle->setLabel(_("Please select an action"));
} else {
- char selection[100];
+ Common::String selection;
_actionSelected = _actionsList->getSelected();
uint16 key = Actions::Instance()->getMapping(_actionSelected);
@@ -99,9 +99,9 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
key = key - Common::ASCII_F1 + SDLK_F1;
#endif
if (key != 0)
- sprintf(selection, _("Associated key : %s"), SDL_GetKeyName((SDLKey)key));
+ selection = Common::String::format(_("Associated key : %s"), SDL_GetKeyName((SDLKey)key));
else
- sprintf(selection, _("Associated key : none"));
+ selection = Common::String::format(_("Associated key : none"));
_actionTitle->setLabel(_("Press the key to associate"));
_keyMapping->setLabel(selection);
@@ -133,14 +133,14 @@ void KeysDialog::handleKeyUp(Common::KeyState state) {
#else
if (state.flags == 0xff && Actions::Instance()->mappingActive()) { // GAPI key was selected
#endif
- char selection[100];
+ Common::String selection;
Actions::Instance()->setMapping((ActionType)_actionSelected, state.ascii);
if (state.ascii != 0)
- sprintf(selection, _("Associated key : %s"), SDL_GetKeyName((SDLKey) state.keycode));
+ selection = Common::String::format(_("Associated key : %s"), SDL_GetKeyName((SDLKey) state.keycode));
else
- sprintf(selection, _("Associated key : none"));
+ selection = Common::String::format(_("Associated key : none"));
_actionTitle->setLabel(_("Choose an action to map"));
_keyMapping->setLabel(selection);
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 96108bccce..d859a88da5 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -810,7 +810,9 @@ bool ThemeEngine::addAlphaBitmap(const Common::String &filename) {
if (surf)
return true;
+#ifdef USE_PNG
const Graphics::TransparentSurface *srcSurface = 0;
+#endif
if (filename.hasSuffix(".png")) {
// Maybe it is PNG?
diff --git a/gui/about.cpp b/gui/about.cpp
index 211542adb3..bde5db310a 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -57,7 +57,7 @@ enum {
static const char *copyright_text[] = {
"",
-"C0""Copyright (C) 2001-2016 The ScummVM Team",
+"C0""Copyright (C) 2001-2017 The ScummVM Team",
"C0""http://www.scummvm.org",
"",
"C0""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 binary.",
diff --git a/gui/options.cpp b/gui/options.cpp
index 3f6fc5aa2c..371a949c35 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2120,8 +2120,10 @@ void GlobalOptionsDialog::setupCloudTab() {
#else // USE_SDL_NET
if (_runServerButton)
_runServerButton->setVisible(false);
- if (_serverInfoLabel)
+ if (_serverInfoLabel) {
+ _serverInfoLabel->setPos(_serverInfoLabel->getRelX(), serverLabelPosition); // Prevent compiler warning from serverLabelPosition being unused.
_serverInfoLabel->setVisible(false);
+ }
if (_rootPathButton)
_rootPathButton->setVisible(false);
if (_rootPath)
diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat
index b5df7f4e32..2121155363 100644
--- a/gui/themes/translations.dat
+++ b/gui/themes/translations.dat
Binary files differ
diff --git a/image/codecs/codec.cpp b/image/codecs/codec.cpp
index 7d6d3cbe9b..048d52dc86 100644
--- a/image/codecs/codec.cpp
+++ b/image/codecs/codec.cpp
@@ -210,7 +210,7 @@ Codec *createBitmapCodec(uint32 tag, int width, int height, int bitsPerPixel) {
case MKTAG('c','v','i','d'):
return new CinepakDecoder(bitsPerPixel);
case MKTAG('I','V','3','2'):
- return new Indeo3Decoder(width, height);
+ return new Indeo3Decoder(width, height, bitsPerPixel);
case MKTAG('I', 'V', '4', '1'):
case MKTAG('I', 'V', '4', '2'):
return new Indeo4Decoder(width, height, bitsPerPixel);
diff --git a/image/codecs/indeo/indeo.cpp b/image/codecs/indeo/indeo.cpp
index a20a3ec113..65c0647083 100644
--- a/image/codecs/indeo/indeo.cpp
+++ b/image/codecs/indeo/indeo.cpp
@@ -21,12 +21,7 @@
*/
/* Common structures, macros, and base class shared by both Indeo4 and
- * Indeo5 decoders, derived from ffmpeg. We don't currently support Indeo5
- * decoding, but just in case we eventually need it, this is kept as a separate
- * file like it is in ffmpeg.
- *
- * Original copyright note: * Intel Indeo 4 (IV41, IV42, etc.) video decoder for ffmpeg
- * written, produced, and directed by Alan Smithee
+ * Indeo5 decoders, derived from ffmpeg.
*/
#include "image/codecs/indeo/indeo.h"
diff --git a/image/codecs/indeo3.cpp b/image/codecs/indeo3.cpp
index 560658d1f5..d862d5352b 100644
--- a/image/codecs/indeo3.cpp
+++ b/image/codecs/indeo3.cpp
@@ -40,11 +40,24 @@
namespace Image {
-Indeo3Decoder::Indeo3Decoder(uint16 width, uint16 height) : _ModPred(0), _corrector_type(0) {
+Indeo3Decoder::Indeo3Decoder(uint16 width, uint16 height, uint bitsPerPixel) : _ModPred(0), _corrector_type(0) {
_iv_frame[0].the_buf = 0;
_iv_frame[1].the_buf = 0;
- _pixelFormat = g_system->getScreenFormat();
+ switch (bitsPerPixel) {
+ case 16:
+ _pixelFormat = Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
+ break;
+ case 24:
+ _pixelFormat = Graphics::PixelFormat(4, 8, 8, 8, 0, 16, 8, 0, 0);
+ break;
+ case 32:
+ _pixelFormat = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
+ break;
+ default:
+ error("Invalid color depth");
+ break;
+ }
_surface = new Graphics::Surface;
_surface->create(width, height, _pixelFormat);
diff --git a/image/codecs/indeo3.h b/image/codecs/indeo3.h
index 0ff0265250..ad12bb7825 100644
--- a/image/codecs/indeo3.h
+++ b/image/codecs/indeo3.h
@@ -46,7 +46,7 @@ namespace Image {
*/
class Indeo3Decoder : public Codec {
public:
- Indeo3Decoder(uint16 width, uint16 height);
+ Indeo3Decoder(uint16 width, uint16 height, uint bitsPerPixel = 24);
~Indeo3Decoder();
const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
diff --git a/image/codecs/indeo4.cpp b/image/codecs/indeo4.cpp
index b3a5d3a2bf..b6ac0882e7 100644
--- a/image/codecs/indeo4.cpp
+++ b/image/codecs/indeo4.cpp
@@ -22,7 +22,7 @@
/* Intel Indeo 4 decompressor, derived from ffmpeg.
*
- * Original copyright note: * Intel Indeo 3 (IV41, IV42, etc.) video decoder for ffmpeg
+ * Original copyright note: * Intel Indeo 4 (IV41, IV42, etc.) video decoder for ffmpeg
* written, produced, and directed by Alan Smithee
*/
@@ -601,7 +601,7 @@ void Indeo4Decoder::decodeTransparency() {
// and mark the range of pixels of that color from the start and end of
// each line as transparent
assert(_surface->format.bytesPerPixel == 4);
- byte r, g, b, a;
+ byte r, g, b;
if (_surface->format.aBits() == 0) {
// Surface is 4 bytes per pixel, but only RGB. So promote the
diff --git a/image/codecs/indeo5.cpp b/image/codecs/indeo5.cpp
index f4a78574d3..aca49c3d55 100644
--- a/image/codecs/indeo5.cpp
+++ b/image/codecs/indeo5.cpp
@@ -22,7 +22,7 @@
/* Intel Indeo 5 decompressor, derived from ffmpeg.
*
- * Original copyright note: * Intel Indeo 3 (IV41, IV42, etc.) video decoder for ffmpeg
+ * Original copyright note: * Intel Indeo 5 (IV51, IV52, etc.) video decoder for ffmpeg
* written, produced, and directed by Alan Smithee
*/
diff --git a/image/tga.cpp b/image/tga.cpp
index adfe7eefbb..b23c597ed5 100644
--- a/image/tga.cpp
+++ b/image/tga.cpp
@@ -27,6 +27,7 @@
#include "image/tga.h"
#include "common/util.h"
+#include "common/algorithm.h"
#include "common/stream.h"
#include "common/textconsole.h"
#include "common/error.h"
@@ -437,6 +438,22 @@ bool TGADecoder::readDataRLE(Common::SeekableReadStream &tga, byte imageType, by
} else {
return false;
}
+
+ // If it's a bottom origin image, we need to vertically flip the image
+ if (!_originTop) {
+ byte *tempLine = new byte[_surface.pitch];
+ byte *line1 = (byte *)_surface.getBasePtr(0, 0);
+ byte *line2 = (byte *)_surface.getBasePtr(0, _surface.h - 1);
+
+ for (int y = 0; y < (_surface.h / 2); ++y, line1 += _surface.pitch, line2 -= _surface.pitch) {
+ Common::copy(line1, line1 + _surface.pitch, tempLine);
+ Common::copy(line2, line2 + _surface.pitch, line1);
+ Common::copy(tempLine, tempLine + _surface.pitch, line2);
+ }
+
+ delete[] tempLine;
+ }
+
return true;
}
diff --git a/po/be_BY.po b/po/be_BY.po
index 9a74deec65..820c695f2f 100644
--- a/po/be_BY.po
+++ b/po/be_BY.po
@@ -1,14 +1,14 @@
# Belarusian translation for ScummVM.
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2013-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
-# Ivan Lukyanov <greencis@mail.ru>, 2013-2016.
+# Ivan Lukyanov <greencis@mail.ru>, 2013-2017.
#
msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.8.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-11-27 18:01+0000\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2016-12-31 15:15+0000\n"
"Last-Translator: Ivan Lukyanov <lid-gr@tut.by>\n"
"Language-Team: Belarusian <https://translations.scummvm.org/projects/scummvm/"
"scummvm/be/>\n"
@@ -163,13 +163,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -577,7 +577,6 @@ 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 "¿àë×ÝÐçÐÝÐï ÚÛÐÒöèÐ : ÝïÜÐ"
@@ -845,9 +844,8 @@ msgid "the fullscreen setting could not be changed"
msgstr "ßÞþÝÐíÚàÐÝÝë àíÖëÜ ÝÕ ÜÞÖÐ Ñëæì ×ÜÕÝÕÝë"
#: gui/options.cpp:486
-#, fuzzy
msgid "the filtering setting could not be changed"
-msgstr "ßÞþÝÐíÚàÐÝÝë àíÖëÜ ÝÕ ÜÞÖÐ Ñëæì ×ÜÕÝÕÝë"
+msgstr "àíÖëÜ äöÛìâàÐÒÐÝÝï ÝÕ ÜÞÖÐ Ñëæì ×ÜÕÝÕÝë"
#: gui/options.cpp:809
msgid "Graphics mode:"
@@ -867,13 +865,12 @@ msgid "Fullscreen mode"
msgstr "¿ÞþÝÐíÚàÐÝÝë àíÖëÜ"
#: gui/options.cpp:838
-#, fuzzy
msgid "Filter graphics"
-msgstr "²ëÚÐàëáâÞþÒÐæì ÚÐÛïàÞÒãî ÓàÐäöÚã"
+msgstr "ÄöÛìâàÐÒÐÝÝÕ ÓàÐäöÚö"
#: gui/options.cpp:838
msgid "Use linear filtering when scaling graphics"
-msgstr ""
+msgstr "²ëÚÐàëáâÞþÒÐæì ÛöÝÕÙÝãî äöÛìâàÐæëî ÔÛï ßÐÒÕÛöçíÝÝï ÐÔàÞ×ÝÕÝÝï"
#: gui/options.cpp:841
msgid "Aspect ratio correction"
@@ -1279,7 +1276,7 @@ msgstr ""
#: gui/options.cpp:1462
msgid "Apply"
-msgstr ""
+msgstr "ÃÖëæì"
#: gui/options.cpp:1628
msgid "Failed to change cloud storage!"
@@ -1338,7 +1335,7 @@ msgstr "ÁßëÝöæì áÕàÒÕà"
msgid "Stop local webserver"
msgstr "ÁßëÝïÕ ÛÐÚÐÛìÝë ÒíÑ-áÕàÒÕà"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1458,9 +1455,8 @@ msgid "Playtime: "
msgstr "ÇÐá ÓãÛìÝö: "
#: gui/saveload-dialog.cpp:577 gui/saveload-dialog.cpp:665
-#, fuzzy
msgid "Untitled saved game"
-msgstr "·ÐåÐÒÐÝÝÕ ÑÕ× öÜï"
+msgstr "·ÐåÐÒÐÝÐï ÓãÛìÝï ÑÕ× öÜï"
#: gui/saveload-dialog.cpp:718
msgid "Next"
@@ -1700,9 +1696,8 @@ msgid "Could not find suitable engine plugin"
msgstr "½Õ ÜÐÓã ×ÝÐÙáæö ßÐÔëåÞÔÝë ßÛÐÓöÝ ÔÛï àãåÐÒöçÚÐ"
#: common/error.cpp:68
-#, fuzzy
msgid "Engine plugin does not support saved games"
-msgstr "ÀãåÐÒöçÞÚ ÝÕ ßÐÔâàëÜÛöÒÐÕ ×ÐåÐÒÐÝÝö"
+msgstr "ÀãåÐÒöçÞÚ ÝÕ ßÐÔâàëÜÛöÒÐÕ ×ÐåÐÒÐÝÝÕ ÓãÛìÝïþ"
#: common/error.cpp:71
msgid "User canceled"
@@ -1762,6 +1757,9 @@ msgid ""
"Please, report the following data to the ScummVM team along with name\n"
"of the game you tried to add and its version, language, etc.:"
msgstr ""
+"·ÔÐÕææÐ, ÓãÛìÝï þ '%s' ÝÕÒïÔÞÜÐï.\n"
+"ºÐÛö ÛÐáÚÐ, ßÕàÐÔÐÙæÕ ÚÐÜÐÝÔ×Õ ScummVM ÝÐáâãßÝëï ÔÐÔ×ÕÝëï àÐ×ÐÜ\n"
+"× ÝÐ×ÒÐÙ ÓãÛìÝö, ïÕ ÒÕàáöïÙ, ÜÞÒÐÙ ö öÝè.:"
#: engines/dialogs.cpp:85
msgid "~R~esume"
@@ -1804,7 +1802,7 @@ msgstr "³~Ð~ÛÞþÝÐÕ ÜÕÝî"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1825,7 +1823,7 @@ msgstr "·ÐåÐÒÐæì ÓãÛìÝî:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1844,13 +1842,13 @@ msgstr ""
"öÝáâàãÚæëïÜö ßàÐ âÞÕ, ïÚ ÐâàëÜÐæì ÔÐÛÕÙèãî ÔÐßÐÜÞÓã."
#: engines/dialogs.cpp:234 engines/pegasus/pegasus.cpp:393
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to save game (%s)! Please consult the README for basic information, "
"and for instructions on how to obtain further assistance."
msgstr ""
"½Õ ÐâàëÜÐÛÐáï ×ÐåÐÒÐæì ÓãÛìÝî (%s)! ºÐÛö ÛÐáÚÐ, ×ÒïàÝöæÕáï ÔÐ äÐÙÛÐ README "
-"×Ð ÑÐ×ÐÒÐÙ öÝäÐàÜÐæëïÙ, Ð âÐÚáÐÜÐ öÝáâàãÚæëïÜö ßàÐ âÞÕ, ïÚ ÐâàëÜÐæì ÔÐÛÕÙèãî "
+"×Ð ÐáÝÞþÝÐÙ öÝäÐàÜÐæëïÙ, Ð âÐÚáÐÜÐ öÝáâàãÚæëïÜö, ïÚ ÐâàëÜÐæì ÔÐÛÕÙèãî "
"ÔÐßÐÜÞÓã."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:100
@@ -1884,9 +1882,8 @@ msgid "Could not apply fullscreen setting."
msgstr "½Õ ÜÐÓã þÖëæì ßÞþÝÐíÚàÐÝÝë àíÖëÜ."
#: engines/engine.cpp:373
-#, fuzzy
msgid "Could not apply filtering setting."
-msgstr "½Õ ÜÐÓã þÖëæì ßÞþÝÐíÚàÐÝÝë àíÖëÜ."
+msgstr "½Õ ÜÐÓã þÖëæì ÝÐÛÐÔë äöÛìâàÐæëö."
#: engines/engine.cpp:473
msgid ""
@@ -1918,14 +1915,14 @@ msgstr ""
"äÐÙÛÕ README."
#: engines/engine.cpp:542
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
"information, and for instructions on how to obtain further assistance."
msgstr ""
-"½Õ ÐâàëÜÐÛÐáï ßàÐçëâÐæì ×ÐåÐÒÐÝÝÕ ÓãÛìÝö (%s)! ºÐÛö ÛÐáÚÐ, ×ÒïàÝöæÕáï þ äÐÙÛ "
-"README ×Ð ÑÐ×ÐÒÐÙ öÝäÐàÜÐæëïÙ, Ð âÐÚáÐÜÐ öÝáâàãÚæëïÜö ßàÐ âÞÕ, ïÚ ÐâàëÜÐæì "
-"ÔÐÛÕÙèãî ÔÐßÐÜÞÓã."
+"½Õ ÐâàëÜÐÛÐáï ×ÐÓàã×öæì ÓãÛìÝî (%s)! ºÐÛö ÛÐáÚÐ, ×ÒïàÝöæÕáï ÔÐ äÐÙÛÐ README "
+"×Ð ÐáÝÞþÝÐÙ öÝäÐàÜÐæëïÙ, Ð âÐÚáÐÜÐ öÝáâàãÚæëïÜö, ïÚ ÐâàëÜÐæì ÔÐÛÕÙèãî "
+"ÔÐßÐÜÞÓã."
#: engines/engine.cpp:555
msgid ""
@@ -2022,11 +2019,11 @@ msgstr "°þÔëñ FM-Towns"
msgid "PC-98 Audio"
msgstr "°þÔëñ PC-98"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "½ÐÛÐÔÖÒÐî íÜãÛïâÐà MT-32"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "ÍÜãÛïâÐà MT-32"
@@ -2188,7 +2185,7 @@ msgstr "°ÚÞÝÝë àíÖëÜ"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:710
#, c-format
msgid "Resolution: %dx%d"
-msgstr ""
+msgstr "°ÔàÞ×ÝÕÝÝÕ: %dx%d"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:731
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2338
@@ -2202,15 +2199,13 @@ msgstr "ºÐàíÚæëï áãÐÔÝÞáöÝ ÑÐÚÞþ ÒëÚÛîçÐÝÐ"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:753
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2362
-#, fuzzy
msgid "Filtering enabled"
-msgstr "¿áâàëçÚö þÚÛîçÐÝë"
+msgstr "ÄöÛìâàÐæëï þÚÛîçÐÝÐ"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:755
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2364
-#, fuzzy
msgid "Filtering disabled"
-msgstr "¿áâàëçÚö ÒëÚÛîçÐÝë"
+msgstr "ÄöÛìâàÐæëï ÒëÚÛîçÐÝÐï"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:47
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
@@ -2748,6 +2743,33 @@ msgstr ""
msgid "Check for Updates..."
msgstr "¿àÐÒïàÐî ÐÑÝÐþÛÕÝÝö..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr ""
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr ""
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr "ÀíÖëÜ ÚÞÛÕàã"
@@ -2833,8 +2855,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2846,8 +2868,8 @@ msgstr "Ã×ÝÐÒöæì ÓãÛìÝî:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -4239,21 +4261,9 @@ msgstr "¿àÐ×àëáâëï ÒÞÚÝë"
msgid "Show windows with a partially transparent background"
msgstr "¿ÐÚÐ×ÒÐæì ÒÞÚÝë × çÐáâÚÞÒÐ ßàÐ×àëáâëÜ äÞÝÐÜ"
-#: 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"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
msgstr ""
-"ÄÐÙÛ sky.cpt ÜÐÕ ÝïßàÐÒöÛìÝë ßÐÜÕà.\n"
-"ºÐÛö ÛÐáÚÐ, ×ÐßÐÜßãÙæÕ ïÓÞ ÝÐÝÞÒÐ × www.scummvm.org"
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4350,13 +4360,7 @@ msgstr ""
"²ëÚÐàëáâÞþÒÐæì ÐÝÓÛöÙáÚãî ÐÓãçÚã ×ÐÜÕáâ ÝïÜÕæÚÐÙ ÔÛï þáöå ÜÞþ, ÐÚàÐÜï "
"ÝïÜÕæÚÐÙ"
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
-"à ÒÐá ÐÔáãâÝöçÐÕ äÐÙÛ 'teenagent.dat'. ·ÐßÐÜßãÙæÕ ïÓÞ × ÒíÑ-áÐÙâÐ ScummVM"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4364,6 +4368,11 @@ msgstr ""
"ÄÐÙÛ teenagent.dat ×ÖÐâë, ÐÛÕ zlib ÝÕ þÚÛîçÐÝë þ Óíâã ßàÐÓàÐÜã. ºÐÛö ÛÐáÚÐ, "
"àÐáßÐÚãÙæÕ ïÓÞ"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+
#: engines/toon/toon.cpp:222
#, fuzzy, c-format
msgid "Saved game in slot #%d "
@@ -4388,25 +4397,6 @@ msgstr ""
msgid "Could not quick load the saved game #%d"
msgstr "²ë ÖÐÔÐÕæÕ ×ÐÓàã×öæì ÓãÛìÝî?"
-#: engines/toon/toon.cpp:4917
-#, fuzzy
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr ""
-"à ÒÐá ÐÔáãâÝöçÐÕ äÐÙÛ 'teenagent.dat'. ·ÐßÐÜßãÙæÕ ïÓÞ × ÒíÑ-áÐÙâÐ ScummVM"
-
-#: engines/toon/toon.cpp:4929
-#, fuzzy
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr ""
-"à ÒÐá ÐÔáãâÝöçÐÕ äÐÙÛ 'teenagent.dat'. ·ÐßÐÜßãÙæÕ ïÓÞ × ÒíÑ-áÐÙâÐ ScummVM"
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "¿ÐÚÐ×Ðæì ÛöçëÛìÝöÚ ÚÐÔàÐþ ã áÕÚãÝÔã"
@@ -4415,6 +4405,14 @@ msgstr "¿ÐÚÐ×Ðæì ÛöçëÛìÝöÚ ÚÐÔàÐþ ã áÕÚãÝÔã"
msgid "Show the current number of frames per second in the upper left corner"
msgstr "¿ÐÚÐ×Ðæì ã ÒÕàåÝöÜ ÛÕÒëÜ ÚãæÕ ÑïÓãçãî ÚÞÛìÚÐáæì ÚÐÔàÐþ ã áÕÚãÝÔã"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
@@ -4463,6 +4461,35 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "°ÔáãâÝöçÐÕ äÐÙÛ sky.cpt!\n"
+#~ "ºÐÛö ÛÐáÚÐ, ×ÐßÐÜßãÙæÕ ïÓÞ × www.scummvm.org"
+
+#~ 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"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "à ÒÐá ÐÔáãâÝöçÐÕ äÐÙÛ 'teenagent.dat'. ·ÐßÐÜßãÙæÕ ïÓÞ × ÒíÑ-áÐÙâÐ ScummVM"
+
+#, fuzzy
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "à ÒÐá ÐÔáãâÝöçÐÕ äÐÙÛ 'teenagent.dat'. ·ÐßÐÜßãÙæÕ ïÓÞ × ÒíÑ-áÐÙâÐ ScummVM"
+
+#, fuzzy
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "à ÒÐá ÐÔáãâÝöçÐÕ äÐÙÛ 'teenagent.dat'. ·ÐßÐÜßãÙæÕ ïÓÞ × ÒíÑ-áÐÙâÐ ScummVM"
+
#~ msgid "Invalid save file name"
#~ msgstr "½ïßàÐÒöÛìÝÐÕ öÜï äÐÙÛÐ ×ÐåÐÒÐÝÝï"
diff --git a/po/ca_ES.po b/po/ca_ES.po
index 9d55054685..edd9138a7c 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -1,5 +1,5 @@
# Catalan translation for ScummVM.
-# Copyright (C) 2007-2016 The ScummVM Team
+# Copyright (C) 2007-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Jordi Vilalta Prat <jvprat@jvprat.com>, 2007-2011.
#
@@ -7,11 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
"PO-Revision-Date: 2016-12-04 15:46+0000\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
-"Language-Team: Catalan "
-"<https://translations.scummvm.org/projects/scummvm/scummvm/ca/>\n"
+"Language-Team: Catalan <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/ca/>\n"
"Language: ca_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
@@ -160,13 +160,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "D'acord"
@@ -573,7 +573,6 @@ msgid "Associated key : %s"
msgstr "Tecla associada : %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Tecla associada : cap"
@@ -1347,7 +1346,7 @@ msgstr "Servidor:"
msgid "Stop local webserver"
msgstr ""
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1816,7 +1815,7 @@ msgstr "~R~etorna al Llançador"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1837,7 +1836,7 @@ msgstr "Desa la partida:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -2031,11 +2030,11 @@ msgstr ""
msgid "PC-98 Audio"
msgstr "Àudio"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Iniciant l'Emulador de MT-32"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "Emulador de MT-32"
@@ -2759,6 +2758,33 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Comprova les actualitzacions..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr ""
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr ""
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
#, fuzzy
msgid "Color mode"
@@ -2839,8 +2865,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2852,8 +2878,8 @@ msgstr "Recupera la partida:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -4241,21 +4267,9 @@ msgstr ""
msgid "Show windows with a partially transparent background"
msgstr ""
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"No s'ha pogut trobar el fitxer \"sky.cpt\"!\n"
-"Baixeu-lo de 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"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
msgstr ""
-"El fitxer \"sky.cpt\" té una mida incorrecta.\n"
-"Torneu a baixar-lo de www.scummvm.org"
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4354,12 +4368,7 @@ msgid ""
"Use English speech instead of German for every language other than German"
msgstr ""
-#: engines/teenagent/resources.cpp:96
-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:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4367,6 +4376,11 @@ msgstr ""
"El fitxer teenagent.dat està comprimit però aquest executable no conté zlib. "
"Descomprimiu-lo, si us plau"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+
#: engines/toon/toon.cpp:222
#, fuzzy, c-format
msgid "Saved game in slot #%d "
@@ -4391,23 +4405,6 @@ msgstr ""
msgid "Could not quick load the saved game #%d"
msgstr "Voleu carregar o desar el joc?"
-#: engines/toon/toon.cpp:4917
-#, fuzzy
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr "Us falta el fitxer 'teenagent.dat'. Obteniu-lo a la pàgina de ScummVM"
-
-#: engines/toon/toon.cpp:4929
-#, fuzzy
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr "Us falta el fitxer 'teenagent.dat'. Obteniu-lo a la pàgina de ScummVM"
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr ""
@@ -4416,6 +4413,14 @@ msgstr ""
msgid "Show the current number of frames per second in the upper left corner"
msgstr ""
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
#: engines/zvision/detection_tables.h:52
#, fuzzy
msgid "Use the original save/load screens instead of the ScummVM interface"
@@ -4466,6 +4471,35 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "No s'ha pogut trobar el fitxer \"sky.cpt\"!\n"
+#~ "Baixeu-lo de www.scummvm.org"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "El fitxer \"sky.cpt\" té una mida incorrecta.\n"
+#~ "Torneu a baixar-lo de www.scummvm.org"
+
+#~ 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"
+
+#, fuzzy
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Us falta el fitxer 'teenagent.dat'. Obteniu-lo a la pàgina de ScummVM"
+
+#, fuzzy
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Us falta el fitxer 'teenagent.dat'. Obteniu-lo a la pàgina de ScummVM"
+
#, fuzzy
#~ msgid "Use original savegame dialog"
#~ msgstr "Utilitza les pantalles originals de desat/càrrega"
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index 5d1bd936dc..f397c22b28 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -1,5 +1,5 @@
# Czech translation for ScummVM.
-# Copyright (C) 2001-2016 The ScummVM Team
+# Copyright (C) 2011-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Zbynìk Schwarz <zbynek.schwarz@gmail.com>, 2011-2013.
#
@@ -7,11 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.7.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
"PO-Revision-Date: 2016-12-04 15:43+0000\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
-"Language-Team: Czech "
-"<https://translations.scummvm.org/projects/scummvm/scummvm/cs/>\n"
+"Language-Team: Czech <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/cs/>\n"
"Language: cs_CZ\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-2\n"
@@ -165,13 +165,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -578,7 +578,6 @@ msgid "Associated key : %s"
msgstr "Pøiøazená klávesa: %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Pøiøazená klávesa: ¾ádná"
@@ -1336,7 +1335,7 @@ msgstr "Zastavit server"
msgid "Stop local webserver"
msgstr "Zastavit místní internetový server"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1804,7 +1803,7 @@ msgstr "~N~ávrat do Spou¹tìèe"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1825,7 +1824,7 @@ msgstr "Ulo¾it hru:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -2019,11 +2018,11 @@ msgstr "Zvuk FM-Towns"
msgid "PC-98 Audio"
msgstr "Zvuk PC-98"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Zavádím MT-32 Emulátor"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "MT-32 Emulátor"
@@ -2747,6 +2746,33 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Zkontrolovat Aktualizace..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr ""
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr ""
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr "Barevný re¾im"
@@ -2828,8 +2854,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2841,8 +2867,8 @@ msgstr "Obnovit hru:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -4226,21 +4252,9 @@ msgstr "Prùhledná okna"
msgid "Show windows with a partially transparent background"
msgstr "Zobrazit okna s èásteènì prùhledným pozadím"
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"Nelze nalézt soubor \"sky.cpt\"!\n"
-"Stáhnìte si ho, prosím z 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"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
msgstr ""
-"Soubor \"sky.cpt\" má nesprávnou velikost.\n"
-"Stáhnìte si ho, prosím, (znovu) z www.scummvm.org"
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4331,12 +4345,7 @@ msgid ""
"Use English speech instead of German for every language other than German"
msgstr "Pou¾ít anglickou øeè místo nìmecké pro ka¾dý jazyk kromì nìmèiny"
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr "Chybí vám soubor 'teenagent.dat'. Mù¾ete ho získat ze stránky ScummVM"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4344,6 +4353,11 @@ msgstr ""
"Soubor teenagent.dat je komprimován a zlib není souèástí spustitelného "
"souboru. Prosím dekomprimujte ho"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+
#: engines/toon/toon.cpp:222
#, fuzzy, c-format
msgid "Saved game in slot #%d "
@@ -4368,23 +4382,6 @@ msgstr ""
msgid "Could not quick load the saved game #%d"
msgstr "Chcete naèíst ulo¾enou pozici?"
-#: engines/toon/toon.cpp:4917
-#, fuzzy
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr "Chybí vám soubor 'teenagent.dat'. Mù¾ete ho získat ze stránky ScummVM."
-
-#: engines/toon/toon.cpp:4929
-#, fuzzy
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr "Chybí vám soubor 'teenagent.dat'. Mù¾ete ho získat ze stránky ScummVM."
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "Zobrazit poèítadlo FPS"
@@ -4393,6 +4390,14 @@ msgstr "Zobrazit poèítadlo FPS"
msgid "Show the current number of frames per second in the upper left corner"
msgstr "Zobrazit souèasný poèet snímkù za sekundu v horním levém rohu"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr "Pou¾ít pùvodní obrazovky naètení/ulo¾ení místo rozhraní ScummVM"
@@ -4439,6 +4444,35 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Nelze nalézt soubor \"sky.cpt\"!\n"
+#~ "Stáhnìte si ho, prosím z www.scummvm.org"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Soubor \"sky.cpt\" má nesprávnou velikost.\n"
+#~ "Stáhnìte si ho, prosím, (znovu) z www.scummvm.org"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Chybí vám soubor 'teenagent.dat'. Mù¾ete ho získat ze stránky ScummVM"
+
+#, fuzzy
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Chybí vám soubor 'teenagent.dat'. Mù¾ete ho získat ze stránky ScummVM."
+
+#, fuzzy
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Chybí vám soubor 'teenagent.dat'. Mù¾ete ho získat ze stránky ScummVM."
+
#~ msgid "Invalid save file name"
#~ msgstr "Neplatný název souboru"
diff --git a/po/da_DK.po b/po/da_DK.po
index 8be21a27fe..85273bf5ae 100644
--- a/po/da_DK.po
+++ b/po/da_DK.po
@@ -1,5 +1,5 @@
# Dansk translation for ScummVM
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2010-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Steffen Nyeland <steffen@nyeland.dk>, 2010.
#
@@ -7,16 +7,17 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-02-25 21:08+0100\n"
-"Last-Translator: Steffen Nyeland <steffen@nyeland.dk>\n"
-"Language-Team: Steffen Nyeland <steffen@nyeland.dk>\n"
-"Language: Dansk\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2016-12-29 07:29+0000\n"
+"Last-Translator: poulsen93 <poulsen93@gmail.com>\n"
+"Language-Team: Danish <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/da/>\n"
+"Language: da_DK\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 1.6.6\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 2.9\n"
"X-Language-name: Dansk\n"
#: gui/about.cpp:94
@@ -88,24 +89,24 @@ msgstr "Vælg bibliotek med spil data"
#: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263
msgid "From: "
-msgstr ""
+msgstr "Fra: "
#: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264
msgid "To: "
-msgstr ""
+msgstr "Til: "
#: gui/downloaddialog.cpp:63
msgid "Cancel download"
-msgstr ""
+msgstr "Annuller download"
#: gui/downloaddialog.cpp:65
msgctxt "lowres"
msgid "Cancel download"
-msgstr ""
+msgstr "Annuller download"
#: gui/downloaddialog.cpp:67
msgid "Hide"
-msgstr ""
+msgstr "Skjul"
#: gui/downloaddialog.cpp:117
msgid ""
@@ -159,13 +160,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -570,7 +571,6 @@ msgid "Associated key : %s"
msgstr "Tilknyttet tast : %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Tilknyttet tast : ingen"
@@ -700,7 +700,7 @@ msgstr ""
#: gui/launcher.cpp:365
msgid "This directory cannot be used yet, it is being downloaded into!"
-msgstr ""
+msgstr "Denne mappe kan ikke bruges endnu, der downloades filer til den!"
#: gui/launcher.cpp:415
msgid "Do you really want to remove this game configuration?"
@@ -1332,7 +1332,7 @@ msgstr "Server:"
msgid "Stop local webserver"
msgstr ""
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1440,15 +1440,15 @@ msgstr "Vil du virkelig slette denne gemmer?"
#: gui/saveload-dialog.cpp:554 gui/saveload-dialog.cpp:1060
msgid "Date: "
-msgstr "Dato:"
+msgstr "Dato: "
#: gui/saveload-dialog.cpp:558 gui/saveload-dialog.cpp:1066
msgid "Time: "
-msgstr "Tid:"
+msgstr "Tid: "
#: gui/saveload-dialog.cpp:564 gui/saveload-dialog.cpp:1074
msgid "Playtime: "
-msgstr "Spilletid:"
+msgstr "Spilletid: "
#: gui/saveload-dialog.cpp:577 gui/saveload-dialog.cpp:665
#, fuzzy
@@ -1473,7 +1473,7 @@ msgstr "Opret en ny gemmer"
#: gui/saveload-dialog.cpp:1053
msgid "Name: "
-msgstr "Navn:"
+msgstr "Navn: "
#: gui/saveload-dialog.cpp:1131
#, c-format
@@ -1795,7 +1795,7 @@ msgstr "~R~etur til oversigt"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1816,7 +1816,7 @@ msgstr "Gemmer:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -2010,11 +2010,11 @@ msgstr "FM Towns lyd"
msgid "PC-98 Audio"
msgstr "PC-98 lyd"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Initialisere MT-32 emulator"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "MT-32 emulator"
@@ -2228,7 +2228,7 @@ msgstr " (Aktiv)"
#: backends/keymapper/remap-dialog.cpp:107
msgid " (Blocked)"
-msgstr "(Blokeret)"
+msgstr " (Blokeret)"
#: backends/keymapper/remap-dialog.cpp:120
msgid " (Global)"
@@ -2253,7 +2253,7 @@ msgstr "ScummVM Hovedmenu"
#: backends/platform/ds/arm9/source/dsoptions.cpp:63
msgid "~L~eft handed mode"
-msgstr "~V~enstrehåndstilstand "
+msgstr "~V~enstrehåndstilstand"
#: backends/platform/ds/arm9/source/dsoptions.cpp:64
msgid "~I~ndy fight controls"
@@ -2293,7 +2293,7 @@ msgstr "Skalering af øverste skærm ved opstart:"
#: backends/platform/ds/arm9/source/dsoptions.cpp:105
msgid "Main screen scaling:"
-msgstr "Hovedskærm skalering"
+msgstr "Hovedskærm skalering:"
#: backends/platform/ds/arm9/source/dsoptions.cpp:107
msgid "Hardware scale (fast, but low quality)"
@@ -2688,11 +2688,11 @@ msgstr "Drej"
#: backends/platform/wince/CELauncherDialog.cpp:56
msgid "Using SDL driver "
-msgstr "Brug SDL driver"
+msgstr "Brug SDL driver "
#: backends/platform/wince/CELauncherDialog.cpp:60
msgid "Display "
-msgstr "Vis"
+msgstr "Vis "
#: backends/platform/wince/CELauncherDialog.cpp:83
msgid "Do you want to perform an automatic scan ?"
@@ -2736,6 +2736,33 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Søg efter opdateringer..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr ""
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr ""
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
#, fuzzy
msgid "Color mode"
@@ -2818,8 +2845,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2831,8 +2858,8 @@ msgstr "Gendan spil:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3968,7 +3995,7 @@ msgstr "Gem / Indlæs / Indstillinger"
#: engines/scumm/help.cpp:256
msgid "Other game controls:"
-msgstr "Andre spil kontroller"
+msgstr "Andre spil kontroller:"
#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:268
msgid "Inventory:"
@@ -4020,7 +4047,7 @@ msgstr "Tredie barn"
#: engines/scumm/help.cpp:292
msgid "Toggle Inventory/IQ Points display"
-msgstr "Skift Inventory/IQ Points display "
+msgstr "Skift Inventory/IQ Points display"
#: engines/scumm/help.cpp:293
msgid "Toggle Keyboard/Mouse Fighting (*)"
@@ -4077,7 +4104,7 @@ msgstr "Mavepuster"
#: engines/scumm/help.cpp:318
msgid "These are for Indy on left."
-msgstr "Disse er for Indy til venstre"
+msgstr "Disse er for Indy til venstre."
#: engines/scumm/help.cpp:319
msgid "When Indy is on the right,"
@@ -4226,21 +4253,9 @@ msgstr "Gennemsigtige vinduer"
msgid "Show windows with a partially transparent background"
msgstr "Vis vinduer med delvis gennemsigtig baggrund"
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"Kunne ikke finde \"sky.cpt\" filen!\n"
-"Venligst download den fra 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"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
msgstr ""
-"\"sky.cpt\" filen har en forkert størrelse.\n"
-"Venligst (gen)hent den fra www.scummvm.org"
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4334,12 +4349,7 @@ msgid ""
"Use English speech instead of German for every language other than German"
msgstr ""
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr "Du mangler filen 'teenagent.dat'. Hent den på ScummVM hjemmesiden"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4347,6 +4357,11 @@ msgstr ""
"Teenagent.dat filen er komprimeret og zlib er ikke blevet inkluderet i dette "
"program. Udpak den venligst"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+
#: engines/toon/toon.cpp:222
#, fuzzy, c-format
msgid "Saved game in slot #%d "
@@ -4371,23 +4386,6 @@ msgstr ""
msgid "Could not quick load the saved game #%d"
msgstr "Vil du indlæse gemmer?"
-#: engines/toon/toon.cpp:4917
-#, fuzzy
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr "Du mangler filen 'teenagent.dat'. Hent den på ScummVM hjemmesiden"
-
-#: engines/toon/toon.cpp:4929
-#, fuzzy
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr "Du mangler filen 'teenagent.dat'. Hent den på ScummVM hjemmesiden"
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "Vis FPS-tæller"
@@ -4396,6 +4394,14 @@ msgstr "Vis FPS-tæller"
msgid "Show the current number of frames per second in the upper left corner"
msgstr "Vis det nuværende antal billeder per sekund i øverste venstre hjørne"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
@@ -4442,6 +4448,32 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Kunne ikke finde \"sky.cpt\" filen!\n"
+#~ "Venligst download den fra www.scummvm.org"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "\"sky.cpt\" filen har en forkert størrelse.\n"
+#~ "Venligst (gen)hent den fra www.scummvm.org"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr "Du mangler filen 'teenagent.dat'. Hent den på ScummVM hjemmesiden"
+
+#, fuzzy
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr "Du mangler filen 'teenagent.dat'. Hent den på ScummVM hjemmesiden"
+
+#, fuzzy
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr "Du mangler filen 'teenagent.dat'. Hent den på ScummVM hjemmesiden"
+
#~ msgid "Invalid save file name"
#~ msgstr "Ugyldigt navn for gemmer"
diff --git a/po/de_DE.po b/po/de_DE.po
index 55cf47b4a0..18c300bb37 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -1,5 +1,5 @@
# German translation for ScummVM.
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2010-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Simon Sawatzki <SimSaw@gmx.de>, Lothar Serra Mari <rootfather@scummvm.org>, 2016.
#
@@ -7,11 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.10.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-12-06 09:05+0000\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2016-12-27 09:55+0000\n"
"Last-Translator: Lothar Serra Mari <rootfather@scummvm.org>\n"
-"Language-Team: German "
-"<https://translations.scummvm.org/projects/scummvm/scummvm/de/>\n"
+"Language-Team: German <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/de/>\n"
"Language: de_DE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
@@ -40,7 +40,7 @@ msgstr "Versteckte Dateien anzeigen"
#: gui/browser.cpp:68
msgid "Show files marked with the hidden attribute"
msgstr ""
-"Dateien anzeigen, die mit dem \"Versteckt-Attribut\" gekennzeichnet sind"
+"Dateien anzeigen, die mit dem Attribut \"versteckt\" gekennzeichnet sind"
#: gui/browser.cpp:72 gui/remotebrowser.cpp:56
msgid "Go up"
@@ -166,13 +166,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -582,7 +582,6 @@ msgid "Associated key : %s"
msgstr "Zugewiesene Taste: %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Zugewiesene Taste: keine"
@@ -986,8 +985,8 @@ msgstr "MT-32-Gerät:"
#: gui/options.cpp:955
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
-"Legt das standardmäßige Tonwiedergabe-Gerät für die Ausgabe von Roland "
-"MT-32/LAPC1/CM32l/CM64 fest"
+"Legt das standardmäßige Tonwiedergabe-Gerät für die Ausgabe von Roland MT-32/"
+"LAPC1/CM32l/CM64 fest"
#: gui/options.cpp:960
msgid "True Roland MT-32 (disable GM emulation)"
@@ -1356,7 +1355,7 @@ msgstr "Server anhalten"
msgid "Stop local webserver"
msgstr "Lokalen Webserver anhalten"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1828,7 +1827,7 @@ msgstr "Zur Spiele~l~iste"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1849,7 +1848,7 @@ msgstr "Speichern:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -2045,11 +2044,11 @@ msgstr "FM-Towns-Audio"
msgid "PC-98 Audio"
msgstr "PC-98-Audio"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
-msgstr "MT-32-Emulator wird gestartet"
+msgstr "Initialisiere MT-32-Emulator"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "MT-32-Emulation"
@@ -2771,6 +2770,35 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Suche nach Aktualisierungen..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr "Engine-Datendatei '%s' kann nicht gefunden werden."
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr "Die Engine-Datendatei '%s' ist beschädigt."
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+"Falsche Version der Engine-Datendatei '%s' gefunden. %d.%d erwartet, aber %d."
+"%d bekommen."
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr "Farbmodus einschalten"
@@ -2854,8 +2882,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2867,8 +2895,8 @@ msgstr "Spiel laden:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3192,8 +3220,8 @@ msgstr ""
"%d originale Spielstand-Dateien wurden erfolgreich in ScummVM\n"
"importiert. Wenn Sie weitere Spielstand-Dateien später manuell importieren "
"wollen,\n"
-"müssen Sie die ScummVM-Entwicklerkonsole öffnen und den Befehl \""
-"import_savefile\" verwenden.\n"
+"müssen Sie die ScummVM-Entwicklerkonsole öffnen und den Befehl "
+"\"import_savefile\" verwenden.\n"
"\n"
#: engines/mads/detection.cpp:91
@@ -4277,23 +4305,9 @@ msgstr "Transparente Fenster"
msgid "Show windows with a partially transparent background"
msgstr "Zeigt Fenster mit teilweise transparentem Hintergrund"
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"Konnte \"sky.cpt\" nicht finden!\n"
-"Bitte laden Sie die Datei von\n"
-"www.scummvm.org herunter"
-
#: engines/sky/compact.cpp:141
-msgid ""
-"The \"sky.cpt\" file has an incorrect size.\n"
-"Please (re)download it from www.scummvm.org"
-msgstr ""
-"Die Datei \"sky.cpt\" hat eine ungültige Größe.\n"
-"Bitte laden Sie diese Datei (erneut) von\n"
-"www.scummvm.org herunter"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
+msgstr "Die Engine-Datendatei \"sky.cpt\" hat eine falsche Größe."
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4392,14 +4406,7 @@ msgstr ""
"Verwende englische Sprachausgabe anstelle der deutschen, wenn eine andere "
"Sprache als Deutsch verwendet wird"
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
-"Ihnen fehlt die Datei \"teenagent.dat\". Laden Sie sich diese von der "
-"ScummVM-Website unter http://www.scummvm.org herunter"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4407,6 +4414,11 @@ msgstr ""
"Die Datei \"teenagent.dat\" ist gepackt und zlib zum Entpacken wurde in "
"dieser ausführbaren Datei nicht miteingebunden. Bitte entpacken Sie die Datei"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr "Schriftartvariante in Engine-Datendatei '%s' nicht vorhanden."
+
#: engines/toon/toon.cpp:222
#, c-format
msgid "Saved game in slot #%d "
@@ -4415,7 +4427,7 @@ msgstr "Spiel in Speicherplatz #%d gespeichert "
#: engines/toon/toon.cpp:226
#, c-format
msgid "Could not quick save into slot #%d"
-msgstr "Speichern des Spielstandes in Position #%d nicht möglich"
+msgstr "Speichern im Schnellspeicherplatz #%d fehlgeschlagen"
#: engines/toon/toon.cpp:239
#, c-format
@@ -4427,28 +4439,6 @@ msgstr "Spielstand #%d geladen"
msgid "Could not quick load the saved game #%d"
msgstr "Schnellladen des Spielstandes #%d nicht möglich"
-#: engines/toon/toon.cpp:4917
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr ""
-"Ihnen fehlt die Datei \"toon.dat\". Laden Sie sich diese von der ScummVM-"
-"Website unter http://www.scummvm.org herunter"
-
-#: engines/toon/toon.cpp:4929
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr ""
-"Die Datei \"toon.dat\" ist defekt. Laden Sie diese von der ScummVM-Website "
-"herunter"
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-"Falsche Version der Datei 'toon.dat'. %d.%d wurde erwartet, aber %d.%d "
-"erhalten. Laden Sie die Datei von der ScummVM-Website unter http://"
-"www.scummvm.org herunter"
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "Zähler für Bilder pro Sekunde anzeigen"
@@ -4458,6 +4448,14 @@ msgid "Show the current number of frames per second in the upper left corner"
msgstr ""
"Zeige die aktuelle Anzahl von Bildern pro Sekunde in der oberen linken Ecke"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr "Bilineare Filterung für Sprites (LANGSAM)"
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr "Bilineare Filterung auf einzelne Sprites anwenden"
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
@@ -4507,6 +4505,46 @@ msgstr ""
"Spielstände bis zu Version %d. Sie benötigen eine aktualisierte Version der "
"Engine, um diesen Spielstand zu verwenden."
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Konnte \"sky.cpt\" nicht finden!\n"
+#~ "Bitte laden Sie die Datei von\n"
+#~ "www.scummvm.org herunter"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Die Datei \"sky.cpt\" hat eine ungültige Größe.\n"
+#~ "Bitte laden Sie diese Datei (erneut) von\n"
+#~ "www.scummvm.org herunter"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Ihnen fehlt die Datei \"teenagent.dat\". Laden Sie sich diese von der "
+#~ "ScummVM-Website unter http://www.scummvm.org herunter"
+
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Ihnen fehlt die Datei \"toon.dat\". Laden Sie sich diese von der ScummVM-"
+#~ "Website unter http://www.scummvm.org herunter"
+
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Die Datei \"toon.dat\" ist defekt. Laden Sie diese von der ScummVM-"
+#~ "Website herunter"
+
+#~ msgid ""
+#~ "File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it "
+#~ "from the ScummVM website"
+#~ msgstr ""
+#~ "Falsche Version der Datei 'toon.dat'. %d.%d wurde erwartet, aber %d.%d "
+#~ "erhalten. Laden Sie die Datei von der ScummVM-Website unter http://www."
+#~ "scummvm.org herunter"
+
#~ msgid "Invalid save file name"
#~ msgstr "Ungültiger Spielstandname"
diff --git a/po/el.po b/po/el.po
new file mode 100644
index 0000000000..bbbf804a62
--- /dev/null
+++ b/po/el.po
@@ -0,0 +1,4515 @@
+# Greek translation for ScummVM.
+# Copyright (C) 2016-2017 ScummVM Team
+# This file is distributed under the same license as the ScummVM package.
+# Filippos Karapetis <md5@scummvm.org>, 2016.
+msgid ""
+msgstr ""
+"Project-Id-Version: ScummVM 1.10.0git\n"
+"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2017-01-07 02:29+0000\n"
+"Last-Translator: Filippos Karapetis <bluegr@gmail.com>\n"
+"Language-Team: Greek <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/el/>\n"
+"Language: el\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-7\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 2.9\n"
+"X-Language-name: Greek\n"
+
+#: gui/about.cpp:94
+#, c-format
+msgid "(built on %s)"
+msgstr "(äçìéïõñãÞèçêå ôçí %s)"
+
+#: gui/about.cpp:101
+msgid "Features compiled in:"
+msgstr "×áñáêôçñéóôéêÜ ðïõ ðåñéëáìâÜíïíôáé:"
+
+#: gui/about.cpp:110
+msgid "Available engines:"
+msgstr "ÄéáèÝóéìåò ìç÷áíÝò:"
+
+#: gui/browser.cpp:68 gui/browser_osx.mm:104
+msgid "Show hidden files"
+msgstr "ÅìöÜíéóç êñõöþí áñ÷åßùí"
+
+#: gui/browser.cpp:68
+msgid "Show files marked with the hidden attribute"
+msgstr "ÅìöÜíåéóç áñ÷åßùí ðïõ Ý÷ïõí åðéóçìáíèåß ùò êñõöÜ"
+
+#: gui/browser.cpp:72 gui/remotebrowser.cpp:56
+msgid "Go up"
+msgstr "ÌåôÜâáóç ðÜíù"
+
+#: gui/browser.cpp:72 gui/browser.cpp:74 gui/remotebrowser.cpp:56
+#: gui/remotebrowser.cpp:58
+msgid "Go to previous directory level"
+msgstr "ÌåôÜâáóç óôï ðñïçãïýìåíï åðßðåäï êáôáëüãïõ"
+
+#: gui/browser.cpp:74 gui/remotebrowser.cpp:58
+msgctxt "lowres"
+msgid "Go up"
+msgstr "ÌåôÜâáóç ðÜíù"
+
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editgamedialog.cpp:292
+#: gui/editrecorddialog.cpp:67 gui/filebrowser-dialog.cpp:64
+#: gui/fluidsynth-dialog.cpp:152 gui/KeysDialog.cpp:43 gui/massadd.cpp:95
+#: gui/options.cpp:1461 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:69
+#: gui/recorderdialog.cpp:155 gui/remotebrowser.cpp:59
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
+#: gui/saveload-dialog.cpp:717 gui/saveload-dialog.cpp:1111
+#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
+#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
+#: backends/events/default/default-events.cpp:196
+#: backends/events/default/default-events.cpp:218
+#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
+#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
+#: engines/sword1/control.cpp:865
+msgid "Cancel"
+msgstr "Áêýñùóç"
+
+#: gui/browser.cpp:76 gui/browser_osx.mm:103 gui/chooser.cpp:47
+#: gui/filebrowser-dialog.cpp:65 gui/remotebrowser.cpp:60
+#: gui/themebrowser.cpp:56
+msgid "Choose"
+msgstr "ÅðéëïãÞ"
+
+#: gui/downloaddialog.cpp:48
+msgid "Select directory where to download game data"
+msgstr "ÅðéëÝîôå öÜêåëï ãéá íá ìåôáöïñôþóåôå ôá äåäïìÝíá ðáé÷íéäéþí"
+
+#: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:470 gui/launcher.cpp:197
+msgid "Select directory with game data"
+msgstr "ÅðéëÝîôå öÜêåëï ìå äåäïìÝíá ðáé÷íéäéïý"
+
+#: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263
+msgid "From: "
+msgstr "Áðü: "
+
+#: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264
+msgid "To: "
+msgstr "¸ùò: "
+
+#: gui/downloaddialog.cpp:63
+msgid "Cancel download"
+msgstr "Áêýñùóç ëÞøçò"
+
+#: gui/downloaddialog.cpp:65
+msgctxt "lowres"
+msgid "Cancel download"
+msgstr "Áêýñùóç ëÞøçò"
+
+#: gui/downloaddialog.cpp:67
+msgid "Hide"
+msgstr "Áðüêñõøç"
+
+#: gui/downloaddialog.cpp:117
+msgid ""
+"It looks like your connection is limited. Do you really want to download "
+"files with it?"
+msgstr ""
+"Öáßíåôáé ðùò ç óýíäåóÞ óáò åßíáé ðåñéïñéóìÝíç. ÈÝëåôå ðñáãìáôéêÜ íá "
+"ìåôáöïñôþóåôå áñ÷åßá ìå áõôÞ;"
+
+#: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:152
+#: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217
+#: gui/launcher.cpp:307 gui/launcher.cpp:415 gui/launcher.cpp:474
+#: gui/storagewizarddialog.cpp:112
+#: backends/events/symbiansdl/symbiansdl-events.cpp:186
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
+#: engines/sci/graphics/controls32.cpp:827
+msgid "Yes"
+msgstr "Íáé"
+
+#: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:153
+#: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217
+#: gui/launcher.cpp:307 gui/launcher.cpp:415 gui/launcher.cpp:474
+#: gui/storagewizarddialog.cpp:112
+#: backends/events/symbiansdl/symbiansdl-events.cpp:186
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
+#: engines/sci/graphics/controls32.cpp:827
+msgid "No"
+msgstr "¼÷é"
+
+#: gui/downloaddialog.cpp:136 gui/launcher.cpp:565
+msgid "ScummVM couldn't open the specified directory!"
+msgstr "Ôï ScummVM äå ìðüñåóå íá áíïßîåé ôï êáèïñéóìÝíï öÜêåëï!"
+
+#: gui/downloaddialog.cpp:146
+msgid ""
+"Cannot create a directory to download - the specified directory has a file "
+"with the same name."
+msgstr ""
+"Äåí Þôáí äõíáôÞ ç äçìéïõñãßá öáêÝëïõ ãéá ìåôáöüñôùóç - ï ðñïêáèïñéóìÝíïò "
+"öÜêåëïò Ý÷åé Ýíá áñ÷åßï ìå ôï ßäéï üíïìá."
+
+#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
+#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:522
+#: gui/launcher.cpp:526 gui/massadd.cpp:92 gui/options.cpp:1463
+#: gui/saveload-dialog.cpp:1112 engines/engine.cpp:477 engines/engine.cpp:488
+#: backends/platform/wii/options.cpp:47
+#: backends/platform/wince/CELauncherDialog.cpp:54
+#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
+#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
+#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
+#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
+msgid "OK"
+msgstr "OK"
+
+#: gui/downloaddialog.cpp:151
+#, c-format
+msgid ""
+"The \"%s\" already exists in the specified directory.\n"
+"Do you really want to download files into that directory?"
+msgstr ""
+"Ôï \"%s\" õðÜñ÷åé Þäç óôïí ðñïêáèïñéóìÝíï öÜêåëï.\n"
+"ÈÝëåôå ðñáãìáôéêÜ íá ìåôáöïñôþóåôå áñ÷åßá óå áõôü ôï öÜêåëï;"
+
+#: gui/downloaddialog.cpp:251
+#, c-format
+msgid "Downloaded %s %s / %s %s"
+msgstr "Ìåôáöïñôþèçêáí %s %s / %s %s"
+
+#: gui/downloaddialog.cpp:258
+#, c-format
+msgid "Download speed: %s %s"
+msgstr "Ôá÷ýôçôá ìåôáöüñôùóçò: %s %s"
+
+#: gui/editgamedialog.cpp:132
+msgid "Game"
+msgstr "Ðáé÷íßäé"
+
+#: gui/editgamedialog.cpp:136
+msgid "ID:"
+msgstr "ID:"
+
+#: gui/editgamedialog.cpp:136 gui/editgamedialog.cpp:138
+#: gui/editgamedialog.cpp:139
+msgid ""
+"Short game identifier used for referring to saved games and running the game "
+"from the command line"
+msgstr ""
+"Óýíôïìï áíáãíùñéóôéêü ðáé÷íéäéïý ðïõ ÷ñçóéìïðïéåßôáé ãéá ôçí ðáñáðïìðÞ "
+"áðïèçêåõìÝíùí ðáé÷íéäéþí êáé ãéá ôçí åêôÝëåóç ôïõ ðáé÷íéäéïý áðü ôç ãñáììÞ "
+"åíôïëþí"
+
+#: gui/editgamedialog.cpp:138
+msgctxt "lowres"
+msgid "ID:"
+msgstr "ID:"
+
+#: gui/editgamedialog.cpp:143 gui/editrecorddialog.cpp:59
+msgid "Name:"
+msgstr "¼íïìá:"
+
+#: gui/editgamedialog.cpp:143 gui/editgamedialog.cpp:145
+#: gui/editgamedialog.cpp:146
+msgid "Full title of the game"
+msgstr "ÐëÞñçò ôßôëïò ôïõ ðáé÷íéäéïý"
+
+#: gui/editgamedialog.cpp:145
+msgctxt "lowres"
+msgid "Name:"
+msgstr "¼íïìá:"
+
+#: gui/editgamedialog.cpp:149
+msgid "Language:"
+msgstr "Ãëþóóá:"
+
+#: gui/editgamedialog.cpp:149 gui/editgamedialog.cpp:150
+msgid ""
+"Language of the game. This will not turn your Spanish game version into "
+"English"
+msgstr ""
+"Ãëþóóá ôïõ ðáé÷íéäéïý. Áõôü äå èá ìåôáôñÝøåé ôçí ÉóðáíéêÞ Ýêäïóç ôïõ "
+"ðáé÷íéäéïý óáò óå ÁããëéêÞ"
+
+#: gui/editgamedialog.cpp:151 gui/editgamedialog.cpp:165 gui/options.cpp:121
+#: gui/options.cpp:812 gui/options.cpp:825 gui/options.cpp:1356
+#: audio/null.cpp:41
+msgid "<default>"
+msgstr "<ðñïêáèïñéóìÝíç>"
+
+#: gui/editgamedialog.cpp:161
+msgid "Platform:"
+msgstr "Ðëáôöüñìá:"
+
+#: gui/editgamedialog.cpp:161 gui/editgamedialog.cpp:163
+#: gui/editgamedialog.cpp:164
+msgid "Platform the game was originally designed for"
+msgstr "Ðëáôöüñìá ãéá ôçí ïðïßá ó÷åäéÜóôçêå áñ÷éêÜ ôï ðáé÷íßäé"
+
+#: gui/editgamedialog.cpp:163
+msgctxt "lowres"
+msgid "Platform:"
+msgstr "Ðëáôöüñìá:"
+
+#: gui/editgamedialog.cpp:176
+msgid "Engine"
+msgstr "Ìç÷áíÞ"
+
+#: gui/editgamedialog.cpp:184 gui/options.cpp:1147 gui/options.cpp:1232
+msgid "Graphics"
+msgstr "ÃñáöéêÜ"
+
+#: gui/editgamedialog.cpp:184 gui/options.cpp:1147 gui/options.cpp:1232
+msgid "GFX"
+msgstr "Ãñáö."
+
+#: gui/editgamedialog.cpp:187
+msgid "Override global graphic settings"
+msgstr "ÐáñÜêáìøç êáèïëéêþí ñõèìßóåùí ãñáöéêþí"
+
+#: gui/editgamedialog.cpp:189
+msgctxt "lowres"
+msgid "Override global graphic settings"
+msgstr "ÐáñÜêáìøç ñõèì, ãñáöéêþí"
+
+#: gui/editgamedialog.cpp:196 gui/options.cpp:1238
+msgid "Audio"
+msgstr "¹÷ïò"
+
+#: gui/editgamedialog.cpp:199
+msgid "Override global audio settings"
+msgstr "ÐáñÜêáìøç êáèïëéêþí ñõèìßóåùí Þ÷ïõ"
+
+#: gui/editgamedialog.cpp:201
+msgctxt "lowres"
+msgid "Override global audio settings"
+msgstr "ÐáñÜêáìøç ñõèì. Þ÷ïõ"
+
+#: gui/editgamedialog.cpp:210 gui/options.cpp:1243
+msgid "Volume"
+msgstr "¸íôáóç"
+
+#: gui/editgamedialog.cpp:212 gui/options.cpp:1245
+msgctxt "lowres"
+msgid "Volume"
+msgstr "¸íôáóç"
+
+#: gui/editgamedialog.cpp:215
+msgid "Override global volume settings"
+msgstr "ÐáñÜêáìøç êáèïëéêþí ñõèìßóåùí Ýíôáóçò"
+
+#: gui/editgamedialog.cpp:217
+msgctxt "lowres"
+msgid "Override global volume settings"
+msgstr "ÐáñÜêáìøç ñõèì. Ýíôáóçò"
+
+#: gui/editgamedialog.cpp:226 gui/options.cpp:1253
+msgid "MIDI"
+msgstr "MIDI"
+
+#: gui/editgamedialog.cpp:229
+msgid "Override global MIDI settings"
+msgstr "ÐáñÜêáìøç êáèïëéêþí ñõèìßóåùí MIDI"
+
+#: gui/editgamedialog.cpp:231
+msgctxt "lowres"
+msgid "Override global MIDI settings"
+msgstr "ÐáñÜêáìøç ñõèì. MIDI"
+
+#: gui/editgamedialog.cpp:241 gui/options.cpp:1263
+msgid "MT-32"
+msgstr "MT-32"
+
+#: gui/editgamedialog.cpp:244
+msgid "Override global MT-32 settings"
+msgstr "ÐáñÜêáìøç êáèïëéêþí ñõèìßóåùí MT-32"
+
+#: gui/editgamedialog.cpp:246
+msgctxt "lowres"
+msgid "Override global MT-32 settings"
+msgstr "ÐáñÜêáìøç ñõèì. MT-32"
+
+#: gui/editgamedialog.cpp:255 gui/options.cpp:1270
+msgid "Paths"
+msgstr "ÖÜêåëïé"
+
+#: gui/editgamedialog.cpp:257 gui/options.cpp:1272
+msgctxt "lowres"
+msgid "Paths"
+msgstr "ÖÜêåëïé"
+
+#: gui/editgamedialog.cpp:264
+msgid "Game Path:"
+msgstr "ÖÜêåëïò Ðáé÷íéäéïý:"
+
+#: gui/editgamedialog.cpp:266
+msgctxt "lowres"
+msgid "Game Path:"
+msgstr "ÖÜêåëïò Ðáé÷íéäéïý:"
+
+#: gui/editgamedialog.cpp:271 gui/options.cpp:1296
+msgid "Extra Path:"
+msgstr "ÖÜêåëïò ¸îôñá:"
+
+#: gui/editgamedialog.cpp:271 gui/editgamedialog.cpp:273
+#: gui/editgamedialog.cpp:274
+msgid "Specifies path to additional data used by the game"
+msgstr ""
+"Êáèïñßæåé äéáäñïìÞ ãéá ðñüóèåôá äåäïìÝíá ðïõ ÷ñçóéìïðïéïýíôáé áðü ôï ðáé÷íßäé"
+
+#: gui/editgamedialog.cpp:273 gui/options.cpp:1298
+msgctxt "lowres"
+msgid "Extra Path:"
+msgstr "ÖÜêåëïò ¸îôñá:"
+
+#: gui/editgamedialog.cpp:280 gui/options.cpp:1280
+msgid "Save Path:"
+msgstr "ÖÜêåëïò ÁðïèÞêåõóçò:"
+
+#: gui/editgamedialog.cpp:280 gui/editgamedialog.cpp:282
+#: gui/editgamedialog.cpp:283 gui/options.cpp:1280 gui/options.cpp:1282
+#: gui/options.cpp:1283
+msgid "Specifies where your saved games are put"
+msgstr "Êáèïñßæåé ôçí ôïðïèåóßá ôùí áðïèçêåõìÝíùí ðáé÷íéäéþí óáò"
+
+#: gui/editgamedialog.cpp:282 gui/options.cpp:1282
+msgctxt "lowres"
+msgid "Save Path:"
+msgstr "ÖÜêåëïò Áðïè.:"
+
+#: gui/editgamedialog.cpp:301 gui/editgamedialog.cpp:398
+#: gui/editgamedialog.cpp:457 gui/editgamedialog.cpp:518 gui/options.cpp:1291
+#: gui/options.cpp:1299 gui/options.cpp:1308 gui/options.cpp:1488
+#: gui/options.cpp:1494 gui/options.cpp:1502 gui/options.cpp:1525
+#: gui/options.cpp:1554 gui/options.cpp:1560 gui/options.cpp:1567
+#: gui/options.cpp:1575 gui/options.cpp:1758 gui/options.cpp:1761
+#: gui/options.cpp:1768 gui/options.cpp:1778
+msgctxt "path"
+msgid "None"
+msgstr "ÊáíÝíá"
+
+#: gui/editgamedialog.cpp:306 gui/editgamedialog.cpp:404
+#: gui/editgamedialog.cpp:522 gui/options.cpp:1482 gui/options.cpp:1548
+#: gui/options.cpp:1764 backends/platform/wii/options.cpp:56
+msgid "Default"
+msgstr "ÐñïêáèïñéóìÝíï"
+
+#: gui/editgamedialog.cpp:450 gui/options.cpp:1772
+msgid "Select SoundFont"
+msgstr "ÅðéëÝîôå SoundFont"
+
+#: gui/editgamedialog.cpp:489
+msgid "Select additional game directory"
+msgstr "ÅðéëÝîôå ðñüóèåôï öÜêåëï ðáé÷íéäéïý"
+
+#: gui/editgamedialog.cpp:502 gui/options.cpp:1695
+msgid "Select directory for saved games"
+msgstr "ÅðéëÝîôå öÜêåëï ãéá áðïèçêåõìÝíá ðáé÷íßäéá"
+
+#: gui/editgamedialog.cpp:508
+msgid ""
+"Saved games sync feature doesn't work with non-default directories. If you "
+"want your saved games to sync, use default directory."
+msgstr ""
+"Ç ëåéôïõñãßá óõã÷ñïíéóìïý áðïèçêåõìÝíùí ðáé÷íéäéþí äå ëåéôïõñãåß ìå ìç-"
+"ðñïåðéëåãìÝíïõò öáêÝëïõò. Áí åðéèõìåßôå íá óõã÷ñïíßæïíôáé ôá áðïèçêåõìÝíá "
+"ðáé÷íßäéá óáò, ÷ñçóéìïðïéÞóôå ôïí ðñïåðéëåãìÝíï öÜêåëï."
+
+#: gui/editgamedialog.cpp:534
+msgid "This game ID is already taken. Please choose another one."
+msgstr ""
+"Áõôü ôï áíáãíùñéóôéêü ðáé÷íéäéïý ÷ñçóéìïðïéåßôáé Þäç. Ðáñáêáëþ åðéëÝîôå Ýíá "
+"Üëëï."
+
+#: gui/editrecorddialog.cpp:58
+msgid "Author:"
+msgstr "ÓõããñáöÝáò:"
+
+#: gui/editrecorddialog.cpp:60
+msgid "Notes:"
+msgstr "Óçìåéþóåéò:"
+
+#: gui/editrecorddialog.cpp:68 gui/predictivedialog.cpp:74
+msgid "Ok"
+msgstr "Ok"
+
+#: gui/filebrowser-dialog.cpp:49
+msgid "Choose file for loading"
+msgstr "ÅðéëïãÞ áñ÷åßïõ ãéá öüñôùóç"
+
+#: gui/filebrowser-dialog.cpp:49
+msgid "Enter filename for saving"
+msgstr "ÅéóÜãåôå üíïìá áñ÷åßïõ ãéá áðïèÞêåõóç"
+
+#: gui/filebrowser-dialog.cpp:132
+msgid "Do you really want to overwrite the file?"
+msgstr "ÈÝëåôå ðñáãìáôéêÜ íá áíôéêáôáóôÞóåôå ôï áñ÷åßï;"
+
+#: gui/fluidsynth-dialog.cpp:68
+msgid "Reverb"
+msgstr "ÁíôÞ÷çóç"
+
+#: gui/fluidsynth-dialog.cpp:70 gui/fluidsynth-dialog.cpp:102
+msgid "Active"
+msgstr "Åíåñãü"
+
+#: gui/fluidsynth-dialog.cpp:72
+msgid "Room:"
+msgstr "ÄùìÜôéï:"
+
+#: gui/fluidsynth-dialog.cpp:79
+msgid "Damp:"
+msgstr "Õãñáóßá:"
+
+#: gui/fluidsynth-dialog.cpp:86
+msgid "Width:"
+msgstr "ÐëÜôïò:"
+
+#: gui/fluidsynth-dialog.cpp:93 gui/fluidsynth-dialog.cpp:111
+msgid "Level:"
+msgstr "Åðßðåäï:"
+
+#: gui/fluidsynth-dialog.cpp:100
+msgid "Chorus"
+msgstr "×ïñùäßá"
+
+#: gui/fluidsynth-dialog.cpp:104
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:118
+msgid "Speed:"
+msgstr "Ôá÷ýôçôá:"
+
+#: gui/fluidsynth-dialog.cpp:125
+msgid "Depth:"
+msgstr "ÂÜèïò:"
+
+#: gui/fluidsynth-dialog.cpp:132
+msgid "Type:"
+msgstr "Ôýðïò:"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Sine"
+msgstr "Çìßôïíï"
+
+#: gui/fluidsynth-dialog.cpp:136
+msgid "Triangle"
+msgstr "Ôñßãùíï"
+
+#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1316
+msgid "Misc"
+msgstr "ÄéÜöïñá"
+
+#: gui/fluidsynth-dialog.cpp:140
+msgid "Interpolation:"
+msgstr "ÐáñåìâïëÞ:"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "None (fastest)"
+msgstr "Êáìßá (ãñçãïñüôåñï)"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Linear"
+msgstr "ÃñáììéêÞ"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Fourth-order"
+msgstr "ÔÝôáñôçò-ôÜîçò"
+
+#: gui/fluidsynth-dialog.cpp:146
+msgid "Seventh-order"
+msgstr "¸âäïìçò-ôÜîçò"
+
+#: gui/fluidsynth-dialog.cpp:150
+msgid "Reset"
+msgstr "ÅðáíáöïñÜ"
+
+#: gui/fluidsynth-dialog.cpp:150
+msgid "Reset all FluidSynth settings to their default values."
+msgstr ""
+"ÅðáíáöïñÜ üëùí ôùí ñõèìßóåùí ôïõ FluidSynth óôéò ðñïêáèïñéóìÝíåò ôïõò ôéìÝò."
+
+#: gui/fluidsynth-dialog.cpp:217
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"ÈÝëåôå ðñáãìáôéêÜ íá åðáíáöÝñåôå üëåò ôéò ñõèìßóåéò ôïõ FluidSynth óôéò "
+"ðñïêáèïñéóìÝíåò ôïõò ôéìÝò;"
+
+#: gui/gui-manager.cpp:119 backends/keymapper/remap-dialog.cpp:53
+#: engines/scumm/help.cpp:126 engines/scumm/help.cpp:141
+#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:192
+#: engines/scumm/help.cpp:210
+msgid "Close"
+msgstr "Êëåßóéìï"
+
+#: gui/gui-manager.cpp:122
+msgid "Mouse click"
+msgstr "Click ðïíôéêéïý"
+
+#: gui/gui-manager.cpp:126 base/main.cpp:340
+msgid "Display keyboard"
+msgstr "ÐñïâïëÞ ðëçêôñïëïãßïõ"
+
+#: gui/gui-manager.cpp:130 base/main.cpp:344
+msgid "Remap keys"
+msgstr "Áíôéóôïß÷éóç ðëÞêôñùí"
+
+#: gui/gui-manager.cpp:133 base/main.cpp:347 engines/scumm/help.cpp:87
+msgid "Toggle fullscreen"
+msgstr "Ëåéôïõñãßá ðëÞñïõò ïèüíçò"
+
+#: gui/KeysDialog.cpp:41
+msgid "Map"
+msgstr "Áíôéóôïß÷éóç"
+
+#: 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
+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/KeysDialog.cpp:145 gui/KeysDialog.h:36
+msgid "Choose an action to map"
+msgstr "ÅðéëÝîôå ìéá åíÝñãåéá ãéá áíôéóôïß÷éóç"
+
+#: gui/launcher.cpp:141 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:98
+msgid "~Q~uit"
+msgstr "¸~î~ïäïò"
+
+#: gui/launcher.cpp:141 backends/platform/sdl/macosx/appmenu_osx.mm:106
+msgid "Quit ScummVM"
+msgstr "¸îïäïò áðü ôï ScummVM"
+
+#: gui/launcher.cpp:142
+msgid "A~b~out..."
+msgstr "~Ð~åñß..."
+
+#: gui/launcher.cpp:142 backends/platform/sdl/macosx/appmenu_osx.mm:80
+msgid "About ScummVM"
+msgstr "Ðåñß ôïõ ScummVM"
+
+#: gui/launcher.cpp:143
+msgid "~O~ptions..."
+msgstr "~Å~ðéëïãÝò..."
+
+#: gui/launcher.cpp:143
+msgid "Change global ScummVM options"
+msgstr "ÁëëáãÞ êáèïëéêþí åðéëïãþí ôïõ ScummVM"
+
+#: gui/launcher.cpp:145
+msgid "~S~tart"
+msgstr "Å~ê~êßíçóç"
+
+#: gui/launcher.cpp:145
+msgid "Start selected game"
+msgstr "Åêêßíçóç åðéëåãìÝíïõ ðáé÷íéäéïý"
+
+#: gui/launcher.cpp:148
+msgid "~L~oad..."
+msgstr "~Ö~üñôùóç..."
+
+#: gui/launcher.cpp:148
+msgid "Load saved game for selected game"
+msgstr "Öüñôùóç áðïèçêåõìÝíïõ ðáé÷íéäéïý ãéá ôï åðéëåãìÝíï ðáé÷íßäé"
+
+#: gui/launcher.cpp:153
+msgid "~A~dd Game..."
+msgstr "~Ð~ñïóèÞêç Ðáé÷íéäéïý..."
+
+#: gui/launcher.cpp:153 gui/launcher.cpp:160
+msgid "Hold Shift for Mass Add"
+msgstr "ÊñáôÞóôå ðáôçìÝíï ôï Shift ãéá ÌáæéêÞ ÐñïóèÞêç"
+
+#: gui/launcher.cpp:155
+msgid "~E~dit Game..."
+msgstr "~Ä~éüñèùóç Ðáé÷íéäéïý..."
+
+#: gui/launcher.cpp:155 gui/launcher.cpp:162
+msgid "Change game options"
+msgstr "ÁëëáãÞ åðéëïãþí ðáé÷íéäéïý"
+
+#: gui/launcher.cpp:157
+msgid "~R~emove Game"
+msgstr "~Á~öáßñåóç Ðáé÷íéäéïý"
+
+#: gui/launcher.cpp:157 gui/launcher.cpp:164
+msgid "Remove game from the list. The game data files stay intact"
+msgstr ""
+"Áöáßñåóç ðáé÷íéäéïý áðü ôç ëßóôá. Ôá áñ÷åßá äåäïìÝíùí ôïõ ðáé÷íéäéïý ìÝíïõí "
+"áíÝðáöá"
+
+#: gui/launcher.cpp:160
+msgctxt "lowres"
+msgid "~A~dd Game..."
+msgstr "~Ð~ñïóè. Ðáé÷í..."
+
+#: gui/launcher.cpp:162
+msgctxt "lowres"
+msgid "~E~dit Game..."
+msgstr "~Ä~éüñè. Ðáé÷í..."
+
+#: gui/launcher.cpp:164
+msgctxt "lowres"
+msgid "~R~emove Game"
+msgstr "~Á~öáßñ. Ðáé÷í"
+
+#: gui/launcher.cpp:172
+msgid "Search in game list"
+msgstr "ÁíáæÞôçóç óôç ëßóôá ðáé÷íéäéþí"
+
+#: gui/launcher.cpp:176 gui/launcher.cpp:771
+msgid "Search:"
+msgstr "ÁíáæÞôçóç:"
+
+#: gui/launcher.cpp:200 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
+#: engines/mohawk/dialogs.cpp:103 engines/mohawk/riven.cpp:734
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:601
+#: engines/wage/saveload.cpp:748
+msgid "Load game:"
+msgstr "Öüñôùóç ðáé÷íéäéïý:"
+
+#: gui/launcher.cpp:200 engines/dialogs.cpp:115
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:103
+#: engines/mohawk/riven.cpp:734 engines/parallaction/saveload.cpp:194
+#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:185
+#: engines/tsage/scenes.cpp:601 engines/wage/saveload.cpp:748
+msgid "Load"
+msgstr "Öüñôùóç"
+
+#: gui/launcher.cpp:306
+msgid ""
+"Do you really want to run the mass game detector? This could potentially add "
+"a huge number of games."
+msgstr ""
+"ÈÝëåôå ðñáãìáôéêÜ íá ôñÝîåôå ôïí ìáæéêü áíé÷íåõôÞ ðáé÷íéäéþí; Áõôü èá "
+"ìðïñïýóå åíäå÷ïìÝíùò íá ðñïóèÝóåé Ýíá ôåñÜóôéï áñéèìü ðáé÷íéäéþí."
+
+#: gui/launcher.cpp:365
+msgid "This directory cannot be used yet, it is being downloaded into!"
+msgstr ""
+"Áõôüò ï öÜêåëïò äå ìðïñåß íá ÷ñçóéìïðïéçèåß áêüìç, ãßíåôáé ìåôáöüñôùóç óå "
+"áõôüí!"
+
+#: gui/launcher.cpp:415
+msgid "Do you really want to remove this game configuration?"
+msgstr "ÈÝëåôå ðñáãìáôéêÜ íá óâÞóåôå ôéò ñõèìßóåéò áõôïý ôïõ ðáé÷íéäéïý;"
+
+#: gui/launcher.cpp:473
+msgid "Do you want to load saved game?"
+msgstr "ÈÝëåôå íá öïñôþóåôå ôï áðïèçêåõìÝíï ðáé÷íßäé;"
+
+#: gui/launcher.cpp:522
+msgid "This game does not support loading games from the launcher."
+msgstr "Áõôü ôï ðáé÷íßäé äåí õðïóôçñßæåé öüñôùóç ðáé÷íéäéþí áðü ôïí ðñïùèçôÞ."
+
+#: gui/launcher.cpp:526
+msgid "ScummVM could not find any engine capable of running the selected game!"
+msgstr ""
+"Ôï ScummVM äå ìðüñåóå íá âñåß êÜðïéá ìç÷áíÞ éêáíÞ íá åêôåëÝóåé ôï åðéëåãìÝíï "
+"ðáé÷íßäé!"
+
+#: gui/launcher.cpp:577
+msgid "ScummVM could not find any game in the specified directory!"
+msgstr ""
+"Ôï ScummVM äå ìðüñåóå íá âñåß êÜðïéï ðáé÷íßäé óôïí ðñïêáèïñéóìÝíï öÜêåëï!"
+
+#: gui/launcher.cpp:590
+msgid "Pick the game:"
+msgstr "ÄéáëÝîôå ôï ðáé÷íßäé:"
+
+#: gui/launcher.cpp:708
+msgid "Mass Add..."
+msgstr "ÌáæéêÞ ÐñïóèÞêç..."
+
+#: gui/launcher.cpp:710
+msgid "Record..."
+msgstr "ÅããñáöÞ..."
+
+#: gui/massadd.cpp:79 gui/massadd.cpp:82
+msgid "... progress ..."
+msgstr "... ðñüïäïò ..."
+
+#: gui/massadd.cpp:259
+msgid "Scan complete!"
+msgstr "Ç óÜñùóç ïëïêëçñþèçêå!"
+
+#: gui/massadd.cpp:262
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games."
+msgstr ""
+"Áíáêáëýöèçêáí %d íÝá ðáé÷íßäéá, áãíïÞèçêáí %d ðáé÷íßäéá ðïõ Ý÷ïõí Þäç "
+"ðñïóôåèåß."
+
+#: gui/massadd.cpp:266
+#, c-format
+msgid "Scanned %d directories ..."
+msgstr "Óáñþèçêáí %d öÜêåëïé ..."
+
+#: gui/massadd.cpp:269
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games ..."
+msgstr ""
+"Áíáêáëýöèçêáí %d íÝá ðáé÷íßäéá, áãíïÞèçêáí %d ðáé÷íßäéá ðïõ Ý÷ïõí Þäç "
+"ðñïóôåèåß ..."
+
+#: gui/onscreendialog.cpp:101 gui/onscreendialog.cpp:103
+msgid "Stop"
+msgstr "Óôïð"
+
+#: gui/onscreendialog.cpp:106
+msgid "Edit record description"
+msgstr "Äéüñèùóç ðåñéãñáöÞò åããñáöÞò"
+
+#: gui/onscreendialog.cpp:108
+msgid "Switch to Game"
+msgstr "ÌåôÜâáóç óôï Ðáé÷íßäé"
+
+#: gui/onscreendialog.cpp:110
+msgid "Fast replay"
+msgstr "ÃñÞãïñç åðáíÜëçøç"
+
+#: gui/options.cpp:119 common/updates.cpp:56
+msgid "Never"
+msgstr "ÐïôÝ"
+
+#: gui/options.cpp:119
+msgid "every 5 mins"
+msgstr "êÜèå 5 ëåðôÜ"
+
+#: gui/options.cpp:119
+msgid "every 10 mins"
+msgstr "êÜèå 10 ëåðôÜ"
+
+#: gui/options.cpp:119
+msgid "every 15 mins"
+msgstr "êÜèå 15 ëåðôÜ"
+
+#: gui/options.cpp:119
+msgid "every 30 mins"
+msgstr "êÜèå 30 ëåðôÜ"
+
+#: gui/options.cpp:121
+msgid "8 kHz"
+msgstr "8 kHz"
+
+#: gui/options.cpp:121
+msgid "11 kHz"
+msgstr "11 kHz"
+
+#: gui/options.cpp:121
+msgid "22 kHz"
+msgstr "22 kHz"
+
+#: gui/options.cpp:121
+msgid "44 kHz"
+msgstr "44 kHz"
+
+#: gui/options.cpp:121
+msgid "48 kHz"
+msgstr "48 kHz"
+
+#: gui/options.cpp:289 gui/options.cpp:552 gui/options.cpp:657
+#: gui/options.cpp:726 gui/options.cpp:937
+msgctxt "soundfont"
+msgid "None"
+msgstr "ÊáíÝíá"
+
+#: gui/options.cpp:456
+msgid "Failed to apply some of the graphic options changes:"
+msgstr "Äåí Þôáí äõíáôÞ ç åöáñìïãÞ ïñéóìÝíùí áëëáãþí óôéò åðéëïãÝò ãñáöéêþí:"
+
+#: gui/options.cpp:468
+msgid "the video mode could not be changed."
+msgstr "äåí Þôáí äõíáôÞ ç áëëáãÞ ôçò ëåéôïõñãßáò âßíôåï."
+
+#: gui/options.cpp:474
+msgid "the aspect ratio setting could not be changed"
+msgstr "äåí Þôáí äõíáôÞ ç áëëáãÞ ôçò äéüñèùóçò áíáëïãßáò äéáóôÜóåùí"
+
+#: gui/options.cpp:480
+msgid "the fullscreen setting could not be changed"
+msgstr "äåí Þôáí äõíáôÞ ç áëëáãÞ ôçò ñýèìéóçò ðëÞñïõò ïèüíçò"
+
+#: gui/options.cpp:486
+msgid "the filtering setting could not be changed"
+msgstr "äåí Þôáí äõíáôÞ ç áëëáãÞ ôçò ñýèìéóçò öéëôñáñßóìáôïò"
+
+#: gui/options.cpp:809
+msgid "Graphics mode:"
+msgstr "Ëåéôïõñãßá ãñáöéêþí:"
+
+#: gui/options.cpp:823
+msgid "Render mode:"
+msgstr "Ëåéôïõñãßá áðüäïóçò:"
+
+#: gui/options.cpp:823 gui/options.cpp:824
+msgid "Special dithering modes supported by some games"
+msgstr ""
+"ÅéäéêÝò ëåéôïõñãßåò ÷ñùìáôéêÞò áíôéðáñÜèåóçò ïé ïðïßåò õðïóôçñßæïíôáé áðü "
+"ïñéóìÝíá ðáé÷íßäéá"
+
+#: gui/options.cpp:835 backends/graphics/openglsdl/openglsdl-graphics.cpp:615
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2460
+msgid "Fullscreen mode"
+msgstr "Ëåéôïõñãßá ðëÞñïõò ïèüíçò"
+
+#: gui/options.cpp:838
+msgid "Filter graphics"
+msgstr "Ößëôñï ãñáöéêþí"
+
+#: gui/options.cpp:838
+msgid "Use linear filtering when scaling graphics"
+msgstr "×ñÞóç ãñáììéêïý öéëôñáñßóìáôïò ãéá ôçí êëéìÜêùóç ãñáöéêþí"
+
+#: gui/options.cpp:841
+msgid "Aspect ratio correction"
+msgstr "Äéüñèùóç áíáëïãßáò äéáóôÜóåùí"
+
+#: gui/options.cpp:841
+msgid "Correct aspect ratio for 320x200 games"
+msgstr "Äéüñèùóç áíáëïãßáò äéáóôÜóåùí ãéá ðáé÷íßäéá 320x200"
+
+#: gui/options.cpp:849
+msgid "Preferred Device:"
+msgstr "Ðñïôéìþìåíç óõóêåõÞ:"
+
+#: gui/options.cpp:849
+msgid "Music Device:"
+msgstr "ÓõóêåõÞ ÌïõóéêÞò:"
+
+#: gui/options.cpp:849 gui/options.cpp:851
+msgid "Specifies preferred sound device or sound card emulator"
+msgstr "Êáèïñßæåé ôçí ðñïôéìþìåíç óõóêåõÞ åîüäïõ Þ÷ïõ Þ åîïìïéùôÞ êÜñôáò Þ÷ïõ"
+
+#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+msgid "Specifies output sound device or sound card emulator"
+msgstr "Êáèïñßæåé ôç óõóêåõÞ åîüäïõ Þ÷ïõ Þ åîïìïéùôÞ êÜñôáò Þ÷ïõ"
+
+#: gui/options.cpp:851
+msgctxt "lowres"
+msgid "Preferred Dev.:"
+msgstr "Ðñïôéì. Óõóê.:"
+
+#: gui/options.cpp:851
+msgctxt "lowres"
+msgid "Music Device:"
+msgstr "Óõóê. Ìïõó.:"
+
+#: gui/options.cpp:878
+msgid "AdLib emulator:"
+msgstr "ÅîïìïéùôÞò Adlib:"
+
+#: gui/options.cpp:878 gui/options.cpp:879
+msgid "AdLib is used for music in many games"
+msgstr "Ç Adlib ÷ñçóéìïðïéåßôáé ãéá ìïõóéêÞ óå ðïëëÜ ðáé÷íßäéá"
+
+#: gui/options.cpp:889
+msgid "Output rate:"
+msgstr "Ñõèìüò åîüäïõ:"
+
+#: gui/options.cpp:889 gui/options.cpp:890
+msgid ""
+"Higher value specifies better sound quality but may be not supported by your "
+"soundcard"
+msgstr ""
+"Õøçëüôåñç ôéìÞ êáèïñßæåé êáëýôåñç ðïéüôçôá Þ÷ïõ, áëëÜ ìðïñåß íá ìçí "
+"õðïóôçñßæåôáé áðü ôçí êÜñôá Þ÷ïõ óáò"
+
+#: gui/options.cpp:900
+msgid "GM Device:"
+msgstr "ÓõóêåõÞ GM:"
+
+#: gui/options.cpp:900
+msgid "Specifies default sound device for General MIDI output"
+msgstr "Êáèïñßæåé ðñïåðéëåãìÝíç óõóêåõÞ Þ÷ïõ ãéá ôçí Ýîïäï General MIDI"
+
+#: gui/options.cpp:911
+msgid "Don't use General MIDI music"
+msgstr "Ìç ÷ñÞóç ìïõóéêÞò General MIDI"
+
+#: gui/options.cpp:922 gui/options.cpp:984
+msgid "Use first available device"
+msgstr "×ñÞóç ðñþôçò äéáèÝóéìçò óõóêåõÞò"
+
+#: gui/options.cpp:934
+msgid "SoundFont:"
+msgstr "SoundFont:"
+
+#: gui/options.cpp:934 gui/options.cpp:936 gui/options.cpp:937
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
+msgstr ""
+"Ôï SoundFont õðïóôçñßæåôáé áðü ìåñéêÝò êÜñôåò Þ÷ïõ, ôï FluidSynth êáé ôï "
+"Timidity"
+
+#: gui/options.cpp:936
+msgctxt "lowres"
+msgid "SoundFont:"
+msgstr "SoundFont:"
+
+#: gui/options.cpp:942
+msgid "Mixed AdLib/MIDI mode"
+msgstr "ÌéêôÞ ëåéôïõñãßá Adlib/MIDI"
+
+#: gui/options.cpp:942
+msgid "Use both MIDI and AdLib sound generation"
+msgstr "×ñÞóç MIDI êáé Adlib ãéá äçìéïõñãßá Þ÷ïõ"
+
+#: gui/options.cpp:945
+msgid "MIDI gain:"
+msgstr "Áýîçóç MIDI:"
+
+#: gui/options.cpp:955
+msgid "MT-32 Device:"
+msgstr "ÓõóêåõÞ MT-32:"
+
+#: gui/options.cpp:955
+msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
+msgstr ""
+"Êáèïñßæåé ðñïåðéëåãìÝíç óõóêåõÞ Þ÷ïõ ãéá Ýîïäï Roland MT-32/LAPC1/CM32l/CM64"
+
+#: gui/options.cpp:960
+msgid "True Roland MT-32 (disable GM emulation)"
+msgstr "ÐñáãìáôéêÞ Roland MT-32 (áðåíåñãïðïßçóç åîïìïéùôÞ GM)"
+
+#: gui/options.cpp:960 gui/options.cpp:962
+msgid ""
+"Check if you want to use your real hardware Roland-compatible sound device "
+"connected to your computer"
+msgstr ""
+"ÅðéëÝîôå áí èÝëåôå íá ÷ñçóéìïðïéÞóåôå óõóêåõÞ Þ÷ïõ óõìâáôÞ ìå Roland, ç "
+"ïðïßá åßíáé óõíäåäåìÝíç óôïí õðïëïãéóôÞ óáò"
+
+#: gui/options.cpp:962
+msgctxt "lowres"
+msgid "True Roland MT-32 (no GM emulation)"
+msgstr "ÐñáãìáôéêÞ Roland MT-32 (÷ùñßò åîïìïßùóç GM)"
+
+#: gui/options.cpp:965
+msgid "Roland GS Device (enable MT-32 mappings)"
+msgstr "ÓõóêåõÞ Roland GS (åíåñãïðïßçóç áíôéóôïé÷ßóåùí MT-32)"
+
+#: gui/options.cpp:965
+msgid ""
+"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
+"GS device"
+msgstr ""
+"ÅðéëÝîôå áí èÝëåôå íá åíåñãïðïéÞóåôå äéïñèùìÝíåò áíôéóôïé÷ßóåéò ãéá íá "
+"åîïìïéþóåôå ìéá MT-32 óå óõóêåõÞ Roland GS"
+
+#: gui/options.cpp:974
+msgid "Don't use Roland MT-32 music"
+msgstr "Ìç ÷ñÞóç ìïõóéêÞò Roland MT-32"
+
+#: gui/options.cpp:1001
+msgid "Text and Speech:"
+msgstr "Êåßìåíï êáé Ïìéëßá:"
+
+#: gui/options.cpp:1005 gui/options.cpp:1015
+msgid "Speech"
+msgstr "Ïìéëßá"
+
+#: gui/options.cpp:1006 gui/options.cpp:1016
+msgid "Subtitles"
+msgstr "Õðüôéôëïé"
+
+#: gui/options.cpp:1007
+msgid "Both"
+msgstr "Êáé ôá äõï"
+
+#: gui/options.cpp:1009
+msgid "Subtitle speed:"
+msgstr "Ôá÷ýôçôá õðïôßôëùí:"
+
+#: gui/options.cpp:1011
+msgctxt "lowres"
+msgid "Text and Speech:"
+msgstr "Êåßìåíï êáé Ïìéëßá:"
+
+#: gui/options.cpp:1015
+msgid "Spch"
+msgstr "Ïìéëßá"
+
+#: gui/options.cpp:1016
+msgid "Subs"
+msgstr "Õðüô."
+
+#: gui/options.cpp:1017
+msgctxt "lowres"
+msgid "Both"
+msgstr "Êáé ôá äõï"
+
+#: gui/options.cpp:1017
+msgid "Show subtitles and play speech"
+msgstr "ÐñïâïëÞ õðïôßôëùí êáé áíáðáñáãùãÞ öùíÞò"
+
+#: gui/options.cpp:1019
+msgctxt "lowres"
+msgid "Subtitle speed:"
+msgstr "Ôá÷ýôçôá õðüô.:"
+
+#: gui/options.cpp:1035
+msgid "Music volume:"
+msgstr "¸íôáóç ìïõóéêÞò:"
+
+#: gui/options.cpp:1037
+msgctxt "lowres"
+msgid "Music volume:"
+msgstr "¸íôáóç ìïõóéêÞò:"
+
+#: gui/options.cpp:1044
+msgid "Mute All"
+msgstr "Óßãáóç ¼ëùí"
+
+#: gui/options.cpp:1047
+msgid "SFX volume:"
+msgstr "¸íôáóç åöÝ:"
+
+#: gui/options.cpp:1047 gui/options.cpp:1049 gui/options.cpp:1050
+msgid "Special sound effects volume"
+msgstr "¸íôáóç åéäéêþí áêïõóôéêþí åöÝ"
+
+#: gui/options.cpp:1049
+msgctxt "lowres"
+msgid "SFX volume:"
+msgstr "¸íôáóç åöÝ:"
+
+#: gui/options.cpp:1057
+msgid "Speech volume:"
+msgstr "¸íôáóç ïìéëßáò:"
+
+#: gui/options.cpp:1059
+msgctxt "lowres"
+msgid "Speech volume:"
+msgstr "¸íôáóç ïìéëßáò:"
+
+#: gui/options.cpp:1257
+msgid "FluidSynth Settings"
+msgstr "Ñõèìßóåéò FluidSynth"
+
+#: gui/options.cpp:1288
+msgid "Theme Path:"
+msgstr "ÖÜêåëïò ÈÝìáôïò:"
+
+#: gui/options.cpp:1290
+msgctxt "lowres"
+msgid "Theme Path:"
+msgstr "ÖÜêåëïò ÈÝìáôïò:"
+
+#: gui/options.cpp:1296 gui/options.cpp:1298 gui/options.cpp:1299
+msgid "Specifies path to additional data used by all games or ScummVM"
+msgstr ""
+"Êáèïñßæåé ôç äéáäñïìÞ ãéá ðñüóèåôá äåäïìÝíá ðïõ ÷ñçóéìïðïéïýíôáé áðü üëá ôá "
+"ðáé÷íßäéá Þ ôï ScummVM"
+
+#: gui/options.cpp:1305
+msgid "Plugins Path:"
+msgstr "ÄéáäñïìÞ Ðñüóèåôùí:"
+
+#: gui/options.cpp:1307
+msgctxt "lowres"
+msgid "Plugins Path:"
+msgstr "Äéáäñ. Ðñüóè.:"
+
+#: gui/options.cpp:1318
+msgctxt "lowres"
+msgid "Misc"
+msgstr "ËïéðÜ"
+
+#: gui/options.cpp:1320
+msgid "Theme:"
+msgstr "ÈÝìá:"
+
+#: gui/options.cpp:1324
+msgid "GUI Renderer:"
+msgstr "Áðåéêüíéóç GUI:"
+
+#: gui/options.cpp:1336
+msgid "Autosave:"
+msgstr "Áõôüìáôç áðïèÞêåõóç:"
+
+#: gui/options.cpp:1338
+msgctxt "lowres"
+msgid "Autosave:"
+msgstr "Áõôüì. áðïè.:"
+
+#: gui/options.cpp:1346
+msgid "Keys"
+msgstr "ÐëÞêôñá"
+
+#: gui/options.cpp:1353
+msgid "GUI Language:"
+msgstr "Ãëþóóá GUI:"
+
+#: gui/options.cpp:1353
+msgid "Language of ScummVM GUI"
+msgstr "Ãëþóóá ôïõ ScummVM GUI"
+
+#: gui/options.cpp:1381
+msgid "Update check:"
+msgstr "¸ëåã÷ïò áíáâáèìßóåùí:"
+
+#: gui/options.cpp:1381
+msgid "How often to check ScummVM updates"
+msgstr "Óõ÷íüôçôá åëÝã÷ïõ åíçìåñþóåùí ôïõ ScummVM"
+
+#: gui/options.cpp:1393
+msgid "Check now"
+msgstr "ÅëÝãîôå ôþñá"
+
+#: gui/options.cpp:1401
+msgid "Cloud"
+msgstr "Óýííåöï"
+
+#: gui/options.cpp:1403
+msgctxt "lowres"
+msgid "Cloud"
+msgstr "Óýííåöï"
+
+#: gui/options.cpp:1408
+msgid "Storage:"
+msgstr "ÁðïèÞêåõóç:"
+
+#: gui/options.cpp:1408
+msgid "Active cloud storage"
+msgstr "ÅíåñãÞ áðïèÞêåõóç óýííåöïõ"
+
+#: gui/options.cpp:1415 gui/options.cpp:1972
+msgid "<none>"
+msgstr "<êáìßá>"
+
+#: gui/options.cpp:1419 backends/platform/wii/options.cpp:114
+msgid "Username:"
+msgstr "¼íïìá ÷ñÞóôç:"
+
+#: gui/options.cpp:1419
+msgid "Username used by this storage"
+msgstr "Ôï üíïìá ÷ñÞóôç ðïõ ÷ñçóéìïðïéåßôáé áðü áõôÞ ôçí áðïèÞêç"
+
+#: gui/options.cpp:1422
+msgid "Used space:"
+msgstr "×ñçóéìïðïéçìÝíïò ÷þñïò:"
+
+#: gui/options.cpp:1422
+msgid "Space used by ScummVM's saved games on this storage"
+msgstr ""
+"×þñïò ðïõ ÷ñçóéìïðïéåßôáé áðü ôá áðïèçêåõìÝíá ðáé÷íßäéá ôïõ ScummVM óå áõôÞ "
+"ôçí áðïèÞêç"
+
+#: gui/options.cpp:1425
+msgid "Last sync time:"
+msgstr "Ôåëåõôáßá þñá óõã÷ñïíéóìïý:"
+
+#: gui/options.cpp:1425
+msgid "When the last saved games sync for this storage occured"
+msgstr ""
+"Ðüôå ðñáãìáôïðïéÞèçêå ï ôåëåõôáßïò óõã÷ñïíéóìüò áðïèçêåõìÝíùí ðáé÷íéäéþí"
+
+#: gui/options.cpp:1428 gui/storagewizarddialog.cpp:71
+msgid "Connect"
+msgstr "Óýíäåóç"
+
+#: gui/options.cpp:1428
+msgid "Open wizard dialog to connect your cloud storage account"
+msgstr ""
+"Áíïßîôå ôï äéÜëïãï ïäçãïý ãéá íá óõíäÝóåôå ôï ëïãáñéáóìü ôïý óýííåöïõ "
+"áðïèÞêåõóÞò óáò"
+
+#: gui/options.cpp:1429
+msgid "Refresh"
+msgstr "ÁíáíÝùóç"
+
+#: gui/options.cpp:1429
+msgid "Refresh current cloud storage information (username and usage)"
+msgstr ""
+"ÁíáíÝùóç ðëçñïöïñéþí ôñÝ÷ïíôïò ÷þñïõ áðïèÞêåõóçò óôï óýííåöï (üíïìá ÷ñÞóôç "
+"êáé ÷ñÞóç)"
+
+#: gui/options.cpp:1430
+msgid "Download"
+msgstr "Ìåôáöüñôùóç"
+
+#: gui/options.cpp:1430
+msgid "Open downloads manager dialog"
+msgstr "¶íïéãìá äéáëüãïõ äéá÷åßñéóçò ìåôáöïñôþóåùí"
+
+#: gui/options.cpp:1432
+msgid "Run server"
+msgstr "ÅêôÝëåóç äéáêïìéóôÞ"
+
+#: gui/options.cpp:1432
+msgid "Run local webserver"
+msgstr "ÅêôÝëåóç ôïðéêïý äéáêïìéóôÞ web"
+
+#: gui/options.cpp:1433 gui/options.cpp:2082
+msgid "Not running"
+msgstr "Äåí åêôåëåßôáé"
+
+#: gui/options.cpp:1437
+msgid "/root/ Path:"
+msgstr "/root/ ÄéáäñïìÞ:"
+
+#: gui/options.cpp:1437 gui/options.cpp:1439 gui/options.cpp:1440
+msgid "Specifies which directory the Files Manager can access"
+msgstr "Êáèïñßæåé ôï öÜêåëï óôïí ïðïßï Ý÷åé ðñüóâáóç ï File Manager"
+
+#: gui/options.cpp:1439
+msgctxt "lowres"
+msgid "/root/ Path:"
+msgstr "/root/ ÄéáäñïìÞ:"
+
+#: gui/options.cpp:1449
+msgid "Server's port:"
+msgstr "Èýñá åîõðçñåôçôÞ:"
+
+#: gui/options.cpp:1449
+msgid ""
+"Which port is used by the server\n"
+"Auth with server is not available with non-default port"
+msgstr ""
+"ÐïéÜ èýñá ÷ñçóéìïðïéåßôáé áðü ôï äéáêïìéóôÞ\n"
+"Äåí åßíáé äéáèÝóéìç ç ðéóôïðïßçóç ìå ôï äéáêïìéóôÞ óå ìç-ðñïåðéëåãìÝíç èýñá"
+
+#: gui/options.cpp:1462
+msgid "Apply"
+msgstr "ÅöáñìïãÞ"
+
+#: gui/options.cpp:1628
+msgid "Failed to change cloud storage!"
+msgstr "Áäõíáìßá áëëáãÞò áðïèÞêåõóçò óýííåöïõ!"
+
+#: gui/options.cpp:1631
+msgid "Another cloud storage is already active."
+msgstr "Ìéá Üëëç áðïèÞêåõóç óýííåöïõ åßíáé Þäç åíåñãÞ."
+
+#: gui/options.cpp:1667
+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/options.cpp:1702
+msgid "The chosen directory cannot be written to. Please select another one."
+msgstr ""
+"Äåí Þôáí äõíáôÞ ç åããñáöÞ óôïí åðéëåãìÝíï öÜêåëï. Ðáñáêáëþ åðéëÝîôå êÜðïéïí "
+"Üëëï."
+
+#: gui/options.cpp:1711
+msgid "Select directory for GUI themes"
+msgstr "ÅðéëÝîôå öÜêåëï ãéá èÝìáôá GUI"
+
+#: gui/options.cpp:1721
+msgid "Select directory for extra files"
+msgstr "ÅðéëÝîôå öÜêåëï ãéá Ýîôñá áñ÷åßá"
+
+#: gui/options.cpp:1732
+msgid "Select directory for plugins"
+msgstr "ÅðéëÝîôå öÜêåëï ãéá ðñüóèåôá"
+
+#: gui/options.cpp:1744
+msgid "Select directory for Files Manager /root/"
+msgstr "ÅðéëÝîôå öÜêåëï ãéá ôï /root/ ôïõ Äéá÷åéñéóôÞ Áñ÷åßùí"
+
+#: gui/options.cpp:1979
+#, c-format
+msgid "%llu bytes"
+msgstr "%llu bytes"
+
+#: gui/options.cpp:1987
+msgid "<right now>"
+msgstr "<Üìåóá>"
+
+#: gui/options.cpp:1989
+msgid "<never>"
+msgstr "<ðïôÝ>"
+
+#: gui/options.cpp:2073
+msgid "Stop server"
+msgstr "ÄéáêïðÞ åîõðçñåôçôÞ"
+
+#: gui/options.cpp:2074
+msgid "Stop local webserver"
+msgstr "ÄéáêïðÞ ôïðéêïý åîõðçñåôçôÞ web"
+
+#: gui/options.cpp:2165
+msgid ""
+"Request failed.\n"
+"Check your Internet connection."
+msgstr ""
+"Ôï áßôçìá áðÝôõ÷å.\n"
+"ÅëÝãîôå ôç óýíäåóÞ óáò óôï Internet."
+
+#. I18N: You must leave "#" as is, only word 'next' is translatable
+#: gui/predictivedialog.cpp:86
+msgid "# next"
+msgstr "# åðüìåíï"
+
+#: gui/predictivedialog.cpp:87
+msgid "add"
+msgstr "ðñïóèÞêç"
+
+#: gui/predictivedialog.cpp:92 gui/predictivedialog.cpp:167
+msgid "Delete char"
+msgstr "ÄéáãñáöÞ ÷áñáêôÞñá"
+
+#: gui/predictivedialog.cpp:97 gui/predictivedialog.cpp:171
+msgid "<"
+msgstr "<"
+
+#. I18N: Pre means 'Predictive', leave '*' as is
+#: gui/predictivedialog.cpp:99 gui/predictivedialog.cpp:575
+msgid "* Pre"
+msgstr "* Pre"
+
+#. I18N: 'Num' means Numbers
+#: gui/predictivedialog.cpp:578
+msgid "* Num"
+msgstr "* Áñéè"
+
+#. I18N: 'Abc' means Latin alphabet input
+#: gui/predictivedialog.cpp:581
+msgid "* Abc"
+msgstr "* Abc"
+
+#: gui/recorderdialog.cpp:63
+msgid "Recorder or Playback Gameplay"
+msgstr "ÅããñáöÞ Þ ÁíáðáñáãùãÞ Gameplay"
+
+#: gui/recorderdialog.cpp:68 gui/recorderdialog.cpp:155
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:443
+msgid "Delete"
+msgstr "ÓâÞóéìï"
+
+#: gui/recorderdialog.cpp:70
+msgid "Record"
+msgstr "ÅããñáöÞ"
+
+#: gui/recorderdialog.cpp:71
+msgid "Playback"
+msgstr "ÁíáðáñáãùãÞ"
+
+#: gui/recorderdialog.cpp:73
+msgid "Edit"
+msgstr "Äéüñèùóç"
+
+#: gui/recorderdialog.cpp:85 gui/recorderdialog.cpp:242
+#: gui/recorderdialog.cpp:252
+msgid "Author: "
+msgstr "ÓõããñáöÝáò: "
+
+#: gui/recorderdialog.cpp:86 gui/recorderdialog.cpp:243
+#: gui/recorderdialog.cpp:253
+msgid "Notes: "
+msgstr "Óçìåéþóåéò: "
+
+#: gui/recorderdialog.cpp:154
+msgid "Do you really want to delete this record?"
+msgstr "ÈÝëåôå ðñáãìáôéêÜ íá óâÞóåôå áõôÞ ôçí åããñáöÞ;"
+
+#: gui/recorderdialog.cpp:173
+msgid "Unknown Author"
+msgstr "¶ãíùóôïò ÓõããñáöÝáò"
+
+#: gui/remotebrowser.cpp:128
+msgid "ScummVM could not access the directory!"
+msgstr "Ôï ScummVM äå ìðüñåóå íá ðñïóðåëÜóåé ôïí öÜêåëï!"
+
+#: gui/saveload-dialog.cpp:334
+msgid "List view"
+msgstr "ÐñïâïëÞ ëßóôáò"
+
+#: gui/saveload-dialog.cpp:335
+msgid "Grid view"
+msgstr "ÐñïâïëÞ ðëÝãìáôïò"
+
+#: gui/saveload-dialog.cpp:378 gui/saveload-dialog.cpp:528
+msgid "No date saved"
+msgstr "×ùñßò áðïèçê. çì/íßá"
+
+#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:529
+msgid "No time saved"
+msgstr "×ùñßò áðïèçê. þñá"
+
+#: gui/saveload-dialog.cpp:380 gui/saveload-dialog.cpp:530
+msgid "No playtime saved"
+msgstr "×ùñßò áðïèçê. þñá ðáé÷íéäéïý"
+
+#: gui/saveload-dialog.cpp:442
+msgid "Do you really want to delete this saved game?"
+msgstr "ÈÝëåôå ðñáãìáôéêÜ íá óâÞóåôå áõôü ôï áðïèçêåõìÝíï ðáé÷íßäé;"
+
+#: gui/saveload-dialog.cpp:554 gui/saveload-dialog.cpp:1060
+msgid "Date: "
+msgstr "Çìåñïìçíßá: "
+
+#: gui/saveload-dialog.cpp:558 gui/saveload-dialog.cpp:1066
+msgid "Time: "
+msgstr "¿ñá: "
+
+#: gui/saveload-dialog.cpp:564 gui/saveload-dialog.cpp:1074
+msgid "Playtime: "
+msgstr "¿ñá ðáé÷íéäéïý: "
+
+#: gui/saveload-dialog.cpp:577 gui/saveload-dialog.cpp:665
+msgid "Untitled saved game"
+msgstr "ÁðïèçêåõìÝíï ðáé÷íßäé ÷ùñßò üíïìá"
+
+#: gui/saveload-dialog.cpp:718
+msgid "Next"
+msgstr "Åðüìåíï"
+
+#: gui/saveload-dialog.cpp:721
+msgid "Prev"
+msgstr "Ðñïçãïýìåíï"
+
+#: gui/saveload-dialog.cpp:924
+msgid "New Save"
+msgstr "ÍÝá ÁðïèÞêåõóç"
+
+#: gui/saveload-dialog.cpp:924
+msgid "Create a new saved game"
+msgstr "Äçìéïõñãßá íÝïõ áðïèçêåõìÝíïõ ðáé÷íéäéïý"
+
+#: gui/saveload-dialog.cpp:1053
+msgid "Name: "
+msgstr "¼íïìá: "
+
+#: gui/saveload-dialog.cpp:1131
+#, c-format
+msgid "Enter a description for slot %d:"
+msgstr "ÅéóÜãåôå ðåñéãñáöÞ ãéá ôç èõñßäá %d:"
+
+#: gui/storagewizarddialog.cpp:55
+#, c-format
+msgid "%s Storage Connection Wizard"
+msgstr "%s Ïäçãüò Óýíäåóçò ÁðïèÞêåõóçò"
+
+#: gui/storagewizarddialog.cpp:58
+msgid "Navigate to the following URL:"
+msgstr "Ðëïçãçèåßôå óôçí áêüëïõèç äéåýèõíóç URL:"
+
+#: gui/storagewizarddialog.cpp:61
+msgid "Obtain the code from the storage, enter it"
+msgstr "ÁðïêôÞóôå ôïí êùäéêü áðü ôçí áðïèÞêåõóç, åéóÜãåôÝ ôïí"
+
+#: gui/storagewizarddialog.cpp:62
+msgid "in the following field and press 'Connect':"
+msgstr "óôï ðáñáêÜôù ðåäßï êáé ðáôÞóôå \"Óýíäåóç\":"
+
+#: gui/storagewizarddialog.cpp:69
+msgid "Open URL"
+msgstr "¶íïéãìá äéåýèõíóçò URL"
+
+#: gui/storagewizarddialog.cpp:70
+msgid "Paste"
+msgstr "Åðéêüëëçóç"
+
+#: gui/storagewizarddialog.cpp:70
+msgid "Pastes clipboard contents into fields"
+msgstr "Åðéêüëëçóç ðåñéå÷üìåíïõ ðñü÷åéñïõ óå ðåäßá"
+
+#: gui/storagewizarddialog.cpp:78
+msgid "You will be directed to ScummVM's page where"
+msgstr "Èá ïäçãçèåßôå óôç óåëßäá ScummVM üðïõ"
+
+#: gui/storagewizarddialog.cpp:79
+msgid "you should allow it to access your storage."
+msgstr "èá ðñÝðåé íá åðéôñÝøåôå ôçí ðñüóâáóç óôïí áðïèçêåõôéêü ÷þñï óáò."
+
+#: gui/storagewizarddialog.cpp:112
+msgid "Another Storage is active. Do you want to interrupt it?"
+msgstr "ÊÜðïéá Üëëç ÁðïèÞêåõóç åßíáé åíåñãÞ. Åðéèõìåßôå íá ôç äéáêüøåôå;"
+
+#: gui/storagewizarddialog.cpp:121
+msgid "Wait until current Storage finishes up and try again."
+msgstr "ÁíáìïíÞ ìÝ÷ñé íá ïëïêëçñùèåß ç ôñÝ÷ïõóá ÁðïèÞêåõóç êáé äïêéìÜóôå îáíÜ."
+
+#: gui/storagewizarddialog.cpp:182
+#, c-format
+msgid "Field %s has a mistake in it."
+msgstr "Ôï ðåäßï %s ðåñéÝ÷åé Ýíá ëÜèïò."
+
+#: gui/storagewizarddialog.cpp:184
+#, c-format
+msgid "Fields %s have mistakes in them."
+msgstr "Ôá ðåäßá %s ðåñéÝ÷ïõí ëÜèç."
+
+#: gui/storagewizarddialog.cpp:199
+msgid "All OK!"
+msgstr "¼ëá OK!"
+
+#: gui/storagewizarddialog.cpp:201
+msgid "Invalid code"
+msgstr "ÅóöáëìÝíïò êùäéêüò"
+
+#: gui/storagewizarddialog.cpp:209
+msgid ""
+"Failed to open URL!\n"
+"Please navigate to this page manually."
+msgstr ""
+"Áðïôõ÷ßá áíïßãìáôïò ôïõ URL!\n"
+"Ðáñáêáëïýìå, ìåôáöåñèåßôå óå áõôÞ ôç óåëßäá ÷åéñïêßíçôá."
+
+#: gui/themebrowser.cpp:45
+msgid "Select a Theme"
+msgstr "ÅðéëÝîôå èÝìá"
+
+#: gui/ThemeEngine.cpp:452
+msgid "Disabled GFX"
+msgstr "ÁðåíåñãïðïéçìÝíá ãñáöéêÜ"
+
+#: gui/ThemeEngine.cpp:452
+msgctxt "lowres"
+msgid "Disabled GFX"
+msgstr "Áðåíåñã. ãñáöéêÜ"
+
+#: gui/ThemeEngine.cpp:453
+msgid "Standard Renderer"
+msgstr "ÊáíïíéêÞ Áðåéêüíéóç"
+
+#: gui/ThemeEngine.cpp:453 engines/scumm/dialogs.cpp:659
+msgid "Standard"
+msgstr "Êáíïíéêü"
+
+#: gui/ThemeEngine.cpp:455
+msgid "Antialiased Renderer"
+msgstr "ÅîïìáëõìÝíç Áðüäïóç"
+
+#: gui/ThemeEngine.cpp:455
+msgid "Antialiased"
+msgstr "ÅîïìáëõìÝíç"
+
+#: gui/updates-dialog.cpp:51
+msgid ""
+"ScummVM now supports automatic check for updates\n"
+"which requires access to the Internet.\n"
+"\n"
+"Would you like to enable this feature?"
+msgstr ""
+"Ôï ScummVM ôþñá õðïóôçñßæåé áõôüìáôï Ýëåã÷ï ãéá åíçìåñþóåéò\n"
+"ôï ïðïßï áðáéôåß ðñüóâáóç óôï Internet.\n"
+"\n"
+"ÈÝëåôå íá åíåñãïðïéÞóåôå áõôÞ ôç äõíáôüôçôá;"
+
+#: gui/updates-dialog.cpp:55
+msgid "(You can always enable it in the options dialog on the Misc tab)"
+msgstr ""
+"(Ìðïñåßôå ðÜíôá íá ôçí åíåñãïðïéÞóåôå óôï ðáñÜèõñï äéáëüãïõ ÅðéëïãÝò óôçí "
+"êáñôÝëá ÄéÜöïñá)"
+
+#: gui/updates-dialog.cpp:92
+msgid "Check for updates automatically"
+msgstr "Áõôüìáôïò Ýëåã÷ïò åíçìåñþóåùí"
+
+#: gui/updates-dialog.cpp:111
+msgid "Proceed"
+msgstr "Ðñï÷þñá"
+
+#: gui/widget.cpp:366 gui/widget.cpp:368 gui/widget.cpp:374 gui/widget.cpp:376
+msgid "Clear value"
+msgstr "ÓâÞóéìï ôéìÞò"
+
+#: base/main.cpp:253
+#, c-format
+msgid "Engine does not support debug level '%s'"
+msgstr "Ç ìç÷áíÞ äåí õðïóôçñßæåé åðßðåäï åíôïðéóìïý óöáëìÜôùí '%s'"
+
+#: base/main.cpp:327
+msgid "Menu"
+msgstr "Ìåíïý"
+
+#: base/main.cpp:330 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:333 backends/platform/symbian/src/SymbianActions.cpp:50
+#: backends/platform/wince/CEActionsPocket.cpp:42
+msgid "Pause"
+msgstr "Ðáýóç"
+
+#: base/main.cpp:336
+msgid "Skip line"
+msgstr "ÐáñÜëåéøç ãñáììÞò"
+
+#: base/main.cpp:547
+msgid "Error running game:"
+msgstr "ÓöÜëìá êáôÜ ôçí åêôÝëåóç ôïõ ðáé÷íéäéïý:"
+
+#: base/main.cpp:594
+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 "Ôï áíáãíùñéóôéêü ðáé÷íéäéïý äåí õðïóôçñßæåôáé"
+
+#: 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 saved games"
+msgstr "Ôï ðñüóèåôï ìç÷áíÞò äåí õðïóôçñßæåé áðïèçêåõìÝíá ðáé÷íßäéá"
+
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr "Ï ÷ñÞóôçò áêýñùóå"
+
+#: common/error.cpp:75
+msgid "Unknown error"
+msgstr "¶ãíùóôï óöÜëìá"
+
+#. I18N: Hercules is graphics card name
+#: common/rendermode.cpp:35
+msgid "Hercules Green"
+msgstr "ÐñÜóéíç Hercules"
+
+#: common/rendermode.cpp:36
+msgid "Hercules Amber"
+msgstr "Ðïñôïêáëß Hercules"
+
+#: common/rendermode.cpp:42
+msgid "PC-9821 (256 Colors)"
+msgstr "PC-9821 (256 ×ñþìáôá)"
+
+#: common/rendermode.cpp:43
+msgid "PC-9801 (16 Colors)"
+msgstr "PC-9801 (16 ×ñþìáôá)"
+
+#: common/rendermode.cpp:73
+msgctxt "lowres"
+msgid "Hercules Green"
+msgstr "ÐñÜóéíç Hercules"
+
+#: common/rendermode.cpp:74
+msgctxt "lowres"
+msgid "Hercules Amber"
+msgstr "Ðïñôïêáëß Hercules"
+
+#: common/updates.cpp:58
+msgid "Daily"
+msgstr "ÊáèçìåñéíÜ"
+
+#: common/updates.cpp:60
+msgid "Weekly"
+msgstr "Åâäïìáäéáßá"
+
+#: common/updates.cpp:62
+msgid "Monthly"
+msgstr "Ìçíéáßá"
+
+#: common/updates.cpp:64
+msgid "<Bad value>"
+msgstr "<ÅóöáëìÝíç ôéìÞ>"
+
+#: engines/advancedDetector.cpp:335
+#, c-format
+msgid ""
+"The game in '%s' seems to be unknown.\n"
+"Please, report the following data to the ScummVM team along with name\n"
+"of the game you tried to add and its version, language, etc.:"
+msgstr ""
+"Ôï ðáé÷íßäé óôï '%s' öáßíåôáé íá åßíáé Üãíùóôï.\n"
+"Ðáñáêáëïýìå, áíáöÝñåôå ôá áêüëïõèá óôïé÷åßá óôçí ïìÜäá ScummVM ìáæß ìå ôï "
+"üíïìá\n"
+"ôïõ ðáé÷íéäéïý ðïõ ðñïóðáèÞóáôå íá ðñïóèÝóåôå êáé ôçí Ýêäïóç, ôç ãëþóóá ôïõ, "
+"êëð.:"
+
+#: engines/dialogs.cpp:85
+msgid "~R~esume"
+msgstr "~Ó~õíÝ÷åéá"
+
+#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:96
+msgid "~L~oad"
+msgstr "~Ö~üñôùóç"
+
+#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:97
+msgid "~S~ave"
+msgstr "~Á~ðïèÞêåõóç"
+
+#: engines/dialogs.cpp:95
+msgid "~O~ptions"
+msgstr "~Å~ðéëïãÝò"
+
+#: engines/dialogs.cpp:100
+msgid "~H~elp"
+msgstr "~Â~ïÞèåéá"
+
+#: engines/dialogs.cpp:102
+msgid "~A~bout"
+msgstr "~Ð~åñß"
+
+#: engines/dialogs.cpp:105 engines/dialogs.cpp:181
+msgid "~R~eturn to Launcher"
+msgstr "Åðéó~ô~ñïöÞ óôïí ÏäçãçôÞ"
+
+#: engines/dialogs.cpp:107 engines/dialogs.cpp:183
+msgctxt "lowres"
+msgid "~R~eturn to Launcher"
+msgstr "Åðéó~ô~ñ. óôïí ÏäçãçôÞ"
+
+#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:761
+#: engines/avalanche/parser.cpp:1900 engines/cge/events.cpp:72
+#: engines/cge2/events.cpp:65 engines/cine/various.cpp:348
+#: engines/cruise/menu.cpp:212 engines/dm/loadsave.cpp:196
+#: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262
+#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
+#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
+#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
+#: engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
+#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
+#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
+msgid "Save game:"
+msgstr "ÁðïèÞêåõóç ðáé÷íéäéïý:"
+
+#: engines/dialogs.cpp:116 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
+#: engines/agi/saveload.cpp:761 engines/avalanche/parser.cpp:1900
+#: engines/cge/events.cpp:72 engines/cge2/events.cpp:65
+#: engines/cine/various.cpp:348 engines/cruise/menu.cpp:212
+#: engines/dm/loadsave.cpp:196 engines/drascula/saveload.cpp:364
+#: engines/dreamweb/saveload.cpp:262 engines/gnap/menu.cpp:464
+#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
+#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
+#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
+#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
+#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
+#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
+msgid "Save"
+msgstr "ÁðïèÞêåõóç"
+
+#: engines/dialogs.cpp:145
+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:234 engines/pegasus/pegasus.cpp:393
+#, c-format
+msgid ""
+"Failed to save game (%s)! Please consult the README for basic information, "
+"and for instructions on how to obtain further assistance."
+msgstr ""
+"Áðïôõ÷ßá áðïèÞêåõóçò ôïõ ðáé÷íéäéïý (%s)! Ðáñáêáëïýìå óõìâïõëåõôåßôå ôï "
+"áñ÷åßï README ãéá âáóéêÝò ðëçñïöïñßåò, êáèþò êáé ãéá ïäçãßåò ó÷åôéêÜ ìå ôï "
+"ðþò íá ëÜâåôå ðåñáéôÝñù âïÞèåéá."
+
+#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:100
+#: engines/tsage/dialogs.cpp:112
+msgid "~O~K"
+msgstr "~Ï~Ê"
+
+#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:101
+#: engines/tsage/dialogs.cpp:113
+msgid "~C~ancel"
+msgstr "~Á~êýñùóç"
+
+#: engines/dialogs.cpp:311
+msgid "~K~eys"
+msgstr "Ð~ë~Þêôñá"
+
+#: engines/engine.cpp:346
+msgid "Could not initialize color format."
+msgstr "Äåí Þôáí äõíáôÞ ç ðñïåôïéìáóßá ìïñöÞò ÷ñþìáôïò."
+
+#: engines/engine.cpp:354
+msgid "Could not switch to video mode: '"
+msgstr "Äåí Þôáí äõíáôÞ ç áëëáãÞ óå ëåéôïõñãßá ïèüíçò: '"
+
+#: engines/engine.cpp:363
+msgid "Could not apply aspect ratio setting."
+msgstr "Äåí Þôáí äõíáôÞ ç åöáñìïãÞ ñýèìéóçò äéüñèùóçò áíáëïãßáò äéáóôÜóåùí."
+
+#: engines/engine.cpp:368
+msgid "Could not apply fullscreen setting."
+msgstr "Äåí Þôáí äõíáôÞ ç åöáñìïãÞ ñýèìéóçò ðëÞñïõò ïèüíçò."
+
+#: engines/engine.cpp:373
+msgid "Could not apply filtering setting."
+msgstr "Äåí Þôáí äõíáôÞ ç åöáñìïãÞ ñýèìéóçò öéëôñáñßóìáôïò."
+
+#: engines/engine.cpp:473
+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:484
+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"
+"åíüò êáôÜëëçëïõ åñãáëåßïõ åîáãùãÞò Þ÷ïõ CD þóôå\n"
+"íá áêïýóåôå ôç ìïõóéêÞ ôïõ ðáé÷íéäéïý.\n"
+"Äåßôå ôï áñ÷åßï README ãéá ëåðôïìÝñåéåò."
+
+#: engines/engine.cpp:542
+#, c-format
+msgid ""
+"Failed to load saved game (%s)! Please consult the README for basic "
+"information, and for instructions on how to obtain further assistance."
+msgstr ""
+"Áðïôõ÷ßá öüñôùóçò áðïèçêåõìÝíïõ ðáé÷íéäéïý (%s)! Ðáñáêáëïýìå óõìâïõëåõôåßôå "
+"ôï áñ÷åßï README ãéá âáóéêÝò ðëçñïöïñßåò, êáèþò êáé ãéá ïäçãßåò ó÷åôéêÜ ìå "
+"ôï ðþò íá ëÜâåôå ðåñáéôÝñù âïÞèåéá."
+
+#: engines/engine.cpp:555
+msgid ""
+"WARNING: The game you are about to start is not yet fully supported by "
+"ScummVM. As such, it is likely to be unstable, and any saved game you make "
+"might not work in future versions of ScummVM."
+msgstr ""
+"ÐÑÏÓÏ×Ç: Ôï ðáé÷íßäé ðïõ èá îåêéíÞóåé, äåí õðïóôçñßæåôáé áêüìá ðëÞñùò áðü ôï "
+"ScummVM. Ùò åê ôïýôïõ, åßíáé ðéèáíü íá åßíáé áóôáèÝò, êáé êÜèå áðïèçêåõìÝíï "
+"ðáé÷íßäé ðïõ êÜíåôå ìðïñåß íá ìç ëåéôïõñãåß óå ìåëëïíôéêÝò åêäüóåéò ôïõ "
+"ScummVM."
+
+#: engines/engine.cpp:558
+msgid "Start anyway"
+msgstr "Åêêßíçóç ïýôùò Þ Üëëùò"
+
+#: audio/adlib.cpp:2290
+msgid "AdLib Emulator"
+msgstr "ÅîïìïéùôÞò Adlib"
+
+#: audio/fmopl.cpp:62
+msgid "MAME OPL emulator"
+msgstr "ÅîïìïéùôÞò MAME OPL"
+
+#: audio/fmopl.cpp:64
+msgid "DOSBox OPL emulator"
+msgstr "ÅîïìïéùôÞò DOSBox OPL"
+
+#: audio/fmopl.cpp:67
+msgid "ALSA Direct FM"
+msgstr "ALSA Direct FM"
+
+#: 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/mods/paula.cpp:196
+msgid "Amiga Audio Emulator"
+msgstr "ÅîïìïéùôÞò ¹÷ïõ Amiga"
+
+#: audio/null.h:44
+msgid "No music"
+msgstr "×ùñßò ìïõóéêÞ"
+
+#: audio/softsynth/appleiigs.cpp:33
+msgid "Apple II GS Emulator (NOT IMPLEMENTED)"
+msgstr "ÅîïìïéùôÞò Apple II GS (ÄÅÍ Å×ÅÉ ÕËÏÐÏÉÇÈÅÉ)"
+
+#: audio/softsynth/cms.cpp:350
+msgid "Creative Music System Emulator"
+msgstr "ÅîïìïéùôÞò Creative Music System"
+
+#: audio/softsynth/fmtowns_pc98/towns_pc98_plugins.cpp:33
+msgid "FM-Towns Audio"
+msgstr "¹÷ïò FM-Towns"
+
+#: audio/softsynth/fmtowns_pc98/towns_pc98_plugins.cpp:58
+msgid "PC-98 Audio"
+msgstr "¹÷ïò PC-98"
+
+#: audio/softsynth/mt32.cpp:175
+msgid "Initializing MT-32 Emulator"
+msgstr "Ðñïåôïéìáóßá ÅîïìïéùôÞ MT-32"
+
+#: audio/softsynth/mt32.cpp:437
+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"
+
+#: audio/softsynth/sid.cpp:1430
+msgid "C64 Audio Emulator"
+msgstr "ÅîïìïéùôÞò ¹÷ïõ C64"
+
+#: backends/cloud/storage.cpp:211
+msgid "Saved games sync complete."
+msgstr "Ï óõã÷ñïíéóìüò áðïèçêåõìÝíùí ðáé÷íéäéþí ïëïêëçñþèçêå."
+
+#: backends/cloud/storage.cpp:222
+msgid "Saved games sync was cancelled."
+msgstr "Ï óõã÷ñïíéóìüò áðïèçêåõìÝíùí ðáé÷íéäéþí áêõñþèçêå."
+
+#: backends/cloud/storage.cpp:224
+msgid ""
+"Saved games sync failed.\n"
+"Check your Internet connection."
+msgstr ""
+"Ï óõã÷ñïíéóìüò áðïèçêåõìÝíùí ðáé÷íéäéþí áðÝôõ÷å.\n"
+"ÅëÝãîôå ôç óýíäåóÞ óáò óôï Internet."
+
+#: backends/cloud/storage.cpp:328
+#, c-format
+msgid ""
+"Download complete.\n"
+"Failed to download %u files."
+msgstr ""
+"Ç ìåôáöüñôùóç ïëïêëçñþèçêå.\n"
+"Äåí Þôáí äõíáôÞ ç ìåôáöüñôùóç %u áñ÷åßùí."
+
+#: backends/cloud/storage.cpp:330
+msgid "Download complete."
+msgstr "Ç ìåôáöüñôùóç ïëïêëçñþèçêå."
+
+#: backends/cloud/storage.cpp:340
+msgid "Download failed."
+msgstr "Ç ìåôáöüñôùóç áðÝôõ÷å."
+
+#: backends/events/default/default-events.cpp:196
+msgid "Do you really want to return to the Launcher?"
+msgstr "ÈÝëåôå ðñáãìáôéêÜ íá åðéóôñÝøåôå óôïí ÐñïùèçôÞ;"
+
+#: backends/events/default/default-events.cpp:196
+msgid "Launcher"
+msgstr "ÐñïùèçôÞò"
+
+#: backends/events/default/default-events.cpp:218
+msgid "Do you really want to quit?"
+msgstr "Åßóôå óßãïõñïé üôé èÝëåôå íá âãåßôå áðü ôï ðñüãñáììá;"
+
+#: backends/events/default/default-events.cpp:218
+#: backends/platform/symbian/src/SymbianActions.cpp:52
+#: backends/platform/wince/CEActionsPocket.cpp:44
+#: backends/platform/wince/CEActionsSmartphone.cpp:52
+#: engines/scumm/dialogs.cpp:188 engines/scumm/help.cpp:83
+#: engines/scumm/help.cpp:85
+msgid "Quit"
+msgstr "¸îïäïò"
+
+#: backends/events/gph/gph-events.cpp:385
+#: backends/events/gph/gph-events.cpp:428
+#: backends/events/openpandora/op-events.cpp:168
+msgid "Touchscreen 'Tap Mode' - Left Click"
+msgstr "'Ëåéôïõñãßá Tap' ïèüíçò áöÞò - Áñéóôåñü Click"
+
+#: backends/events/gph/gph-events.cpp:387
+#: backends/events/gph/gph-events.cpp:430
+#: backends/events/openpandora/op-events.cpp:170
+msgid "Touchscreen 'Tap Mode' - Right Click"
+msgstr "'Ëåéôïõñãßá Tap' ïèüíçò áöÞò - Äåîß Click"
+
+#: backends/events/gph/gph-events.cpp:389
+#: backends/events/gph/gph-events.cpp:432
+#: backends/events/openpandora/op-events.cpp:172
+msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
+msgstr "'Ëåéôïõñãßá Tap' ïèüíçò áöÞò - Áéþñçóç (¼÷é Click)"
+
+#: backends/events/gph/gph-events.cpp:409
+msgid "Maximum Volume"
+msgstr "ÌÝãéóôç ¸íôáóç"
+
+#: backends/events/gph/gph-events.cpp:411
+msgid "Increasing Volume"
+msgstr "Áýîçóç ¸íôáóçò"
+
+#: backends/events/gph/gph-events.cpp:417
+msgid "Minimal Volume"
+msgstr "ÅëÜ÷éóôç ¸íôáóç"
+
+#: backends/events/gph/gph-events.cpp:419
+msgid "Decreasing Volume"
+msgstr "Ìåßùóç ¸íôáóçò"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:180
+msgid "Clicking Enabled"
+msgstr "ÅíåñãïðïéçìÝíï Clicking"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:180
+msgid "Clicking Disabled"
+msgstr "ÁðåíåñãïðïéçìÝíï Clicking"
+
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "'Ëåéôïõñãßá Tap' ïèüíçò áöÞò - Áéþñçóç (DPad Clicks)"
+
+#: backends/events/symbiansdl/symbiansdl-events.cpp:186
+msgid "Do you want to quit ?"
+msgstr "ÈÝëåôå íá âãåßôå áðü ôï ðñüãñáììá;"
+
+#. I18N: Trackpad mode toggle status.
+#: backends/events/webossdl/webossdl-events.cpp:308
+msgid "Trackpad mode is now"
+msgstr "Ç ëåéôïõñãßá trackpad åßíáé ôþñá"
+
+#. I18N: Trackpad mode on or off.
+#. I18N: Auto-drag on or off.
+#: backends/events/webossdl/webossdl-events.cpp:311
+#: backends/events/webossdl/webossdl-events.cpp:338
+msgid "ON"
+msgstr "ÅíåñãïðïéçìÝíç"
+
+#: backends/events/webossdl/webossdl-events.cpp:311
+#: backends/events/webossdl/webossdl-events.cpp:338
+msgid "OFF"
+msgstr "ÁðåíåñãïðïéçìÝíç"
+
+#: backends/events/webossdl/webossdl-events.cpp:315
+msgid "Swipe two fingers to the right to toggle."
+msgstr "ÐåñÜóôå äýï äÜ÷ôõëá ðñïò ôá äåîéÜ ãéá åíáëëáãÞ."
+
+#. I18N: Auto-drag toggle status.
+#: backends/events/webossdl/webossdl-events.cpp:335
+msgid "Auto-drag mode is now"
+msgstr "Ç ëåéôïõñãßá auto-drag åßíáé ôþñá"
+
+#: backends/events/webossdl/webossdl-events.cpp:342
+msgid "Swipe three fingers to the right to toggle."
+msgstr "ÐåñÜóôå ôñßá äÜ÷ôõëá ðñïò ôá äåîéÜ ãéá åíáëëáãÞ."
+
+#: backends/graphics/opengl/opengl-graphics.cpp:146
+msgid "OpenGL"
+msgstr "OpenGL"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:617
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2462
+msgid "Windowed mode"
+msgstr "Ëåéôïõñãßá ðáñáèýñïõ"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:710
+#, c-format
+msgid "Resolution: %dx%d"
+msgstr "ÁíÜëõóç: %dx%d"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:731
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2338
+msgid "Enabled aspect ratio correction"
+msgstr "ÅíåñãïðïéçìÝíç äéüñèùóç áíáëïãßáò äéáóôÜóåùí"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:733
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2344
+msgid "Disabled aspect ratio correction"
+msgstr "ÁðåíåñãïðïéçìÝíç äéüñèùóç áíáëïãßáò äéáóôÜóåùí"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:753
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2362
+msgid "Filtering enabled"
+msgstr "Åíåñãïðïßçóç öéëôñáñßóìáôïò"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:755
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2364
+msgid "Filtering disabled"
+msgstr "Áðåíåñãïðïßçóç öéëôñáñßóìáôïò"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:47
+#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
+#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
+msgid "Normal (no scaling)"
+msgstr "Êáíïíéêü (÷ùñßò êëéìÜêùóç)"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:66
+msgctxt "lowres"
+msgid "Normal (no scaling)"
+msgstr "Êáíïíéêü (÷ùñßò êëéìÜêùóç)"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2417
+msgid "Active graphics filter:"
+msgstr "Åíåñãü ößëôñï ãñáöéêþí:"
+
+#: backends/keymapper/remap-dialog.cpp:48
+msgid "Keymap:"
+msgstr "Áíôéóôïé÷ßóåéò ðëÞêôñùí:"
+
+#: backends/keymapper/remap-dialog.cpp:67
+msgid " (Effective)"
+msgstr " (Éó÷ýïí)"
+
+#: backends/keymapper/remap-dialog.cpp:107
+msgid " (Active)"
+msgstr " (Åíåñãü)"
+
+#: backends/keymapper/remap-dialog.cpp:107
+msgid " (Blocked)"
+msgstr " (ÁðïêëåéóìÝíï)"
+
+#: backends/keymapper/remap-dialog.cpp:120
+msgid " (Global)"
+msgstr " (Ïëéêü)"
+
+#: backends/keymapper/remap-dialog.cpp:128
+msgid " (Game)"
+msgstr " (Ðáé÷íßäé)"
+
+#: backends/midi/windows.cpp:165
+msgid "Windows MIDI"
+msgstr "Windows MIDI"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:56
+#: engines/scumm/dialogs.cpp:287
+msgid "~C~lose"
+msgstr "~Ê~ëåßóéìï"
+
+#: 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 "~×~åéñéóìïß ìÜ÷çò ºíôõ"
+
+#: 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 "Ìåôáôüðéóç ÁöÞò ×"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:75
+msgid "Touch Y Offset"
+msgstr "Ìåôáôüðéóç ÁöÞò Ø"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:87
+msgid "Use laptop trackpad-style cursor control"
+msgstr "×ñÞóç åëÝã÷ïõ äñïìÝá ôýðïõ laptop trackpad"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:88
+msgid "Tap for left click, double tap right click"
+msgstr "ÐáôÞóôå ãéá áñéóôåñü click, ðáôÞóôå äéðëÜ ãéá äåîß click"
+
+#: 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/ios7/ios7_osys_events.cpp:309
+#: backends/platform/ios7/ios7_osys_events.cpp:519
+#: backends/platform/iphone/osys_events.cpp:300
+msgid "Mouse-click-and-drag mode enabled."
+msgstr "Åíåñãïðïßçóç ëåéôïõñãßáò ðïíôéêéïý click-and-drag."
+
+#: backends/platform/ios7/ios7_osys_events.cpp:311
+#: backends/platform/ios7/ios7_osys_events.cpp:521
+#: backends/platform/iphone/osys_events.cpp:302
+msgid "Mouse-click-and-drag mode disabled."
+msgstr "Áðåíåñãïðïßçóç ëåéôïõñãßáò ðïíôéêéïý click-and-drag."
+
+#: backends/platform/ios7/ios7_osys_events.cpp:322
+#: backends/platform/ios7/ios7_osys_events.cpp:540
+#: backends/platform/iphone/osys_events.cpp:313
+msgid "Touchpad mode enabled."
+msgstr "Ëåéôïõñãßá Touchpad åíåñãïðïéçìÝíç."
+
+#: backends/platform/ios7/ios7_osys_events.cpp:324
+#: backends/platform/ios7/ios7_osys_events.cpp:542
+#: backends/platform/iphone/osys_events.cpp:315
+msgid "Touchpad mode disabled."
+msgstr "Ëåéôïõñãßá Touchpad áðåíåñãïðïéçìÝíç."
+
+#: backends/platform/maemo/maemo.cpp:208
+msgid "Click Mode"
+msgstr "Ëåéôïõñãßá Click"
+
+#: backends/platform/maemo/maemo.cpp:214
+#: backends/platform/symbian/src/SymbianActions.cpp:42
+#: backends/platform/tizen/form.cpp:275
+#: backends/platform/wince/CEActionsPocket.cpp:60
+#: backends/platform/wince/CEActionsSmartphone.cpp:43
+msgid "Left Click"
+msgstr "Áñéóôåñü Click"
+
+#: backends/platform/maemo/maemo.cpp:217
+msgid "Middle Click"
+msgstr "Ìåóáßï Click"
+
+#: backends/platform/maemo/maemo.cpp:220
+#: backends/platform/symbian/src/SymbianActions.cpp:43
+#: backends/platform/tizen/form.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:44
+msgid "Right Click"
+msgstr "Äåîß Click"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+msgid "Hide ScummVM"
+msgstr "Áðüêñõøç ScummVM"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:93
+msgid "Hide Others"
+msgstr "Áðüêñõøç ¶ëëùí"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:98
+msgid "Show All"
+msgstr "ÐñïâïëÞ üëùí"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
+#: backends/platform/sdl/macosx/appmenu_osx.mm:131
+msgid "Window"
+msgstr "ÐáñÜèõñï"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:125
+msgid "Minimize"
+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/platform/tizen/form.cpp:263
+msgid "Right Click Once"
+msgstr "Äåîß Click Ìéá ÖïñÜ"
+
+#: backends/platform/tizen/form.cpp:271
+msgid "Move Only"
+msgstr "Ìüíï Ìåôáêßíçóç"
+
+#: backends/platform/tizen/form.cpp:294
+msgid "Escape Key"
+msgstr "ÐëÞêôñï Escape"
+
+#: backends/platform/tizen/form.cpp:299
+msgid "Game Menu"
+msgstr "Ìåíïý Ðáé÷íéäéïý"
+
+#: backends/platform/tizen/form.cpp:304
+msgid "Show Keypad"
+msgstr "ÐñïâïëÞ Áñéèìçôéêïý Ðëçêôñïëïãßïõ"
+
+#: backends/platform/tizen/form.cpp:309
+msgid "Control Mouse"
+msgstr "¸ëåã÷ïò Ðïíôéêéïý"
+
+#: backends/platform/tizen/fs.cpp:259
+msgid "[ Data ]"
+msgstr "[ ÄåäïìÝíá ]"
+
+#: backends/platform/tizen/fs.cpp:263
+msgid "[ Resources ]"
+msgstr "[ Ðüñïé ]"
+
+#: backends/platform/tizen/fs.cpp:267
+msgid "[ SDCard ]"
+msgstr "[ ÊÜñôá SD ]"
+
+#: backends/platform/tizen/fs.cpp:271
+msgid "[ Media ]"
+msgstr "[ ÌÝóá ]"
+
+#: backends/platform/tizen/fs.cpp:275
+msgid "[ Shared ]"
+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 "Ïñéæüíôéá ÕðïóÜñùóç:"
+
+#: backends/platform/wii/options.cpp:66
+msgid "Vertical underscan:"
+msgstr "ÊÜèåôç ÕðïóÜñùóç:"
+
+#: backends/platform/wii/options.cpp:71
+msgid "Input"
+msgstr "Åßóïäïò"
+
+#: backends/platform/wii/options.cpp:74
+msgid "GC Pad sensitivity:"
+msgstr "Åõáéóèçóßá GC Pad:"
+
+#: backends/platform/wii/options.cpp:80
+msgid "GC Pad acceleration:"
+msgstr "ÅðéôÜ÷õíóç GC Pad:"
+
+#: 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: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 "Äåîß click"
+
+#: 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:516
+msgid "Map right click action"
+msgstr "Áíôéóôïß÷éóç åíÝñãåéáò äåîß click"
+
+#: backends/platform/wince/wince-sdl.cpp:520
+msgid "You must map a key to the 'Right Click' action to play this game"
+msgstr ""
+"Èá ðñÝðåé íá áíôéóôïé÷ßóåôå Ýíá ðëÞêôñï óôçí åíÝñãåéá \"Äåîß click\" ãéá íá "
+"ðáßîåôå áõôü ôï ðáé÷íßäé"
+
+#: backends/platform/wince/wince-sdl.cpp:529
+msgid "Map hide toolbar action"
+msgstr "Áíôéóôïß÷éóç åíÝñãåéáò áðüêñõøçò ãñáììÞò åñãáëåßùí"
+
+#: backends/platform/wince/wince-sdl.cpp:533
+msgid "You must map a key to the 'Hide toolbar' action to play this game"
+msgstr ""
+"Èá ðñÝðåé íá áíôéóôïé÷ßóåôå Ýíá ðëÞêôñï óôçí åíÝñãåéá \"Áðüêñõøç ãñáììÞò "
+"åñãáëåßùí\" ãéá íá ðáßîåôå áõôü ôï ðáé÷íßäé"
+
+#: backends/platform/wince/wince-sdl.cpp:542
+msgid "Map Zoom Up action (optional)"
+msgstr "ÅíÝñãåéá ìåãÝèõíóçò ÷Üñôç (ðñïáéñåôéêü)"
+
+#: backends/platform/wince/wince-sdl.cpp:545
+msgid "Map Zoom Down action (optional)"
+msgstr "ÅíÝñãåéá óìßêñõíóçò ÷Üñôç (ðñïáéñåôéêü)"
+
+#: backends/platform/wince/wince-sdl.cpp:553
+msgid ""
+"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory"
+msgstr ""
+"Ìçí îå÷Üóåôå íá áíôéóôïé÷ßóåôå Ýíá ðëÞêôñï ãéá ôçí åíÝñãåéá \"Áðüêñõøç "
+"ÃñáììÞò Åñãáëåßùí\" ãéá íá äåßôå üëá ôá áíôéêåßìåíá"
+
+#: backends/updates/macosx/macosx-updates.mm:79
+msgid "Check for Updates..."
+msgstr "¸ëåã÷ïò Åíçìåñþóåùí..."
+
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr "Äåí Þôáí äõíáôÞ ç åýñåóç ôïõ áñ÷åßïõ ðáé÷íéäéïý '%s'."
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr "Ôï áñ÷åéï ðáé÷íéäéïý '%s' åßíáé êáôåóôñáììÝíï."
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+"ÂñÝèçêå ëáíèáóìÝíç Ýêäïóç ôïõ '%s' áñ÷åßïõ ðáé÷íéäéïý. Áíáìåíüìåíç %d.%d "
+"áëëÜ âñÝèçêå ç %d.%d."
+
+#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
+msgid "Color mode"
+msgstr "Ëåéôïõñãßá ÷ñþìáôïò"
+
+#: engines/adl/detection.cpp:46 engines/adl/detection.cpp:56
+msgid "Use color graphics"
+msgstr "×ñÞóç Ýã÷ñùìùí ãñáöéêþí"
+
+#: engines/adl/detection.cpp:65
+msgid "Scanlines"
+msgstr "ÃñáììÝò óÜñùóçò"
+
+#: engines/adl/detection.cpp:66
+msgid "Show scanlines"
+msgstr "ÐñïâïëÞ ãñáììþí óÜñùóçò"
+
+#: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70
+#: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:48
+#: engines/neverhood/detection.cpp:177 engines/sci/detection.cpp:430
+#: engines/sherlock/detection.cpp:71 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection_tables.h:51
+msgid "Use original save/load screens"
+msgstr "×ñÞóç áñ÷éêþí ïèïíþí áðïèÞêåõóçò/öüñôùóçò"
+
+#: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71
+#: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:49
+#: engines/neverhood/detection.cpp:178 engines/sci/detection.cpp:431
+#: engines/sherlock/detection.cpp:72 engines/toltecs/detection.cpp:201
+msgid "Use the original save/load screens instead of the ScummVM ones"
+msgstr ""
+"×ñÞóç ôùí áñ÷éêþí ïèïíþí áðïèÞêåõóçò/öüñôùóçò áíôß ãéá áõôÝò ôïõ ScummVM"
+
+#: engines/agi/detection.cpp:157
+msgid "Use an alternative palette"
+msgstr "×ñÞóç åíáëëáêôéêÞò ðáëÝôáò"
+
+#: engines/agi/detection.cpp:158
+msgid ""
+"Use an alternative palette, common for all Amiga games. This was the old "
+"behavior"
+msgstr ""
+"×ñÞóç åíáëëáêôéêÞò ðáëÝôáò, êïéíÞò ãéá üëá ôá ðáé÷íßäéá Amiga. ÁõôÞ Þôáí ç "
+"ðáëéÜ óõìðåñéöïñÜ"
+
+#: engines/agi/detection.cpp:167
+msgid "Mouse support"
+msgstr "ÕðïóôÞñéîç ðïíôéêéïý"
+
+#: engines/agi/detection.cpp:168
+msgid ""
+"Enables mouse support. Allows to use mouse for movement and in game menus."
+msgstr ""
+"Åíåñãïðïßçóç ôçò õðïóôÞñéîçò ôïõ ðïíôéêéïý. ÅðéôñÝðåé ôç ÷ñÞóç ôïõ ðïíôéêéïý "
+"ãéá êßíçóç êáé ôá ìåíïý ôïõ ðáé÷íéäéïý."
+
+#: engines/agi/detection.cpp:177
+msgid "Use Hercules hires font"
+msgstr "×ñÞóç ãñáììáôïóåéñÜò Hercules õøçëÞò åõêñßíåéáò"
+
+#: engines/agi/detection.cpp:178
+msgid "Uses Hercules hires font, when font file is available."
+msgstr ""
+"×ñÞóç ãñáììáôïóåéñÜò Hercules õøçëÞò åõêñßíåéáò, üôáí ç ãñáììáôïóåéñÜ åßíáé "
+"äéáèÝóéìç."
+
+#: engines/agi/detection.cpp:187
+msgid "Pause when entering commands"
+msgstr "Ðáýóç êáôÜ ôçí åéóáãùãÞ åíôïëþí"
+
+#: engines/agi/detection.cpp:188
+msgid ""
+"Shows a command prompt window and pauses the game (like in SCI) instead of a "
+"real-time prompt."
+msgstr ""
+"Åìöáíßæåé Ýíá ðáñÜèõñï ãñáììÞò åíôïëþí êáé ðáýåé ôï ðáé÷íßäé (üðùò êáé ôï "
+"SCI) áíôß ôçò ãñáììÞò åíôïëþí ðñáãìáôéêïý ÷ñüíïõ."
+
+#: engines/agi/saveload.cpp:774 engines/avalanche/parser.cpp:1888
+#: engines/cge/events.cpp:83 engines/cge2/events.cpp:76
+#: engines/cine/various.cpp:359 engines/dm/dm.cpp:269
+#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
+#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
+#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
+#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
+msgid "Restore game:"
+msgstr "ÅðáíáöïñÜ ðáé÷íéäéïý:"
+
+#: engines/agi/saveload.cpp:774 engines/avalanche/parser.cpp:1888
+#: engines/cge/events.cpp:83 engines/cge2/events.cpp:76
+#: engines/cine/various.cpp:359 engines/dm/dm.cpp:269
+#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
+#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
+#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
+#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
+msgid "Restore"
+msgstr "ÅðáíáöïñÜ"
+
+#: engines/agos/saveload.cpp:159 engines/scumm/scumm.cpp:2436
+#, c-format
+msgid ""
+"Failed to load saved game from file:\n"
+"\n"
+"%s"
+msgstr ""
+"Áðïôõ÷ßá öüñôùóçò ðáé÷íéäéïý áðü ôï áñ÷åßï:\n"
+"\n"
+"%s"
+
+#: engines/agos/saveload.cpp:194 engines/scumm/scumm.cpp:2429
+#, c-format
+msgid ""
+"Failed to save game to file:\n"
+"\n"
+"%s"
+msgstr ""
+"Áðïôõ÷ßá áðïèÞêåõóçò ðáé÷íéäéïý óôï áñ÷åßï:\n"
+"\n"
+"%s"
+
+#: engines/agos/saveload.cpp:202 engines/scumm/scumm.cpp:2447
+#, c-format
+msgid ""
+"Successfully saved game in file:\n"
+"\n"
+"%s"
+msgstr ""
+"Åðéôõ÷Þò áðïèÞêåõóç ðáé÷íéäéïý óôï áñ÷åßï:\n"
+"\n"
+"%s"
+
+#: engines/agos/animation.cpp:558
+#, c-format
+msgid "Cutscene file '%s' not found!"
+msgstr "Äåí âñÝèçêå ôï áñ÷åßï åíäéÜìåóçò óêçíÞò (cutscene) '%s' !"
+
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:101
+msgid "Color Blind Mode"
+msgstr "Ëåéôïõñãßá ãéá ¶ôïìá ìå Á÷ñùìáôïøßá"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:102
+msgid "Enable Color Blind Mode by default"
+msgstr "Åíåñãïðïßçóç ëåéôïõñãßáò ãéá ¶ôïìá ìå Á÷ñùìáôïøßá åî'ïñéóìïý"
+
+#: engines/drascula/saveload.cpp:47
+msgid ""
+"ScummVM found that you have old saved games for Drascula that should be "
+"converted.\n"
+"The old saved 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 äéáðßóôùóå üôé Ý÷åôå ðáëéÜ áðïèçêåõìÝíá ðáé÷íßäéá ãéá ôï Drascula "
+"ðïõ èá ðñÝðåé íá ìåôáôñáðïýí.\n"
+"Ç ðáëéÜ áðïèçêåõìÝíç ìïñöÞ ðáé÷íéäéþí äåí õðïóôçñßæåôáé ðëÝïí, ïðüôå äå èá "
+"åßóôå óå èÝóç íá öïñôþóåôå ôá ðáé÷íßäéá óáò, áí äåí ôá ìåôáôñÝøåôå.\n"
+"\n"
+"ÐáôÞóôå OK ãéá íá ôá ìåôáôñÝøåôå ôþñá, áëëéþò èá óáò æçôçèåß îáíÜ ôçí "
+"åðüìåíç öïñÜ ðïõ èá îåêéíÞóåôå ôï ðáé÷íßäé.\n"
+
+#: engines/dreamweb/detection.cpp:58
+msgid "Use bright palette mode"
+msgstr "×ñÞóç ëáìðåñÞò ðáëÝôáò"
+
+#: engines/dreamweb/detection.cpp:59
+msgid "Display graphics using the game's bright palette"
+msgstr "ÐñïâïëÞ ãñáöéêþí ìå ÷ñÞóç ôçò ëáìðåñÞò ðáëÝôáò ôïõ ðáé÷íéäéïý"
+
+#: engines/gob/inter_playtoons.cpp:255 engines/gob/inter_v2.cpp:1467
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
+msgid "Failed to load saved game from file."
+msgstr "Ç áíÜãíùóç áðïèçêåõìÝíïõ ðáé÷íéäéïý áðü áñ÷åßï áðÝôõ÷å."
+
+#: engines/gob/inter_v2.cpp:1537 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
+msgid "Failed to save game to file."
+msgstr "Ç åããñáöÞ áðïèçêåõìÝíïõ ðáé÷íéäéïý óå áñ÷åßï áðÝôõ÷å."
+
+#: engines/gob/inter_v5.cpp:107
+msgid "Failed to delete file."
+msgstr "Ç äéáãñáöÞ ôïõ áñ÷åßïõ áðÝôõ÷å."
+
+#: engines/groovie/detection.cpp:312
+msgid "Fast movie speed"
+msgstr "ÃñÞãïñç ôá÷ýôçôá ôáéíéþí"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "ÁíáðáñáãùãÞ ôáéíéþí ìå áõîçìÝíç ôá÷ýôçôá"
+
+#: engines/groovie/script.cpp:407
+msgid "Failed to save game"
+msgstr "Áäõíáìßá áðïèÞêåõóçò ðáé÷íéäéïý"
+
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr "Ëåéôïõñãßá Áßìáôïò"
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+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 "ÑáâäïãñÜììáôá HP"
+
+#: engines/kyra/detection.cpp:128
+msgid "Enable hit point bar graphs"
+msgstr "Åíåñãïðïßçóç ñáâäïãñáììÜôùí ãéá hit points"
+
+#: engines/kyra/eobcommon.cpp:331 engines/kyra/lol.cpp:481
+msgid "Move Forward"
+msgstr "Ðñï÷þñçóå ÌðñïóôÜ"
+
+#: engines/kyra/eobcommon.cpp:332 engines/kyra/lol.cpp:482
+msgid "Move Back"
+msgstr "Ðñï÷þñçóå Ðßóù"
+
+#: engines/kyra/eobcommon.cpp:333
+msgid "Move Left"
+msgstr "Ðñï÷þñçóå ÁñéóôåñÜ"
+
+#: engines/kyra/eobcommon.cpp:334
+msgid "Move Right"
+msgstr "Ðñï÷þñçóå ÄåîéÜ"
+
+#: engines/kyra/eobcommon.cpp:335 engines/kyra/lol.cpp:485
+#: engines/pegasus/pegasus.cpp:2509
+msgid "Turn Left"
+msgstr "Óôñßøå ÁñéóôåñÜ"
+
+#: engines/kyra/eobcommon.cpp:336 engines/kyra/lol.cpp:486
+#: engines/pegasus/pegasus.cpp:2510
+msgid "Turn Right"
+msgstr "Óôñßøå ÄåîéÜ"
+
+#: engines/kyra/eobcommon.cpp:337
+msgid "Open/Close Inventory"
+msgstr "¶íïéãìá/Êëåßóéìï ÁíôéêåéìÝíùí"
+
+#: engines/kyra/eobcommon.cpp:338
+msgid "Switch Inventory/Character screen"
+msgstr "ÅíáëëáãÞ ïèüíçò ÁíôéêåéìÝíùí/×áñáêôÞñùí"
+
+#: engines/kyra/eobcommon.cpp:339
+msgid "Camp"
+msgstr "ÊáôáóêÞíùóå"
+
+#: engines/kyra/eobcommon.cpp:340
+msgid "Cast Spell"
+msgstr "ÊÜíå Îüñêé"
+
+#: engines/kyra/eobcommon.cpp:343
+msgid "Spell Level 1"
+msgstr "Îüñêé ÅðéðÝäïõ 1"
+
+#: engines/kyra/eobcommon.cpp:344
+msgid "Spell Level 2"
+msgstr "Îüñêé ÅðéðÝäïõ 2"
+
+#: engines/kyra/eobcommon.cpp:345
+msgid "Spell Level 3"
+msgstr "Îüñêé ÅðéðÝäïõ 3"
+
+#: engines/kyra/eobcommon.cpp:346
+msgid "Spell Level 4"
+msgstr "Îüñêé ÅðéðÝäïõ 4"
+
+#: engines/kyra/eobcommon.cpp:347
+msgid "Spell Level 5"
+msgstr "Îüñêé ÅðéðÝäïõ 5"
+
+#: engines/kyra/eobcommon.cpp:356
+msgid "Spell Level 6"
+msgstr "Îüñêé ÅðéðÝäïõ 6"
+
+#: 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:483
+msgid "Slide Left"
+msgstr "Ïëßóèçóç ÁñéóôåñÜ"
+
+#: engines/kyra/lol.cpp:484
+msgid "Slide 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: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 ""
+"Öáßíåôáé ðùò ÷ñçóéìïðïéåßôå ìéá óõóêåõÞ General MIDI,\n"
+"áëëÜ ôï ðáé÷íßäé óáò õðïóôçñßæåé ìüíï Roland MT32 MIDI.\n"
+"Ðñïóðáèïýìå íá ÷áñôïãñáöÞóïõìå ôá üñãáíá ôçò\n"
+"Roland MT32 óå áõôÜ ôïõ General MIDI. Åßíáé ðéèáíü üôé\n"
+"ïñéóìÝíá êïììÜôéá èá áêïýãïíôáé åóöáëìÝíá."
+
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original saved game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this saved game file with ScummVM?\n"
+"\n"
+msgstr ""
+"Ôï áêüëïõèï áðïèçêåõìÝíï áñ÷åßï ôïõ áñ÷éêïý ðáé÷íéäéïý Ý÷åé âñåèåß óôï "
+"öÜêåëï ôïõ ðáé÷íéäéïý óáò:\n"
+"\n"
+"%s %s\n"
+"\n"
+"ÈÝëåôå íá ÷ñçóéìïðïéÞóåôå áõôü ôï áðïèçêåõìÝíï áñ÷åßï ðáé÷íéäéïý ìå ôï "
+"ScummVM;\n"
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A saved game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+"¸íá áðïèçêåõìÝíï áñ÷åßï ðáé÷íéäéïý âñÝèçêå óôçí åðéëåãìÝíç èõñßäá %d. "
+"ÁíôéêáôÜóôáóç;\n"
+"\n"
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original saved games have been successfully imported into\n"
+"ScummVM. If you want to manually import original saved game later you will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+"%d ðñùôüôõðá áðïèçêåõìÝíá áñ÷åßá ðáé÷íéäéïý åéóÞ÷èçóáí åðéôõ÷þò óôï\n"
+"ScummVM. Áí áñãüôåñá èåëÞóåôå íá åéóÜãåôå ðñùôüôõðá áðïèçêåõìÝíá áñ÷åßá \n"
+"ðáé÷íéäéïý ÷åéñïêßíçôá, èá ÷ñåéáóôåß íá áíïéîåôå ôï ôåñìáôéêü "
+"áðïóöáëìÜôùóçò \n"
+"(debug console) ôïõ ScummVM êáé íá ÷ñçóéìïðïéÞóåôå ôçí åíôïëÞ "
+"'import_savefile'.\n"
+
+#: engines/mads/detection.cpp:91
+msgid "Easy mouse interface"
+msgstr "Åýêïëç äéåðáöÞ ðïíôéêéïý"
+
+#: engines/mads/detection.cpp:92
+msgid "Shows object names when hovering the mouse over them"
+msgstr ""
+"Åìöáíßæåé ôá ïíüìáôá ôùí áíôéêåéìÝíùí üôáí áéùñåßôáé ôï ðïíôßêé ðÜíù ôïõò"
+
+#: engines/mads/detection.cpp:101 engines/mads/detection.cpp:102
+msgid "Animated inventory items"
+msgstr "Êéíïýìåíá áíôéêåßìåíá"
+
+#: engines/mads/detection.cpp:111 engines/mads/detection.cpp:112
+msgid "Animated game interface"
+msgstr "Êéíïýìåíç äéåðáöÞ ðáé÷íéäéïý"
+
+#: engines/mads/detection.cpp:121 engines/mads/detection.cpp:122
+msgid "Naughty game mode"
+msgstr "Ëåéôïõñãßá ðáé÷íéäéïý ãéá Üôáêôïõò"
+
+#: engines/mohawk/detection.cpp:169
+msgid "Play the Myst fly by movie"
+msgstr "ÁíáðáñáãùãÞ ôçò ôáéíßáò åíáÝñéáò åðéóêüðçóçò ôïõ Myst"
+
+#: engines/mohawk/detection.cpp:170
+msgid "The Myst fly by movie was not played by the original engine."
+msgstr ""
+"Ç ôáéíßá åíáÝñéáò åðéóêüðçóçò ôïõ Myst äåí áíáðáñÜ÷èçêå áðü ôçí ðñùôüôõðç "
+"ìç÷áíÞ."
+
+#. I18N: Option for fast scene switching
+#: engines/mohawk/dialogs.cpp:181 engines/mohawk/dialogs.cpp:267
+msgid "~Z~ip Mode Activated"
+msgstr "Ëåéôïõñãßá ~Z~ip ÅíåñãïðïéçìÝíç"
+
+#: engines/mohawk/dialogs.cpp:182
+msgid "~T~ransitions Enabled"
+msgstr "~Ì~åôáâÜóåéò ÅíåñãïðïéçìÝíåò"
+
+#. I18N: Drop book page
+#: engines/mohawk/dialogs.cpp:184
+msgid "~D~rop Page"
+msgstr "~Ñ~ßîéìï Óåëßäáò"
+
+#: engines/mohawk/dialogs.cpp:188
+msgid "Show ~M~ap"
+msgstr "ÅìöÜíéóç ~×~Üñôç"
+
+#: engines/mohawk/dialogs.cpp:194
+msgid "Main Men~u~"
+msgstr "Êåíôñéêü Ìåíï~ý~"
+
+#: engines/mohawk/dialogs.cpp:268
+msgid "~W~ater Effect Enabled"
+msgstr "ÅöÝ ~Í~åñïý ÅíåñãïðïéçìÝíï"
+
+#: engines/mohawk/riven.cpp:150
+msgid ""
+"You're missing a Riven executable. The Windows executable is 'riven.exe' or "
+"'rivendmo.exe'. "
+msgstr ""
+"Ëåßðåé ôï åêôåëÝóéìï ôïõ Riven. Ôï åêôåëÝóéìï ãéá Windows åßíáé 'riven.exe' "
+"Þ 'rivendemo.exe'. "
+
+#: engines/mohawk/riven.cpp:151
+msgid ""
+"Using the 'arcriven.z' installer file also works. In addition, you can use "
+"the Mac 'Riven' executable."
+msgstr ""
+"Ç ÷ñÞóç ôïõ áñ÷åßïõ åãêáôÜóôáóçò 'arcriven.z' ëåéôïõñãåß åðßóçò. ÅðéðëÝïí, "
+"ìðïñåßôå íá ÷ñçóéìïðïéÞóåôå ôï åêôåëÝóéìï ôïõ Mac 'Riven'."
+
+#: engines/mohawk/riven.cpp:162
+msgid ""
+"You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also "
+"works."
+msgstr ""
+"Óáò ëåßðåé ôï 'extras.mhk'. Ç ÷ñÞóç ôïõ áñ÷åßïõ åãêáôÜóôáóçò 'arcriven.z' "
+"ëåéôïõñãåß åðßóçò."
+
+#: engines/mohawk/riven_external.cpp:213
+msgid ""
+"Exploration beyond this point available only within the full version of\n"
+"the game."
+msgstr ""
+"Ç åîåñåýíçóç ðÝñá áðü áõôü ôï óçìåßï åßíáé äéáèÝóéìç ìüíï ìÝóù ôçò\n"
+"ðëÞñïõò Ýêäïóçò ôïõ ðáé÷íéäéïý."
+
+#: engines/mohawk/riven_external.cpp:655
+msgid ""
+"At this point, the Riven Demo would\n"
+"ask if you would like to open a web browser\n"
+"to bring you to the Red Orb store to buy\n"
+"the game. ScummVM cannot do that and\n"
+"the site no longer exists."
+msgstr ""
+"Óå áõôü ôï óçìåßï, ç äïêéìáóôéêÞ Ýêäïóç ôïõ Riven\n"
+"èá óáò ñùôïýóå áí èÝëåôå íá áíïßîåôå Ýíá öõëëïìåôñçôÞ\n"
+"ãéá íá ìåôáâåßôå óôï çëåêôñïíéêü êáôÜóôçìá ôçò Red Orb\n"
+"ãéá íá áãïñÜóåôå ôï ðáé÷íßäé. Ôï ScummVM äå ìðïñåß íá\n"
+"ôï êÜíåé áõôü êáé ç éóôïóåëßäá äåí õðÜñ÷åé ðëÝïí."
+
+#: engines/mohawk/mohawk.cpp:61
+msgid "The game is paused. Press any key to continue."
+msgstr ""
+"Ôï ðáé÷íßäé âñßóêåôáé óå ðáýóç. ÐáôÞóôå ïðïéïäÞðïôå êïõìðß ãéá íá óõíå÷ßóåôå."
+
+#: engines/neverhood/detection.cpp:184
+msgid "Skip the Hall of Records storyboard scenes"
+msgstr "ÐáñÜëåéøç åéêïíïãñáöçìÝíùí óêçíþí ôçò Áßèïõóáò ôùí Áñ÷åßùí"
+
+#: engines/neverhood/detection.cpp:185
+msgid "Allows the player to skip past the Hall of Records storyboard scenes"
+msgstr ""
+"ÅðéôñÝðåé óôïí ðáßêôç íá ðáñáëåßøåé ôçí åìöÜíéóç ôùí åéêïíïãñáöçìÝíùí óêçíþí "
+"ôçò Áßèïõóáò ôùí Áñ÷åßùí"
+
+#: engines/neverhood/detection.cpp:191
+msgid "Scale the making of videos to full screen"
+msgstr "ÊëéìÜêùóç ôùí ôáéíéþí äçìéïõñãßáò óå ðëÞñç ïèüíç"
+
+#: engines/neverhood/detection.cpp:192
+msgid "Scale the making of videos, so that they use the whole screen"
+msgstr "ÊëéìÜêùóç ôùí ôáéíéþí äçìéïõñãßáò, þóôå íá êáôáëáìâÜíïõí üëç ôçí ïèüíç"
+
+#: engines/parallaction/saveload.cpp:130
+#, c-format
+msgid ""
+"Can't save game in slot %i\n"
+"\n"
+msgstr ""
+"Äåí Þôáí äõíáôÞ ç áðïèÞêåõóç ðáé÷íéäéïý óôç èõñßäá %i\n"
+"\n"
+
+#: engines/parallaction/saveload.cpp:194
+msgid "Load file"
+msgstr "Öüñôùóç áñ÷åßïõ"
+
+#: engines/parallaction/saveload.cpp:201
+msgid "Loading game..."
+msgstr "Öüñôùóç ðáé÷íéäéïý..."
+
+#: engines/parallaction/saveload.cpp:209
+msgid "Save file"
+msgstr "ÁðïèÞêåõóç áñ÷åßïõ"
+
+#: engines/parallaction/saveload.cpp:216
+msgid "Saving game..."
+msgstr "ÁðïèÞêåõóç ðáé÷íéäéïý..."
+
+#: engines/parallaction/saveload.cpp:269
+msgid ""
+"ScummVM found that you have old saved games 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"
+"ÐáôÞóôå OK ãéá íá ôá ìåôáôñÝøåôå ôþñá, áëëéþò èá óáò æçôçèåß ôçí åðüìåíç "
+"öïñÜ.\n"
+
+#: engines/parallaction/saveload.cpp:316
+msgid "ScummVM successfully converted all your saved games."
+msgstr "Ôï ScummVM ìåôÜôñåøå åðéôõ÷þò üëá ôá áðïèçêåõìÝíá ðáé÷íßäéá óáò."
+
+#: engines/parallaction/saveload.cpp:318
+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"
+"Ðáñáêáëïýìå áíáöÝñåôå óôçí ïìÜäá."
+
+#: engines/pegasus/pegasus.cpp:714
+msgid "Invalid file name for saving"
+msgstr "ÅóöáëìÝíï üíïìá áñ÷åßïõ ãéá áðïèÞêåõóç"
+
+#: engines/pegasus/pegasus.cpp:2507
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "ÐÜíù/ÌåãÝèõíóç/Ìåôáêßíçóç Åìðñüò/¶íïéãìá Èõñþí"
+
+#: engines/pegasus/pegasus.cpp:2508
+msgid "Down/Zoom Out"
+msgstr "ÊÜôù/Óìßêñõíóç"
+
+#: engines/pegasus/pegasus.cpp:2511
+msgid "Display/Hide Inventory Tray"
+msgstr "ÅìöÜíéóç/Áðüêñõøç Äßóêïõ ÁíôéêåéìÝíùí"
+
+#: engines/pegasus/pegasus.cpp:2512
+msgid "Display/Hide Biochip Tray"
+msgstr "ÅìöÜíéóç/Áðüêñõøç Äßóêïõ Biochip"
+
+#: engines/pegasus/pegasus.cpp:2513
+msgid "Action/Select"
+msgstr "ÅíÝñãåéá/ÅðéëïãÞ"
+
+#: engines/pegasus/pegasus.cpp:2514
+msgid "Toggle Center Data Display"
+msgstr "ÅíáëëáãÞ ÊåíôñéêÞò Ðáñïõóßáóçò ÄåäïìÝíùí"
+
+#: engines/pegasus/pegasus.cpp:2515
+msgid "Display/Hide Info Screen"
+msgstr "ÐñïâïëÞ/Áðüêñõøç Ïèüíçò Ðëçñïöïñéþí"
+
+#: engines/pegasus/pegasus.cpp:2516
+msgid "Display/Hide Pause Menu"
+msgstr "ÐñïâïëÞ/Áðüêñõøç Ìåíïý Ðáýóçò"
+
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "ÅíáëëáêôéêÞ åéóáãùãÞ"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "×ñÞóç åíáëëáêôéêÞò åéóáãùãÞò ðáé÷íéäéïý (Ýêäïóç CD ìüíï)"
+
+#: engines/sci/detection.cpp:390
+msgid "Skip EGA dithering pass (full color backgrounds)"
+msgstr ""
+"ÐáñÜëåéøç ôïõ âÞìáôïò ÷ñùìáôéêÞò áíôéðáñÜèåóçò ôçò EGA (öüíôá ðëÞñïõò "
+"÷ñþìáôïò)"
+
+#: engines/sci/detection.cpp:391
+msgid "Skip dithering pass in EGA games, graphics are shown with full colors"
+msgstr ""
+"ÐáñÜëåéøç ôïõ âÞìáôïò ÷ñùìáôéêÞò áíôéðáñÜèåóçò óå ðáé÷íßäéá EGA, ôá ãñáöéêÜ "
+"åìöáíßæïíôáé ìå ðëÞñç ÷ñþìáôá"
+
+#: engines/sci/detection.cpp:400
+msgid "Enable high resolution graphics"
+msgstr "Åíåñãïðïßçóç ãñáöéêþí õøçëÞò áíÜëõóçò"
+
+#: engines/sci/detection.cpp:401
+msgid "Enable high resolution graphics/content"
+msgstr "Åíåñãïðïßçóç ãñáöéêþí/ðåñéå÷ïìÝíïõ õøçëÞò áíÜëõóçò"
+
+#: engines/sci/detection.cpp:410
+msgid "Enable black-lined video"
+msgstr "Åíåñãïðïßçóç âßíôåï ìå ìáýñåò ãñáììÝò"
+
+#: engines/sci/detection.cpp:411
+msgid "Draw black lines over videos to increase their apparent sharpness"
+msgstr ""
+"Ó÷åäéáóìüò ìáýñùí ãñáììþí ðÜíù óôá âßíôåï ãéá ôçí áýîçóç ôçò ïîýôçôáò ôïõò"
+
+#: engines/sci/detection.cpp:420
+msgid "Prefer digital sound effects"
+msgstr "Ðñïôßìçóç øçöéáêþí áêïõóôéêþí åöå"
+
+#: engines/sci/detection.cpp:421
+msgid "Prefer digital sound effects instead of synthesized ones"
+msgstr "Ðñïôßìçóç øçöéáêþí ç÷çôéêþí åöÝ áíôß ãéá åöÝ äõíáìéêÞò óýíèåóçò"
+
+#: engines/sci/detection.cpp:440
+msgid "Use IMF/Yamaha FB-01 for MIDI output"
+msgstr "×ñÞóç IMF/Yamaha FB-01 ãéá Ýîïäï MIDI"
+
+#: engines/sci/detection.cpp:441
+msgid ""
+"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
+"output"
+msgstr ""
+"×ñÞóç ìéáò êÜñôáò IBM Music Feature Þ ìéá ìïíÜäá óýíèåóçò FM Yamaha FB-01 "
+"ãéá Ýîïäï MIDI"
+
+#: engines/sci/detection.cpp:451
+msgid "Use CD audio"
+msgstr "×ñÞóç Þ÷ïõ CD"
+
+#: engines/sci/detection.cpp:452
+msgid "Use CD audio instead of in-game audio, if available"
+msgstr "×ñÞóç Þ÷ïõ CD áíôß ãéá Þ÷ï ðáé÷íéäéïý, üðïõ åßíáé äéáèÝóéìï"
+
+#: engines/sci/detection.cpp:462
+msgid "Use Windows cursors"
+msgstr "×ñÞóç äñïìÝùí Windows"
+
+#: engines/sci/detection.cpp:463
+msgid ""
+"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
+msgstr ""
+"×ñÞóç äñïìÝùí Windows (ìéêñüôåñïé êáé áóðñüìáõñïé) áíôß ãéá ôïõò äñïìåßò DOS"
+
+#: engines/sci/detection.cpp:473
+msgid "Use silver cursors"
+msgstr "×ñÞóç áóçìÝíéùí äñïìÝùí"
+
+#: engines/sci/detection.cpp:474
+msgid ""
+"Use the alternate set of silver cursors instead of the normal golden ones"
+msgstr ""
+"×ñÞóç ôùí åíáëëáêôéêþí áóçìÝíéùí äñïìÝùí áíôß ôùí ðñïêáèïñéóìÝíùí ÷ñõóþí"
+
+#: engines/scumm/detection.cpp:1120
+msgid ""
+"Your game version appears to be unknown. If this is *NOT* a fan-modified\n"
+"version (in particular, not a fan-made translation), please, report the\n"
+"following data to the ScummVM team along with the name of the game you "
+"tried\n"
+"to add and its version, language, etc.:\n"
+msgstr ""
+"Ç Ýêäïóç ôïõ ðáé÷íéäéïý óáò öáßíåôáé íá åßíáé Üãíùóôç. Áí áõôÞ åßíáé *ÄÅÍ* "
+"åßíáé Ýêäïóç ôñïðïðïéçìÝíç\n"
+"áðü èáõìáóôÝò (åéäéêüôåñá, äåí åßíáé ìéá ìåôÜöñáóç öôéáãìÝíç áðü èáõìáóôÝò), "
+"ðáñáêáëþ, áíáöÝñåôå ôá\n"
+"áêüëïõèá äåäïìÝíá óôçí ïìÜäá ôïõ ScummVM ìáæß ìå ôï üíïìá ôïõ ðáé÷íéäéïý ðïõ "
+"ðñïóðáèÞóáôå\n"
+"íá ðñïóèÝóåôå êáé ôçí ÝêäïóÞ ôïõ, ôç ãëþóóá ôïõ, êëð.:\n"
+
+#: engines/scumm/detection.cpp:1138
+msgid ""
+"The Lite version of Putt-Putt Saves the Zoo iOS is not supported to avoid "
+"piracy.\n"
+"The full version is available for purchase from the iTunes Store."
+msgstr ""
+"Ç Lite Ýêäïóç ôïõ Putt-Putt Saves the Zoo ãéá iOS äåí õðïóôçñßæåôáé ãéá "
+"áðïöõãÞ ðåéñáôåßáò.\n"
+"Ç ðëÞñçò Ýêäïóç åßíáé äéáèÝóéìç ãéá áãïñÜ áðü ôï ÊáôÜóôçìá iTunes."
+
+#: engines/scumm/detection.cpp:1341
+msgid "Show Object Line"
+msgstr "ÐñïâïëÞ ÃñáììÞò ÁíôéêåéìÝíùí"
+
+#: engines/scumm/detection.cpp:1342
+msgid "Show the names of objects at the bottom of the screen"
+msgstr "Ðáñïõóßáóç ôùí ïíïìÜôùí ôùí áíôéêåéìÝíùí óôï êÜôù ìÝñïò ôçò ïèüíçò"
+
+#: engines/scumm/dialogs.cpp:172
+#, c-format
+msgid "Insert Disk %c and Press Button to Continue."
+msgstr "ÅéóÜãåôå ôç ÄéóêÝôá %c êáé ÐáôÞóôå Êïõìðß ãéá ÓõíÝ÷åéá."
+
+#: engines/scumm/dialogs.cpp:173
+#, c-format
+msgid "Unable to Find %s, (%c%d) Press Button."
+msgstr "Äåí Þôáí äõíáôÞ ç Åýñåóç ôïõ %s, (%c%d) ÐáôÞóôå Ýíá Êïõìðß."
+
+#: engines/scumm/dialogs.cpp:174
+#, c-format
+msgid "Error reading disk %c, (%c%d) Press Button."
+msgstr "ÓöÜëìá áíÜãíùóçò äßóêïõ %c, (%c%d) ÐáôÞóôå Ýíá Êïõìðß."
+
+#: engines/scumm/dialogs.cpp:175
+msgid "Game Paused. Press SPACE to Continue."
+msgstr "Ôï ðáé÷íßäé åßíáé óå Ðáýóç. ÐáôÞóôå ôï SPACE ãéá íá Óõíå÷ßóåôå."
+
+#. 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:179
+msgid "Are you sure you want to restart? (Y/N)Y"
+msgstr "Åßóôå óßãïõñïé üôé èÝëåôå íá ãßíåé åðáíåêêßíçóç; (Í/Ï)Í"
+
+#. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment
+#: engines/scumm/dialogs.cpp:181
+msgid "Are you sure you want to quit? (Y/N)Y"
+msgstr "Åßóôå óßãïõñïé üôé èÝëåôå íá âãåßôå áðü ôï ðñüãñáììá; (N/O)N"
+
+#: engines/scumm/dialogs.cpp:186
+msgid "Play"
+msgstr "Ðáßîå"
+
+#: engines/scumm/dialogs.cpp:190
+msgid "Insert save/load game disk"
+msgstr "ÅéóÜãåôå äéóêÝôá áðïèÞêåõóçò/öüñôùóçò ðáé÷íéäéïý"
+
+#: engines/scumm/dialogs.cpp:191
+msgid "You must enter a name"
+msgstr "ÐñÝðåé íá åéóÜãåôå Ýíá üíïìá"
+
+#: engines/scumm/dialogs.cpp:192
+msgid "The game was NOT saved (disk full?)"
+msgstr "Ôï ðáé÷íßäé ÄÅÍ áðïèçêåýôçêå (ãåìÜôïò äßóêïò;)"
+
+#: engines/scumm/dialogs.cpp:193
+msgid "The game was NOT loaded"
+msgstr "Ôï ðáé÷íßäé ÄÅÍ öïñôþèçêå"
+
+#: engines/scumm/dialogs.cpp:194
+#, c-format
+msgid "Saving '%s'"
+msgstr "ÁðïèÞêåõóç '%s'"
+
+#: engines/scumm/dialogs.cpp:195
+#, c-format
+msgid "Loading '%s'"
+msgstr "Öüñôùóç '%s'"
+
+#: engines/scumm/dialogs.cpp:196
+msgid "Name your SAVE game"
+msgstr "ÏíïìÜóôå ôï ðáé÷íßäé ÁÐÏÈÇÊÅÕÓÇÓ"
+
+#: engines/scumm/dialogs.cpp:197
+msgid "Select a game to LOAD"
+msgstr "ÅðéëÝîôå Ýíá ðáé÷íßäé ãéá ÖÏÑÔÙÓÇ"
+
+#: engines/scumm/dialogs.cpp:198
+msgid "Game title)"
+msgstr "ôßôëïõ Ðáé÷íéäéïý)"
+
+#. I18N: Previous page button
+#: engines/scumm/dialogs.cpp:284
+msgid "~P~revious"
+msgstr "~Ð~ñïçãïýìåíï"
+
+#. I18N: Next page button
+#: engines/scumm/dialogs.cpp:286
+msgid "~N~ext"
+msgstr "~Å~ðüìåíï"
+
+#: engines/scumm/dialogs.cpp:598
+msgid "Speech Only"
+msgstr "Ìüíï Ïìéëßá"
+
+#: engines/scumm/dialogs.cpp:599
+msgid "Speech and Subtitles"
+msgstr "Ïìéëßá êáé Õðüôéôëïé"
+
+#: engines/scumm/dialogs.cpp:600
+msgid "Subtitles Only"
+msgstr "Ìüíï Õðüôéôëïé"
+
+#: engines/scumm/dialogs.cpp:608
+msgctxt "lowres"
+msgid "Speech & Subs"
+msgstr "Ïìéëßá & Õðüô"
+
+#: engines/scumm/dialogs.cpp:654
+msgid "Select a Proficiency Level."
+msgstr "ÅðéëÝîôå Åðßðåäï Éêáíüôçôáò."
+
+#: engines/scumm/dialogs.cpp:656
+msgid "Refer to your Loom(TM) manual for help."
+msgstr "ÁíáôñÝîôå óôï åã÷åéñßäéï Loom(TM) óáò ãéá âïÞèåéá."
+
+#: engines/scumm/dialogs.cpp:660
+msgid "Practice"
+msgstr "ÅîÜóêçóç"
+
+#: engines/scumm/dialogs.cpp:661
+msgid "Expert"
+msgstr "Åéäéêüò"
+
+#: engines/scumm/help.cpp:74
+msgid "Common keyboard commands:"
+msgstr "Óýíçèåéò åíôïëÝò ðëçêôñïëïãßïõ:"
+
+#: engines/scumm/help.cpp:75
+msgid "Save / Load dialog"
+msgstr "ÄéÜëïãïò ÁðïèÞêåõóçò / Öüñôùóçò"
+
+#: engines/scumm/help.cpp:77
+msgid "Skip line of text"
+msgstr "ÐáñÜëåéøç ãñáììÞò êåéìÝíïõ"
+
+#: engines/scumm/help.cpp:78
+msgid "Esc"
+msgstr "Esc"
+
+#: engines/scumm/help.cpp:78
+msgid "Skip cutscene"
+msgstr "ÐáñÜëåéøç ôáéíßáò"
+
+#: engines/scumm/help.cpp:79
+msgid "Space"
+msgstr "Space"
+
+#: engines/scumm/help.cpp:79
+msgid "Pause game"
+msgstr "Ðáýóç ðáé÷íéäéïý"
+
+#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:85
+#: 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 engines/scumm/help.cpp:103
+msgid "Ctrl"
+msgstr "Ctrl"
+
+#: engines/scumm/help.cpp:80
+msgid "Load saved game 1-10"
+msgstr "Öüñôùóç áðïèçêåõìÝíïõ ðáé÷íéäéïý 1-10"
+
+#: engines/scumm/help.cpp:81 engines/scumm/help.cpp:85
+#: engines/scumm/help.cpp:87 engines/scumm/help.cpp:101
+#: engines/scumm/help.cpp:102 engines/scumm/help.cpp:103
+msgid "Alt"
+msgstr "Alt"
+
+#: engines/scumm/help.cpp:81
+msgid "Save game 1-10"
+msgstr "ÁðïèÞêåõóç ðáé÷íéäéïý 1-10"
+
+#: engines/scumm/help.cpp:87 engines/scumm/help.cpp:90
+msgid "Enter"
+msgstr "Enter"
+
+#: engines/scumm/help.cpp:88
+msgid "Music volume up / down"
+msgstr "¸íôáóç ìïõóéêÞò ðÜíù / êÜôù"
+
+#: engines/scumm/help.cpp:89
+msgid "Text speed slower / faster"
+msgstr "Ôá÷ýôçôá êåéìÝíïõ ðéï áñãÞ / ðéï ãñÞãïñç"
+
+#: engines/scumm/help.cpp:90
+msgid "Simulate left mouse button"
+msgstr "Åîïìïßùóç áñéóôåñïý êïõìðéïý ðïíôéêéïý"
+
+#: engines/scumm/help.cpp:91
+msgid "Tab"
+msgstr "Tab"
+
+#: engines/scumm/help.cpp:91
+msgid "Simulate right mouse button"
+msgstr "Åîïìïßùóç äåîéïý êïõìðéïý ðïíôéêéïý"
+
+#: engines/scumm/help.cpp:94
+msgid "Special keyboard commands:"
+msgstr "ÅéäéêÝò åíôïëÝò ðëçêôñïëïãßïõ:"
+
+#: engines/scumm/help.cpp:95
+msgid "Show / Hide console"
+msgstr "ÅìöÜíéóç / Áðüêñõøç êïíóüëáò"
+
+#: engines/scumm/help.cpp:96
+msgid "Start the debugger"
+msgstr "Åêêßíçóç ôïõ åíôïðéóìïý óöáëìÜôùí"
+
+#: engines/scumm/help.cpp:97
+msgid "Show memory consumption"
+msgstr "ÅìöÜíéóç êáôáíÜëùóçò ìíÞìçò"
+
+#: engines/scumm/help.cpp:98
+msgid "Run in fast mode (*)"
+msgstr "ÅêôÝëåóç óå ãñÞãïñç ëåéôïõñãßá (*)"
+
+#: engines/scumm/help.cpp:99
+msgid "Run in really fast mode (*)"
+msgstr "ÅêôÝëåóç óå ðïëý ãñÞãïñç ëåéôïõñãßá (*)"
+
+#: engines/scumm/help.cpp:100
+msgid "Toggle mouse capture"
+msgstr "ÅíáëëáãÞ êñÜôçóçò ðïíôéêéïý"
+
+#: engines/scumm/help.cpp:101
+msgid "Switch between graphics filters"
+msgstr "ÅíáëëáãÞ ìåôáîý ößëôñùí ãñáöéêþí"
+
+#: engines/scumm/help.cpp:102
+msgid "Increase / Decrease scale factor"
+msgstr "Áýîçóç / Ìåßùóç óõíôåëåóôÞ êëßìáêáò"
+
+#: engines/scumm/help.cpp:103
+msgid "Toggle aspect-ratio correction"
+msgstr "ÅíáëëáãÞ äéüñèùóçò áíáëïãßáò äéáóôÜóåùí"
+
+#: engines/scumm/help.cpp:108
+msgid "* Note that using ctrl-f and"
+msgstr "* Íá óçìåéùèåß üôé ç ÷ñÞóç ôïõ ctrl-f"
+
+#: engines/scumm/help.cpp:109
+msgid " ctrl-g are not recommended"
+msgstr " êáé ôïõ ctrl-g äå óõíßóôáôáé, ìéá"
+
+#: engines/scumm/help.cpp:110
+msgid " since they may cause crashes"
+msgstr " êáé ìðïñåß íá ðñïêáëÝóïõí êïëëÞìáôá"
+
+#: engines/scumm/help.cpp:111
+msgid " or incorrect game behavior."
+msgstr " Þ åóöáëìÝíç óõìðåñéöïñÜ ðáé÷íéäéþí."
+
+#: engines/scumm/help.cpp:115
+msgid "Spinning drafts on the keyboard:"
+msgstr "Äçìéïõñãßá 'ç÷çôéêïý õöáíôïý' (spinning draft) ìå ôï ðëçêôñïëüãéï:"
+
+#: engines/scumm/help.cpp:117
+msgid "Main game controls:"
+msgstr "Êýñéïé ÷åéñéóìïß ðáé÷íéäéïý:"
+
+#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137
+#: engines/scumm/help.cpp:162
+msgid "Push"
+msgstr "Óðñþîå"
+
+#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138
+#: engines/scumm/help.cpp:163
+msgid "Pull"
+msgstr "ÔñÜâçîå"
+
+#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139
+#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:198
+#: engines/scumm/help.cpp:208
+msgid "Give"
+msgstr "Äþóå"
+
+#: 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
+msgid "Open"
+msgstr "¶íïéîå"
+
+#: engines/scumm/help.cpp:127
+msgid "Go to"
+msgstr "ÌåôÜâáóç óå"
+
+#: engines/scumm/help.cpp:128
+msgid "Get"
+msgstr "ÐÜñå"
+
+#: engines/scumm/help.cpp:129 engines/scumm/help.cpp:153
+#: engines/scumm/help.cpp:171 engines/scumm/help.cpp:199
+#: engines/scumm/help.cpp:214 engines/scumm/help.cpp:225
+#: engines/scumm/help.cpp:251
+msgid "Use"
+msgstr "×ñÞóç"
+
+#: engines/scumm/help.cpp:130 engines/scumm/help.cpp:142
+msgid "Read"
+msgstr "ÄéÜâáóå"
+
+#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:148
+msgid "New kid"
+msgstr "ÍÝï ðáéäß"
+
+#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:154
+#: engines/scumm/help.cpp:172
+msgid "Turn on"
+msgstr "¶íáøå"
+
+#: engines/scumm/help.cpp:133 engines/scumm/help.cpp:155
+#: engines/scumm/help.cpp:173
+msgid "Turn off"
+msgstr "ÓâÞóå"
+
+#: engines/scumm/help.cpp:143 engines/scumm/help.cpp:168
+#: engines/scumm/help.cpp:195
+msgid "Walk to"
+msgstr "ÐåñðÜôçóå óå"
+
+#: engines/scumm/help.cpp:144 engines/scumm/help.cpp:169
+#: engines/scumm/help.cpp:196 engines/scumm/help.cpp:211
+#: engines/scumm/help.cpp:228
+msgid "Pick up"
+msgstr "ÌÜæåøå"
+
+#: engines/scumm/help.cpp:145 engines/scumm/help.cpp:170
+msgid "What is"
+msgstr "Ôé åßíáé"
+
+#: engines/scumm/help.cpp:147
+msgid "Unlock"
+msgstr "Îåêëåßäùóå"
+
+#: engines/scumm/help.cpp:150
+msgid "Put on"
+msgstr "Öüñåóå"
+
+#: engines/scumm/help.cpp:151
+msgid "Take off"
+msgstr "ÂãÜëå"
+
+#: engines/scumm/help.cpp:157
+msgid "Fix"
+msgstr "Äéüñèùóå"
+
+#: engines/scumm/help.cpp:159
+msgid "Switch"
+msgstr "¶ëëáîå"
+
+#: engines/scumm/help.cpp:167 engines/scumm/help.cpp:229
+msgid "Look"
+msgstr "Êïßôáîå"
+
+#: engines/scumm/help.cpp:174 engines/scumm/help.cpp:224
+msgid "Talk"
+msgstr "Ìßëá"
+
+#: engines/scumm/help.cpp:175
+msgid "Travel"
+msgstr "Ôáîßäåøå"
+
+#: engines/scumm/help.cpp:176
+msgid "To Henry / To Indy"
+msgstr "Óôï ×Ýíñõ / Óôïí ºíôõ"
+
+#. I18N: These are different musical notes
+#: engines/scumm/help.cpp:180
+msgid "play C minor on distaff"
+msgstr "ðáßîå C åëÜóóïíá óôç ñüêá"
+
+#: engines/scumm/help.cpp:181
+msgid "play D on distaff"
+msgstr "ðáßîå D óôç ñüêá"
+
+#: engines/scumm/help.cpp:182
+msgid "play E on distaff"
+msgstr "ðáßîå E óôç ñüêá"
+
+#: engines/scumm/help.cpp:183
+msgid "play F on distaff"
+msgstr "ðáßîå F óôç ñüêá"
+
+#: engines/scumm/help.cpp:184
+msgid "play G on distaff"
+msgstr "ðáßîå G óôç ñüêá"
+
+#: engines/scumm/help.cpp:185
+msgid "play A on distaff"
+msgstr "ðáßîå A óôç ñüêá"
+
+#: engines/scumm/help.cpp:186
+msgid "play B on distaff"
+msgstr "ðáßîå B óôç ñüêá"
+
+#: engines/scumm/help.cpp:187
+msgid "play C major on distaff"
+msgstr "ðáßîå C ìåßæïíá óôç ñüêá"
+
+#: engines/scumm/help.cpp:193 engines/scumm/help.cpp:215
+msgid "puSh"
+msgstr "Óðñþîå (S)"
+
+#: engines/scumm/help.cpp:194 engines/scumm/help.cpp:216
+msgid "pull (Yank)"
+msgstr "ÔñÜâçîå (Y)"
+
+#: engines/scumm/help.cpp:197 engines/scumm/help.cpp:213
+#: engines/scumm/help.cpp:249
+msgid "Talk to"
+msgstr "Ìßëá ìå (T)"
+
+#: engines/scumm/help.cpp:200 engines/scumm/help.cpp:212
+msgid "Look at"
+msgstr "Êïßôáîå ôï"
+
+#: engines/scumm/help.cpp:201
+msgid "turn oN"
+msgstr "Üíáøå (N)"
+
+#: engines/scumm/help.cpp:202
+msgid "turn oFf"
+msgstr "óâÞóå (F)"
+
+#: engines/scumm/help.cpp:218
+msgid "KeyUp"
+msgstr "ÐëÞêôñï ðÜíù"
+
+#: engines/scumm/help.cpp:218
+msgid "Highlight prev dialogue"
+msgstr "ÅðéóÞìáíóç ðñïçãïýìåíïõ äéáëüãïõ"
+
+#: engines/scumm/help.cpp:219
+msgid "KeyDown"
+msgstr "ÐëÞêôñï êÜôù"
+
+#: engines/scumm/help.cpp:219
+msgid "Highlight next dialogue"
+msgstr "ÅðéóÞìáíóç åðüìåíïõ äéáëüãïõ"
+
+#: engines/scumm/help.cpp:223
+msgid "Walk"
+msgstr "ÐåñðÜôçóå"
+
+#: engines/scumm/help.cpp:226 engines/scumm/help.cpp:235
+#: engines/scumm/help.cpp:242 engines/scumm/help.cpp:250
+msgid "Inventory"
+msgstr "Áíôéêåßìåíá"
+
+#: engines/scumm/help.cpp:227
+msgid "Object"
+msgstr "Áíôéêåßìåíï"
+
+#: engines/scumm/help.cpp:230
+msgid "Black and White / Color"
+msgstr "Áóðñüìáõñï / ¸ã÷ñùìï"
+
+#: engines/scumm/help.cpp:233
+msgid "Eyes"
+msgstr "ÌÜôéá"
+
+#: engines/scumm/help.cpp:234
+msgid "Tongue"
+msgstr "Ãëþóóá"
+
+#: engines/scumm/help.cpp:236
+msgid "Punch"
+msgstr "ÃñïèéÜ"
+
+#: engines/scumm/help.cpp:237
+msgid "Kick"
+msgstr "ÊëùôóéÜ"
+
+#: engines/scumm/help.cpp:240 engines/scumm/help.cpp:248
+msgid "Examine"
+msgstr "ÅîÝôáóå"
+
+#: engines/scumm/help.cpp:241
+msgid "Regular cursor"
+msgstr "Êáíïíéêüò äñïìÝáò"
+
+#. I18N: Comm is a communication device
+#: engines/scumm/help.cpp:244
+msgid "Comm"
+msgstr "Äéáâßâáóç"
+
+#: engines/scumm/help.cpp:247
+msgid "Save / Load / Options"
+msgstr "ÁðïèÞêåõóç / Öüñôùóç / ÅðéëïãÝò"
+
+#: engines/scumm/help.cpp:256
+msgid "Other game controls:"
+msgstr "¶ëëïé ÷åéñéóìïß ôïõ ðáé÷íéäéïý:"
+
+#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:268
+msgid "Inventory:"
+msgstr "Áíôéêåßìåíá:"
+
+#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275
+msgid "Scroll list up"
+msgstr "Êýëéóç ëßóôáò ðÜíù"
+
+#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:276
+msgid "Scroll list down"
+msgstr "Êýëéóç ëßóôáò êÜôù"
+
+#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:269
+msgid "Upper left item"
+msgstr "ÐÜíù áñéóôåñÜ áíôéêåßìåíï"
+
+#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271
+msgid "Lower left item"
+msgstr "ÊÜôù áñéóôåñÜ áíôéêåßìåíï"
+
+#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:272
+msgid "Upper right item"
+msgstr "ÐÜíù äåîéÜ áíôéêåßìåíï"
+
+#: engines/scumm/help.cpp:264 engines/scumm/help.cpp:274
+msgid "Lower right item"
+msgstr "ÊÜôù äåîéÜ áíôéêåßìåíï"
+
+#: engines/scumm/help.cpp:270
+msgid "Middle left item"
+msgstr "Ìåóáßï áñéóôåñÜ áíôéêåßìåíï"
+
+#: engines/scumm/help.cpp:273
+msgid "Middle right item"
+msgstr "Ìåóáßï äåîéÜ áíôéêåßìåíï"
+
+#: engines/scumm/help.cpp:280 engines/scumm/help.cpp:285
+msgid "Switching characters:"
+msgstr "ÅíáëëáãÞ ÷áñáêôÞñùí:"
+
+#: engines/scumm/help.cpp:282
+msgid "Second kid"
+msgstr "Äåýôåñï ðáéäß"
+
+#: engines/scumm/help.cpp:283
+msgid "Third kid"
+msgstr "Ôñßôï ðáéäß"
+
+#: engines/scumm/help.cpp:292
+msgid "Toggle Inventory/IQ Points display"
+msgstr "ÅíáëëáãÞ ÁíôéêåéìÝíùí/ðñïâïëÞ Ðüíôùí IQ"
+
+#: engines/scumm/help.cpp:293
+msgid "Toggle Keyboard/Mouse Fighting (*)"
+msgstr "ÅíáëëáãÞ ÐÜëçò Ðëçêôñïëïãßïõ/Ðïíôéêéïý (*)"
+
+#: engines/scumm/help.cpp:295
+msgid "* Keyboard Fighting is always on,"
+msgstr "* Ç ÷ñÞóç ðëçêôñïëïãßïõ ãéá ôéò ìÜ÷åò åßíáé ðÜíôá åíåñãïðïéçìÝíç,"
+
+#: engines/scumm/help.cpp:296
+msgid " so despite the in-game message this"
+msgstr " Ýôóé ðáñÜ ôçí åéäïðïßçóç ìÝóá óôï ðáé÷íßäé, áõôÞ ç ñýèìéóç"
+
+#: engines/scumm/help.cpp:297
+msgid " actually toggles Mouse Fighting Off/On"
+msgstr " ïõóéáóôéêÜ (áð)åíåñãïðïéåß ôéò ìÜ÷åò ìå ôçí ÷ñÞóç Ðïíôéêéïý"
+
+#: engines/scumm/help.cpp:304
+msgid "Fighting controls (numpad):"
+msgstr "×åéñéóìïß ìÜ÷çò (áñéè. ðëçêôñ.):"
+
+#: engines/scumm/help.cpp:305 engines/scumm/help.cpp:306
+#: engines/scumm/help.cpp:307
+msgid "Step back"
+msgstr "ÊÜíå ðßóù"
+
+#: engines/scumm/help.cpp:308
+msgid "Block high"
+msgstr "Õøçëü ìðëïêÜñéóìá"
+
+#: engines/scumm/help.cpp:309
+msgid "Block middle"
+msgstr "Ìåóáßï ìðëïêÜñéóìá"
+
+#: engines/scumm/help.cpp:310
+msgid "Block low"
+msgstr "×áìçëü ìðëïêÜñéóìá"
+
+#: engines/scumm/help.cpp:311
+msgid "Punch high"
+msgstr "ØçëÞ ìðïõíéÜ"
+
+#: engines/scumm/help.cpp:312
+msgid "Punch middle"
+msgstr "Ìåóáßá ìðïõíéÜ"
+
+#: engines/scumm/help.cpp:313
+msgid "Punch low"
+msgstr "×áìçëÞ ìðïõíéÜ"
+
+#: engines/scumm/help.cpp:315
+msgid "Sucker punch"
+msgstr "Áéöíéäéáóôéêü ÷ôýðçìá"
+
+#: engines/scumm/help.cpp:318
+msgid "These are for Indy on left."
+msgstr "ÁõôÜ éó÷ýïõí üôáí ï ºíôõ åßíáé óôá áñéóôåñÜ."
+
+#: engines/scumm/help.cpp:319
+msgid "When Indy is on the right,"
+msgstr "¼ôáí ï ºíôõ åßíáé óôá äåîéÜ,"
+
+#: engines/scumm/help.cpp:320
+msgid "7, 4, and 1 are switched with"
+msgstr "ôá 7, 4 êáé 1 åíáëëÜóóïíôáé ìå ôá"
+
+#: engines/scumm/help.cpp:321
+msgid "9, 6, and 3, respectively."
+msgstr "9, 6 êáé 3, áíôßóôïé÷á."
+
+#: engines/scumm/help.cpp:328
+msgid "Biplane controls (numpad):"
+msgstr "×åéñéóìüò äßðôåñïõ (áñéè. ðëçêôñ.):"
+
+#: engines/scumm/help.cpp:329
+msgid "Fly to upper left"
+msgstr "ÐÝôáîå ðÜíù áñéóôåñÜ"
+
+#: engines/scumm/help.cpp:330
+msgid "Fly to left"
+msgstr "ÐÝôáîå áñéóôåñÜ"
+
+#: engines/scumm/help.cpp:331
+msgid "Fly to lower left"
+msgstr "ÐÝôáîå êÜôù áñéóôåñÜ"
+
+#: engines/scumm/help.cpp:332
+msgid "Fly upwards"
+msgstr "ÐÝôáîå ðÜíù"
+
+#: engines/scumm/help.cpp:333
+msgid "Fly straight"
+msgstr "ÐÝôáîå åõèåßá"
+
+#: engines/scumm/help.cpp:334
+msgid "Fly down"
+msgstr "ÐÝôáîå êÜôù"
+
+#: engines/scumm/help.cpp:335
+msgid "Fly to upper right"
+msgstr "ÐÝôáîå ðÜíù äåîéÜ"
+
+#: engines/scumm/help.cpp:336
+msgid "Fly to right"
+msgstr "ÐÝôáîå äåîéÜ"
+
+#: engines/scumm/help.cpp:337
+msgid "Fly to lower right"
+msgstr "ÐÝôáîå êÜôù äåîéÜ"
+
+#: engines/scumm/input.cpp:578
+msgid "Snap scroll on"
+msgstr "ÓõãêñÜôçóç êýëéóçò åíåñãÞ"
+
+#: engines/scumm/input.cpp:580
+msgid "Snap scroll off"
+msgstr "ÓõãêñÜôçóç êýëéóçò áíåíåñãÞ"
+
+#: engines/scumm/input.cpp:593
+msgid "Music volume: "
+msgstr "¸íôáóç ìïõóéêÞò: "
+
+#: engines/scumm/input.cpp:610
+msgid "Subtitle speed: "
+msgstr "Ôá÷ýôçôá õðïôßôëùí: "
+
+#: engines/scumm/scumm.cpp:1880
+#, c-format
+msgid ""
+"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
+"but %s is missing. Using AdLib instead."
+msgstr ""
+"Ç õðïóôÞñéîç native MIDI áðáéôåß ôçí ÁíáâÜèìéóç Roland áðü ôç LucasArts,\n"
+"áëëÜ ôï %s ëåßðåé. Ãßíåôáé ÷ñÞóç AdLib áíô 'áõôïý."
+
+#: engines/scumm/scumm.cpp:2733
+msgid ""
+"Usually, Maniac Mansion would start now. But for that to work, the game "
+"files for Maniac Mansion have to be in the 'Maniac' directory inside the "
+"Tentacle game directory, and the game has to be added to ScummVM."
+msgstr ""
+"ÊáíïíéêÜ, ôþñá èá îåêéíïýóå ôï Maniac Mansion. ÁëëÜ ãéá íá ëåéôïõñãÞóåé "
+"áõôü, ôá áñ÷åßá ðáé÷íéäéïý ôïõ Maniac Mansion èá ðñÝðåé íá åßíáé ìÝóá óôï "
+"öÜêåëï 'Maniac' ìÝóá óôï öÜêåëï ðáé÷íéäéïý ôïõ Tentacle, êáé ôï ðáé÷íßäé "
+"ðñÝðåé íá ðñïóôåèåß óôï ScummVM."
+
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+"Äåí âñÝèçêå ôï åêôåëÝóéìï ôïõ 'Loom' ãéá Macintosh þóôå íá \n"
+"äéáâáóôïýí ôá üñãáíá. Ç ìïõóéêÞ èá åßíáé áðåíåñãïðïéçìÝíç."
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+"Äåí Þôáí äõíáôÞ ç åýñåóç ôïõ åêôåëÝóéìïõ Macintosh 'Monkey Island' áðü\n"
+"ôï ïðïßï íá äéáâáóôïýí ôá üñãáíá ìïõóéêÞò. Ç ìïõóéêÞ èá áðåíåñãïðïéçèåß."
+
+#: engines/sherlock/detection.cpp:81
+msgid "Pixellated scene transitions"
+msgstr "ÐéîåëéáóìÝíåò ìåôáâÜóåéò óêçíÞò"
+
+#: engines/sherlock/detection.cpp:82
+msgid "When changing scenes, a randomized pixel transition is done"
+msgstr "Óôçí åíáëëáãÞ óêçíþí, ðñáãìáôïðïéåßôáé ìéá ôõ÷áßá ìåôÜâáóç pixel"
+
+#: engines/sherlock/detection.cpp:91
+msgid "Don't show hotspots when moving mouse"
+msgstr "Áðüêñõøç åíåñãþí ðåñéï÷þí üôáí ìåôáêéíåßôáé ï äñïìÝáò"
+
+#: engines/sherlock/detection.cpp:92
+msgid ""
+"Only show hotspot names after you actually click on a hotspot or action "
+"button"
+msgstr ""
+"ÅìöÜíéóç ôùí ïíïìÜôùí åíåñãþí óçìåßùí ìüíï áöïý ðáôçèåß åíåñãü óçìåßï Þ "
+"êïõìðß äñÜóçò"
+
+#: engines/sherlock/detection.cpp:101
+msgid "Show character portraits"
+msgstr "ÐñïâïëÞ ðïñôñÝôùí ÷áñáêôÞñùí"
+
+#: engines/sherlock/detection.cpp:102
+msgid "Show portraits for the characters when conversing"
+msgstr "ÅìöÜíéóç ðïñôñÝôùí ÷áñáêôÞñùí êáôÜ ôç äéÜñêåéá óõíïìéëßáò"
+
+#: engines/sherlock/detection.cpp:111
+msgid "Slide dialogs into view"
+msgstr "Êýëéóç äéáëüãùí üôáí åìöáíßæïíôáé"
+
+#: engines/sherlock/detection.cpp:112
+msgid "Slide UI dialogs into view, rather than simply showing them immediately"
+msgstr "Êýëéóç äéáëüãùí äéåðáöÞò üôáí åìöáíßæïíôáé, áíôß íá åìöáíßæïíôáé Üìåóá"
+
+#: engines/sherlock/detection.cpp:121
+msgid "Transparent windows"
+msgstr "ÄéáöáíÞ ðáñÜèõñá"
+
+#: engines/sherlock/detection.cpp:122
+msgid "Show windows with a partially transparent background"
+msgstr "ÅìöÜíéóç ðáñáèýñùí ìå Ýíá ìåñéêþò äéáöáíÝò öüíôï"
+
+#: engines/sky/compact.cpp:141
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
+msgstr "Ôï áñ÷åßï äåäïìÝíùí ðáé÷íéäéïý \"sky.cpt\" Ý÷åé åóöáëìÝíï ìÝãåèïò."
+
+#: 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:524
+#, c-format
+msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
+msgstr ""
+"Ôï áñ÷åßï (ôýðïõ ñïÞò PSX) ôáéíßáò '%s' äåí ãßíåôáé íá áíáðáñá÷èåß óå "
+"ëåéôïõñãßá ðáëÝôáò"
+
+#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
+msgstr ""
+"ÂñÝèçêáí ôáéíßåò DXA áëëÜ ôï ScummVM Ý÷åé öôéá÷ôåß ÷ùñßò õðïóôÞñéîç zlib"
+
+#: engines/sword1/animation.cpp:561 engines/sword2/animation.cpp:461
+msgid ""
+"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
+msgstr ""
+"ÂñÝèçêáí âßíôåï MPEG-2 áëëÜ ôï ScummVM êáôáóêåõÜóôçêå ÷ùñßò õðïóôÞñéîç MPEG-2"
+
+#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
+#, c-format
+msgid "Cutscene '%s' not found"
+msgstr "Ç ôáéíßá '%s' äå âñÝèçêå"
+
+#: engines/sword1/control.cpp:863
+msgid ""
+"ScummVM found that you have old saved games for Broken Sword 1 that should "
+"be converted.\n"
+"The old saved 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"
+"ÐáôÞóôå OK ãéá íá ôá ìåôáôñÝøåôå ôþñá, áëëéþò èá óáò æçôçèåß îáíÜ ôçí "
+"åðüìåíç öïñÜ ðïõ èá îåêéíÞóåôå ôï ðáé÷íßäé.\n"
+
+#: engines/sword1/control.cpp:1232
+#, c-format
+msgid ""
+"Target new saved game already exists!\n"
+"Would you like to keep the old saved 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:425
+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/sword25/detection.cpp:46
+msgid "Use English speech"
+msgstr "×ñÞóç ÁããëéêÞò ïìéëßáò"
+
+#: engines/sword25/detection.cpp:47
+msgid ""
+"Use English speech instead of German for every language other than German"
+msgstr ""
+"×ñÞóç ÁããëéêÞò ïìéëßáò áíôß ãéá ÃåñìáíéêÞ ãéá êÜèå ãëþóóá åêôüò ôçò "
+"ÃåñìáíéêÞò"
+
+#: engines/teenagent/resources.cpp:118
+msgid ""
+"The teenagent.dat file is compressed and zlib hasn't been included in this "
+"executable. Please decompress it"
+msgstr ""
+"Ôï áñ÷åßï teenagent.dat åßíáé óõìðéåóìÝíï êáé ç zlib äåí Ý÷åé óõìðåñéëçöèåß "
+"óå áõôü ôï åêôåëÝóéìï. Ðáñáêáëþ áðïóõìðéÝóôå ôï"
+
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+"H ðáñáëëáãÞ ãñáììáôïóåéñÜò äåí õðÜñ÷åé óôï áñ÷åßï äåäïìÝíùí '%s' ôçò ìç÷áíÞò."
+
+#: engines/toon/toon.cpp:222
+#, c-format
+msgid "Saved game in slot #%d "
+msgstr "ÁðïèÞêåõóç ðáé÷íéäéïý óôç èõñßäá #%d "
+
+#: engines/toon/toon.cpp:226
+#, c-format
+msgid "Could not quick save into slot #%d"
+msgstr "Äåí Þôáí äõíáôÞ ç ãñÞãïñç áðïèÞêåõóç óôç èõñßäá #%d"
+
+#: engines/toon/toon.cpp:239
+#, c-format
+msgid "Saved game #%d quick loaded"
+msgstr "Ôï áðïèçêåõìÝíç ðáé÷íßäé #%d öïñôþèçêå ãñÞãïñá"
+
+#: engines/toon/toon.cpp:243
+#, c-format
+msgid "Could not quick load the saved game #%d"
+msgstr "Äåí Þôáí äõíáôÞ ç ãñÞãïñç öüñôùóç ôïõ áðïèçêåõìÝíïõ ðáé÷íéäéïý #%d"
+
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr "ÐñïâïëÞ ìåôñçôÞ FPS"
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+"ÅìöÜíéóç ôïõ ôñÝ÷ïíôïò áñéèìïý êáñÝ áíÜ äåõôåñüëåðôï óôçí åðÜíù áñéóôåñÞ "
+"ãùíßá"
+
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr "Äéãñáììéêü öéëôñÜñéóìá óôïé÷åßùí (ÁÑÃÏ)"
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr "ÅöáñìïãÞ äéãñáììéêïý öéëôñáñßóìáôïò óå ìåìïíùìÝíá óôïé÷åßá"
+
+#: engines/zvision/detection_tables.h:52
+msgid "Use the original save/load screens instead of the ScummVM interface"
+msgstr ""
+"×ñçóéìïðïéÞóôå ôéò áñ÷éêÝò ïèüíåò áðïèÞêåõóçò/öüñôùóçò áíôß áõôþí ôïõ ScummVM"
+
+#: engines/zvision/detection_tables.h:61
+msgid "Double FPS"
+msgstr "ÄéðëÜóéá FPS"
+
+#: engines/zvision/detection_tables.h:62
+msgid "Increase framerate from 30 to 60 FPS"
+msgstr "Áýîçóç ôïõ ñõèìïý êáñÝ áðü 30 óå 60 FPS"
+
+#: engines/zvision/detection_tables.h:71
+msgid "Enable Venus"
+msgstr "Åíåñãïðïßçóç Áöñïäßôçò"
+
+#: engines/zvision/detection_tables.h:72
+msgid "Enable the Venus help system"
+msgstr "Åíåñãïðïßçóç ôïõ óõóôÞìáôïò âïÞèåéáò ôçò Áöñïäßôçò"
+
+#: engines/zvision/detection_tables.h:81
+msgid "Disable animation while turning"
+msgstr "Áðåíåñãïðïßçóç êßíçóçò êáôÜ ôçí ðåñéóôñïöÞ"
+
+#: engines/zvision/detection_tables.h:82
+msgid "Disable animation while turning in panorama mode"
+msgstr "Áðåíåñãïðïßçóç êßíçóçò êáôÜ ôçí ðåñéóôñïöÞ óå ëåéôïõñãßá ðáíïñÜìáôïò"
+
+#: engines/zvision/detection_tables.h:91
+msgid "Use high resolution MPEG video"
+msgstr "×ñÞóç MPEG âßíôåï õøçëÞò áíÜëõóçò"
+
+#: engines/zvision/detection_tables.h:92
+msgid "Use MPEG video from the DVD version instead of lower resolution AVI"
+msgstr ""
+"×ñÞóç âßíôåï MPEG áðü ôçí Ýêäïóç DVD áíôß ãéá ôï ÷áìçëüôåñçò áíÜëõóçò AVI"
+
+#: engines/zvision/file/save_manager.cpp:220
+#, c-format
+msgid ""
+"This saved game uses version %u, but this engine only supports up to version "
+"%d. You will need an updated version of the engine to use this saved game."
+msgstr ""
+"Áõôü ôï áðïèçêåõìÝíï ðáé÷íßäé ÷ñçóéìïðïéåß Ýêäïóç%u, áëëÜ ç ìç÷áíÞ áõôÞ "
+"õðïóôçñßæåé ìüíï ìÝ÷ñé ôçí Ýêäïóç%d. Èá ÷ñåéáóôåßôå ìéá åíçìåñùìÝíç Ýêäïóç "
+"ôçò ìç÷áíÞò ãéá íá ÷ñçóéìïðïéÞóåôå áõôü ôï áðïèçêåõìÝíï ðáé÷íßäé."
diff --git a/po/es_ES.po b/po/es_ES.po
index 58b49de867..a00e7fb9ae 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -1,5 +1,5 @@
# Spanish translation for ScummVM.
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2010-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Tomás Maidagan, 2011.
#
@@ -7,11 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.4.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-12-04 22:49+0000\n"
-"Last-Translator: Timofonic <timofonic@gmail.com>\n"
-"Language-Team: Spanish "
-"<https://translations.scummvm.org/projects/scummvm/scummvm/es/>\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2016-12-30 20:22+0000\n"
+"Last-Translator: Luis <luissagasta@gmail.com>\n"
+"Language-Team: Spanish <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/es/>\n"
"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
@@ -163,13 +163,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "Aceptar"
@@ -578,7 +578,6 @@ msgid "Associated key : %s"
msgstr "Tecla asociada: %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Tecla asociada: ninguna"
@@ -766,11 +765,13 @@ msgstr "Se ha buscado en %d directorios..."
#: gui/massadd.cpp:269
#, c-format
msgid "Discovered %d new games, ignored %d previously added games ..."
-msgstr "%d juegos nuevos encontrados. %d juegos ignorados (ya añadidos)..."
+msgstr ""
+"%d juegos nuevos encontrados. Se han ignorado %d juegos, anteriormente ya "
+"añadidos..."
#: gui/onscreendialog.cpp:101 gui/onscreendialog.cpp:103
msgid "Stop"
-msgstr "Detener"
+msgstr "Parar"
#: gui/onscreendialog.cpp:106
msgid "Edit record description"
@@ -873,15 +874,15 @@ msgstr "Filtros de gráficos"
#: gui/options.cpp:838
msgid "Use linear filtering when scaling graphics"
-msgstr "Usar filtrado linear cuando se escalan graficos"
+msgstr "Usar filtrado lineal para escalar gráficos"
#: gui/options.cpp:841
msgid "Aspect ratio correction"
-msgstr "Corrección de aspecto"
+msgstr "Corrección de la relación de aspecto"
#: gui/options.cpp:841
msgid "Correct aspect ratio for 320x200 games"
-msgstr "Corregir relación de aspecto en juegos 320x200"
+msgstr "Corregir relación de aspecto en juegos de 320x200"
#: gui/options.cpp:849
msgid "Preferred Device:"
@@ -894,8 +895,8 @@ msgstr "Disp. de música:"
#: gui/options.cpp:849 gui/options.cpp:851
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
-"Especifica qué dispositivo de sonido o emulador de tarjeta de sonido "
-"prefieres"
+"Especifica el dispositivo de sonido o emulador de tarjeta de sonido "
+"prefierido"
#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
msgid "Specifies output sound device or sound card emulator"
@@ -918,7 +919,7 @@ msgstr "Emul. de AdLib:"
#: gui/options.cpp:878 gui/options.cpp:879
msgid "AdLib is used for music in many games"
-msgstr "AdLib se usa para la música en muchos juegos"
+msgstr "AdLib es usado para la música en muchos juegos"
#: gui/options.cpp:889
msgid "Output rate:"
@@ -929,8 +930,8 @@ msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
msgstr ""
-"Los valores más altos ofrecen mayor calidad, pero puede que tu tarjeta de "
-"sonido no sea compatible"
+"Los valores más altos ofrecen mayor calidad, pero puede que la tarjeta de "
+"sonido no lo soporte"
#: gui/options.cpp:900
msgid "GM Device:"
@@ -938,7 +939,9 @@ msgstr "Dispositivo GM:"
#: gui/options.cpp:900
msgid "Specifies default sound device for General MIDI output"
-msgstr "Especifica el dispositivo de salida General MIDI por defecto"
+msgstr ""
+"Especifique el dispositivo de salidapor defecto para la salida de General "
+"MIDI"
#: gui/options.cpp:911
msgid "Don't use General MIDI music"
@@ -1342,7 +1345,7 @@ msgstr "Detener servidor"
msgid "Stop local webserver"
msgstr "Detener el servidor local"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1764,6 +1767,9 @@ msgid ""
"Please, report the following data to the ScummVM team along with name\n"
"of the game you tried to add and its version, language, etc.:"
msgstr ""
+"El juego en '%s' parece ser desconocido.\n"
+"Porfavor, informe de ello al equipo de ScummVM junto al nombre\n"
+"del juego que ha intentado añadir y su versión, lenguaje, etc.:"
#: engines/dialogs.cpp:85
msgid "~R~esume"
@@ -1806,7 +1812,7 @@ msgstr "~V~olver al lanzador"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1827,7 +1833,7 @@ msgstr "Guardar partida:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1846,14 +1852,13 @@ msgstr ""
"obtener más ayuda."
#: engines/dialogs.cpp:234 engines/pegasus/pegasus.cpp:393
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to save game (%s)! Please consult the README for basic information, "
"and for instructions on how to obtain further assistance."
msgstr ""
-"Ha habido un fallo al guardar la partida (%s). Consulta el archivo README "
-"para encontrar información básica e instrucciones sobre cómo obtener más "
-"ayuda."
+"Ha habido un fallo al guardar la partida (%s). Consulte el archivo README "
+"con información básica y como obtener más ayuda."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:100
#: engines/tsage/dialogs.cpp:112
@@ -1918,14 +1923,13 @@ msgstr ""
"Consulta el archivo README para más detalles."
#: engines/engine.cpp:542
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
"information, and for instructions on how to obtain further assistance."
msgstr ""
-"Ha habido un fallo al cargar la partida (%s). Consulta el archivo README "
-"para encontrar información básica e instrucciones sobre cómo obtener más "
-"ayuda."
+"Hubo un fallo al cargar la partida (%s). Consulte el archivo README para "
+"información básica y cómo obtener más ayuda."
#: engines/engine.cpp:555
msgid ""
@@ -2022,11 +2026,11 @@ msgstr "FM-Towns Audio"
msgid "PC-98 Audio"
msgstr "PC-98 Audio"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Iniciando el emulador de MT-32"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "Emulador de MT-32"
@@ -2747,6 +2751,35 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Buscar actualizaciones..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr "No se puede localizar el archivo de datos del motor '%s'."
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr "El archivo de datos del motor '%s' está corrupto."
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+"Se ha encontrado una versión incorrecta del archivo de datos del motor '%s'. "
+"Se esperaba %d.%d pero se encontró %d.%d."
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr "Modo de color"
@@ -2775,10 +2808,8 @@ msgstr "Usar pantallas de guardar/cargar originales"
#: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:49
#: engines/neverhood/detection.cpp:178 engines/sci/detection.cpp:431
#: engines/sherlock/detection.cpp:72 engines/toltecs/detection.cpp:201
-#, fuzzy
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"
+msgstr "Usar los menús originales de guardar/cargar en vez de los de ScummVM"
#: engines/agi/detection.cpp:157
msgid "Use an alternative palette"
@@ -2829,8 +2860,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2842,33 +2873,32 @@ msgstr "Cargar partida:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
msgstr "Cargar"
#: engines/agos/saveload.cpp:159 engines/scumm/scumm.cpp:2436
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to load saved game from file:\n"
"\n"
"%s"
msgstr ""
-"Fallo al cargar desde el archivo:\n"
+"Falló la carga de partida guardada desde el archivo:\n"
"\n"
"%s"
#: engines/agos/saveload.cpp:194 engines/scumm/scumm.cpp:2429
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to save game to file:\n"
"\n"
"%s"
msgstr ""
-"Fallo al guardar en el archivo:\n"
-"\n"
+"Fallo al guardar la partida al archivo:\n"
"%s"
#: engines/agos/saveload.cpp:202 engines/scumm/scumm.cpp:2447
@@ -2896,7 +2926,6 @@ msgid "Enable Color Blind Mode by default"
msgstr "Activar por defecto el modo para daltónicos"
#: engines/drascula/saveload.cpp:47
-#, fuzzy
msgid ""
"ScummVM found that you have old saved games for Drascula that should be "
"converted.\n"
@@ -2906,13 +2935,13 @@ msgid ""
"Press OK to convert them now, otherwise you will be asked again the next "
"time you start the game.\n"
msgstr ""
-"ScummVM ha detectado que tienes partidas guardadas antiguas de Drascula, que "
-"deben ser actualizadas.\n"
-"El formato antiguo ya no es compatible, así que no podrás cargar tus "
-"partidos si no las actualizas.\n"
+"ScummVM ha detectado partidas guardadas antiguas de Drascula que deben "
+"actualizarse.\n"
+"El formato antiguo ya no es compatible, no podrán cargarse hasta "
+"actualizarlas.\n"
"\n"
-"Pulsa Aceptar para actualizarlas, si no lo haces este mensaje volverá a "
-"aparecer la próxima vez.\n"
+"Pulse Aceptar para actualizarlas. Si no lo hace, el mensaje aparecerá cada "
+"vez que se inicie el juego.\n"
#: engines/dreamweb/detection.cpp:58
msgid "Use bright palette mode"
@@ -2924,15 +2953,13 @@ msgstr "Utilizar los niveles de brillo originales del juego"
#: engines/gob/inter_playtoons.cpp:255 engines/gob/inter_v2.cpp:1467
#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
-#, fuzzy
msgid "Failed to load saved game from file."
-msgstr "Fallo al cargar el estado del juego desde el archivo."
+msgstr "Falló al cargar partida guardada desde el archivo."
#: engines/gob/inter_v2.cpp:1537 engines/gob/inter_geisha.cpp:263
#: engines/tinsel/saveload.cpp:545
-#, fuzzy
msgid "Failed to save game to file."
-msgstr "Fallo al guardar el estado del juego en el archivo."
+msgstr "Fallo al guardar partida en el archivo."
#: engines/gob/inter_v5.cpp:107
msgid "Failed to delete file."
@@ -3048,11 +3075,11 @@ msgstr "Abrir/Cerrar Inventario"
#: engines/kyra/eobcommon.cpp:338
msgid "Switch Inventory/Character screen"
-msgstr "Intercambiar pantalla de Inventario/Personaje"
+msgstr "Cambiar pantalla de Inventario/Personaje"
#: engines/kyra/eobcommon.cpp:339
msgid "Camp"
-msgstr ""
+msgstr "Acampar"
#: engines/kyra/eobcommon.cpp:340
msgid "Cast Spell"
@@ -3155,7 +3182,7 @@ msgstr ""
"\n"
#: engines/kyra/saveload_eob.cpp:623
-#, fuzzy, c-format
+#, c-format
msgid ""
"%d original saved games have been successfully imported into\n"
"ScummVM. If you want to manually import original saved game later you will\n"
@@ -3163,15 +3190,14 @@ msgid ""
"'import_savefile'.\n"
"\n"
msgstr ""
-"Se han importado %d partidas guardadas originales.\n"
-"Si más adelante quieres importar manualmente más partidas guardadas\n"
-"originales, tendrás que abrir la consola de ScummVM y usar el comando "
-"'import_savefile'.\n"
+"Se han logrado importar %d partidas guardadas originales a ScummVM. \n"
+"Para hacerlo manualmente, tendrá que abrir la consola debug y usar el "
+"comando \"import_savefile\"\n"
"\n"
#: engines/mads/detection.cpp:91
msgid "Easy mouse interface"
-msgstr "Interfaz de ratón fácil"
+msgstr "Interfaz de mouse sencilla"
#: engines/mads/detection.cpp:92
msgid "Shows object names when hovering the mouse over them"
@@ -3179,15 +3205,15 @@ msgstr "Muestra los nombres de los objetos al pasar el ratón"
#: engines/mads/detection.cpp:101 engines/mads/detection.cpp:102
msgid "Animated inventory items"
-msgstr "Objetos del inventario animados"
+msgstr "Items de inventario animados"
#: engines/mads/detection.cpp:111 engines/mads/detection.cpp:112
msgid "Animated game interface"
-msgstr ""
+msgstr "Interfaz de juego animada"
#: engines/mads/detection.cpp:121 engines/mads/detection.cpp:122
msgid "Naughty game mode"
-msgstr "Modo de juego travieso"
+msgstr "Modo de juego picante"
#: engines/mohawk/detection.cpp:169
msgid "Play the Myst fly by movie"
@@ -3229,16 +3255,16 @@ msgid ""
"You're missing a Riven executable. The Windows executable is 'riven.exe' or "
"'rivendmo.exe'. "
msgstr ""
-"Falta el ejecutable de Riven. El ejecutable de Windows es 'riven.exe' o "
-"'rivendmo.exe'. "
+"El ejecutable de Riven no ha sido encontrado. El ejecutable de Windows es "
+"'riven.exe' o 'rivendmo.exe'. "
#: engines/mohawk/riven.cpp:151
msgid ""
"Using the 'arcriven.z' installer file also works. In addition, you can use "
"the Mac 'Riven' executable."
msgstr ""
-"También es posible usar el instalador 'arcriven.z'. Además, puedes usar el "
-"ejecutable de Mac 'Riven'."
+"Usar el archivo de instalacion 'arcriven.z' es funcional. Tambien puedes "
+"utilizar el ejecutable de Mac."
#: engines/mohawk/riven.cpp:162
msgid ""
@@ -3253,8 +3279,7 @@ msgid ""
"Exploration beyond this point available only within the full version of\n"
"the game."
msgstr ""
-"La exploración a partir de este punto solo está disponible en la versión\n"
-"completa del juego."
+"Exploracion mas alla de aquí solo esta disponible en la version completa."
#: engines/mohawk/riven_external.cpp:655
msgid ""
@@ -3264,11 +3289,11 @@ msgid ""
"the game. ScummVM cannot do that and\n"
"the site no longer exists."
msgstr ""
-"En este punto, la Demo de Riven\n"
-"preguntaría si quieres abrir un navegador\n"
-"para llevarte a la Red Orb store para comprar\n"
-"el juego. ScummVM no puede hacer eso y\n"
-"la página ya no existe."
+"En este punto, la demo de Riven te\n"
+"preguntaria si quisieras abrir un navegador de internet\n"
+"para llevarte a la tienda de Red Orb para\n"
+"comprar el juego. ScummVM no puede hacer eso y\n"
+"el sitio ya no existe."
#: engines/mohawk/mohawk.cpp:61
msgid "The game is paused. Press any key to continue."
@@ -3317,7 +3342,6 @@ msgid "Saving game..."
msgstr "Guardando partida..."
#: engines/parallaction/saveload.cpp:269
-#, fuzzy
msgid ""
"ScummVM found that you have old saved games for Nippon Safes that should be "
"renamed.\n"
@@ -3326,13 +3350,13 @@ msgid ""
"\n"
"Press OK to convert them now, otherwise you will be asked next time.\n"
msgstr ""
-"ScummVM ha detectado que tienes partidas guardadas de Nippon Safes que hay "
-"que renombrar.\n"
-"Los nombres antiguos ya no son compatibles, así que no podrás cargar tus "
-"partidas hasta que los actualices.\n"
-"\n"
-"Pulsa Aceptar para actualizarlos, si no lo haces este mensaje volverá a "
-"aparecer la próxima vez.\n"
+"ScummVM ha detectado partidas guardadas de Nippon Safes que deben "
+"renombrarse,\n"
+" ya que los nomhres antiguos no son compatibles.\n"
+"Los nombres antiguos ya no son compatibles, las partidas no se podrán cargar "
+"hasta que se conviertan.\n"
+"Pulse Aceptar para convertirlos. En caso contrario, este mensaje aparecerá "
+"cada vez que inicies el juego.\n"
#: engines/parallaction/saveload.cpp:316
#, fuzzy
@@ -3352,9 +3376,8 @@ msgstr ""
"Por favor, contacta con el equipo."
#: engines/pegasus/pegasus.cpp:714
-#, fuzzy
msgid "Invalid file name for saving"
-msgstr "Escribir el nombre del archivo"
+msgstr "Nombre del archivo de partida inválido"
#: engines/pegasus/pegasus.cpp:2507
msgid "Up/Zoom In/Move Forward/Open Doors"
@@ -3466,11 +3489,11 @@ msgid "Use silver cursors"
msgstr "Usar cursores plateados"
#: engines/sci/detection.cpp:474
-#, fuzzy
msgid ""
"Use the alternate set of silver cursors instead of the normal golden ones"
msgstr ""
-"Usar los cursores plateados alternativos, en vez de los dorados normales"
+"Usar el set alternativo de colores plateados en lugar de los dorados, usados "
+"normalmente"
#: engines/scumm/detection.cpp:1120
msgid ""
@@ -3480,6 +3503,12 @@ msgid ""
"tried\n"
"to add and its version, language, etc.:\n"
msgstr ""
+"La versión del juego parece ser desconocida. Si *NO ES* una versión "
+"modificada\n"
+"por fans, como particularmente una traducción: \n"
+"Por favor, informe de ello al equipo ScummVM junto con el nombre del juego "
+"que\n"
+"se intentó añadir y su versión, lenguaje, etc.:\n"
#: engines/scumm/detection.cpp:1138
msgid ""
@@ -3487,9 +3516,9 @@ msgid ""
"piracy.\n"
"The full version is available for purchase from the iTunes Store."
msgstr ""
-"La versión Lite de Putt-Putt Saves the Zoo iOS no está soportada para evitar "
-"la piratería.\n"
-"La versión completa está disponible para comprar en la tienda iTunes."
+"La version de prueba de Putt-Putt Saves the Zoo para IOS no esta soportada "
+"para prevenir pirateria\n"
+"La version completa puede ser comprada en la tienda de iTunes."
#: engines/scumm/detection.cpp:1341
msgid "Show Object Line"
@@ -4247,21 +4276,9 @@ msgstr "Ventanas transparentes"
msgid "Show windows with a partially transparent background"
msgstr "Mostrar las ventanas con un fondo parcialmente transparente"
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"No se ha encontrado el archivo \"sky.cpt\"\n"
-"Descárgalo en 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"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
msgstr ""
-"El archivo \"sky.cpt\" tiene un tamaño incorrecto.\n"
-"Descárgalo de nuevo en www.scummvm.org"
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4296,7 +4313,6 @@ msgid "Cutscene '%s' not found"
msgstr "No se ha encontrado el vídeo '%s'"
#: engines/sword1/control.cpp:863
-#, fuzzy
msgid ""
"ScummVM found that you have old saved games for Broken Sword 1 that should "
"be converted.\n"
@@ -4306,13 +4322,13 @@ msgid ""
"Press OK to convert them now, otherwise you will be asked again the next "
"time you start the game.\n"
msgstr ""
-"ScummVM ha detectado que tienes partidas guardadas antiguas de Broken Sword "
-"1, que deben ser actualizadas.\n"
-"El formato antiguo ya no es compatible, así que no podrás cargar tus "
-"partidos si no las actualizas.\n"
+"ScummVM ha detectado partidas guardadas antiguas de Broken Sword 1, "
+"requieren convertirse al nuevo formato,\n"
+"El formato antiguo ya no es compatible, no podrán cargarse hasta que se "
+"conviertan.\n"
"\n"
-"Pulsa Aceptar para actualizarlas, si no lo haces este mensaje volverá a "
-"aparecer la próxima vez.\n"
+"Pulse Aceptar para la conversión. En caso contrario, se volverá a preguntar "
+"la próxima vez que inicies el juego.\n"
#: engines/sword1/control.cpp:1232
#, c-format
@@ -4361,14 +4377,7 @@ msgstr ""
"Usa las voces inglesas en vez de las alemanas para todos los idiomas "
"distintos al Alemán"
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
-"No se encuentra el archivo 'teenagent.dat'. Descárgalo de la página de "
-"ScummVM"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4376,6 +4385,11 @@ msgstr ""
"El archivo teenagent.dat está comprimido y este ejecutable no incluye zlib. "
"Es necesario que lo descomprimas"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+
#: engines/toon/toon.cpp:222
#, c-format
msgid "Saved game in slot #%d "
@@ -4387,34 +4401,14 @@ msgid "Could not quick save into slot #%d"
msgstr "No se pudo hacer un quick save en el slot #%d"
#: engines/toon/toon.cpp:239
-#, fuzzy, c-format
+#, c-format
msgid "Saved game #%d quick loaded"
-msgstr ""
-"No se puede guardar en la ranura %i\n"
-"\n"
+msgstr "Se cargó la partida guardada rápida #%d"
#: engines/toon/toon.cpp:243
-#, fuzzy, c-format
-msgid "Could not quick load the saved game #%d"
-msgstr "¿Quieres cargar la partida guardada?"
-
-#: engines/toon/toon.cpp:4917
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr ""
-"No se encuentra el archivo 'toon.dat'. Descárgalo de la página de ScummVM"
-
-#: engines/toon/toon.cpp:4929
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr "El archivo 'toon.dat' está corrupto. Descárgalo de la página de ScummVM"
-
-#: engines/toon/toon.cpp:4939
#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-"Encontrada una versión equivocada del fichero 'toon.dat'. Se esperaba la %d.%"
-"d pero se encontró la %d.%d. Descárgalo de la página web de ScummVM"
+msgid "Could not quick load the saved game #%d"
+msgstr "No es posible cargar la partida guardada rápida #%d"
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
@@ -4425,6 +4419,14 @@ msgid "Show the current number of frames per second in the upper left corner"
msgstr ""
"El número de fotogramas por segundo aparece en la esquina superior izquierda"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
@@ -4459,10 +4461,9 @@ msgid "Use high resolution MPEG video"
msgstr "Usar vídeos MPEG de alta resolución"
#: engines/zvision/detection_tables.h:92
-#, fuzzy
msgid "Use MPEG video from the DVD version instead of lower resolution AVI"
msgstr ""
-"Usar los vídeos MPEG de la versión DVD, en vez de los AVI de baja resolución"
+"Usar los vídeos MPEG de la versión DVD en vez de los AVI de baja resolución"
#: engines/zvision/file/save_manager.cpp:220
#, c-format
@@ -4470,6 +4471,44 @@ msgid ""
"This saved game uses version %u, but this engine only supports up to version "
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+"Esta partida guardada usa la versión %u, pero este motor soporta hasta la "
+"versión %d. Será necesaria una versión atualizada del motor para poder "
+"usarla."
+
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "No se ha encontrado el archivo \"sky.cpt\"\n"
+#~ "Descárgalo en www.scummvm.org"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "El archivo \"sky.cpt\" tiene un tamaño incorrecto.\n"
+#~ "Descárgalo de nuevo en www.scummvm.org"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "No se encuentra el archivo 'teenagent.dat'. Descárgalo de la página de "
+#~ "ScummVM"
+
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "No se encuentra el archivo 'toon.dat'. Descárgalo de la página de ScummVM"
+
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "El archivo 'toon.dat' está corrupto. Descárgalo de la página de ScummVM"
+
+#~ msgid ""
+#~ "File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it "
+#~ "from the ScummVM website"
+#~ msgstr ""
+#~ "Encontrada una versión equivocada del fichero 'toon.dat'. Se esperaba la "
+#~ "%d.%d pero se encontró la %d.%d. Descárgalo de la página web de ScummVM"
#~ msgid "Invalid save file name"
#~ msgstr "Nombre no válido para la partida"
diff --git a/po/eu.po b/po/eu.po
index fcfd6d6818..b6592a4327 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -1,5 +1,5 @@
# Basque translation for ScummVM.
-# Copyright (C) 2012-2016 The ScummVM Team
+# Copyright (C) 2012-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Mikel Iturbe Urretxa <mikel@hamahiru.org>, 2012.
#
@@ -7,11 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
"PO-Revision-Date: 2016-12-04 13:27+0000\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
-"Language-Team: Basque "
-"<https://translations.scummvm.org/projects/scummvm/scummvm/eu/>\n"
+"Language-Team: Basque <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/eu/>\n"
"Language: eu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
@@ -160,13 +160,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "Ados"
@@ -568,7 +568,6 @@ msgid "Associated key : %s"
msgstr "Esleituriko tekla: %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Esleituriko tekla: bat ere ez"
@@ -1338,7 +1337,7 @@ msgstr "Zerbitzaria:"
msgid "Stop local webserver"
msgstr ""
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1800,7 +1799,7 @@ msgstr "It~z~uli abiarazlera"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1821,7 +1820,7 @@ msgstr "Gorde jokoa:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -2014,11 +2013,11 @@ msgstr "FM-Towns soinua"
msgid "PC-98 Audio"
msgstr "PC-98 Soinua"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "MT-32 emuladorea hasieratzen"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "MT-32 emuladorea"
@@ -2740,6 +2739,33 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Eguneraketak bilatzen..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr ""
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr ""
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
#, fuzzy
msgid "Color mode"
@@ -2823,8 +2849,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2836,8 +2862,8 @@ msgstr "Jokoa kargatu:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -4233,21 +4259,9 @@ msgstr "Leiho gardenak"
msgid "Show windows with a partially transparent background"
msgstr "Erakutsi leihoak partzialki gardena den fondoarekin"
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"Ezin izan da \"sky.cpt\" fitxategia aurkitu!\n"
-"Mesedez, jaitsi ezazu www.scummvm.org-etik"
-
#: engines/sky/compact.cpp:141
-msgid ""
-"The \"sky.cpt\" file has an incorrect size.\n"
-"Please (re)download it from www.scummvm.org"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
msgstr ""
-"\"sky.cpt\" fitxategiak tamaina desegokia du.\n"
-"Mesdez, jaitsi ezazu (berriz) www.scummvm.org-etik"
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4342,12 +4356,7 @@ msgid ""
"Use English speech instead of German for every language other than German"
msgstr ""
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr "'teenagent.dat' fitxategia falta da. Eskuratu ScummVM webgunean"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4355,6 +4364,11 @@ msgstr ""
"teenagent. dat fitxategia konprimituta dago eta zlib ez dago txertatuta "
"exekutagarri honetan. Deskonprimitu"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+
#: engines/toon/toon.cpp:222
#, fuzzy, c-format
msgid "Saved game in slot #%d "
@@ -4379,23 +4393,6 @@ msgstr ""
msgid "Could not quick load the saved game #%d"
msgstr "Gordetako jokoa kargatu?"
-#: engines/toon/toon.cpp:4917
-#, fuzzy
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr "'teenagent.dat' fitxategia falta da. Eskuratu ScummVM webgunean"
-
-#: engines/toon/toon.cpp:4929
-#, fuzzy
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr "'teenagent.dat' fitxategia falta da. Eskuratu ScummVM webgunean"
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "Erakutsi FPS kontatzailea"
@@ -4404,6 +4401,14 @@ msgstr "Erakutsi FPS kontatzailea"
msgid "Show the current number of frames per second in the upper left corner"
msgstr "Erakutsi momentuko FPS (frames per second) goiko ezkerreko ertzean"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
@@ -4449,6 +4454,32 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Ezin izan da \"sky.cpt\" fitxategia aurkitu!\n"
+#~ "Mesedez, jaitsi ezazu www.scummvm.org-etik"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "\"sky.cpt\" fitxategiak tamaina desegokia du.\n"
+#~ "Mesdez, jaitsi ezazu (berriz) www.scummvm.org-etik"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr "'teenagent.dat' fitxategia falta da. Eskuratu ScummVM webgunean"
+
+#, fuzzy
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr "'teenagent.dat' fitxategia falta da. Eskuratu ScummVM webgunean"
+
+#, fuzzy
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr "'teenagent.dat' fitxategia falta da. Eskuratu ScummVM webgunean"
+
#~ msgid "Invalid save file name"
#~ msgstr "Gordetako jokoko fitxategi-izen baliogabea"
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 952ecf1767..192a4ee78d 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -1,5 +1,5 @@
# Finnish translation for ScummVM.
-# Copyright (c) 2012-2016 The ScummVM Team
+# Copyright (c) 2012-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Toni Saarela <saarela@gmail.com>, 2012.
#
@@ -7,11 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-12-04 15:56+0000\n"
-"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
-"Language-Team: Finnish "
-"<https://translations.scummvm.org/projects/scummvm/scummvm/fi/>\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2017-01-06 16:03+0000\n"
+"Last-Translator: Timo Mikkolainen <tmikkola@gmail.com>\n"
+"Language-Team: Finnish <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/fi/>\n"
"Language: fi_FI\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
@@ -34,13 +34,12 @@ msgid "Available engines:"
msgstr "Tuetut pelimoottorit:"
#: gui/browser.cpp:68 gui/browser_osx.mm:104
-#, fuzzy
msgid "Show hidden files"
-msgstr "Näytä / piilota konsoli"
+msgstr "Näytä piilotetut tiedostot"
#: gui/browser.cpp:68
msgid "Show files marked with the hidden attribute"
-msgstr ""
+msgstr "Näytä piilotetuksi merkatut tiedostot"
#: gui/browser.cpp:72 gui/remotebrowser.cpp:56
msgid "Go up"
@@ -80,40 +79,40 @@ msgid "Choose"
msgstr "Valitse"
#: gui/downloaddialog.cpp:48
-#, fuzzy
msgid "Select directory where to download game data"
-msgstr "Valitse pelin kansio"
+msgstr "Valitse hakemisto pelilataukselle"
#: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:470 gui/launcher.cpp:197
msgid "Select directory with game data"
-msgstr "Valitse pelin kansio"
+msgstr "Valitse pelin hakemisto"
#: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263
msgid "From: "
-msgstr ""
+msgstr "Lähde: "
#: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264
msgid "To: "
-msgstr ""
+msgstr "Kohde: "
#: gui/downloaddialog.cpp:63
msgid "Cancel download"
-msgstr ""
+msgstr "Peruuta lataus"
#: gui/downloaddialog.cpp:65
msgctxt "lowres"
msgid "Cancel download"
-msgstr ""
+msgstr "Peruuta lataus"
#: gui/downloaddialog.cpp:67
msgid "Hide"
-msgstr ""
+msgstr "Piilota"
#: gui/downloaddialog.cpp:117
msgid ""
"It looks like your connection is limited. Do you really want to download "
"files with it?"
msgstr ""
+"Yhteytesi vaikuttaa rajatulta. Haluatko varmasti ladata tiedostoja sillä?"
#: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:152
#: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217
@@ -150,6 +149,8 @@ msgid ""
"Cannot create a directory to download - the specified directory has a file "
"with the same name."
msgstr ""
+"Kansion luonti latausta varten epäonnistui - valitussa kansiossa on jo "
+"tiedosto samalla nimellä."
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:522
@@ -161,15 +162,15 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
-msgstr "Tallenna"
+msgstr "OK"
#: gui/downloaddialog.cpp:151
#, c-format
@@ -177,16 +178,18 @@ msgid ""
"The \"%s\" already exists in the specified directory.\n"
"Do you really want to download files into that directory?"
msgstr ""
+"\"%s\" on jo olemassa valitussa hakemistossa. Haluatko varmasti ladata "
+"tiedostoja tähän hakemistoon?"
#: gui/downloaddialog.cpp:251
#, c-format
msgid "Downloaded %s %s / %s %s"
-msgstr ""
+msgstr "Ladattu %s %s / %s %s"
#: gui/downloaddialog.cpp:258
-#, fuzzy, c-format
+#, c-format
msgid "Download speed: %s %s"
-msgstr "Skannaus on valmis!"
+msgstr "Latausnopeus: %s %s"
#: gui/editgamedialog.cpp:132
msgid "Game"
@@ -258,7 +261,7 @@ msgstr "Alusta:"
#: gui/editgamedialog.cpp:176
msgid "Engine"
-msgstr "Moottori"
+msgstr "Pelimoottori"
#: gui/editgamedialog.cpp:184 gui/options.cpp:1147 gui/options.cpp:1232
msgid "Graphics"
@@ -400,21 +403,23 @@ msgstr "Oletus"
#: gui/editgamedialog.cpp:450 gui/options.cpp:1772
msgid "Select SoundFont"
-msgstr "Valitse äänifontti"
+msgstr "Valitse SoundFont"
#: gui/editgamedialog.cpp:489
msgid "Select additional game directory"
-msgstr "Valitse lisäkansio pelille"
+msgstr "Valitse lisähakemisto pelille"
#: gui/editgamedialog.cpp:502 gui/options.cpp:1695
msgid "Select directory for saved games"
-msgstr "Valitse kansio pelitallennuksille"
+msgstr "Valitse hakemisto pelitallennuksille"
#: gui/editgamedialog.cpp:508
msgid ""
"Saved games sync feature doesn't work with non-default directories. If you "
"want your saved games to sync, use default directory."
msgstr ""
+"Pelitallennusten synkronointiominaisuus toimii ainoastaa vakiohakemistoilla. "
+"Jos haluat synkronoida pelitallennuksesi, käytä vakiohakemistoa."
#: gui/editgamedialog.cpp:534
msgid "This game ID is already taken. Please choose another one."
@@ -422,50 +427,47 @@ msgstr "Pelin tunnus on jo käytössä. Valitse jokin muu."
#: gui/editrecorddialog.cpp:58
msgid "Author:"
-msgstr ""
+msgstr "Tekijä:"
#: gui/editrecorddialog.cpp:60
msgid "Notes:"
-msgstr ""
+msgstr "Merkinnät:"
#: gui/editrecorddialog.cpp:68 gui/predictivedialog.cpp:74
msgid "Ok"
-msgstr ""
+msgstr "Ok"
#: gui/filebrowser-dialog.cpp:49
msgid "Choose file for loading"
-msgstr ""
+msgstr "Valitse ladattava tiedosto"
#: gui/filebrowser-dialog.cpp:49
msgid "Enter filename for saving"
-msgstr ""
+msgstr "Syötä tiedoston nimi tallennukselle"
#: gui/filebrowser-dialog.cpp:132
-#, fuzzy
msgid "Do you really want to overwrite the file?"
-msgstr "Haluatko varmasti poistaa tämän pelitallennuksen?"
+msgstr "Haluatko varmasti ylikirjoitaa tiedoston?"
#: gui/fluidsynth-dialog.cpp:68
-#, fuzzy
msgid "Reverb"
-msgstr "Ei koskaan"
+msgstr "Kaiku"
#: gui/fluidsynth-dialog.cpp:70 gui/fluidsynth-dialog.cpp:102
-#, fuzzy
msgid "Active"
-msgstr " (Aktiivinen)"
+msgstr "Aktiivinen"
#: gui/fluidsynth-dialog.cpp:72
msgid "Room:"
-msgstr ""
+msgstr "Huone:"
#: gui/fluidsynth-dialog.cpp:79
msgid "Damp:"
-msgstr ""
+msgstr "Vaimennus:"
#: gui/fluidsynth-dialog.cpp:86
msgid "Width:"
-msgstr ""
+msgstr "Leveys:"
#: gui/fluidsynth-dialog.cpp:93 gui/fluidsynth-dialog.cpp:111
msgid "Level:"
@@ -473,28 +475,27 @@ msgstr "Taso:"
#: gui/fluidsynth-dialog.cpp:100
msgid "Chorus"
-msgstr ""
+msgstr "Korus"
#: gui/fluidsynth-dialog.cpp:104
msgid "N:"
-msgstr ""
+msgstr "N:"
#: gui/fluidsynth-dialog.cpp:118
-#, fuzzy
msgid "Speed:"
-msgstr "Puhe"
+msgstr "Nopeus:"
#: gui/fluidsynth-dialog.cpp:125
msgid "Depth:"
-msgstr ""
+msgstr "Syvyys:"
#: gui/fluidsynth-dialog.cpp:132
msgid "Type:"
-msgstr ""
+msgstr "Tyyppi:"
#: gui/fluidsynth-dialog.cpp:135
msgid "Sine"
-msgstr ""
+msgstr "Sini"
#: gui/fluidsynth-dialog.cpp:136
msgid "Triangle"
@@ -506,37 +507,36 @@ msgstr "Muut"
#: gui/fluidsynth-dialog.cpp:140
msgid "Interpolation:"
-msgstr ""
+msgstr "Interpolaatio:"
#: gui/fluidsynth-dialog.cpp:143
msgid "None (fastest)"
-msgstr ""
+msgstr "Ei päällä (nopein)"
#: gui/fluidsynth-dialog.cpp:144
msgid "Linear"
-msgstr ""
+msgstr "Lineaarinen"
#: gui/fluidsynth-dialog.cpp:145
msgid "Fourth-order"
-msgstr ""
+msgstr "Neljännen asteen"
#: gui/fluidsynth-dialog.cpp:146
msgid "Seventh-order"
-msgstr ""
+msgstr "Seitsemännen asteen"
#: gui/fluidsynth-dialog.cpp:150
msgid "Reset"
-msgstr ""
+msgstr "Tyhjää valinnat"
#: gui/fluidsynth-dialog.cpp:150
msgid "Reset all FluidSynth settings to their default values."
-msgstr ""
+msgstr "Palauta FluidSynth vakioasetukset."
#: gui/fluidsynth-dialog.cpp:217
-#, fuzzy
msgid ""
"Do you really want to reset all FluidSynth settings to their default values?"
-msgstr "Haluatko varmasti palata pelivalitsimeen?"
+msgstr "Haluatko varmasti palauttaa FluidSynth vakioasetukset?"
#: gui/gui-manager.cpp:119 backends/keymapper/remap-dialog.cpp:53
#: engines/scumm/help.cpp:126 engines/scumm/help.cpp:141
@@ -575,7 +575,6 @@ 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"
@@ -601,7 +600,7 @@ msgstr "Lopeta ScummVM"
#: gui/launcher.cpp:142
msgid "A~b~out..."
-msgstr "Tietoa..."
+msgstr "~T~ietoa..."
#: gui/launcher.cpp:142 backends/platform/sdl/macosx/appmenu_osx.mm:80
msgid "About ScummVM"
@@ -641,7 +640,7 @@ msgstr "Pidä Shift-näppäintä pohjassa lisätäksesi useita pelejä kerralla"
#: gui/launcher.cpp:155
msgid "~E~dit Game..."
-msgstr "Muokkaa peliä..."
+msgstr "~M~uokkaa peliä..."
#: gui/launcher.cpp:155 gui/launcher.cpp:162
msgid "Change game options"
@@ -649,7 +648,7 @@ msgstr "Muuta pelin asetuksia"
#: gui/launcher.cpp:157
msgid "~R~emove Game"
-msgstr "Poista peli"
+msgstr "P~o~ista peli"
#: gui/launcher.cpp:157 gui/launcher.cpp:164
msgid "Remove game from the list. The game data files stay intact"
@@ -663,12 +662,12 @@ msgstr "Lisää peli..."
#: gui/launcher.cpp:162
msgctxt "lowres"
msgid "~E~dit Game..."
-msgstr "Muokkaa peliä..."
+msgstr "~M~uokkaa peliä..."
#: gui/launcher.cpp:164
msgctxt "lowres"
msgid "~R~emove Game"
-msgstr "Poista peli"
+msgstr "P~o~ista peli"
#: gui/launcher.cpp:172
msgid "Search in game list"
@@ -705,16 +704,15 @@ msgstr ""
#: gui/launcher.cpp:365
msgid "This directory cannot be used yet, it is being downloaded into!"
-msgstr ""
+msgstr "Tätä kansiota ei voi käyttää vielä, siihen ladataan tiedostoja!"
#: gui/launcher.cpp:415
msgid "Do you really want to remove this game configuration?"
msgstr "Haluatko varmasti poistaa pelin asetuksineen listalta?"
#: gui/launcher.cpp:473
-#, fuzzy
msgid "Do you want to load saved game?"
-msgstr "Haluatko tallentaa vai ladata pelin?"
+msgstr "Haluatko ladata tallennetun pelin?"
#: gui/launcher.cpp:522
msgid "This game does not support loading games from the launcher."
@@ -738,7 +736,7 @@ msgstr "Lisää monta..."
#: gui/launcher.cpp:710
msgid "Record..."
-msgstr ""
+msgstr "Nauhoita..."
#: gui/massadd.cpp:79 gui/massadd.cpp:82
msgid "... progress ..."
@@ -765,25 +763,23 @@ msgstr "Skannattiin %d hakemistoa ..."
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."
+"aiemmin ..."
#: gui/onscreendialog.cpp:101 gui/onscreendialog.cpp:103
msgid "Stop"
-msgstr ""
+msgstr "Pysäytä"
#: gui/onscreendialog.cpp:106
msgid "Edit record description"
-msgstr ""
+msgstr "Muokkaa nauhoituksen kuvausta"
#: gui/onscreendialog.cpp:108
-#, fuzzy
msgid "Switch to Game"
-msgstr "Vaihda"
+msgstr "Vaihda peliin"
#: gui/onscreendialog.cpp:110
-#, fuzzy
msgid "Fast replay"
-msgstr "Nopea moodi"
+msgstr "Nopea toisto"
#: gui/options.cpp:119 common/updates.cpp:56
msgid "Never"
@@ -848,9 +844,8 @@ msgid "the fullscreen setting could not be changed"
msgstr "kokoruututilaa ei voitu muuttaa"
#: gui/options.cpp:486
-#, fuzzy
msgid "the filtering setting could not be changed"
-msgstr "kokoruututilaa ei voitu muuttaa"
+msgstr "Suodatusasetusta ei voitu muuttaa"
#: gui/options.cpp:809
msgid "Graphics mode:"
@@ -870,13 +865,12 @@ msgid "Fullscreen mode"
msgstr "Kokoruututila"
#: gui/options.cpp:838
-#, fuzzy
msgid "Filter graphics"
-msgstr "Grafiikka"
+msgstr "Suodata grafiikka"
#: gui/options.cpp:838
msgid "Use linear filtering when scaling graphics"
-msgstr ""
+msgstr "Käytä bilineaarista suodatinta grafiikan skaalauksessa"
#: gui/options.cpp:841
msgid "Aspect ratio correction"
@@ -884,7 +878,7 @@ msgstr "Kuvasuhteen korjaus"
#: gui/options.cpp:841
msgid "Correct aspect ratio for 320x200 games"
-msgstr "Oikea kuvasuhde 320x200 peleille"
+msgstr "Korjaa kuvasuhde 320x200 peleille"
#: gui/options.cpp:849
msgid "Preferred Device:"
@@ -952,7 +946,7 @@ msgstr "Käytä ensimmäistä laitetta"
#: gui/options.cpp:934
msgid "SoundFont:"
-msgstr "Äänifontti:"
+msgstr "SoundFont:"
#: gui/options.cpp:934 gui/options.cpp:936 gui/options.cpp:937
msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
@@ -962,7 +956,7 @@ msgstr ""
#: gui/options.cpp:936
msgctxt "lowres"
msgid "SoundFont:"
-msgstr "Äänifontti:"
+msgstr "SoundFont:"
#: gui/options.cpp:942
msgid "Mixed AdLib/MIDI mode"
@@ -1002,15 +996,16 @@ msgid "True Roland MT-32 (no GM emulation)"
msgstr "Aito Roland MT-32 (ei GM emulointia)"
#: gui/options.cpp:965
-#, fuzzy
msgid "Roland GS Device (enable MT-32 mappings)"
-msgstr "Aito Roland MT-32 (ei GM emulointia)"
+msgstr "Roland GS Laite (aktivoi MT-32 mappaukset)"
#: gui/options.cpp:965
msgid ""
"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
"GS device"
msgstr ""
+"Valitse jos haluat käyttää patch mappingia MT-32:n emulointiin Roland GS "
+"laitteella"
#: gui/options.cpp:974
msgid "Don't use Roland MT-32 music"
@@ -1034,7 +1029,7 @@ msgstr "Molemmat"
#: gui/options.cpp:1009
msgid "Subtitle speed:"
-msgstr "Tekstin nopeus:"
+msgstr "Tekstityksen nopeus:"
#: gui/options.cpp:1011
msgctxt "lowres"
@@ -1061,7 +1056,7 @@ msgstr "Näytä tekstitys ja käytä puhetta"
#: gui/options.cpp:1019
msgctxt "lowres"
msgid "Subtitle speed:"
-msgstr "Tekstin nopeus:"
+msgstr "Tekstityksen nopeus:"
#: gui/options.cpp:1035
msgid "Music volume:"
@@ -1100,7 +1095,7 @@ msgstr "Puhe:"
#: gui/options.cpp:1257
msgid "FluidSynth Settings"
-msgstr ""
+msgstr "FluidSynth asetukset"
#: gui/options.cpp:1288
msgid "Theme Path:"
@@ -1162,36 +1157,36 @@ msgstr "ScummVM käyttöliittymän kieli"
#: gui/options.cpp:1381
msgid "Update check:"
-msgstr ""
+msgstr "Päivitystarkistus:"
#: gui/options.cpp:1381
msgid "How often to check ScummVM updates"
-msgstr ""
+msgstr "Kuinka usein tarkistetaan onko ScummVM:ään päivityksiä"
#: gui/options.cpp:1393
msgid "Check now"
-msgstr ""
+msgstr "Tarkista nyt"
#: gui/options.cpp:1401
msgid "Cloud"
-msgstr ""
+msgstr "Pilvi"
#: gui/options.cpp:1403
msgctxt "lowres"
msgid "Cloud"
-msgstr ""
+msgstr "Pilvi"
#: gui/options.cpp:1408
msgid "Storage:"
-msgstr ""
+msgstr "Tallennustila:"
#: gui/options.cpp:1408
msgid "Active cloud storage"
-msgstr ""
+msgstr "Aktiivinen pilvitallennus"
#: gui/options.cpp:1415 gui/options.cpp:1972
msgid "<none>"
-msgstr ""
+msgstr "<tyhjä>"
#: gui/options.cpp:1419 backends/platform/wii/options.cpp:114
msgid "Username:"
@@ -1199,101 +1194,96 @@ msgstr "Käyttäjänimi:"
#: gui/options.cpp:1419
msgid "Username used by this storage"
-msgstr ""
+msgstr "Tallennustilan käyttäjänimi"
#: gui/options.cpp:1422
msgid "Used space:"
-msgstr ""
+msgstr "Käytetty tila:"
#: gui/options.cpp:1422
msgid "Space used by ScummVM's saved games on this storage"
-msgstr ""
+msgstr "ScummVM:n pelitallennusten käyttämä tila tallennustilassa"
#: gui/options.cpp:1425
msgid "Last sync time:"
-msgstr ""
+msgstr "Viimeisin synkronointi:"
#: gui/options.cpp:1425
msgid "When the last saved games sync for this storage occured"
-msgstr ""
+msgstr "Milloin pelitallennukset viimeksi synkronoitiin tähän tallennustilaan"
#: gui/options.cpp:1428 gui/storagewizarddialog.cpp:71
msgid "Connect"
-msgstr ""
+msgstr "Yhdistä"
#: gui/options.cpp:1428
msgid "Open wizard dialog to connect your cloud storage account"
-msgstr ""
+msgstr "Avaa velhodialogi pilvitilan tiliin kirjautumiseen"
#: gui/options.cpp:1429
msgid "Refresh"
-msgstr ""
+msgstr "Päivitä"
#: gui/options.cpp:1429
msgid "Refresh current cloud storage information (username and usage)"
-msgstr ""
+msgstr "Päivitä tämänhetkiset pilvitilan tiedot (käyttäjänimi ja käyttöaste)"
#: gui/options.cpp:1430
-#, fuzzy
msgid "Download"
-msgstr "Alas"
+msgstr "Lataa"
#: gui/options.cpp:1430
msgid "Open downloads manager dialog"
-msgstr ""
+msgstr "Avaa lataustenhallintadialogi"
#: gui/options.cpp:1432
msgid "Run server"
-msgstr ""
+msgstr "Käynnistä palvelin"
#: gui/options.cpp:1432
msgid "Run local webserver"
-msgstr ""
+msgstr "Käynnistä paikallinen webpalvelin"
#: gui/options.cpp:1433 gui/options.cpp:2082
-#, fuzzy
msgid "Not running"
-msgstr "Virhe ajettaessa peliä:"
+msgstr "Ei käynnissä"
#: gui/options.cpp:1437
-#, fuzzy
msgid "/root/ Path:"
-msgstr "Lisäkansio:"
+msgstr "/root/-polku:"
#: gui/options.cpp:1437 gui/options.cpp:1439 gui/options.cpp:1440
-#, fuzzy
msgid "Specifies which directory the Files Manager can access"
-msgstr "Määrittää polun pelitallennuksille"
+msgstr "Määrittää hakemiston johon tiedostonhallinnalla on pääsy"
#: gui/options.cpp:1439
-#, fuzzy
msgctxt "lowres"
msgid "/root/ Path:"
-msgstr "Lisäkansio:"
+msgstr "/root/-polku:"
#: gui/options.cpp:1449
-#, fuzzy
msgid "Server's port:"
-msgstr "Palvelin:"
+msgstr "Palvelimen portti:"
#: gui/options.cpp:1449
msgid ""
"Which port is used by the server\n"
"Auth with server is not available with non-default port"
msgstr ""
+"Palvelimen käyttämä portti\n"
+"Autentikaatio palvelimella on mahdollista vain vakioportilla"
#: gui/options.cpp:1462
msgid "Apply"
-msgstr ""
+msgstr "Käytä"
#: gui/options.cpp:1628
-#, fuzzy
msgid "Failed to change cloud storage!"
-msgstr "Pelin tallentaminen epäonnistui."
+msgstr "Pilvitallennustilan vaihtaminen epäonnistui!"
#: gui/options.cpp:1631
msgid "Another cloud storage is already active."
-msgstr ""
+msgstr "Toinen pilvitila on jo aktiivinen."
#: gui/options.cpp:1667
msgid ""
@@ -1320,75 +1310,73 @@ msgid "Select directory for plugins"
msgstr "Valitse hakemisto plugineille"
#: gui/options.cpp:1744
-#, fuzzy
msgid "Select directory for Files Manager /root/"
-msgstr "Valitse hakemisto lisätiedostoille"
+msgstr "Valitse /root/ hakemisto tiedostonhallinnalle"
#: gui/options.cpp:1979
#, c-format
msgid "%llu bytes"
-msgstr ""
+msgstr "%llu tavua"
#: gui/options.cpp:1987
msgid "<right now>"
-msgstr ""
+msgstr "<nyt>"
#: gui/options.cpp:1989
-#, fuzzy
msgid "<never>"
-msgstr "Ei koskaan"
+msgstr "<ei koskaan>"
#: gui/options.cpp:2073
-#, fuzzy
msgid "Stop server"
-msgstr "Palvelin:"
+msgstr "Pysäytä palvelin"
#: gui/options.cpp:2074
msgid "Stop local webserver"
-msgstr ""
+msgstr "Pysäytä paikallinen webpalvelin"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
msgstr ""
+"Pyyntö epäonnistui\n"
+"Tarkista verkkoyhteytesi."
#. I18N: You must leave "#" as is, only word 'next' is translatable
#: gui/predictivedialog.cpp:86
msgid "# next"
-msgstr ""
+msgstr "# seuraava"
#: gui/predictivedialog.cpp:87
msgid "add"
-msgstr ""
+msgstr "lisää"
#: gui/predictivedialog.cpp:92 gui/predictivedialog.cpp:167
-#, fuzzy
msgid "Delete char"
-msgstr "Poista"
+msgstr "Poista merkki"
#: gui/predictivedialog.cpp:97 gui/predictivedialog.cpp:171
msgid "<"
-msgstr ""
+msgstr "<"
#. I18N: Pre means 'Predictive', leave '*' as is
#: gui/predictivedialog.cpp:99 gui/predictivedialog.cpp:575
msgid "* Pre"
-msgstr ""
+msgstr "* Ennakoiva"
#. I18N: 'Num' means Numbers
#: gui/predictivedialog.cpp:578
msgid "* Num"
-msgstr ""
+msgstr "* 123"
#. I18N: 'Abc' means Latin alphabet input
#: gui/predictivedialog.cpp:581
msgid "* Abc"
-msgstr ""
+msgstr "* Abc"
#: gui/recorderdialog.cpp:63
msgid "Recorder or Playback Gameplay"
-msgstr ""
+msgstr "Nauhoitin tai Toista Tallennus"
#: gui/recorderdialog.cpp:68 gui/recorderdialog.cpp:155
#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:443
@@ -1397,39 +1385,35 @@ msgstr "Poista"
#: gui/recorderdialog.cpp:70
msgid "Record"
-msgstr ""
+msgstr "Nauhoita"
#: gui/recorderdialog.cpp:71
-#, fuzzy
msgid "Playback"
-msgstr "Pelaa"
+msgstr "Toista"
#: gui/recorderdialog.cpp:73
msgid "Edit"
-msgstr ""
+msgstr "Muokkaa"
#: gui/recorderdialog.cpp:85 gui/recorderdialog.cpp:242
#: gui/recorderdialog.cpp:252
msgid "Author: "
-msgstr ""
+msgstr "Tekijä: "
#: gui/recorderdialog.cpp:86 gui/recorderdialog.cpp:243
#: gui/recorderdialog.cpp:253
msgid "Notes: "
-msgstr ""
+msgstr "Merkinnät: "
#: gui/recorderdialog.cpp:154
-#, fuzzy
msgid "Do you really want to delete this record?"
-msgstr "Haluatko varmasti poistaa tämän pelitallennuksen?"
+msgstr "Haluatko varmasti poistaa tämän pelinauhoituksen?"
#: gui/recorderdialog.cpp:173
-#, fuzzy
msgid "Unknown Author"
-msgstr "Tuntematon virhe"
+msgstr "Tuntematon tekijä"
#: gui/remotebrowser.cpp:128
-#, fuzzy
msgid "ScummVM could not access the directory!"
msgstr "ScummVM ei voi avata kyseistä hakemistoa!"
@@ -1470,7 +1454,6 @@ msgid "Playtime: "
msgstr "Peliaika: "
#: gui/saveload-dialog.cpp:577 gui/saveload-dialog.cpp:665
-#, fuzzy
msgid "Untitled saved game"
msgstr "Nimetön pelitallennus"
@@ -1502,72 +1485,73 @@ msgstr "Anna kuvaus tallennukselle numero %d:"
#: gui/storagewizarddialog.cpp:55
#, c-format
msgid "%s Storage Connection Wizard"
-msgstr ""
+msgstr "%s Tallennustilan Yhdistämisvelho"
#: gui/storagewizarddialog.cpp:58
msgid "Navigate to the following URL:"
-msgstr ""
+msgstr "Siirry seuraavaan osoitteeseen:"
#: gui/storagewizarddialog.cpp:61
msgid "Obtain the code from the storage, enter it"
-msgstr ""
+msgstr "Hanki koodi tallennustilasta, syötä se"
#: gui/storagewizarddialog.cpp:62
msgid "in the following field and press 'Connect':"
-msgstr ""
+msgstr "seuraavasta kentästä ja paina 'Yhdistä':"
#: gui/storagewizarddialog.cpp:69
-#, fuzzy
msgid "Open URL"
-msgstr "Avaa"
+msgstr "Avaa osoite"
#: gui/storagewizarddialog.cpp:70
msgid "Paste"
-msgstr ""
+msgstr "Liitä"
#: gui/storagewizarddialog.cpp:70
msgid "Pastes clipboard contents into fields"
-msgstr ""
+msgstr "Liittää leikepöydän sisällön kenttiin"
#: gui/storagewizarddialog.cpp:78
msgid "You will be directed to ScummVM's page where"
-msgstr ""
+msgstr "Sinut ohjataan ScummVM:n sivuille jossa"
#: gui/storagewizarddialog.cpp:79
msgid "you should allow it to access your storage."
-msgstr ""
+msgstr "sinun pitää sallia sen pääsy tallennustilaasi."
#: gui/storagewizarddialog.cpp:112
msgid "Another Storage is active. Do you want to interrupt it?"
-msgstr ""
+msgstr "Toinen tallennustila on aktiivinen. Haluatko keskeyttää sen?"
#: gui/storagewizarddialog.cpp:121
msgid "Wait until current Storage finishes up and try again."
-msgstr ""
+msgstr "Odota kunnes aktiivinen Tallennus on valmis ja yritä sitten uudestaan."
#: gui/storagewizarddialog.cpp:182
#, c-format
msgid "Field %s has a mistake in it."
-msgstr ""
+msgstr "%s-kentässä on virhe."
#: gui/storagewizarddialog.cpp:184
#, c-format
msgid "Fields %s have mistakes in them."
-msgstr ""
+msgstr "Seuraavissa kentissä on virheitä: %s."
#: gui/storagewizarddialog.cpp:199
msgid "All OK!"
-msgstr ""
+msgstr "Kaikki kunnossa!"
#: gui/storagewizarddialog.cpp:201
msgid "Invalid code"
-msgstr ""
+msgstr "Viallinen koodi"
#: gui/storagewizarddialog.cpp:209
msgid ""
"Failed to open URL!\n"
"Please navigate to this page manually."
msgstr ""
+"Osoitteen avaaminen epäonnistui!\n"
+"Ole hyvä ja siirry osoitteeseen käsin."
#: gui/themebrowser.cpp:45
msgid "Select a Theme"
@@ -1583,23 +1567,20 @@ msgid "Disabled GFX"
msgstr "Disabloitu GFX"
#: gui/ThemeEngine.cpp:453
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Standardirenderöijä (16 bpp)"
+msgstr "Standardirenderöijä"
#: gui/ThemeEngine.cpp:453 engines/scumm/dialogs.cpp:659
msgid "Standard"
msgstr "Standardi"
#: gui/ThemeEngine.cpp:455
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "Antialiasoitu renderöijä (16 bpp)"
+msgstr "Antialiasoitu renderöijä"
#: gui/ThemeEngine.cpp:455
-#, fuzzy
msgid "Antialiased"
-msgstr "Antialiasoitu (16 bpp)"
+msgstr "Antialiasoitu"
#: gui/updates-dialog.cpp:51
msgid ""
@@ -1608,19 +1589,22 @@ msgid ""
"\n"
"Would you like to enable this feature?"
msgstr ""
+"ScummVM tukee nyt automaattista päivitysten tarkistusta\n"
+"joka vaatii pääsyn internetiin\n"
+"\n"
+"Haluaisitko laittaa päälle tämän ominaisuuden?"
#: gui/updates-dialog.cpp:55
msgid "(You can always enable it in the options dialog on the Misc tab)"
-msgstr ""
+msgstr "(Voit aina laittaa sen päälle asetusvalikon \"Muut\"-välilehdestä)"
#: gui/updates-dialog.cpp:92
-#, fuzzy
msgid "Check for updates automatically"
-msgstr "Tarkista päivitykset..."
+msgstr "Tarkista päivitykset automaattisesti"
#: gui/updates-dialog.cpp:111
msgid "Proceed"
-msgstr ""
+msgstr "Jatka"
#: gui/widget.cpp:366 gui/widget.cpp:368 gui/widget.cpp:374 gui/widget.cpp:376
msgid "Clear value"
@@ -1711,9 +1695,8 @@ msgid "Could not find suitable engine plugin"
msgstr "Sopivaa pelimoottorin pluginia ei löytynyt"
#: common/error.cpp:68
-#, fuzzy
msgid "Engine plugin does not support saved games"
-msgstr "Pelimoottori ei tue tallennustiloja"
+msgstr "Pelimoottoriliitännäinen ei tue pelitallenteita"
#: common/error.cpp:71
msgid "User canceled"
@@ -1726,46 +1709,45 @@ msgstr "Tuntematon virhe"
#. I18N: Hercules is graphics card name
#: common/rendermode.cpp:35
msgid "Hercules Green"
-msgstr ""
+msgstr "Hercules vihreä"
#: common/rendermode.cpp:36
msgid "Hercules Amber"
-msgstr ""
+msgstr "Hercules keltainen"
#: common/rendermode.cpp:42
msgid "PC-9821 (256 Colors)"
-msgstr ""
+msgstr "PC-9821 (256 Väriä)"
#: common/rendermode.cpp:43
msgid "PC-9801 (16 Colors)"
-msgstr ""
+msgstr "PC-9801 (16 Väriä)"
#: common/rendermode.cpp:73
msgctxt "lowres"
msgid "Hercules Green"
-msgstr ""
+msgstr "Hercules vihreä"
#: common/rendermode.cpp:74
msgctxt "lowres"
msgid "Hercules Amber"
-msgstr ""
+msgstr "Hercules keltainen"
#: common/updates.cpp:58
msgid "Daily"
-msgstr ""
+msgstr "Päivittäin"
#: common/updates.cpp:60
msgid "Weekly"
-msgstr ""
+msgstr "Viikoittain"
#: common/updates.cpp:62
msgid "Monthly"
-msgstr ""
+msgstr "Kuukausittain"
#: common/updates.cpp:64
-#, fuzzy
msgid "<Bad value>"
-msgstr "Tyhjennä arvo"
+msgstr "<Huono arvo>"
#: engines/advancedDetector.cpp:335
#, c-format
@@ -1774,6 +1756,9 @@ msgid ""
"Please, report the following data to the ScummVM team along with name\n"
"of the game you tried to add and its version, language, etc.:"
msgstr ""
+"Peli kansiossa \"%s\" näyttää olevan tuntematon.\n"
+"Ole kiltti ja raportoi seuraavat tiedot ScummVM:n kehittäjille pelin nimen,\n"
+"version, kielen, yms. kera:"
#: engines/dialogs.cpp:85
msgid "~R~esume"
@@ -1816,7 +1801,7 @@ msgstr "Palaa p~e~livalitsimeen"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1837,7 +1822,7 @@ msgstr "Tallenna peli:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1855,13 +1840,13 @@ msgstr ""
"tiedosto saadaksesi lisätietoa."
#: engines/dialogs.cpp:234 engines/pegasus/pegasus.cpp:393
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to save game (%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."
+"Pelitilan tallennus epäonnistui (%s)! Konsultoi README-tiedostoa saadaksesi "
+"lisätietoa ja ohjeita avun hankkimiseen."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:100
#: engines/tsage/dialogs.cpp:112
@@ -1894,9 +1879,8 @@ msgid "Could not apply fullscreen setting."
msgstr "Kokoruututila-asetusta ei voi asettaa."
#: engines/engine.cpp:373
-#, fuzzy
msgid "Could not apply filtering setting."
-msgstr "Kokoruututila-asetusta ei voi asettaa."
+msgstr "Suodatusasetusta ei voitu ottaa käyttöön."
#: engines/engine.cpp:473
msgid ""
@@ -1922,16 +1906,16 @@ 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."
+"kuuluvat. Lue ohjeet README-tiedostosta."
#: engines/engine.cpp:542
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
"information, and for instructions on how to obtain further assistance."
msgstr ""
-"Pelitilan lataus epäonnistui (%s)! Avaa LUEMINUT tiedosto saadaksesi "
-"lisätietoa."
+"Pelitallennuksen lataus epäonnistui (%s)! Konsultoi README-tiedostoa "
+"saadaksesi lisätietoa ja ohjeita avun hankkimiseen."
#: engines/engine.cpp:555
msgid ""
@@ -1961,7 +1945,7 @@ msgstr "DOSBox OPL emulaattori"
#: audio/fmopl.cpp:67
msgid "ALSA Direct FM"
-msgstr ""
+msgstr "ALSA Direct FM"
#: audio/mididrv.cpp:209
#, c-format
@@ -2018,22 +2002,21 @@ msgstr "Apple II GS emulaattori (EI TOTEUTETTU)"
#: audio/softsynth/cms.cpp:350
msgid "Creative Music System Emulator"
-msgstr ""
+msgstr "Creative Music System emulaattori"
#: audio/softsynth/fmtowns_pc98/towns_pc98_plugins.cpp:33
msgid "FM-Towns Audio"
-msgstr ""
+msgstr "FM-Towns Ääni"
#: audio/softsynth/fmtowns_pc98/towns_pc98_plugins.cpp:58
-#, fuzzy
msgid "PC-98 Audio"
-msgstr "Ääni"
+msgstr "PC-98 Ääni"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Alustetaan MT-32 emulaattoria"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "MT-32 emulaattori"
@@ -2050,19 +2033,20 @@ msgid "C64 Audio Emulator"
msgstr "C64 Audio emulaattori"
#: backends/cloud/storage.cpp:211
-#, fuzzy
msgid "Saved games sync complete."
-msgstr "Skannaus on valmis!"
+msgstr "Pelitallennusten synkronointi valmis."
#: backends/cloud/storage.cpp:222
msgid "Saved games sync was cancelled."
-msgstr ""
+msgstr "Pelitallennusten synkronointi peruttiin."
#: backends/cloud/storage.cpp:224
msgid ""
"Saved games sync failed.\n"
"Check your Internet connection."
msgstr ""
+"Pelitallennusten synkronointi epäonnistui.\n"
+"Tarkista verkkoyhteytesi."
#: backends/cloud/storage.cpp:328
#, c-format
@@ -2070,16 +2054,16 @@ msgid ""
"Download complete.\n"
"Failed to download %u files."
msgstr ""
+"Lataus valmis.\n"
+"%u:n tiedoston lataus epäonnistui."
#: backends/cloud/storage.cpp:330
-#, fuzzy
msgid "Download complete."
-msgstr "Skannaus on valmis!"
+msgstr "Lataus valmis."
#: backends/cloud/storage.cpp:340
-#, fuzzy
msgid "Download failed."
-msgstr "Lataa peli:"
+msgstr "Lataus epäonnistui."
#: backends/events/default/default-events.cpp:196
msgid "Do you really want to return to the Launcher?"
@@ -2130,7 +2114,7 @@ msgstr "Nostetaan äänenvoimakkuutta"
#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
-msgstr "Minimi äänenvoimakkuus"
+msgstr "Pienin äänenvoimakkuus"
#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
@@ -2145,9 +2129,8 @@ msgid "Clicking Disabled"
msgstr "Klikkaus pois päältä"
#: backends/events/openpandora/op-events.cpp:174
-#, fuzzy
msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
-msgstr "Kosketusnäytön 'Tap moodi' - ei klikkausta"
+msgstr "Kosketusnäytön 'Tap moodi' - Hover (DPad klikkaus)"
#: backends/events/symbiansdl/symbiansdl-events.cpp:186
msgid "Do you want to quit ?"
@@ -2155,39 +2138,37 @@ msgstr "Haluatko lopettaa?"
#. I18N: Trackpad mode toggle status.
#: backends/events/webossdl/webossdl-events.cpp:308
-#, fuzzy
msgid "Trackpad mode is now"
-msgstr "Touchpad tila pois päältä"
+msgstr "Trackpad tila on nyt"
#. I18N: Trackpad mode on or off.
#. I18N: Auto-drag on or off.
#: backends/events/webossdl/webossdl-events.cpp:311
#: backends/events/webossdl/webossdl-events.cpp:338
msgid "ON"
-msgstr ""
+msgstr "PÄÄLLÄ"
#: backends/events/webossdl/webossdl-events.cpp:311
#: backends/events/webossdl/webossdl-events.cpp:338
msgid "OFF"
-msgstr ""
+msgstr "POIS"
#: backends/events/webossdl/webossdl-events.cpp:315
msgid "Swipe two fingers to the right to toggle."
-msgstr ""
+msgstr "Muuta tilaa pyyhkäisemällä kahdella sormella oikealle."
#. I18N: Auto-drag toggle status.
#: backends/events/webossdl/webossdl-events.cpp:335
msgid "Auto-drag mode is now"
-msgstr ""
+msgstr "Automaattiraahaustila on nyt"
#: backends/events/webossdl/webossdl-events.cpp:342
msgid "Swipe three fingers to the right to toggle."
-msgstr ""
+msgstr "Muuta tilaa pyyhkäisemällä kolmella sormella oikealle."
#: backends/graphics/opengl/opengl-graphics.cpp:146
-#, fuzzy
msgid "OpenGL"
-msgstr "Avaa"
+msgstr "OpenGL"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:617
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2462
@@ -2197,7 +2178,7 @@ msgstr "Ikkunoitu tila"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:710
#, c-format
msgid "Resolution: %dx%d"
-msgstr ""
+msgstr "Resoluutio: %dx%d"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:731
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2338
@@ -2211,15 +2192,13 @@ msgstr "Kuvasuhteen korjaus pois päältä"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:753
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2362
-#, fuzzy
msgid "Filtering enabled"
-msgstr "Klikkaus päällä"
+msgstr "Suodatus päällä"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:755
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2364
-#, fuzzy
msgid "Filtering disabled"
-msgstr "Klikkaus pois päältä"
+msgstr "Suodatus pois päältä"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:47
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
@@ -2234,7 +2213,7 @@ msgstr "Normaali (ei skaalausta)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2417
msgid "Active graphics filter:"
-msgstr "Valittu grafiikkafiltteri:"
+msgstr "Valittu grafiikkasuodatin:"
#: backends/keymapper/remap-dialog.cpp:48
msgid "Keymap:"
@@ -2242,7 +2221,7 @@ msgstr "Näppäinkartta:"
#: backends/keymapper/remap-dialog.cpp:67
msgid " (Effective)"
-msgstr ""
+msgstr " (Efektiivinen)"
#: backends/keymapper/remap-dialog.cpp:107
msgid " (Active)"
@@ -2295,7 +2274,7 @@ msgstr "Kosketuksen X siirros"
#: backends/platform/ds/arm9/source/dsoptions.cpp:75
msgid "Touch Y Offset"
-msgstr "Kosketuksen Y siirto"
+msgstr "Kosketuksen Y korjaus"
#: backends/platform/ds/arm9/source/dsoptions.cpp:87
msgid "Use laptop trackpad-style cursor control"
@@ -2304,7 +2283,7 @@ 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 "
+"Napauta kerran vasenta klikkausta varten, napauta kahdesti oikeaa klikkausta "
"varten"
#: backends/platform/ds/arm9/source/dsoptions.cpp:90
@@ -2313,7 +2292,7 @@ msgstr "Herkkyys"
#: backends/platform/ds/arm9/source/dsoptions.cpp:99
msgid "Initial top screen scale:"
-msgstr ""
+msgstr "Alustava yläruudun skaalaus:"
#: backends/platform/ds/arm9/source/dsoptions.cpp:105
msgid "Main screen scaling:"
@@ -2329,7 +2308,7 @@ 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)"
+msgstr "Ei skaalattu (vieritä vasemmalle ja oikealle itse)"
#: backends/platform/ds/arm9/source/dsoptions.cpp:111
msgid "Brightness:"
@@ -2337,11 +2316,11 @@ msgstr "Kirkkaus:"
#: backends/platform/ds/arm9/source/dsoptions.cpp:121
msgid "High quality audio (slower) (reboot)"
-msgstr "Korkealuokkainen ääni (hidas) (buuttaus)"
+msgstr "Korkealaatuinen ääni (hidas) (buuttaus)"
#: backends/platform/ds/arm9/source/dsoptions.cpp:122
msgid "Disable power off"
-msgstr ""
+msgstr "Poista virran sammutus käytöstä"
#: backends/platform/ios7/ios7_osys_events.cpp:309
#: backends/platform/ios7/ios7_osys_events.cpp:519
@@ -2359,7 +2338,7 @@ msgstr "Hiiren vedä-ja-pudota tila pois käytöstä."
#: backends/platform/ios7/ios7_osys_events.cpp:540
#: backends/platform/iphone/osys_events.cpp:313
msgid "Touchpad mode enabled."
-msgstr "Touchad tila päällä."
+msgstr "Touchpad tila päällä."
#: backends/platform/ios7/ios7_osys_events.cpp:324
#: backends/platform/ios7/ios7_osys_events.cpp:542
@@ -2434,13 +2413,13 @@ msgstr "Oikea"
#: backends/platform/symbian/src/SymbianActions.cpp:46
#: backends/platform/wince/CEActionsSmartphone.cpp:47
msgid "Zone"
-msgstr ""
+msgstr "Alue"
#: backends/platform/symbian/src/SymbianActions.cpp:47
#: backends/platform/wince/CEActionsPocket.cpp:54
#: backends/platform/wince/CEActionsSmartphone.cpp:48
msgid "Multi Function"
-msgstr ""
+msgstr "Monitoiminen"
#: backends/platform/symbian/src/SymbianActions.cpp:48
msgid "Swap character"
@@ -2452,7 +2431,7 @@ msgstr "Ohita teksti"
#: backends/platform/symbian/src/SymbianActions.cpp:51
msgid "Fast mode"
-msgstr "Nopea moodi"
+msgstr "Nopea tila"
#: backends/platform/symbian/src/SymbianActions.cpp:53
msgid "Debugger"
@@ -2476,7 +2455,7 @@ msgstr "Klikkaa oikealla kerran"
#: backends/platform/tizen/form.cpp:271
msgid "Move Only"
-msgstr ""
+msgstr "Vain siirto"
#: backends/platform/tizen/form.cpp:294
msgid "Escape Key"
@@ -2496,24 +2475,23 @@ msgstr "Ohjaa hiirtä"
#: backends/platform/tizen/fs.cpp:259
msgid "[ Data ]"
-msgstr ""
+msgstr "[ Data ]"
#: backends/platform/tizen/fs.cpp:263
msgid "[ Resources ]"
-msgstr ""
+msgstr "[ Resurssit ]"
#: backends/platform/tizen/fs.cpp:267
msgid "[ SDCard ]"
-msgstr ""
+msgstr "[ SD-kortti ]"
#: backends/platform/tizen/fs.cpp:271
msgid "[ Media ]"
-msgstr ""
+msgstr "[ Media ]"
#: backends/platform/tizen/fs.cpp:275
-#, fuzzy
msgid "[ Shared ]"
-msgstr "Jako:"
+msgstr "[ Jaettu ]"
#: backends/platform/wii/options.cpp:51
msgid "Video"
@@ -2525,15 +2503,15 @@ msgstr "Nykyinen videotila:"
#: backends/platform/wii/options.cpp:56
msgid "Double-strike"
-msgstr ""
+msgstr "Lomittamaton (Double-strike)"
#: backends/platform/wii/options.cpp:60
msgid "Horizontal underscan:"
-msgstr "Horisontaalinenunderscan:"
+msgstr "Vaakasuora underscan:"
#: backends/platform/wii/options.cpp:66
msgid "Vertical underscan:"
-msgstr "Vertikaalinen underscan:"
+msgstr "Pystysuora underscan:"
#: backends/platform/wii/options.cpp:71
msgid "Input"
@@ -2545,7 +2523,7 @@ msgstr "GC Padin herkkyys:"
#: backends/platform/wii/options.cpp:80
msgid "GC Pad acceleration:"
-msgstr "GC PAdin kiihtyvyys:"
+msgstr "GC Padin kiihtyvyys:"
#: backends/platform/wii/options.cpp:86
msgid "DVD"
@@ -2589,7 +2567,7 @@ msgstr "Alusta verkko"
#: backends/platform/wii/options.cpp:123
msgid "Mount SMB"
-msgstr "Mounttaa SMB"
+msgstr "Liitä SMB"
#: backends/platform/wii/options.cpp:124
msgid "Unmount SMB"
@@ -2597,7 +2575,7 @@ msgstr "Vapauta SMB"
#: backends/platform/wii/options.cpp:143
msgid "DVD Mounted successfully"
-msgstr "DVD mountattu onnistuneesti"
+msgstr "DVD liitetty onnistuneesti"
#: backends/platform/wii/options.cpp:146
msgid "Error while mounting the DVD"
@@ -2679,19 +2657,19 @@ msgstr "Määritä näppäimet"
#: backends/platform/wince/CEActionsPocket.cpp:56
msgid "Cursor Up"
-msgstr "Nuoli ylös"
+msgstr "Kursori ylös"
#: backends/platform/wince/CEActionsPocket.cpp:57
msgid "Cursor Down"
-msgstr "Nuoli alas"
+msgstr "Kursori alas"
#: backends/platform/wince/CEActionsPocket.cpp:58
msgid "Cursor Left"
-msgstr "Nuoli vasemmalle"
+msgstr "Kursori vasemmalle"
#: backends/platform/wince/CEActionsPocket.cpp:59
msgid "Cursor Right"
-msgstr "Nuoli oikealle"
+msgstr "Kursori oikealle"
#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
@@ -2762,23 +2740,50 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Tarkista päivitykset..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr "\"%s\" pelimoottorin datatiedostoa ei löydetty."
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr "\"%s\" pelimoottorin datatiedosto on korruptoitunut."
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+"\"%s\" pelimoottorin datatiedostosta löytyi väärä versio. Odotettu versio %d."
+"%d, löytynyt versio %d.%d."
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
-#, fuzzy
msgid "Color mode"
-msgstr "Klikkaus moodi"
+msgstr "Väritila"
#: engines/adl/detection.cpp:46 engines/adl/detection.cpp:56
msgid "Use color graphics"
-msgstr ""
+msgstr "Käytä värigrafiikkaa"
#: engines/adl/detection.cpp:65
msgid "Scanlines"
-msgstr ""
+msgstr "Vaakajuovat"
#: engines/adl/detection.cpp:66
-#, fuzzy
msgid "Show scanlines"
-msgstr "Näytä esineiden tiedot"
+msgstr "Näytä vaakajuovat"
#: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70
#: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:48
@@ -2792,48 +2797,50 @@ msgstr "Käytä alkuperäisiä tallenna/lataa valikkoja"
#: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:49
#: engines/neverhood/detection.cpp:178 engines/sci/detection.cpp:431
#: engines/sherlock/detection.cpp:72 engines/toltecs/detection.cpp:201
-#, fuzzy
msgid "Use the original save/load screens instead of the ScummVM ones"
-msgstr "Käytä alkuperäisiä tallenna/lataa valikkoja, ScummVM valikoiden sijaan"
+msgstr "Käytä alkuperäisiä tallenna/lataa valikkoja ScummVM valikoiden sijaan"
#: engines/agi/detection.cpp:157
-#, fuzzy
msgid "Use an alternative palette"
-msgstr "Käytä vaihtoehtoista pelin introa (vain CD versiossa)"
+msgstr "Käytä vaihtoehtoista palettia"
#: engines/agi/detection.cpp:158
msgid ""
"Use an alternative palette, common for all Amiga games. This was the old "
"behavior"
msgstr ""
+"Käytä vaihtoehtoista väripalettia, joka on yleinen kaikissa Amigapeleissä. "
+"Tämä on vanha toimintamalli"
#: engines/agi/detection.cpp:167
-#, fuzzy
msgid "Mouse support"
-msgstr "Ohita tuki"
+msgstr "Hiirituki"
#: engines/agi/detection.cpp:168
msgid ""
"Enables mouse support. Allows to use mouse for movement and in game menus."
-msgstr ""
+msgstr "Aktivoi hiirituen. Mahdollistaa hiiren käyttämisen pelivalikoissa."
#: engines/agi/detection.cpp:177
msgid "Use Hercules hires font"
-msgstr ""
+msgstr "Käytä korkearesoluutioista Hercules-fonttia"
#: engines/agi/detection.cpp:178
msgid "Uses Hercules hires font, when font file is available."
msgstr ""
+"Käyttää korkearesoluutioista Hercules-fonttia jos tiedosto on saatavilla."
#: engines/agi/detection.cpp:187
msgid "Pause when entering commands"
-msgstr ""
+msgstr "Pysäytä käskyjen syöttämisen ajaksi"
#: engines/agi/detection.cpp:188
msgid ""
"Shows a command prompt window and pauses the game (like in SCI) instead of a "
"real-time prompt."
msgstr ""
+"Näyttää komentokehoitteen ja pysäyttää pelin (kuten SCI:ssä) reaaliaikaisen "
+"kehoitteen sijaan."
#: engines/agi/saveload.cpp:774 engines/avalanche/parser.cpp:1888
#: engines/cge/events.cpp:83 engines/cge2/events.cpp:76
@@ -2841,8 +2848,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2854,15 +2861,15 @@ msgstr "Lataa pelitallenne:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
msgstr "Lataa tallenne"
#: engines/agos/saveload.cpp:159 engines/scumm/scumm.cpp:2436
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to load saved game from file:\n"
"\n"
@@ -2873,7 +2880,7 @@ msgstr ""
"%s"
#: engines/agos/saveload.cpp:194 engines/scumm/scumm.cpp:2429
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to save game to file:\n"
"\n"
@@ -2884,7 +2891,7 @@ msgstr ""
"%s"
#: engines/agos/saveload.cpp:202 engines/scumm/scumm.cpp:2447
-#, fuzzy, c-format
+#, c-format
msgid ""
"Successfully saved game in file:\n"
"\n"
@@ -2900,16 +2907,14 @@ msgid "Cutscene file '%s' not found!"
msgstr "Videotiedostoa '%s' ei löytynyt!"
#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:101
-#, fuzzy
msgid "Color Blind Mode"
-msgstr "Klikkaus moodi"
+msgstr "Värisokeustila"
#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:102
msgid "Enable Color Blind Mode by default"
-msgstr ""
+msgstr "Aktivoi värisokeustila vakiona"
#: engines/drascula/saveload.cpp:47
-#, fuzzy
msgid ""
"ScummVM found that you have old saved games for Drascula that should be "
"converted.\n"
@@ -2919,8 +2924,8 @@ msgid ""
"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"
+"Drascula: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"
@@ -2935,40 +2940,37 @@ msgstr "Näytä grafiikat käyttäen pelin kirkasta palettia"
#: engines/gob/inter_playtoons.cpp:255 engines/gob/inter_v2.cpp:1467
#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
-#, fuzzy
msgid "Failed to load saved game from file."
msgstr "Pelitallenteen lataaminen tiedostosta epäonnistui."
#: engines/gob/inter_v2.cpp:1537 engines/gob/inter_geisha.cpp:263
#: engines/tinsel/saveload.cpp:545
-#, fuzzy
msgid "Failed to save game to file."
msgstr "Pelin tallentaminen tiedostoon epäonnistui."
#: engines/gob/inter_v5.cpp:107
msgid "Failed to delete file."
-msgstr "Tiedoston tuhoaminen ei onnistunut."
+msgstr "Tiedoston poistaminen ei onnistunut."
#: engines/groovie/detection.cpp:312
-#, fuzzy
msgid "Fast movie speed"
-msgstr "Nopea moodi"
+msgstr "Nopea videontoisto"
#: engines/groovie/detection.cpp:313
msgid "Play movies at an increased speed"
-msgstr ""
+msgstr "Toista videot nopeampana"
#: engines/groovie/script.cpp:407
msgid "Failed to save game"
-msgstr "Pelin tallentaminen epäonnistui"
+msgstr "Pelitilan tallentaminen epäonnistui"
#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
msgid "Gore Mode"
-msgstr ""
+msgstr "Hurmemoodi"
#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
msgid "Enable Gore Mode when available"
-msgstr ""
+msgstr "Aktivoi hurmemoodi jos saatavilla"
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
@@ -2992,11 +2994,11 @@ 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"
+msgstr "Heliumtila"
#: engines/kyra/detection.cpp:85
msgid "Enable helium mode"
-msgstr "Käytä helium moodia"
+msgstr "Käytä heliumtilaa"
#. I18N: When enabled, this option makes scrolling smoother when
#. changing from one screen to another.
@@ -3037,12 +3039,10 @@ msgid "Move Back"
msgstr "Liiku taaksepäin"
#: engines/kyra/eobcommon.cpp:333
-#, fuzzy
msgid "Move Left"
msgstr "Liiku vasemmalle"
#: engines/kyra/eobcommon.cpp:334
-#, fuzzy
msgid "Move Right"
msgstr "Liiku oikealle"
@@ -3057,46 +3057,44 @@ msgid "Turn Right"
msgstr "Käänny oikealle"
#: engines/kyra/eobcommon.cpp:337
-#, fuzzy
msgid "Open/Close Inventory"
-msgstr "Tavarat"
+msgstr "Avaa/Sulje Inventorio"
#: engines/kyra/eobcommon.cpp:338
msgid "Switch Inventory/Character screen"
-msgstr ""
+msgstr "Vaihda Inventorio/Hahmo näyttö"
#: engines/kyra/eobcommon.cpp:339
msgid "Camp"
-msgstr ""
+msgstr "Leiriydy"
#: engines/kyra/eobcommon.cpp:340
-#, fuzzy
msgid "Cast Spell"
-msgstr "Valitse loitsu"
+msgstr "Lue loitsu"
#: engines/kyra/eobcommon.cpp:343
msgid "Spell Level 1"
-msgstr ""
+msgstr "Loitsutaso 1"
#: engines/kyra/eobcommon.cpp:344
msgid "Spell Level 2"
-msgstr ""
+msgstr "Loitsutaso 2"
#: engines/kyra/eobcommon.cpp:345
msgid "Spell Level 3"
-msgstr ""
+msgstr "Loitsutaso 3"
#: engines/kyra/eobcommon.cpp:346
msgid "Spell Level 4"
-msgstr ""
+msgstr "Loitsutaso 4"
#: engines/kyra/eobcommon.cpp:347
msgid "Spell Level 5"
-msgstr ""
+msgstr "Loitsutaso 5"
#: engines/kyra/eobcommon.cpp:356
msgid "Spell Level 6"
-msgstr ""
+msgstr "Loitsutaso 6"
#: engines/kyra/lol.cpp:478
msgid "Attack 1"
@@ -3112,11 +3110,11 @@ msgstr "Hyökkäys 3"
#: engines/kyra/lol.cpp:483
msgid "Slide Left"
-msgstr "Liiku vasemmalle"
+msgstr "Liu'u vasemmalle"
#: engines/kyra/lol.cpp:484
msgid "Slide Right"
-msgstr "Liiku oikealle"
+msgstr "Liu'u oikealle"
#: engines/kyra/lol.cpp:487
msgid "Rest"
@@ -3139,7 +3137,9 @@ msgid ""
"some tracks sound incorrect."
msgstr ""
"Käytät General MIDI-äänilaitetta, mutta peli\n"
-"tukee vain Roland MT-32:sta. Jotkut ääniraidat\n"
+"tukee vain Roland MT32 MIDI:ä. Yritämme\n"
+"yhdistää Roland MT32 instrumentit sopiviin\n"
+"General MIDI instrumentteihin. Jotkut ääniraidat\n"
"eivät ehkä kuulosta siltä miltä niiden pitäisi."
#: engines/kyra/saveload_eob.cpp:557
@@ -3152,6 +3152,12 @@ msgid ""
"Do you wish to use this saved game file with ScummVM?\n"
"\n"
msgstr ""
+"Seuraava alkuperäinen pelitallennus löydettiin pelipolustasi:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Haluatko käyttää tätä tallennusta ScummVM:ssä?\n"
+"\n"
#: engines/kyra/saveload_eob.cpp:590
#, c-format
@@ -3159,6 +3165,8 @@ msgid ""
"A saved game file was found in the specified slot %d. Overwrite?\n"
"\n"
msgstr ""
+"Numerolla %d on jo pelitallennus. Ylikirjoitetaanko?\n"
+"\n"
#: engines/kyra/saveload_eob.cpp:623
#, c-format
@@ -3169,35 +3177,38 @@ msgid ""
"'import_savefile'.\n"
"\n"
msgstr ""
+"%d alkuperäistä pelitallennusta onnistuneesti ladattu ScummVM:ään.\n"
+"Jos haluat myöhemmin ladata pelitallennuksia käsin, joudut avaamaan\n"
+"ScummVM:n debug konsolin ja käyttämään komentoa \"import_savefile\".\n"
+"\n"
#: engines/mads/detection.cpp:91
msgid "Easy mouse interface"
-msgstr ""
+msgstr "Helppo hiirikäyttöliittymä"
#: engines/mads/detection.cpp:92
-#, fuzzy
msgid "Shows object names when hovering the mouse over them"
-msgstr "Näytä esineiden kuvaus kohdistaessasi kursorin esineen ylle"
+msgstr "Näytä esineiden kuvauksen kohdistaessasi kursorin esineen ylle"
#: engines/mads/detection.cpp:101 engines/mads/detection.cpp:102
msgid "Animated inventory items"
-msgstr ""
+msgstr "Animoidut inventorioesineet"
#: engines/mads/detection.cpp:111 engines/mads/detection.cpp:112
msgid "Animated game interface"
-msgstr ""
+msgstr "Animoitu pelikäyttöliittymä"
#: engines/mads/detection.cpp:121 engines/mads/detection.cpp:122
msgid "Naughty game mode"
-msgstr ""
+msgstr "Tuhma pelitila"
#: engines/mohawk/detection.cpp:169
msgid "Play the Myst fly by movie"
-msgstr ""
+msgstr "Soita Myst fly by-video"
#: engines/mohawk/detection.cpp:170
msgid "The Myst fly by movie was not played by the original engine."
-msgstr ""
+msgstr "Alkuperäinen pelimoottori ei toistanut Myst fly by-videota."
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:181 engines/mohawk/dialogs.cpp:267
@@ -3206,50 +3217,54 @@ msgstr "~Z~ip moodi valittu"
#: engines/mohawk/dialogs.cpp:182
msgid "~T~ransitions Enabled"
-msgstr "Siirtymät päällä"
+msgstr "Siir~t~ymät päällä"
#. I18N: Drop book page
#: engines/mohawk/dialogs.cpp:184
msgid "~D~rop Page"
-msgstr "Pudota sivu"
+msgstr "Pu~d~ota sivu"
#: engines/mohawk/dialogs.cpp:188
-#, fuzzy
msgid "Show ~M~ap"
-msgstr "Näytä kartta"
+msgstr "Näytä ~K~artta"
#: engines/mohawk/dialogs.cpp:194
-#, fuzzy
msgid "Main Men~u~"
-msgstr "Päävalikko"
+msgstr "Päävalikko ~u~"
#: engines/mohawk/dialogs.cpp:268
msgid "~W~ater Effect Enabled"
-msgstr "Vesiefekti päällä"
+msgstr "~V~esiefekti päällä"
#: engines/mohawk/riven.cpp:150
msgid ""
"You're missing a Riven executable. The Windows executable is 'riven.exe' or "
"'rivendmo.exe'. "
msgstr ""
+"Sinulta puuttuu Riven ohjelmatiedosto. WIndowsissa tiedosto on nimeltään "
+"\"riven.exe\" tai \"rivendmo.exe\". "
#: engines/mohawk/riven.cpp:151
msgid ""
"Using the 'arcriven.z' installer file also works. In addition, you can use "
"the Mac 'Riven' executable."
msgstr ""
+"\"archriven.z\" asennustiedoston käyttö toimii myös. Lisäksi voit käyttää "
+"Macin \"Riven\"-ohjelmatiedostoa."
#: engines/mohawk/riven.cpp:162
msgid ""
"You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also "
"works."
msgstr ""
+"Sinulta puuttuu \"extras.mhk\". \"archriven.z\" asennustiedoston käyttö "
+"toimii myös."
#: engines/mohawk/riven_external.cpp:213
msgid ""
"Exploration beyond this point available only within the full version of\n"
"the game."
-msgstr ""
+msgstr "Tutkiminen tätä pidemmälle on mahdollista vain pelin täysversiossa."
#: engines/mohawk/riven_external.cpp:655
msgid ""
@@ -3259,27 +3274,32 @@ msgid ""
"the game. ScummVM cannot do that and\n"
"the site no longer exists."
msgstr ""
+"Tässä kohtaa Rivenin demo kysyisi\n"
+"josko haluaisit avata selaimen\n"
+"viedäkseen sinut Red Orb-kauppaan\n"
+"josta voisit ostaa pelin. ScummVM ei\n"
+"voi tehdä sitä ja sivustoa ei ole enää\n"
+"olemassa."
#: engines/mohawk/mohawk.cpp:61
-#, fuzzy
msgid "The game is paused. Press any key to continue."
-msgstr "Pause. Paina välilyöntiä jatkaaksesi."
+msgstr "Pause. Paina mitä tahansa nappia jatkaaksesi."
#: engines/neverhood/detection.cpp:184
msgid "Skip the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Ohita Hall of Records storyboardkohtaukset"
#: engines/neverhood/detection.cpp:185
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Sallii pelaajan ohittaa Hall of Records storyboardkohtaukset"
#: engines/neverhood/detection.cpp:191
msgid "Scale the making of videos to full screen"
-msgstr ""
+msgstr "Skaalaa making of-videot koko ruudun kokoiseksi"
#: engines/neverhood/detection.cpp:192
msgid "Scale the making of videos, so that they use the whole screen"
-msgstr ""
+msgstr "Skaalaa making of-videot niin että ne käyttävät koko ruudun tilan"
#: engines/parallaction/saveload.cpp:130
#, c-format
@@ -3287,29 +3307,26 @@ msgid ""
"Can't save game in slot %i\n"
"\n"
msgstr ""
-"Pelin tallennus kohtaan ei onnistunut kohtaan %i\n"
+"Pelin tallennus ei onnistunut kohtaan %i\n"
"\n"
#: engines/parallaction/saveload.cpp:194
-#, fuzzy
msgid "Load file"
-msgstr "Lataa peli:"
+msgstr "Lataa tiedosto"
#: engines/parallaction/saveload.cpp:201
msgid "Loading game..."
msgstr "Ladataan peliä..."
#: engines/parallaction/saveload.cpp:209
-#, fuzzy
msgid "Save file"
-msgstr "Tallenna peli:"
+msgstr "Tallenna tiedosto"
#: engines/parallaction/saveload.cpp:216
msgid "Saving game..."
msgstr "Tallennetaan peliä..."
#: engines/parallaction/saveload.cpp:269
-#, fuzzy
msgid ""
"ScummVM found that you have old saved games for Nippon Safes that should be "
"renamed.\n"
@@ -3318,17 +3335,17 @@ msgid ""
"\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"
+"ScummVM löysi pelille Nippon Safes vanhoja pelitallennuksia jotka pitäisi "
+"uudelleennimetä.\n"
+"Vanhoja nimiä ei enää tueta, joten et pysty lataamaan tallenteitasi ellet "
+"muuta niiden nimiä.\n"
+"\n"
+"Paina OK nimetäksesi tallenteet nyt, muuten kysymme sinulta uudestaan "
+"seuraavalla kerralla. \n"
#: engines/parallaction/saveload.cpp:316
-#, fuzzy
msgid "ScummVM successfully converted all your saved games."
-msgstr "ScummVM muunsi kaikki pelitallenteet onnistuneesti"
+msgstr "ScummVM muunsi kaikki pelitallenteet onnistuneesti."
#: engines/parallaction/saveload.cpp:318
msgid ""
@@ -3343,40 +3360,39 @@ msgstr ""
#: engines/pegasus/pegasus.cpp:714
msgid "Invalid file name for saving"
-msgstr ""
+msgstr "Viallinen tiedostonnimi tallennukselle"
#: engines/pegasus/pegasus.cpp:2507
msgid "Up/Zoom In/Move Forward/Open Doors"
-msgstr ""
+msgstr "Ylös/Zoomi Sisään/Liiku Eteen/Avaa Ovia"
#: engines/pegasus/pegasus.cpp:2508
-#, fuzzy
msgid "Down/Zoom Out"
-msgstr "Zoomaa ylös"
+msgstr "Alas/Zoomaa ylös"
#: engines/pegasus/pegasus.cpp:2511
msgid "Display/Hide Inventory Tray"
-msgstr ""
+msgstr "Näytä/Piilota Inventorio"
#: engines/pegasus/pegasus.cpp:2512
msgid "Display/Hide Biochip Tray"
-msgstr ""
+msgstr "Näytä/Piilota Biochip"
#: engines/pegasus/pegasus.cpp:2513
msgid "Action/Select"
-msgstr ""
+msgstr "Toiminto/Valitse"
#: engines/pegasus/pegasus.cpp:2514
msgid "Toggle Center Data Display"
-msgstr ""
+msgstr "Aktivoi Keskidatanäyttö"
#: engines/pegasus/pegasus.cpp:2515
msgid "Display/Hide Info Screen"
-msgstr ""
+msgstr "Näytä/Piilota Infonäyttö"
#: engines/pegasus/pegasus.cpp:2516
msgid "Display/Hide Pause Menu"
-msgstr ""
+msgstr "Näytä/Piilota Pausevalikko"
#: engines/queen/detection.cpp:56
msgid "Alternative intro"
@@ -3388,30 +3404,28 @@ msgstr "Käytä vaihtoehtoista pelin introa (vain CD versiossa)"
#: engines/sci/detection.cpp:390
msgid "Skip EGA dithering pass (full color backgrounds)"
-msgstr ""
+msgstr "Ohita EGA dithering pass (täysväritaustat)"
#: engines/sci/detection.cpp:391
msgid "Skip dithering pass in EGA games, graphics are shown with full colors"
-msgstr ""
+msgstr "Ohita dithering pass EGA peleissä, grafiikat näytetään täysvärisenä"
#: engines/sci/detection.cpp:400
-#, fuzzy
msgid "Enable high resolution graphics"
-msgstr "Käytä kestopisteissä värillisiä grafiikkapalkkeja numeroiden sijaan"
+msgstr "Käytä korkearesoluutioista grafiikkaa"
#: engines/sci/detection.cpp:401
-#, fuzzy
msgid "Enable high resolution graphics/content"
-msgstr "Käytä kestopisteissä värillisiä grafiikkapalkkeja numeroiden sijaan"
+msgstr "Käytä korkearesoluutioista grafiikkaa/sisältöä"
#: engines/sci/detection.cpp:410
-#, fuzzy
msgid "Enable black-lined video"
-msgstr "Käytä Roland GS moodia"
+msgstr "Käytä mustia vuoroviivoja videoissa"
#: engines/sci/detection.cpp:411
msgid "Draw black lines over videos to increase their apparent sharpness"
msgstr ""
+"Piirrä mustia vuoroviivoja videoihin jotta ne näyttäisivät terävämmiltä"
#: engines/sci/detection.cpp:420
msgid "Prefer digital sound effects"
@@ -3435,7 +3449,7 @@ msgstr ""
#: engines/sci/detection.cpp:451
msgid "Use CD audio"
-msgstr "Käytä CD:n ääntä"
+msgstr "Käytä CD-ääntä"
#: engines/sci/detection.cpp:452
msgid "Use CD audio instead of in-game audio, if available"
@@ -3456,7 +3470,6 @@ msgid "Use silver cursors"
msgstr "Käytä hopeisia kursoreita"
#: engines/sci/detection.cpp:474
-#, fuzzy
msgid ""
"Use the alternate set of silver cursors instead of the normal golden ones"
msgstr "Käytä vaihtoehtoisia hopeisia kursoreita normaalien kultaisten sijaan"
@@ -3469,6 +3482,10 @@ msgid ""
"tried\n"
"to add and its version, language, etc.:\n"
msgstr ""
+"Peliversiosi vaikuttaa olevan tuntematon. Jos tämä *EI* ole faniversio\n"
+"(esim. fanikäännös), ole kiltti ja raportoi seuraavat tiedot ScummVM:n "
+"kehittäjille pelin nimen,\n"
+"version, kielen, yms. kera.\n"
#: engines/scumm/detection.cpp:1138
msgid ""
@@ -3476,15 +3493,17 @@ msgid ""
"piracy.\n"
"The full version is available for purchase from the iTunes Store."
msgstr ""
+"Putt-Putt Saves the Zoo iOS:in kevytversio ei ole tuettu piratismin "
+"ehkäisemiseksi.\n"
+"Kokoversion voi ostaa iTunes-kaupasta."
#: engines/scumm/detection.cpp:1341
-#, fuzzy
msgid "Show Object Line"
msgstr "Näytä esineiden tiedot"
#: engines/scumm/detection.cpp:1342
msgid "Show the names of objects at the bottom of the screen"
-msgstr ""
+msgstr "Näytä esineiden nimet näytön alalaidassa"
#: engines/scumm/dialogs.cpp:172
#, c-format
@@ -3494,7 +3513,7 @@ msgstr "Lisää levyke %c ja paina jotain nappia jatkaaksesi."
#: engines/scumm/dialogs.cpp:173
#, c-format
msgid "Unable to Find %s, (%c%d) Press Button."
-msgstr "Tiedosto %s, (%c%d) ei löydy. Paina nappia."
+msgstr "Tiedostoa %s, (%c%d) ei löydy. Paina nappia."
#: engines/scumm/dialogs.cpp:174
#, c-format
@@ -3509,15 +3528,13 @@ msgstr "Pause. Paina välilyöntiä jatkaaksesi."
#. "Moechten Sie wirklich neu starten? (J/N)J"
#. Will react to J as 'Yes'
#: engines/scumm/dialogs.cpp:179
-#, fuzzy
msgid "Are you sure you want to restart? (Y/N)Y"
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:181
-#, fuzzy
msgid "Are you sure you want to quit? (Y/N)Y"
-msgstr "Haluatko varmati lopettaa?"
+msgstr "Haluatko varmati lopettaa? (K/E)K"
#: engines/scumm/dialogs.cpp:186
msgid "Play"
@@ -3525,7 +3542,7 @@ msgstr "Pelaa"
#: engines/scumm/dialogs.cpp:190
msgid "Insert save/load game disk"
-msgstr "Laita tallennus/lataus levy asemaan"
+msgstr "Laita tallennus/lataus levyke asemaan"
#: engines/scumm/dialogs.cpp:191
msgid "You must enter a name"
@@ -3559,7 +3576,7 @@ msgstr "Valitse ladattava peli"
#: engines/scumm/dialogs.cpp:198
msgid "Game title)"
-msgstr "Pelin nimi"
+msgstr "Pelin nimi)"
#. I18N: Previous page button
#: engines/scumm/dialogs.cpp:284
@@ -3610,11 +3627,11 @@ msgstr "Yleisiä näppäimistökomentoja:"
#: engines/scumm/help.cpp:75
msgid "Save / Load dialog"
-msgstr "Tallenna / Lataa peli"
+msgstr "Tallenna / Lataa dialogi"
#: engines/scumm/help.cpp:77
msgid "Skip line of text"
-msgstr "Ohita rivi tekstiä"
+msgstr "Ohita tekstirivi"
#: engines/scumm/help.cpp:78
msgid "Esc"
@@ -3641,9 +3658,8 @@ msgid "Ctrl"
msgstr "Ctrl"
#: engines/scumm/help.cpp:80
-#, fuzzy
msgid "Load saved game 1-10"
-msgstr "Lataa pelitila 1-10"
+msgstr "Lataa pelitallennus 1-10"
#: engines/scumm/help.cpp:81 engines/scumm/help.cpp:85
#: engines/scumm/help.cpp:87 engines/scumm/help.cpp:101
@@ -3652,9 +3668,8 @@ msgid "Alt"
msgstr "Alt"
#: engines/scumm/help.cpp:81
-#, fuzzy
msgid "Save game 1-10"
-msgstr "Tallenna pelitila 1-10"
+msgstr "Luo pelitallennus 1-10"
#: engines/scumm/help.cpp:87 engines/scumm/help.cpp:90
msgid "Enter"
@@ -3670,7 +3685,7 @@ msgstr "Hidasta/nopeuta tekstiä"
#: engines/scumm/help.cpp:90
msgid "Simulate left mouse button"
-msgstr "Simuloi hiiren vasenta näppäintä"
+msgstr "Simuloi hiiren vasenta nappia"
#: engines/scumm/help.cpp:91
msgid "Tab"
@@ -3710,11 +3725,11 @@ msgstr "Kytke hiiren kaappaus päälle tai pois"
#: engines/scumm/help.cpp:101
msgid "Switch between graphics filters"
-msgstr "Vaihda grafiikkafiltteriä"
+msgstr "Vaihda grafiikkasuodatinta"
#: engines/scumm/help.cpp:102
msgid "Increase / Decrease scale factor"
-msgstr "Kasvata / vähennä skaalakerrointa"
+msgstr "Kasvata / vähennä skaalauskerrointa"
#: engines/scumm/help.cpp:103
msgid "Toggle aspect-ratio correction"
@@ -3738,7 +3753,7 @@ msgstr " mahdollisten virheiden vuoksi."
#: engines/scumm/help.cpp:115
msgid "Spinning drafts on the keyboard:"
-msgstr ""
+msgstr "Kehräysluonnokset näppäimistöllä:"
#: engines/scumm/help.cpp:117
msgid "Main game controls:"
@@ -3747,7 +3762,7 @@ msgstr "Pelin tärkeimmät kontrollit:"
#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137
#: engines/scumm/help.cpp:162
msgid "Push"
-msgstr "Paina"
+msgstr "Työnnä"
#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138
#: engines/scumm/help.cpp:163
@@ -3824,7 +3839,7 @@ msgstr "Pue ylle"
#: engines/scumm/help.cpp:151
msgid "Take off"
-msgstr "Lähde matkaan"
+msgstr "Riisu"
#: engines/scumm/help.cpp:157
msgid "Fix"
@@ -3992,27 +4007,27 @@ msgstr "Vieritä listaa alas"
#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:269
msgid "Upper left item"
-msgstr ""
+msgstr "Ylävasen esine"
#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271
msgid "Lower left item"
-msgstr ""
+msgstr "Alavasen esine"
#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:272
msgid "Upper right item"
-msgstr ""
+msgstr "Yläoikea esine"
#: engines/scumm/help.cpp:264 engines/scumm/help.cpp:274
msgid "Lower right item"
-msgstr ""
+msgstr "Alaoikea esine"
#: engines/scumm/help.cpp:270
msgid "Middle left item"
-msgstr ""
+msgstr "Keskivasen esine"
#: engines/scumm/help.cpp:273
msgid "Middle right item"
-msgstr ""
+msgstr "Keskioikea esine"
#: engines/scumm/help.cpp:280 engines/scumm/help.cpp:285
msgid "Switching characters:"
@@ -4028,23 +4043,23 @@ msgstr "Kolmas lapsi"
#: engines/scumm/help.cpp:292
msgid "Toggle Inventory/IQ Points display"
-msgstr ""
+msgstr "Inventorio/ÄÖ Pistenäyttö päälle/pois"
#: engines/scumm/help.cpp:293
msgid "Toggle Keyboard/Mouse Fighting (*)"
-msgstr ""
+msgstr "Näppäimistö/Hiiritappelu (*)"
#: engines/scumm/help.cpp:295
msgid "* Keyboard Fighting is always on,"
-msgstr ""
+msgstr "* Näppäimistötappelu on aina päällä,"
#: engines/scumm/help.cpp:296
msgid " so despite the in-game message this"
-msgstr ""
+msgstr " joten huolimatta viestistä pelissä tämä"
#: engines/scumm/help.cpp:297
msgid " actually toggles Mouse Fighting Off/On"
-msgstr ""
+msgstr " itseasiassa laittaa hiiritappelun päälle/pois"
#: engines/scumm/help.cpp:304
msgid "Fighting controls (numpad):"
@@ -4081,7 +4096,7 @@ msgstr "Lyö alas"
#: engines/scumm/help.cpp:315
msgid "Sucker punch"
-msgstr ""
+msgstr "Yllätyslyönti"
#: engines/scumm/help.cpp:318
msgid "These are for Indy on left."
@@ -4140,23 +4155,20 @@ msgid "Fly to lower right"
msgstr "Lennä alas oikealle"
#: engines/scumm/input.cpp:578
-#, fuzzy
msgid "Snap scroll on"
-msgstr "Pehmeä vieritys"
+msgstr "Snap scroll päälle"
#: engines/scumm/input.cpp:580
msgid "Snap scroll off"
-msgstr ""
+msgstr "Snap scroll pois päältä"
#: engines/scumm/input.cpp:593
-#, fuzzy
msgid "Music volume: "
-msgstr "Musiikki:"
+msgstr "Musiikin äänenvoimakkuus: "
#: engines/scumm/input.cpp:610
-#, fuzzy
msgid "Subtitle speed: "
-msgstr "Tekstin nopeus:"
+msgstr "Tekstityksen nopeus: "
#: engines/scumm/scumm.cpp:1880
#, c-format
@@ -4168,86 +4180,79 @@ msgstr ""
"%s puuttuu. Käytetään AdLibia sen sijaan."
#: engines/scumm/scumm.cpp:2733
-#, fuzzy
msgid ""
"Usually, Maniac Mansion would start now. But for that to work, the game "
"files for Maniac Mansion have to be in the 'Maniac' directory inside the "
"Tentacle game directory, and the game has to be added to ScummVM."
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ä."
+"Normaalisti Maniac Mansion käynnistyisi nyt. Jotta se olisi mahdollista, "
+"Maniac Mansionin pelitiedostojen pitää löytyä \"Maniac\"-kansiosta Tentacle-"
+"pelikansion sisältä, ja sen pitää myös olla lisätty pelinä ScummVM:ään."
#: engines/scumm/players/player_v3m.cpp:129
msgid ""
"Could not find the 'Loom' Macintosh executable to read the\n"
"instruments from. Music will be disabled."
msgstr ""
+"\"Loom\":in Macintosh ohjelmatiedostoa ei löydetty\n"
+"instrumenttien lukemiseksi. Emme soita musiikkia."
#: engines/scumm/players/player_v5m.cpp:107
msgid ""
"Could not find the 'Monkey Island' Macintosh executable to read the\n"
"instruments from. Music will be disabled."
msgstr ""
+"\"Monkey Island\":in Macintosh ohjelmatiedostoa ei löydetty\n"
+"instrumenttien lukemiseksi. Emme soita musiikkia."
#: engines/sherlock/detection.cpp:81
msgid "Pixellated scene transitions"
-msgstr ""
+msgstr "Pikselöidyt kohtauksenvaihdot"
#: engines/sherlock/detection.cpp:82
msgid "When changing scenes, a randomized pixel transition is done"
-msgstr ""
+msgstr "Kohtauksia vaihtaessa näytetään sattumanvarainen pikselitransitio"
#: engines/sherlock/detection.cpp:91
msgid "Don't show hotspots when moving mouse"
-msgstr ""
+msgstr "Älä näytä tärkeitä alueita hiirtä liikuttaessa"
#: engines/sherlock/detection.cpp:92
msgid ""
"Only show hotspot names after you actually click on a hotspot or action "
"button"
msgstr ""
+"Näytä tärkeiden alueiden nimet vain sen jälkeen kun aluetta tai "
+"toimintanappia on painettu"
#: engines/sherlock/detection.cpp:101
-#, fuzzy
msgid "Show character portraits"
-msgstr "Vaihda hahmoa"
+msgstr "Näytä hahmojen muotokuvat"
#: engines/sherlock/detection.cpp:102
msgid "Show portraits for the characters when conversing"
-msgstr ""
+msgstr "Näytä hahmojen muotokuvat keskustelujen aikana"
#: engines/sherlock/detection.cpp:111
msgid "Slide dialogs into view"
-msgstr ""
+msgstr "Liu'uta dialogit ruudulle"
#: engines/sherlock/detection.cpp:112
msgid "Slide UI dialogs into view, rather than simply showing them immediately"
msgstr ""
+"Liu'uta dialogit ruudulle sen sijaan että ne näytettäisiin välittömästi"
#: engines/sherlock/detection.cpp:121
msgid "Transparent windows"
-msgstr ""
+msgstr "Läpinäkyvät ikkunat"
#: engines/sherlock/detection.cpp:122
msgid "Show windows with a partially transparent background"
-msgstr ""
-
-#: 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"
+msgstr "Näytä ikkunat osittain läpinäkyvällä taustalla"
#: 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"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
+msgstr "\"sky.cpt\" pelimoottorin datatiedostolla on väärä koko."
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4260,7 +4265,7 @@ msgstr "Käytä levykeversion introa (vain CD versiossa)"
#: engines/sword1/animation.cpp:524
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
-msgstr "PSX stream videota '%s' ei voi näyttää paletisoidussa tilassa"
+msgstr "PSX stream videota '%s' ei voi toistaa paletisoidussa tilassa"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
msgid "DXA cutscenes found but ScummVM has been built without zlib"
@@ -4268,11 +4273,11 @@ msgstr ""
"DXA videotiedostoja löydettiin mutta ScummVM on käännetty ilman zlib-tukea"
#: engines/sword1/animation.cpp:561 engines/sword2/animation.cpp:461
-#, fuzzy
msgid ""
"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
msgstr ""
-"DXA videotiedostoja löydettiin mutta ScummVM on käännetty ilman zlib-tukea"
+"MPEG-2 videotiedostoja löydettiin mutta ScummVM on käännetty ilman MPEG-2-"
+"tukea"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -4280,7 +4285,6 @@ msgid "Cutscene '%s' not found"
msgstr "Videotiedosto '%s' ei löytynyt"
#: engines/sword1/control.cpp:863
-#, fuzzy
msgid ""
"ScummVM found that you have old saved games for Broken Sword 1 that should "
"be converted.\n"
@@ -4290,11 +4294,13 @@ msgid ""
"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"
+"ScummVM löysi pelille Broken Sword 1 vanhoja pelitallennuksia jotka pitäisi "
+"muuntaa.\n"
+"Vanhaa formaattia ei enää tueta, joten et pysty lataamaan tallenteitasi "
+"ellet muunna niitä.\n"
+"\n"
+"Paina OK muuntaaksesi tallenteet nyt, muuten kysymme sinulta uudelleestaan "
+"seuraavalla kerralla\n"
#: engines/sword1/control.cpp:1232
#, c-format
@@ -4332,21 +4338,16 @@ msgstr "Näytä esineiden kuvaus kohdistaessasi kursorin esineen ylle"
#: engines/sword25/detection.cpp:46
msgid "Use English speech"
-msgstr ""
+msgstr "Käytä englanninkielistä puhetta"
#: engines/sword25/detection.cpp:47
msgid ""
"Use English speech instead of German for every language other than German"
msgstr ""
+"Käytä englanninkielistä puhetta saksankielisen sijaan kaikille muille "
+"kielille paitsi saksalle"
-#: engines/teenagent/resources.cpp:96
-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:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4354,98 +4355,85 @@ msgstr ""
"Tiedosto teenagent.dat on pakattu, mutta zlib-kirjastoa ei ole käännetty "
"ScummVM:ään. Pura teenagent.dat"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr "Fonttivarianttia ei löydy '%s' pelimoottorin datatiedostosta."
+
#: engines/toon/toon.cpp:222
-#, fuzzy, c-format
+#, c-format
msgid "Saved game in slot #%d "
-msgstr ""
-"Pelin tallennus kohtaan ei onnistunut kohtaan %i\n"
-"\n"
+msgstr "Peli tallennettu kohtaan #%d "
#: engines/toon/toon.cpp:226
#, c-format
msgid "Could not quick save into slot #%d"
-msgstr ""
+msgstr "Pikapelitallennus kohtaan %d epäonnistui"
#: engines/toon/toon.cpp:239
-#, fuzzy, c-format
+#, c-format
msgid "Saved game #%d quick loaded"
-msgstr ""
-"Pelin tallennus kohtaan ei onnistunut kohtaan %i\n"
-"\n"
+msgstr "Pelitallenne #%d pikaladattu"
#: engines/toon/toon.cpp:243
-#, fuzzy, c-format
-msgid "Could not quick load the saved game #%d"
-msgstr "Haluatko tallentaa vai ladata pelin?"
-
-#: engines/toon/toon.cpp:4917
-#, fuzzy
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr ""
-"Asennuksestasi puuttuu 'teenagent.dat' tiedosto. Hae se ScummVM:n "
-"nettisivuilta"
-
-#: engines/toon/toon.cpp:4929
-#, fuzzy
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr ""
-"Asennuksestasi puuttuu 'teenagent.dat' tiedosto. Hae se ScummVM:n "
-"nettisivuilta"
-
-#: engines/toon/toon.cpp:4939
#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
+msgid "Could not quick load the saved game #%d"
+msgstr "Tallennuksen #%d pikalataus epäonnistui"
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
-msgstr ""
+msgstr "Näytä FPS-laskuri"
#: engines/wintermute/detection.cpp:59
msgid "Show the current number of frames per second in the upper left corner"
-msgstr ""
+msgstr "Näytä tämänhetkinen kuvia/sekunti määrä vasemmassa ylänurkassa"
+
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr "Spritejen bilineaarinen suodatus (HIDAS)"
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr "Käytä bilineaarista suodatusta yksittäisiin spriteihin"
#: engines/zvision/detection_tables.h:52
-#, fuzzy
msgid "Use the original save/load screens instead of the ScummVM interface"
-msgstr "Käytä alkuperäisiä tallenna/lataa valikkoja, ScummVM valikoiden sijaan"
+msgstr ""
+"Käytä alkuperäisiä tallenna/lataa valikkoja ScummVM käyttöliittymän sijaan"
#: engines/zvision/detection_tables.h:61
msgid "Double FPS"
-msgstr ""
+msgstr "Tupla FPS"
#: engines/zvision/detection_tables.h:62
msgid "Increase framerate from 30 to 60 FPS"
-msgstr ""
+msgstr "Kasvata ruudunpäivitysnopeus 60 FPS:ään 30 FPS:stä"
#: engines/zvision/detection_tables.h:71
-#, fuzzy
msgid "Enable Venus"
-msgstr "Käytä helium moodia"
+msgstr "Käytä Venusta"
#: engines/zvision/detection_tables.h:72
-#, fuzzy
msgid "Enable the Venus help system"
-msgstr "Käytä helium moodia"
+msgstr "Käytä Venus-avustusjärjestelmää"
#: engines/zvision/detection_tables.h:81
msgid "Disable animation while turning"
-msgstr ""
+msgstr "Animaatio pois päältä kääntyessä"
#: engines/zvision/detection_tables.h:82
msgid "Disable animation while turning in panorama mode"
-msgstr ""
+msgstr "Animaatio pois päältä panoraamamoodissa kääntyessä"
#: engines/zvision/detection_tables.h:91
msgid "Use high resolution MPEG video"
-msgstr ""
+msgstr "Käytä korkearesoluutioista MPEG-videota"
#: engines/zvision/detection_tables.h:92
-#, fuzzy
msgid "Use MPEG video from the DVD version instead of lower resolution AVI"
-msgstr "Käytä vaihtoehtoisia hopeisia kursoreita normaalien kultaisten sijaan"
+msgstr ""
+"Käytä DVD-version MPEG videoita matalampiresoluutioisten AVI-tiedostojen "
+"sijaan"
#: engines/zvision/file/save_manager.cpp:220
#, c-format
@@ -4453,6 +4441,39 @@ msgid ""
"This saved game uses version %u, but this engine only supports up to version "
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+"Tämä pelitallennus käyttää versiota %u, mutta tämä pelimoottorin tuki on "
+"vain versioon %d asti. Tarvitset päivitetyn version tästä pelimoottorista "
+"käyttääksesi tätä pelitallennusta."
+
+#~ 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"
+
+#~ 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"
+
+#~ 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"
+
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Asennuksestasi puuttuu 'toon.dat' tiedosto. Hae se ScummVM:n nettisivuilta"
+
+#, fuzzy
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Asennuksestasi puuttuu 'teenagent.dat' tiedosto. Hae se ScummVM:n "
+#~ "nettisivuilta"
#, fuzzy
#~ msgid "Use original savegame dialog"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index d8775816cb..0aea2ec110 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -1,5 +1,5 @@
# French translation for ScummVM.
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2010-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Thierry Crozat <criezy@scummvm.org>, 2011.
#
@@ -7,11 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.8.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-11-29 23:07+0000\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2017-01-03 19:44+0000\n"
"Last-Translator: Thierry Crozat <criezy@scummvm.org>\n"
-"Language-Team: French "
-"<https://translations.scummvm.org/projects/scummvm/scummvm/fr/>\n"
+"Language-Team: French <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/fr/>\n"
"Language: fr_FR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
@@ -163,13 +163,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -578,7 +578,6 @@ msgid "Associated key : %s"
msgstr "Touche associée: %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Touche associée : aucune"
@@ -885,7 +884,7 @@ msgstr "Correction du rapport d'aspect"
#: gui/options.cpp:841
msgid "Correct aspect ratio for 320x200 games"
-msgstr "Corrige le rapport d'aspect pour les jeu 320x200"
+msgstr "Corrige le rapport d'aspect pour les jeux en 320x200"
#: gui/options.cpp:849
msgid "Preferred Device:"
@@ -1348,7 +1347,7 @@ msgstr "Arrêter serveur"
msgid "Stop local webserver"
msgstr "Arrêter le serveur"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1820,7 +1819,7 @@ msgstr "Retour au ~L~anceur"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1841,7 +1840,7 @@ msgstr "Sauvegarde :"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -2034,11 +2033,11 @@ msgstr "Audio FM Towns"
msgid "PC-98 Audio"
msgstr "Audio PC-98"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Initialisation de l'Émulateur MT-32"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "Émulateur MT-32"
@@ -2760,6 +2759,35 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Recherche des mises à jour..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr "Le fichier de données '%s' n'a pu être trouvé."
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr "Le fichier de données '%s' est corrompu."
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+"La bonne version du fichier de données '%s' n'a pu être trouvée. Version "
+"attendue : %d.%d ; version trouvée : %d.%d."
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr "Mode Couleurs"
@@ -2843,8 +2871,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2856,8 +2884,8 @@ msgstr "Charger le jeu :"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -4259,21 +4287,9 @@ msgstr "Fenêtres transparentes"
msgid "Show windows with a partially transparent background"
msgstr "Afficher les fenêtres avec un fond partiellement transparent"
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"Fichier \"sky.cpt\" manquant\n"
-"Vous pouvez le télécharger sur 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 ""
-"Le fichier \"sky.cpt\" a une taille incorrecte.\n"
-"Vous pouvez le (re)télécharger sur www.scummvm.org"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
+msgstr "Le fichier de données 'sky.cpt' n'a pas la taille attendue."
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4372,14 +4388,7 @@ msgstr ""
"Utilise les voix anglaises au lieu des voix allemandes pour tous les autres "
"langages"
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
-"Il vous manque le fichier 'teenagent.dat'. Téléchargez le depuis le site web "
-"de ScummVM."
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4387,6 +4396,12 @@ msgstr ""
"Le fichier teenagent.dat est compressé et cet exécutable n'inclus pas zlib. "
"Veuillez le décompresser."
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+"Variante de police de caractères non trouvée dans le fichier de données '%s'."
+
#: engines/toon/toon.cpp:222
#, c-format
msgid "Saved game in slot #%d "
@@ -4407,28 +4422,6 @@ msgstr "Chargement rapide depuis l'emplacement #%d"
msgid "Could not quick load the saved game #%d"
msgstr "Erreur lors du chargement rapide depuis l'emplacement #%d"
-#: engines/toon/toon.cpp:4917
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr ""
-"Il vous manque le fichier 'toon.dat'. Téléchargez le depuis le site web de "
-"ScummVM."
-
-#: engines/toon/toon.cpp:4929
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr ""
-"Le fichier 'toon.dat' est corrompu. Téléchargez le depuis le site web de "
-"ScummVM."
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-"La version du fichier 'toon.dat' est incorrect. Version attendue : %d.%d, "
-"version trouvée : %d.%d. Télécharger le fichier depuis le site web de "
-"ScummVM."
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "Afficher le compteur FPS"
@@ -4438,6 +4431,14 @@ msgid "Show the current number of frames per second in the upper left corner"
msgstr ""
"Affiche le nombre d'images par seconde (FPS) dans le coin en haut à gauche"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr "Filtrage bilinéaire des images-objets (LENT)"
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr "Applique un filtrage bilinéaire à chaque image-objet"
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
@@ -4488,6 +4489,44 @@ msgstr ""
"les versions %d ou inférieure. Vous devez utiliser une version plus récente "
"de ScummVM pour pouvoir charger cette sauvegarde."
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Fichier \"sky.cpt\" manquant\n"
+#~ "Vous pouvez le télécharger sur www.scummvm.org"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Le fichier \"sky.cpt\" a une taille incorrecte.\n"
+#~ "Vous pouvez le (re)télécharger sur www.scummvm.org"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Il vous manque le fichier 'teenagent.dat'. Téléchargez le depuis le site "
+#~ "web de ScummVM."
+
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Il vous manque le fichier 'toon.dat'. Téléchargez le depuis le site web "
+#~ "de ScummVM."
+
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Le fichier 'toon.dat' est corrompu. Téléchargez le depuis le site web de "
+#~ "ScummVM."
+
+#~ msgid ""
+#~ "File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it "
+#~ "from the ScummVM website"
+#~ msgstr ""
+#~ "La version du fichier 'toon.dat' est incorrect. Version attendue : %d.%d, "
+#~ "version trouvée : %d.%d. Télécharger le fichier depuis le site web de "
+#~ "ScummVM."
+
#~ msgid "Invalid save file name"
#~ msgstr "Nom de sauvegarde invalide"
diff --git a/po/gl_ES.po b/po/gl_ES.po
index 89262c3ae2..3a885d245f 100644
--- a/po/gl_ES.po
+++ b/po/gl_ES.po
@@ -1,5 +1,5 @@
# Galician translation for ScummVM.
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2010-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Santiago G. Sanz <s.sanz@uvigo.es>, 2013.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.8.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
"PO-Revision-Date: 2016-11-28 15:51+0000\n"
"Last-Translator: Santiago G. Sanz <santiagogarciasanz@gmail.com>\n"
"Language-Team: Galician <https://translations.scummvm.org/projects/scummvm/"
@@ -163,13 +163,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "Aceptar"
@@ -578,7 +578,6 @@ msgid "Associated key : %s"
msgstr "Tecla asociada: %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Tecla asociada: ningunha"
@@ -1339,7 +1338,7 @@ msgstr "Deter servidor"
msgid "Stop local webserver"
msgstr "Deter servidor web local"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1808,7 +1807,7 @@ msgstr "~V~olver ao Iniciador"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1829,7 +1828,7 @@ msgstr "Gardar partida:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -2022,11 +2021,11 @@ msgstr "FM-Towns Audio"
msgid "PC-98 Audio"
msgstr "PC-98 Audio"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Iniciando emulador de MT-32"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "Emulador de MT-32"
@@ -2746,6 +2745,33 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Buscar actualizacións..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr ""
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr ""
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr "Modo de cor"
@@ -2828,8 +2854,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2841,8 +2867,8 @@ msgstr "Restaurar xogo:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -4249,21 +4275,9 @@ msgstr "Ventás transparentes"
msgid "Show windows with a partially transparent background"
msgstr "Mostra ventás cun fondo parcialmente transparente."
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"O ficheiro sky.cpt non se atopa!\n"
-"Descárgao dende 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"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
msgstr ""
-"O ficheiro sky.cpt ten un tamaño incorrecto.\n"
-"Descárgao (de novo) dende www.scummvm.org"
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4361,13 +4375,7 @@ msgid ""
msgstr ""
"Emprega as voces en inglés no canto de alemán para o resto dos idiomas."
-#: engines/teenagent/resources.cpp:96
-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:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4375,6 +4383,11 @@ msgstr ""
"O ficheiro teenagent.dat está comprimido e zlib non foi incluído neste "
"executable. Descomprime o ficheiro"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+
#: engines/toon/toon.cpp:222
#, c-format
msgid "Saved game in slot #%d "
@@ -4395,24 +4408,6 @@ msgstr "Carga rápida exitosa dos datos gardados %d"
msgid "Could not quick load the saved game #%d"
msgstr "Erro de carga rápida dos datos gardados %d"
-#: engines/toon/toon.cpp:4917
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr "Falta o ficheiro toon.dat. Descárgao dende o sitio web de ScummVM."
-
-#: engines/toon/toon.cpp:4929
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr ""
-"O ficheiro toon.dat está danado. Descárgao dende o sitio web de ScummVM."
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-"A versión do ficheiro toon.dat é incorrecta. Versión esperada: %d.%d. "
-"Versión dispoñíbel: %d.%d. Descárgao dende o sitio web de ScummVM."
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "Mostrar FPS"
@@ -4421,6 +4416,14 @@ msgstr "Mostrar FPS"
msgid "Show the current number of frames per second in the upper left corner"
msgstr "Mostra o número actual de FPS na esquina superior esquerda."
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
@@ -4471,6 +4474,39 @@ msgstr ""
"compatíbel até a versión %d. Cómpre descargar unha versión actualizada do "
"motor para empregar estes datos gardados."
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "O ficheiro sky.cpt non se atopa!\n"
+#~ "Descárgao dende www.scummvm.org"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "O ficheiro sky.cpt ten un tamaño incorrecto.\n"
+#~ "Descárgao (de novo) dende www.scummvm.org"
+
+#~ 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."
+
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr "Falta o ficheiro toon.dat. Descárgao dende o sitio web de ScummVM."
+
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "O ficheiro toon.dat está danado. Descárgao dende o sitio web de ScummVM."
+
+#~ msgid ""
+#~ "File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it "
+#~ "from the ScummVM website"
+#~ msgstr ""
+#~ "A versión do ficheiro toon.dat é incorrecta. Versión esperada: %d.%d. "
+#~ "Versión dispoñíbel: %d.%d. Descárgao dende o sitio web de ScummVM."
+
#~ msgid "Invalid save file name"
#~ msgstr "Nome de ficheiro non válido"
diff --git a/po/hu_HU.po b/po/hu_HU.po
index 405156e007..bce6b19d66 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -1,16 +1,16 @@
# Hungarian translation for ScummVM.
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2010-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# George Kormendi <grubycza@hotmail.com>, 2010, 2016.
msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-12-04 13:00+0000\n"
-"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
-"Language-Team: Hungarian "
-"<https://translations.scummvm.org/projects/scummvm/scummvm/hu/>\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2017-01-08 06:09+0000\n"
+"Last-Translator: George Kormendi <grubycza@hotmail.com>\n"
+"Language-Team: Hungarian <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/hu/>\n"
"Language: hu_HU\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-2\n"
@@ -163,13 +163,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -575,7 +575,6 @@ msgid "Associated key : %s"
msgstr "Társított billentyû: %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Társított billentyû: nincs"
@@ -1328,7 +1327,7 @@ msgstr "Szerver leállítás"
msgid "Stop local webserver"
msgstr "Helyi webszerver leállítása"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1795,7 +1794,7 @@ msgstr "Visszatérés az indítóba"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1816,7 +1815,7 @@ msgstr "Játék mentése:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -2007,11 +2006,11 @@ msgstr "FM-Towns Hang"
msgid "PC-98 Audio"
msgstr "PC-98 Hang"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "MT-32 Emulátor inicializálása"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "MT-32 Emulátor"
@@ -2253,7 +2252,7 @@ msgstr "~B~alkezes mód"
#: backends/platform/ds/arm9/source/dsoptions.cpp:64
msgid "~I~ndy fight controls"
-msgstr "~I~ndy fight controls"
+msgstr "~I~ndy harc irányitás"
#: backends/platform/ds/arm9/source/dsoptions.cpp:65
msgid "Show mouse cursor"
@@ -2729,6 +2728,35 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Frissítések keresése..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr "Nem található a(z) '%s' motorhoz adat fájl."
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr "A(z) '%s' motor adatfájl korrupt."
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+"Hibás verziójú '%s' motor adatfájlt találtam. Elvárt %d.%d helyett ez van %d."
+"%d."
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr "Szines mód"
@@ -2809,8 +2837,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2822,8 +2850,8 @@ msgstr "Játékmenet visszaállítása:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -4011,7 +4039,7 @@ msgstr "* Harc billentyûzetrõl mindíg aktív,"
#: engines/scumm/help.cpp:296
msgid " so despite the in-game message this"
-msgstr " so despite the in-game message this"
+msgstr ""
#: engines/scumm/help.cpp:297
msgid " actually toggles Mouse Fighting Off/On"
@@ -4206,23 +4234,12 @@ msgstr "Átlátszó ablakok"
msgid "Show windows with a partially transparent background"
msgstr "Ablakok megjelenítése részben átlászó háttérrel"
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"A \"sky.cpt\" fájl nem található!\n"
-"Töltsd le a www.scummvm.org oldaláról"
-
#: engines/sky/compact.cpp:141
-msgid ""
-"The \"sky.cpt\" file has an incorrect size.\n"
-"Please (re)download it from www.scummvm.org"
-msgstr ""
-"A \"sky.cpt\" fájl mérete nem megfelelõ.\n"
-"Töltsd le a www.scummvm.org oldaláról"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
+msgstr "A \"sky.cpt\" motor adatfájl mérete inkorrekt.."
#: engines/sky/detection.cpp:44
+#, fuzzy
msgid "Floppy intro"
msgstr "Floppy intro"
@@ -4261,8 +4278,8 @@ msgid ""
"Press OK to convert them now, otherwise you will be asked again the next "
"time you start the game.\n"
msgstr ""
-"ScummVM régi játékmentést talált a Broken Sword 1 hez, ezt át kell alakítani."
-"\n"
+"ScummVM régi játékmentést talált a Broken Sword 1 hez, ezt át kell "
+"alakítani.\n"
"A régi játékmentés nem támogatott, ezért a játék nem töltõdik be átalakítás "
"nélkül.\n"
"\n"
@@ -4315,12 +4332,7 @@ msgid ""
msgstr ""
"Angol beszéd használata a Német helyett minden nyelven, a Németen kívül"
-#: engines/teenagent/resources.cpp:96
-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:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4328,6 +4340,11 @@ msgstr ""
"A teenagent.dat fájl tömörített és a zlib nem része ennek a futtatható "
"állománynak. Kérlek tömörítsd ki"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr "Font variáns nincs jelen a '%s' motor adatfájlban."
+
#: engines/toon/toon.cpp:222
#, c-format
msgid "Saved game in slot #%d "
@@ -4336,7 +4353,7 @@ msgstr "Játékállás nem menthetõ %d slotba "
#: engines/toon/toon.cpp:226
#, c-format
msgid "Could not quick save into slot #%d"
-msgstr ""
+msgstr "Gyorsmentés nem sikerült a #%d helyre"
#: engines/toon/toon.cpp:239
#, c-format
@@ -4348,23 +4365,6 @@ msgstr "Játékállás nem menthetõ %d slotba"
msgid "Could not quick load the saved game #%d"
msgstr "Akarod hogy betöltésem a játékállást?"
-#: engines/toon/toon.cpp:4917
-#, fuzzy
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr "Hiányzik a 'teenagent.dat' fájl. Szerezd be a ScummVM website-ról"
-
-#: engines/toon/toon.cpp:4929
-#, fuzzy
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr "Hiányzik a 'teenagent.dat' fájl. Szerezd be a ScummVM website-ról"
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "FPS számláló látszik"
@@ -4374,6 +4374,14 @@ msgid "Show the current number of frames per second in the upper left corner"
msgstr ""
"A jelenlegi másodpercenkénti képkocka szám kijelzése a bal felsõ sarokban"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr "Sprite bilineáris szûrés (LASSÚ)"
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr "Bilineáris szûrés alkalmazása egyes sprite-okhoz"
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr "Használd az eredeti mentés/töltés képet a ScummVM felület helyett"
@@ -4407,9 +4415,9 @@ msgid "Use high resolution MPEG video"
msgstr "Nagyfelbontású MPEG videó használat"
#: engines/zvision/detection_tables.h:92
-#, fuzzy
msgid "Use MPEG video from the DVD version instead of lower resolution AVI"
-msgstr "MPEG videót használ DVD verziónál, a kisebb felbontású AVI helyett"
+msgstr ""
+"A DVD verzió MPEG videójának használata, a kisebb felbontású AVI helyett"
#: engines/zvision/file/save_manager.cpp:220
#, c-format
@@ -4418,6 +4426,30 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "A \"sky.cpt\" fájl nem található!\n"
+#~ "Töltsd le a www.scummvm.org oldaláról"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "A \"sky.cpt\" fájl mérete nem megfelelõ.\n"
+#~ "Töltsd le a www.scummvm.org oldaláról"
+
+#~ 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"
+
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr "Hiányzik a 'toon.dat' fájl. Szerezd be a ScummVM honlapjáról"
+
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr "A 'toon.dat' fájl hibás. Szerezd be a ScummVM honlapjáról"
+
#~ msgid "Invalid save file name"
#~ msgstr "Érvénytelen mentés fájlnév"
diff --git a/po/it_IT.po b/po/it_IT.po
index 7b616dc005..5e56e255c7 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -1,5 +1,5 @@
# Italian translation for ScummVM.
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2010-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Matteo 'Maff' Angelino <matteo.maff at gmail dot com>, 2010.
#
@@ -7,11 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-12-05 20:38+0000\n"
-"Last-Translator: Paolo Bossi <pbossi86@gmail.com>\n"
-"Language-Team: Italian "
-"<https://translations.scummvm.org/projects/scummvm/scummvm/it/>\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2017-01-06 21:05+0000\n"
+"Last-Translator: Walter Agazzi <tag2015@gmail.com>\n"
+"Language-Team: Italian <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/it/>\n"
"Language: it_IT\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
@@ -80,11 +80,11 @@ msgstr "Scegli"
#: gui/downloaddialog.cpp:48
msgid "Select directory where to download game data"
-msgstr "Seleziona la cartella dove scaricare i file di gioco"
+msgstr "Seleziona la cartella dove scaricare i file dati del gioco"
#: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:470 gui/launcher.cpp:197
msgid "Select directory with game data"
-msgstr "Seleziona la cartella contenente i file di gioco"
+msgstr "Seleziona la cartella con i file dati del gioco"
#: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263
msgid "From: "
@@ -92,16 +92,16 @@ msgstr "Da: "
#: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264
msgid "To: "
-msgstr "A:"
+msgstr "A: "
#: gui/downloaddialog.cpp:63
msgid "Cancel download"
-msgstr "Annulla scaricamento"
+msgstr "Annulla download"
#: gui/downloaddialog.cpp:65
msgctxt "lowres"
msgid "Cancel download"
-msgstr "Annulla scaricamento"
+msgstr "Annulla download"
#: gui/downloaddialog.cpp:67
msgid "Hide"
@@ -163,13 +163,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -190,7 +190,7 @@ msgstr "Scaricato %s %s / %s %s"
#: gui/downloaddialog.cpp:258
#, c-format
msgid "Download speed: %s %s"
-msgstr "Velocità di scaricamento: %s %s"
+msgstr "Velocità di download: %s %s"
#: gui/editgamedialog.cpp:132
msgid "Game"
@@ -344,7 +344,7 @@ msgstr "Percorsi"
#: gui/editgamedialog.cpp:257 gui/options.cpp:1272
msgctxt "lowres"
msgid "Paths"
-msgstr "Perc."
+msgstr "Perc"
#: gui/editgamedialog.cpp:264
msgid "Game Path:"
@@ -419,20 +419,20 @@ msgid ""
"want your saved games to sync, use default directory."
msgstr ""
"La funzionalità di sincronizzazione dei salvataggi non funziona con i "
-"percorsi personalizzati. Per sinconizzare i salvataggi, usa la cartella "
-"predefinita. "
+"percorsi personalizzati. Per sincronizzare i salvataggi, usa la cartella "
+"predefinita."
#: gui/editgamedialog.cpp:534
msgid "This game ID is already taken. Please choose another one."
-msgstr "Questo ID di gioco è già in uso. Si prega di sceglierne un'altro."
+msgstr "Questo ID di gioco è già in uso. Si prega di sceglierne un altro."
#: gui/editrecorddialog.cpp:58
msgid "Author:"
-msgstr "Autore: "
+msgstr "Autore:"
#: gui/editrecorddialog.cpp:60
msgid "Notes:"
-msgstr "Note: "
+msgstr "Note:"
#: gui/editrecorddialog.cpp:68 gui/predictivedialog.cpp:74
msgid "Ok"
@@ -567,11 +567,11 @@ msgstr "Attiva / disattiva schermo intero"
#: gui/KeysDialog.cpp:41
msgid "Map"
-msgstr "Mappa"
+msgstr "Associa"
#: gui/KeysDialog.cpp:49
msgid "Select an action and click 'Map'"
-msgstr "Seleziona un'azione e clicca 'Mappa'"
+msgstr "Seleziona un'azione e clicca 'Associa'"
#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141
#, c-format
@@ -579,7 +579,6 @@ msgid "Associated key : %s"
msgstr "Tasto associato: %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Tasto associato: nessuno"
@@ -710,7 +709,7 @@ msgstr ""
#: gui/launcher.cpp:365
msgid "This directory cannot be used yet, it is being downloaded into!"
msgstr ""
-"Questa cartella è in fase di scaricamento e non può essere ancora utilizzata!"
+"Questa cartella è in fase di download e non può essere ancora utilizzata!"
#: gui/launcher.cpp:415
msgid "Do you really want to remove this game configuration?"
@@ -746,7 +745,7 @@ msgstr "Agg. in massa..."
#: gui/launcher.cpp:710
msgid "Record..."
-msgstr "Registra"
+msgstr "Registra..."
#: gui/massadd.cpp:79 gui/massadd.cpp:82
msgid "... progress ..."
@@ -754,7 +753,7 @@ msgstr "... in corso..."
#: gui/massadd.cpp:259
msgid "Scan complete!"
-msgstr "Scansione completa!"
+msgstr "Scansione completata!"
#: gui/massadd.cpp:262
#, c-format
@@ -835,7 +834,7 @@ msgstr "Nessuno"
#: gui/options.cpp:456
msgid "Failed to apply some of the graphic options changes:"
-msgstr "Impossibile applicare alcuni dei cambiamenti nelle opzioni grafiche."
+msgstr "Impossibile applicare alcuni dei cambiamenti nelle opzioni grafiche:"
#: gui/options.cpp:468
msgid "the video mode could not be changed."
@@ -872,11 +871,11 @@ msgstr "Modalità a schermo intero"
#: gui/options.cpp:838
msgid "Filter graphics"
-msgstr "Applica filtro grafico "
+msgstr "Applica filtro grafico"
#: gui/options.cpp:838
msgid "Use linear filtering when scaling graphics"
-msgstr "Usa filtro lineare per lo scaling della grafica "
+msgstr "Usa filtro lineare per lo scaling della grafica"
#: gui/options.cpp:841
msgid "Aspect ratio correction"
@@ -884,7 +883,7 @@ msgstr "Correzione proporzioni"
#: gui/options.cpp:841
msgid "Correct aspect ratio for 320x200 games"
-msgstr "Corregge le proporzioni dei giochi 320x200"
+msgstr "Corregge le proporzioni dei giochi con risoluzione a 320x200"
#: gui/options.cpp:849
msgid "Preferred Device:"
@@ -1106,12 +1105,12 @@ msgstr "Impostazioni FluidSynth"
#: gui/options.cpp:1288
msgid "Theme Path:"
-msgstr "Percorso tema:"
+msgstr "Percorso temi:"
#: gui/options.cpp:1290
msgctxt "lowres"
msgid "Theme Path:"
-msgstr "Perc. tema:"
+msgstr "Perc. temi:"
#: gui/options.cpp:1296 gui/options.cpp:1298 gui/options.cpp:1299
msgid "Specifies path to additional data used by all games or ScummVM"
@@ -1162,7 +1161,7 @@ msgstr "Lingua dell'interfaccia grafica di ScummVM"
#: gui/options.cpp:1381
msgid "Update check:"
-msgstr "Controlla la presenza di aggiornarmenti: "
+msgstr "Controllo aggiornamenti:"
#: gui/options.cpp:1381
msgid "How often to check ScummVM updates"
@@ -1183,7 +1182,7 @@ msgstr "Cloud"
#: gui/options.cpp:1408
msgid "Storage:"
-msgstr "Archiviazione sul Cloud:"
+msgstr "Servizio cloud:"
#: gui/options.cpp:1408
msgid "Active cloud storage"
@@ -1242,7 +1241,7 @@ msgstr "Scarica"
#: gui/options.cpp:1430
msgid "Open downloads manager dialog"
-msgstr "Apri finestra di gestione dei download "
+msgstr "Apri finestra di gestione dei download"
#: gui/options.cpp:1432
msgid "Run server"
@@ -1254,7 +1253,7 @@ msgstr "Avvia webserver locale"
#: gui/options.cpp:1433 gui/options.cpp:2082
msgid "Not running"
-msgstr "Errore nell'avvio del gioco:"
+msgstr "Non avviato"
#: gui/options.cpp:1437
msgid "/root/ Path:"
@@ -1262,7 +1261,7 @@ msgstr "Percorso base:"
#: gui/options.cpp:1437 gui/options.cpp:1439 gui/options.cpp:1440
msgid "Specifies which directory the Files Manager can access"
-msgstr "Specifica quali cartelle sono accessibili dal File Manager "
+msgstr "Specifica quali cartelle sono accessibili dal File Manager"
#: gui/options.cpp:1439
msgctxt "lowres"
@@ -1287,11 +1286,11 @@ msgstr "Applica"
#: gui/options.cpp:1628
msgid "Failed to change cloud storage!"
-msgstr "Impossibile cambiare dispositivo di archiviazione Cloud"
+msgstr "Impossibile cambiare dispositivo di archiviazione Cloud!"
#: gui/options.cpp:1631
msgid "Another cloud storage is already active."
-msgstr "Un altro servizio di archiviazione cloud è già attivo. "
+msgstr "Un altro servizio di archiviazione cloud è già attivo."
#: gui/options.cpp:1667
msgid ""
@@ -1336,19 +1335,19 @@ msgstr "<mai>"
#: gui/options.cpp:2073
msgid "Stop server"
-msgstr "Arresta server:"
+msgstr "Arresta server"
#: gui/options.cpp:2074
msgid "Stop local webserver"
msgstr "Arresta webserver locale"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
msgstr ""
-"Richiesta fallita\n"
-"Verifica il funzionamento della connessione Internet"
+"Richiesta fallita.\n"
+"Verifica il funzionamento della connessione Internet."
#. I18N: You must leave "#" as is, only word 'next' is translatable
#: gui/predictivedialog.cpp:86
@@ -1370,17 +1369,17 @@ msgstr "<"
#. I18N: Pre means 'Predictive', leave '*' as is
#: gui/predictivedialog.cpp:99 gui/predictivedialog.cpp:575
msgid "* Pre"
-msgstr "*Prè"
+msgstr "* Pre"
#. I18N: 'Num' means Numbers
#: gui/predictivedialog.cpp:578
msgid "* Num"
-msgstr "*Numero"
+msgstr "* 123"
#. I18N: 'Abc' means Latin alphabet input
#: gui/predictivedialog.cpp:581
msgid "* Abc"
-msgstr "* Abc"
+msgstr "* Abc"
#: gui/recorderdialog.cpp:63
msgid "Recorder or Playback Gameplay"
@@ -1397,7 +1396,7 @@ msgstr "Registra"
#: gui/recorderdialog.cpp:71
msgid "Playback"
-msgstr "Riproduzione "
+msgstr "Riproduci"
#: gui/recorderdialog.cpp:73
msgid "Edit"
@@ -1406,12 +1405,12 @@ msgstr "Modifica"
#: gui/recorderdialog.cpp:85 gui/recorderdialog.cpp:242
#: gui/recorderdialog.cpp:252
msgid "Author: "
-msgstr "Autore:"
+msgstr "Autore: "
#: gui/recorderdialog.cpp:86 gui/recorderdialog.cpp:243
#: gui/recorderdialog.cpp:253
msgid "Notes: "
-msgstr "Note:"
+msgstr "Note: "
#: gui/recorderdialog.cpp:154
msgid "Do you really want to delete this record?"
@@ -1505,7 +1504,7 @@ msgstr "Ottieni il codice dallo spazio di archiviazione, immettilo"
#: gui/storagewizarddialog.cpp:62
msgid "in the following field and press 'Connect':"
-msgstr "nel campo seguente e premi \"Connetti\""
+msgstr "nel campo seguente e premi \"Connetti\":"
#: gui/storagewizarddialog.cpp:69
msgid "Open URL"
@@ -1517,7 +1516,7 @@ msgstr "Incolla"
#: gui/storagewizarddialog.cpp:70
msgid "Pastes clipboard contents into fields"
-msgstr "Incolla il contenuto degli appunti nei campi di testo "
+msgstr "Incolla il contenuto degli appunti nei campi di testo"
#: gui/storagewizarddialog.cpp:78
msgid "You will be directed to ScummVM's page where"
@@ -1525,7 +1524,8 @@ msgstr "Sarai reindirizzato alla pagina di ScummVM dove"
#: gui/storagewizarddialog.cpp:79
msgid "you should allow it to access your storage."
-msgstr "si dovrebbe autorizzarlo ad accedere al vostro spazio di archiviazione."
+msgstr ""
+"si dovrebbe autorizzarlo ad accedere al vostro spazio di archiviazione."
#: gui/storagewizarddialog.cpp:112
msgid "Another Storage is active. Do you want to interrupt it?"
@@ -1533,21 +1533,21 @@ msgstr "Un altro spazio di archiviazione è attivo. Vuoi interromperlo?"
#: gui/storagewizarddialog.cpp:121
msgid "Wait until current Storage finishes up and try again."
-msgstr ""
+msgstr "Aspetta che il Cloud abbia terminato l'operazione e prova di nuovo."
#: gui/storagewizarddialog.cpp:182
#, c-format
msgid "Field %s has a mistake in it."
-msgstr ""
+msgstr "Errore nel campo %s."
#: gui/storagewizarddialog.cpp:184
#, c-format
msgid "Fields %s have mistakes in them."
-msgstr ""
+msgstr "Errori nel campi %s."
#: gui/storagewizarddialog.cpp:199
msgid "All OK!"
-msgstr ""
+msgstr "Tutto OK!"
#: gui/storagewizarddialog.cpp:201
msgid "Invalid code"
@@ -1558,6 +1558,8 @@ msgid ""
"Failed to open URL!\n"
"Please navigate to this page manually."
msgstr ""
+"Errore nell'apertura dell'URL!\n"
+"Accedere a questa pagina manualmente."
#: gui/themebrowser.cpp:45
msgid "Select a Theme"
@@ -1578,7 +1580,7 @@ msgstr "Renderer standard"
#: gui/ThemeEngine.cpp:453 engines/scumm/dialogs.cpp:659
msgid "Standard"
-msgstr "Medio"
+msgstr "Normale"
#: gui/ThemeEngine.cpp:455
msgid "Antialiased Renderer"
@@ -1595,10 +1597,16 @@ msgid ""
"\n"
"Would you like to enable this feature?"
msgstr ""
+"ScummVM supporta la verifica automatica degli aggiornamenti.\n"
+"E' richiesto l'accesso a Internet.\n"
+"\n"
+"Desideri abilitare questa funzionalità?"
#: gui/updates-dialog.cpp:55
msgid "(You can always enable it in the options dialog on the Misc tab)"
msgstr ""
+"(E' possibile attivarla in qualsiasi momento tramite la scheda \"Varie\" "
+"della finestra Opzioni)"
#: gui/updates-dialog.cpp:92
msgid "Check for updates automatically"
@@ -1606,7 +1614,7 @@ msgstr "Controlla aggiornamenti automaticamente"
#: gui/updates-dialog.cpp:111
msgid "Proceed"
-msgstr ""
+msgstr "Procedi"
#: gui/widget.cpp:366 gui/widget.cpp:368 gui/widget.cpp:374 gui/widget.cpp:376
msgid "Clear value"
@@ -1651,7 +1659,7 @@ msgstr "Nessun errore"
#: common/error.cpp:40
msgid "Game data not found"
-msgstr "Dati di gioco non trovati"
+msgstr "Dati del gioco non trovati"
#: common/error.cpp:42
msgid "Game id not supported"
@@ -1698,13 +1706,12 @@ msgid "Could not find suitable engine plugin"
msgstr "Impossibile trovare un plugin idoneo"
#: common/error.cpp:68
-#, fuzzy
msgid "Engine plugin does not support saved games"
-msgstr "Il plugin del motore non supporta i salvataggi"
+msgstr "Il plugin del motore di gioco non supporta i salvataggi"
#: common/error.cpp:71
msgid "User canceled"
-msgstr "Utente cancellato"
+msgstr "Annullato dall'utente"
#: common/error.cpp:75
msgid "Unknown error"
@@ -1721,11 +1728,11 @@ msgstr "Hercules ambra"
#: common/rendermode.cpp:42
msgid "PC-9821 (256 Colors)"
-msgstr ""
+msgstr "PC-9821 (256 colori)"
#: common/rendermode.cpp:43
msgid "PC-9801 (16 Colors)"
-msgstr ""
+msgstr "PC-9801 (16 colori)"
#: common/rendermode.cpp:73
msgctxt "lowres"
@@ -1739,20 +1746,19 @@ msgstr "Hercules ambra"
#: common/updates.cpp:58
msgid "Daily"
-msgstr ""
+msgstr "Una volta al giorno"
#: common/updates.cpp:60
msgid "Weekly"
-msgstr ""
+msgstr "Una volta a settimana"
#: common/updates.cpp:62
msgid "Monthly"
-msgstr ""
+msgstr "Una volta al mese"
#: common/updates.cpp:64
-#, fuzzy
msgid "<Bad value>"
-msgstr "Cancella"
+msgstr "<Valore non valido>"
#: engines/advancedDetector.cpp:335
#, c-format
@@ -1761,6 +1767,11 @@ msgid ""
"Please, report the following data to the ScummVM team along with name\n"
"of the game you tried to add and its version, language, etc.:"
msgstr ""
+"Il gioco in '%s' sembra sconosciuto.\n"
+"Per favore, comunica al team ScummVM le informazioni riportate di seguito "
+"insieme\n"
+"al nome del gioco che hai tentato di aggiungere, la sua versione, lingua, "
+"etc:"
#: engines/dialogs.cpp:85
msgid "~R~esume"
@@ -1803,7 +1814,7 @@ msgstr "~V~ai a elenco giochi"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1824,7 +1835,7 @@ msgstr "Salva gioco:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1843,14 +1854,13 @@ msgstr ""
"per le istruzioni su come ottenere ulteriore assistenza."
#: engines/dialogs.cpp:234 engines/pegasus/pegasus.cpp:393
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to save game (%s)! Please consult the README for basic information, "
"and for instructions on how to obtain further assistance."
msgstr ""
-"Salvataggio fallito (%s)! Si prega di consultare il file README per le "
-"informazioni di base e per le istruzioni su come ottenere ulteriore "
-"assistenza."
+"Salvataggio non riuscito (%s). Consultare il file README per le informazioni "
+"di base e per le istruzioni su come ottenere ulteriore assistenza."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:100
#: engines/tsage/dialogs.cpp:112
@@ -1876,16 +1886,15 @@ msgstr "Impossibile cambiare la modalità video: '"
#: engines/engine.cpp:363
msgid "Could not apply aspect ratio setting."
-msgstr "Impossibile applicare l'impostazione proporzioni"
+msgstr "Impossibile applicare l'impostazione proporzioni."
#: engines/engine.cpp:368
msgid "Could not apply fullscreen setting."
msgstr "Impossibile applicare l'impostazione schermo intero."
#: engines/engine.cpp:373
-#, fuzzy
msgid "Could not apply filtering setting."
-msgstr "Impossibile applicare l'impostazione schermo intero."
+msgstr "Impossibile applicare l'impostazione di filtraggio."
#: engines/engine.cpp:473
msgid ""
@@ -1916,13 +1925,13 @@ msgstr ""
"Vedi il file README per i dettagli."
#: engines/engine.cpp:542
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
"information, and for instructions on how to obtain further assistance."
msgstr ""
-"Caricamento salvataggio fallito (%s)! Si prega di consultare il file README "
-"per le informazioni di base e per le istruzioni su come ottenere ulteriore "
+"Caricamento salvataggio non riuscito (%s). Consultare il file README per le "
+"informazioni di base e per le istruzioni su come ottenere ulteriore "
"assistenza."
#: engines/engine.cpp:555
@@ -1953,7 +1962,7 @@ msgstr "Emulatore OPL DOSBox"
#: audio/fmopl.cpp:67
msgid "ALSA Direct FM"
-msgstr ""
+msgstr "ALSA Direct FM"
#: audio/mididrv.cpp:209
#, c-format
@@ -2010,23 +2019,21 @@ msgstr "Emulatore Apple II GS (NON IMPLEMENTATO)"
#: audio/softsynth/cms.cpp:350
msgid "Creative Music System Emulator"
-msgstr ""
+msgstr "Emulatore Creative Music System"
#: audio/softsynth/fmtowns_pc98/towns_pc98_plugins.cpp:33
-#, fuzzy
msgid "FM-Towns Audio"
msgstr "Emulatore FM Towns"
#: audio/softsynth/fmtowns_pc98/towns_pc98_plugins.cpp:58
-#, fuzzy
msgid "PC-98 Audio"
-msgstr "Audio"
+msgstr "Audio PC-98"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Avvio in corso dell'emulatore MT-32"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "Emulatore MT-32"
@@ -2043,19 +2050,20 @@ msgid "C64 Audio Emulator"
msgstr "Emulatore audio C64"
#: backends/cloud/storage.cpp:211
-#, fuzzy
msgid "Saved games sync complete."
-msgstr "Scansione completa!"
+msgstr "Sincronizzazione salvataggi completata."
#: backends/cloud/storage.cpp:222
msgid "Saved games sync was cancelled."
-msgstr ""
+msgstr "Sincronizzazione salvataggi annullata."
#: backends/cloud/storage.cpp:224
msgid ""
"Saved games sync failed.\n"
"Check your Internet connection."
msgstr ""
+"La sincronizzazione dei salvataggi non è riuscita.\n"
+"Controllare la propria connessione Internet."
#: backends/cloud/storage.cpp:328
#, c-format
@@ -2063,16 +2071,16 @@ msgid ""
"Download complete.\n"
"Failed to download %u files."
msgstr ""
+"Download completato.\n"
+"Download di %u file non riuscito."
#: backends/cloud/storage.cpp:330
-#, fuzzy
msgid "Download complete."
-msgstr "Scansione completa!"
+msgstr "Download completato."
#: backends/cloud/storage.cpp:340
-#, fuzzy
msgid "Download failed."
-msgstr "Carica gioco:"
+msgstr "Download non riuscito."
#: backends/events/default/default-events.cpp:196
msgid "Do you really want to return to the Launcher?"
@@ -2147,34 +2155,33 @@ msgstr "Sei sicuro di voler uscire?"
#. I18N: Trackpad mode toggle status.
#: backends/events/webossdl/webossdl-events.cpp:308
-#, fuzzy
msgid "Trackpad mode is now"
-msgstr "Modalità touchpad disattivata."
+msgstr "La modalità touchpad è ora"
#. I18N: Trackpad mode on or off.
#. I18N: Auto-drag on or off.
#: backends/events/webossdl/webossdl-events.cpp:311
#: backends/events/webossdl/webossdl-events.cpp:338
msgid "ON"
-msgstr ""
+msgstr "attiva"
#: backends/events/webossdl/webossdl-events.cpp:311
#: backends/events/webossdl/webossdl-events.cpp:338
msgid "OFF"
-msgstr ""
+msgstr "disattivata"
#: backends/events/webossdl/webossdl-events.cpp:315
msgid "Swipe two fingers to the right to toggle."
-msgstr ""
+msgstr "Fai scivolare due dita verso destra per cambiare."
#. I18N: Auto-drag toggle status.
#: backends/events/webossdl/webossdl-events.cpp:335
msgid "Auto-drag mode is now"
-msgstr ""
+msgstr "La modalità di autotrascimento è ora"
#: backends/events/webossdl/webossdl-events.cpp:342
msgid "Swipe three fingers to the right to toggle."
-msgstr ""
+msgstr "Fai scivolare tre dita verso destra per cambiare."
#: backends/graphics/opengl/opengl-graphics.cpp:146
msgid "OpenGL"
@@ -2188,7 +2195,7 @@ msgstr "Modalità finestra"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:710
#, c-format
msgid "Resolution: %dx%d"
-msgstr ""
+msgstr "Risoluzione: %dx%d"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:731
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2338
@@ -2202,15 +2209,13 @@ msgstr "Correzione proporzioni disattivata"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:753
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2362
-#, fuzzy
msgid "Filtering enabled"
-msgstr "Clic attivato"
+msgstr "Filtro video attivato"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:755
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2364
-#, fuzzy
msgid "Filtering disabled"
-msgstr "Clic disattivato"
+msgstr "Filtro disattivato"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:47
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
@@ -2233,15 +2238,15 @@ msgstr "Mappa tasti:"
#: backends/keymapper/remap-dialog.cpp:67
msgid " (Effective)"
-msgstr " (Efficace)"
+msgstr " (Effettiva)"
#: backends/keymapper/remap-dialog.cpp:107
msgid " (Active)"
-msgstr " (Attivo)"
+msgstr " (Attiva)"
#: backends/keymapper/remap-dialog.cpp:107
msgid " (Blocked)"
-msgstr " (Bloccato)"
+msgstr " (Bloccata)"
#: backends/keymapper/remap-dialog.cpp:120
msgid " (Global)"
@@ -2282,11 +2287,11 @@ msgstr "Aggancia ai bordi"
#: backends/platform/ds/arm9/source/dsoptions.cpp:68
msgid "Touch X Offset"
-msgstr "Compensa X del tocco"
+msgstr "Compensazione X del tocco"
#: backends/platform/ds/arm9/source/dsoptions.cpp:75
msgid "Touch Y Offset"
-msgstr "Compensa Y del tocco"
+msgstr "Compensazione Y del tocco"
#: backends/platform/ds/arm9/source/dsoptions.cpp:87
msgid "Use laptop trackpad-style cursor control"
@@ -2302,11 +2307,11 @@ msgstr "Sensibilità"
#: backends/platform/ds/arm9/source/dsoptions.cpp:99
msgid "Initial top screen scale:"
-msgstr "Schermo in primo piano:"
+msgstr "Ridimensionamento schermo superiore:"
#: backends/platform/ds/arm9/source/dsoptions.cpp:105
msgid "Main screen scaling:"
-msgstr "Schermo principale:"
+msgstr "Ridimensionamento schermo principale:"
#: backends/platform/ds/arm9/source/dsoptions.cpp:107
msgid "Hardware scale (fast, but low quality)"
@@ -2485,24 +2490,23 @@ msgstr "Controllo mouse"
#: backends/platform/tizen/fs.cpp:259
msgid "[ Data ]"
-msgstr ""
+msgstr "[ Dati ]"
#: backends/platform/tizen/fs.cpp:263
msgid "[ Resources ]"
-msgstr ""
+msgstr "[ Risorse ]"
#: backends/platform/tizen/fs.cpp:267
msgid "[ SDCard ]"
-msgstr ""
+msgstr "[ Scheda SD ]"
#: backends/platform/tizen/fs.cpp:271
msgid "[ Media ]"
-msgstr ""
+msgstr "[ Media ]"
#: backends/platform/tizen/fs.cpp:275
-#, fuzzy
msgid "[ Shared ]"
-msgstr "Condivisione:"
+msgstr "[ Condivisi ]"
#: backends/platform/wii/options.cpp:51
msgid "Video"
@@ -2639,7 +2643,7 @@ msgstr "Mostra tastiera"
#: backends/platform/wince/CEActionsPocket.cpp:48
msgid "Sound on/off"
-msgstr "Suono on/off"
+msgstr "Suono attivato/disattivato"
#: backends/platform/wince/CEActionsPocket.cpp:49
msgid "Right click"
@@ -2722,7 +2726,7 @@ msgstr "Devi mappare un tasto per l'azione \"Tasto destro\" per giocare"
#: backends/platform/wince/wince-sdl.cpp:529
msgid "Map hide toolbar action"
-msgstr "Mappa l'azione nascondi barra degli strumenti"
+msgstr "Mappa l'azione 'Nascondi barra degli strumenti'"
#: backends/platform/wince/wince-sdl.cpp:533
msgid "You must map a key to the 'Hide toolbar' action to play this game"
@@ -2732,11 +2736,11 @@ msgstr ""
#: backends/platform/wince/wince-sdl.cpp:542
msgid "Map Zoom Up action (optional)"
-msgstr "Mappa l'azione Zoom Up (opzionale)"
+msgstr "Mappa l'azione 'Zoom avanti' (opzionale)"
#: backends/platform/wince/wince-sdl.cpp:545
msgid "Map Zoom Down action (optional)"
-msgstr "Mappa l'azione Zoom Down (opzionale)"
+msgstr "Mappa l'azione 'Zoom indietro' (opzionale)"
#: backends/platform/wince/wince-sdl.cpp:553
msgid ""
@@ -2749,23 +2753,50 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Cerca aggiornamenti..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr "File dati del motore '%s' non trovato."
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr "Il file dati del motore '%s' è danneggiato."
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+"Il file dati del motore '%s' non è corretto. Versione richiesta: %d.%d; "
+"versione trovata: %d.%d."
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
-#, fuzzy
msgid "Color mode"
-msgstr "Modalità clic"
+msgstr "Modalità colore"
#: engines/adl/detection.cpp:46 engines/adl/detection.cpp:56
msgid "Use color graphics"
-msgstr ""
+msgstr "Usa grafica a colori"
#: engines/adl/detection.cpp:65
msgid "Scanlines"
-msgstr ""
+msgstr "Linee di scansione"
#: engines/adl/detection.cpp:66
-#, fuzzy
msgid "Show scanlines"
-msgstr "Mostra etichette oggetti"
+msgstr "Mostra linee di scansione"
#: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70
#: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:48
@@ -2779,51 +2810,53 @@ msgstr "Usa schermate di salvataggio originali"
#: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:49
#: engines/neverhood/detection.cpp:178 engines/sci/detection.cpp:431
#: engines/sherlock/detection.cpp:72 engines/toltecs/detection.cpp:201
-#, fuzzy
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 "
"di ScummVM"
#: engines/agi/detection.cpp:157
-#, fuzzy
msgid "Use an alternative palette"
-msgstr "Usa un'intro del gioco alternativa (solo versione CD)"
+msgstr "Usa una differente palette di colori"
#: engines/agi/detection.cpp:158
msgid ""
"Use an alternative palette, common for all Amiga games. This was the old "
"behavior"
msgstr ""
+"Usa una palette di colori alternativa, comune per tutti i giochi Amiga. "
+"Opzione predefinita nelle versioni precedenti"
#: engines/agi/detection.cpp:167
-#, fuzzy
msgid "Mouse support"
-msgstr "Interruzione del parlato"
+msgstr "Supporto mouse"
#: engines/agi/detection.cpp:168
msgid ""
"Enables mouse support. Allows to use mouse for movement and in game menus."
msgstr ""
+"Abilita il mouse. Permette l'uso del mouse per il movimento e per i menù di "
+"gioco."
#: engines/agi/detection.cpp:177
-#, fuzzy
msgid "Use Hercules hires font"
-msgstr "Hercules verde"
+msgstr "Usa caratteri Hercules ad alta risoluzione"
#: engines/agi/detection.cpp:178
msgid "Uses Hercules hires font, when font file is available."
-msgstr ""
+msgstr "Utilizza caratteri Hercules ad alta risoluzione, se disponibili."
#: engines/agi/detection.cpp:187
msgid "Pause when entering commands"
-msgstr ""
+msgstr "Pausa per immissione comandi"
#: engines/agi/detection.cpp:188
msgid ""
"Shows a command prompt window and pauses the game (like in SCI) instead of a "
"real-time prompt."
msgstr ""
+"Apre una finestra di comando e mette in pausa il gioco (come per i giochi "
+"SCI), anziché usare un prompt dei comandi in tempo reale."
#: engines/agi/saveload.cpp:774 engines/avalanche/parser.cpp:1888
#: engines/cge/events.cpp:83 engines/cge2/events.cpp:76
@@ -2831,12 +2864,12 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
-msgstr "Ripristina gioco:"
+msgstr "Ripristina partita:"
#: engines/agi/saveload.cpp:774 engines/avalanche/parser.cpp:1888
#: engines/cge/events.cpp:83 engines/cge2/events.cpp:76
@@ -2844,43 +2877,43 @@ msgstr "Ripristina gioco:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
msgstr "Ripristina"
#: engines/agos/saveload.cpp:159 engines/scumm/scumm.cpp:2436
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to load saved game from file:\n"
"\n"
"%s"
msgstr ""
-"Impossibile caricare il gioco dal file:\n"
+"Impossibile caricare la partita salvata nel file:\n"
"\n"
"%s"
#: engines/agos/saveload.cpp:194 engines/scumm/scumm.cpp:2429
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to save game to file:\n"
"\n"
"%s"
msgstr ""
-"Impossibile salvare il gioco nel file:\n"
+"Impossibile salvare la partita nel file:\n"
"\n"
"%s"
#: engines/agos/saveload.cpp:202 engines/scumm/scumm.cpp:2447
-#, fuzzy, c-format
+#, c-format
msgid ""
"Successfully saved game in file:\n"
"\n"
"%s"
msgstr ""
-"Gioco salvato con successo nel file:\n"
+"Partita salvata correttamente nel file:\n"
"\n"
"%s"
@@ -2890,16 +2923,14 @@ msgid "Cutscene file '%s' not found!"
msgstr "File della scena di intermezzo '%s' non trovato!"
#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:101
-#, fuzzy
msgid "Color Blind Mode"
-msgstr "Modalità clic"
+msgstr "Modalità daltonici"
#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:102
msgid "Enable Color Blind Mode by default"
-msgstr ""
+msgstr "Abilita di default la modalità daltonici"
#: engines/drascula/saveload.cpp:47
-#, fuzzy
msgid ""
"ScummVM found that you have old saved games for Drascula that should be "
"converted.\n"
@@ -2927,15 +2958,13 @@ msgstr "Visualizza la grafica con i colori brillanti del gioco"
#: engines/gob/inter_playtoons.cpp:255 engines/gob/inter_v2.cpp:1467
#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
-#, fuzzy
msgid "Failed to load saved game from file."
-msgstr "Impossibile caricare il gioco dal file."
+msgstr "Impossibile caricare la partita dal file."
#: engines/gob/inter_v2.cpp:1537 engines/gob/inter_geisha.cpp:263
#: engines/tinsel/saveload.cpp:545
-#, fuzzy
msgid "Failed to save game to file."
-msgstr "Impossibile salvare il gioco nel file."
+msgstr "Impossibile salvare la partita nel file."
#: engines/gob/inter_v5.cpp:107
msgid "Failed to delete file."
@@ -2951,15 +2980,15 @@ msgstr "Aumenta la velocità di riproduzione dei filmati"
#: engines/groovie/script.cpp:407
msgid "Failed to save game"
-msgstr "Impossibile salvare il gioco"
+msgstr "Impossibile salvare la partita"
#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
msgid "Gore Mode"
-msgstr ""
+msgstr "Sangue"
#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
msgid "Enable Gore Mode when available"
-msgstr ""
+msgstr "Abilita scene sanguinose (se disponibili)"
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
@@ -3017,7 +3046,7 @@ msgstr "Barre HP"
#: engines/kyra/detection.cpp:128
msgid "Enable hit point bar graphs"
-msgstr "Attiva le barre di Hit Point"
+msgstr "Attiva le barre di energia (Hit Points)"
#: engines/kyra/eobcommon.cpp:331 engines/kyra/lol.cpp:481
msgid "Move Forward"
@@ -3028,14 +3057,12 @@ msgid "Move Back"
msgstr "Vai indietro"
#: engines/kyra/eobcommon.cpp:333
-#, fuzzy
msgid "Move Left"
-msgstr "Scorri a sinistra"
+msgstr "Vai a sinistra"
#: engines/kyra/eobcommon.cpp:334
-#, fuzzy
msgid "Move Right"
-msgstr "Scorri a destra"
+msgstr "Vai a destra"
#: engines/kyra/eobcommon.cpp:335 engines/kyra/lol.cpp:485
#: engines/pegasus/pegasus.cpp:2509
@@ -3048,46 +3075,44 @@ msgid "Turn Right"
msgstr "Gira a destra"
#: engines/kyra/eobcommon.cpp:337
-#, fuzzy
msgid "Open/Close Inventory"
-msgstr "Inventario"
+msgstr "Apri/Chiudi l'inventario"
#: engines/kyra/eobcommon.cpp:338
msgid "Switch Inventory/Character screen"
-msgstr ""
+msgstr "Alterna schermata Inventario/Personaggio"
#: engines/kyra/eobcommon.cpp:339
msgid "Camp"
-msgstr ""
+msgstr "Accampamento"
#: engines/kyra/eobcommon.cpp:340
-#, fuzzy
msgid "Cast Spell"
-msgstr "Scegli incantesimo"
+msgstr "Lancia incantesimo"
#: engines/kyra/eobcommon.cpp:343
msgid "Spell Level 1"
-msgstr ""
+msgstr "Incantesimo di livello 1"
#: engines/kyra/eobcommon.cpp:344
msgid "Spell Level 2"
-msgstr ""
+msgstr "Incantesimo di livello 2"
#: engines/kyra/eobcommon.cpp:345
msgid "Spell Level 3"
-msgstr ""
+msgstr "Incantesimo di livello 3"
#: engines/kyra/eobcommon.cpp:346
msgid "Spell Level 4"
-msgstr ""
+msgstr "Incantesimo di livello 4"
#: engines/kyra/eobcommon.cpp:347
msgid "Spell Level 5"
-msgstr ""
+msgstr "Incantesimo di livello 5"
#: engines/kyra/eobcommon.cpp:356
msgid "Spell Level 6"
-msgstr ""
+msgstr "Incantesimo di livello 6"
#: engines/kyra/lol.cpp:478
msgid "Attack 1"
@@ -3145,6 +3170,12 @@ msgid ""
"Do you wish to use this saved game file with ScummVM?\n"
"\n"
msgstr ""
+"Il seguente salvataggio originale è stato rilevato nel percorso del gioco:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Desideri utilizzare questo salvataggio in ScummVM?\n"
+"\n"
#: engines/kyra/saveload_eob.cpp:590
#, c-format
@@ -3152,6 +3183,8 @@ msgid ""
"A saved game file was found in the specified slot %d. Overwrite?\n"
"\n"
msgstr ""
+"È già presente un salvataggio nello slot %d. Sovrascrivere?\n"
+"\n"
#: engines/kyra/saveload_eob.cpp:623
#, c-format
@@ -3162,35 +3195,40 @@ msgid ""
"'import_savefile'.\n"
"\n"
msgstr ""
+"%d salvataggi originali sono stati importati con successo in ScummVM.\n"
+"Per importare ulteriori salvataggi successivamente, è possibile utilizzare\n"
+"il comando 'import_savefile' disponibile nella console di debug di ScummVM.\n"
+"\n"
#: engines/mads/detection.cpp:91
msgid "Easy mouse interface"
-msgstr ""
+msgstr "Interfaccia mouse facilitata"
#: engines/mads/detection.cpp:92
-#, fuzzy
msgid "Shows object names when hovering the mouse over them"
-msgstr "Mostra etichette per gli oggetti al passaggio del mouse"
+msgstr "Mostra i nomi degli oggetti al passaggio del mouse"
#: engines/mads/detection.cpp:101 engines/mads/detection.cpp:102
msgid "Animated inventory items"
-msgstr ""
+msgstr "Animazioni oggetti inventario"
#: engines/mads/detection.cpp:111 engines/mads/detection.cpp:112
msgid "Animated game interface"
-msgstr ""
+msgstr "Animazioni interfaccia di gioco"
#: engines/mads/detection.cpp:121 engines/mads/detection.cpp:122
msgid "Naughty game mode"
-msgstr ""
+msgstr "Modalità osé"
#: engines/mohawk/detection.cpp:169
msgid "Play the Myst fly by movie"
-msgstr ""
+msgstr "Riproduci il volo panoramico di Myst"
#: engines/mohawk/detection.cpp:170
msgid "The Myst fly by movie was not played by the original engine."
msgstr ""
+"Il filmato del volo panoramico non veniva riprodotto dal motore originale "
+"del gioco."
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:181 engines/mohawk/dialogs.cpp:267
@@ -3207,12 +3245,10 @@ msgid "~D~rop Page"
msgstr "~L~ascia pagina"
#: engines/mohawk/dialogs.cpp:188
-#, fuzzy
msgid "Show ~M~ap"
-msgstr "~M~ostra mappa"
+msgstr "Mostra ~M~appa"
#: engines/mohawk/dialogs.cpp:194
-#, fuzzy
msgid "Main Men~u~"
msgstr "~M~enu principale"
@@ -3225,24 +3261,30 @@ msgid ""
"You're missing a Riven executable. The Windows executable is 'riven.exe' or "
"'rivendmo.exe'. "
msgstr ""
+"File eseguibile di Riven non trovato. L'eseguibile per la versione Windows è "
+"'riven.exe' o 'rivendmo.exe'. "
#: engines/mohawk/riven.cpp:151
msgid ""
"Using the 'arcriven.z' installer file also works. In addition, you can use "
"the Mac 'Riven' executable."
msgstr ""
+"È anche possibile usare il file di installazione 'arcriven.z', o "
+"l'eseguibile 'Riven' per la versione Mac."
#: engines/mohawk/riven.cpp:162
msgid ""
"You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also "
"works."
msgstr ""
+"File 'extras.mhk' non trovato. È anche possibile usare il file di "
+"installazione 'arcriven.z'."
#: engines/mohawk/riven_external.cpp:213
msgid ""
"Exploration beyond this point available only within the full version of\n"
"the game."
-msgstr ""
+msgstr "Le aree oltre questo punto sono disponibili solo nel gioco completo."
#: engines/mohawk/riven_external.cpp:655
msgid ""
@@ -3252,11 +3294,15 @@ msgid ""
"the game. ScummVM cannot do that and\n"
"the site no longer exists."
msgstr ""
+"A questo punto, la demo di Riven dovrebbe\n"
+"chiederti se desideri aprire il browser e indirizzarti\n"
+"al negozio online della Red Orb, per acquistare\n"
+"il gioco. ScummVM non può farlo, e comunque il\n"
+"sito non è più disponibile."
#: engines/mohawk/mohawk.cpp:61
-#, fuzzy
msgid "The game is paused. Press any key to continue."
-msgstr "Gioco in pausa. Premere SPAZIO per continuare."
+msgstr "Gioco in pausa. Premi un tasto per continuare."
#: engines/neverhood/detection.cpp:184
msgid "Skip the Hall of Records storyboard scenes"
@@ -3268,11 +3314,12 @@ msgstr "Permette al giocatore di saltare le scene della Hall of Records"
#: engines/neverhood/detection.cpp:191
msgid "Scale the making of videos to full screen"
-msgstr "Ridimensiona a tutto schermo i video dietro le quinte"
+msgstr "Ridimensiona a tutto schermo i video \"dietro le quinte\""
#: engines/neverhood/detection.cpp:192
msgid "Scale the making of videos, so that they use the whole screen"
-msgstr "Ridimensiona i video dietro le quinte, per adattarli allo schermo"
+msgstr ""
+"Ridimensiona i video \"dietro le quinte\", visualizzandoli a schermo intero"
#: engines/parallaction/saveload.cpp:130
#, c-format
@@ -3284,25 +3331,22 @@ msgstr ""
"\n"
#: engines/parallaction/saveload.cpp:194
-#, fuzzy
msgid "Load file"
-msgstr "Carica gioco:"
+msgstr "Carica gioco"
#: engines/parallaction/saveload.cpp:201
msgid "Loading game..."
msgstr "Caricamento..."
#: engines/parallaction/saveload.cpp:209
-#, fuzzy
msgid "Save file"
-msgstr "Salvataggio fallito!"
+msgstr "Salva gioco"
#: engines/parallaction/saveload.cpp:216
msgid "Saving game..."
msgstr "Salvataggio..."
#: engines/parallaction/saveload.cpp:269
-#, fuzzy
msgid ""
"ScummVM found that you have old saved games for Nippon Safes that should be "
"renamed.\n"
@@ -3320,7 +3364,6 @@ msgstr ""
"volta.\n"
#: engines/parallaction/saveload.cpp:316
-#, fuzzy
msgid "ScummVM successfully converted all your saved games."
msgstr "ScummVM ha convertito con successo tutti i tuoi salvataggi."
@@ -3337,7 +3380,6 @@ msgstr ""
"Per favore, contatta il team."
#: engines/pegasus/pegasus.cpp:714
-#, fuzzy
msgid "Invalid file name for saving"
msgstr "Nome salvataggio non valido"
@@ -3379,34 +3421,34 @@ msgstr "Intro alternativa"
#: engines/queen/detection.cpp:57
msgid "Use an alternative game intro (CD version only)"
-msgstr "Usa un'intro del gioco alternativa (solo versione CD)"
+msgstr "Usa un'introduzione alternativa (solo versione CD)"
#: engines/sci/detection.cpp:390
msgid "Skip EGA dithering pass (full color backgrounds)"
-msgstr ""
+msgstr "Non applicare l'effetto dithering EGA (usa sfondi a tinta unita)"
#: engines/sci/detection.cpp:391
msgid "Skip dithering pass in EGA games, graphics are shown with full colors"
msgstr ""
+"Non applica effetti dithering ai giochi con grafica EGA. Verranno sempre "
+"usati colori a piena intensità"
#: engines/sci/detection.cpp:400
-#, fuzzy
msgid "Enable high resolution graphics"
-msgstr "Attiva le barre di Hit Point"
+msgstr "Abilita grafica ad alta risoluzione"
#: engines/sci/detection.cpp:401
-#, fuzzy
msgid "Enable high resolution graphics/content"
-msgstr "Attiva le barre di Hit Point"
+msgstr "Abilita grafica ed altri contenuti ad alta risoluzione"
#: engines/sci/detection.cpp:410
-#, fuzzy
msgid "Enable black-lined video"
-msgstr "Attiva la modalità Roland GS"
+msgstr "Abilita linee di scansione nei video"
#: engines/sci/detection.cpp:411
msgid "Draw black lines over videos to increase their apparent sharpness"
msgstr ""
+"Applica linee di scansione ai video per migliorarne la nitidezza (apparente)"
#: engines/sci/detection.cpp:420
msgid "Prefer digital sound effects"
@@ -3452,7 +3494,6 @@ msgid "Use silver cursors"
msgstr "Usa cursori d'argento"
#: engines/sci/detection.cpp:474
-#, fuzzy
msgid ""
"Use the alternate set of silver cursors instead of the normal golden ones"
msgstr ""
@@ -3466,6 +3507,12 @@ msgid ""
"tried\n"
"to add and its version, language, etc.:\n"
msgstr ""
+"Il tuo gioco sembra essere di una versione sconosciuta. Se *NON* si tratta "
+"di\n"
+"una versione modificata (per esempio, una traduzione amatoriale), per "
+"favore\n"
+"comunica le seguenti informazioni al team di ScummVM, indicando il nome del\n"
+"gioco e la versione, lingua, eccetera:\n"
#: engines/scumm/detection.cpp:1138
msgid ""
@@ -3473,15 +3520,17 @@ msgid ""
"piracy.\n"
"The full version is available for purchase from the iTunes Store."
msgstr ""
+"La versione lite di \"Putt-Putt Saves the Zoo\" per iOS non è supportata per "
+"evitarne la pirateria.\n"
+"La versione completa è disponibile per l'acquisto sull'iTunes Store."
#: engines/scumm/detection.cpp:1341
-#, fuzzy
msgid "Show Object Line"
-msgstr "Mostra etichette oggetti"
+msgstr "Mostra riga nomi oggetti"
#: engines/scumm/detection.cpp:1342
msgid "Show the names of objects at the bottom of the screen"
-msgstr ""
+msgstr "Mostra i nomi degli oggetti nella parte inferiore dello schermo"
#: engines/scumm/dialogs.cpp:172
#, c-format
@@ -3506,15 +3555,13 @@ msgstr "Gioco in pausa. Premere SPAZIO per continuare."
#. "Moechten Sie wirklich neu starten? (J/N)J"
#. Will react to J as 'Yes'
#: engines/scumm/dialogs.cpp:179
-#, fuzzy
msgid "Are you sure you want to restart? (Y/N)Y"
-msgstr "Sei sicuro di voler riavviare? (S/N)S"
+msgstr "Sei sicuro di voler ricominciare? (S/N)S"
#. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment
#: engines/scumm/dialogs.cpp:181
-#, fuzzy
msgid "Are you sure you want to quit? (Y/N)Y"
-msgstr "Sei sicuro di voler uscire? (S/N)S"
+msgstr "Sei sicuro di voler uscire? (S/N)S"
#: engines/scumm/dialogs.cpp:186
msgid "Play"
@@ -3530,11 +3577,11 @@ msgstr "Devi inserire un nome"
#: engines/scumm/dialogs.cpp:192
msgid "The game was NOT saved (disk full?)"
-msgstr "Il gioco NON è stato salvato (disco pieno?)"
+msgstr "La partita NON è stata salvata (disco pieno?)"
#: engines/scumm/dialogs.cpp:193
msgid "The game was NOT loaded"
-msgstr "Il gioco NON è stato caricato"
+msgstr "La partita NON è stata caricata"
#: engines/scumm/dialogs.cpp:194
#, c-format
@@ -3552,7 +3599,7 @@ msgstr "Dai un nome al SALVATAGGIO"
#: engines/scumm/dialogs.cpp:197
msgid "Select a game to LOAD"
-msgstr "Seleziona un gioco da caricare"
+msgstr "Seleziona una partita da caricare"
#: engines/scumm/dialogs.cpp:198
msgid "Game title)"
@@ -3638,7 +3685,6 @@ msgid "Ctrl"
msgstr "Ctrl"
#: engines/scumm/help.cpp:80
-#, fuzzy
msgid "Load saved game 1-10"
msgstr "Carica salvataggio 1-10"
@@ -3649,7 +3695,6 @@ msgid "Alt"
msgstr "Alt"
#: engines/scumm/help.cpp:81
-#, fuzzy
msgid "Save game 1-10"
msgstr "Salva nella posizione 1-10"
@@ -3703,7 +3748,7 @@ msgstr "Esegui in modalità molto veloce (*)"
#: engines/scumm/help.cpp:100
msgid "Toggle mouse capture"
-msgstr "Attiva / disattiva ancoraggio del mouse"
+msgstr "Attiva/disattiva cattura puntatore del mouse"
#: engines/scumm/help.cpp:101
msgid "Switch between graphics filters"
@@ -3715,7 +3760,7 @@ msgstr "Aumenta / diminuisci dimensioni"
#: engines/scumm/help.cpp:103
msgid "Toggle aspect-ratio correction"
-msgstr "Cambia correzione proporzioni"
+msgstr "Attiva/disattiva correzione proporzioni"
#: engines/scumm/help.cpp:108
msgid "* Note that using ctrl-f and"
@@ -3813,7 +3858,7 @@ msgstr "Che cos'è"
#: engines/scumm/help.cpp:147
msgid "Unlock"
-msgstr "Apri"
+msgstr "Apri serratura (disserrare)"
#: engines/scumm/help.cpp:150
msgid "Put on"
@@ -4024,25 +4069,24 @@ msgid "Third kid"
msgstr "Terzo ragazzo"
#: engines/scumm/help.cpp:292
-#, fuzzy
msgid "Toggle Inventory/IQ Points display"
-msgstr "Mostra/nascondi schermo centrale dati"
+msgstr "Alterna tra visualizzazione Inventario e Punteggio QI"
#: engines/scumm/help.cpp:293
msgid "Toggle Keyboard/Mouse Fighting (*)"
-msgstr ""
+msgstr "Alterna tra Tastiera o Mouse per le fasi di combattimento (*)"
#: engines/scumm/help.cpp:295
msgid "* Keyboard Fighting is always on,"
-msgstr ""
+msgstr "* La tastiera è sempre attiva durante i combattimenti,"
#: engines/scumm/help.cpp:296
msgid " so despite the in-game message this"
-msgstr ""
+msgstr " quindi indipendentemente dai messaggi nel gioco,"
#: engines/scumm/help.cpp:297
msgid " actually toggles Mouse Fighting Off/On"
-msgstr ""
+msgstr " questa opzione non fa altro che attivare/disattivare il mouse"
#: engines/scumm/help.cpp:304
msgid "Fighting controls (numpad):"
@@ -4079,11 +4123,11 @@ msgstr "Colpisci in basso"
#: engines/scumm/help.cpp:315
msgid "Sucker punch"
-msgstr ""
+msgstr "Pugno \"a tradimento\""
#: engines/scumm/help.cpp:318
msgid "These are for Indy on left."
-msgstr "Questi sono i controlli quando"
+msgstr "Validi quando Indy si trova a sinistra."
#: engines/scumm/help.cpp:319
msgid "When Indy is on the right,"
@@ -4138,23 +4182,20 @@ msgid "Fly to lower right"
msgstr "Vola in basso a destra"
#: engines/scumm/input.cpp:578
-#, fuzzy
msgid "Snap scroll on"
-msgstr "Scorrimento morbido"
+msgstr "Scrolling \"a scatti\""
#: engines/scumm/input.cpp:580
msgid "Snap scroll off"
-msgstr ""
+msgstr "Scrolling normale"
#: engines/scumm/input.cpp:593
-#, fuzzy
msgid "Music volume: "
-msgstr "Volume musica:"
+msgstr "Volume musica: "
#: engines/scumm/input.cpp:610
-#, fuzzy
msgid "Subtitle speed: "
-msgstr "Velocità testo:"
+msgstr "Velocità testo: "
#: engines/scumm/scumm.cpp:1880
#, c-format
@@ -4166,87 +4207,81 @@ msgstr ""
"ma %s non è presente. Verrà usato AdLib."
#: engines/scumm/scumm.cpp:2733
-#, fuzzy
msgid ""
"Usually, Maniac Mansion would start now. But for that to work, the game "
"files for Maniac Mansion have to be in the 'Maniac' directory inside the "
"Tentacle game directory, and the game has to be added to ScummVM."
msgstr ""
-"Originariamente, a questo punto dovrebbe partire Maniac Mansion. Ma ScummVM "
-"non lo può ancora fare. Per giocarci, vai a \"Aggiungi gioco\" nel menu "
-"principale di ScummVM e seleziona la cartella \"Maniac\" all'interno della "
-"cartella di Day Of The Tentacle."
+"Teoricamente, a questo punto dovrebbe avviarsi Maniac Mansion. Ma perché "
+"funzioni, é necessario che i files di Maniac Mansion si trovino in una "
+"sottocartella \"MANIAC\" all'interno della cartella principale di Day Of The "
+"Tentacle. Il gioco deve inoltre essere aggiunto a ScummVM."
#: engines/scumm/players/player_v3m.cpp:129
msgid ""
"Could not find the 'Loom' Macintosh executable to read the\n"
"instruments from. Music will be disabled."
msgstr ""
+"L'eseguibile Macintosh di 'Loom', necessario per caricare gli\n"
+"strumenti, non è stato trovato. La musica non verrà riprodotta."
#: engines/scumm/players/player_v5m.cpp:107
msgid ""
"Could not find the 'Monkey Island' Macintosh executable to read the\n"
"instruments from. Music will be disabled."
msgstr ""
+"L'eseguibile Macintosh di 'Monkey Island', necessario per caricare gli\n"
+"strumenti, non è stato trovato. La musica non verrà riprodotta."
#: engines/sherlock/detection.cpp:81
msgid "Pixellated scene transitions"
-msgstr ""
+msgstr "Transizioni di scena pixellate"
#: engines/sherlock/detection.cpp:82
msgid "When changing scenes, a randomized pixel transition is done"
-msgstr ""
+msgstr "Nei cambi di scenario verrà applicato un effetto grafico \"pixellato\""
#: engines/sherlock/detection.cpp:91
msgid "Don't show hotspots when moving mouse"
-msgstr ""
+msgstr "Non mostrare le aree interattive al passaggio del mouse"
#: engines/sherlock/detection.cpp:92
msgid ""
"Only show hotspot names after you actually click on a hotspot or action "
"button"
msgstr ""
+"Mostra i nomi delle aree interattive solo dopo avere cliccato o premuto un "
+"tasto di azione"
#: engines/sherlock/detection.cpp:101
-#, fuzzy
msgid "Show character portraits"
-msgstr "Cambia personaggio"
+msgstr "Mostra volti dei personaggi"
#: engines/sherlock/detection.cpp:102
msgid "Show portraits for the characters when conversing"
-msgstr ""
+msgstr "Mostra i volti dei personaggi durante le conversazioni"
#: engines/sherlock/detection.cpp:111
msgid "Slide dialogs into view"
-msgstr ""
+msgstr "Animazione a scorrimento finestre dialogo"
#: engines/sherlock/detection.cpp:112
msgid "Slide UI dialogs into view, rather than simply showing them immediately"
msgstr ""
+"Mostra le finestre dell'interfaccia con un'animazione a scorrimento, anziché "
+"visualizzarle immediatamente"
#: engines/sherlock/detection.cpp:121
msgid "Transparent windows"
-msgstr ""
+msgstr "Finestre trasparenti"
#: engines/sherlock/detection.cpp:122
msgid "Show windows with a partially transparent background"
-msgstr ""
-
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"Impossibile trovare il file \"sky.cpt\"!\n"
-"Si prega di scaricarlo da www.scummvm.org"
+msgstr "Usa uno sfondo parzialmente trasparente per le finestre"
#: engines/sky/compact.cpp:141
-msgid ""
-"The \"sky.cpt\" file has an incorrect size.\n"
-"Please (re)download it from www.scummvm.org"
-msgstr ""
-"Il file \"sky.cpt\" non ha una dimensione corretta.\n"
-"Si prega di (ri)scaricarlo da www.scummvm.org"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
+msgstr "La dimensione del file dati \"sky.cpt\" non è corretta."
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4260,7 +4295,8 @@ msgstr "Usa la versione floppy dell'intro (solo versione CD)"
#, 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"
+"La scena PSX di intermezzo '%s' non può essere eseguita in modalità grafica "
+"indicizzata"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
msgid "DXA cutscenes found but ScummVM has been built without zlib"
@@ -4281,7 +4317,6 @@ msgid "Cutscene '%s' not found"
msgstr "Scena di intermezzo '%s' non trovata"
#: engines/sword1/control.cpp:863
-#, fuzzy
msgid ""
"ScummVM found that you have old saved games for Broken Sword 1 that should "
"be converted.\n"
@@ -4337,19 +4372,16 @@ msgstr "Mostra etichette per gli oggetti al passaggio del mouse"
#: engines/sword25/detection.cpp:46
msgid "Use English speech"
-msgstr ""
+msgstr "Usa il doppiaggio inglese"
#: engines/sword25/detection.cpp:47
msgid ""
"Use English speech instead of German for every language other than German"
msgstr ""
+"Usa il doppiaggio inglese anziché quello tedesco, per qualsiasi lingua "
+"diversa dal tedesco"
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr "Il file 'teenagent.dat' non è presente. Scaricarlo dal sito di ScummVM"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4357,57 +4389,50 @@ msgstr ""
"Il file teenagent.dat è compresso e zlib non è stata inclusa in questo "
"eseguibile. Si prega di decomprimerlo"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr "Variante del font non presente nel file dati del motore '%s'."
+
#: engines/toon/toon.cpp:222
-#, fuzzy, c-format
+#, c-format
msgid "Saved game in slot #%d "
-msgstr ""
-"Impossibile salvare nella posizione %i\n"
-"\n"
+msgstr "Partita salvata nella posizione %d "
#: engines/toon/toon.cpp:226
#, c-format
msgid "Could not quick save into slot #%d"
-msgstr ""
+msgstr "Impossibile effettuare un salvataggio rapido alla posizione %d"
#: engines/toon/toon.cpp:239
-#, fuzzy, c-format
+#, c-format
msgid "Saved game #%d quick loaded"
-msgstr ""
-"Impossibile salvare nella posizione %i\n"
-"\n"
+msgstr "Caricato salvataggio rapido #%d"
#: engines/toon/toon.cpp:243
-#, fuzzy, c-format
-msgid "Could not quick load the saved game #%d"
-msgstr "Vuoi caricare il salvataggio?"
-
-#: engines/toon/toon.cpp:4917
-#, fuzzy
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr "Il file 'teenagent.dat' non è presente. Scaricarlo dal sito di ScummVM"
-
-#: engines/toon/toon.cpp:4929
-#, fuzzy
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr "Il file 'teenagent.dat' non è presente. Scaricarlo dal sito di ScummVM"
-
-#: engines/toon/toon.cpp:4939
#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
+msgid "Could not quick load the saved game #%d"
+msgstr "Impossibile caricare il salvataggio rapido #%d"
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
-msgstr ""
+msgstr "Mostra contatore FPS"
#: engines/wintermute/detection.cpp:59
msgid "Show the current number of frames per second in the upper left corner"
msgstr ""
+"Mostra il numero di frame al secondo nell'angolo in alto a sinistra dello "
+"schermo"
+
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr "Applica filtro bilineare agli sprite (LENTO)"
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr "Applica un filtro grafico bilineare ad ogni sprite"
#: engines/zvision/detection_tables.h:52
-#, fuzzy
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
"Usa le schermate originali di salvataggio e caricamento, al posto di quelle "
@@ -4415,39 +4440,37 @@ msgstr ""
#: engines/zvision/detection_tables.h:61
msgid "Double FPS"
-msgstr ""
+msgstr "Raddoppia FPS"
#: engines/zvision/detection_tables.h:62
msgid "Increase framerate from 30 to 60 FPS"
-msgstr ""
+msgstr "Aumenta il numero di immagini al secondo da 30 a 60"
#: engines/zvision/detection_tables.h:71
-#, fuzzy
msgid "Enable Venus"
-msgstr "Attiva la modalità elio"
+msgstr "Attiva Venus"
#: engines/zvision/detection_tables.h:72
-#, fuzzy
msgid "Enable the Venus help system"
-msgstr "Attiva la modalità elio"
+msgstr "Abilita il sistema di aiuto Venus"
#: engines/zvision/detection_tables.h:81
msgid "Disable animation while turning"
-msgstr ""
+msgstr "Disabilita le animazioni durante gli spostamenti"
#: engines/zvision/detection_tables.h:82
msgid "Disable animation while turning in panorama mode"
-msgstr ""
+msgstr "Disabilita le animazioni durante le rotazioni in modalità panoramica"
#: engines/zvision/detection_tables.h:91
msgid "Use high resolution MPEG video"
-msgstr ""
+msgstr "Usa filmati MPEG ad alta risoluzione"
#: engines/zvision/detection_tables.h:92
-#, fuzzy
msgid "Use MPEG video from the DVD version instead of lower resolution AVI"
msgstr ""
-"Usa il set alternativo di cursori d'argento al posto di quelli normali d'oro"
+"Usa i filmati MPEG della versione DVD, anziché i filmati AVI a risoluzione "
+"inferiore"
#: engines/zvision/file/save_manager.cpp:220
#, c-format
@@ -4455,6 +4478,38 @@ msgid ""
"This saved game uses version %u, but this engine only supports up to version "
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+"Il salvataggio utilizza la versione %u, ma questo motore supporta solo la "
+"versione %d o inferiori. Procurati una motore aggiornato per usare questo "
+"salvataggio."
+
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Impossibile trovare il file \"sky.cpt\"!\n"
+#~ "Si prega di scaricarlo da www.scummvm.org"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Il file \"sky.cpt\" non ha una dimensione corretta.\n"
+#~ "Si prega di (ri)scaricarlo da www.scummvm.org"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Il file 'teenagent.dat' non è presente. Scaricarlo dal sito di ScummVM"
+
+#, fuzzy
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Il file 'teenagent.dat' non è presente. Scaricarlo dal sito di ScummVM"
+
+#, fuzzy
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Il file 'teenagent.dat' non è presente. Scaricarlo dal sito di ScummVM"
#, fuzzy
#~ msgid "Use original savegame dialog"
diff --git a/po/nb_NO.po b/po/nb_NO.po
index f649335058..ad7aca7b8f 100644
--- a/po/nb_NO.po
+++ b/po/nb_NO.po
@@ -1,5 +1,5 @@
# Norwegian (Bokmaal) translation for ScummVM.
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2010-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Einar Johan T. Sømåen <einarjohants@gmail.com>, 2010.
#
@@ -7,17 +7,18 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-10-05 23:47+0200\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2016-12-26 17:36+0000\n"
"Last-Translator: Einar Johan Trøan Sømåen <einarjohants@gmail.com>\n"
-"Language-Team: somaen <einarjohants@gmail.com>\n"
-"Language: Norsk (bokmaal)\n"
+"Language-Team: Norwegian Bokmål <https://translations.scummvm.org/projects/"
+"scummvm/scummvm/nb_NO/>\n"
+"Language: nb_NO\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 2.9\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.8.9\n"
"X-Language-name: Norsk (bokmaal)\n"
#: gui/about.cpp:94
@@ -163,13 +164,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -464,7 +465,7 @@ msgstr "Rom:"
#: gui/fluidsynth-dialog.cpp:79
msgid "Damp:"
-msgstr ""
+msgstr "Demp:"
#: gui/fluidsynth-dialog.cpp:86
msgid "Width:"
@@ -532,7 +533,7 @@ msgstr "Nullstill"
#: gui/fluidsynth-dialog.cpp:150
msgid "Reset all FluidSynth settings to their default values."
-msgstr "Nullstill alle FluidSynth-instillinger til standardverdier"
+msgstr "Nullstill alle FluidSynth-instillinger til standardverdier."
#: gui/fluidsynth-dialog.cpp:217
msgid ""
@@ -577,7 +578,6 @@ msgid "Associated key : %s"
msgstr "Koblet tast : %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Koblet tast: ingen"
@@ -846,9 +846,8 @@ msgid "the fullscreen setting could not be changed"
msgstr "fullskjermsinnstillingen kunne ikke endres"
#: gui/options.cpp:486
-#, fuzzy
msgid "the filtering setting could not be changed"
-msgstr "fullskjermsinnstillingen kunne ikke endres"
+msgstr "filterinnstillingen kunne ikke endres"
#: gui/options.cpp:809
msgid "Graphics mode:"
@@ -868,9 +867,8 @@ msgid "Fullscreen mode"
msgstr "Fullskjermsmodus"
#: gui/options.cpp:838
-#, fuzzy
msgid "Filter graphics"
-msgstr "Bruk fargegrafikk"
+msgstr "Filtrer grafikk"
#: gui/options.cpp:838
msgid "Use linear filtering when scaling graphics"
@@ -928,7 +926,7 @@ msgid ""
"soundcard"
msgstr ""
"Høyere verdier gir bedre lydkvalitet, men støttes kanskje ikke av ditt "
-"lydkort "
+"lydkort"
#: gui/options.cpp:900
msgid "GM Device:"
@@ -989,7 +987,7 @@ msgid ""
"connected to your computer"
msgstr ""
"Velg hvis du har et ekte Roland-kompatible lydkort tilkoblet maskinen, og "
-"vil bruke dette."
+"vil bruke dette"
#: gui/options.cpp:962
msgctxt "lowres"
@@ -1205,11 +1203,11 @@ msgstr "Plass brukt av ScummVM's lagrede spill på denne lagringsmåten"
#: gui/options.cpp:1425
msgid "Last sync time:"
-msgstr "Forrige synctidspunkt"
+msgstr "Forrige synctidspunkt:"
#: gui/options.cpp:1425
msgid "When the last saved games sync for this storage occured"
-msgstr "Når forrige sync av lagrede spill til denne lagringsmåten skjedde."
+msgstr "Når forrige sync av lagrede spill til denne lagringsmåten skjedde"
#: gui/options.cpp:1428 gui/storagewizarddialog.cpp:71
msgid "Connect"
@@ -1282,7 +1280,7 @@ msgstr "Klarte ikke å kontakte skylagring!"
#: gui/options.cpp:1631
msgid "Another cloud storage is already active."
-msgstr "En annen skylagring er allerede aktiv"
+msgstr "En annen skylagring er allerede aktiv."
#: gui/options.cpp:1667
msgid ""
@@ -1333,7 +1331,7 @@ msgstr "Stopp server"
msgid "Stop local webserver"
msgstr "Stopp lokal webserver"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1348,7 +1346,7 @@ msgstr "# neste"
#: gui/predictivedialog.cpp:87
msgid "add"
-msgstr ""
+msgstr "legg til"
#: gui/predictivedialog.cpp:92 gui/predictivedialog.cpp:167
msgid "Delete char"
@@ -1471,11 +1469,11 @@ msgstr "Nytt lagret spill"
#: gui/saveload-dialog.cpp:924
msgid "Create a new saved game"
-msgstr "Opprett ett nytt lagret spill."
+msgstr "Opprett ett nytt lagret spill"
#: gui/saveload-dialog.cpp:1053
msgid "Name: "
-msgstr "Navn:"
+msgstr "Navn: "
#: gui/saveload-dialog.cpp:1131
#, c-format
@@ -1497,7 +1495,7 @@ msgstr "Skaff koden fra lagringsmåten, skriv den inn"
#: gui/storagewizarddialog.cpp:62
msgid "in the following field and press 'Connect':"
-msgstr "i følgende felt og trykk 'Koble til'"
+msgstr "i følgende felt og trykk 'Koble til':"
#: gui/storagewizarddialog.cpp:69
msgid "Open URL"
@@ -1530,7 +1528,7 @@ msgstr "Vent til gjeldende lagringsmåte fullfører og prøv igjen."
#: gui/storagewizarddialog.cpp:182
#, c-format
msgid "Field %s has a mistake in it."
-msgstr "Felt %s har en feil"
+msgstr "Felt %s har en feil."
#: gui/storagewizarddialog.cpp:184
#, c-format
@@ -1695,9 +1693,8 @@ msgid "Could not find suitable engine plugin"
msgstr "Kunne ikke finne en passende engine-plugin"
#: common/error.cpp:68
-#, fuzzy
msgid "Engine plugin does not support saved games"
-msgstr "Spillmotor-plugin støtter ikke lagrede tilstander"
+msgstr "Spillmotor-plugin støtter ikke lagrede spill"
#: common/error.cpp:71
msgid "User canceled"
@@ -1799,7 +1796,7 @@ msgstr "~T~ilbake til oppstarter"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1820,7 +1817,7 @@ msgstr "Lagret spill:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1878,9 +1875,8 @@ msgid "Could not apply fullscreen setting."
msgstr "Kunne ikke aktivere fullskjermsinnstilling."
#: engines/engine.cpp:373
-#, fuzzy
msgid "Could not apply filtering setting."
-msgstr "Kunne ikke aktivere fullskjermsinnstilling."
+msgstr "Kunne ikke aktivere filterinnstilling."
#: engines/engine.cpp:473
msgid ""
@@ -2014,11 +2010,11 @@ msgstr "FM Towns Lyd"
msgid "PC-98 Audio"
msgstr "PC-98 Lyd"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Initialiserer MT-32-Emulator"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "MT-32 Emulator"
@@ -2036,7 +2032,7 @@ msgstr "C64 Lydemulator"
#: backends/cloud/storage.cpp:211
msgid "Saved games sync complete."
-msgstr "Sync av lagrede spill fullført"
+msgstr "Sync av lagrede spill fullført."
#: backends/cloud/storage.cpp:222
msgid "Saved games sync was cancelled."
@@ -2061,11 +2057,11 @@ msgstr ""
#: backends/cloud/storage.cpp:330
msgid "Download complete."
-msgstr "Nedlasting fullført"
+msgstr "Nedlasting fullført."
#: backends/cloud/storage.cpp:340
msgid "Download failed."
-msgstr "Nedlasting feilet"
+msgstr "Nedlasting feilet."
#: backends/events/default/default-events.cpp:196
msgid "Do you really want to return to the Launcher?"
@@ -2157,7 +2153,7 @@ msgstr "AV"
#: backends/events/webossdl/webossdl-events.cpp:315
msgid "Swipe two fingers to the right to toggle."
-msgstr "Sveip to fingre til høyre for å slå av/på"
+msgstr "Sveip to fingre til høyre for å slå av/på."
#. I18N: Auto-drag toggle status.
#: backends/events/webossdl/webossdl-events.cpp:335
@@ -2166,7 +2162,7 @@ msgstr "Auto-dramodus er nå"
#: backends/events/webossdl/webossdl-events.cpp:342
msgid "Swipe three fingers to the right to toggle."
-msgstr "Sveip tre fingre til høyre for å veksle"
+msgstr "Sveip tre fingre til høyre for å veksle."
#: backends/graphics/opengl/opengl-graphics.cpp:146
msgid "OpenGL"
@@ -2180,7 +2176,7 @@ msgstr "Vindusmodus"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:710
#, c-format
msgid "Resolution: %dx%d"
-msgstr ""
+msgstr "Oppløsning: %dx%d"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:731
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2338
@@ -2194,15 +2190,13 @@ msgstr "Aspekt-rate korrigering deaktivert"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:753
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2362
-#, fuzzy
msgid "Filtering enabled"
-msgstr "Klikking aktivert"
+msgstr "Filtrering aktivert"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:755
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2364
-#, fuzzy
msgid "Filtering disabled"
-msgstr "Klikking deaktivert"
+msgstr "Filtrering deaktivert"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:47
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
@@ -2681,7 +2675,7 @@ msgstr "Vil du åpne eller lagre spillet?"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
msgid " Are you sure you want to quit ? "
-msgstr " Er du sikker på at du vil avslutte ?"
+msgstr " Er du sikker på at du vil avslutte ? "
#: backends/platform/wince/CEActionsSmartphone.cpp:50
msgid "Keyboard"
@@ -2693,11 +2687,11 @@ msgstr "Roter"
#: backends/platform/wince/CELauncherDialog.cpp:56
msgid "Using SDL driver "
-msgstr "Bruk SDL-driver"
+msgstr "Bruk SDL-driver "
#: backends/platform/wince/CELauncherDialog.cpp:60
msgid "Display "
-msgstr "Skjerm"
+msgstr "Skjerm "
#: backends/platform/wince/CELauncherDialog.cpp:83
msgid "Do you want to perform an automatic scan ?"
@@ -2741,6 +2735,33 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Sjekk for oppdateringer..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr ""
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr ""
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr "Fargemodus"
@@ -2819,8 +2840,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2832,8 +2853,8 @@ msgstr "Gjennopprett spill:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -2938,7 +2959,7 @@ msgstr "Spill filmer med økt hastighet"
#: engines/groovie/script.cpp:407
msgid "Failed to save game"
-msgstr "Klarte ikke å lagre spill."
+msgstr "Klarte ikke å lagre spill"
#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
msgid "Gore Mode"
@@ -3257,11 +3278,11 @@ msgstr "Spillet er satt på pause. Trykk en tast for å fortsette."
#: engines/neverhood/detection.cpp:184
msgid "Skip the Hall of Records storyboard scenes"
-msgstr "Hopp over Hall of Records storyboard scenene."
+msgstr "Hopp over Hall of Records storyboard scenene"
#: engines/neverhood/detection.cpp:185
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
-msgstr "Tillater spilleren å hoppe forbi Hall of Records storyboard scener. "
+msgstr "Tillater spilleren å hoppe forbi Hall of Records storyboard scener"
#: engines/neverhood/detection.cpp:191
msgid "Scale the making of videos to full screen"
@@ -3269,7 +3290,7 @@ msgstr "Skaler «making of»-videoer til fullskjerm"
#: engines/neverhood/detection.cpp:192
msgid "Scale the making of videos, so that they use the whole screen"
-msgstr "Skaler «making of»-videoene, slik at de bruker hele skjermen."
+msgstr "Skaler «making of»-videoene, slik at de bruker hele skjermen"
#: engines/parallaction/saveload.cpp:130
#, c-format
@@ -3574,7 +3595,7 @@ msgstr "Tekst & Tale"
#: engines/scumm/dialogs.cpp:654
msgid "Select a Proficiency Level."
-msgstr "Velg ferdighetsnivå"
+msgstr "Velg ferdighetsnivå."
#: engines/scumm/dialogs.cpp:656
msgid "Refer to your Loom(TM) manual for help."
@@ -3960,7 +3981,7 @@ msgstr "Lagre / Åpne / Valg"
#: engines/scumm/help.cpp:256
msgid "Other game controls:"
-msgstr "Andre spillkontroller"
+msgstr "Andre spillkontroller:"
#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:268
msgid "Inventory:"
@@ -4032,7 +4053,7 @@ msgstr " dette faktisk slå musslåssing av/på"
#: engines/scumm/help.cpp:304
msgid "Fighting controls (numpad):"
-msgstr "Kampkontroller (talltastatur)"
+msgstr "Kampkontroller (talltastatur):"
#: engines/scumm/help.cpp:305 engines/scumm/help.cpp:306
#: engines/scumm/help.cpp:307
@@ -4085,7 +4106,7 @@ msgstr "henholdsvis 9, 6, og 3."
#: engines/scumm/help.cpp:328
msgid "Biplane controls (numpad):"
-msgstr "Flykontroller (talltastatur)"
+msgstr "Flykontroller (talltastatur):"
#: engines/scumm/help.cpp:329
msgid "Fly to upper left"
@@ -4218,21 +4239,9 @@ msgstr "Gjennomsiktige vinduer"
msgid "Show windows with a partially transparent background"
msgstr "Vis vinduer med en delvis gjennomsiktig bakgrunn"
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"Fant ikke filen \"sky.cpt\"!\n"
-"Vennligst last den ned fra 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"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
msgstr ""
-"\"sky.cpt\" filen har feil størrelse.\n"
-"Last den ned på nytt fra www.scummvm.org"
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4321,14 +4330,9 @@ msgstr "Bruk engelsk tale"
#: engines/sword25/detection.cpp:47
msgid ""
"Use English speech instead of German for every language other than German"
-msgstr "Bruk engelsk tale istedenfor tysk for alle andre språk enn tysk."
-
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr "Du mangler 'teenagent.dat'-fila. Hent den ned fra ScummVM-hjemmesiden"
+msgstr "Bruk engelsk tale istedenfor tysk for alle andre språk enn tysk"
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4336,6 +4340,11 @@ msgstr ""
"teenagent.dat-fila er komprimert og zlib har ikke blitt inkludert i denne "
"programfilen. Vennligst pakk den ut"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+
#: engines/toon/toon.cpp:222
#, fuzzy, c-format
msgid "Saved game in slot #%d "
@@ -4360,23 +4369,6 @@ msgstr ""
msgid "Could not quick load the saved game #%d"
msgstr "Vil du laste et lagret spill?"
-#: engines/toon/toon.cpp:4917
-#, fuzzy
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr "Du mangler 'teenagent.dat'-fila. Hent den ned fra ScummVM-hjemmesiden"
-
-#: engines/toon/toon.cpp:4929
-#, fuzzy
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr "Du mangler 'teenagent.dat'-fila. Hent den ned fra ScummVM-hjemmesiden"
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "Vis FPS-teller"
@@ -4387,6 +4379,14 @@ msgstr ""
"Vis det gjeldende antall bilder per sekund (FPS) i øvre venstre hjørne av "
"skjermen"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
@@ -4421,7 +4421,6 @@ msgid "Use high resolution MPEG video"
msgstr "Bruk høyoppløst MPEG-video"
#: engines/zvision/detection_tables.h:92
-#, fuzzy
msgid "Use MPEG video from the DVD version instead of lower resolution AVI"
msgstr ""
"Bruk MPEG-video fra DVD-versjonen istedenfor AVI-versjonen med lavere "
@@ -4434,6 +4433,35 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Fant ikke filen \"sky.cpt\"!\n"
+#~ "Vennligst last den ned fra www.scummvm.org"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "\"sky.cpt\" filen har feil størrelse.\n"
+#~ "Last den ned på nytt fra www.scummvm.org"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Du mangler 'teenagent.dat'-fila. Hent den ned fra ScummVM-hjemmesiden"
+
+#, fuzzy
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Du mangler 'teenagent.dat'-fila. Hent den ned fra ScummVM-hjemmesiden"
+
+#, fuzzy
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Du mangler 'teenagent.dat'-fila. Hent den ned fra ScummVM-hjemmesiden"
+
#~ msgid "Invalid save file name"
#~ msgstr "Ugyldig navn for lagret spill"
diff --git a/po/nl_NL.po b/po/nl_NL.po
index 976d377be6..015a027b3d 100644
--- a/po/nl_NL.po
+++ b/po/nl_NL.po
@@ -1,5 +1,5 @@
# Dutch translation for ScummVM.
-# Copyright (C) 2014-2016 The ScummVM Team
+# Copyright (C) 2014-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# FIRST AUTHOR scummvm@bencastricum.nl, 2014.
#
@@ -7,11 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.9.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-12-05 06:41+0000\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2017-01-02 18:38+0000\n"
"Last-Translator: Ben Castricum <github@bencastricum.nl>\n"
-"Language-Team: Dutch "
-"<https://translations.scummvm.org/projects/scummvm/scummvm/nl/>\n"
+"Language-Team: Dutch <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/nl/>\n"
"Language: nl_NL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
@@ -162,13 +162,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -577,7 +577,6 @@ msgid "Associated key : %s"
msgstr "geassocieerde toets : %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "geassocieerde toets : geen"
@@ -1340,7 +1339,7 @@ msgstr "Stop server"
msgid "Stop local webserver"
msgstr "Stop lokale webserver"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1805,7 +1804,7 @@ msgstr "S~t~artmenu"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1826,7 +1825,7 @@ msgstr "Spel opslaan:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -2022,11 +2021,11 @@ msgstr "FM-Towns Geluid"
msgid "PC-98 Audio"
msgstr "PC-98 Geluid"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "MT-32 Emulator initialiseren"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "MT-32 Emulator"
@@ -2511,7 +2510,7 @@ msgstr "Huidige videomodus:"
#: backends/platform/wii/options.cpp:56
msgid "Double-strike"
-msgstr "Dubbele-slag"
+msgstr "Double-strike"
#: backends/platform/wii/options.cpp:60
msgid "Horizontal underscan:"
@@ -2748,6 +2747,35 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Controleren op updates..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr "Kon de '%s' engine data file niet vinden."
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr "De '%s' engine data file is corrupt."
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+"Verkeerde versie van de '%s' engine data file gevonden. Verwacht werd %d.%d "
+"maar vond %d.%d."
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr "Kleurenmodus"
@@ -2831,8 +2859,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2844,8 +2872,8 @@ msgstr "Laad opgeslagen spel:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -4245,21 +4273,9 @@ msgstr "Transparante vensters"
msgid "Show windows with a partially transparent background"
msgstr "Toon vensters met een gedeeltelijk transparante achtergrond"
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"Het bestand \"sky.cpt\" is niet gevonden.\n"
-"Download a.u.b. het bestand van 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 ""
-"Het \"sky.cpt\" bestand heeft een incorrecte groote.\n"
-"Download a.u.b. het bestand (opnieuw) van www.scummvm.org"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
+msgstr "De \"sky.cpt\" engine data file heeft de verkeerde groote."
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4352,14 +4368,7 @@ msgid ""
"Use English speech instead of German for every language other than German"
msgstr "Gebruik Engels in plaats van Duits voor elke taal anders dan Duits"
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
-"Het 'teenagent.dat' bestand ontbreekt. U kunt die vinden op de ScummVM "
-"website"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4367,6 +4376,11 @@ msgstr ""
"Het \"teenagent.dat\" bestand is gecomprimeerd en zlib is niet meegenomen in "
"deze versie van ScummVM. Decomprimeer a.u.b. het bestand"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr "Font variant niet aanwezig in '%s' engine data file."
+
#: engines/toon/toon.cpp:222
#, c-format
msgid "Saved game in slot #%d "
@@ -4387,26 +4401,6 @@ msgstr "Opgeslagen spel #%d snel geladen"
msgid "Could not quick load the saved game #%d"
msgstr "Snel laden van opgeslagen spel #%d mislukt"
-#: engines/toon/toon.cpp:4917
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr ""
-"Het 'toon.dat' bestand ontbreekt. U kunt die vinden op de ScummVM website"
-
-#: engines/toon/toon.cpp:4929
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr ""
-"Het 'toon.dat' bestand is corrupt. U kunt een nieuwe vinden op de ScummVM "
-"website"
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-"Bestand 'toon.dat' heeft de verkeerde versie. Verwacht wordt %d.%d maar dit "
-"is %d.%d. Download hem van de ScummVM website"
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "Toon FPS-teller"
@@ -4415,6 +4409,14 @@ msgstr "Toon FPS-teller"
msgid "Show the current number of frames per second in the upper left corner"
msgstr "Toon de huidige Frames Per Second teller in de linkerbovenhoek"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr "Sprite bilineair filteren (langzaam)"
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr "Pas bilineair filteren toe op individuele sprites"
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
@@ -4464,6 +4466,42 @@ msgstr ""
"tot versie %d. U heeft een nieuwere versie van deze engine nodig om dit "
"opgeslagen te gebruiken."
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Het bestand \"sky.cpt\" is niet gevonden.\n"
+#~ "Download a.u.b. het bestand van www.scummvm.org"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Het \"sky.cpt\" bestand heeft een incorrecte groote.\n"
+#~ "Download a.u.b. het bestand (opnieuw) van www.scummvm.org"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Het 'teenagent.dat' bestand ontbreekt. U kunt die vinden op de ScummVM "
+#~ "website"
+
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Het 'toon.dat' bestand ontbreekt. U kunt die vinden op de ScummVM website"
+
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Het 'toon.dat' bestand is corrupt. U kunt een nieuwe vinden op de ScummVM "
+#~ "website"
+
+#~ msgid ""
+#~ "File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it "
+#~ "from the ScummVM website"
+#~ msgstr ""
+#~ "Bestand 'toon.dat' heeft de verkeerde versie. Verwacht wordt %d.%d maar "
+#~ "dit is %d.%d. Download hem van de ScummVM website"
+
#~ msgid "Invalid save file name"
#~ msgstr "ongeldige bewaarbestandsnaam"
diff --git a/po/nn_NO.po b/po/nn_NO.po
index 1fb00d7dca..c170ca8bb6 100644
--- a/po/nn_NO.po
+++ b/po/nn_NO.po
@@ -1,5 +1,5 @@
# Norwegian (Nynorsk) translation for ScummVM.
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2010-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Einar Johan T. Sømåen <einarjohants@gmail.com>, 2010.
#
@@ -7,17 +7,18 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-02-26 00:37+0100\n"
-"Last-Translator: Einar Johan Trøan Sømåen <einarjohants@gmail.com>\n"
-"Language-Team: somaen <einarjohants@gmail.com>\n"
-"Language: Norsk (nynorsk)\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2016-12-18 18:23+0000\n"
+"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
+"Language-Team: Norwegian Nynorsk <https://translations.scummvm.org/projects/"
+"scummvm/scummvm/nn/>\n"
+"Language: nn_NO\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 2.9\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 1.8.7\n"
"X-Language-name: Norsk (nynorsk)\n"
#: gui/about.cpp:94
@@ -160,13 +161,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -216,7 +217,7 @@ msgstr "Namn:"
#: gui/editgamedialog.cpp:143 gui/editgamedialog.cpp:145
#: gui/editgamedialog.cpp:146
msgid "Full title of the game"
-msgstr "Full speltittel:"
+msgstr "Full speltittel"
#: gui/editgamedialog.cpp:145
msgctxt "lowres"
@@ -525,7 +526,7 @@ msgstr "Nullstill"
#: gui/fluidsynth-dialog.cpp:150
msgid "Reset all FluidSynth settings to their default values."
-msgstr "Nullstill alle FluidSynth-instillingar til standardverdiar"
+msgstr "Nullstill alle FluidSynth-instillingar til standardverdiar."
#: gui/fluidsynth-dialog.cpp:217
msgid ""
@@ -570,7 +571,6 @@ msgid "Associated key : %s"
msgstr "Kopla tast : %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Kopla tast: ingen"
@@ -584,7 +584,7 @@ msgstr "Trykk tasten du vil kople"
#: gui/KeysDialog.cpp:145 gui/KeysDialog.h:36
msgid "Choose an action to map"
-msgstr "Vel ei handling for kopling:"
+msgstr "Vel ei handling for kopling"
#: gui/launcher.cpp:141 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:98
msgid "~Q~uit"
@@ -980,7 +980,7 @@ msgid ""
"connected to your computer"
msgstr ""
"Vel om du vil nytte din Roland-kompatible lydeining som du har tilkopla "
-"datamaskina di."
+"datamaskina di"
#: gui/options.cpp:962
msgctxt "lowres"
@@ -1292,7 +1292,7 @@ msgstr "Den velde mappa kan ikkje skrivast til. Vennlegst vel ein annan."
#: gui/options.cpp:1711
msgid "Select directory for GUI themes"
-msgstr "Vel ei mappe for GUI-tema:"
+msgstr "Vel ei mappe for GUI-tema"
#: gui/options.cpp:1721
msgid "Select directory for extra files"
@@ -1330,7 +1330,7 @@ msgstr "Teinar:"
msgid "Stop local webserver"
msgstr ""
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1471,7 +1471,7 @@ msgstr "Lag eit nytt lagra spel"
#: gui/saveload-dialog.cpp:1053
msgid "Name: "
-msgstr "Namn:"
+msgstr "Namn: "
#: gui/saveload-dialog.cpp:1131
#, c-format
@@ -1633,7 +1633,7 @@ msgstr "Feil under køyring av spel:"
#: base/main.cpp:594
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."
+msgstr "Kunne ikkje finne nokon motor som kunne køyre det velde spelet"
#: common/error.cpp:38
msgid "No error"
@@ -1793,7 +1793,7 @@ msgstr "Tilbake til Oppsta~r~tar"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1814,7 +1814,7 @@ msgstr "Lagra spel:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1858,7 +1858,7 @@ msgstr "~T~astar"
#: engines/engine.cpp:346
msgid "Could not initialize color format."
-msgstr "Høgkvalitetslyd (treigare) (omstart)"
+msgstr "Høgkvalitetslyd (treigare) (omstart)."
#: engines/engine.cpp:354
msgid "Could not switch to video mode: '"
@@ -1866,7 +1866,7 @@ msgstr "Kunne ikkje veksle til videomodus: '"
#: engines/engine.cpp:363
msgid "Could not apply aspect ratio setting."
-msgstr "Kunne ikkje slå på aspekt-korrigering"
+msgstr "Kunne ikkje slå på aspekt-korrigering."
#: engines/engine.cpp:368
msgid "Could not apply fullscreen setting."
@@ -1947,7 +1947,7 @@ msgid ""
"disconnected)."
msgstr ""
"Den valde lydeininga '%s' vart ikkje funne (t.d. kan den vere avslått eller "
-"fråkopla)"
+"fråkopla)."
#: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257
#: audio/mididrv.cpp:272
@@ -1970,7 +1970,7 @@ msgid ""
"disconnected)."
msgstr ""
"Den foretrukne lydeininga '%s' vart ikkje funne (t.d. kan den vere avslått "
-"eller fråkopla)"
+"eller fråkopla)."
#: audio/mididrv.cpp:272
#, c-format
@@ -2005,11 +2005,11 @@ msgstr "FM-Towns Lyd"
msgid "PC-98 Audio"
msgstr "PC-98 Lyd"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Initialiserar MT-32 Emulator"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "MT-32 Emulator"
@@ -2156,7 +2156,7 @@ msgstr ""
#: backends/events/webossdl/webossdl-events.cpp:342
msgid "Swipe three fingers to the right to toggle."
-msgstr "Sveip tre fingre til høgre for å veksle"
+msgstr "Sveip tre fingre til høgre for å veksle."
#: backends/graphics/opengl/opengl-graphics.cpp:146
msgid "OpenGL"
@@ -2511,7 +2511,7 @@ msgstr "Input"
#: backends/platform/wii/options.cpp:74
msgid "GC Pad sensitivity:"
-msgstr "GC Pad Sensitivitet"
+msgstr "GC Pad Sensitivitet:"
#: backends/platform/wii/options.cpp:80
msgid "GC Pad acceleration:"
@@ -2671,7 +2671,7 @@ msgstr "Vil du åpne eller lagre spelet?"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
msgid " Are you sure you want to quit ? "
-msgstr "Er du sikker på at du vil avslutte?"
+msgstr " Er du sikker på at du vil avslutte? "
#: backends/platform/wince/CEActionsSmartphone.cpp:50
msgid "Keyboard"
@@ -2683,11 +2683,11 @@ msgstr "Roter"
#: backends/platform/wince/CELauncherDialog.cpp:56
msgid "Using SDL driver "
-msgstr "Nyttar SDL-drivar"
+msgstr "Nyttar SDL-drivar "
#: backends/platform/wince/CELauncherDialog.cpp:60
msgid "Display "
-msgstr "Skjerm"
+msgstr "Skjerm "
#: backends/platform/wince/CELauncherDialog.cpp:83
msgid "Do you want to perform an automatic scan ?"
@@ -2729,6 +2729,33 @@ msgstr ""
msgid "Check for Updates..."
msgstr "SJå etter oppdateringar..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr ""
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr ""
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
#, fuzzy
msgid "Color mode"
@@ -2809,8 +2836,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2822,8 +2849,8 @@ msgstr "Gjenopprett spel:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3247,7 +3274,7 @@ msgstr ""
#: engines/parallaction/saveload.cpp:194
msgid "Load file"
-msgstr "Last fil:"
+msgstr "Last fil"
#: engines/parallaction/saveload.cpp:201
msgid "Loading game..."
@@ -3255,7 +3282,7 @@ msgstr "Lastar spel..."
#: engines/parallaction/saveload.cpp:209
msgid "Save file"
-msgstr "Lagra fil:"
+msgstr "Lagra fil"
#: engines/parallaction/saveload.cpp:216
msgid "Saving game..."
@@ -3798,7 +3825,7 @@ msgstr "Til Henry / Til Indy"
#. I18N: These are different musical notes
#: engines/scumm/help.cpp:180
msgid "play C minor on distaff"
-msgstr "spel C moll på distaffen "
+msgstr "spel C moll på distaffen"
#: engines/scumm/help.cpp:181
msgid "play D on distaff"
@@ -3993,7 +4020,7 @@ msgstr ""
#: engines/scumm/help.cpp:304
msgid "Fighting controls (numpad):"
-msgstr "Kampkontrollar (taltastatur)"
+msgstr "Kampkontrollar (taltastatur):"
#: engines/scumm/help.cpp:305 engines/scumm/help.cpp:306
#: engines/scumm/help.cpp:307
@@ -4046,7 +4073,7 @@ msgstr "9, 6, og 3, henhaldsvis."
#: engines/scumm/help.cpp:328
msgid "Biplane controls (numpad):"
-msgstr "Flykontrollar (taltastatur)"
+msgstr "Flykontrollar (taltastatur):"
#: engines/scumm/help.cpp:329
msgid "Fly to upper left"
@@ -4094,7 +4121,7 @@ msgstr ""
#: engines/scumm/input.cpp:593
msgid "Music volume: "
-msgstr "Musikkvolum:"
+msgstr "Musikkvolum: "
#: engines/scumm/input.cpp:610
msgid "Subtitle speed: "
@@ -4175,18 +4202,8 @@ msgstr "Gjennomsiktige vindauge"
msgid "Show windows with a partially transparent background"
msgstr ""
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"Kunne ikkje finne fila \"sky.cpt\"!\n"
-"Venlegst last den ned frå 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"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
msgstr ""
#: engines/sky/detection.cpp:44
@@ -4279,18 +4296,18 @@ msgid ""
"Use English speech instead of German for every language other than German"
msgstr ""
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr "Du mangler fila 'teenagent.dat'. Skaff den frå ScummVM-heimesida"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
"Fila teenagent.dat er komprimert og zlib er ikkje inkludert i binærfila, "
-"vennlegs dekomprimer den."
+"vennlegs dekomprimer den"
+
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
#: engines/toon/toon.cpp:222
#, fuzzy, c-format
@@ -4316,23 +4333,6 @@ msgstr ""
msgid "Could not quick load the saved game #%d"
msgstr "Vil du laste det lagra spelet?"
-#: engines/toon/toon.cpp:4917
-#, fuzzy
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr "Du mangler fila 'teenagent.dat'. Skaff den frå ScummVM-heimesida"
-
-#: engines/toon/toon.cpp:4929
-#, fuzzy
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr "Du mangler fila 'teenagent.dat'. Skaff den frå ScummVM-heimesida"
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "Syn FPS-teller"
@@ -4342,6 +4342,14 @@ msgid "Show the current number of frames per second in the upper left corner"
msgstr ""
"Vis det gjeldande antall bilete per sekund i øvre venstre hjørne av skjermen"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
@@ -4390,6 +4398,25 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Kunne ikkje finne fila \"sky.cpt\"!\n"
+#~ "Venlegst last den ned frå www.scummvm.org"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr "Du mangler fila 'teenagent.dat'. Skaff den frå ScummVM-heimesida"
+
+#, fuzzy
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr "Du mangler fila 'teenagent.dat'. Skaff den frå ScummVM-heimesida"
+
+#, fuzzy
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr "Du mangler fila 'teenagent.dat'. Skaff den frå ScummVM-heimesida"
+
#~ msgid "Invalid save file name"
#~ msgstr "Ugyldig namn for lagra spel"
diff --git a/po/pl_PL.po b/po/pl_PL.po
index bdcfb85ee7..94413b3ed7 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -1,5 +1,5 @@
# Polish translation for ScummVM.
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2010-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Grajpopolsku.pl <grajpopolsku@gmail.com>, 2011-2013.
#
@@ -7,11 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-11-29 23:23+0000\n"
-"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
-"Language-Team: Polish "
-"<https://translations.scummvm.org/projects/scummvm/scummvm/pl/>\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2017-01-06 10:37+0000\n"
+"Last-Translator: Rafa³ Rzepecki <divided.mind@gmail.com>\n"
+"Language-Team: Polish <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/pl/>\n"
"Language: pl_PL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-2\n"
@@ -93,15 +93,15 @@ msgstr "Wybierz katalog z plikami gry"
#: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263
msgid "From: "
-msgstr ""
+msgstr "¬ród³o: "
#: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264
msgid "To: "
-msgstr ""
+msgstr "Cel: "
#: gui/downloaddialog.cpp:63
msgid "Cancel download"
-msgstr ""
+msgstr "Przerwij pobieranie"
#: gui/downloaddialog.cpp:65
msgctxt "lowres"
@@ -168,13 +168,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -184,6 +184,8 @@ msgid ""
"The \"%s\" already exists in the specified directory.\n"
"Do you really want to download files into that directory?"
msgstr ""
+"Katalog \"%s\" ju¿ istnieje w wybranej ¶cie¿ce.\n"
+"Czy na pewno pobraæ pliki do tego katalogu?"
#: gui/downloaddialog.cpp:251
#, c-format
@@ -420,6 +422,8 @@ msgid ""
"Saved games sync feature doesn't work with non-default directories. If you "
"want your saved games to sync, use default directory."
msgstr ""
+"Synchronizacja zapisanych stanów dzia³a wy³±cznie przy standardowych "
+"¶cie¿kach. Aby z niej korzystaæ nale¿y u¿ywaæ domy¶lnych katalogów."
#: gui/editgamedialog.cpp:534
msgid "This game ID is already taken. Please choose another one."
@@ -576,7 +580,6 @@ msgid "Associated key : %s"
msgstr "Przypisany klawisz: %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Przypisany klawisz: brak"
@@ -705,7 +708,7 @@ msgstr ""
#: gui/launcher.cpp:365
msgid "This directory cannot be used yet, it is being downloaded into!"
-msgstr ""
+msgstr "Z tego katalogu nie mo¿na jeszcze korzystaæ, trwa pobieranie!"
#: gui/launcher.cpp:415
msgid "Do you really want to remove this game configuration?"
@@ -841,9 +844,8 @@ msgid "the fullscreen setting could not be changed"
msgstr "nie uda³o siê zmieniæ trybu pe³noekranowego"
#: gui/options.cpp:486
-#, fuzzy
msgid "the filtering setting could not be changed"
-msgstr "nie uda³o siê zmieniæ trybu pe³noekranowego"
+msgstr "nie uda³o siê zmieniæ trybu filtrowania"
#: gui/options.cpp:809
msgid "Graphics mode:"
@@ -863,13 +865,12 @@ msgid "Fullscreen mode"
msgstr "Pe³ny ekran"
#: gui/options.cpp:838
-#, fuzzy
msgid "Filter graphics"
-msgstr "Grafika"
+msgstr "Filtrowanie obrazu"
#: gui/options.cpp:838
msgid "Use linear filtering when scaling graphics"
-msgstr ""
+msgstr "U¿ywa filtrowania dwuliniowego przy skalowaniu obrazu"
#: gui/options.cpp:841
msgid "Aspect ratio correction"
@@ -1154,36 +1155,36 @@ msgstr "Jêzyk interfejsu ScummVM"
#: gui/options.cpp:1381
msgid "Update check:"
-msgstr ""
+msgstr "Sprawd¼ aktualizacje:"
#: gui/options.cpp:1381
msgid "How often to check ScummVM updates"
-msgstr ""
+msgstr "Czêstotliwo¶æ automatycznego wyszukiwania aktualizacji ScummVM"
#: gui/options.cpp:1393
msgid "Check now"
-msgstr ""
+msgstr "Sprawd¼ teraz"
#: gui/options.cpp:1401
msgid "Cloud"
-msgstr ""
+msgstr "Chmura"
#: gui/options.cpp:1403
msgctxt "lowres"
msgid "Cloud"
-msgstr ""
+msgstr "Chmura"
#: gui/options.cpp:1408
msgid "Storage:"
-msgstr ""
+msgstr "Dostawca:"
#: gui/options.cpp:1408
msgid "Active cloud storage"
-msgstr ""
+msgstr "Wybrany dostawca przechowywania w chmurze"
#: gui/options.cpp:1415 gui/options.cpp:1972
msgid "<none>"
-msgstr ""
+msgstr "<brak>"
#: gui/options.cpp:1419 backends/platform/wii/options.cpp:114
msgid "Username:"
@@ -1191,101 +1192,98 @@ msgstr "Nazwa u¿ytkownika:"
#: gui/options.cpp:1419
msgid "Username used by this storage"
-msgstr ""
+msgstr "Nazwa u¿ytkownika w tej us³udze"
#: gui/options.cpp:1422
msgid "Used space:"
-msgstr ""
+msgstr "U¿ywane miejsce:"
#: gui/options.cpp:1422
msgid "Space used by ScummVM's saved games on this storage"
-msgstr ""
+msgstr "Ilo¶æ miejsca zajmowana przez gry zapisane przez ScummVM w tej us³udze"
#: gui/options.cpp:1425
msgid "Last sync time:"
-msgstr ""
+msgstr "Ostatnia synchronizacja:"
#: gui/options.cpp:1425
msgid "When the last saved games sync for this storage occured"
-msgstr ""
+msgstr "Czas ostatniej synchronizacji zapisanych stanów gry z t± us³ug±"
#: gui/options.cpp:1428 gui/storagewizarddialog.cpp:71
msgid "Connect"
-msgstr ""
+msgstr "Po³±cz"
#: gui/options.cpp:1428
msgid "Open wizard dialog to connect your cloud storage account"
-msgstr ""
+msgstr "Otwórz asystenta po³±czenia z us³ug± przechowywania danych w chmurze"
#: gui/options.cpp:1429
msgid "Refresh"
-msgstr ""
+msgstr "Od¶wie¿"
#: gui/options.cpp:1429
msgid "Refresh current cloud storage information (username and usage)"
msgstr ""
+"Od¶wie¿ informacje o us³udze przechowywania (nazwê u¿ytkownika i zajmowane "
+"miejsce)"
#: gui/options.cpp:1430
-#, fuzzy
msgid "Download"
-msgstr "W dó³"
+msgstr "Pobierz"
#: gui/options.cpp:1430
msgid "Open downloads manager dialog"
-msgstr ""
+msgstr "Otwiera okno dialogowe zarz±dzania pobieraniem"
#: gui/options.cpp:1432
msgid "Run server"
-msgstr ""
+msgstr "Uruchom serwer"
#: gui/options.cpp:1432
msgid "Run local webserver"
-msgstr ""
+msgstr "Uruchamia lokalny serwer WWW"
#: gui/options.cpp:1433 gui/options.cpp:2082
-#, fuzzy
msgid "Not running"
-msgstr "B³±d podczas uruchamiania gry:"
+msgstr "Nie uruchomiono"
#: gui/options.cpp:1437
-#, fuzzy
msgid "/root/ Path:"
-msgstr "¦c. dodatków:"
+msgstr "¦cie¿ka bazowa:"
#: gui/options.cpp:1437 gui/options.cpp:1439 gui/options.cpp:1440
-#, fuzzy
msgid "Specifies which directory the Files Manager can access"
-msgstr "Okre¶la gdzie zapisywaæ stan gry"
+msgstr "Okre¶la ¶cie¿kê g³ówn± dla mened¿era plików"
#: gui/options.cpp:1439
-#, fuzzy
msgctxt "lowres"
msgid "/root/ Path:"
-msgstr "¦c. dodatków:"
+msgstr "G³ówna /:"
#: gui/options.cpp:1449
-#, fuzzy
msgid "Server's port:"
-msgstr "Serwer:"
+msgstr "Port:"
#: gui/options.cpp:1449
msgid ""
"Which port is used by the server\n"
"Auth with server is not available with non-default port"
msgstr ""
+"Okre¶la port u¿ywany do komunikacji z serwerem.\n"
+"(Uwierzytelnianie jest dostêpne jedynie na domy¶lnym porcie.)"
#: gui/options.cpp:1462
msgid "Apply"
-msgstr ""
+msgstr "Zastosuj"
#: gui/options.cpp:1628
-#, fuzzy
msgid "Failed to change cloud storage!"
-msgstr "Nie uda³o siê zapisaæ stanu gry"
+msgstr "Nie uda³o siê zmieniæ dostawcy przechowywania!"
#: gui/options.cpp:1631
msgid "Another cloud storage is already active."
-msgstr ""
+msgstr "Inna us³uga przechowywania jest ju¿ aktywna."
#: gui/options.cpp:1667
msgid ""
@@ -1312,38 +1310,37 @@ msgid "Select directory for plugins"
msgstr "Wybierz katalog dla wtyczek"
#: gui/options.cpp:1744
-#, fuzzy
msgid "Select directory for Files Manager /root/"
-msgstr "Wybierz katalog dla dodatkowych plików"
+msgstr "Wybierz g³ówny katalog dla mened¿era plików"
#: gui/options.cpp:1979
#, c-format
msgid "%llu bytes"
-msgstr ""
+msgstr "%llu B"
#: gui/options.cpp:1987
msgid "<right now>"
-msgstr ""
+msgstr "<teraz>"
#: gui/options.cpp:1989
-#, fuzzy
msgid "<never>"
-msgstr "Nigdy"
+msgstr "<nigdy>"
#: gui/options.cpp:2073
-#, fuzzy
msgid "Stop server"
-msgstr "Serwer:"
+msgstr "Zatrzymaj serwer"
#: gui/options.cpp:2074
msgid "Stop local webserver"
-msgstr ""
+msgstr "Zatrzymuje lokalny serwer WWW"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
msgstr ""
+"Po³±czenie nieudane.\n"
+"Proszê sprawdziæ po³±czenie z Internetem."
#. I18N: You must leave "#" as is, only word 'next' is translatable
#: gui/predictivedialog.cpp:86
@@ -1417,7 +1414,6 @@ msgid "Unknown Author"
msgstr "Nieznany autor"
#: gui/remotebrowser.cpp:128
-#, fuzzy
msgid "ScummVM could not access the directory!"
msgstr "ScummVM nie mo¿e otworzyæ katalogu!"
@@ -1458,9 +1454,8 @@ msgid "Playtime: "
msgstr "Czas gry: "
#: gui/saveload-dialog.cpp:577 gui/saveload-dialog.cpp:665
-#, fuzzy
msgid "Untitled saved game"
-msgstr "Zapis bez nazwy"
+msgstr "Nienazwany stan gry"
#: gui/saveload-dialog.cpp:718
msgid "Next"
@@ -1490,19 +1485,19 @@ msgstr "Podaj opis dla slotu %d:"
#: gui/storagewizarddialog.cpp:55
#, c-format
msgid "%s Storage Connection Wizard"
-msgstr ""
+msgstr "%s - asystent po³±czenia"
#: gui/storagewizarddialog.cpp:58
msgid "Navigate to the following URL:"
-msgstr ""
+msgstr "Proszê otworzyæ nastêpuj±cy adres:"
#: gui/storagewizarddialog.cpp:61
msgid "Obtain the code from the storage, enter it"
-msgstr ""
+msgstr "Proszê wpisaæ kod uzyskany w us³udze"
#: gui/storagewizarddialog.cpp:62
msgid "in the following field and press 'Connect':"
-msgstr ""
+msgstr "w tym polu i nacisn±æ 'Po³±cz':"
#: gui/storagewizarddialog.cpp:69
#, fuzzy
@@ -1802,7 +1797,7 @@ msgstr "~P~owrót do launchera"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1823,7 +1818,7 @@ msgstr "Zapis:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -2013,11 +2008,11 @@ msgstr "D¼wiêk FM-Towns"
msgid "PC-98 Audio"
msgstr "D¼wiêk PC-98"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Inicjalizacja emulatora MT-32"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "Emulator MT-32"
@@ -2736,6 +2731,33 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Sprawd¼ aktualizacjê..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr ""
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr ""
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
#, fuzzy
msgid "Color mode"
@@ -2818,8 +2840,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2831,8 +2853,8 @@ msgstr "Wznów grê:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -4220,21 +4242,9 @@ msgstr "Przezroczyste okna"
msgid "Show windows with a partially transparent background"
msgstr "Wy¶wietlaj okna z pó³przezroczystym t³em"
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"Nie znaleziono pliku \"sky.cpt\"!\n"
-"Pobierz go ze strony 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"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
msgstr ""
-"Plik \"sky.cpt\" ma nieprawid³owy rozmiar.\n"
-"Pobierz go (ponownie) ze strony www.scummvm.org"
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4333,12 +4343,7 @@ msgid ""
"Use English speech instead of German for every language other than German"
msgstr ""
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr "Nie masz pliku \"teenagent.dat\". Pobierz go ze strony ScummVM"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4346,6 +4351,11 @@ msgstr ""
"Plik teenagent.dat jest skompresowany, a ScummVM nie zawiera obs³ugi zlib. "
"Rozpakuj plik"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+
#: engines/toon/toon.cpp:222
#, fuzzy, c-format
msgid "Saved game in slot #%d "
@@ -4370,23 +4380,6 @@ msgstr ""
msgid "Could not quick load the saved game #%d"
msgstr "Chcesz wczytaæ zapis stanu gry?"
-#: engines/toon/toon.cpp:4917
-#, fuzzy
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr "Nie masz pliku \"teenagent.dat\". Pobierz go ze strony ScummVM"
-
-#: engines/toon/toon.cpp:4929
-#, fuzzy
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr "Nie masz pliku \"teenagent.dat\". Pobierz go ze strony ScummVM"
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "Poka¿ licznik klatek na sekundê"
@@ -4395,6 +4388,14 @@ msgstr "Poka¿ licznik klatek na sekundê"
msgid "Show the current number of frames per second in the upper left corner"
msgstr "Wy¶wietl aktualn± liczbê klatek na sekundê w lewym, górnym logu"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr "U¿yj oryginalnych ekranów odczytu/zapisu zamiast interfejsu ScummVM"
@@ -4439,6 +4440,32 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Nie znaleziono pliku \"sky.cpt\"!\n"
+#~ "Pobierz go ze strony www.scummvm.org"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Plik \"sky.cpt\" ma nieprawid³owy rozmiar.\n"
+#~ "Pobierz go (ponownie) ze strony www.scummvm.org"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr "Nie masz pliku \"teenagent.dat\". Pobierz go ze strony ScummVM"
+
+#, fuzzy
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr "Nie masz pliku \"teenagent.dat\". Pobierz go ze strony ScummVM"
+
+#, fuzzy
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr "Nie masz pliku \"teenagent.dat\". Pobierz go ze strony ScummVM"
+
#~ msgid "Invalid save file name"
#~ msgstr "Nieprawid³owa nazwa pliku zapisu"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 5a466a9bd0..e62fcadc67 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -1,5 +1,5 @@
# Portuguese (Brazilian) translation for ScummVM.
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2010-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Saulo Benigno <saulobenigno@gmail.com>, 2010.
#
@@ -7,15 +7,17 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\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"
-"Language: Portugues (Brasil)\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2016-12-22 21:50+0000\n"
+"Last-Translator: Alexandre Folle de Menezes <afmenez@terra.com.br>\n"
+"Language-Team: Portuguese (Brazil) <https://translations.scummvm.org/"
+"projects/scummvm/scummvm/pt_BR/>\n"
+"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"Plural-Forms: nplurals=2; plural=n > 1;\n"
+"X-Generator: Weblate 2.9\n"
"X-Poedit-Language: Portuguese\n"
"X-Poedit-Country: BRAZIL\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
@@ -35,13 +37,12 @@ msgid "Available engines:"
msgstr "Programas disponíveis:"
#: gui/browser.cpp:68 gui/browser_osx.mm:104
-#, fuzzy
msgid "Show hidden files"
-msgstr "Mostrar / Ocultar console"
+msgstr "Mostrar arquivos ocultos"
#: gui/browser.cpp:68
msgid "Show files marked with the hidden attribute"
-msgstr ""
+msgstr "Mostrar arquivos marcados como ocultos"
#: gui/browser.cpp:72 gui/remotebrowser.cpp:56
msgid "Go up"
@@ -81,9 +82,8 @@ msgid "Choose"
msgstr "Escolher"
#: gui/downloaddialog.cpp:48
-#, fuzzy
msgid "Select directory where to download game data"
-msgstr "Selecione a pasta com os arquivos do jogo"
+msgstr "Selecione a pasta para baixar os arquivos do jogo"
#: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:470 gui/launcher.cpp:197
msgid "Select directory with game data"
@@ -91,11 +91,11 @@ msgstr "Selecione a pasta com os arquivos do jogo"
#: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263
msgid "From: "
-msgstr ""
+msgstr "De: "
#: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264
msgid "To: "
-msgstr ""
+msgstr "Para: "
#: gui/downloaddialog.cpp:63
msgid "Cancel download"
@@ -108,13 +108,14 @@ msgstr ""
#: gui/downloaddialog.cpp:67
msgid "Hide"
-msgstr ""
+msgstr "Ocultar"
#: gui/downloaddialog.cpp:117
msgid ""
"It looks like your connection is limited. Do you really want to download "
"files with it?"
msgstr ""
+"Parece que a sua conexão é limitada. Deseja baixar os arquivos mesmo assim?"
#: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:152
#: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217
@@ -151,6 +152,8 @@ msgid ""
"Cannot create a directory to download - the specified directory has a file "
"with the same name."
msgstr ""
+"Não é possível criar uma pasta para baixar - a pasta especificada possui um "
+"arquivo com o mesmo nome."
#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:522
@@ -162,13 +165,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -178,11 +181,13 @@ msgid ""
"The \"%s\" already exists in the specified directory.\n"
"Do you really want to download files into that directory?"
msgstr ""
+"O \"%s\" já existe na pasta especificada.\n"
+"Deseja mesmo baixar arquivos nessa pasta?"
#: gui/downloaddialog.cpp:251
#, c-format
msgid "Downloaded %s %s / %s %s"
-msgstr ""
+msgstr "Baixado %s %s / %s %s"
#: gui/downloaddialog.cpp:258
#, fuzzy, c-format
@@ -354,7 +359,7 @@ msgstr "Pasta do Jogo:"
#: gui/editgamedialog.cpp:271 gui/options.cpp:1296
msgid "Extra Path:"
-msgstr "Pasta de Extras"
+msgstr "Pasta de Extras:"
#: gui/editgamedialog.cpp:271 gui/editgamedialog.cpp:273
#: gui/editgamedialog.cpp:274
@@ -364,11 +369,11 @@ msgstr "Especifique a pasta para dados utilizados no jogo"
#: gui/editgamedialog.cpp:273 gui/options.cpp:1298
msgctxt "lowres"
msgid "Extra Path:"
-msgstr "Pasta de Extras"
+msgstr "Pasta de Extras:"
#: gui/editgamedialog.cpp:280 gui/options.cpp:1280
msgid "Save Path:"
-msgstr "Pasta para Salvar"
+msgstr "Pasta para Salvar:"
#: gui/editgamedialog.cpp:280 gui/editgamedialog.cpp:282
#: gui/editgamedialog.cpp:283 gui/options.cpp:1280 gui/options.cpp:1282
@@ -379,7 +384,7 @@ msgstr "Especifique onde guardar seus jogos salvos"
#: gui/editgamedialog.cpp:282 gui/options.cpp:1282
msgctxt "lowres"
msgid "Save Path:"
-msgstr "Pasta para Salvar"
+msgstr "Pasta para Salvar:"
#: gui/editgamedialog.cpp:301 gui/editgamedialog.cpp:398
#: gui/editgamedialog.cpp:457 gui/editgamedialog.cpp:518 gui/options.cpp:1291
@@ -576,7 +581,6 @@ msgid "Associated key : %s"
msgstr "Tecla associada: %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Tecla associada: nenhuma"
@@ -610,7 +614,7 @@ msgstr "Sobre o ScumnmVM"
#: gui/launcher.cpp:143
msgid "~O~ptions..."
-msgstr "~O~pções"
+msgstr "~O~pções..."
#: gui/launcher.cpp:143
msgid "Change global ScummVM options"
@@ -626,7 +630,7 @@ msgstr "Iniciar jogo selecionado"
#: gui/launcher.cpp:148
msgid "~L~oad..."
-msgstr "~C~arregar"
+msgstr "~C~arregar..."
#: gui/launcher.cpp:148
msgid "Load saved game for selected game"
@@ -762,7 +766,7 @@ msgstr ""
#: gui/massadd.cpp:266
#, c-format
msgid "Scanned %d directories ..."
-msgstr "%d pasta(s) pesquisada(s)"
+msgstr "%d pasta(s) pesquisada(s) ..."
#: gui/massadd.cpp:269
#, c-format
@@ -862,7 +866,7 @@ msgstr "Modo gráfico:"
#: gui/options.cpp:823
msgid "Render mode:"
-msgstr "Renderização"
+msgstr "Renderização:"
#: gui/options.cpp:823 gui/options.cpp:824
msgid "Special dithering modes supported by some games"
@@ -1107,12 +1111,12 @@ msgstr ""
#: gui/options.cpp:1288
msgid "Theme Path:"
-msgstr "Pasta do Tema"
+msgstr "Pasta do Tema:"
#: gui/options.cpp:1290
msgctxt "lowres"
msgid "Theme Path:"
-msgstr "Pasta do Tema"
+msgstr "Pasta do Tema:"
#: gui/options.cpp:1296 gui/options.cpp:1298 gui/options.cpp:1299
msgid "Specifies path to additional data used by all games or ScummVM"
@@ -1350,7 +1354,7 @@ msgstr "Servidor:"
msgid "Stop local webserver"
msgstr ""
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1462,15 +1466,15 @@ msgstr "Você realmente quer excluir este jogo salvo?"
#: gui/saveload-dialog.cpp:554 gui/saveload-dialog.cpp:1060
msgid "Date: "
-msgstr "Data:"
+msgstr "Data: "
#: gui/saveload-dialog.cpp:558 gui/saveload-dialog.cpp:1066
msgid "Time: "
-msgstr "Hora:"
+msgstr "Hora: "
#: gui/saveload-dialog.cpp:564 gui/saveload-dialog.cpp:1074
msgid "Playtime: "
-msgstr "Tempo de jogo:"
+msgstr "Tempo de jogo: "
#: gui/saveload-dialog.cpp:577 gui/saveload-dialog.cpp:665
#, fuzzy
@@ -1826,7 +1830,7 @@ msgstr "~V~oltar ao menu"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1847,7 +1851,7 @@ msgstr "Salvar jogo:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1895,11 +1899,11 @@ msgstr "Não foi possível inicializar o formato de cor."
#: engines/engine.cpp:354
msgid "Could not switch to video mode: '"
-msgstr "Não foi possível alternar o modo de vídeo atual:"
+msgstr "Não foi possível alternar o modo de vídeo atual: '"
#: engines/engine.cpp:363
msgid "Could not apply aspect ratio setting."
-msgstr "Não foi possível aplicar a correção de proporção"
+msgstr "Não foi possível aplicar a correção de proporção."
#: engines/engine.cpp:368
msgid "Could not apply fullscreen setting."
@@ -2045,11 +2049,11 @@ msgstr "Emulador FM Towns"
msgid "PC-98 Audio"
msgstr "Áudio"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Inicializando Emulador MT-32"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "Emulador MT-32"
@@ -2250,7 +2254,7 @@ msgstr "Normal (sem escala)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2417
msgid "Active graphics filter:"
-msgstr "Ativa os filtros gráficos"
+msgstr "Ativa os filtros gráficos:"
#: backends/keymapper/remap-dialog.cpp:48
msgid "Keymap:"
@@ -2263,7 +2267,7 @@ msgstr "(Ativo)"
#: backends/keymapper/remap-dialog.cpp:107
msgid " (Active)"
-msgstr "(Ativo)"
+msgstr " (Ativo)"
#: backends/keymapper/remap-dialog.cpp:107
msgid " (Blocked)"
@@ -2271,11 +2275,11 @@ msgstr ""
#: backends/keymapper/remap-dialog.cpp:120
msgid " (Global)"
-msgstr "(Global)"
+msgstr " (Global)"
#: backends/keymapper/remap-dialog.cpp:128
msgid " (Game)"
-msgstr "(Jogo)"
+msgstr " (Jogo)"
#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
@@ -2729,11 +2733,11 @@ msgstr "Rotacionar"
#: backends/platform/wince/CELauncherDialog.cpp:56
msgid "Using SDL driver "
-msgstr "Usando driver SDL"
+msgstr "Usando driver SDL "
#: backends/platform/wince/CELauncherDialog.cpp:60
msgid "Display "
-msgstr "Tela"
+msgstr "Tela "
#: backends/platform/wince/CELauncherDialog.cpp:83
msgid "Do you want to perform an automatic scan ?"
@@ -2777,6 +2781,33 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Procurar por Atualizações..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr ""
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr ""
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr ""
@@ -2852,8 +2883,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2865,8 +2896,8 @@ msgstr "Restaurar jogo:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3656,7 +3687,7 @@ msgstr "Espaço"
#: engines/scumm/help.cpp:79
msgid "Pause game"
-msgstr "Pausar jogo:"
+msgstr "Pausar jogo"
#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:85
#: engines/scumm/help.cpp:96 engines/scumm/help.cpp:97
@@ -3752,11 +3783,11 @@ msgstr "* A utilização de ctrl-f ou"
#: engines/scumm/help.cpp:109
msgid " ctrl-g are not recommended"
-msgstr " ctrl-g não é recomendada"
+msgstr " ctrl-g não é recomendada"
#: engines/scumm/help.cpp:110
msgid " since they may cause crashes"
-msgstr " visto que poderá causar travas"
+msgstr " visto que poderá causar travas"
#: engines/scumm/help.cpp:111
msgid " or incorrect game behavior."
@@ -4127,7 +4158,7 @@ msgstr "9, 6 e 3, respectivamente."
#: engines/scumm/help.cpp:328
msgid "Biplane controls (numpad):"
-msgstr "Controles do avião (teclado numérico)"
+msgstr "Controles do avião (teclado numérico):"
#: engines/scumm/help.cpp:329
msgid "Fly to upper left"
@@ -4261,21 +4292,9 @@ msgstr ""
msgid "Show windows with a partially transparent background"
msgstr ""
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"Não é possível localizar o arquivo \"sky.cpt\"\n"
-"Por favor, faça o download em 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"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
msgstr ""
-"O arquivo \"sky.cpt\" possui um tamanho incorreto.\n"
-"Por favor, refaça o download em www.scummvm.org"
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4374,17 +4393,17 @@ msgid ""
"Use English speech instead of German for every language other than German"
msgstr ""
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+
#: engines/toon/toon.cpp:222
#, fuzzy, c-format
msgid "Saved game in slot #%d "
@@ -4409,21 +4428,6 @@ msgstr ""
msgid "Could not quick load the saved game #%d"
msgstr "Você deseja carregar ou salvar o jogo?"
-#: engines/toon/toon.cpp:4917
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr ""
-
-#: engines/toon/toon.cpp:4929
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr ""
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr ""
@@ -4432,6 +4436,14 @@ msgstr ""
msgid "Show the current number of frames per second in the upper left corner"
msgstr ""
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
@@ -4464,11 +4476,11 @@ msgstr ""
#: engines/zvision/detection_tables.h:91
msgid "Use high resolution MPEG video"
-msgstr ""
+msgstr "Usar vídeos MPEG de alta resolução"
#: engines/zvision/detection_tables.h:92
msgid "Use MPEG video from the DVD version instead of lower resolution AVI"
-msgstr ""
+msgstr "Usar vídeo MPEG da versão em DVD em vez do AVi de resolução mais baixa"
#: engines/zvision/file/save_manager.cpp:220
#, c-format
@@ -4477,6 +4489,20 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Não é possível localizar o arquivo \"sky.cpt\"\n"
+#~ "Por favor, faça o download em www.scummvm.org"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "O arquivo \"sky.cpt\" possui um tamanho incorreto.\n"
+#~ "Por favor, refaça o download em www.scummvm.org"
+
#~ msgid "The game in '%s' seems to be unknown."
#~ msgstr "O jogo em '% s' parece ser desconhecido."
diff --git a/po/pt_PT.po b/po/pt_PT.po
new file mode 100644
index 0000000000..5287fb3503
--- /dev/null
+++ b/po/pt_PT.po
@@ -0,0 +1,4288 @@
+# Portuguese (Portugal) translation for ScummVM.
+# Copyright (C) 2016-2017 ScummVM Team
+# This file is distributed under the same license as the ScummVM package.
+# Fernando Sarmento <nando_sarmento@hotmail.com>, 2016
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ScummVM 1.10.0git\n"
+"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2016-12-14 00:22+0000\n"
+"Last-Translator: Fernando Sarmento <nando_sarmento@hotmail.com>\n"
+"Language-Team: Portuguese (Portugal) <https://translations.scummvm.org/"
+"projects/scummvm/scummvm/pt_PT/>\n"
+"Language: pt_PT\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n > 1;\n"
+"X-Generator: Weblate 2.9\n"
+"X-Language-name: Portuguese (Portugal)\n"
+
+#: gui/about.cpp:94
+#, c-format
+msgid "(built on %s)"
+msgstr "(desenvolvido em %s)"
+
+#: gui/about.cpp:101
+msgid "Features compiled in:"
+msgstr "Recursos compilados em:"
+
+#: gui/about.cpp:110
+msgid "Available engines:"
+msgstr "Motores de jogo disponíveis:"
+
+#: gui/browser.cpp:68 gui/browser_osx.mm:104
+msgid "Show hidden files"
+msgstr "Mostrar ficheiros ocultos"
+
+#: gui/browser.cpp:68
+msgid "Show files marked with the hidden attribute"
+msgstr "Mostrar ficheiros marcados como ocultos"
+
+#: gui/browser.cpp:72 gui/remotebrowser.cpp:56
+msgid "Go up"
+msgstr "Acima"
+
+#: gui/browser.cpp:72 gui/browser.cpp:74 gui/remotebrowser.cpp:56
+#: gui/remotebrowser.cpp:58
+msgid "Go to previous directory level"
+msgstr "Ir para a directoria anterior"
+
+#: gui/browser.cpp:74 gui/remotebrowser.cpp:58
+msgctxt "lowres"
+msgid "Go up"
+msgstr "Acima"
+
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editgamedialog.cpp:292
+#: gui/editrecorddialog.cpp:67 gui/filebrowser-dialog.cpp:64
+#: gui/fluidsynth-dialog.cpp:152 gui/KeysDialog.cpp:43 gui/massadd.cpp:95
+#: gui/options.cpp:1461 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:69
+#: gui/recorderdialog.cpp:155 gui/remotebrowser.cpp:59
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:443
+#: gui/saveload-dialog.cpp:717 gui/saveload-dialog.cpp:1111
+#: gui/storagewizarddialog.cpp:68 gui/themebrowser.cpp:55
+#: gui/updates-dialog.cpp:113 engines/engine.cpp:558
+#: backends/events/default/default-events.cpp:196
+#: backends/events/default/default-events.cpp:218
+#: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49
+#: engines/parallaction/saveload.cpp:271 engines/scumm/dialogs.cpp:187
+#: engines/sword1/control.cpp:865
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: gui/browser.cpp:76 gui/browser_osx.mm:103 gui/chooser.cpp:47
+#: gui/filebrowser-dialog.cpp:65 gui/remotebrowser.cpp:60
+#: gui/themebrowser.cpp:56
+msgid "Choose"
+msgstr "Escolher"
+
+#: gui/downloaddialog.cpp:48
+msgid "Select directory where to download game data"
+msgstr "Seleccione a directoria de descarga dos arquivos do jogo"
+
+#: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:470 gui/launcher.cpp:197
+msgid "Select directory with game data"
+msgstr "Seleccione a directoria com os arquivos do jogo"
+
+#: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263
+msgid "From: "
+msgstr "De: "
+
+#: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264
+msgid "To: "
+msgstr "Para: "
+
+#: gui/downloaddialog.cpp:63
+msgid "Cancel download"
+msgstr "Cancelar descarga"
+
+#: gui/downloaddialog.cpp:65
+msgctxt "lowres"
+msgid "Cancel download"
+msgstr "Cancelar descarga"
+
+#: gui/downloaddialog.cpp:67
+msgid "Hide"
+msgstr "Esconder"
+
+#: gui/downloaddialog.cpp:117
+msgid ""
+"It looks like your connection is limited. Do you really want to download "
+"files with it?"
+msgstr ""
+"Parece que a sua conexão é limitada. Deseja mesmo assim fazer a descarga dos "
+"ficheiros?"
+
+#: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:152
+#: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217
+#: gui/launcher.cpp:307 gui/launcher.cpp:415 gui/launcher.cpp:474
+#: gui/storagewizarddialog.cpp:112
+#: backends/events/symbiansdl/symbiansdl-events.cpp:186
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
+#: engines/sci/graphics/controls32.cpp:827
+msgid "Yes"
+msgstr "Sim"
+
+#: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:153
+#: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217
+#: gui/launcher.cpp:307 gui/launcher.cpp:415 gui/launcher.cpp:474
+#: gui/storagewizarddialog.cpp:112
+#: backends/events/symbiansdl/symbiansdl-events.cpp:186
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
+#: engines/sci/graphics/controls32.cpp:827
+msgid "No"
+msgstr "Não"
+
+#: gui/downloaddialog.cpp:136 gui/launcher.cpp:565
+msgid "ScummVM couldn't open the specified directory!"
+msgstr "ScummVM não conseguiu abrir a directoria especificada!"
+
+#: gui/downloaddialog.cpp:146
+msgid ""
+"Cannot create a directory to download - the specified directory has a file "
+"with the same name."
+msgstr ""
+"Não é possível criar uma directoria para a descarga - a directoria "
+"especificada possui um arquivo com o mesmo nome."
+
+#: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293
+#: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:522
+#: gui/launcher.cpp:526 gui/massadd.cpp:92 gui/options.cpp:1463
+#: gui/saveload-dialog.cpp:1112 engines/engine.cpp:477 engines/engine.cpp:488
+#: backends/platform/wii/options.cpp:47
+#: backends/platform/wince/CELauncherDialog.cpp:54
+#: engines/agos/animation.cpp:559 engines/drascula/saveload.cpp:49
+#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
+#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
+#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
+msgid "OK"
+msgstr "OK"
+
+#: gui/downloaddialog.cpp:151
+#, c-format
+msgid ""
+"The \"%s\" already exists in the specified directory.\n"
+"Do you really want to download files into that directory?"
+msgstr ""
+"O \"%s\" já existe na directoria especificada.\n"
+"Deseja mesmo descarregar ficheiros nessa directoria?"
+
+#: gui/downloaddialog.cpp:251
+#, c-format
+msgid "Downloaded %s %s / %s %s"
+msgstr "Descarregado %s %s / %s %s"
+
+#: gui/downloaddialog.cpp:258
+#, c-format
+msgid "Download speed: %s %s"
+msgstr "Velocidade de descarga: %s %s"
+
+#: gui/editgamedialog.cpp:132
+msgid "Game"
+msgstr "Jogo"
+
+#: gui/editgamedialog.cpp:136
+msgid "ID:"
+msgstr "Código:"
+
+#: gui/editgamedialog.cpp:136 gui/editgamedialog.cpp:138
+#: gui/editgamedialog.cpp:139
+msgid ""
+"Short game identifier used for referring to saved games and running the game "
+"from the command line"
+msgstr ""
+"Código usado para identificar os jogos salvos e para executar o jogo a "
+"partir da linha de comandos"
+
+#: gui/editgamedialog.cpp:138
+msgctxt "lowres"
+msgid "ID:"
+msgstr "Código:"
+
+#: gui/editgamedialog.cpp:143 gui/editrecorddialog.cpp:59
+msgid "Name:"
+msgstr "Nome:"
+
+#: gui/editgamedialog.cpp:143 gui/editgamedialog.cpp:145
+#: gui/editgamedialog.cpp:146
+msgid "Full title of the game"
+msgstr "Título completo do jogo"
+
+#: gui/editgamedialog.cpp:145
+msgctxt "lowres"
+msgid "Name:"
+msgstr "Nome:"
+
+#: gui/editgamedialog.cpp:149
+msgid "Language:"
+msgstr "Idioma:"
+
+#: gui/editgamedialog.cpp:149 gui/editgamedialog.cpp:150
+msgid ""
+"Language of the game. This will not turn your Spanish game version into "
+"English"
+msgstr ""
+"Idioma do jogo. Esta opção não muda a sua versão do jogo de Português para "
+"Inglês"
+
+#: gui/editgamedialog.cpp:151 gui/editgamedialog.cpp:165 gui/options.cpp:121
+#: gui/options.cpp:812 gui/options.cpp:825 gui/options.cpp:1356
+#: audio/null.cpp:41
+msgid "<default>"
+msgstr "<padrão>"
+
+#: gui/editgamedialog.cpp:161
+msgid "Platform:"
+msgstr "Plataforma:"
+
+#: gui/editgamedialog.cpp:161 gui/editgamedialog.cpp:163
+#: gui/editgamedialog.cpp:164
+msgid "Platform the game was originally designed for"
+msgstr "Plataforma para a qual o jogo foi originalmente desenvolvido"
+
+#: gui/editgamedialog.cpp:163
+msgctxt "lowres"
+msgid "Platform:"
+msgstr "Plataforma:"
+
+#: gui/editgamedialog.cpp:176
+msgid "Engine"
+msgstr "Recursos"
+
+#: gui/editgamedialog.cpp:184 gui/options.cpp:1147 gui/options.cpp:1232
+msgid "Graphics"
+msgstr "Gráficos"
+
+#: gui/editgamedialog.cpp:184 gui/options.cpp:1147 gui/options.cpp:1232
+msgid "GFX"
+msgstr "GFX"
+
+#: gui/editgamedialog.cpp:187
+msgid "Override global graphic settings"
+msgstr "Substituir configurações gerais de gráficos"
+
+#: gui/editgamedialog.cpp:189
+msgctxt "lowres"
+msgid "Override global graphic settings"
+msgstr "Substituir configurações gerais de gráficos"
+
+#: gui/editgamedialog.cpp:196 gui/options.cpp:1238
+msgid "Audio"
+msgstr "Áudio"
+
+#: gui/editgamedialog.cpp:199
+msgid "Override global audio settings"
+msgstr "Substituir configurações gerais de áudio"
+
+#: gui/editgamedialog.cpp:201
+msgctxt "lowres"
+msgid "Override global audio settings"
+msgstr "Substituir configurações gerais de áudio"
+
+#: gui/editgamedialog.cpp:210 gui/options.cpp:1243
+msgid "Volume"
+msgstr "Volume"
+
+#: gui/editgamedialog.cpp:212 gui/options.cpp:1245
+msgctxt "lowres"
+msgid "Volume"
+msgstr "Volume"
+
+#: gui/editgamedialog.cpp:215
+msgid "Override global volume settings"
+msgstr "Substituir configurações gerais de volume"
+
+#: gui/editgamedialog.cpp:217
+msgctxt "lowres"
+msgid "Override global volume settings"
+msgstr "Substituir configurações gerais de volume"
+
+#: gui/editgamedialog.cpp:226 gui/options.cpp:1253
+msgid "MIDI"
+msgstr "MIDI"
+
+#: gui/editgamedialog.cpp:229
+msgid "Override global MIDI settings"
+msgstr "Substituir configurações gerais de MIDI"
+
+#: gui/editgamedialog.cpp:231
+msgctxt "lowres"
+msgid "Override global MIDI settings"
+msgstr "Substituir configurações gerais de MIDI"
+
+#: gui/editgamedialog.cpp:241 gui/options.cpp:1263
+msgid "MT-32"
+msgstr "MT-32"
+
+#: gui/editgamedialog.cpp:244
+msgid "Override global MT-32 settings"
+msgstr "Substituir configurações gerais de MT-32"
+
+#: gui/editgamedialog.cpp:246
+msgctxt "lowres"
+msgid "Override global MT-32 settings"
+msgstr "Substituir configurações gerais de MT-32"
+
+#: gui/editgamedialog.cpp:255 gui/options.cpp:1270
+msgid "Paths"
+msgstr "Caminhos"
+
+#: gui/editgamedialog.cpp:257 gui/options.cpp:1272
+msgctxt "lowres"
+msgid "Paths"
+msgstr "Caminhos"
+
+#: gui/editgamedialog.cpp:264
+msgid "Game Path:"
+msgstr "Caminho do Jogo:"
+
+#: gui/editgamedialog.cpp:266
+msgctxt "lowres"
+msgid "Game Path:"
+msgstr "Caminho do Jogo:"
+
+#: gui/editgamedialog.cpp:271 gui/options.cpp:1296
+msgid "Extra Path:"
+msgstr "Caminho de Extras:"
+
+#: gui/editgamedialog.cpp:271 gui/editgamedialog.cpp:273
+#: gui/editgamedialog.cpp:274
+msgid "Specifies path to additional data used by the game"
+msgstr "Especifica o caminho para dados adicionais usados pelo jogo"
+
+#: gui/editgamedialog.cpp:273 gui/options.cpp:1298
+msgctxt "lowres"
+msgid "Extra Path:"
+msgstr "Caminho de Extras:"
+
+#: gui/editgamedialog.cpp:280 gui/options.cpp:1280
+msgid "Save Path:"
+msgstr "Caminho para Salvar:"
+
+#: gui/editgamedialog.cpp:280 gui/editgamedialog.cpp:282
+#: gui/editgamedialog.cpp:283 gui/options.cpp:1280 gui/options.cpp:1282
+#: gui/options.cpp:1283
+msgid "Specifies where your saved games are put"
+msgstr "Especifica onde os jogos salvos são colocados"
+
+#: gui/editgamedialog.cpp:282 gui/options.cpp:1282
+msgctxt "lowres"
+msgid "Save Path:"
+msgstr "Caminho para Salvar:"
+
+#: gui/editgamedialog.cpp:301 gui/editgamedialog.cpp:398
+#: gui/editgamedialog.cpp:457 gui/editgamedialog.cpp:518 gui/options.cpp:1291
+#: gui/options.cpp:1299 gui/options.cpp:1308 gui/options.cpp:1488
+#: gui/options.cpp:1494 gui/options.cpp:1502 gui/options.cpp:1525
+#: gui/options.cpp:1554 gui/options.cpp:1560 gui/options.cpp:1567
+#: gui/options.cpp:1575 gui/options.cpp:1758 gui/options.cpp:1761
+#: gui/options.cpp:1768 gui/options.cpp:1778
+msgctxt "path"
+msgid "None"
+msgstr "Nenhum"
+
+#: gui/editgamedialog.cpp:306 gui/editgamedialog.cpp:404
+#: gui/editgamedialog.cpp:522 gui/options.cpp:1482 gui/options.cpp:1548
+#: gui/options.cpp:1764 backends/platform/wii/options.cpp:56
+msgid "Default"
+msgstr "Padrão"
+
+#: gui/editgamedialog.cpp:450 gui/options.cpp:1772
+msgid "Select SoundFont"
+msgstr "Seleccione o SoundFont"
+
+#: gui/editgamedialog.cpp:489
+msgid "Select additional game directory"
+msgstr "Seleccione uma directoria adicional para o jogo"
+
+#: gui/editgamedialog.cpp:502 gui/options.cpp:1695
+msgid "Select directory for saved games"
+msgstr "Seleccione uma directoria para salvar o jogo"
+
+#: gui/editgamedialog.cpp:508
+msgid ""
+"Saved games sync feature doesn't work with non-default directories. If you "
+"want your saved games to sync, use default directory."
+msgstr ""
+"A funcionalidade de sincronização de jogos guardados não funciona com "
+"directorias que não sejam predefinidas. Se quiser que os seus jogos salvos "
+"sejam sincronizados, use a directoria padrão."
+
+#: gui/editgamedialog.cpp:534
+msgid "This game ID is already taken. Please choose another one."
+msgstr ""
+"O código deste jogo já se encontra em utilização. Por favor, escolha outro "
+"código."
+
+#: gui/editrecorddialog.cpp:58
+msgid "Author:"
+msgstr "Autor:"
+
+#: gui/editrecorddialog.cpp:60
+msgid "Notes:"
+msgstr "Notas:"
+
+#: gui/editrecorddialog.cpp:68 gui/predictivedialog.cpp:74
+msgid "Ok"
+msgstr "Ok"
+
+#: gui/filebrowser-dialog.cpp:49
+msgid "Choose file for loading"
+msgstr "Escolher ficheiro para carregar"
+
+#: gui/filebrowser-dialog.cpp:49
+msgid "Enter filename for saving"
+msgstr "Introduzir nome para salvar"
+
+#: gui/filebrowser-dialog.cpp:132
+msgid "Do you really want to overwrite the file?"
+msgstr "Deseja mesmo substituir o ficheiro?"
+
+#: gui/fluidsynth-dialog.cpp:68
+msgid "Reverb"
+msgstr "Reverberação"
+
+#: gui/fluidsynth-dialog.cpp:70 gui/fluidsynth-dialog.cpp:102
+msgid "Active"
+msgstr "Activo"
+
+#: gui/fluidsynth-dialog.cpp:72
+msgid "Room:"
+msgstr "Espaço:"
+
+#: gui/fluidsynth-dialog.cpp:79
+msgid "Damp:"
+msgstr "Supressão:"
+
+#: gui/fluidsynth-dialog.cpp:86
+msgid "Width:"
+msgstr "Amplitude:"
+
+#: gui/fluidsynth-dialog.cpp:93 gui/fluidsynth-dialog.cpp:111
+msgid "Level:"
+msgstr "Nível:"
+
+#: gui/fluidsynth-dialog.cpp:100
+msgid "Chorus"
+msgstr "Coro"
+
+#: gui/fluidsynth-dialog.cpp:104
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:118
+msgid "Speed:"
+msgstr "Velocidade:"
+
+#: gui/fluidsynth-dialog.cpp:125
+msgid "Depth:"
+msgstr "Intensidade:"
+
+#: gui/fluidsynth-dialog.cpp:132
+msgid "Type:"
+msgstr "Tipo:"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Sine"
+msgstr "Seno"
+
+#: gui/fluidsynth-dialog.cpp:136
+msgid "Triangle"
+msgstr "Triângulo"
+
+#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1316
+msgid "Misc"
+msgstr "Vários"
+
+#: gui/fluidsynth-dialog.cpp:140
+msgid "Interpolation:"
+msgstr "Interpolação:"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "None (fastest)"
+msgstr "Nenhum (acelerado)"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Linear"
+msgstr "Linear"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Fourth-order"
+msgstr "Quarta"
+
+#: gui/fluidsynth-dialog.cpp:146
+msgid "Seventh-order"
+msgstr "Sétima"
+
+#: gui/fluidsynth-dialog.cpp:150
+msgid "Reset"
+msgstr "Reiniciar"
+
+#: gui/fluidsynth-dialog.cpp:150
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "Restaurar todas as configurações FluidSynth para os valores de origem."
+
+#: gui/fluidsynth-dialog.cpp:217
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"Deseja mesmo restaurar todas as configurações FluidSynth para os valores de "
+"origem?"
+
+#: gui/gui-manager.cpp:119 backends/keymapper/remap-dialog.cpp:53
+#: engines/scumm/help.cpp:126 engines/scumm/help.cpp:141
+#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:192
+#: engines/scumm/help.cpp:210
+msgid "Close"
+msgstr "Fechar"
+
+#: gui/gui-manager.cpp:122
+msgid "Mouse click"
+msgstr "Clique do rato"
+
+#: gui/gui-manager.cpp:126 base/main.cpp:340
+msgid "Display keyboard"
+msgstr "Mostrar teclado"
+
+#: gui/gui-manager.cpp:130 base/main.cpp:344
+msgid "Remap keys"
+msgstr "Redefinir teclas"
+
+#: gui/gui-manager.cpp:133 base/main.cpp:347 engines/scumm/help.cpp:87
+msgid "Toggle fullscreen"
+msgstr "Mudar para ecrã inteiro"
+
+#: gui/KeysDialog.cpp:41
+msgid "Map"
+msgstr "Definir"
+
+#: gui/KeysDialog.cpp:49
+msgid "Select an action and click 'Map'"
+msgstr "Seleccione uma acção e clique 'Definir'"
+
+#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141
+#, c-format
+msgid "Associated key : %s"
+msgstr "Teclas associadas : %s"
+
+#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
+msgid "Associated key : none"
+msgstr "Teclas associadas : nenhuma"
+
+#: gui/KeysDialog.cpp:90
+msgid "Please select an action"
+msgstr "Por favor, seleccione uma acção"
+
+#: gui/KeysDialog.cpp:106
+msgid "Press the key to associate"
+msgstr "Pressione a tecla para associar"
+
+#: gui/KeysDialog.cpp:145 gui/KeysDialog.h:36
+msgid "Choose an action to map"
+msgstr "Escolha uma acção para definir"
+
+#: gui/launcher.cpp:141 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:98
+msgid "~Q~uit"
+msgstr "~S~air"
+
+#: gui/launcher.cpp:141 backends/platform/sdl/macosx/appmenu_osx.mm:106
+msgid "Quit ScummVM"
+msgstr "Sair do ScummVM"
+
+#: gui/launcher.cpp:142
+msgid "A~b~out..."
+msgstr "So~b~re..."
+
+#: gui/launcher.cpp:142 backends/platform/sdl/macosx/appmenu_osx.mm:80
+msgid "About ScummVM"
+msgstr "Sobre o ScumnmVM"
+
+#: gui/launcher.cpp:143
+msgid "~O~ptions..."
+msgstr "~O~pções..."
+
+#: gui/launcher.cpp:143
+msgid "Change global ScummVM options"
+msgstr "Alterar opções gerais do ScummVM"
+
+#: gui/launcher.cpp:145
+msgid "~S~tart"
+msgstr "~I~niciar"
+
+#: gui/launcher.cpp:145
+msgid "Start selected game"
+msgstr "Iniciar jogo seleccionado"
+
+#: gui/launcher.cpp:148
+msgid "~L~oad..."
+msgstr "~C~arregar..."
+
+#: gui/launcher.cpp:148
+msgid "Load saved game for selected game"
+msgstr "Carregar jogo salvo do jogo selecionado"
+
+#: gui/launcher.cpp:153
+msgid "~A~dd Game..."
+msgstr "~A~dicionar Jogo..."
+
+#: gui/launcher.cpp:153 gui/launcher.cpp:160
+msgid "Hold Shift for Mass Add"
+msgstr "Pressionar Shift para Adição em Massa"
+
+#: gui/launcher.cpp:155
+msgid "~E~dit Game..."
+msgstr "~E~ditar Jogo..."
+
+#: gui/launcher.cpp:155 gui/launcher.cpp:162
+msgid "Change game options"
+msgstr "Alterar opções do jogo"
+
+#: gui/launcher.cpp:157
+msgid "~R~emove Game"
+msgstr "~R~emover Jogo"
+
+#: gui/launcher.cpp:157 gui/launcher.cpp:164
+msgid "Remove game from the list. The game data files stay intact"
+msgstr ""
+"Remover jogo da lista. Os ficheiros de dados do jogo permanecem intactos"
+
+#: gui/launcher.cpp:160
+msgctxt "lowres"
+msgid "~A~dd Game..."
+msgstr "~A~dicionar Jogo..."
+
+#: gui/launcher.cpp:162
+msgctxt "lowres"
+msgid "~E~dit Game..."
+msgstr "~E~ditar Jogo..."
+
+#: gui/launcher.cpp:164
+msgctxt "lowres"
+msgid "~R~emove Game"
+msgstr "~R~emover Jogo"
+
+#: gui/launcher.cpp:172
+msgid "Search in game list"
+msgstr "Pesquisar na lista de jogos"
+
+#: gui/launcher.cpp:176 gui/launcher.cpp:771
+msgid "Search:"
+msgstr "Pesquisar:"
+
+#: gui/launcher.cpp:200 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
+#: engines/mohawk/dialogs.cpp:103 engines/mohawk/riven.cpp:734
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:601
+#: engines/wage/saveload.cpp:748
+msgid "Load game:"
+msgstr "Carregar jogo:"
+
+#: gui/launcher.cpp:200 engines/dialogs.cpp:115
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:103
+#: engines/mohawk/riven.cpp:734 engines/parallaction/saveload.cpp:194
+#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:185
+#: engines/tsage/scenes.cpp:601 engines/wage/saveload.cpp:748
+msgid "Load"
+msgstr "Carregar"
+
+#: gui/launcher.cpp:306
+msgid ""
+"Do you really want to run the mass game detector? This could potentially add "
+"a huge number of games."
+msgstr ""
+"Deseja mesmo executar o detector de adição em massa? Tal poderá, "
+"potencialmente, adicionar um elevado número de jogos."
+
+#: gui/launcher.cpp:365
+msgid "This directory cannot be used yet, it is being downloaded into!"
+msgstr ""
+"De momento, esta directoria não pode ser utilizada, existe uma descarga em "
+"curso!"
+
+#: gui/launcher.cpp:415
+msgid "Do you really want to remove this game configuration?"
+msgstr "Deseja mesmo remover a configuração deste jogo?"
+
+#: gui/launcher.cpp:473
+msgid "Do you want to load saved game?"
+msgstr "Deseja carregar o jogo salvo?"
+
+#: gui/launcher.cpp:522
+msgid "This game does not support loading games from the launcher."
+msgstr "Este jogo não permite carregar jogos a partir do menu principal."
+
+#: gui/launcher.cpp:526
+msgid "ScummVM could not find any engine capable of running the selected game!"
+msgstr ""
+"O ScummVM não conseguiu encontrar nenhum motor de jogo capaz de correr o "
+"jogo seleccionado!"
+
+#: gui/launcher.cpp:577
+msgid "ScummVM could not find any game in the specified directory!"
+msgstr ""
+"O ScummVM não conseguiu encontrar nenhum jogo na directoria especificada!"
+
+#: gui/launcher.cpp:590
+msgid "Pick the game:"
+msgstr "Escolha o jogo:"
+
+#: gui/launcher.cpp:708
+msgid "Mass Add..."
+msgstr "Adição em Massa..."
+
+#: gui/launcher.cpp:710
+msgid "Record..."
+msgstr "Gravar..."
+
+#: gui/massadd.cpp:79 gui/massadd.cpp:82
+msgid "... progress ..."
+msgstr "... progressão ..."
+
+#: gui/massadd.cpp:259
+msgid "Scan complete!"
+msgstr "Busca completa!"
+
+#: gui/massadd.cpp:262
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games."
+msgstr ""
+"Encontrado(s) %d novo(s) jogo(s), ignorado(s) %d jogo(s) adicionado(s) "
+"anteriormente."
+
+#: gui/massadd.cpp:266
+#, c-format
+msgid "Scanned %d directories ..."
+msgstr "Pesquisada(s) %d directoria(s) ..."
+
+#: gui/massadd.cpp:269
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games ..."
+msgstr ""
+"Encontrado(s) %d novo(s) jogo(s), ignorado(s) %d jogo(s) adicionado(s) "
+"anteriormente ..."
+
+#: gui/onscreendialog.cpp:101 gui/onscreendialog.cpp:103
+msgid "Stop"
+msgstr "Parar"
+
+#: gui/onscreendialog.cpp:106
+msgid "Edit record description"
+msgstr "Editar descrição da gravação"
+
+#: gui/onscreendialog.cpp:108
+msgid "Switch to Game"
+msgstr "Mudar para o Jogo"
+
+#: gui/onscreendialog.cpp:110
+msgid "Fast replay"
+msgstr "Repetição rápida"
+
+#: gui/options.cpp:119 common/updates.cpp:56
+msgid "Never"
+msgstr "Nunca"
+
+#: gui/options.cpp:119
+msgid "every 5 mins"
+msgstr "a cada 5 mins"
+
+#: gui/options.cpp:119
+msgid "every 10 mins"
+msgstr "a cada 10 mins"
+
+#: gui/options.cpp:119
+msgid "every 15 mins"
+msgstr "a cada 15 mins"
+
+#: gui/options.cpp:119
+msgid "every 30 mins"
+msgstr "a cada 30 mins"
+
+#: gui/options.cpp:121
+msgid "8 kHz"
+msgstr "8 kHz"
+
+#: gui/options.cpp:121
+msgid "11 kHz"
+msgstr "11 kHz"
+
+#: gui/options.cpp:121
+msgid "22 kHz"
+msgstr "22 kHz"
+
+#: gui/options.cpp:121
+msgid "44 kHz"
+msgstr "44 kHz"
+
+#: gui/options.cpp:121
+msgid "48 kHz"
+msgstr "48 kHz"
+
+#: gui/options.cpp:289 gui/options.cpp:552 gui/options.cpp:657
+#: gui/options.cpp:726 gui/options.cpp:937
+msgctxt "soundfont"
+msgid "None"
+msgstr "Nenhuma"
+
+#: gui/options.cpp:456
+msgid "Failed to apply some of the graphic options changes:"
+msgstr "Falha ao aplicar algumas mudanças nas opções de gráficos:"
+
+#: gui/options.cpp:468
+msgid "the video mode could not be changed."
+msgstr "o modo de vídeo não pôde ser alterado."
+
+#: gui/options.cpp:474
+msgid "the aspect ratio setting could not be changed"
+msgstr "a taxa de proporção não pôde ser alterada"
+
+#: gui/options.cpp:480
+msgid "the fullscreen setting could not be changed"
+msgstr "a configuração de ecrã inteiro não pôde ser alterada"
+
+#: gui/options.cpp:486
+msgid "the filtering setting could not be changed"
+msgstr "a configuração de filtragem não pôde ser alterada"
+
+#: gui/options.cpp:809
+msgid "Graphics mode:"
+msgstr "Modelo de gráficos:"
+
+#: gui/options.cpp:823
+msgid "Render mode:"
+msgstr "Renderização:"
+
+#: gui/options.cpp:823 gui/options.cpp:824
+msgid "Special dithering modes supported by some games"
+msgstr "Modos especiais de pontilhado suportados por alguns jogos"
+
+#: gui/options.cpp:835 backends/graphics/openglsdl/openglsdl-graphics.cpp:615
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2460
+msgid "Fullscreen mode"
+msgstr "Modo de ecrã inteiro"
+
+#: gui/options.cpp:838
+msgid "Filter graphics"
+msgstr "Filtros gráficos"
+
+#: gui/options.cpp:838
+msgid "Use linear filtering when scaling graphics"
+msgstr "Usar filtragem linear quando dimensionar gráficos"
+
+#: gui/options.cpp:841
+msgid "Aspect ratio correction"
+msgstr "Correção da taxa de proporção"
+
+#: gui/options.cpp:841
+msgid "Correct aspect ratio for 320x200 games"
+msgstr "Corrigir taxa de proporção em jogos de 320x200"
+
+#: gui/options.cpp:849
+msgid "Preferred Device:"
+msgstr ""
+
+#: gui/options.cpp:849
+msgid "Music Device:"
+msgstr ""
+
+#: gui/options.cpp:849 gui/options.cpp:851
+msgid "Specifies preferred sound device or sound card emulator"
+msgstr ""
+
+#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+msgid "Specifies output sound device or sound card emulator"
+msgstr ""
+
+#: gui/options.cpp:851
+msgctxt "lowres"
+msgid "Preferred Dev.:"
+msgstr ""
+
+#: gui/options.cpp:851
+msgctxt "lowres"
+msgid "Music Device:"
+msgstr ""
+
+#: gui/options.cpp:878
+msgid "AdLib emulator:"
+msgstr ""
+
+#: gui/options.cpp:878 gui/options.cpp:879
+msgid "AdLib is used for music in many games"
+msgstr ""
+
+#: gui/options.cpp:889
+msgid "Output rate:"
+msgstr ""
+
+#: gui/options.cpp:889 gui/options.cpp:890
+msgid ""
+"Higher value specifies better sound quality but may be not supported by your "
+"soundcard"
+msgstr ""
+
+#: gui/options.cpp:900
+msgid "GM Device:"
+msgstr ""
+
+#: gui/options.cpp:900
+msgid "Specifies default sound device for General MIDI output"
+msgstr ""
+
+#: gui/options.cpp:911
+msgid "Don't use General MIDI music"
+msgstr ""
+
+#: gui/options.cpp:922 gui/options.cpp:984
+msgid "Use first available device"
+msgstr ""
+
+#: gui/options.cpp:934
+msgid "SoundFont:"
+msgstr ""
+
+#: gui/options.cpp:934 gui/options.cpp:936 gui/options.cpp:937
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
+msgstr ""
+
+#: gui/options.cpp:936
+msgctxt "lowres"
+msgid "SoundFont:"
+msgstr ""
+
+#: gui/options.cpp:942
+msgid "Mixed AdLib/MIDI mode"
+msgstr ""
+
+#: gui/options.cpp:942
+msgid "Use both MIDI and AdLib sound generation"
+msgstr ""
+
+#: gui/options.cpp:945
+msgid "MIDI gain:"
+msgstr ""
+
+#: gui/options.cpp:955
+msgid "MT-32 Device:"
+msgstr ""
+
+#: gui/options.cpp:955
+msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
+msgstr ""
+
+#: gui/options.cpp:960
+msgid "True Roland MT-32 (disable GM emulation)"
+msgstr ""
+
+#: gui/options.cpp:960 gui/options.cpp:962
+msgid ""
+"Check if you want to use your real hardware Roland-compatible sound device "
+"connected to your computer"
+msgstr ""
+
+#: gui/options.cpp:962
+msgctxt "lowres"
+msgid "True Roland MT-32 (no GM emulation)"
+msgstr ""
+
+#: gui/options.cpp:965
+msgid "Roland GS Device (enable MT-32 mappings)"
+msgstr ""
+
+#: gui/options.cpp:965
+msgid ""
+"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
+"GS device"
+msgstr ""
+
+#: gui/options.cpp:974
+msgid "Don't use Roland MT-32 music"
+msgstr ""
+
+#: gui/options.cpp:1001
+msgid "Text and Speech:"
+msgstr ""
+
+#: gui/options.cpp:1005 gui/options.cpp:1015
+msgid "Speech"
+msgstr ""
+
+#: gui/options.cpp:1006 gui/options.cpp:1016
+msgid "Subtitles"
+msgstr ""
+
+#: gui/options.cpp:1007
+msgid "Both"
+msgstr ""
+
+#: gui/options.cpp:1009
+msgid "Subtitle speed:"
+msgstr ""
+
+#: gui/options.cpp:1011
+msgctxt "lowres"
+msgid "Text and Speech:"
+msgstr ""
+
+#: gui/options.cpp:1015
+msgid "Spch"
+msgstr ""
+
+#: gui/options.cpp:1016
+msgid "Subs"
+msgstr ""
+
+#: gui/options.cpp:1017
+msgctxt "lowres"
+msgid "Both"
+msgstr ""
+
+#: gui/options.cpp:1017
+msgid "Show subtitles and play speech"
+msgstr ""
+
+#: gui/options.cpp:1019
+msgctxt "lowres"
+msgid "Subtitle speed:"
+msgstr ""
+
+#: gui/options.cpp:1035
+msgid "Music volume:"
+msgstr ""
+
+#: gui/options.cpp:1037
+msgctxt "lowres"
+msgid "Music volume:"
+msgstr ""
+
+#: gui/options.cpp:1044
+msgid "Mute All"
+msgstr ""
+
+#: gui/options.cpp:1047
+msgid "SFX volume:"
+msgstr ""
+
+#: gui/options.cpp:1047 gui/options.cpp:1049 gui/options.cpp:1050
+msgid "Special sound effects volume"
+msgstr ""
+
+#: gui/options.cpp:1049
+msgctxt "lowres"
+msgid "SFX volume:"
+msgstr ""
+
+#: gui/options.cpp:1057
+msgid "Speech volume:"
+msgstr ""
+
+#: gui/options.cpp:1059
+msgctxt "lowres"
+msgid "Speech volume:"
+msgstr ""
+
+#: gui/options.cpp:1257
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:1288
+msgid "Theme Path:"
+msgstr ""
+
+#: gui/options.cpp:1290
+msgctxt "lowres"
+msgid "Theme Path:"
+msgstr ""
+
+#: gui/options.cpp:1296 gui/options.cpp:1298 gui/options.cpp:1299
+msgid "Specifies path to additional data used by all games or ScummVM"
+msgstr ""
+
+#: gui/options.cpp:1305
+msgid "Plugins Path:"
+msgstr ""
+
+#: gui/options.cpp:1307
+msgctxt "lowres"
+msgid "Plugins Path:"
+msgstr ""
+
+#: gui/options.cpp:1318
+msgctxt "lowres"
+msgid "Misc"
+msgstr ""
+
+#: gui/options.cpp:1320
+msgid "Theme:"
+msgstr ""
+
+#: gui/options.cpp:1324
+msgid "GUI Renderer:"
+msgstr ""
+
+#: gui/options.cpp:1336
+msgid "Autosave:"
+msgstr ""
+
+#: gui/options.cpp:1338
+msgctxt "lowres"
+msgid "Autosave:"
+msgstr ""
+
+#: gui/options.cpp:1346
+msgid "Keys"
+msgstr ""
+
+#: gui/options.cpp:1353
+msgid "GUI Language:"
+msgstr ""
+
+#: gui/options.cpp:1353
+msgid "Language of ScummVM GUI"
+msgstr ""
+
+#: gui/options.cpp:1381
+msgid "Update check:"
+msgstr ""
+
+#: gui/options.cpp:1381
+msgid "How often to check ScummVM updates"
+msgstr ""
+
+#: gui/options.cpp:1393
+msgid "Check now"
+msgstr ""
+
+#: gui/options.cpp:1401
+msgid "Cloud"
+msgstr ""
+
+#: gui/options.cpp:1403
+msgctxt "lowres"
+msgid "Cloud"
+msgstr ""
+
+#: gui/options.cpp:1408
+msgid "Storage:"
+msgstr ""
+
+#: gui/options.cpp:1408
+msgid "Active cloud storage"
+msgstr ""
+
+#: gui/options.cpp:1415 gui/options.cpp:1972
+msgid "<none>"
+msgstr ""
+
+#: gui/options.cpp:1419 backends/platform/wii/options.cpp:114
+msgid "Username:"
+msgstr ""
+
+#: gui/options.cpp:1419
+msgid "Username used by this storage"
+msgstr ""
+
+#: gui/options.cpp:1422
+msgid "Used space:"
+msgstr ""
+
+#: gui/options.cpp:1422
+msgid "Space used by ScummVM's saved games on this storage"
+msgstr ""
+
+#: gui/options.cpp:1425
+msgid "Last sync time:"
+msgstr ""
+
+#: gui/options.cpp:1425
+msgid "When the last saved games sync for this storage occured"
+msgstr ""
+
+#: gui/options.cpp:1428 gui/storagewizarddialog.cpp:71
+msgid "Connect"
+msgstr ""
+
+#: gui/options.cpp:1428
+msgid "Open wizard dialog to connect your cloud storage account"
+msgstr ""
+
+#: gui/options.cpp:1429
+msgid "Refresh"
+msgstr ""
+
+#: gui/options.cpp:1429
+msgid "Refresh current cloud storage information (username and usage)"
+msgstr ""
+
+#: gui/options.cpp:1430
+msgid "Download"
+msgstr ""
+
+#: gui/options.cpp:1430
+msgid "Open downloads manager dialog"
+msgstr ""
+
+#: gui/options.cpp:1432
+msgid "Run server"
+msgstr ""
+
+#: gui/options.cpp:1432
+msgid "Run local webserver"
+msgstr ""
+
+#: gui/options.cpp:1433 gui/options.cpp:2082
+msgid "Not running"
+msgstr ""
+
+#: gui/options.cpp:1437
+msgid "/root/ Path:"
+msgstr ""
+
+#: gui/options.cpp:1437 gui/options.cpp:1439 gui/options.cpp:1440
+msgid "Specifies which directory the Files Manager can access"
+msgstr ""
+
+#: gui/options.cpp:1439
+msgctxt "lowres"
+msgid "/root/ Path:"
+msgstr ""
+
+#: gui/options.cpp:1449
+msgid "Server's port:"
+msgstr ""
+
+#: gui/options.cpp:1449
+msgid ""
+"Which port is used by the server\n"
+"Auth with server is not available with non-default port"
+msgstr ""
+
+#: gui/options.cpp:1462
+msgid "Apply"
+msgstr ""
+
+#: gui/options.cpp:1628
+msgid "Failed to change cloud storage!"
+msgstr ""
+
+#: gui/options.cpp:1631
+msgid "Another cloud storage is already active."
+msgstr ""
+
+#: gui/options.cpp:1667
+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/options.cpp:1702
+msgid "The chosen directory cannot be written to. Please select another one."
+msgstr ""
+
+#: gui/options.cpp:1711
+msgid "Select directory for GUI themes"
+msgstr ""
+
+#: gui/options.cpp:1721
+msgid "Select directory for extra files"
+msgstr ""
+
+#: gui/options.cpp:1732
+msgid "Select directory for plugins"
+msgstr ""
+
+#: gui/options.cpp:1744
+msgid "Select directory for Files Manager /root/"
+msgstr ""
+
+#: gui/options.cpp:1979
+#, c-format
+msgid "%llu bytes"
+msgstr ""
+
+#: gui/options.cpp:1987
+msgid "<right now>"
+msgstr ""
+
+#: gui/options.cpp:1989
+msgid "<never>"
+msgstr ""
+
+#: gui/options.cpp:2073
+msgid "Stop server"
+msgstr ""
+
+#: gui/options.cpp:2074
+msgid "Stop local webserver"
+msgstr ""
+
+#: gui/options.cpp:2165
+msgid ""
+"Request failed.\n"
+"Check your Internet connection."
+msgstr ""
+
+#. I18N: You must leave "#" as is, only word 'next' is translatable
+#: gui/predictivedialog.cpp:86
+msgid "# next"
+msgstr ""
+
+#: gui/predictivedialog.cpp:87
+msgid "add"
+msgstr ""
+
+#: gui/predictivedialog.cpp:92 gui/predictivedialog.cpp:167
+msgid "Delete char"
+msgstr ""
+
+#: gui/predictivedialog.cpp:97 gui/predictivedialog.cpp:171
+msgid "<"
+msgstr ""
+
+#. I18N: Pre means 'Predictive', leave '*' as is
+#: gui/predictivedialog.cpp:99 gui/predictivedialog.cpp:575
+msgid "* Pre"
+msgstr ""
+
+#. I18N: 'Num' means Numbers
+#: gui/predictivedialog.cpp:578
+msgid "* Num"
+msgstr ""
+
+#. I18N: 'Abc' means Latin alphabet input
+#: gui/predictivedialog.cpp:581
+msgid "* Abc"
+msgstr ""
+
+#: gui/recorderdialog.cpp:63
+msgid "Recorder or Playback Gameplay"
+msgstr ""
+
+#: gui/recorderdialog.cpp:68 gui/recorderdialog.cpp:155
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:443
+msgid "Delete"
+msgstr ""
+
+#: gui/recorderdialog.cpp:70
+msgid "Record"
+msgstr ""
+
+#: gui/recorderdialog.cpp:71
+msgid "Playback"
+msgstr ""
+
+#: gui/recorderdialog.cpp:73
+msgid "Edit"
+msgstr ""
+
+#: gui/recorderdialog.cpp:85 gui/recorderdialog.cpp:242
+#: gui/recorderdialog.cpp:252
+msgid "Author: "
+msgstr ""
+
+#: gui/recorderdialog.cpp:86 gui/recorderdialog.cpp:243
+#: gui/recorderdialog.cpp:253
+msgid "Notes: "
+msgstr ""
+
+#: gui/recorderdialog.cpp:154
+msgid "Do you really want to delete this record?"
+msgstr ""
+
+#: gui/recorderdialog.cpp:173
+msgid "Unknown Author"
+msgstr ""
+
+#: gui/remotebrowser.cpp:128
+msgid "ScummVM could not access the directory!"
+msgstr ""
+
+#: gui/saveload-dialog.cpp:334
+msgid "List view"
+msgstr ""
+
+#: gui/saveload-dialog.cpp:335
+msgid "Grid view"
+msgstr ""
+
+#: gui/saveload-dialog.cpp:378 gui/saveload-dialog.cpp:528
+msgid "No date saved"
+msgstr ""
+
+#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:529
+msgid "No time saved"
+msgstr ""
+
+#: gui/saveload-dialog.cpp:380 gui/saveload-dialog.cpp:530
+msgid "No playtime saved"
+msgstr ""
+
+#: gui/saveload-dialog.cpp:442
+msgid "Do you really want to delete this saved game?"
+msgstr ""
+
+#: gui/saveload-dialog.cpp:554 gui/saveload-dialog.cpp:1060
+msgid "Date: "
+msgstr ""
+
+#: gui/saveload-dialog.cpp:558 gui/saveload-dialog.cpp:1066
+msgid "Time: "
+msgstr ""
+
+#: gui/saveload-dialog.cpp:564 gui/saveload-dialog.cpp:1074
+msgid "Playtime: "
+msgstr ""
+
+#: gui/saveload-dialog.cpp:577 gui/saveload-dialog.cpp:665
+msgid "Untitled saved game"
+msgstr ""
+
+#: gui/saveload-dialog.cpp:718
+msgid "Next"
+msgstr ""
+
+#: gui/saveload-dialog.cpp:721
+msgid "Prev"
+msgstr ""
+
+#: gui/saveload-dialog.cpp:924
+msgid "New Save"
+msgstr ""
+
+#: gui/saveload-dialog.cpp:924
+msgid "Create a new saved game"
+msgstr ""
+
+#: gui/saveload-dialog.cpp:1053
+msgid "Name: "
+msgstr ""
+
+#: gui/saveload-dialog.cpp:1131
+#, c-format
+msgid "Enter a description for slot %d:"
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:55
+#, c-format
+msgid "%s Storage Connection Wizard"
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:58
+msgid "Navigate to the following URL:"
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:61
+msgid "Obtain the code from the storage, enter it"
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:62
+msgid "in the following field and press 'Connect':"
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:69
+msgid "Open URL"
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:70
+msgid "Paste"
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:70
+msgid "Pastes clipboard contents into fields"
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:78
+msgid "You will be directed to ScummVM's page where"
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:79
+msgid "you should allow it to access your storage."
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:112
+msgid "Another Storage is active. Do you want to interrupt it?"
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:121
+msgid "Wait until current Storage finishes up and try again."
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:182
+#, c-format
+msgid "Field %s has a mistake in it."
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:184
+#, c-format
+msgid "Fields %s have mistakes in them."
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:199
+msgid "All OK!"
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:201
+msgid "Invalid code"
+msgstr ""
+
+#: gui/storagewizarddialog.cpp:209
+msgid ""
+"Failed to open URL!\n"
+"Please navigate to this page manually."
+msgstr ""
+
+#: gui/themebrowser.cpp:45
+msgid "Select a Theme"
+msgstr ""
+
+#: gui/ThemeEngine.cpp:452
+msgid "Disabled GFX"
+msgstr ""
+
+#: gui/ThemeEngine.cpp:452
+msgctxt "lowres"
+msgid "Disabled GFX"
+msgstr ""
+
+#: gui/ThemeEngine.cpp:453
+msgid "Standard Renderer"
+msgstr ""
+
+#: gui/ThemeEngine.cpp:453 engines/scumm/dialogs.cpp:659
+msgid "Standard"
+msgstr ""
+
+#: gui/ThemeEngine.cpp:455
+msgid "Antialiased Renderer"
+msgstr ""
+
+#: gui/ThemeEngine.cpp:455
+msgid "Antialiased"
+msgstr ""
+
+#: gui/updates-dialog.cpp:51
+msgid ""
+"ScummVM now supports automatic check for updates\n"
+"which requires access to the Internet.\n"
+"\n"
+"Would you like to enable this feature?"
+msgstr ""
+
+#: gui/updates-dialog.cpp:55
+msgid "(You can always enable it in the options dialog on the Misc tab)"
+msgstr ""
+
+#: gui/updates-dialog.cpp:92
+msgid "Check for updates automatically"
+msgstr ""
+
+#: gui/updates-dialog.cpp:111
+msgid "Proceed"
+msgstr ""
+
+#: gui/widget.cpp:366 gui/widget.cpp:368 gui/widget.cpp:374 gui/widget.cpp:376
+msgid "Clear value"
+msgstr ""
+
+#: base/main.cpp:253
+#, c-format
+msgid "Engine does not support debug level '%s'"
+msgstr ""
+
+#: base/main.cpp:327
+msgid "Menu"
+msgstr ""
+
+#: base/main.cpp:330 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:333 backends/platform/symbian/src/SymbianActions.cpp:50
+#: backends/platform/wince/CEActionsPocket.cpp:42
+msgid "Pause"
+msgstr ""
+
+#: base/main.cpp:336
+msgid "Skip line"
+msgstr ""
+
+#: base/main.cpp:547
+msgid "Error running game:"
+msgstr ""
+
+#: base/main.cpp:594
+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 ""
+
+#: 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 saved games"
+msgstr ""
+
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
+msgid "Unknown error"
+msgstr ""
+
+#. I18N: Hercules is graphics card name
+#: common/rendermode.cpp:35
+msgid "Hercules Green"
+msgstr ""
+
+#: common/rendermode.cpp:36
+msgid "Hercules Amber"
+msgstr ""
+
+#: common/rendermode.cpp:42
+msgid "PC-9821 (256 Colors)"
+msgstr ""
+
+#: common/rendermode.cpp:43
+msgid "PC-9801 (16 Colors)"
+msgstr ""
+
+#: common/rendermode.cpp:73
+msgctxt "lowres"
+msgid "Hercules Green"
+msgstr ""
+
+#: common/rendermode.cpp:74
+msgctxt "lowres"
+msgid "Hercules Amber"
+msgstr ""
+
+#: common/updates.cpp:58
+msgid "Daily"
+msgstr ""
+
+#: common/updates.cpp:60
+msgid "Weekly"
+msgstr ""
+
+#: common/updates.cpp:62
+msgid "Monthly"
+msgstr ""
+
+#: common/updates.cpp:64
+msgid "<Bad value>"
+msgstr ""
+
+#: engines/advancedDetector.cpp:335
+#, c-format
+msgid ""
+"The game in '%s' seems to be unknown.\n"
+"Please, report the following data to the ScummVM team along with name\n"
+"of the game you tried to add and its version, language, etc.:"
+msgstr ""
+
+#: engines/dialogs.cpp:85
+msgid "~R~esume"
+msgstr ""
+
+#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:96
+msgid "~L~oad"
+msgstr ""
+
+#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:97
+msgid "~S~ave"
+msgstr ""
+
+#: engines/dialogs.cpp:95
+msgid "~O~ptions"
+msgstr ""
+
+#: engines/dialogs.cpp:100
+msgid "~H~elp"
+msgstr ""
+
+#: engines/dialogs.cpp:102
+msgid "~A~bout"
+msgstr ""
+
+#: engines/dialogs.cpp:105 engines/dialogs.cpp:181
+msgid "~R~eturn to Launcher"
+msgstr ""
+
+#: engines/dialogs.cpp:107 engines/dialogs.cpp:183
+msgctxt "lowres"
+msgid "~R~eturn to Launcher"
+msgstr ""
+
+#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:761
+#: engines/avalanche/parser.cpp:1900 engines/cge/events.cpp:72
+#: engines/cge2/events.cpp:65 engines/cine/various.cpp:348
+#: engines/cruise/menu.cpp:212 engines/dm/loadsave.cpp:196
+#: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262
+#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
+#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
+#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
+#: engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
+#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
+#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
+msgid "Save game:"
+msgstr ""
+
+#: engines/dialogs.cpp:116 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
+#: engines/agi/saveload.cpp:761 engines/avalanche/parser.cpp:1900
+#: engines/cge/events.cpp:72 engines/cge2/events.cpp:65
+#: engines/cine/various.cpp:348 engines/cruise/menu.cpp:212
+#: engines/dm/loadsave.cpp:196 engines/drascula/saveload.cpp:364
+#: engines/dreamweb/saveload.cpp:262 engines/gnap/menu.cpp:464
+#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
+#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
+#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
+#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
+#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
+#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
+#: engines/wage/saveload.cpp:758 engines/zvision/file/save_manager.cpp:49
+msgid "Save"
+msgstr ""
+
+#: engines/dialogs.cpp:145
+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 ""
+
+#: engines/dialogs.cpp:234 engines/pegasus/pegasus.cpp:393
+#, c-format
+msgid ""
+"Failed to save game (%s)! Please consult the README for basic information, "
+"and for instructions on how to obtain further assistance."
+msgstr ""
+
+#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:100
+#: engines/tsage/dialogs.cpp:112
+msgid "~O~K"
+msgstr ""
+
+#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:101
+#: engines/tsage/dialogs.cpp:113
+msgid "~C~ancel"
+msgstr ""
+
+#: engines/dialogs.cpp:311
+msgid "~K~eys"
+msgstr ""
+
+#: engines/engine.cpp:346
+msgid "Could not initialize color format."
+msgstr ""
+
+#: engines/engine.cpp:354
+msgid "Could not switch to video mode: '"
+msgstr ""
+
+#: engines/engine.cpp:363
+msgid "Could not apply aspect ratio setting."
+msgstr ""
+
+#: engines/engine.cpp:368
+msgid "Could not apply fullscreen setting."
+msgstr ""
+
+#: engines/engine.cpp:373
+msgid "Could not apply filtering setting."
+msgstr ""
+
+#: engines/engine.cpp:473
+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 ""
+
+#: engines/engine.cpp:484
+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 ""
+
+#: engines/engine.cpp:542
+#, c-format
+msgid ""
+"Failed to load saved game (%s)! Please consult the README for basic "
+"information, and for instructions on how to obtain further assistance."
+msgstr ""
+
+#: engines/engine.cpp:555
+msgid ""
+"WARNING: The game you are about to start is not yet fully supported by "
+"ScummVM. As such, it is likely to be unstable, and any saved game you make "
+"might not work in future versions of ScummVM."
+msgstr ""
+
+#: engines/engine.cpp:558
+msgid "Start anyway"
+msgstr ""
+
+#: audio/adlib.cpp:2290
+msgid "AdLib Emulator"
+msgstr ""
+
+#: audio/fmopl.cpp:62
+msgid "MAME OPL emulator"
+msgstr ""
+
+#: audio/fmopl.cpp:64
+msgid "DOSBox OPL emulator"
+msgstr ""
+
+#: audio/fmopl.cpp:67
+msgid "ALSA Direct FM"
+msgstr ""
+
+#: audio/mididrv.cpp:209
+#, c-format
+msgid ""
+"The selected audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+
+#: 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 ""
+
+#: audio/mididrv.cpp:257
+#, c-format
+msgid ""
+"The preferred audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+
+#: audio/mididrv.cpp:272
+#, c-format
+msgid ""
+"The preferred audio device '%s' cannot be used. See log file for more "
+"information."
+msgstr ""
+
+#: audio/mods/paula.cpp:196
+msgid "Amiga Audio Emulator"
+msgstr ""
+
+#: audio/null.h:44
+msgid "No music"
+msgstr ""
+
+#: audio/softsynth/appleiigs.cpp:33
+msgid "Apple II GS Emulator (NOT IMPLEMENTED)"
+msgstr ""
+
+#: audio/softsynth/cms.cpp:350
+msgid "Creative Music System Emulator"
+msgstr ""
+
+#: audio/softsynth/fmtowns_pc98/towns_pc98_plugins.cpp:33
+msgid "FM-Towns Audio"
+msgstr ""
+
+#: audio/softsynth/fmtowns_pc98/towns_pc98_plugins.cpp:58
+msgid "PC-98 Audio"
+msgstr ""
+
+#: audio/softsynth/mt32.cpp:175
+msgid "Initializing MT-32 Emulator"
+msgstr ""
+
+#: audio/softsynth/mt32.cpp:437
+msgid "MT-32 Emulator"
+msgstr ""
+
+#: audio/softsynth/pcspk.cpp:139
+msgid "PC Speaker Emulator"
+msgstr ""
+
+#: audio/softsynth/pcspk.cpp:158
+msgid "IBM PCjr Emulator"
+msgstr ""
+
+#: audio/softsynth/sid.cpp:1430
+msgid "C64 Audio Emulator"
+msgstr ""
+
+#: backends/cloud/storage.cpp:211
+msgid "Saved games sync complete."
+msgstr ""
+
+#: backends/cloud/storage.cpp:222
+msgid "Saved games sync was cancelled."
+msgstr ""
+
+#: backends/cloud/storage.cpp:224
+msgid ""
+"Saved games sync failed.\n"
+"Check your Internet connection."
+msgstr ""
+
+#: backends/cloud/storage.cpp:328
+#, c-format
+msgid ""
+"Download complete.\n"
+"Failed to download %u files."
+msgstr ""
+
+#: backends/cloud/storage.cpp:330
+msgid "Download complete."
+msgstr ""
+
+#: backends/cloud/storage.cpp:340
+msgid "Download failed."
+msgstr ""
+
+#: backends/events/default/default-events.cpp:196
+msgid "Do you really want to return to the Launcher?"
+msgstr ""
+
+#: backends/events/default/default-events.cpp:196
+msgid "Launcher"
+msgstr ""
+
+#: backends/events/default/default-events.cpp:218
+msgid "Do you really want to quit?"
+msgstr ""
+
+#: backends/events/default/default-events.cpp:218
+#: backends/platform/symbian/src/SymbianActions.cpp:52
+#: backends/platform/wince/CEActionsPocket.cpp:44
+#: backends/platform/wince/CEActionsSmartphone.cpp:52
+#: engines/scumm/dialogs.cpp:188 engines/scumm/help.cpp:83
+#: engines/scumm/help.cpp:85
+msgid "Quit"
+msgstr ""
+
+#: backends/events/gph/gph-events.cpp:385
+#: backends/events/gph/gph-events.cpp:428
+#: backends/events/openpandora/op-events.cpp:168
+msgid "Touchscreen 'Tap Mode' - Left Click"
+msgstr ""
+
+#: backends/events/gph/gph-events.cpp:387
+#: backends/events/gph/gph-events.cpp:430
+#: backends/events/openpandora/op-events.cpp:170
+msgid "Touchscreen 'Tap Mode' - Right Click"
+msgstr ""
+
+#: backends/events/gph/gph-events.cpp:389
+#: backends/events/gph/gph-events.cpp:432
+#: backends/events/openpandora/op-events.cpp:172
+msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
+msgstr ""
+
+#: backends/events/gph/gph-events.cpp:409
+msgid "Maximum Volume"
+msgstr ""
+
+#: backends/events/gph/gph-events.cpp:411
+msgid "Increasing Volume"
+msgstr ""
+
+#: backends/events/gph/gph-events.cpp:417
+msgid "Minimal Volume"
+msgstr ""
+
+#: backends/events/gph/gph-events.cpp:419
+msgid "Decreasing Volume"
+msgstr ""
+
+#: backends/events/maemosdl/maemosdl-events.cpp:180
+msgid "Clicking Enabled"
+msgstr ""
+
+#: backends/events/maemosdl/maemosdl-events.cpp:180
+msgid "Clicking Disabled"
+msgstr ""
+
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr ""
+
+#: backends/events/symbiansdl/symbiansdl-events.cpp:186
+msgid "Do you want to quit ?"
+msgstr ""
+
+#. I18N: Trackpad mode toggle status.
+#: backends/events/webossdl/webossdl-events.cpp:308
+msgid "Trackpad mode is now"
+msgstr ""
+
+#. I18N: Trackpad mode on or off.
+#. I18N: Auto-drag on or off.
+#: backends/events/webossdl/webossdl-events.cpp:311
+#: backends/events/webossdl/webossdl-events.cpp:338
+msgid "ON"
+msgstr ""
+
+#: backends/events/webossdl/webossdl-events.cpp:311
+#: backends/events/webossdl/webossdl-events.cpp:338
+msgid "OFF"
+msgstr ""
+
+#: backends/events/webossdl/webossdl-events.cpp:315
+msgid "Swipe two fingers to the right to toggle."
+msgstr ""
+
+#. I18N: Auto-drag toggle status.
+#: backends/events/webossdl/webossdl-events.cpp:335
+msgid "Auto-drag mode is now"
+msgstr ""
+
+#: backends/events/webossdl/webossdl-events.cpp:342
+msgid "Swipe three fingers to the right to toggle."
+msgstr ""
+
+#: backends/graphics/opengl/opengl-graphics.cpp:146
+msgid "OpenGL"
+msgstr ""
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:617
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2462
+msgid "Windowed mode"
+msgstr ""
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:710
+#, c-format
+msgid "Resolution: %dx%d"
+msgstr ""
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:731
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2338
+msgid "Enabled aspect ratio correction"
+msgstr ""
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:733
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2344
+msgid "Disabled aspect ratio correction"
+msgstr ""
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:753
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2362
+msgid "Filtering enabled"
+msgstr ""
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:755
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2364
+msgid "Filtering disabled"
+msgstr ""
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:47
+#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
+#: backends/graphics/wincesdl/wincesdl-graphics.cpp:95
+msgid "Normal (no scaling)"
+msgstr ""
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:66
+msgctxt "lowres"
+msgid "Normal (no scaling)"
+msgstr ""
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2417
+msgid "Active graphics filter:"
+msgstr ""
+
+#: backends/keymapper/remap-dialog.cpp:48
+msgid "Keymap:"
+msgstr ""
+
+#: backends/keymapper/remap-dialog.cpp:67
+msgid " (Effective)"
+msgstr ""
+
+#: backends/keymapper/remap-dialog.cpp:107
+msgid " (Active)"
+msgstr ""
+
+#: backends/keymapper/remap-dialog.cpp:107
+msgid " (Blocked)"
+msgstr ""
+
+#: backends/keymapper/remap-dialog.cpp:120
+msgid " (Global)"
+msgstr ""
+
+#: backends/keymapper/remap-dialog.cpp:128
+msgid " (Game)"
+msgstr ""
+
+#: backends/midi/windows.cpp:165
+msgid "Windows MIDI"
+msgstr ""
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:56
+#: engines/scumm/dialogs.cpp:287
+msgid "~C~lose"
+msgstr ""
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:57
+msgid "ScummVM Main Menu"
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:75
+msgid "Touch Y Offset"
+msgstr ""
+
+#: 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/ios7/ios7_osys_events.cpp:309
+#: backends/platform/ios7/ios7_osys_events.cpp:519
+#: backends/platform/iphone/osys_events.cpp:300
+msgid "Mouse-click-and-drag mode enabled."
+msgstr ""
+
+#: backends/platform/ios7/ios7_osys_events.cpp:311
+#: backends/platform/ios7/ios7_osys_events.cpp:521
+#: backends/platform/iphone/osys_events.cpp:302
+msgid "Mouse-click-and-drag mode disabled."
+msgstr ""
+
+#: backends/platform/ios7/ios7_osys_events.cpp:322
+#: backends/platform/ios7/ios7_osys_events.cpp:540
+#: backends/platform/iphone/osys_events.cpp:313
+msgid "Touchpad mode enabled."
+msgstr ""
+
+#: backends/platform/ios7/ios7_osys_events.cpp:324
+#: backends/platform/ios7/ios7_osys_events.cpp:542
+#: backends/platform/iphone/osys_events.cpp:315
+msgid "Touchpad mode disabled."
+msgstr ""
+
+#: backends/platform/maemo/maemo.cpp:208
+msgid "Click Mode"
+msgstr ""
+
+#: backends/platform/maemo/maemo.cpp:214
+#: backends/platform/symbian/src/SymbianActions.cpp:42
+#: backends/platform/tizen/form.cpp:275
+#: backends/platform/wince/CEActionsPocket.cpp:60
+#: backends/platform/wince/CEActionsSmartphone.cpp:43
+msgid "Left Click"
+msgstr ""
+
+#: backends/platform/maemo/maemo.cpp:217
+msgid "Middle Click"
+msgstr ""
+
+#: backends/platform/maemo/maemo.cpp:220
+#: backends/platform/symbian/src/SymbianActions.cpp:43
+#: backends/platform/tizen/form.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:44
+msgid "Right Click"
+msgstr ""
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+msgid "Hide ScummVM"
+msgstr ""
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:93
+msgid "Hide Others"
+msgstr ""
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:98
+msgid "Show All"
+msgstr ""
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
+#: backends/platform/sdl/macosx/appmenu_osx.mm:131
+msgid "Window"
+msgstr ""
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:125
+msgid "Minimize"
+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/platform/tizen/form.cpp:263
+msgid "Right Click Once"
+msgstr ""
+
+#: backends/platform/tizen/form.cpp:271
+msgid "Move Only"
+msgstr ""
+
+#: backends/platform/tizen/form.cpp:294
+msgid "Escape Key"
+msgstr ""
+
+#: backends/platform/tizen/form.cpp:299
+msgid "Game Menu"
+msgstr ""
+
+#: backends/platform/tizen/form.cpp:304
+msgid "Show Keypad"
+msgstr ""
+
+#: backends/platform/tizen/form.cpp:309
+msgid "Control Mouse"
+msgstr ""
+
+#: backends/platform/tizen/fs.cpp:259
+msgid "[ Data ]"
+msgstr ""
+
+#: backends/platform/tizen/fs.cpp:263
+msgid "[ Resources ]"
+msgstr ""
+
+#: backends/platform/tizen/fs.cpp:267
+msgid "[ SDCard ]"
+msgstr ""
+
+#: backends/platform/tizen/fs.cpp:271
+msgid "[ Media ]"
+msgstr ""
+
+#: backends/platform/tizen/fs.cpp:275
+msgid "[ Shared ]"
+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 ""
+
+#: backends/platform/wii/options.cpp:66
+msgid "Vertical underscan:"
+msgstr ""
+
+#: backends/platform/wii/options.cpp:71
+msgid "Input"
+msgstr ""
+
+#: backends/platform/wii/options.cpp:74
+msgid "GC Pad sensitivity:"
+msgstr ""
+
+#: backends/platform/wii/options.cpp:80
+msgid "GC Pad acceleration:"
+msgstr ""
+
+#: backends/platform/wii/options.cpp:86
+msgid "DVD"
+msgstr ""
+
+#: 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 ""
+
+#: backends/platform/wii/options.cpp:94
+msgid "Unmount DVD"
+msgstr ""
+
+#: backends/platform/wii/options.cpp:98
+msgid "SMB"
+msgstr ""
+
+#: backends/platform/wii/options.cpp:106
+msgid "Server:"
+msgstr ""
+
+#: backends/platform/wii/options.cpp:110
+msgid "Share:"
+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 ""
+
+#: backends/platform/wii/options.cpp:124
+msgid "Unmount SMB"
+msgstr ""
+
+#: backends/platform/wii/options.cpp:143
+msgid "DVD Mounted successfully"
+msgstr ""
+
+#: backends/platform/wii/options.cpp:146
+msgid "Error while mounting the DVD"
+msgstr ""
+
+#: backends/platform/wii/options.cpp:148
+msgid "DVD not mounted"
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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:516
+msgid "Map right click action"
+msgstr ""
+
+#: backends/platform/wince/wince-sdl.cpp:520
+msgid "You must map a key to the 'Right Click' action to play this game"
+msgstr ""
+
+#: backends/platform/wince/wince-sdl.cpp:529
+msgid "Map hide toolbar action"
+msgstr ""
+
+#: backends/platform/wince/wince-sdl.cpp:533
+msgid "You must map a key to the 'Hide toolbar' action to play this game"
+msgstr ""
+
+#: backends/platform/wince/wince-sdl.cpp:542
+msgid "Map Zoom Up action (optional)"
+msgstr ""
+
+#: backends/platform/wince/wince-sdl.cpp:545
+msgid "Map Zoom Down action (optional)"
+msgstr ""
+
+#: backends/platform/wince/wince-sdl.cpp:553
+msgid ""
+"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory"
+msgstr ""
+
+#: backends/updates/macosx/macosx-updates.mm:79
+msgid "Check for Updates..."
+msgstr ""
+
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr ""
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr ""
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+
+#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
+msgid "Color mode"
+msgstr ""
+
+#: engines/adl/detection.cpp:46 engines/adl/detection.cpp:56
+msgid "Use color graphics"
+msgstr ""
+
+#: engines/adl/detection.cpp:65
+msgid "Scanlines"
+msgstr ""
+
+#: engines/adl/detection.cpp:66
+msgid "Show scanlines"
+msgstr ""
+
+#: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70
+#: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:48
+#: engines/neverhood/detection.cpp:177 engines/sci/detection.cpp:430
+#: engines/sherlock/detection.cpp:71 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection_tables.h:51
+msgid "Use original save/load screens"
+msgstr ""
+
+#: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71
+#: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:49
+#: engines/neverhood/detection.cpp:178 engines/sci/detection.cpp:431
+#: engines/sherlock/detection.cpp:72 engines/toltecs/detection.cpp:201
+msgid "Use the original save/load screens instead of the ScummVM ones"
+msgstr ""
+
+#: engines/agi/detection.cpp:157
+msgid "Use an alternative palette"
+msgstr ""
+
+#: engines/agi/detection.cpp:158
+msgid ""
+"Use an alternative palette, common for all Amiga games. This was the old "
+"behavior"
+msgstr ""
+
+#: engines/agi/detection.cpp:167
+msgid "Mouse support"
+msgstr ""
+
+#: engines/agi/detection.cpp:168
+msgid ""
+"Enables mouse support. Allows to use mouse for movement and in game menus."
+msgstr ""
+
+#: engines/agi/detection.cpp:177
+msgid "Use Hercules hires font"
+msgstr ""
+
+#: engines/agi/detection.cpp:178
+msgid "Uses Hercules hires font, when font file is available."
+msgstr ""
+
+#: engines/agi/detection.cpp:187
+msgid "Pause when entering commands"
+msgstr ""
+
+#: engines/agi/detection.cpp:188
+msgid ""
+"Shows a command prompt window and pauses the game (like in SCI) instead of a "
+"real-time prompt."
+msgstr ""
+
+#: engines/agi/saveload.cpp:774 engines/avalanche/parser.cpp:1888
+#: engines/cge/events.cpp:83 engines/cge2/events.cpp:76
+#: engines/cine/various.cpp:359 engines/dm/dm.cpp:269
+#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
+#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
+#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
+#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
+msgid "Restore game:"
+msgstr ""
+
+#: engines/agi/saveload.cpp:774 engines/avalanche/parser.cpp:1888
+#: engines/cge/events.cpp:83 engines/cge2/events.cpp:76
+#: engines/cine/various.cpp:359 engines/dm/dm.cpp:269
+#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
+#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
+#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
+#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
+msgid "Restore"
+msgstr ""
+
+#: engines/agos/saveload.cpp:159 engines/scumm/scumm.cpp:2436
+#, c-format
+msgid ""
+"Failed to load saved game from file:\n"
+"\n"
+"%s"
+msgstr ""
+
+#: engines/agos/saveload.cpp:194 engines/scumm/scumm.cpp:2429
+#, c-format
+msgid ""
+"Failed to save game to file:\n"
+"\n"
+"%s"
+msgstr ""
+
+#: engines/agos/saveload.cpp:202 engines/scumm/scumm.cpp:2447
+#, c-format
+msgid ""
+"Successfully saved game in file:\n"
+"\n"
+"%s"
+msgstr ""
+
+#: engines/agos/animation.cpp:558
+#, c-format
+msgid "Cutscene file '%s' not found!"
+msgstr ""
+
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:101
+msgid "Color Blind Mode"
+msgstr ""
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:102
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
+#: engines/drascula/saveload.cpp:47
+msgid ""
+"ScummVM found that you have old saved games for Drascula that should be "
+"converted.\n"
+"The old saved 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 ""
+
+#: engines/dreamweb/detection.cpp:58
+msgid "Use bright palette mode"
+msgstr ""
+
+#: engines/dreamweb/detection.cpp:59
+msgid "Display graphics using the game's bright palette"
+msgstr ""
+
+#: engines/gob/inter_playtoons.cpp:255 engines/gob/inter_v2.cpp:1467
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
+msgid "Failed to load saved game from file."
+msgstr ""
+
+#: engines/gob/inter_v2.cpp:1537 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
+msgid "Failed to save game to file."
+msgstr ""
+
+#: engines/gob/inter_v5.cpp:107
+msgid "Failed to delete file."
+msgstr ""
+
+#: engines/groovie/detection.cpp:312
+msgid "Fast movie speed"
+msgstr ""
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
+#: engines/groovie/script.cpp:407
+msgid "Failed to save game"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+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/eobcommon.cpp:331 engines/kyra/lol.cpp:481
+msgid "Move Forward"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:332 engines/kyra/lol.cpp:482
+msgid "Move Back"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:333
+msgid "Move Left"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:334
+msgid "Move Right"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:335 engines/kyra/lol.cpp:485
+#: engines/pegasus/pegasus.cpp:2509
+msgid "Turn Left"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:336 engines/kyra/lol.cpp:486
+#: engines/pegasus/pegasus.cpp:2510
+msgid "Turn Right"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:337
+msgid "Open/Close Inventory"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:338
+msgid "Switch Inventory/Character screen"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:339
+msgid "Camp"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:340
+msgid "Cast Spell"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:343
+msgid "Spell Level 1"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:344
+msgid "Spell Level 2"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:345
+msgid "Spell Level 3"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:346
+msgid "Spell Level 4"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:347
+msgid "Spell Level 5"
+msgstr ""
+
+#: engines/kyra/eobcommon.cpp:356
+msgid "Spell Level 6"
+msgstr ""
+
+#: engines/kyra/lol.cpp:478
+msgid "Attack 1"
+msgstr ""
+
+#: engines/kyra/lol.cpp:479
+msgid "Attack 2"
+msgstr ""
+
+#: engines/kyra/lol.cpp:480
+msgid "Attack 3"
+msgstr ""
+
+#: engines/kyra/lol.cpp:483
+msgid "Slide Left"
+msgstr ""
+
+#: engines/kyra/lol.cpp:484
+msgid "Slide 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: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 ""
+
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original saved game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this saved game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A saved game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original saved games have been successfully imported into\n"
+"ScummVM. If you want to manually import original saved game later you will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
+#: engines/mads/detection.cpp:91
+msgid "Easy mouse interface"
+msgstr ""
+
+#: engines/mads/detection.cpp:92
+msgid "Shows object names when hovering the mouse over them"
+msgstr ""
+
+#: engines/mads/detection.cpp:101 engines/mads/detection.cpp:102
+msgid "Animated inventory items"
+msgstr ""
+
+#: engines/mads/detection.cpp:111 engines/mads/detection.cpp:112
+msgid "Animated game interface"
+msgstr ""
+
+#: engines/mads/detection.cpp:121 engines/mads/detection.cpp:122
+msgid "Naughty game mode"
+msgstr ""
+
+#: engines/mohawk/detection.cpp:169
+msgid "Play the Myst fly by movie"
+msgstr ""
+
+#: engines/mohawk/detection.cpp:170
+msgid "The Myst fly by movie was not played by the original engine."
+msgstr ""
+
+#. I18N: Option for fast scene switching
+#: engines/mohawk/dialogs.cpp:181 engines/mohawk/dialogs.cpp:267
+msgid "~Z~ip Mode Activated"
+msgstr ""
+
+#: engines/mohawk/dialogs.cpp:182
+msgid "~T~ransitions Enabled"
+msgstr ""
+
+#. I18N: Drop book page
+#: engines/mohawk/dialogs.cpp:184
+msgid "~D~rop Page"
+msgstr ""
+
+#: engines/mohawk/dialogs.cpp:188
+msgid "Show ~M~ap"
+msgstr ""
+
+#: engines/mohawk/dialogs.cpp:194
+msgid "Main Men~u~"
+msgstr ""
+
+#: engines/mohawk/dialogs.cpp:268
+msgid "~W~ater Effect Enabled"
+msgstr ""
+
+#: engines/mohawk/riven.cpp:150
+msgid ""
+"You're missing a Riven executable. The Windows executable is 'riven.exe' or "
+"'rivendmo.exe'. "
+msgstr ""
+
+#: engines/mohawk/riven.cpp:151
+msgid ""
+"Using the 'arcriven.z' installer file also works. In addition, you can use "
+"the Mac 'Riven' executable."
+msgstr ""
+
+#: engines/mohawk/riven.cpp:162
+msgid ""
+"You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also "
+"works."
+msgstr ""
+
+#: engines/mohawk/riven_external.cpp:213
+msgid ""
+"Exploration beyond this point available only within the full version of\n"
+"the game."
+msgstr ""
+
+#: engines/mohawk/riven_external.cpp:655
+msgid ""
+"At this point, the Riven Demo would\n"
+"ask if you would like to open a web browser\n"
+"to bring you to the Red Orb store to buy\n"
+"the game. ScummVM cannot do that and\n"
+"the site no longer exists."
+msgstr ""
+
+#: engines/mohawk/mohawk.cpp:61
+msgid "The game is paused. Press any key to continue."
+msgstr ""
+
+#: engines/neverhood/detection.cpp:184
+msgid "Skip the Hall of Records storyboard scenes"
+msgstr ""
+
+#: engines/neverhood/detection.cpp:185
+msgid "Allows the player to skip past the Hall of Records storyboard scenes"
+msgstr ""
+
+#: engines/neverhood/detection.cpp:191
+msgid "Scale the making of videos to full screen"
+msgstr ""
+
+#: engines/neverhood/detection.cpp:192
+msgid "Scale the making of videos, so that they use the whole screen"
+msgstr ""
+
+#: engines/parallaction/saveload.cpp:130
+#, c-format
+msgid ""
+"Can't save game in slot %i\n"
+"\n"
+msgstr ""
+
+#: engines/parallaction/saveload.cpp:194
+msgid "Load file"
+msgstr ""
+
+#: engines/parallaction/saveload.cpp:201
+msgid "Loading game..."
+msgstr ""
+
+#: engines/parallaction/saveload.cpp:209
+msgid "Save file"
+msgstr ""
+
+#: engines/parallaction/saveload.cpp:216
+msgid "Saving game..."
+msgstr ""
+
+#: engines/parallaction/saveload.cpp:269
+msgid ""
+"ScummVM found that you have old saved games 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 ""
+
+#: engines/parallaction/saveload.cpp:316
+msgid "ScummVM successfully converted all your saved games."
+msgstr ""
+
+#: engines/parallaction/saveload.cpp:318
+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 ""
+
+#: engines/pegasus/pegasus.cpp:714
+msgid "Invalid file name for saving"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2507
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2508
+msgid "Down/Zoom Out"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2511
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2512
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2513
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2514
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2515
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2516
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr ""
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr ""
+
+#: engines/sci/detection.cpp:390
+msgid "Skip EGA dithering pass (full color backgrounds)"
+msgstr ""
+
+#: engines/sci/detection.cpp:391
+msgid "Skip dithering pass in EGA games, graphics are shown with full colors"
+msgstr ""
+
+#: engines/sci/detection.cpp:400
+msgid "Enable high resolution graphics"
+msgstr ""
+
+#: engines/sci/detection.cpp:401
+msgid "Enable high resolution graphics/content"
+msgstr ""
+
+#: engines/sci/detection.cpp:410
+msgid "Enable black-lined video"
+msgstr ""
+
+#: engines/sci/detection.cpp:411
+msgid "Draw black lines over videos to increase their apparent sharpness"
+msgstr ""
+
+#: engines/sci/detection.cpp:420
+msgid "Prefer digital sound effects"
+msgstr ""
+
+#: engines/sci/detection.cpp:421
+msgid "Prefer digital sound effects instead of synthesized ones"
+msgstr ""
+
+#: engines/sci/detection.cpp:440
+msgid "Use IMF/Yamaha FB-01 for MIDI output"
+msgstr ""
+
+#: engines/sci/detection.cpp:441
+msgid ""
+"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
+"output"
+msgstr ""
+
+#: engines/sci/detection.cpp:451
+msgid "Use CD audio"
+msgstr ""
+
+#: engines/sci/detection.cpp:452
+msgid "Use CD audio instead of in-game audio, if available"
+msgstr ""
+
+#: engines/sci/detection.cpp:462
+msgid "Use Windows cursors"
+msgstr ""
+
+#: engines/sci/detection.cpp:463
+msgid ""
+"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
+msgstr ""
+
+#: engines/sci/detection.cpp:473
+msgid "Use silver cursors"
+msgstr ""
+
+#: engines/sci/detection.cpp:474
+msgid ""
+"Use the alternate set of silver cursors instead of the normal golden ones"
+msgstr ""
+
+#: engines/scumm/detection.cpp:1120
+msgid ""
+"Your game version appears to be unknown. If this is *NOT* a fan-modified\n"
+"version (in particular, not a fan-made translation), please, report the\n"
+"following data to the ScummVM team along with the name of the game you "
+"tried\n"
+"to add and its version, language, etc.:\n"
+msgstr ""
+
+#: engines/scumm/detection.cpp:1138
+msgid ""
+"The Lite version of Putt-Putt Saves the Zoo iOS is not supported to avoid "
+"piracy.\n"
+"The full version is available for purchase from the iTunes Store."
+msgstr ""
+
+#: engines/scumm/detection.cpp:1341
+msgid "Show Object Line"
+msgstr ""
+
+#: engines/scumm/detection.cpp:1342
+msgid "Show the names of objects at the bottom of the screen"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:172
+#, c-format
+msgid "Insert Disk %c and Press Button to Continue."
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:173
+#, c-format
+msgid "Unable to Find %s, (%c%d) Press Button."
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:174
+#, c-format
+msgid "Error reading disk %c, (%c%d) Press Button."
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:175
+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:179
+msgid "Are you sure you want to restart? (Y/N)Y"
+msgstr ""
+
+#. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment
+#: engines/scumm/dialogs.cpp:181
+msgid "Are you sure you want to quit? (Y/N)Y"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:186
+msgid "Play"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:190
+msgid "Insert save/load game disk"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:191
+msgid "You must enter a name"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:192
+msgid "The game was NOT saved (disk full?)"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:193
+msgid "The game was NOT loaded"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:194
+#, c-format
+msgid "Saving '%s'"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:195
+#, c-format
+msgid "Loading '%s'"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:196
+msgid "Name your SAVE game"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:197
+msgid "Select a game to LOAD"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:198
+msgid "Game title)"
+msgstr ""
+
+#. I18N: Previous page button
+#: engines/scumm/dialogs.cpp:284
+msgid "~P~revious"
+msgstr ""
+
+#. I18N: Next page button
+#: engines/scumm/dialogs.cpp:286
+msgid "~N~ext"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:598
+msgid "Speech Only"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:599
+msgid "Speech and Subtitles"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:600
+msgid "Subtitles Only"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:608
+msgctxt "lowres"
+msgid "Speech & Subs"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:654
+msgid "Select a Proficiency Level."
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:656
+msgid "Refer to your Loom(TM) manual for help."
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:660
+msgid "Practice"
+msgstr ""
+
+#: engines/scumm/dialogs.cpp:661
+msgid "Expert"
+msgstr ""
+
+#: engines/scumm/help.cpp:74
+msgid "Common keyboard commands:"
+msgstr ""
+
+#: engines/scumm/help.cpp:75
+msgid "Save / Load dialog"
+msgstr ""
+
+#: engines/scumm/help.cpp:77
+msgid "Skip line of text"
+msgstr ""
+
+#: engines/scumm/help.cpp:78
+msgid "Esc"
+msgstr ""
+
+#: engines/scumm/help.cpp:78
+msgid "Skip cutscene"
+msgstr ""
+
+#: engines/scumm/help.cpp:79
+msgid "Space"
+msgstr ""
+
+#: engines/scumm/help.cpp:79
+msgid "Pause game"
+msgstr ""
+
+#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:85
+#: 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 engines/scumm/help.cpp:103
+msgid "Ctrl"
+msgstr ""
+
+#: engines/scumm/help.cpp:80
+msgid "Load saved game 1-10"
+msgstr ""
+
+#: engines/scumm/help.cpp:81 engines/scumm/help.cpp:85
+#: engines/scumm/help.cpp:87 engines/scumm/help.cpp:101
+#: engines/scumm/help.cpp:102 engines/scumm/help.cpp:103
+msgid "Alt"
+msgstr ""
+
+#: engines/scumm/help.cpp:81
+msgid "Save game 1-10"
+msgstr ""
+
+#: engines/scumm/help.cpp:87 engines/scumm/help.cpp:90
+msgid "Enter"
+msgstr ""
+
+#: engines/scumm/help.cpp:88
+msgid "Music volume up / down"
+msgstr ""
+
+#: engines/scumm/help.cpp:89
+msgid "Text speed slower / faster"
+msgstr ""
+
+#: engines/scumm/help.cpp:90
+msgid "Simulate left mouse button"
+msgstr ""
+
+#: engines/scumm/help.cpp:91
+msgid "Tab"
+msgstr ""
+
+#: engines/scumm/help.cpp:91
+msgid "Simulate right mouse button"
+msgstr ""
+
+#: engines/scumm/help.cpp:94
+msgid "Special keyboard commands:"
+msgstr ""
+
+#: engines/scumm/help.cpp:95
+msgid "Show / Hide console"
+msgstr ""
+
+#: engines/scumm/help.cpp:96
+msgid "Start the debugger"
+msgstr ""
+
+#: engines/scumm/help.cpp:97
+msgid "Show memory consumption"
+msgstr ""
+
+#: engines/scumm/help.cpp:98
+msgid "Run in fast mode (*)"
+msgstr ""
+
+#: engines/scumm/help.cpp:99
+msgid "Run in really fast mode (*)"
+msgstr ""
+
+#: engines/scumm/help.cpp:100
+msgid "Toggle mouse capture"
+msgstr ""
+
+#: engines/scumm/help.cpp:101
+msgid "Switch between graphics filters"
+msgstr ""
+
+#: engines/scumm/help.cpp:102
+msgid "Increase / Decrease scale factor"
+msgstr ""
+
+#: engines/scumm/help.cpp:103
+msgid "Toggle aspect-ratio correction"
+msgstr ""
+
+#: engines/scumm/help.cpp:108
+msgid "* Note that using ctrl-f and"
+msgstr ""
+
+#: engines/scumm/help.cpp:109
+msgid " ctrl-g are not recommended"
+msgstr ""
+
+#: engines/scumm/help.cpp:110
+msgid " since they may cause crashes"
+msgstr ""
+
+#: engines/scumm/help.cpp:111
+msgid " or incorrect game behavior."
+msgstr ""
+
+#: engines/scumm/help.cpp:115
+msgid "Spinning drafts on the keyboard:"
+msgstr ""
+
+#: engines/scumm/help.cpp:117
+msgid "Main game controls:"
+msgstr ""
+
+#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137
+#: engines/scumm/help.cpp:162
+msgid "Push"
+msgstr ""
+
+#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138
+#: engines/scumm/help.cpp:163
+msgid "Pull"
+msgstr ""
+
+#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139
+#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:198
+#: engines/scumm/help.cpp:208
+msgid "Give"
+msgstr ""
+
+#: 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
+msgid "Open"
+msgstr ""
+
+#: engines/scumm/help.cpp:127
+msgid "Go to"
+msgstr ""
+
+#: engines/scumm/help.cpp:128
+msgid "Get"
+msgstr ""
+
+#: engines/scumm/help.cpp:129 engines/scumm/help.cpp:153
+#: engines/scumm/help.cpp:171 engines/scumm/help.cpp:199
+#: engines/scumm/help.cpp:214 engines/scumm/help.cpp:225
+#: engines/scumm/help.cpp:251
+msgid "Use"
+msgstr ""
+
+#: engines/scumm/help.cpp:130 engines/scumm/help.cpp:142
+msgid "Read"
+msgstr ""
+
+#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:148
+msgid "New kid"
+msgstr ""
+
+#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:154
+#: engines/scumm/help.cpp:172
+msgid "Turn on"
+msgstr ""
+
+#: engines/scumm/help.cpp:133 engines/scumm/help.cpp:155
+#: engines/scumm/help.cpp:173
+msgid "Turn off"
+msgstr ""
+
+#: engines/scumm/help.cpp:143 engines/scumm/help.cpp:168
+#: engines/scumm/help.cpp:195
+msgid "Walk to"
+msgstr ""
+
+#: engines/scumm/help.cpp:144 engines/scumm/help.cpp:169
+#: engines/scumm/help.cpp:196 engines/scumm/help.cpp:211
+#: engines/scumm/help.cpp:228
+msgid "Pick up"
+msgstr ""
+
+#: engines/scumm/help.cpp:145 engines/scumm/help.cpp:170
+msgid "What is"
+msgstr ""
+
+#: engines/scumm/help.cpp:147
+msgid "Unlock"
+msgstr ""
+
+#: engines/scumm/help.cpp:150
+msgid "Put on"
+msgstr ""
+
+#: engines/scumm/help.cpp:151
+msgid "Take off"
+msgstr ""
+
+#: engines/scumm/help.cpp:157
+msgid "Fix"
+msgstr ""
+
+#: engines/scumm/help.cpp:159
+msgid "Switch"
+msgstr ""
+
+#: engines/scumm/help.cpp:167 engines/scumm/help.cpp:229
+msgid "Look"
+msgstr ""
+
+#: engines/scumm/help.cpp:174 engines/scumm/help.cpp:224
+msgid "Talk"
+msgstr ""
+
+#: engines/scumm/help.cpp:175
+msgid "Travel"
+msgstr ""
+
+#: engines/scumm/help.cpp:176
+msgid "To Henry / To Indy"
+msgstr ""
+
+#. I18N: These are different musical notes
+#: engines/scumm/help.cpp:180
+msgid "play C minor on distaff"
+msgstr ""
+
+#: engines/scumm/help.cpp:181
+msgid "play D on distaff"
+msgstr ""
+
+#: engines/scumm/help.cpp:182
+msgid "play E on distaff"
+msgstr ""
+
+#: engines/scumm/help.cpp:183
+msgid "play F on distaff"
+msgstr ""
+
+#: engines/scumm/help.cpp:184
+msgid "play G on distaff"
+msgstr ""
+
+#: engines/scumm/help.cpp:185
+msgid "play A on distaff"
+msgstr ""
+
+#: engines/scumm/help.cpp:186
+msgid "play B on distaff"
+msgstr ""
+
+#: engines/scumm/help.cpp:187
+msgid "play C major on distaff"
+msgstr ""
+
+#: engines/scumm/help.cpp:193 engines/scumm/help.cpp:215
+msgid "puSh"
+msgstr ""
+
+#: engines/scumm/help.cpp:194 engines/scumm/help.cpp:216
+msgid "pull (Yank)"
+msgstr ""
+
+#: engines/scumm/help.cpp:197 engines/scumm/help.cpp:213
+#: engines/scumm/help.cpp:249
+msgid "Talk to"
+msgstr ""
+
+#: engines/scumm/help.cpp:200 engines/scumm/help.cpp:212
+msgid "Look at"
+msgstr ""
+
+#: engines/scumm/help.cpp:201
+msgid "turn oN"
+msgstr ""
+
+#: engines/scumm/help.cpp:202
+msgid "turn oFf"
+msgstr ""
+
+#: engines/scumm/help.cpp:218
+msgid "KeyUp"
+msgstr ""
+
+#: engines/scumm/help.cpp:218
+msgid "Highlight prev dialogue"
+msgstr ""
+
+#: engines/scumm/help.cpp:219
+msgid "KeyDown"
+msgstr ""
+
+#: engines/scumm/help.cpp:219
+msgid "Highlight next dialogue"
+msgstr ""
+
+#: engines/scumm/help.cpp:223
+msgid "Walk"
+msgstr ""
+
+#: engines/scumm/help.cpp:226 engines/scumm/help.cpp:235
+#: engines/scumm/help.cpp:242 engines/scumm/help.cpp:250
+msgid "Inventory"
+msgstr ""
+
+#: engines/scumm/help.cpp:227
+msgid "Object"
+msgstr ""
+
+#: engines/scumm/help.cpp:230
+msgid "Black and White / Color"
+msgstr ""
+
+#: engines/scumm/help.cpp:233
+msgid "Eyes"
+msgstr ""
+
+#: engines/scumm/help.cpp:234
+msgid "Tongue"
+msgstr ""
+
+#: engines/scumm/help.cpp:236
+msgid "Punch"
+msgstr ""
+
+#: engines/scumm/help.cpp:237
+msgid "Kick"
+msgstr ""
+
+#: engines/scumm/help.cpp:240 engines/scumm/help.cpp:248
+msgid "Examine"
+msgstr ""
+
+#: engines/scumm/help.cpp:241
+msgid "Regular cursor"
+msgstr ""
+
+#. I18N: Comm is a communication device
+#: engines/scumm/help.cpp:244
+msgid "Comm"
+msgstr ""
+
+#: engines/scumm/help.cpp:247
+msgid "Save / Load / Options"
+msgstr ""
+
+#: engines/scumm/help.cpp:256
+msgid "Other game controls:"
+msgstr ""
+
+#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:268
+msgid "Inventory:"
+msgstr ""
+
+#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275
+msgid "Scroll list up"
+msgstr ""
+
+#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:276
+msgid "Scroll list down"
+msgstr ""
+
+#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:269
+msgid "Upper left item"
+msgstr ""
+
+#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271
+msgid "Lower left item"
+msgstr ""
+
+#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:272
+msgid "Upper right item"
+msgstr ""
+
+#: engines/scumm/help.cpp:264 engines/scumm/help.cpp:274
+msgid "Lower right item"
+msgstr ""
+
+#: engines/scumm/help.cpp:270
+msgid "Middle left item"
+msgstr ""
+
+#: engines/scumm/help.cpp:273
+msgid "Middle right item"
+msgstr ""
+
+#: engines/scumm/help.cpp:280 engines/scumm/help.cpp:285
+msgid "Switching characters:"
+msgstr ""
+
+#: engines/scumm/help.cpp:282
+msgid "Second kid"
+msgstr ""
+
+#: engines/scumm/help.cpp:283
+msgid "Third kid"
+msgstr ""
+
+#: engines/scumm/help.cpp:292
+msgid "Toggle Inventory/IQ Points display"
+msgstr ""
+
+#: engines/scumm/help.cpp:293
+msgid "Toggle Keyboard/Mouse Fighting (*)"
+msgstr ""
+
+#: engines/scumm/help.cpp:295
+msgid "* Keyboard Fighting is always on,"
+msgstr ""
+
+#: engines/scumm/help.cpp:296
+msgid " so despite the in-game message this"
+msgstr ""
+
+#: engines/scumm/help.cpp:297
+msgid " actually toggles Mouse Fighting Off/On"
+msgstr ""
+
+#: engines/scumm/help.cpp:304
+msgid "Fighting controls (numpad):"
+msgstr ""
+
+#: engines/scumm/help.cpp:305 engines/scumm/help.cpp:306
+#: engines/scumm/help.cpp:307
+msgid "Step back"
+msgstr ""
+
+#: engines/scumm/help.cpp:308
+msgid "Block high"
+msgstr ""
+
+#: engines/scumm/help.cpp:309
+msgid "Block middle"
+msgstr ""
+
+#: engines/scumm/help.cpp:310
+msgid "Block low"
+msgstr ""
+
+#: engines/scumm/help.cpp:311
+msgid "Punch high"
+msgstr ""
+
+#: engines/scumm/help.cpp:312
+msgid "Punch middle"
+msgstr ""
+
+#: engines/scumm/help.cpp:313
+msgid "Punch low"
+msgstr ""
+
+#: engines/scumm/help.cpp:315
+msgid "Sucker punch"
+msgstr ""
+
+#: engines/scumm/help.cpp:318
+msgid "These are for Indy on left."
+msgstr ""
+
+#: engines/scumm/help.cpp:319
+msgid "When Indy is on the right,"
+msgstr ""
+
+#: engines/scumm/help.cpp:320
+msgid "7, 4, and 1 are switched with"
+msgstr ""
+
+#: engines/scumm/help.cpp:321
+msgid "9, 6, and 3, respectively."
+msgstr ""
+
+#: engines/scumm/help.cpp:328
+msgid "Biplane controls (numpad):"
+msgstr ""
+
+#: engines/scumm/help.cpp:329
+msgid "Fly to upper left"
+msgstr ""
+
+#: engines/scumm/help.cpp:330
+msgid "Fly to left"
+msgstr ""
+
+#: engines/scumm/help.cpp:331
+msgid "Fly to lower left"
+msgstr ""
+
+#: engines/scumm/help.cpp:332
+msgid "Fly upwards"
+msgstr ""
+
+#: engines/scumm/help.cpp:333
+msgid "Fly straight"
+msgstr ""
+
+#: engines/scumm/help.cpp:334
+msgid "Fly down"
+msgstr ""
+
+#: engines/scumm/help.cpp:335
+msgid "Fly to upper right"
+msgstr ""
+
+#: engines/scumm/help.cpp:336
+msgid "Fly to right"
+msgstr ""
+
+#: engines/scumm/help.cpp:337
+msgid "Fly to lower right"
+msgstr ""
+
+#: engines/scumm/input.cpp:578
+msgid "Snap scroll on"
+msgstr ""
+
+#: engines/scumm/input.cpp:580
+msgid "Snap scroll off"
+msgstr ""
+
+#: engines/scumm/input.cpp:593
+msgid "Music volume: "
+msgstr ""
+
+#: engines/scumm/input.cpp:610
+msgid "Subtitle speed: "
+msgstr ""
+
+#: engines/scumm/scumm.cpp:1880
+#, 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:2733
+msgid ""
+"Usually, Maniac Mansion would start now. But for that to work, the game "
+"files for Maniac Mansion have to be in the 'Maniac' directory inside the "
+"Tentacle game directory, and the game has to be added to ScummVM."
+msgstr ""
+
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/sherlock/detection.cpp:81
+msgid "Pixellated scene transitions"
+msgstr ""
+
+#: engines/sherlock/detection.cpp:82
+msgid "When changing scenes, a randomized pixel transition is done"
+msgstr ""
+
+#: engines/sherlock/detection.cpp:91
+msgid "Don't show hotspots when moving mouse"
+msgstr ""
+
+#: engines/sherlock/detection.cpp:92
+msgid ""
+"Only show hotspot names after you actually click on a hotspot or action "
+"button"
+msgstr ""
+
+#: engines/sherlock/detection.cpp:101
+msgid "Show character portraits"
+msgstr ""
+
+#: engines/sherlock/detection.cpp:102
+msgid "Show portraits for the characters when conversing"
+msgstr ""
+
+#: engines/sherlock/detection.cpp:111
+msgid "Slide dialogs into view"
+msgstr ""
+
+#: engines/sherlock/detection.cpp:112
+msgid "Slide UI dialogs into view, rather than simply showing them immediately"
+msgstr ""
+
+#: engines/sherlock/detection.cpp:121
+msgid "Transparent windows"
+msgstr ""
+
+#: engines/sherlock/detection.cpp:122
+msgid "Show windows with a partially transparent background"
+msgstr ""
+
+#: engines/sky/compact.cpp:141
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
+msgstr ""
+
+#: 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 ""
+
+#: engines/sword1/animation.cpp:524
+#, c-format
+msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
+msgstr ""
+
+#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
+msgstr ""
+
+#: engines/sword1/animation.cpp:561 engines/sword2/animation.cpp:461
+msgid ""
+"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
+msgstr ""
+
+#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
+#, c-format
+msgid "Cutscene '%s' not found"
+msgstr ""
+
+#: engines/sword1/control.cpp:863
+msgid ""
+"ScummVM found that you have old saved games for Broken Sword 1 that should "
+"be converted.\n"
+"The old saved 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 ""
+
+#: engines/sword1/control.cpp:1232
+#, c-format
+msgid ""
+"Target new saved game already exists!\n"
+"Would you like to keep the old saved game (%s) or the new one (%s)?\n"
+msgstr ""
+
+#: 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 ""
+
+#: engines/sword2/animation.cpp:425
+msgid ""
+"PSX cutscenes found but ScummVM has been built without RGB color support"
+msgstr ""
+
+#: 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/sword25/detection.cpp:46
+msgid "Use English speech"
+msgstr ""
+
+#: engines/sword25/detection.cpp:47
+msgid ""
+"Use English speech instead of German for every language other than German"
+msgstr ""
+
+#: engines/teenagent/resources.cpp:118
+msgid ""
+"The teenagent.dat file is compressed and zlib hasn't been included in this "
+"executable. Please decompress it"
+msgstr ""
+
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+
+#: engines/toon/toon.cpp:222
+#, c-format
+msgid "Saved game in slot #%d "
+msgstr ""
+
+#: engines/toon/toon.cpp:226
+#, c-format
+msgid "Could not quick save into slot #%d"
+msgstr ""
+
+#: engines/toon/toon.cpp:239
+#, c-format
+msgid "Saved game #%d quick loaded"
+msgstr ""
+
+#: engines/toon/toon.cpp:243
+#, c-format
+msgid "Could not quick load the saved game #%d"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
+#: engines/zvision/detection_tables.h:52
+msgid "Use the original save/load screens instead of the ScummVM interface"
+msgstr ""
+
+#: engines/zvision/detection_tables.h:61
+msgid "Double FPS"
+msgstr ""
+
+#: engines/zvision/detection_tables.h:62
+msgid "Increase framerate from 30 to 60 FPS"
+msgstr ""
+
+#: engines/zvision/detection_tables.h:71
+msgid "Enable Venus"
+msgstr ""
+
+#: engines/zvision/detection_tables.h:72
+msgid "Enable the Venus help system"
+msgstr ""
+
+#: engines/zvision/detection_tables.h:81
+msgid "Disable animation while turning"
+msgstr ""
+
+#: engines/zvision/detection_tables.h:82
+msgid "Disable animation while turning in panorama mode"
+msgstr ""
+
+#: engines/zvision/detection_tables.h:91
+msgid "Use high resolution MPEG video"
+msgstr ""
+
+#: engines/zvision/detection_tables.h:92
+msgid "Use MPEG video from the DVD version instead of lower resolution AVI"
+msgstr ""
+
+#: engines/zvision/file/save_manager.cpp:220
+#, c-format
+msgid ""
+"This saved game uses version %u, but this engine only supports up to version "
+"%d. You will need an updated version of the engine to use this saved game."
+msgstr ""
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 04b433918e..c7a2e37a11 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -1,14 +1,14 @@
# Russian translation for ScummVM.
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2010-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
-# Eugene Sandulenko <sev@scummvm.org>, 2010-2016
+# Eugene Sandulenko <sev@scummvm.org>, 2010-2017
#
msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.8.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-11-29 18:44+0000\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2016-12-31 21:04+0000\n"
"Last-Translator: Ivan Lukyanov <lid-gr@tut.by>\n"
"Language-Team: Russian <https://translations.scummvm.org/projects/scummvm/"
"scummvm/ru/>\n"
@@ -164,13 +164,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -579,7 +579,6 @@ 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 "½Ð×ÝÐçÕÝÝÐï ÚÛÐÒØèÐ : ÝÕâ"
@@ -848,7 +847,7 @@ msgstr "ßÞÛÝÞíÚàÐÝÝëÙ àÕÖØÜ ÝÕ ÜÞÖÕâ Ñëâì Ø×ÜÕÝñÝ"
#: gui/options.cpp:486
msgid "the filtering setting could not be changed"
-msgstr "àÕÖØÜ ÜÐáèâÐÑØàÞÒÐÝØï ÝÕ ÜÞÖÕâ Ñëâì Ø×ÜÕÝñÝ"
+msgstr "àÕÖØÜ äØÛìâàÐæØØ ÝÕ ÜÞÖÕâ Ñëâì Ø×ÜÕÝñÝ"
#: gui/options.cpp:809
msgid "Graphics mode:"
@@ -869,11 +868,11 @@ msgstr "¿ÞÛÝÞíÚàÐÝÝëÙ àÕÖØÜ"
#: gui/options.cpp:838
msgid "Filter graphics"
-msgstr "¼ÐáèâÐÑØàÞÒÐâì ÓàÐäØÚã"
+msgstr "ÄØÛìâàÞÒÐÝØÕ ÓàÐäØÚØ"
#: gui/options.cpp:838
msgid "Use linear filtering when scaling graphics"
-msgstr "¸áßÞÛì×ÞÒÐâì ÛØÝÕÙÝÞÕ ÜÐáèâÐÑØàÞÒÐÝØï ÔÛï ãÒÕÛØçÕÝØï àÐ×àÕèÕÝØï"
+msgstr "¸áßÞÛì×ÞÒÐâì ÛØÝÕÙÝãî äØÛìâàÐæØî ÔÛï ãÒÕÛØçÕÝØï àÐ×àÕèÕÝØï"
#: gui/options.cpp:841
msgid "Aspect ratio correction"
@@ -1339,7 +1338,7 @@ msgstr "¾áâÐÝÞÒØâì áÕàÒÕà"
msgid "Stop local webserver"
msgstr "¾áâÐÝÐÒÛØÒÐÕâ ÛÞÚÐÛìÝëÙ ÒÕÑ-áÕàÒÕà"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1459,9 +1458,8 @@ msgid "Playtime: "
msgstr "²àÕÜï ØÓàë: "
#: gui/saveload-dialog.cpp:577 gui/saveload-dialog.cpp:665
-#, fuzzy
msgid "Untitled saved game"
-msgstr "ÁÞåàÐÝÕÝØÕ ÑÕ× ØÜÕÝØ"
+msgstr "ÁÞåàÐÝñÝÝÐï ØÓàÐ ÑÕ× ØÜÕÝØ"
#: gui/saveload-dialog.cpp:718
msgid "Next"
@@ -1701,9 +1699,8 @@ msgid "Could not find suitable engine plugin"
msgstr "½Õ ÜÞÓã ÝÐÙâØ ßÞÔåÞÔïéØÙ ßÛÐÓØÝ ÔÛï ÔÒØÖÚÐ"
#: common/error.cpp:68
-#, fuzzy
msgid "Engine plugin does not support saved games"
-msgstr "´ÒØÖÞÚ ÝÕ ßÞÔÔÕàÖØÒÐÕâ áÞåàÐÝÕÝØï"
+msgstr "´ÒØÖÞÚ ÝÕ ßÞÔÔÕàÖØÒÐÕâ áÞåàÐÝÕÝØÕ ØÓà"
#: common/error.cpp:71
msgid "User canceled"
@@ -1757,7 +1754,7 @@ msgid "<Bad value>"
msgstr "<½ÕßàÐÒØÛìÝÞÕ ×ÝÐçÕÝØÕ>"
#: engines/advancedDetector.cpp:335
-#, fuzzy, c-format
+#, c-format
msgid ""
"The game in '%s' seems to be unknown.\n"
"Please, report the following data to the ScummVM team along with name\n"
@@ -1765,7 +1762,7 @@ msgid ""
msgstr ""
"¿ÞåÞÖÕ, çâÞ ØÓàÐ Ò '%s' ÝÕØ×ÒÕáâÝÐ.\n"
"¿ÞÖÐÛãÙáâÐ, áÞÞÑéØâÕ ÚÞÜÐÝÔÕ ScummVM áÛÕÔãîéØÕ ÔÐÝÝëÕ ÒÜÕáâÕ\n"
-"á ÝÐ×ÒÐÝØÕÜ ØÓàë, Õñ ÒÕàáØÕÙ, ï×ëÚÞÜ Ø â. Ô.:"
+"á ÝÐ×ÒÐÝØÕÜ ØÓàë, Õñ ÒÕàáØÕÙ, ï×ëÚÞÜ Ø Ôà.:"
#: engines/dialogs.cpp:85
msgid "~R~esume"
@@ -1808,7 +1805,7 @@ msgstr "~²~ ÓÛÐÒÝÞÕ ÜÕÝî"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1829,7 +1826,7 @@ msgstr "ÁÞåàÐÝØâì ØÓàã:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1848,7 +1845,7 @@ msgstr ""
"ØÝáâàãÚæØïÜØ Þ âÞÜ, ÚÐÚ ßÞÛãçØâì ÔÐÛìÝÕÙèãî ßÞÜÞéì."
#: engines/dialogs.cpp:234 engines/pegasus/pegasus.cpp:393
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to save game (%s)! Please consult the README for basic information, "
"and for instructions on how to obtain further assistance."
@@ -1889,7 +1886,7 @@ msgstr "½Õ ÜÞÓã ßàØÜÕÝØâì ßÞÛÝÞíÚàÐÝÝëÙ àÕÖØÜ."
#: engines/engine.cpp:373
msgid "Could not apply filtering setting."
-msgstr "½Õ ÜÞÓã ßàØÜÕÝØâì ÝÐáâàÞÙÚØ ÜÐáèâÐÑØàÞÒÐÝØï."
+msgstr "½Õ ÜÞÓã ßàØÜÕÝØâì ÝÐáâàÞÙÚØ äØÛìâàÐæØØ."
#: engines/engine.cpp:473
msgid ""
@@ -1921,12 +1918,12 @@ msgstr ""
"äÐÙÛÕ README."
#: engines/engine.cpp:542
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
"information, and for instructions on how to obtain further assistance."
msgstr ""
-"½Õ ãÔÐÛÞáì ßàÞçØâÐâì áÞåàÐÝÕÝØÕ ØÓàë (%s)! ¿ÞÖÐÛãÙáâÐ, ÞÑàÐâØâÕáì Ò äÐÙÛ "
+"½Õ ãÔÐÛÞáì ßàÞçØâÐâì áÞåàÐÝñÝÝãî ØÓàã (%s)! ¿ÞÖÐÛãÙáâÐ, ÞÑàÐâØâÕáì Ò äÐÙÛ "
"README ×Ð ÑÐ×ÞÒÞÙ ØÝäÞàÜÐæØÕÙ, Ð âÐÚÖÕ ØÝáâàãÚæØïÜØ Þ âÞÜ, ÚÐÚ ßÞÛãçØâì "
"ÔÐÛìÝÕÙèãî ßÞÜÞéì."
@@ -2025,11 +2022,11 @@ msgstr "°ãÔØÞ FM-Towns"
msgid "PC-98 Audio"
msgstr "°ãÔØÞ PC-98"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "½ÐáâàÐØÒÐî íÜãÛïâÞà MT-32"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "ÍÜãÛïâÞà MT-32"
@@ -2206,12 +2203,12 @@ msgstr "ºÞààÕÚæØï áÞÞâÝÞèÕÝØï áâÞàÞÝ ÒëÚÛîçÕÝÐ"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:753
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2362
msgid "Filtering enabled"
-msgstr "¼ÐáèâÐÑØàÞÒÐÝØÕ ÒÚÛîçÕÝÞ"
+msgstr "ÄØÛìâàÐæØï ÒÚÛîçÕÝÐ"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:755
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2364
msgid "Filtering disabled"
-msgstr "¼ÐáèâÐÑØàÞÒÐÝØÕ ÒëÚÛîçÕÝÞ"
+msgstr "ÄØÛìàÐæØï ÒëÚÛîçÕÝÐ"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:47
#: backends/graphics/wincesdl/wincesdl-graphics.cpp:88
@@ -2514,7 +2511,7 @@ msgstr "ÂÕÚãéØÙ ÒØÔÕÞàÕÖØÜ:"
#: backends/platform/wii/options.cpp:56
msgid "Double-strike"
-msgstr "´ÒÞÙÝÞÙ ãÔÐà"
+msgstr "ÃÔÒÞÕÝÝëÙ"
#: backends/platform/wii/options.cpp:60
msgid "Horizontal underscan:"
@@ -2747,6 +2744,33 @@ msgstr ""
msgid "Check for Updates..."
msgstr "¿àÞÒÕàØâì ÞÑÝÞÒÛÕÝØï..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr "½Õ ãÔÐÛÞáì ÝÐÙâØ äÐÙÛ ÔÒØÖÚÐ %s."
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr "ÄÐÙÛ ÔÒØÖÚÐ %s ßÞÒàÕÖÔñÝ."
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr "½ÕÒÕàÝÐï ÒÕàáØï äÐÙÛÐ ÔÒØÖÚÐ %s. ¾ÖØÔÐÕâáï %d.%d, Ð ÝÐÙÔÕÝÐ %d.%d."
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr "ÀÕÖØÜ æÒÕâÐ"
@@ -2775,7 +2799,6 @@ msgstr "¸áßÞÛì×ÞÒÐâì ÞàØÓØÝÐÛìÝëÕ íÚàÐÝë ×ÐߨáØ/çâÕÝØï ØÓàë"
#: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:49
#: engines/neverhood/detection.cpp:178 engines/sci/detection.cpp:431
#: engines/sherlock/detection.cpp:72 engines/toltecs/detection.cpp:201
-#, fuzzy
msgid "Use the original save/load screens instead of the ScummVM ones"
msgstr ""
"¸áßÞÛì×ÞÒÐâì ÞàØÓØÝÐÛìÝëÕ íÚàÐÝë çâÕÝØï Ø áÞåàÐÝÕÝØï ØÓàë ÒÜÕáâÞ áÔÕÛÐÝÝëå Ò "
@@ -2831,8 +2854,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2844,15 +2867,15 @@ msgstr "²ÞááâÐÝÞÒØâì ØÓàã:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
msgstr "²ÞááâÐÝÞÒØâì"
#: engines/agos/saveload.cpp:159 engines/scumm/scumm.cpp:2436
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to load saved game from file:\n"
"\n"
@@ -2863,7 +2886,7 @@ msgstr ""
"%s"
#: engines/agos/saveload.cpp:194 engines/scumm/scumm.cpp:2429
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to save game to file:\n"
"\n"
@@ -2874,7 +2897,7 @@ msgstr ""
"%s"
#: engines/agos/saveload.cpp:202 engines/scumm/scumm.cpp:2447
-#, fuzzy, c-format
+#, c-format
msgid ""
"Successfully saved game in file:\n"
"\n"
@@ -2898,7 +2921,6 @@ msgid "Enable Color Blind Mode by default"
msgstr "²ÚÛîçØâì àÕÖØÜ ÔÛï ÛîÔÕÙ áÞ áÛÐÑëÜ ÒÞáßàØïâØÕÜ æÒÕâÐ"
#: engines/drascula/saveload.cpp:47
-#, fuzzy
msgid ""
"ScummVM found that you have old saved games for Drascula that should be "
"converted.\n"
@@ -2926,13 +2948,11 @@ msgstr "ÀØáãÕâ ÓàÐäØÚã á ØáßÞÛì×ÞÒÐÝØÕÜ ïàÚÞÙ ßÐÛØâàë ØÓàë"
#: engines/gob/inter_playtoons.cpp:255 engines/gob/inter_v2.cpp:1467
#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
-#, fuzzy
msgid "Failed to load saved game from file."
msgstr "½Õ ãÔÐÛÞáì ×ÐÓàãרâì áÞåàÐÝñÝÝãî ØÓàã Ø× äÐÙÛÐ."
#: engines/gob/inter_v2.cpp:1537 engines/gob/inter_geisha.cpp:263
#: engines/tinsel/saveload.cpp:545
-#, fuzzy
msgid "Failed to save game to file."
msgstr "½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã Ò äÐÙÛ."
@@ -3159,7 +3179,7 @@ msgstr ""
"\n"
#: engines/kyra/saveload_eob.cpp:623
-#, fuzzy, c-format
+#, c-format
msgid ""
"%d original saved games have been successfully imported into\n"
"ScummVM. If you want to manually import original saved game later you will\n"
@@ -3167,8 +3187,10 @@ msgid ""
"'import_savefile'.\n"
"\n"
msgstr ""
-"%d ÞàØÓØÝÐÛìÝëå äÐÙÛÞÒ áÞåàÐÝÕÝØï ÑëÛØ ãáßÕèÝÞ ØÜßÞàâØàÞÒÐÝë Ò ScummVM.\n"
-"µáÛØ Òë ×ÐåÞâØâÕ ØÜßÞàâØàÞÒÐâì ÞàØÓØÝÐÛìÝëÕ áÞåàÐÝÕÝØï, ÒÐÜ ÝãÖÝÞ ÑãÔÕâ\n"
+"%d ÞàØÓØÝÐÛìÝëå äÐÙÛÞÒ áÞåàÐÝñÝÝëå ØÓà ÑëÛØ ãáßÕèÝÞ ØÜßÞàâØàÞÒÐÝë Ò "
+"ScummVM.\n"
+"µáÛØ Òë ×ÐåÞâØâÕ ØÜßÞàâØàÞÒÐâì ÞàØÓØÝÐÛìÝëÕ áÞåàÐÝñÝÝëÕ ØÓàë, ÒÐÜ ÝãÖÝÞ "
+"ÑãÔÕâ\n"
"ÞâÚàëâì ÞâÛÐÔÞçÝãî ÚÞÝáÞÛì ScummVM Ø ÒÒÕáâØ ÚÞÜÐÝÔã 'import_savefile'.\n"
"\n"
@@ -3316,7 +3338,6 @@ msgid "Saving game..."
msgstr "ÁÞåàÐÝïî ØÓàã..."
#: engines/parallaction/saveload.cpp:269
-#, fuzzy
msgid ""
"ScummVM found that you have old saved games for Nippon Safes that should be "
"renamed.\n"
@@ -3325,18 +3346,17 @@ msgid ""
"\n"
"Press OK to convert them now, otherwise you will be asked next time.\n"
msgstr ""
-"ScummVM ÞÑÝÐàãÖØÛ ã ÒÐá áâÐàëÕ áÞåàÐÝÕÝØï ØÓàë Nippon Safes, ÚÞâÞàëÕ "
+"ScummVM ÞÑÝÐàãÖØÛ ã ÒÐá áâÐàëÕ áÞåàÐÝñÝÝëÕ ØÓàë Nippon Safes, ÚÞâÞàëÕ "
"ÝÕÞÑåÞÔØÜÞ ßÕàÕØÜÕÝÞÒÐâì.\n"
"ÁâÐàëÕ ÝÐ×ÒÐÝØï ÑÞÛìèÕ ÝÕ ßÞÔÔÕàÖØÒÐîâáï, Ø ßÞíâÞÜã Òë ÝÕ áÜÞÖÕâÕ ×ÐÓàãרâì "
-"áÞåàÐÝÕÝØï, ÕáÛØ ÝÕ ßÕàÕØÜÕÝãÕâÕ Øå.\n"
+"áÞåàÐÝñÝÝëÕ ØÓàë, ÕáÛØ ÝÕ ßÕàÕØÜÕÝãÕâÕ Øå.\n"
"\n"
"½ÐÖÜØâÕ ¾º, çâÞÑë ßÕàÕØÜÕÝÞÒÐâì Øå áÕÙçÐá, Ò ßàÞâØÒÝÞÜ áÛãçÐÕ íâÞ ÖÕ "
"áÞÞÑéÕÝØÕ ßÞïÒØâáï ßàØ áÛÕÔãîéÕÜ ×ÐßãáÚÕ ØÓàë.\n"
#: engines/parallaction/saveload.cpp:316
-#, fuzzy
msgid "ScummVM successfully converted all your saved games."
-msgstr "ScummVM ãáßÕèÝÞ ßàÕÞÑàÐ×ÞÒÐÛ ÒáÕ ÒÐèØ áÞåàÐÝÕÝØï ØÓà."
+msgstr "ScummVM ãáßÕèÝÞ ßàÕÞÑàÐ×ÞÒÐÛ ÒáÕ ÒÐèØ áÞåàÐÝñÝÝëÕ ØÓàë."
#: engines/parallaction/saveload.cpp:318
msgid ""
@@ -3351,9 +3371,8 @@ msgstr ""
"¿ÞÖÐÛãÙáâÐ, áÞÞÑéØâÕ ÞÑ íâÞÜ ÚÞÜÐÝÔÕ ScummVM."
#: engines/pegasus/pegasus.cpp:714
-#, fuzzy
msgid "Invalid file name for saving"
-msgstr "²ÒÕÔØâÕ ØÜï äÐÙÛÐ ÔÛï ×ÐߨáØ"
+msgstr "½ÕÒÕàÝÞÕ ØÜï äÐÙÛÐ ÔÛï ×ÐߨáØ"
#: engines/pegasus/pegasus.cpp:2507
msgid "Up/Zoom In/Move Forward/Open Doors"
@@ -3469,14 +3488,12 @@ msgid "Use silver cursors"
msgstr "¸áßÞÛì×ÞÒÐâì áÕàÕÑàïÝëÕ ÚãàáÞàë"
#: engines/sci/detection.cpp:474
-#, fuzzy
msgid ""
"Use the alternate set of silver cursors instead of the normal golden ones"
msgstr ""
"¸áßÞÛì×ÞÒÐâì ÐÛìâÕàÝÐâØÒÝëÙ ÝÐÑÞà áÕàÕÑàïÝëå ÚãàáÞàÞÒ ÒÜÕáâÞ ÞÑëçÝëå ×ÞÛÞâëå"
#: engines/scumm/detection.cpp:1120
-#, fuzzy
msgid ""
"Your game version appears to be unknown. If this is *NOT* a fan-modified\n"
"version (in particular, not a fan-made translation), please, report the\n"
@@ -3659,7 +3676,6 @@ msgid "Ctrl"
msgstr "Ctrl"
#: engines/scumm/help.cpp:80
-#, fuzzy
msgid "Load saved game 1-10"
msgstr "·ÐÓàãרâì ØÓàã 1-10"
@@ -3670,7 +3686,6 @@ msgid "Alt"
msgstr "Alt"
#: engines/scumm/help.cpp:81
-#, fuzzy
msgid "Save game 1-10"
msgstr "ÁÞåàÐÝØâì ØÓàã 1-10"
@@ -4252,21 +4267,9 @@ msgstr "¿àÞ×àÐçÝëÕ ÞÚÝÐ"
msgid "Show windows with a partially transparent background"
msgstr "¿ÞÚÐ×ëÒÐâì ÞÚÝÐ á çÐáâØçÝÞ ßàÞ×àÐçÝëÜ äÞÝÞÜ"
-#: 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"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
+msgstr "ÄÐÙÛ ÔÐÝÝëå ÔÒØÖÚÐ sky.cpt ØÜÕÕâ ÝÕÒÕàÝëÙ àÐ×ÜÕà."
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4298,7 +4301,6 @@ msgid "Cutscene '%s' not found"
msgstr "·ÐáâÐÒÚÐ '%s' ÝÕ ÝÐÙÔÕÝÐ"
#: engines/sword1/control.cpp:863
-#, fuzzy
msgid ""
"ScummVM found that you have old saved games for Broken Sword 1 that should "
"be converted.\n"
@@ -4308,10 +4310,10 @@ msgid ""
"Press OK to convert them now, otherwise you will be asked again the next "
"time you start the game.\n"
msgstr ""
-"ScummVM ÞÑÝÐàãÖØÛ ã ÒÐá áÞåàÐÝÕÝØï ØÓàë \"ÁÛÞÜÐÝÝëÙ ÜÕç 1\" Ò áâÐàÞÜ "
+"ScummVM ÞÑÝÐàãÖØÛ ã ÒÐá áÞåàÐÝñÝÝëÕ ØÓàë \"ÁÛÞÜÐÝÝëÙ ÜÕç 1\" Ò áâÐàÞÜ "
"äÞàÜÐâÕ.\n"
-"ÁâÐàëÙ äÞàÜÐâ ÑÞÛìèÕ ÝÕ ßÞÔÔÕàÖØÒÐÕâáï, Ø, çâÞÑë ×ÐÓàãרâì áÞåàÐÝÕÝØï, ÞÝØ "
-"ÔÞÛÖÝë Ñëâì ßÕàÕÒÕÔÕÝë Ò ÝÞÒëÙ äÞàÜÐâ.\n"
+"ÁâÐàëÙ äÞàÜÐâ ÑÞÛìèÕ ÝÕ ßÞÔÔÕàÖØÒÐÕâáï, Ø, çâÞÑë ×ÐÓàãרâì áÞåàÐÝñÝÝëÕ ØÓàë, "
+"ÞÝØ ÔÞÛÖÝë Ñëâì ßÕàÕÒÕÔÕÝë Ò ÝÞÒëÙ äÞàÜÐâ.\n"
"\n"
"½ÐÖÜØâÕ ¾º, çâÞÑë ßÕàÕÒÕáâØ Øå Ò ÝÞÒëÙ äÞàÜÐâ áÕÙçÐá, Ò ßàÞâØÒÝÞÜ áÛãçÐÕ íâÞ "
"áÞÞÑéÕÝØÕ ßÞïÒØâáï áÝÞÒÐ ßàØ áÛÕÔãîéÕÜ ×ÐßãáÚÕ ØÓàë.\n"
@@ -4363,13 +4365,7 @@ msgstr ""
"¸áßÞÛì×ÞÒÐâì ÐÝÓÛØÙáÚãî Þ×ÒãçÚã ÒÜÕáâÞ ÝÕÜÕæÚÞÙ ÔÛï ÒáÕå ï×ëÚÞÒ, ÚàÞÜÕ "
"ÝÕÜÕæÚÞÓÞ"
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
-"à ÒÐá ÞâáãâáâÒãÕâ äÐÙÛ 'teenagent.dat'. ÁÚÐçÐÙâÕ ÕÓÞ á ÒÕÑ-áÐÙâÐ ScummVM"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4377,6 +4373,11 @@ msgstr ""
"ÄÐÙÛ teenagent.dat áÖÐâ, ÝÞ zlib ÝÕ ÒÚÛîçñÝ Ò íâã ßàÞÓàÐÜÜã. ¿ÞÖÐÛãÙáâÐ, "
"àÐáßÐÚãÙâÕ ÕÓÞ"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr "²ÐàØÐÝâ èàØäâÐ ÞâáãâÒâãÕâ Ò äÐÙÛÕ ÔÒØÖÚÐ %s."
+
#: engines/toon/toon.cpp:222
#, c-format
msgid "Saved game in slot #%d "
@@ -4388,32 +4389,15 @@ msgid "Could not quick save into slot #%d"
msgstr "½Õ ãÔÐÛÞáì áÔÕÛÐâì ÑëáâàÞÕ áÞåàÐÝÕÝØÕ ØÓàë Ò áÛÞâ ð%d"
#: engines/toon/toon.cpp:239
-#, fuzzy, c-format
+#, c-format
msgid "Saved game #%d quick loaded"
msgstr "ÁÞåàÐÝñÝÝÐï ØÓàÐ ð%d ×ÐÓàãÖÕÝÐ"
#: engines/toon/toon.cpp:243
-#, fuzzy, c-format
+#, c-format
msgid "Could not quick load the saved game #%d"
msgstr "½Õ ãÔÐÛÞáì ÑëáâàÞ ×ÐÓàãרâì áÞåàÐÝñÝÝãî ØÓàã ð%d"
-#: engines/toon/toon.cpp:4917
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr "à ÒÐá ÞâáãâáâÒãÕâ äÐÙÛ 'toon.dat'. ÁÚÐçÐÙâÕ ÕÓÞ á ÒÕÑ-áÐÙâÐ ScummVM"
-
-#: engines/toon/toon.cpp:4929
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr "ÄÐÙÛ 'toon.dat' ØáßÞàçÕÝ. ÁÚÐçÐÙâÕ ÕÓÞ á ÒÕÑ-áÐÙâÐ ScummVM"
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-"½ÕßàÐÒØÛìÝÐï ÒÕàáØï äÐÙÛÐ 'toon.dat': ÞÖØÔÐÛÐáì %d.%d, Ò ÝÐÛØçØØ %d.%d. "
-"ÁÚÐçÐÙâÕ ÕÓÞ á ÒÕÑ-áÐÙâÐ ScummVM"
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "¿ÞÚÐ×Ðâì áçñâçØÚ ÚÐÔàÞÒ Ò áÕÚãÝÔã"
@@ -4422,6 +4406,14 @@ msgstr "¿ÞÚÐ×Ðâì áçñâçØÚ ÚÐÔàÞÒ Ò áÕÚãÝÔã"
msgid "Show the current number of frames per second in the upper left corner"
msgstr "¿ÞÚÐ×Ðâì Ò ÒÕàåÝÕÜ ÛÕÒÞÜ ãÓÛã âÕÚãéÕÕ ÚÞÛØçÕáâÒÞ ÚÐÔàÞÒ Ò áÕÚãÝÔã"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr "±ØÛØÝÕÙÝÐï äØÛìâàÐæØï áßàÐÙâÞÒ (ÜÕÔÛÕÝÝÞ)"
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr "¿àØÜÕÝØâì ÑØÛØÝÕÙÝãî äØÛìâàÐæØî ÔÛï ØÝÔØÒØÔãÐÛìÝëå áßàÐÙâÞÒ"
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
@@ -4457,20 +4449,52 @@ msgid "Use high resolution MPEG video"
msgstr "¸áßÞÛì×ÞÒÐâì ÒØÔÕÞ MPEG ÒëáÞÚÞÓÞ àÐ×àÕèÕÝØï"
#: engines/zvision/detection_tables.h:92
-#, fuzzy
msgid "Use MPEG video from the DVD version instead of lower resolution AVI"
msgstr ""
"¸áßÞÛì×ÞÒÐâì MPEG-ÒØÔÕÞ Ø× DVD-ÒÕàáØØ ÒÜÕáâÞ ÒØÔÕÞ ÝØ×ÚÞÓÞ àÐ×àÕèÕÝØï Ò "
"äÞàÜÐâÕ AVI"
#: engines/zvision/file/save_manager.cpp:220
-#, fuzzy, c-format
+#, c-format
msgid ""
"This saved game uses version %u, but this engine only supports up to version "
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
-"ÍâÞâ äÐÙÛ áÞåàÐÝÕÝØï ØÜÕÕâ ÒÕàáØî %u, ÝÞ ÔÒØÖÞÚ ßÞÔÔÕàÖØÒÐÕâ âÞÛìÚÞ ÒÕàáØØ "
-"ÝÕ ÒëèÕ %d. ´Ûï ØáßÞÛì×ÞÒÐÝØï íâÞÓÞ äÐÙÛÐ ÝÕÞÑåÞÔØÜÐ áÒÕÖÐï ÒÕàáØï ÔÒØÖÚÐ."
+"ÍâÞâ äÐÙÛ áÞåàÐÝñÝÝÝÞÙ ØÓàë ØÜÕÕâ ÒÕàáØî %u, ÝÞ ÔÒØÖÞÚ ßÞÔÔÕàÖØÒÐÕâ âÞÛìÚÞ "
+"ÒÕàáØØ ÝÕ ÒëèÕ %d. ´Ûï ØáßÞÛì×ÞÒÐÝØï íâÞÓÞ äÐÙÛÐ ÝÕÞÑåÞÔØÜÐ áÒÕÖÐï ÒÕàáØï "
+"ÔÒØÖÚÐ."
+
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "¾âáãâáâÒãÕâ äÐÙÛ sky.cpt!\n"
+#~ "¿ÞÖÐÛãÙáâÐ, áÚÐçÐÙâÕ ÕÓÞ á www.scummvm.org"
+
+#~ 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"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "à ÒÐá ÞâáãâáâÒãÕâ äÐÙÛ 'teenagent.dat'. ÁÚÐçÐÙâÕ ÕÓÞ á ÒÕÑ-áÐÙâÐ ScummVM"
+
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr "à ÒÐá ÞâáãâáâÒãÕâ äÐÙÛ 'toon.dat'. ÁÚÐçÐÙâÕ ÕÓÞ á ÒÕÑ-áÐÙâÐ ScummVM"
+
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr "ÄÐÙÛ 'toon.dat' ØáßÞàçÕÝ. ÁÚÐçÐÙâÕ ÕÓÞ á ÒÕÑ-áÐÙâÐ ScummVM"
+
+#~ msgid ""
+#~ "File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it "
+#~ "from the ScummVM website"
+#~ msgstr ""
+#~ "½ÕßàÐÒØÛìÝÐï ÒÕàáØï äÐÙÛÐ 'toon.dat': ÞÖØÔÐÛÐáì %d.%d, Ò ÝÐÛØçØØ %d.%d. "
+#~ "ÁÚÐçÐÙâÕ ÕÓÞ á ÒÕÑ-áÐÙâÐ ScummVM"
#~ msgid "Invalid save file name"
#~ msgstr "½ÕÒÕàÝÞÕ ØÜï äÐÙÛÐ áÞåàÐÝÕÝØï"
diff --git a/po/scummvm.pot b/po/scummvm.pot
index 15c04de931..d7d707890c 100644
--- a/po/scummvm.pot
+++ b/po/scummvm.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.10.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\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"
@@ -156,13 +156,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr ""
@@ -561,7 +561,6 @@ msgid "Associated key : %s"
msgstr ""
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr ""
@@ -1300,7 +1299,7 @@ msgstr ""
msgid "Stop local webserver"
msgstr ""
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1756,7 +1755,7 @@ msgstr ""
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1777,7 +1776,7 @@ msgstr ""
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1942,11 +1941,11 @@ msgstr ""
msgid "PC-98 Audio"
msgstr ""
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr ""
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr ""
@@ -2658,6 +2657,33 @@ msgstr ""
msgid "Check for Updates..."
msgstr ""
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr ""
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr ""
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr ""
@@ -2732,8 +2758,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2745,8 +2771,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -4056,16 +4082,8 @@ msgstr ""
msgid "Show windows with a partially transparent background"
msgstr ""
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-
#: engines/sky/compact.cpp:141
-msgid ""
-"The \"sky.cpt\" file has an incorrect size.\n"
-"Please (re)download it from www.scummvm.org"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
msgstr ""
#: engines/sky/detection.cpp:44
@@ -4147,17 +4165,17 @@ msgid ""
"Use English speech instead of German for every language other than German"
msgstr ""
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
+
#: engines/toon/toon.cpp:222
#, c-format
msgid "Saved game in slot #%d "
@@ -4178,21 +4196,6 @@ msgstr ""
msgid "Could not quick load the saved game #%d"
msgstr ""
-#: engines/toon/toon.cpp:4917
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr ""
-
-#: engines/toon/toon.cpp:4929
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr ""
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr ""
@@ -4201,6 +4204,14 @@ msgstr ""
msgid "Show the current number of frames per second in the upper left corner"
msgstr ""
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
diff --git a/po/sv_SE.po b/po/sv_SE.po
index aacc8bf573..e4cb850476 100644
--- a/po/sv_SE.po
+++ b/po/sv_SE.po
@@ -1,5 +1,5 @@
# Swedish translation for ScummVM.
-# Copyright (C) 2011-2016 The ScummVM Team
+# Copyright (C) 2011-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Hampus Flink <hampus.flink@gmail.com>, 2011.
#
@@ -7,11 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-12-04 13:18+0000\n"
-"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
-"Language-Team: Swedish "
-"<https://translations.scummvm.org/projects/scummvm/scummvm/sv/>\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2017-01-06 09:18+0000\n"
+"Last-Translator: Petter Sjölund <ignalina@mac.com>\n"
+"Language-Team: Swedish <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/sv/>\n"
"Language: sv_SE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
@@ -164,13 +164,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -580,7 +580,6 @@ msgid "Associated key : %s"
msgstr "Inställd tangent: %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Inställd tangent: Ingen"
@@ -870,7 +869,7 @@ msgstr "Fullskärmsläge"
#: gui/options.cpp:838
msgid "Filter graphics"
-msgstr "Filtergrafik"
+msgstr "Filtrera grafik"
#: gui/options.cpp:838
msgid "Use linear filtering when scaling graphics"
@@ -882,7 +881,7 @@ msgstr "Korrektion av bildförhållande"
#: gui/options.cpp:841
msgid "Correct aspect ratio for 320x200 games"
-msgstr "Korrigerar bildförhållanden för 320x200-spel"
+msgstr "Korrigera bildförhållandet för 320 x 200-spel"
#: gui/options.cpp:849
msgid "Preferred Device:"
@@ -1337,7 +1336,7 @@ msgstr "Stoppa server"
msgid "Stop local webserver"
msgstr "Stoppa lokal webbserver"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1760,6 +1759,10 @@ msgid ""
"Please, report the following data to the ScummVM team along with name\n"
"of the game you tried to add and its version, language, etc.:"
msgstr ""
+"Spelet i '%s' verkar vara okänt.\n"
+"Rapportera informationen nedan till ScummVM-teamet tillsammans med namnet på "
+"spelet du försökte lägga till och vilken version det är, vilket språk det är "
+"på och så vidare:"
#: engines/dialogs.cpp:85
msgid "~R~esume"
@@ -1802,7 +1805,7 @@ msgstr "Åte~r~vänd till launcher"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1823,7 +1826,7 @@ msgstr "Spara spelet:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1842,13 +1845,13 @@ msgstr ""
"ytterligare assistens."
#: engines/dialogs.cpp:234 engines/pegasus/pegasus.cpp:393
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to save game (%s)! Please consult the README for basic information, "
"and for instructions on how to obtain further assistance."
msgstr ""
-"Kunde inte spara data (%s)! Var god läs README-filen för grundläggande "
-"information och instruktioner för hur du kan få mer hjälp."
+"Kunde inte spara data (%s)! Läs README-filen för grundläggande information "
+"och instruktioner för hur du kan få mer hjälp."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:100
#: engines/tsage/dialogs.cpp:112
@@ -1882,7 +1885,7 @@ msgstr "Kunde inte applicera fullskärmsinställning."
#: engines/engine.cpp:373
msgid "Could not apply filtering setting."
-msgstr "Kunde inte ändra filterinställningen."
+msgstr "Filterinställningen stöds inte."
#: engines/engine.cpp:473
msgid ""
@@ -1913,13 +1916,13 @@ msgstr ""
"Se README-filen för detaljer."
#: engines/engine.cpp:542
-#, fuzzy, c-format
+#, c-format
msgid ""
"Failed to load saved game (%s)! Please consult the README for basic "
"information, and for instructions on how to obtain further assistance."
msgstr ""
-"Kunde inte ladda spardata (%s)! Hänvisa till README-filen för grundläggande "
-"information och instruktioner för ytterligare assistans."
+"Kunde inte ladda spardata (%s)! Hänvisa till README-filen för mer "
+"information och instruktioner för hur du får mer hjälp."
#: engines/engine.cpp:555
msgid ""
@@ -2016,11 +2019,11 @@ msgstr "FM Towns-ljud"
msgid "PC-98 Audio"
msgstr "PC-98 ljud"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Initialiserar MT-32 emulator"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "MT-32 emulator"
@@ -2195,7 +2198,7 @@ msgstr "Korrektion av bildförhållande av"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:753
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2362
msgid "Filtering enabled"
-msgstr "Filtrering är aktiverat"
+msgstr "Filtrering aktiverat"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:755
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2364
@@ -2739,6 +2742,35 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Sök efter uppdateringar..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr "Kunde inte hitta spelmotorns datafil '%s'."
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr "Datafilen '%s' är trasig."
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+"Felaktig version av datafilen '%s' hittades. Version %d.%d krävs, hittade %d."
+"%d."
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr "Färgläge"
@@ -2767,9 +2799,9 @@ msgstr "Använd originalskärmar för spara/ladda"
#: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:49
#: engines/neverhood/detection.cpp:178 engines/sci/detection.cpp:431
#: engines/sherlock/detection.cpp:72 engines/toltecs/detection.cpp:201
-#, fuzzy
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"
+msgstr ""
+"Använd originalskärmarna för ladda och spara istället för ScummVM:s egna"
#: engines/agi/detection.cpp:157
msgid "Use an alternative palette"
@@ -2800,12 +2832,11 @@ msgstr "Använd högupplöst typsnitt för Hercules"
#: engines/agi/detection.cpp:178
msgid "Uses Hercules hires font, when font file is available."
-msgstr ""
-"Använd högupplöst typsnitt för Herkules när typsnittsfilen är tillgänglig."
+msgstr "Använd högupplöst Herkules-typsnitt när typsnittsfilen är tillgänglig."
#: engines/agi/detection.cpp:187
msgid "Pause when entering commands"
-msgstr "Pausa när kommandon anges"
+msgstr "Pausa spelet när du skriver in kommandon"
#: engines/agi/detection.cpp:188
msgid ""
@@ -2821,12 +2852,12 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
-msgstr "Återställ spel:"
+msgstr "Ladda sparfil:"
#: engines/agi/saveload.cpp:774 engines/avalanche/parser.cpp:1888
#: engines/cge/events.cpp:83 engines/cge2/events.cpp:76
@@ -2834,12 +2865,12 @@ msgstr "Återställ spel:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
-msgstr "Återställ"
+msgstr "Ladda"
#: engines/agos/saveload.cpp:159 engines/scumm/scumm.cpp:2436
#, fuzzy, c-format
@@ -2877,7 +2908,7 @@ msgstr ""
#: engines/agos/animation.cpp:558
#, c-format
msgid "Cutscene file '%s' not found!"
-msgstr "Filmscensfilen '%s' hittades ej!"
+msgstr "Filmfilen '%s' hittades ej!"
#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:101
msgid "Color Blind Mode"
@@ -3180,7 +3211,7 @@ msgstr "Animerat spelgränssnitt"
#: engines/mads/detection.cpp:121 engines/mads/detection.cpp:122
msgid "Naughty game mode"
-msgstr ""
+msgstr "\"Busigt\" spelläge"
#: engines/mohawk/detection.cpp:169
msgid "Play the Myst fly by movie"
@@ -3221,24 +3252,30 @@ msgid ""
"You're missing a Riven executable. The Windows executable is 'riven.exe' or "
"'rivendmo.exe'. "
msgstr ""
+"Rivens huvudprogram saknas. Windowsprogrammet heter 'riven.exe' eller "
+"'rivendmo.exe'. "
#: engines/mohawk/riven.cpp:151
msgid ""
"Using the 'arcriven.z' installer file also works. In addition, you can use "
"the Mac 'Riven' executable."
msgstr ""
+"Det går även bra med installationsfilen 'arcriven.z', eller "
+"Macintoshprogrammet 'Riven'."
#: engines/mohawk/riven.cpp:162
msgid ""
"You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also "
"works."
msgstr ""
+"Filen 'extras.mhk' saknas. Det går även bra att använda installationsfilen "
+"'arcriven.z' i stället."
#: engines/mohawk/riven_external.cpp:213
msgid ""
"Exploration beyond this point available only within the full version of\n"
"the game."
-msgstr ""
+msgstr "För fortsatt utforskande krävs den fullständiga versionen av spelet."
#: engines/mohawk/riven_external.cpp:655
msgid ""
@@ -3248,6 +3285,11 @@ msgid ""
"the game. ScummVM cannot do that and\n"
"the site no longer exists."
msgstr ""
+"Här skulle Riven-demon ha\n"
+"frågat om du vill öppna en webbläsare\n"
+"för att gå in på Red Orb-butiken och köpa\n"
+"spelet. Det här går inte i ScummVM, och\n"
+"sidan i fråga finns inte längre."
#: engines/mohawk/mohawk.cpp:61
msgid "The game is paused. Press any key to continue."
@@ -3330,9 +3372,8 @@ msgstr ""
"Var god rapportera till teamet."
#: engines/pegasus/pegasus.cpp:714
-#, fuzzy
msgid "Invalid file name for saving"
-msgstr "Ange ett filnamn för att spara"
+msgstr "Ogiltigt namn på sparfilen"
#: engines/pegasus/pegasus.cpp:2507
msgid "Up/Zoom In/Move Forward/Open Doors"
@@ -3441,11 +3482,9 @@ msgid "Use silver cursors"
msgstr "Använd silverpekare"
#: engines/sci/detection.cpp:474
-#, fuzzy
msgid ""
"Use the alternate set of silver cursors instead of the normal golden ones"
-msgstr ""
-"Använd de alternativa silverpekarna istället för de normala guldpekarna"
+msgstr "Använd muspekare i silver istället för de vanliga guldfärgade"
#: engines/scumm/detection.cpp:1120
msgid ""
@@ -3455,6 +3494,10 @@ msgid ""
"tried\n"
"to add and its version, language, etc.:\n"
msgstr ""
+"Okänd version av spelet. Om det *INTE* är en spelarmodifierad\n"
+"version (som en spelarskapad översättning) rapportera följande\n"
+"data till ScummVM-teamet tillsammans med namnet på spelet du\n"
+"försökte lägga till och vilken version och språk det har, osv.\n"
#: engines/scumm/detection.cpp:1138
msgid ""
@@ -3462,6 +3505,9 @@ msgid ""
"piracy.\n"
"The full version is available for purchase from the iTunes Store."
msgstr ""
+"Lite-versionen av Putt-Putt Saves the Zoo iOS stöds inte av upphovsrättsliga "
+"skäl.\n"
+"Den fullständiga versionen går att köpa på iTunes Store."
#: engines/scumm/detection.cpp:1341
msgid "Show Object Line"
@@ -3635,9 +3681,8 @@ msgid "Alt"
msgstr "Alt"
#: engines/scumm/help.cpp:81
-#, fuzzy
msgid "Save game 1-10"
-msgstr "Spara speldata 1-10"
+msgstr "Spara spardata 1-10"
#: engines/scumm/help.cpp:87 engines/scumm/help.cpp:90
msgid "Enter"
@@ -4219,21 +4264,9 @@ msgstr "Genomskinliga fönster"
msgid "Show windows with a partially transparent background"
msgstr "Visar fönster med en delvis genomskinlig bakgrund"
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"Kunde inte hitta \"sky.cpt\"-filen!\n"
-"Var god ladda hem den frå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 ""
-"Filen \"sky.cpt\" har inkorrekt filstorlek.\n"
-"Var god ladda hem den igen från www.scummvm.org"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
+msgstr "Datafilen 'sky.cpt' har felaktig storlek."
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4324,12 +4357,7 @@ msgid ""
"Use English speech instead of German for every language other than German"
msgstr "Använd engelskt tal istället för tyska för alla språk utom tyska"
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr "Du har inte 'teenagent.dat'-filen. Hämta den från ScummVM:s webbsida"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4337,46 +4365,30 @@ msgstr ""
"Teenagent.dat-filen är komprimerad och zlib har inte inkluderats i det här "
"programmet. Var god dekomprimera den"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr "Typsnittsvarianten finns inte i datafilen '%s'."
+
#: engines/toon/toon.cpp:222
-#, fuzzy, c-format
+#, c-format
msgid "Saved game in slot #%d "
-msgstr ""
-"Kan inte spara data i position %i\n"
-"\n"
+msgstr "Kan inte spara data på plats #%d "
#: engines/toon/toon.cpp:226
#, c-format
msgid "Could not quick save into slot #%d"
-msgstr ""
+msgstr "Det gick inte att snabbspara i position #%d"
#: engines/toon/toon.cpp:239
-#, fuzzy, c-format
+#, c-format
msgid "Saved game #%d quick loaded"
-msgstr ""
-"Kan inte spara data i position %i\n"
-"\n"
+msgstr "Sparade speldata #%d snabbladdades"
#: engines/toon/toon.cpp:243
-#, fuzzy, c-format
-msgid "Could not quick load the saved game #%d"
-msgstr "Vill du ladda sparat spel?"
-
-#: engines/toon/toon.cpp:4917
-#, fuzzy
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr "Du har inte 'teenagent.dat'-filen. Hämta den från ScummVM:s webbsida"
-
-#: engines/toon/toon.cpp:4929
-#, fuzzy
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr "Du har inte 'teenagent.dat'-filen. Hämta den från ScummVM:s webbsida"
-
-#: engines/toon/toon.cpp:4939
#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
+msgid "Could not quick load the saved game #%d"
+msgstr "Det gick inte att snabbladda sparat spel #%d"
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
@@ -4387,6 +4399,14 @@ msgid "Show the current number of frames per second in the upper left corner"
msgstr ""
"Visar det aktuella antalet bildrutor per sekund i det övre vänstra hörnet"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr "Bilinjär filtrering av rörliga figurer (LÅNGSAM)"
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr "Tillämpa bilinjär filtrering på enskilda rörliga figurer"
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr "Använd originalskärmarna för spara/ladda istället för ScummVM:s"
@@ -4431,6 +4451,38 @@ msgid ""
"This saved game uses version %u, but this engine only supports up to version "
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+"Den här sparfilen använder version %u, men spelmotorn har bara stöd för upp "
+"till version %d. Det krävs en uppdaterad version av spelmotorn för att "
+"använda den här sparfilen."
+
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Kunde inte hitta \"sky.cpt\"-filen!\n"
+#~ "Var god ladda hem den från www.scummvm.org"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Filen \"sky.cpt\" har inkorrekt filstorlek.\n"
+#~ "Var god ladda hem den igen från www.scummvm.org"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Du har inte 'teenagent.dat'-filen. Hämta den från ScummVM:s webbsida"
+
+#, fuzzy
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Du har inte 'teenagent.dat'-filen. Hämta den från ScummVM:s webbsida"
+
+#, fuzzy
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Du har inte 'teenagent.dat'-filen. Hämta den från ScummVM:s webbsida"
#~ msgid "Invalid save file name"
#~ msgstr "Ogiltigt namn på sparfil"
diff --git a/po/uk_UA.po b/po/uk_UA.po
index 8b224d45e1..748f457c21 100644
--- a/po/uk_UA.po
+++ b/po/uk_UA.po
@@ -1,24 +1,24 @@
# Ukrainian translation for ScummVM.
-# Copyright (C) 2010-2016 The ScummVM Team
+# Copyright (C) 2010-2017 The ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Lubomyr Lisen, 2010.
-# Eugene Sandulenko <sev@scummvm.org>, 2010-2016
+# Eugene Sandulenko <sev@scummvm.org>, 2010-2017
#
msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.9.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-12-04 19:26+0000\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2017-01-01 00:02+0000\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
-"Language-Team: Ukrainian "
-"<https://translations.scummvm.org/projects/scummvm/scummvm/uk/>\n"
+"Language-Team: Ukrainian <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/uk/>\n"
"Language: uk_UA\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"
+"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: Weblate 2.9\n"
"X-Language-name: Ukrainian\n"
@@ -41,7 +41,7 @@ msgstr "¿ÞÚÐ×ÐâØ cåÞÒÐÝö äÐÙÛö"
#: gui/browser.cpp:68
msgid "Show files marked with the hidden attribute"
-msgstr "¿ÞÚÐ×ãô äÐÙÛØ ïÚö ßÞÜöçÕÝÞ ïÚ áåÞÒÐÝö"
+msgstr "¿ÞÚÐ×ãÒÐâØ äÐÙÛØ ïÚö ßÞÜöçÕÝÞ ïÚ áåÞÒÐÝö"
#: gui/browser.cpp:72 gui/remotebrowser.cpp:56
msgid "Go up"
@@ -165,13 +165,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "OK"
@@ -581,7 +581,6 @@ 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 "¿àØ×ÝÐçÕÝÐ ÚÛÐÒöèÐ : ÝÕÜÐô"
@@ -978,8 +977,8 @@ msgstr "¿àØáâàöÙ MT-32:"
#: gui/options.cpp:955
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
-"²ÚÐ×ãô ×ÒãÚÞÒØÙ ßàØáâàöÙ ×Ð ×ÐÜÞÒçÕÝÝïÜ ÔÛï ÒØÒÞÔã ÝÐ Roland "
-"MT-32/LAPC1/CM32l/CM64"
+"²ÚÐ×ãô ×ÒãÚÞÒØÙ ßàØáâàöÙ ×Ð ×ÐÜÞÒçÕÝÝïÜ ÔÛï ÒØÒÞÔã ÝÐ Roland MT-32/LAPC1/"
+"CM32l/CM64"
#: gui/options.cpp:960
msgid "True Roland MT-32 (disable GM emulation)"
@@ -1340,7 +1339,7 @@ msgstr "²ØÜÚÝãâØ áÕàÒÕà"
msgid "Stop local webserver"
msgstr "²ØÜÚÝãâØ ÛÞÚÐÛìÝØÙ ÒÕÑ-áÕàÒÕà"
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1807,7 +1806,7 @@ msgstr "~¿~ÞÒÕà.Ò ÓÞÛÞÒÝÕ ÜÕÝî"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1828,7 +1827,7 @@ msgstr "·ÑÕàÕÓâØ Óàã:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -2021,11 +2020,11 @@ msgstr "°ãÔöÞ FM-Towns"
msgid "PC-98 Audio"
msgstr "°ãÔöÞ PC-98"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "½ÐÛÐèâÞÒãî ÕÜãÛïâÞà MT-32"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "µÜãÛïâÞà MT-32"
@@ -2510,7 +2509,7 @@ msgstr "¿ÞâÞçÝØÙ ÒöÔÕÞàÕÖØÜ:"
#: backends/platform/wii/options.cpp:56
msgid "Double-strike"
-msgstr "¿ÞÔÒöÙÝØÙ ãÔÐà"
+msgstr "¿ÞÔÒöÙÝØÙ"
#: backends/platform/wii/options.cpp:60
msgid "Horizontal underscan:"
@@ -2745,6 +2744,34 @@ msgstr ""
msgid "Check for Updates..."
msgstr "¿ÕàÕÒöàØâØ ÞÝÞÒÛÕÝÝï..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr "½Õ ÒÔÐÛÞáï ×ÝÐÙâØ äÐÙÛ ÔÐÝØå ÔÒØÖÚÐ %s."
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr "ÄÐÙÛ ÔÒØÖÚÐ %s ßÞèÚÞÔÖÕÝÞ."
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+"·ÝÐÙÔÕÝÞ ÝÕÒöàÝã ÒÕàáöî ÔÐÝØå ÔÒØÖÚÐ %s. ¾çöÚãÒÐÝÐ %d.%d, ÐÛÕ ×ÝÐÙÔÕÝÞ %d.%d."
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
msgid "Color mode"
msgstr "ºÞÛìÞàÞÒØÙ àÕÖØÜ"
@@ -2828,8 +2855,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2841,8 +2868,8 @@ msgstr "²öÔÝÞ񯉯 Óàã:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -3224,8 +3251,8 @@ msgid ""
"You're missing a Riven executable. The Windows executable is 'riven.exe' or "
"'rivendmo.exe'. "
msgstr ""
-"à ÒÐÜ ÝÕÜÐô äÐÙÛã ÔÛï ÒØÚÞÝÐÝÝï Riven. ÄÐÙÛ ÒØÚÞÝÐÝÝï ÔÛï Windows ÜÐô "
-"ÝÐ×Òã'riven.exe' ÐÑÞ 'rivendemo.exe'. "
+"à ÒÐÜ ÝÕÜÐô äÐÙÛã ÔÛï ÒØÚÞÝÐÝÝï Riven. ÄÐÙÛ ÒØÚÞÝÐÝÝï ÔÛï Windows ÜÐô ÝÐ×Òã "
+"'riven.exe' ÐÑÞ 'rivendmo.exe'. "
#: engines/mohawk/riven.cpp:151
msgid ""
@@ -4231,21 +4258,9 @@ msgstr "¿àÞ×Þàö ÒöÚÝÐ"
msgid "Show windows with a partially transparent background"
msgstr "¿ÞÚÐ×ãÒÐâØ ÒöÚÝÐ × çÐáâÚÞÒÞ ßàÞ×ÞàØÜ âÛÞÜ"
-#: 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"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
+msgstr "ÄÐÙÛ ÔÐÝØå ÔÒØÖÚÐ sky.cpt ÜÐô ÝÕßàÐÒØÛìÝØÙ àÞ×Üöà."
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4338,13 +4353,7 @@ msgstr ""
"²ØÚÞàØáâÞÒãÒÐâØ Þ×ÒãçÕÝÝï ÐÝÓÛöÙáÚÞî ×ÐÜöáâì ÝöÜÕæìÚÞ÷ ÔÛï Òáöå ÜÞÒ ÞÚàöÜ "
"ÝöÜÕæìÚÞ÷"
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
-"à ÒÐá ÒöÔáâãÝöÙ äÐÙÛ 'teenagent.dat'. ·ÐÒÐÝâÐÖâÕ ÙÞÓÞ × ÒÕÑ-áÐÙâã ScummVM"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -4352,6 +4361,11 @@ msgstr ""
"ÄÐÙÛ teenagent.dat ×ÐßÐÚÞÒÐÝÞ, ÐÛÕ zlib ÝÕ ÑãÛÞ ÒÚÛîçÕÝÞ Ò æî ßàÞÓàÐÜÜã. "
"±ãÔì-ÛÐáÚÐ àÞ×ßÐÚãÙâÕ ÙÞÓÞ"
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr "²ÐàöÐÝâ èàØäâã ÒöÔáâãâÝöÙ ã äÐÙÛö ÔÒØÖÚÐ %s."
+
#: engines/toon/toon.cpp:222
#, c-format
msgid "Saved game in slot #%d "
@@ -4372,23 +4386,6 @@ msgstr "·ÑÕàÕÖÕÝã Óàã ð%d ×ÐÒÐÝâÐÖÕÝÞ"
msgid "Could not quick load the saved game #%d"
msgstr "½Õ ÒÔÐÛÞáï ×ÐÒÐÝâÐÖØâØ ×ÑÕàÕÖÕÝã Óàã ð%d"
-#: engines/toon/toon.cpp:4917
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr "à ÒÐá ÒöÔáâãÝöÙ äÐÙÛ 'toon.dat'. ²ö×ìÜöâì ÙÞÓÞ ÝÐ ÒÕÑ-áÐÙâö ScummVM"
-
-#: engines/toon/toon.cpp:4929
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr "ÄÐÙÛ 'toon.dat' ßÞèÚÞÔÖÕÝÞ. ·ÐÒÐÝâÐÖâÕ ÙÞÓÞ × ÒÕÑ-áÐÙâã ScummVM"
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-"ÄÐÙÛ 'toon.dat' ÜÐô ÝÕÒöàÝã ÒÕàáöî. ¾çöÚãÒÐÝÐ %d.%d, Ð ÞâàöÜÐÝÐ %d.%d. "
-"·ÐÒÐÝâÐÖâÕ ÙÞÓÞ á ÒÕÑ-áÐÙâã ScummVM"
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "¿ÞÚÐ×ÐâØ ÛöçØÛìÝØÚ ÚÐÔàöÒ"
@@ -4397,6 +4394,14 @@ msgstr "¿ÞÚÐ×ÐâØ ÛöçØÛìÝØÚ ÚÐÔàöÒ"
msgid "Show the current number of frames per second in the upper left corner"
msgstr "¿ÞÚÐ×ãô ã ÒÕàÝìÞÜã ÛöÒÞÜã Úãâö ßÞâÞçÝã ÚöÛìÚöáâì ÚÐÔàöÒ ÝÐ áÕÚãÝÔã"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr "±öÛöÝöÙÝÐ äöÛìâàÐæöï áßàÐÙâöÒ (ßÞÒöÛìÝÞ)"
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr "·ÐáâÞáãÒÐâØ ÑöÛöÝöÙÝã äöÛìâàÐæöî ÔÞ ÞÚàÕÜØå áßàÐÙâöÒ"
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr ""
@@ -4447,6 +4452,38 @@ msgstr ""
"ÒÕàáöî ÔÞ %d. ²ÐÜ ßÞâàöÑÝÐ ßÞÝÞÒÛÕÝÐ ÒÕàáöï ScummVM ÔÛï ×ÐÒÐÝâÐÖÕÝÝï æìÞÓÞ "
"äÐÙÛã."
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "½Õ ÒÔÐÛÞáï ×ÝÐÙâØ äÐÙÛ sky.cpt!\n"
+#~ "±ãÔì ÛÐáÚÐ, ×ÐÒÐÝâÐÖâÕ ÙÞÓÞ × www.scummvm.org"
+
+#~ 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"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "à ÒÐá ÒöÔáâãÝöÙ äÐÙÛ 'teenagent.dat'. ·ÐÒÐÝâÐÖâÕ ÙÞÓÞ × ÒÕÑ-áÐÙâã ScummVM"
+
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr "à ÒÐá ÒöÔáâãÝöÙ äÐÙÛ 'toon.dat'. ²ö×ìÜöâì ÙÞÓÞ ÝÐ ÒÕÑ-áÐÙâö ScummVM"
+
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr "ÄÐÙÛ 'toon.dat' ßÞèÚÞÔÖÕÝÞ. ·ÐÒÐÝâÐÖâÕ ÙÞÓÞ × ÒÕÑ-áÐÙâã ScummVM"
+
+#~ msgid ""
+#~ "File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it "
+#~ "from the ScummVM website"
+#~ msgstr ""
+#~ "ÄÐÙÛ 'toon.dat' ÜÐô ÝÕÒöàÝã ÒÕàáöî. ¾çöÚãÒÐÝÐ %d.%d, Ð ÞâàöÜÐÝÐ %d.%d. "
+#~ "·ÐÒÐÝâÐÖâÕ ÙÞÓÞ á ÒÕÑ-áÐÙâã ScummVM"
+
#~ msgid "Invalid save file name"
#~ msgstr "½ÕßàÐÒØÛìÝÐ ÝÐ×ÒÐ äÐÙÛã ×ÑÕàÕÖÕÝÝï áâÐÝã"
diff --git a/po/zh-Latn_CN.po b/po/zh-Latn_CN.po
index db8c2e622a..3f86255ba9 100644
--- a/po/zh-Latn_CN.po
+++ b/po/zh-Latn_CN.po
@@ -1,5 +1,5 @@
-# LANGUAGE translation for ScummVM.
-# Copyright (C) YEAR ScummVM Team
+# Chinese Pinyin (Mandarin) translation for ScummVM.
+# Copyright (C) 2016-2017 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Chenbo Li <lichenbo1949@gmail.com>, 2016.
#
@@ -7,15 +7,17 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.9.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n"
-"POT-Creation-Date: 2016-11-29 23:17+0100\n"
-"PO-Revision-Date: 2016-03-15 04:09-0700\n"
-"Last-Translator: Chenbo Li <lichenbo1949@gmail.com>\n"
-"Language-Team: Chenbo Li <lichenbo1949@gmail.com>\n"
-"Language: Chinese Pinyin (Mandarin)\n"
+"POT-Creation-Date: 2017-01-12 10:39+0100\n"
+"PO-Revision-Date: 2016-12-26 19:38+0000\n"
+"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
+"Language-Team: Chinese <https://translations.scummvm.org/projects/scummvm/"
+"scummvm/zh_LATN@cn/>\n"
+"Language: zh-Latn_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.8.7\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Weblate 2.9\n"
"X-Language-name: Chinese Pinyin (Mandarin)\n"
#: gui/about.cpp:94
@@ -25,11 +27,11 @@ msgstr "(Bianyiyu %s)"
#: gui/about.cpp:101
msgid "Features compiled in:"
-msgstr "Gongneng BianyiYu"
+msgstr "Gongneng BianyiYu:"
#: gui/about.cpp:110
msgid "Available engines:"
-msgstr "KeyongDeYinQing"
+msgstr "KeyongDeYinQing:"
#: gui/browser.cpp:68 gui/browser_osx.mm:104
msgid "Show hidden files"
@@ -158,13 +160,13 @@ msgstr ""
#: engines/groovie/script.cpp:407 engines/parallaction/saveload.cpp:271
#: engines/sci/graphics/controls32.cpp:824 engines/scumm/dialogs.cpp:189
#: engines/scumm/scumm.cpp:1882 engines/scumm/players/player_v3m.cpp:130
-#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
-#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
-#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
-#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
-#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
-#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
-#: engines/sword2/animation.cpp:471 engines/zvision/file/save_manager.cpp:224
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:141
+#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
+#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
+#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
+#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
+#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/zvision/file/save_manager.cpp:224
msgid "OK"
msgstr "Queding"
@@ -245,7 +247,7 @@ msgstr "Pingtai:"
#: gui/editgamedialog.cpp:161 gui/editgamedialog.cpp:163
#: gui/editgamedialog.cpp:164
msgid "Platform the game was originally designed for"
-msgstr "Youxi Chushi Yunxing de Pingtai:"
+msgstr "Youxi Chushi Yunxing de Pingtai"
#: gui/editgamedialog.cpp:163
msgctxt "lowres"
@@ -414,7 +416,7 @@ msgstr ""
#: gui/editgamedialog.cpp:534
msgid "This game ID is already taken. Please choose another one."
-msgstr "Ci Youxi ID Yi Bei Zhanyong. Qing Xuanze Qita Mingcheng"
+msgstr "Ci Youxi ID Yi Bei Zhanyong. Qing Xuanze Qita Mingcheng."
#: gui/editrecorddialog.cpp:58
msgid "Author:"
@@ -438,7 +440,7 @@ msgstr "Shuru Baocun de Wenjianming"
#: gui/filebrowser-dialog.cpp:132
msgid "Do you really want to overwrite the file?"
-msgstr "Nin Shifou Queding Fugai Ciwenjian"
+msgstr "Nin Shifou Queding Fugai Ciwenjian ?"
#: gui/fluidsynth-dialog.cpp:68
msgid "Reverb"
@@ -466,7 +468,7 @@ msgstr "Jibie:"
#: gui/fluidsynth-dialog.cpp:100
msgid "Chorus"
-msgstr "Hechang:"
+msgstr "Hechang"
#: gui/fluidsynth-dialog.cpp:104
msgid "N:"
@@ -522,7 +524,7 @@ msgstr "Chongzhi"
#: gui/fluidsynth-dialog.cpp:150
msgid "Reset all FluidSynth settings to their default values."
-msgstr "Chongzhi Suoyou de FluidSynth Shezhi"
+msgstr "Chongzhi Suoyou de FluidSynth Shezhi."
#: gui/fluidsynth-dialog.cpp:217
msgid ""
@@ -566,7 +568,6 @@ msgid "Associated key : %s"
msgstr "Guanlian Anjian : %s"
#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
-#, c-format
msgid "Associated key : none"
msgstr "Guanlian Anjian : Wu"
@@ -592,7 +593,7 @@ msgstr "Tuichu ScummVM"
#: gui/launcher.cpp:142
msgid "A~b~out..."
-msgstr "~b~Guanyu"
+msgstr "~b~Guanyu..."
#: gui/launcher.cpp:142 backends/platform/sdl/macosx/appmenu_osx.mm:80
msgid "About ScummVM"
@@ -600,7 +601,7 @@ msgstr "Guanyu ScummVM"
#: gui/launcher.cpp:143
msgid "~O~ptions..."
-msgstr "~O~Xuanxiang"
+msgstr "~O~Xuanxiang..."
#: gui/launcher.cpp:143
msgid "Change global ScummVM options"
@@ -616,7 +617,7 @@ msgstr "Kaishi Xuanze de Youxi"
#: gui/launcher.cpp:148
msgid "~L~oad..."
-msgstr "~L~Jiazai"
+msgstr "~L~Jiazai..."
#: gui/launcher.cpp:148
msgid "Load saved game for selected game"
@@ -659,7 +660,7 @@ msgstr "~E~Bianji Youxi ..."
#: gui/launcher.cpp:164
msgctxt "lowres"
msgid "~R~emove Game"
-msgstr "~R~Yichu Youxi ..."
+msgstr "~R~Yichu Youxi"
#: gui/launcher.cpp:172
msgid "Search in game list"
@@ -741,7 +742,7 @@ msgstr "Saomiao Wancheng!"
#: gui/massadd.cpp:262
#, c-format
msgid "Discovered %d new games, ignored %d previously added games."
-msgstr "Faxian le %d ge Xinyouxi, Hulue %d ge YiTianjia de Youxi"
+msgstr "Faxian le %d ge Xinyouxi, Hulue %d ge YiTianjia de Youxi."
#: gui/massadd.cpp:266
#, c-format
@@ -1045,7 +1046,7 @@ msgstr "Xianshi Zimu Bing Bofang Yuyin"
#: gui/options.cpp:1019
msgctxt "lowres"
msgid "Subtitle speed:"
-msgstr "Zimu Sudu"
+msgstr "Zimu Sudu:"
#: gui/options.cpp:1035
msgid "Music volume:"
@@ -1329,7 +1330,7 @@ msgstr "Fuwuqi:"
msgid "Stop local webserver"
msgstr ""
-#: gui/options.cpp:2163
+#: gui/options.cpp:2165
msgid ""
"Request failed.\n"
"Check your Internet connection."
@@ -1391,12 +1392,12 @@ msgstr "Binaji"
#: gui/recorderdialog.cpp:85 gui/recorderdialog.cpp:242
#: gui/recorderdialog.cpp:252
msgid "Author: "
-msgstr "Zuozhe:"
+msgstr "Zuozhe: "
#: gui/recorderdialog.cpp:86 gui/recorderdialog.cpp:243
#: gui/recorderdialog.cpp:253
msgid "Notes: "
-msgstr "Zhushi:"
+msgstr "Zhushi: "
#: gui/recorderdialog.cpp:154
msgid "Do you really want to delete this record?"
@@ -1445,7 +1446,7 @@ msgstr "Shijian: "
#: gui/saveload-dialog.cpp:564 gui/saveload-dialog.cpp:1074
msgid "Playtime: "
-msgstr "Bofang Shijian:"
+msgstr "Bofang Shijian: "
#: gui/saveload-dialog.cpp:577 gui/saveload-dialog.cpp:665
#, fuzzy
@@ -1470,12 +1471,12 @@ msgstr "Chuangjian Yige Xin Cundang"
#: gui/saveload-dialog.cpp:1053
msgid "Name: "
-msgstr "Mingcheng:"
+msgstr "Mingcheng: "
#: gui/saveload-dialog.cpp:1131
#, c-format
msgid "Enter a description for slot %d:"
-msgstr "Shuru dui %d Dangwei de Miaoshu"
+msgstr "Shuru dui %d Dangwei de Miaoshu:"
#: gui/storagewizarddialog.cpp:55
#, c-format
@@ -1791,7 +1792,7 @@ msgstr "~R~Fanhui Qidongqi"
#: engines/gnap/menu.cpp:464 engines/hugo/file.cpp:298
#: engines/mads/nebular/dialogs_nebular.cpp:350 engines/mohawk/dialogs.cpp:104
#: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1812,7 +1813,7 @@ msgstr "Baocun Youxi:"
#: engines/hugo/file.cpp:298 engines/mads/nebular/dialogs_nebular.cpp:350
#: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880
#: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:892 engines/sci/engine/kfile.cpp:1168
+#: engines/sci/engine/kfile.cpp:899 engines/sci/engine/kfile.cpp:1175
#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250
#: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291
#: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599
@@ -1862,11 +1863,11 @@ msgstr "Wufa Qiehuandao Shipin Moshi: '"
#: engines/engine.cpp:363
msgid "Could not apply aspect ratio setting."
-msgstr "Wufa Shezhi Bili Xuanxiang"
+msgstr "Wufa Shezhi Bili Xuanxiang."
#: engines/engine.cpp:368
msgid "Could not apply fullscreen setting."
-msgstr "Wufa Shezhi Quanping Xuanxiang"
+msgstr "Wufa Shezhi Quanping Xuanxiang."
#: engines/engine.cpp:373
#, fuzzy
@@ -2005,11 +2006,11 @@ msgstr "FM-Towns Yinpin"
msgid "PC-98 Audio"
msgstr "PC-98 Yinpin"
-#: audio/softsynth/mt32.cpp:197
+#: audio/softsynth/mt32.cpp:175
msgid "Initializing MT-32 Emulator"
msgstr "Chushihua MT-32 Moniqi"
-#: audio/softsynth/mt32.cpp:435
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "MT-32 Moniqi"
@@ -2147,7 +2148,7 @@ msgstr "Guan"
#: backends/events/webossdl/webossdl-events.cpp:315
msgid "Swipe two fingers to the right to toggle."
-msgstr "XiangYou Shiyong Liang Gen Shouzhi Huadong Qiehuan"
+msgstr "XiangYou Shiyong Liang Gen Shouzhi Huadong Qiehuan."
#. I18N: Auto-drag toggle status.
#: backends/events/webossdl/webossdl-events.cpp:335
@@ -2156,7 +2157,7 @@ msgstr "Muqian Wei Zidong Tuozhuai Moshi"
#: backends/events/webossdl/webossdl-events.cpp:342
msgid "Swipe three fingers to the right to toggle."
-msgstr "Xiangyou Huadong San Gen Shouzhi Qiehuan"
+msgstr "Xiangyou Huadong San Gen Shouzhi Qiehuan."
#: backends/graphics/opengl/opengl-graphics.cpp:146
msgid "OpenGL"
@@ -2284,11 +2285,11 @@ msgstr "Mingandu"
#: backends/platform/ds/arm9/source/dsoptions.cpp:99
msgid "Initial top screen scale:"
-msgstr "Chushi Shangping Daxiao"
+msgstr "Chushi Shangping Daxiao:"
#: backends/platform/ds/arm9/source/dsoptions.cpp:105
msgid "Main screen scaling:"
-msgstr "Zhu Pingmu Daxiao"
+msgstr "Zhu Pingmu Daxiao:"
#: backends/platform/ds/arm9/source/dsoptions.cpp:107
msgid "Hardware scale (fast, but low quality)"
@@ -2318,7 +2319,7 @@ msgstr "Jinyong Guanji"
#: backends/platform/ios7/ios7_osys_events.cpp:519
#: backends/platform/iphone/osys_events.cpp:300
msgid "Mouse-click-and-drag mode enabled."
-msgstr "QIdong Shubiao Dianji-tuozhuai Moshi"
+msgstr "QIdong Shubiao Dianji-tuozhuai Moshi."
#: backends/platform/ios7/ios7_osys_events.cpp:311
#: backends/platform/ios7/ios7_osys_events.cpp:521
@@ -2330,13 +2331,13 @@ msgstr "Jinyong Shubiao Dianji-Tuozhuai Moshi."
#: backends/platform/ios7/ios7_osys_events.cpp:540
#: backends/platform/iphone/osys_events.cpp:313
msgid "Touchpad mode enabled."
-msgstr "Qiyong Chumoban Moshi"
+msgstr "Qiyong Chumoban Moshi."
#: backends/platform/ios7/ios7_osys_events.cpp:324
#: backends/platform/ios7/ios7_osys_events.cpp:542
#: backends/platform/iphone/osys_events.cpp:315
msgid "Touchpad mode disabled."
-msgstr "Jinyong Chumoban Moshi"
+msgstr "Jinyong Chumoban Moshi."
#: backends/platform/maemo/maemo.cpp:208
msgid "Click Mode"
@@ -2499,11 +2500,11 @@ msgstr "Shuang Ji"
#: backends/platform/wii/options.cpp:60
msgid "Horizontal underscan:"
-msgstr "Shuiping Saomiao"
+msgstr "Shuiping Saomiao:"
#: backends/platform/wii/options.cpp:66
msgid "Vertical underscan:"
-msgstr "Chuizhi Saomiao"
+msgstr "Chuizhi Saomiao:"
#: backends/platform/wii/options.cpp:71
msgid "Input"
@@ -2511,11 +2512,11 @@ msgstr "Shuru"
#: backends/platform/wii/options.cpp:74
msgid "GC Pad sensitivity:"
-msgstr "GC Pan Mingandu"
+msgstr "GC Pan Mingandu:"
#: backends/platform/wii/options.cpp:80
msgid "GC Pad acceleration:"
-msgstr "GC Pad Jiasu"
+msgstr "GC Pad Jiasu:"
#: backends/platform/wii/options.cpp:86
msgid "DVD"
@@ -2671,7 +2672,7 @@ msgstr "Nin Xinagyao Zairu Huo Baocun Youxi Ma?"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
msgid " Are you sure you want to quit ? "
-msgstr "Nin Queding Tuichu ma ?"
+msgstr " Nin Queding Tuichu ma ? "
#: backends/platform/wince/CEActionsSmartphone.cpp:50
msgid "Keyboard"
@@ -2683,11 +2684,11 @@ msgstr "Xuanzhuan"
#: backends/platform/wince/CELauncherDialog.cpp:56
msgid "Using SDL driver "
-msgstr "Shiyong SDL Qudong"
+msgstr "Shiyong SDL Qudong "
#: backends/platform/wince/CELauncherDialog.cpp:60
msgid "Display "
-msgstr "Xianshi"
+msgstr "Xianshi "
#: backends/platform/wince/CELauncherDialog.cpp:83
msgid "Do you want to perform an automatic scan ?"
@@ -2728,6 +2729,33 @@ msgstr ""
msgid "Check for Updates..."
msgstr "Jiancha Gengxin..."
+#: engines/access/resources.cpp:44 engines/drascula/drascula.cpp:965
+#: engines/hugo/hugo.cpp:437 engines/lure/lure.cpp:64
+#: engines/mortevielle/mortevielle.cpp:306 engines/sky/compact.cpp:131
+#: engines/teenagent/resources.cpp:97 engines/tony/tony.cpp:198
+#: engines/toon/toon.cpp:4918
+#, c-format
+msgid "Unable to locate the '%s' engine data file."
+msgstr ""
+
+#: engines/access/resources.cpp:52 engines/drascula/drascula.cpp:979
+#: engines/hugo/hugo.cpp:448 engines/lure/lure.cpp:73
+#: engines/mortevielle/mortevielle.cpp:315 engines/tony/tony.cpp:210
+#: engines/toon/toon.cpp:4930
+#, c-format
+msgid "The '%s' engine data file is corrupt."
+msgstr ""
+
+#: engines/access/resources.cpp:61 engines/drascula/drascula.cpp:990
+#: engines/hugo/hugo.cpp:458 engines/lure/lure.cpp:76
+#: engines/mortevielle/mortevielle.cpp:326 engines/tony/tony.cpp:221
+#: engines/toon/toon.cpp:4941
+#, c-format
+msgid ""
+"Incorrect version of the '%s' engine data file found. Expected %d.%d but got "
+"%d.%d."
+msgstr ""
+
#: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55
#, fuzzy
msgid "Color mode"
@@ -2770,7 +2798,7 @@ msgstr "Shiyong Qita Mianban"
msgid ""
"Use an alternative palette, common for all Amiga games. This was the old "
"behavior"
-msgstr "Shiyong QIta Mianban, Yiban Yonghu suoyou de Amiga Youxi. "
+msgstr "Shiyong QIta Mianban, Yiban Yonghu suoyou de Amiga Youxi"
#: engines/agi/detection.cpp:167
msgid "Mouse support"
@@ -2781,7 +2809,7 @@ msgid ""
"Enables mouse support. Allows to use mouse for movement and in game menus."
msgstr ""
"Qiyong shubiao zhichi. Yunxu Shiyong Shubiao jinxing Yidong He Youxi Nei "
-"Caidan"
+"Caidan."
#: engines/agi/detection.cpp:177
#, fuzzy
@@ -2808,8 +2836,8 @@ msgstr ""
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore game:"
@@ -2821,8 +2849,8 @@ msgstr "Huifu Youxi:"
#: engines/dm/loadsave.cpp:184 engines/drascula/saveload.cpp:377
#: engines/dreamweb/saveload.cpp:170 engines/gnap/menu.cpp:473
#: engines/hugo/file.cpp:400 engines/mads/nebular/dialogs_nebular.cpp:377
-#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1011
-#: engines/sci/engine/kfile.cpp:1240 engines/sherlock/scalpel/scalpel.cpp:1263
+#: engines/neverhood/menumodule.cpp:893 engines/sci/engine/kfile.cpp:1018
+#: engines/sci/engine/kfile.cpp:1247 engines/sherlock/scalpel/scalpel.cpp:1263
#: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266
#: engines/toon/toon.cpp:3432 engines/zvision/file/save_manager.cpp:62
msgid "Restore"
@@ -2915,7 +2943,7 @@ msgstr "Wufa Baocun Cundang "
#: engines/gob/inter_v5.cpp:107
msgid "Failed to delete file."
-msgstr "Wufa Shanchu Wenjian"
+msgstr "Wufa Shanchu Wenjian."
#: engines/groovie/detection.cpp:312
msgid "Fast movie speed"
@@ -3465,7 +3493,7 @@ msgstr ""
#: engines/scumm/dialogs.cpp:172
#, c-format
msgid "Insert Disk %c and Press Button to Continue."
-msgstr "Charu Guangpan %c Bing An Anniu YI jixu"
+msgstr "Charu Guangpan %c Bing An Anniu YI jixu."
#: engines/scumm/dialogs.cpp:173
#, c-format
@@ -3564,7 +3592,7 @@ msgstr "Yuyin He Zimu"
#: engines/scumm/dialogs.cpp:654
msgid "Select a Proficiency Level."
-msgstr "Qing Xuanze Shulian Dengji"
+msgstr "Qing Xuanze Shulian Dengji."
#: engines/scumm/dialogs.cpp:656
msgid "Refer to your Loom(TM) manual for help."
@@ -3700,15 +3728,15 @@ msgstr "* Zhuyi Ctrl-f He"
#: engines/scumm/help.cpp:109
msgid " ctrl-g are not recommended"
-msgstr " Ctrl-g BIngbu zhichi"
+msgstr " Ctrl-g BIngbu zhichi"
#: engines/scumm/help.cpp:110
msgid " since they may cause crashes"
-msgstr " Yinwei Keneng zaocheng cuowu"
+msgstr " Yinwei Keneng zaocheng cuowu"
#: engines/scumm/help.cpp:111
msgid " or incorrect game behavior."
-msgstr " Huo Buzhengque de Youxi xingwei"
+msgstr " Huo Buzhengque de Youxi xingwei."
#: engines/scumm/help.cpp:115
msgid "Spinning drafts on the keyboard:"
@@ -3990,7 +4018,7 @@ msgstr "Zhongyou Wupin"
#: engines/scumm/help.cpp:280 engines/scumm/help.cpp:285
msgid "Switching characters:"
-msgstr "Qiehuan Juese"
+msgstr "Qiehuan Juese:"
#: engines/scumm/help.cpp:282
msgid "Second kid"
@@ -4014,11 +4042,11 @@ msgstr "* Jianpan Zhandou zongshi Kaiqi,"
#: engines/scumm/help.cpp:296
msgid " so despite the in-game message this"
-msgstr " Suoyi Hulue youxi nei xinxi"
+msgstr " Suoyi Hulue youxi nei xinxi"
#: engines/scumm/help.cpp:297
msgid " actually toggles Mouse Fighting Off/On"
-msgstr " Zhe shiji shang shi Zai qiehuan Shubiao Zhandou de Kaiguan"
+msgstr " Zhe shiji shang shi Zai qiehuan Shubiao Zhandou de Kaiguan"
#: engines/scumm/help.cpp:304
msgid "Fighting controls (numpad):"
@@ -4059,7 +4087,7 @@ msgstr "Sucker Punch"
#: engines/scumm/help.cpp:318
msgid "These are for Indy on left."
-msgstr "Weile zai Zuobian de Indy"
+msgstr "Weile zai Zuobian de Indy."
#: engines/scumm/help.cpp:319
msgid "When Indy is on the right,"
@@ -4123,11 +4151,11 @@ msgstr "Snap Gundong Guan"
#: engines/scumm/input.cpp:593
msgid "Music volume: "
-msgstr "Yinyue Yinliang:"
+msgstr "Yinyue Yinliang: "
#: engines/scumm/input.cpp:610
msgid "Subtitle speed: "
-msgstr "Zimu Sudu:"
+msgstr "Zimu Sudu: "
#: engines/scumm/scumm.cpp:1880
#, c-format
@@ -4206,21 +4234,9 @@ msgstr "Touming Chuangkou"
msgid "Show windows with a partially transparent background"
msgstr "Xianshi Diayou Bantouming Beijing de Chuangkou"
-#: engines/sky/compact.cpp:130
-msgid ""
-"Unable to find \"sky.cpt\" file!\n"
-"Please download it from www.scummvm.org"
-msgstr ""
-"Wufa Zhaodao \"sky.cpt\" Wenjian\n"
-"Qing Cong www.cummvm.org Xiazai"
-
#: engines/sky/compact.cpp:141
-msgid ""
-"The \"sky.cpt\" file has an incorrect size.\n"
-"Please (re)download it from www.scummvm.org"
+msgid "The \"sky.cpt\" engine data file has an incorrect size."
msgstr ""
-"Wenjian \"sky.cpt\" Chicun Cuowu.\n"
-"Qing Cong www.scummvm.org Chongxin Xiazai"
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -4310,19 +4326,18 @@ msgid ""
"Use English speech instead of German for every language other than German"
msgstr ""
-#: engines/teenagent/resources.cpp:96
-msgid ""
-"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
-"Zhaobudao 'teenagent.dat' Wenjian. Cong ScummVM wangzhan Shangmian Dedao"
-
-#: engines/teenagent/resources.cpp:117
+#: engines/teenagent/resources.cpp:118
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
"teenagent.dat Wenjian Yibeiyasuo Bingqie zlib Bingmeiyou Zai chengxu Zhong. "
-"Qing jieya."
+"Qing jieya"
+
+#: engines/tony/tony.cpp:258
+#, c-format
+msgid "Font variant not present in '%s' engine data file."
+msgstr ""
#: engines/toon/toon.cpp:222
#, fuzzy, c-format
@@ -4348,25 +4363,6 @@ msgstr ""
msgid "Could not quick load the saved game #%d"
msgstr "Nin Yao Zairu Baocun de Youxi ma?"
-#: engines/toon/toon.cpp:4917
-#, fuzzy
-msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
-msgstr ""
-"Zhaobudao 'teenagent.dat' Wenjian. Cong ScummVM wangzhan Shangmian Dedao"
-
-#: engines/toon/toon.cpp:4929
-#, fuzzy
-msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
-msgstr ""
-"Zhaobudao 'teenagent.dat' Wenjian. Cong ScummVM wangzhan Shangmian Dedao"
-
-#: engines/toon/toon.cpp:4939
-#, c-format
-msgid ""
-"File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from "
-"the ScummVM website"
-msgstr ""
-
#: engines/wintermute/detection.cpp:58
msgid "Show FPS-counter"
msgstr "Xianshi FPS Jishuqi"
@@ -4375,6 +4371,14 @@ msgstr "Xianshi FPS Jishuqi"
msgid "Show the current number of frames per second in the upper left corner"
msgstr "Zai Zuoshangjiao Xianshi Xianzai Meimiaozhong Zhenshu"
+#: engines/wintermute/detection.cpp:68
+msgid "Sprite bilinear filtering (SLOW)"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:69
+msgid "Apply bilinear filtering to individual sprites"
+msgstr ""
+
#: engines/zvision/detection_tables.h:52
msgid "Use the original save/load screens instead of the ScummVM interface"
msgstr "Shiyong Yuanshi baocun/zairu Pingmu Erfei ScummVM jiemian"
@@ -4419,6 +4423,35 @@ msgid ""
"%d. You will need an updated version of the engine to use this saved game."
msgstr ""
+#~ msgid ""
+#~ "Unable to find \"sky.cpt\" file!\n"
+#~ "Please download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Wufa Zhaodao \"sky.cpt\" Wenjian\n"
+#~ "Qing Cong www.cummvm.org Xiazai"
+
+#~ msgid ""
+#~ "The \"sky.cpt\" file has an incorrect size.\n"
+#~ "Please (re)download it from www.scummvm.org"
+#~ msgstr ""
+#~ "Wenjian \"sky.cpt\" Chicun Cuowu.\n"
+#~ "Qing Cong www.scummvm.org Chongxin Xiazai"
+
+#~ msgid ""
+#~ "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Zhaobudao 'teenagent.dat' Wenjian. Cong ScummVM wangzhan Shangmian Dedao"
+
+#, fuzzy
+#~ msgid "You're missing the 'toon.dat' file. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Zhaobudao 'teenagent.dat' Wenjian. Cong ScummVM wangzhan Shangmian Dedao"
+
+#, fuzzy
+#~ msgid "File 'toon.dat' is corrupt. Get it from the ScummVM website"
+#~ msgstr ""
+#~ "Zhaobudao 'teenagent.dat' Wenjian. Cong ScummVM wangzhan Shangmian Dedao"
+
#~ msgid "Invalid save file name"
#~ msgstr "Wuxiao Baocun Wenjianming"
diff --git a/test/common/span.h b/test/common/span.h
new file mode 100644
index 0000000000..d73a2e2266
--- /dev/null
+++ b/test/common/span.h
@@ -0,0 +1,789 @@
+#include <cxxtest/TestSuite.h>
+
+class SpanTestSuite;
+
+#include "common/span.h"
+#include "common/str.h"
+
+class SpanTestSuite : public CxxTest::TestSuite {
+ struct Foo {
+ int a;
+ };
+
+ template <typename ValueType, template <typename> class Derived>
+ class SiblingSpanImpl : public Common::SpanImpl<ValueType, Derived> {
+ typedef Common::SpanImpl<ValueType, Derived> super_type;
+ public:
+ COMMON_SPAN_TYPEDEFS
+ SiblingSpanImpl() : super_type() {}
+ SiblingSpanImpl(pointer data_, size_type size_) : super_type(data_, size_) {}
+ };
+
+ template <typename ValueType>
+ class SiblingSpan : public SiblingSpanImpl<ValueType, SiblingSpan> {
+ typedef SiblingSpanImpl<ValueType, ::SpanTestSuite::SiblingSpan> super_type;
+ public:
+ COMMON_SPAN_TYPEDEFS
+ SiblingSpan() : super_type() {}
+ SiblingSpan(pointer data_, size_type size_) : super_type(data_, size_) {}
+ };
+
+ template <typename ValueType, template <typename> class Derived>
+ class SubSpanImpl : public Common::NamedSpanImpl<ValueType, Derived> {
+ typedef Common::NamedSpanImpl<ValueType, Derived> super_type;
+ public:
+ COMMON_SPAN_TYPEDEFS
+ SubSpanImpl() : super_type() {}
+ SubSpanImpl(pointer data_,
+ size_type size_,
+ const Common::String &name_ = Common::String(),
+ const size_type sourceByteOffset_ = 0) :
+ super_type(data_, size_, name_, sourceByteOffset_) {}
+
+ template <typename Other>
+ SubSpanImpl(const Other &other) : super_type(other) {}
+ };
+
+ template <typename ValueType>
+ class SubSpan : public SubSpanImpl<ValueType, SubSpan> {
+ typedef SubSpanImpl<ValueType, ::SpanTestSuite::SubSpan> super_type;
+ public:
+ COMMON_SPAN_TYPEDEFS
+ SubSpan() : super_type() {}
+ SubSpan(pointer data_,
+ size_type size_,
+ const Common::String &name_ = Common::String(),
+ const size_type sourceByteOffset_ = 0) :
+ super_type(data_, size_, name_, sourceByteOffset_) {}
+
+ template <typename Other>
+ SubSpan(const Other &other) : super_type(other) {}
+ };
+
+public:
+ void test_sibling_span() {
+ byte data[] = { 'h', 'e', 'l', 'l', 'o' };
+ SiblingSpan<byte> ss(data, sizeof(data));
+ Common::Span<byte> superInstance = ss;
+ TS_ASSERT_EQUALS(ss.data(), data);
+ TS_ASSERT_EQUALS(superInstance.data(), data);
+ }
+
+ void test_sub_span() {
+ byte data[] = { 'h', 'e', 'l', 'l', 'o' };
+ SubSpan<byte> ss(data, sizeof(data), "custom subspan");
+ Common::NamedSpan<byte> namedSuper = ss;
+ Common::Span<byte> unnamedSuper = ss;
+ TS_ASSERT(ss.name() == "custom subspan");
+ TS_ASSERT(namedSuper.name() == ss.name());
+ TS_ASSERT(unnamedSuper.name() == Common::String::format("%p", (void *)data));
+ }
+
+ void test_span_iterator_const() {
+ byte data[] = { 'h', 'e', 'l', 'l', 'o' };
+ const Common::Span<byte> span(data, sizeof(data));
+
+ Common::Span<byte>::const_iterator it = span.cbegin();
+
+ Common::Span<byte>::const_iterator sameIt(it);
+
+ TS_ASSERT_EQUALS(sameIt, it);
+
+ uint i;
+ for (i = 0; it != span.cend(); ++i, ++it) {
+ TS_ASSERT_EQUALS(*it, data[i]);
+ TS_ASSERT_LESS_THAN(i, sizeof(data));
+ }
+ TS_ASSERT_EQUALS(i, sizeof(data));
+
+ it = span.cend() - 1;
+ for (i = sizeof(data) - 1; it != span.cbegin(); --i, --it) {
+ TS_ASSERT_EQUALS(data[i], *it);
+ }
+ TS_ASSERT_EQUALS(i, 0U);
+
+ it = span.cbegin();
+
+ it += 4;
+ TS_ASSERT_EQUALS(data[4], *it);
+
+ it -= 4;
+ TS_ASSERT_EQUALS(data[0], *it);
+
+ TS_ASSERT_EQUALS(data[0], *it++);
+
+ TS_ASSERT_EQUALS(data[1], *it--);
+
+ TS_ASSERT_EQUALS(span.cend() - span.cbegin(), 5);
+
+ TS_ASSERT_EQUALS(*(span.cbegin() + 4), data[4]);
+
+ TS_ASSERT_EQUALS(*(span.cend() - 4), data[1]);
+
+ TS_ASSERT(span.cbegin() < span.cend());
+
+ TS_ASSERT(span.cbegin() <= span.cend());
+ TS_ASSERT(span.cbegin() <= span.cbegin());
+
+ TS_ASSERT(span.cend() > span.cbegin());
+
+ TS_ASSERT(span.cend() >= span.cbegin());
+ TS_ASSERT(span.cend() >= span.cend());
+ }
+
+ void test_span_iterator() {
+ byte data[] = { 'h', 'e', 'l', 'l', 'o' };
+ Common::Span<byte> span(data, sizeof(data));
+
+ // empty iterator should default construct OK
+ Common::Span<byte>::iterator defaultIt;
+
+ Common::Span<byte>::iterator it = span.begin();
+
+ Common::Span<byte>::iterator sameIt(it);
+
+ TS_ASSERT_EQUALS(sameIt, it);
+
+ uint i;
+ for (i = 0; it != span.end(); ++i, ++it) {
+ TS_ASSERT_EQUALS(*it, data[i]);
+ TS_ASSERT_LESS_THAN(i, sizeof(data));
+ }
+ TS_ASSERT_EQUALS(i, sizeof(data));
+
+ it = span.end() - 1;
+ for (i = sizeof(data) - 1; it != span.begin(); --i, --it) {
+ TS_ASSERT_EQUALS(data[i], *it);
+ }
+ TS_ASSERT_EQUALS(i, 0U);
+
+ it = span.begin();
+
+ it += 4;
+ TS_ASSERT_EQUALS(data[4], *it);
+
+ it -= 4;
+ TS_ASSERT_EQUALS(data[0], *it);
+
+ TS_ASSERT_EQUALS(data[0], *it++);
+
+ TS_ASSERT_EQUALS(data[1], *it--);
+
+ TS_ASSERT_EQUALS(span.end() - span.begin(), 5);
+
+ TS_ASSERT_EQUALS(*(span.begin() + 4), data[4]);
+
+ TS_ASSERT_EQUALS(*(span.end() - 4), data[1]);
+
+ TS_ASSERT(span.begin() < span.end());
+
+ TS_ASSERT(span.begin() <= span.end());
+ TS_ASSERT(span.begin() <= span.begin());
+
+ TS_ASSERT(span.end() > span.begin());
+
+ TS_ASSERT(span.end() >= span.begin());
+ TS_ASSERT(span.end() >= span.end());
+
+ it = span.begin();
+ for (i = 0; it != span.end(); ++i, ++it) {
+ *it = 'a' + i;
+ }
+
+ it = span.begin();
+ for (i = 0; it != span.end(); ++i, ++it) {
+ TS_ASSERT_EQUALS(*it, 'a' + i);
+ TS_ASSERT_EQUALS(data[i], 'a' + i);
+ }
+ }
+
+ void test_span_iterator_integers() {
+ const byte data[] = { 0xFF, 1, 2, 3, 2, 1, 0xFF };
+ Common::Span<const byte> span(data, sizeof(data));
+ Common::Span<const byte>::const_iterator it = span.cbegin();
+
+ TS_ASSERT_EQUALS(it.getInt8(), -1);
+ TS_ASSERT_EQUALS(it.getUint8(), 255);
+ TS_ASSERT_EQUALS(it.getInt16BE(), -255);
+ TS_ASSERT_EQUALS(it.getUint16BE(), 65281U);
+ TS_ASSERT_EQUALS((it + 5).getInt16LE(), -255);
+ TS_ASSERT_EQUALS((it + 5).getUint16LE(), 65281U);
+ TS_ASSERT_EQUALS(it.getUint24LE(), 131583U);
+#ifdef SCUMM_LITTLE_ENDIAN
+ TS_ASSERT_EQUALS((it + 3).getUint32(), 4278256131U);
+#elif SCUMM_BIG_ENDIAN
+ TS_ASSERT_EQUALS(it.getUint32(), 4278256131U);
+#else
+#error No endianness detected
+#endif
+ TS_ASSERT_EQUALS(it.getInt32BE(), -16711165);
+ TS_ASSERT_EQUALS(it.getUint32BE(), 4278256131U);
+ TS_ASSERT_EQUALS((it + 3).getInt32LE(), -16711165);
+ TS_ASSERT_EQUALS((it + 3).getUint32LE(), 4278256131U);
+ }
+
+ void test_span_iterator_ptr() {
+ Foo foo[2];
+ foo[0].a = 1;
+ foo[1].a = 2;
+
+ const Common::Span<Foo> span(foo, 2);
+ Common::Span<Foo>::const_iterator it = span.cbegin();
+ TS_ASSERT_EQUALS(it->a, 1);
+ ++it;
+ TS_ASSERT_EQUALS(it->a, 2);
+
+ TS_ASSERT_EQUALS(it[0].a, 2);
+ TS_ASSERT_EQUALS(it[-1].a, 1);
+ --it;
+ TS_ASSERT_EQUALS(it[1].a, 2);
+ }
+
+ void test_span_owner() {
+ Common::SpanOwner<Common::Span<byte> > owner;
+ owner->allocate(3);
+ owner[0] = 'a';
+ owner[1] = 'b';
+ owner[2] = 'c';
+ for (int i = 0; i < 3; ++i) {
+ TS_ASSERT_EQUALS(owner->getUint8At(i), 'a' + i);
+ TS_ASSERT_EQUALS((*owner)[i], 'a' + i);
+ }
+
+ {
+ Common::SpanOwner<Common::NamedSpan<byte> > owner2;
+ TS_ASSERT(owner2->data() == nullptr);
+ owner2->allocateFromSpan(*owner);
+ TS_ASSERT(owner2->data() != nullptr);
+ TS_ASSERT_DIFFERS(owner->data(), owner2->data());
+
+ for (int i = 0; i < 3; ++i) {
+ TS_ASSERT_EQUALS(owner2->getUint8At(i), 'a' + i);
+ TS_ASSERT_EQUALS((*owner2)[i], 'a' + i);
+ }
+
+ TS_ASSERT_EQUALS((bool)owner2, true);
+ owner2.release();
+ TS_ASSERT_EQUALS((bool)owner2, false);
+ }
+
+ {
+ Common::SpanOwner<Common::Span<byte> > owner2;
+ TS_ASSERT_EQUALS((bool)owner, true);
+ void *dataPtr = owner->data();
+ owner2 = owner;
+ TS_ASSERT_EQUALS((bool)owner, false);
+ TS_ASSERT(owner->data() == nullptr);
+ TS_ASSERT_EQUALS(owner2->data(), dataPtr);
+
+ // tests destruction of held pointer by reassignment
+ owner2 = owner;
+
+ // tests nullipotence of assignment to self
+ dataPtr = owner2->data();
+ owner2 = owner2;
+ TS_ASSERT(owner2->data() == dataPtr);
+ }
+
+ {
+ char *data = new char[6];
+ Common::strlcpy(data, "hello", 6);
+ const Common::SpanOwner<Common::Span<const char> > constOwner(Common::Span<const char>(data, 6));
+ TS_ASSERT_EQUALS((*constOwner)[0], 'h');
+ TS_ASSERT_EQUALS(constOwner->getUint8At(1), 'e');
+ TS_ASSERT_EQUALS(constOwner[2], 'l');
+ }
+
+ {
+ TS_ASSERT_EQUALS((bool)owner, false);
+ Common::SpanOwner<Common::Span<byte> > owner2(owner);
+ TS_ASSERT_EQUALS((bool)owner2, false);
+ }
+
+ {
+ owner->allocate(1);
+ TS_ASSERT_EQUALS((bool)owner, true);
+ Common::SpanOwner<Common::Span<byte> > owner2(owner);
+ TS_ASSERT_EQUALS((bool)owner2, true);
+ TS_ASSERT_DIFFERS(owner->data(), owner2->data());
+ }
+
+ {
+ TS_ASSERT_EQUALS((bool)owner, true);
+ void *dataPtr = owner->data();
+ TS_ASSERT_EQUALS(owner.release(), dataPtr);
+ TS_ASSERT_EQUALS((bool)owner, false);
+ }
+ }
+
+ void test_span_owner_named_span() {
+ Common::SpanOwner<Common::NamedSpan<byte> > owner;
+ owner->allocate(3, "foo");
+ owner[0] = 'a';
+ owner[1] = 'b';
+ owner[2] = 'c';
+ for (int i = 0; i < 3; ++i) {
+ TS_ASSERT_EQUALS(owner->getUint8At(i), 'a' + i);
+ TS_ASSERT_EQUALS((*owner)[i], 'a' + i);
+ }
+ TS_ASSERT(owner->name() == "foo");
+
+ {
+ Common::SpanOwner<Common::NamedSpan<byte> > owner2;
+ TS_ASSERT(owner2->data() == nullptr);
+ owner2->allocateFromSpan(*owner);
+ TS_ASSERT(owner2->data() != nullptr);
+ TS_ASSERT_DIFFERS(owner->data(), owner2->data());
+ TS_ASSERT(owner2->name() == "foo");
+
+ for (int i = 0; i < 3; ++i) {
+ TS_ASSERT_EQUALS(owner2->getUint8At(i), 'a' + i);
+ TS_ASSERT_EQUALS((*owner2)[i], 'a' + i);
+ }
+
+ TS_ASSERT_EQUALS((bool)owner2, true);
+ owner2.release();
+ TS_ASSERT_EQUALS((bool)owner2, false);
+ }
+
+ {
+ Common::SpanOwner<Common::NamedSpan<byte> > owner2;
+ TS_ASSERT_EQUALS((bool)owner, true);
+ void *dataPtr = owner->data();
+ owner2 = owner;
+ TS_ASSERT_EQUALS((bool)owner, false);
+ TS_ASSERT(owner->data() == nullptr);
+ TS_ASSERT_EQUALS(owner2->data(), dataPtr);
+
+ // tests destruction of held pointer by reassignment
+ owner2 = owner;
+ }
+
+ {
+ char *data = new char[6];
+ Common::strlcpy(data, "hello", 6);
+ const Common::SpanOwner<Common::NamedSpan<const char> > constOwner(Common::NamedSpan<const char>(data, 6));
+ TS_ASSERT_EQUALS((*constOwner)[0], 'h');
+ TS_ASSERT_EQUALS(constOwner->getUint8At(1), 'e');
+ TS_ASSERT_EQUALS(constOwner[2], 'l');
+ }
+
+ {
+ TS_ASSERT_EQUALS((bool)owner, false);
+ Common::SpanOwner<Common::NamedSpan<byte> > owner2(owner);
+ TS_ASSERT_EQUALS((bool)owner2, false);
+ }
+
+ {
+ owner->allocate(1);
+ TS_ASSERT_EQUALS((bool)owner, true);
+ Common::SpanOwner<Common::NamedSpan<byte> > owner2(owner);
+ TS_ASSERT_EQUALS((bool)owner2, true);
+ TS_ASSERT_DIFFERS(owner->data(), owner2->data());
+ }
+
+ {
+ TS_ASSERT_EQUALS((bool)owner, true);
+ void *dataPtr = owner->data();
+ TS_ASSERT_EQUALS(owner.release(), dataPtr);
+ TS_ASSERT_EQUALS((bool)owner, false);
+ }
+ }
+
+ void test_span_allocate_from_stream() {
+ byte data[] = "hello";
+ Common::MemoryReadStream stream(data, sizeof(data));
+ Common::SpanOwner<Common::Span<byte> > owner;
+ owner->allocateFromStream(stream, 2);
+ TS_ASSERT(owner->data() != data);
+ TS_ASSERT_EQUALS(owner->size(), 2U);
+ TS_ASSERT_EQUALS(owner[0], 'h');
+ TS_ASSERT_EQUALS(owner[1], 'e');
+ owner.clear();
+ TS_ASSERT(owner->data() == nullptr);
+ stream.seek(0, SEEK_SET);
+
+ owner->allocateFromStream(stream);
+ TS_ASSERT(owner->data() != data);
+ TS_ASSERT_EQUALS(owner->size(), sizeof(data));
+ TS_ASSERT_EQUALS(owner[0], 'h');
+ TS_ASSERT_EQUALS(owner[1], 'e');
+ TS_ASSERT_EQUALS(owner[2], 'l');
+ TS_ASSERT_EQUALS(owner[3], 'l');
+ TS_ASSERT_EQUALS(owner[4], 'o');
+
+ Common::SpanOwner<Common::NamedSpan<const byte> > owner2;
+ stream.seek(0, SEEK_SET);
+ owner2->allocateFromStream(stream, Common::kSpanMaxSize, "streamname");
+ TS_ASSERT(owner2->data() != data);
+ TS_ASSERT_EQUALS(owner2->size(), sizeof(data));
+ TS_ASSERT_EQUALS(owner2[0], 'h');
+ TS_ASSERT_EQUALS(owner2[1], 'e');
+ TS_ASSERT_EQUALS(owner2[2], 'l');
+ TS_ASSERT_EQUALS(owner2[3], 'l');
+ TS_ASSERT_EQUALS(owner2[4], 'o');
+ TS_ASSERT_EQUALS(owner2->name(), "streamname");
+ }
+
+ void test_span_byte() {
+ {
+ byte data[] = { 'h', 'e', 'l', 'l', 'o' };
+ Common::Span<byte> span(data, sizeof(data));
+
+ TS_ASSERT_EQUALS(span.size(), sizeof(data));
+ TS_ASSERT_EQUALS(span.byteSize(), sizeof(data));
+
+ Common::Span<byte> other(span);
+ TS_ASSERT_EQUALS(span, other);
+ other.clear();
+ TS_ASSERT(span != other);
+
+ TS_ASSERT_EQUALS(span[0], 'h');
+ TS_ASSERT_EQUALS(span[1], 'e');
+ span[1] = 'o';
+ TS_ASSERT_EQUALS(span[1], 'o');
+
+ TS_ASSERT((bool)span);
+ span.clear();
+ TS_ASSERT(!(bool)span);
+ }
+
+ {
+ byte data[] = { 'h', 'e', 'l', 'l', 'o' };
+ const Common::Span<const byte> span(data, sizeof(data));
+
+ TS_ASSERT_EQUALS(span.size(), sizeof(data));
+ TS_ASSERT_EQUALS(span.byteSize(), sizeof(data));
+
+ const Common::Span<const byte> other(span);
+ TS_ASSERT_EQUALS(span, other);
+
+ TS_ASSERT_EQUALS(span[0], 'h');
+ TS_ASSERT_EQUALS(span[1], 'e');
+ }
+ }
+
+ void test_span_integers() {
+ const byte data[] = { 0xFF, 1, 2, 3, 2, 1, 0xFF };
+ Common::Span<const byte> span(data, sizeof(data));
+
+ TS_ASSERT_EQUALS(span[0], 255);
+ TS_ASSERT_EQUALS(span.getInt8At(0), -1);
+ TS_ASSERT_EQUALS(span.getUint8At(0), 255U);
+ TS_ASSERT_EQUALS(span.getInt16BEAt(0), -255);
+ TS_ASSERT_EQUALS(span.getUint16BEAt(0), 65281U);
+ TS_ASSERT_EQUALS(span.getInt16LEAt(5), -255);
+ TS_ASSERT_EQUALS(span.getUint16LEAt(5), 65281U);
+ TS_ASSERT_EQUALS(span.getUint24LEAt(0), 131583U);
+ TS_ASSERT_EQUALS(span.getInt32BEAt(0), -16711165);
+ TS_ASSERT_EQUALS(span.getUint32BEAt(0), 4278256131U);
+ TS_ASSERT_EQUALS(span.getInt32LEAt(3), -16711165);
+ TS_ASSERT_EQUALS(span.getUint32LEAt(3), 4278256131U);
+
+#ifdef SCUMM_LITTLE_ENDIAN
+ TS_ASSERT_EQUALS(span.getUint32At(3), 4278256131U);
+#elif SCUMM_BIG_ENDIAN
+ TS_ASSERT_EQUALS(span.getUint32At(0), 4278256131U);
+#else
+#error No endianness detected
+#endif
+ }
+
+ void test_span_string() {
+ char data[] = "hello";
+ Common::Span<char> span(data, sizeof(data));
+ TS_ASSERT_EQUALS(span[sizeof(data) - 1], '\0');
+
+ TS_ASSERT(span.getStringAt(0) == data);
+ TS_ASSERT(span.getStringAt(0, 2) == "he");
+ span[3] = '\0';
+ TS_ASSERT(span.getStringAt(0) == "hel");
+ }
+
+ void test_span_unsafe_data() {
+ char data[] = "hello";
+ Common::Span<char> span(data, sizeof(data));
+
+ char *ptr = span.getUnsafeDataAt(0, 6);
+ TS_ASSERT_EQUALS(ptr, data);
+ ptr = span.getUnsafeDataAt(0);
+ TS_ASSERT_EQUALS(ptr, data);
+
+ const Common::Span<const char> span2(data, sizeof(data));
+ const char *ptr2 = span2.getUnsafeDataAt(0, 6);
+ TS_ASSERT_EQUALS(ptr2, data);
+ ptr2 = span2.getUnsafeDataAt(0);
+ TS_ASSERT_EQUALS(ptr2, data);
+ }
+
+ void test_span_subspan() {
+ {
+ byte data[] = { 1, 2, 3, 4, 5, 6 };
+ Common::Span<byte> span(data, sizeof(data));
+
+ TS_ASSERT_EQUALS(span.subspan(0).size(), sizeof(data) - 0);
+ TS_ASSERT_EQUALS(span.subspan(2).size(), sizeof(data) - 2);
+ TS_ASSERT_EQUALS(span.subspan(2, 2).size(), 2U);
+ TS_ASSERT_EQUALS(span.subspan<uint16>(0).size(), sizeof(data) / 2);
+ TS_ASSERT_EQUALS(span.subspan<uint16>(0).byteSize(), sizeof(data));
+ TS_ASSERT_EQUALS(span.subspan<uint16>(0, 2).size(), 1U);
+ TS_ASSERT_EQUALS(span.subspan<uint16>(0, 2).byteSize(), 2U);
+
+#ifdef SCUMM_LITTLE_ENDIAN
+ TS_ASSERT_EQUALS(span.subspan<uint16>(0)[1], 4 << 8 | 3);
+#elif SCUMM_BIG_ENDIAN
+ TS_ASSERT_EQUALS(span.subspan<uint16>(0)[1], 3 << 8 | 4);
+#else
+#error No endianness detected
+#endif
+
+ Common::Span<uint16> shortSpan = span.subspan<uint16>(0);
+ TS_ASSERT_EQUALS(shortSpan.byteSize(), span.byteSize());
+ TS_ASSERT(shortSpan.size() != span.size());
+ shortSpan[1] = 0xFFFF;
+ Common::Span<byte> byteSpan = shortSpan.subspan<byte>(1);
+ TS_ASSERT_EQUALS(byteSpan.size(), sizeof(data) - 1 * sizeof(uint16));
+ TS_ASSERT_EQUALS(byteSpan[0], 0xFF);
+ TS_ASSERT_EQUALS(byteSpan[1], 0xFF);
+ }
+
+ {
+ byte data[] = { 1, 2, 3, 4, 5, 6 };
+ const Common::Span<const byte> span(data, sizeof(data));
+
+ TS_ASSERT_EQUALS(span.subspan(0).size(), sizeof(data) - 0);
+ TS_ASSERT_EQUALS(span.subspan(2).size(), sizeof(data) - 2);
+ TS_ASSERT_EQUALS(span.subspan(2, 2).size(), 2U);
+ TS_ASSERT_EQUALS(span.subspan<uint16>(0).size(), sizeof(data) / 2);
+ TS_ASSERT_EQUALS(span.subspan<uint16>(0).byteSize(), sizeof(data));
+ TS_ASSERT_EQUALS(span.subspan<uint16>(0, 2).size(), 1U);
+ TS_ASSERT_EQUALS(span.subspan<uint16>(0, 2).byteSize(), 2U);
+
+#ifdef SCUMM_LITTLE_ENDIAN
+ TS_ASSERT_EQUALS(span.subspan<uint16>(0)[1], 4 << 8 | 3);
+#elif SCUMM_BIG_ENDIAN
+ TS_ASSERT_EQUALS(span.subspan<uint16>(0)[1], 3 << 8 | 4);
+#else
+#error No endianness detected
+#endif
+
+ const Common::Span<uint16> shortSpan = span.subspan<uint16>(0);
+ TS_ASSERT_EQUALS(shortSpan.byteSize(), span.byteSize());
+ TS_ASSERT(shortSpan.size() != span.size());
+ Common::Span<byte> byteSpan = shortSpan.subspan<byte>(1);
+ TS_ASSERT_EQUALS(byteSpan.size(), sizeof(data) - 1 * sizeof(uint16));
+ TS_ASSERT_EQUALS(byteSpan[0], 3);
+ TS_ASSERT_EQUALS(byteSpan[1], 4);
+ }
+ }
+
+ void test_span_to_stream() {
+ const byte data[] = { 0, 1, 2, 3 };
+ Common::Span<const byte> span(data, sizeof(data));
+
+ {
+ Common::MemoryReadStream stream(span.toStream(1, 2));
+ byte out;
+ TS_ASSERT_EQUALS(stream.read(&out, 1), 1U);
+ TS_ASSERT_EQUALS(out, 1);
+ TS_ASSERT_EQUALS(stream.read(&out, 1), 1U);
+ TS_ASSERT_EQUALS(out, 2);
+ TS_ASSERT_EQUALS(stream.read(&out, 1), 0U);
+ }
+
+ {
+ Common::MemoryReadStream stream = span.toStream();
+ byte out;
+ TS_ASSERT_EQUALS(stream.read(&out, 1), 1U);
+ TS_ASSERT_EQUALS(out, 0);
+ TS_ASSERT_EQUALS(stream.read(&out, 1), 1U);
+ TS_ASSERT_EQUALS(out, 1);
+ TS_ASSERT_EQUALS(stream.read(&out, 1), 1U);
+ TS_ASSERT_EQUALS(out, 2);
+ TS_ASSERT_EQUALS(stream.read(&out, 1), 1U);
+ TS_ASSERT_EQUALS(out, 3);
+ TS_ASSERT_EQUALS(stream.read(&out, 1), 0U);
+ }
+ }
+
+ void test_span_copying() {
+ const byte data[] = { 0, 1, 2, 3, 4, 5 };
+ Common::Span<const byte> span(data, sizeof(data));
+
+ byte targetData[sizeof(data)] = {};
+ Common::Span<byte> target(targetData, sizeof(targetData));
+ span.copyDataTo(target);
+ for (uint i = 0; i < sizeof(data); ++i) {
+ TS_ASSERT_EQUALS(target[i], i);
+ }
+
+ byte out[sizeof(data)];
+ span.unsafeCopyDataTo(out);
+ for (uint i = 0; i < sizeof(data); ++i) {
+ TS_ASSERT_EQUALS(out[i], i);
+ }
+ }
+
+ void test_span_validation() {
+ byte data[6];
+ Common::Span<byte> span(data, sizeof(data));
+ TS_ASSERT(!span.checkInvalidBounds(0, 0));
+ TS_ASSERT(!span.checkInvalidBounds(0, 6));
+ TS_ASSERT(!span.checkInvalidBounds(2, 4));
+ TS_ASSERT(!span.checkInvalidBounds(4, 2));
+ TS_ASSERT(!span.checkInvalidBounds(6, 0));
+ TS_ASSERT(!span.checkInvalidBounds(2, -2));
+ TS_ASSERT(span.checkInvalidBounds(-2, 2)); // negative index disallowed
+ TS_ASSERT(span.checkInvalidBounds(6, 1)); // combined positive overflow (+7)
+ TS_ASSERT(span.checkInvalidBounds(2, -4)); // negative overflow (-2)
+ TS_ASSERT(span.checkInvalidBounds(0, 10)); // delta positive overflow
+
+ const ptrdiff_t big = 1L << (8 * sizeof(ptrdiff_t) - 1);
+ TS_ASSERT(span.checkInvalidBounds(big, 0));
+ TS_ASSERT(span.checkInvalidBounds(0, big));
+ TS_ASSERT(span.checkInvalidBounds(big, big));
+ }
+
+ void test_span_validation_message() {
+ byte data[1];
+ Common::Span<byte> span(data, sizeof(data));
+
+ Common::String source = span.name();
+ Common::String actual;
+ Common::String expected;
+
+ actual = span.getValidationMessage(12, 34, Common::kValidateRead);
+ expected = Common::String::format("Access violation reading %s: 12 + 34 > 1", source.c_str());
+ TS_ASSERT_EQUALS(actual, expected);
+
+ actual = span.getValidationMessage(23, 45, Common::kValidateWrite);
+ expected = Common::String::format("Access violation writing %s: 23 + 45 > 1", source.c_str());
+ TS_ASSERT_EQUALS(actual, expected);
+
+ actual = span.getValidationMessage(-34, -56, Common::kValidateSeek);
+ expected = Common::String::format("Access violation seeking %s: -34 + -56 > 1", source.c_str());
+ TS_ASSERT_EQUALS(actual, expected);
+ }
+
+ void test_span_comparators() {
+ byte data[2];
+ Common::Span<const byte> span0(data, sizeof(data));
+ Common::Span<const byte> span1(data, sizeof(data));
+ Common::Span<const byte> span2(data, sizeof(data) - 1);
+ Common::Span<const byte> span3(data + 1, sizeof(data) - 1);
+ Common::Span<const byte> span4(data + 2, sizeof(data) - 2);
+
+ TS_ASSERT(span0 == span1);
+ TS_ASSERT(span0 != span2);
+ TS_ASSERT(span0 <= span1);
+ TS_ASSERT(span0 <= span3);
+ TS_ASSERT(span0 < span3);
+ TS_ASSERT(span3 < span4);
+ TS_ASSERT(span4 > span3);
+ TS_ASSERT(span3 > span0);
+ TS_ASSERT(span4 >= span4);
+ TS_ASSERT(span0 >= span1);
+
+ TS_ASSERT_EQUALS(span1 - span0, 0);
+ TS_ASSERT_EQUALS(span3 - span0, 1);
+ TS_ASSERT_EQUALS(span4 - span0, 2);
+ TS_ASSERT_EQUALS(span0 - span1, 0);
+ TS_ASSERT_EQUALS(span0 - span3, -1);
+ TS_ASSERT_EQUALS(span0 - span4, -2);
+ }
+
+ void test_named_span() {
+ byte data[6] = { 0, 1, 2, 3, 4, 5 };
+ Common::NamedSpan<byte> span(data, sizeof(data), "foo.data");
+ TS_ASSERT_EQUALS(span.name(), "foo.data");
+
+ Common::String actual;
+ Common::String expected;
+
+ actual = span.getValidationMessage(12, 34, Common::kValidateRead);
+ expected = "Access violation reading foo.data: 12 + 34 > 6 (abs: 12 + 34 > 6)";
+ TS_ASSERT_EQUALS(actual, expected);
+
+ {
+ Common::NamedSpan<byte> subspan = span.subspan(2);
+
+ expected = "Access violation reading foo.data: 23 + 45 > 4 (abs: 25 + 45 > 6)";
+ actual = subspan.getValidationMessage(23, 45, Common::kValidateRead);
+ TS_ASSERT_EQUALS(actual, expected);
+ }
+
+ {
+ Common::NamedSpan<byte> subspan = span.subspan(2, Common::kSpanMaxSize, "new.data");
+ expected = "Access violation reading new.data: -34 + -56 > 4 (abs: -32 + -56 > 6)";
+ actual = subspan.getValidationMessage(-34, -56, Common::kValidateRead);
+ TS_ASSERT_EQUALS(actual, expected);
+ }
+
+ {
+ Common::NamedSpan<byte> subspan = span.subspan(2, Common::kSpanMaxSize, "new.data", 0);
+ expected = "Access violation reading new.data: -34 + -56 > 4 (abs: -34 + -56 > 4)";
+ actual = subspan.getValidationMessage(-34, -56, Common::kValidateRead);
+ TS_ASSERT_EQUALS(actual, expected);
+ }
+
+ Common::NamedSpan<byte> span2;
+ span = span2 = span;
+ TS_ASSERT_EQUALS(span2, span);
+ TS_ASSERT(span2.name() == span.name());
+ TS_ASSERT(span2.sourceByteOffset() == span.sourceByteOffset());
+
+ Common::Span<byte> superclassInstance;
+ superclassInstance = span;
+ TS_ASSERT_EQUALS(span, superclassInstance);
+
+ Common::Span<byte> subclassInstance(superclassInstance);
+ TS_ASSERT_EQUALS(subclassInstance, superclassInstance);
+
+ const Common::NamedSpan<const byte> constSpan(span);
+
+ {
+ Common::NamedSpan<const byte> subspan = constSpan.subspan(2);
+
+ expected = "Access violation reading foo.data: 23 + 45 > 4 (abs: 25 + 45 > 6)";
+ actual = subspan.getValidationMessage(23, 45, Common::kValidateRead);
+ TS_ASSERT_EQUALS(actual, expected);
+ TS_ASSERT_EQUALS(subspan.sourceByteOffset(), 2U);
+ }
+
+ {
+ Common::NamedSpan<const byte> subspan = constSpan.subspan(2, Common::kSpanMaxSize, "new.data");
+ expected = "Access violation reading new.data: -34 + -56 > 4 (abs: -32 + -56 > 6)";
+ actual = subspan.getValidationMessage(-34, -56, Common::kValidateRead);
+ TS_ASSERT_EQUALS(actual, expected);
+ }
+
+ {
+ Common::NamedSpan<const byte> subspan = constSpan.subspan(2, Common::kSpanMaxSize, "new.data", 0);
+ expected = "Access violation reading new.data: -34 + -56 > 4 (abs: -34 + -56 > 4)";
+ actual = subspan.getValidationMessage(-34, -56, Common::kValidateRead);
+ TS_ASSERT_EQUALS(actual, expected);
+ }
+
+ {
+ Common::NamedSpan<const byte> subspan = constSpan.subspan(2, Common::kSpanMaxSize, "new.data", 0);
+ subspan.sourceByteOffset() = 2;
+ expected = "Access violation reading new.data: -34 + -56 > 4 (abs: -32 + -56 > 6)";
+ actual = subspan.getValidationMessage(-34, -56, Common::kValidateRead);
+ TS_ASSERT_EQUALS(actual, expected);
+ }
+
+ {
+ Common::MemoryReadStream *stream = new Common::MemoryReadStream(data, sizeof(data));
+ Common::File file;
+ file.open(stream, "test.txt");
+ Common::SpanOwner<Common::NamedSpan<const byte> > fileOwner;
+ fileOwner->allocateFromStream(file);
+ TS_ASSERT_EQUALS(fileOwner->size(), (uint)file.size());
+ file.close();
+ TS_ASSERT(fileOwner->name() == "test.txt");
+ for (uint i = 0; i < fileOwner->size(); ++i) {
+ TS_ASSERT_EQUALS(fileOwner->getInt8At(i), data[i]);
+ }
+ }
+ }
+};
diff --git a/test/common/str.h b/test/common/str.h
index c59c5a5efd..b7ad28e56e 100644
--- a/test/common/str.h
+++ b/test/common/str.h
@@ -403,6 +403,29 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(strcmp(test4, resultString), 0);
}
+ void test_strnlen() {
+ static const char * const testString = "123";
+ TS_ASSERT_EQUALS(Common::strnlen(testString, 0), 0u);
+ TS_ASSERT_EQUALS(Common::strnlen(testString, 1), 1u);
+ TS_ASSERT_EQUALS(Common::strnlen(testString, 2), 2u);
+ TS_ASSERT_EQUALS(Common::strnlen(testString, 3), 3u);
+ TS_ASSERT_EQUALS(Common::strnlen(testString, 4), 3u);
+
+ const char testArray[4] = { '1', '2', '3', '4' };
+ TS_ASSERT_EQUALS(Common::strnlen(testArray, 0), 0u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray, 1), 1u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray, 2), 2u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray, 3), 3u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray, 4), 4u);
+
+ const char testArray2[4] = { '1', '\0', '3', '4' };
+ TS_ASSERT_EQUALS(Common::strnlen(testArray2, 0), 0u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray2, 1), 1u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray2, 2), 1u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray2, 3), 1u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray2, 4), 1u);
+ }
+
void test_scumm_stricmp() {
TS_ASSERT_EQUALS(scumm_stricmp("abCd", "abCd"), 0);
TS_ASSERT_EQUALS(scumm_stricmp("abCd", "ABCd"), 0);
diff --git a/test/engines/wintermute/path_utils.h b/test/engines/wintermute/path_utils.h
new file mode 100644
index 0000000000..26f3404396
--- /dev/null
+++ b/test/engines/wintermute/path_utils.h
@@ -0,0 +1,236 @@
+#include <cxxtest/TestSuite.h>
+#include "engines/wintermute/utils/path_util.h"
+/**
+ * Test suite for the functions in engines/wintermute/utils/path_util.h
+ *
+ * NOTE: This is not a prescription;
+ * this was not written by the original engine author;
+ * this was not written by the engine porter.
+ *
+ * It might, however, help to spot variations in behavior that are introduced by modifications
+ */
+
+class PathUtilTestSuite : public CxxTest::TestSuite {
+ public:
+ const Common::String unixPath;
+ const Common::String unixCapPath;
+ const Common::String windowsPath;
+ const Common::String windowsCapPath;
+ const Common::String emptyString;
+ const Common::String dualExtPath;
+ const Common::String manyExtPath;
+ const Common::String mixedSlashesPath1;
+ const Common::String mixedSlashesPath2;
+ const Common::String unixRelativePath;
+ const Common::String windowsRelativePath;
+ const Common::String unixDirPath;
+ const Common::String windowsDirPath;
+ PathUtilTestSuite () :
+ unixPath("/some/file.ext"),
+ unixCapPath("/SOME/FILE.EXT"),
+ windowsPath("C:\\some\\file.ext"),
+ windowsCapPath("C:\\SOME\\FILE.EXT"),
+ emptyString(""),
+ dualExtPath("/some/file.tar.gz"),
+ manyExtPath("/some/file.tar.bz2.gz.zip"),
+ mixedSlashesPath1("C:\\this/IS_REALLY\\weird.exe"),
+ mixedSlashesPath2("/pretty\\weird/indeed.txt"),
+ unixRelativePath("some/file.ext"),
+ windowsRelativePath("some\\file.ext"),
+ unixDirPath("/some/dir/"),
+ windowsDirPath("C:\\some\\dir\\")
+ {}
+ void test_getdirectoryname() {
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getDirectoryName(unixPath),
+ Common::String("/some/")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getDirectoryName(unixCapPath),
+ Common::String("/SOME/")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getDirectoryName(windowsPath),
+ Common::String("C:\\some\\")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getDirectoryName(windowsCapPath),
+ Common::String("C:\\SOME\\")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getDirectoryName(emptyString),
+ Common::String("")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getDirectoryName(unixDirPath),
+ Common::String("/some/dir/")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getDirectoryName(windowsDirPath),
+ Common::String("C:\\some\\dir\\")
+ );
+ }
+
+ void test_getfilename() {
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileName(unixPath),
+ Common::String("file.ext")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileName(unixCapPath),
+ Common::String("FILE.EXT")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileName(windowsPath),
+ Common::String("file.ext")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileName(windowsCapPath),
+ Common::String("FILE.EXT")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileName(emptyString),
+ Common::String("")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileName(unixRelativePath),
+ Common::String("file.ext")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileName(windowsRelativePath),
+ Common::String("file.ext")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileName(windowsDirPath),
+ Common::String("")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileName(unixDirPath),
+ Common::String("")
+ );
+ }
+
+ void test_getextension() {
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getExtension(windowsPath),
+ Common::String("ext")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getExtension(windowsCapPath),
+ Common::String("EXT")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getExtension(emptyString),
+ Common::String("")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getExtension(dualExtPath),
+ Common::String("gz")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getExtension(manyExtPath),
+ Common::String("zip")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getExtension(unixRelativePath),
+ Common::String("ext")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getExtension(windowsRelativePath),
+ Common::String("ext")
+ );
+ }
+
+ void test_getfilenamewithoutextension() {
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileNameWithoutExtension(windowsPath),
+ Common::String("file")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileNameWithoutExtension(windowsCapPath),
+ Common::String("FILE")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileNameWithoutExtension(emptyString),
+ Common::String("")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileNameWithoutExtension(dualExtPath),
+ Common::String("file.tar")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileNameWithoutExtension(manyExtPath),
+ Common::String("file.tar.bz2.gz")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileNameWithoutExtension(unixRelativePath),
+ Common::String("file")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getFileNameWithoutExtension(windowsRelativePath),
+ Common::String("file")
+ );
+ }
+
+ void test_combine_identity() {
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getDirectoryName(windowsPath) +
+ Wintermute::PathUtil::getFileNameWithoutExtension(windowsPath) +
+ "." +
+ Wintermute::PathUtil::getExtension(windowsPath),
+ windowsPath
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getDirectoryName(windowsCapPath) +
+ Wintermute::PathUtil::getFileNameWithoutExtension(windowsCapPath) +
+ "." +
+ Wintermute::PathUtil::getExtension(windowsCapPath),
+ windowsCapPath
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getDirectoryName(unixCapPath) +
+ Wintermute::PathUtil::getFileNameWithoutExtension(unixCapPath) +
+ "." +
+ Wintermute::PathUtil::getExtension(unixCapPath),
+ unixCapPath
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::getDirectoryName(manyExtPath) +
+ Wintermute::PathUtil::getFileNameWithoutExtension(manyExtPath) +
+ "." +
+ Wintermute::PathUtil::getExtension(manyExtPath),
+ manyExtPath
+ );
+ }
+
+ void test_normalize() {
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::normalizeFileName(windowsCapPath),
+ Common::String("c:/some/file.ext")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::normalizeFileName(windowsPath),
+ Common::String("c:/some/file.ext")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::normalizeFileName(mixedSlashesPath1),
+ Common::String("c:/this/is_really/weird.exe")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::normalizeFileName(mixedSlashesPath2),
+ Common::String("/pretty/weird/indeed.txt")
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::normalizeFileName(emptyString),
+ emptyString
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::normalizeFileName(unixRelativePath),
+ unixRelativePath
+ );
+ TS_ASSERT_EQUALS(
+ Wintermute::PathUtil::normalizeFileName(windowsRelativePath),
+ unixRelativePath // NOT windows
+ );
+ }
+};
diff --git a/test/module.mk b/test/module.mk
index 11ee6bd200..04e7deeacd 100644
--- a/test/module.mk
+++ b/test/module.mk
@@ -8,6 +8,11 @@
TESTS := $(srcdir)/test/common/*.h $(srcdir)/test/audio/*.h
TEST_LIBS := audio/libaudio.a common/libcommon.a
+ifdef ENABLE_WINTERMUTE
+ TESTS += $(srcdir)/test/engines/wintermute/*.h
+ TEST_LIBS += engines/wintermute/libwintermute.a
+endif
+
#
TEST_FLAGS := --runner=StdioPrinter --no-std --no-eh --include=$(srcdir)/test/cxxtest_mingw.h
TEST_CFLAGS := -I$(srcdir)/test/cxxtest
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index fc73cfaeac..ae30ec0636 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -721,18 +721,31 @@ bool AVIDecoder::seekIntern(const Audio::Timestamp &time) {
AVIVideoTrack *videoTrack2 = static_cast<AVIVideoTrack *>(_videoTracks.back().track);
videoTrack2->setCurFrame((int)frame - 1);
- // Find the index entry for the frame and read it in
- OldIndex *entry = _indexEntries.find(_videoTracks.back().index, frame);
+ // Find the index entry for the frame
+ int indexFrame = frame;
+ OldIndex *entry = nullptr;
+ do {
+ entry = _indexEntries.find(_videoTracks.back().index, indexFrame);
+ } while (!entry && indexFrame-- > 0);
assert(entry);
+ // Read in the frame
Common::SeekableReadStream *chunk = nullptr;
_fileStream->seek(entry->offset + 8);
_videoTracks.back().chunkSearchOffset = entry->offset;
if (entry->size != 0)
chunk = _fileStream->readStream(entry->size);
-
videoTrack2->decodeFrame(chunk);
+
+ if (indexFrame < (int)frame) {
+ TrackStatus &status = _videoTracks.back();
+ while (status.chunkSearchOffset < _movieListEnd && indexFrame++ < (int)frame) {
+ // There was no index entry for the desired frame, so an earlier one was decoded.
+ // We now have to sequentially decode frames until we get to the desired frame
+ handleNextPacket(status);
+ }
+ }
}
// Set the video track's frame
diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp
index 4e05499065..4c9ef67702 100644
--- a/video/coktel_decoder.cpp
+++ b/video/coktel_decoder.cpp
@@ -1691,7 +1691,7 @@ bool VMDDecoder::openExternalCodec() {
if (_videoCodec == kVideoCodecIndeo3) {
_isPaletted = false;
- _codec = new Image::Indeo3Decoder(_width, _height);
+ _codec = new Image::Indeo3Decoder(_width, _height, g_system->getScreenFormat().bpp());
} else {
warning("VMDDecoder::openExternalCodec(): Unknown video codec FourCC \"%s\"",