aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS14
-rw-r--r--COPYRIGHT3
-rw-r--r--NEWS41
-rw-r--r--README71
-rw-r--r--audio/audiostream.cpp55
-rw-r--r--audio/audiostream.h9
-rw-r--r--audio/decoders/aac.cpp1
-rw-r--r--audio/decoders/mp3.cpp16
-rw-r--r--audio/decoders/qdm2.cpp1
-rw-r--r--audio/decoders/quicktime.cpp11
-rw-r--r--audio/softsynth/mt32/BReverbModel.cpp314
-rw-r--r--audio/softsynth/mt32/BReverbModel.h8
-rw-r--r--audio/softsynth/mt32/LA32FloatWaveGenerator.cpp2
-rw-r--r--audio/softsynth/mt32/LA32FloatWaveGenerator.h2
-rw-r--r--audio/softsynth/mt32/LA32Ramp.cpp2
-rw-r--r--audio/softsynth/mt32/LA32Ramp.h2
-rw-r--r--audio/softsynth/mt32/LA32WaveGenerator.cpp2
-rw-r--r--audio/softsynth/mt32/LA32WaveGenerator.h2
-rw-r--r--audio/softsynth/mt32/Part.cpp10
-rw-r--r--audio/softsynth/mt32/Part.h2
-rw-r--r--audio/softsynth/mt32/Partial.cpp2
-rw-r--r--audio/softsynth/mt32/Partial.h2
-rw-r--r--audio/softsynth/mt32/PartialManager.cpp2
-rw-r--r--audio/softsynth/mt32/PartialManager.h2
-rw-r--r--audio/softsynth/mt32/Poly.cpp2
-rw-r--r--audio/softsynth/mt32/Poly.h2
-rw-r--r--audio/softsynth/mt32/ROMInfo.cpp48
-rw-r--r--audio/softsynth/mt32/ROMInfo.h15
-rw-r--r--audio/softsynth/mt32/Structures.h2
-rw-r--r--audio/softsynth/mt32/Synth.cpp344
-rw-r--r--audio/softsynth/mt32/Synth.h44
-rw-r--r--audio/softsynth/mt32/TVA.cpp2
-rw-r--r--audio/softsynth/mt32/TVA.h2
-rw-r--r--audio/softsynth/mt32/TVF.cpp2
-rw-r--r--audio/softsynth/mt32/TVF.h2
-rw-r--r--audio/softsynth/mt32/TVP.cpp2
-rw-r--r--audio/softsynth/mt32/TVP.h2
-rw-r--r--audio/softsynth/mt32/Tables.cpp2
-rw-r--r--audio/softsynth/mt32/Tables.h2
-rw-r--r--audio/softsynth/mt32/mmath.h2
-rw-r--r--audio/softsynth/mt32/mt32emu.h2
-rw-r--r--backends/audiocd/audiocd.h4
-rw-r--r--backends/events/dinguxsdl/dinguxsdl-events.cpp5
-rw-r--r--backends/events/gph/gph-events.cpp3
-rw-r--r--backends/events/linuxmotosdl/linuxmotosdl-events.cpp10
-rw-r--r--backends/events/maemosdl/maemosdl-events.cpp32
-rw-r--r--backends/events/ps3sdl/ps3sdl-events.cpp10
-rw-r--r--backends/events/samsungtvsdl/samsungtvsdl-events.cpp11
-rw-r--r--backends/graphics/opengl/opengl-graphics.h2
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp15
-rw-r--r--backends/mixer/sdl/sdl-mixer.cpp3
-rw-r--r--backends/mixer/sdl13/sdl13-mixer.cpp3
-rw-r--r--backends/platform/android/android.mk11
-rw-r--r--backends/platform/android/events.cpp2
-rw-r--r--backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java14
-rw-r--r--backends/platform/dingux/dingux.mk1
-rw-r--r--backends/platform/gph/caanoo-bundle.mk2
-rw-r--r--backends/platform/gph/gp2x-bundle.mk2
-rw-r--r--backends/platform/gph/gp2xwiz-bundle.mk2
-rw-r--r--backends/platform/linuxmoto/linuxmoto.mk4
-rw-r--r--backends/platform/maemo/debian/changelog6
-rwxr-xr-xbackends/platform/maemo/debian/rules1
-rw-r--r--backends/platform/n64/n64.mk1
-rw-r--r--backends/platform/psp/README.PSP2
-rw-r--r--backends/platform/sdl/amigaos/amigaos-main.cpp3
-rw-r--r--backends/platform/sdl/amigaos/amigaos.mk12
-rw-r--r--backends/platform/sdl/ps3/ps3.mk27
-rw-r--r--backends/platform/symbian/AdaptAllMMPs.pl49
-rw-r--r--backends/platform/symbian/BuildPackageUpload_AllVersions.pl3
-rw-r--r--backends/platform/symbian/BuildPackageUpload_LocalSettings.pl54
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in32
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in32
-rw-r--r--backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg3
-rw-r--r--backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3_split.pkg3
-rw-r--r--backends/platform/symbian/UIQ3/BLD.INF.in1
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in13
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in13
-rw-r--r--backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg19
-rw-r--r--backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3_split.pkg19
-rw-r--r--backends/platform/symbian/help/ScummVM.rtf71
-rw-r--r--backends/platform/symbian/mmp/config.mmh69
-rw-r--r--backends/platform/symbian/mmp/scummvm_avalanche.mmp.in22
-rw-r--r--backends/platform/symbian/mmp/scummvm_base.mmp.in12
-rw-r--r--backends/platform/symbian/mmp/scummvm_bbvs.mmp.in72
-rw-r--r--backends/platform/symbian/mmp/scummvm_cge2.mmp.in53
-rw-r--r--backends/platform/symbian/mmp/scummvm_fullpipe.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_groovie.mmp.in1
-rw-r--r--backends/platform/symbian/mmp/scummvm_mads.mmp.in72
-rw-r--r--backends/platform/symbian/mmp/scummvm_tsage.mmp.in22
-rw-r--r--backends/platform/symbian/mmp/scummvm_voyeur.mmp.in71
-rw-r--r--backends/platform/symbian/mmp/scummvm_wintermute.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_zvision.mmp.in2
-rw-r--r--backends/platform/tizen/form.cpp9
-rw-r--r--backends/platform/wii/osystem_events.cpp4
-rw-r--r--backends/platform/wii/wii.mk1
-rw-r--r--backends/vkeybd/packs/vkeybd_small.zipbin0 -> 87598 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_small/lowercase-symbols320x240.bmpbin0 -> 153654 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_small/lowercase320x240.bmpbin0 -> 153654 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_small/uppercase-symbols320x240.bmpbin0 -> 153654 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_small/uppercase320x240.bmpbin0 -> 153654 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_small/vkeybd_small.xml637
-rw-r--r--backends/vkeybd/virtual-keyboard.cpp12
-rw-r--r--base/commandLine.cpp12
-rw-r--r--base/internal_version.h2
-rw-r--r--base/main.cpp2
-rw-r--r--base/version.cpp3
-rw-r--r--common/EventMapper.cpp30
-rw-r--r--common/bitstream.h9
-rw-r--r--common/config-manager.cpp10
-rw-r--r--common/dcl.cpp3
-rw-r--r--common/endian.h3
-rw-r--r--common/events.h2
-rw-r--r--common/file.h3
-rw-r--r--common/localization.h4
-rw-r--r--common/macresman.h6
-rw-r--r--common/quicktime.h2
-rw-r--r--common/singleton.h4
-rw-r--r--common/str.h1
-rw-r--r--common/stream.h2
-rw-r--r--common/util.h2
-rw-r--r--common/zlib.h4
-rwxr-xr-xconfigure17
-rw-r--r--devtools/README2
-rw-r--r--devtools/create_project/create_project.cpp6
-rw-r--r--devtools/create_project/msbuild.cpp2
-rw-r--r--devtools/create_project/msvc10/create_project.vcxproj2
-rw-r--r--devtools/create_project/msvc11/create_project.vcxproj2
-rw-r--r--devtools/create_project/msvc12/create_project.vcxproj2
-rw-r--r--devtools/create_project/msvc8/create_project.sln20
-rw-r--r--devtools/create_project/msvc8/create_project.vcproj251
-rw-r--r--devtools/create_project/scripts/postbuild.cmd3
-rw-r--r--devtools/create_project/visualstudio.cpp10
-rwxr-xr-xdevtools/credits.pl16
-rw-r--r--devtools/scumm-md5.txt9
-rw-r--r--dists/android/AndroidManifest.xml2
-rw-r--r--dists/android/plugin-manifest.xml2
-rw-r--r--dists/android/res/values-television/margins.xml (renamed from dists/android/res-ouya/values-television/margins.xml)0
-rw-r--r--dists/gph/README-GPH2
-rw-r--r--dists/gph/scummvm.ini2
-rw-r--r--dists/iphone/Info.plist4
-rw-r--r--dists/irix/scummvm.spec2
-rw-r--r--dists/macosx/Info.plist6
-rw-r--r--dists/msvc8/create_msvc8.bat105
-rw-r--r--dists/msvc8/readme.txt6
-rw-r--r--dists/openpandora/PXML.xml8
-rw-r--r--dists/openpandora/README-OPENPANDORA2
-rw-r--r--dists/openpandora/README-PND.txt2
-rw-r--r--dists/openpandora/index.html4
-rw-r--r--dists/redhat/scummvm-tools.spec2
-rw-r--r--dists/redhat/scummvm.spec14
-rw-r--r--dists/redhat/scummvm.spec.in12
-rw-r--r--dists/scummvm.rc8
-rwxr-xr-xdists/slackware/scummvm.SlackBuild2
-rw-r--r--dists/wii/meta.xml2
-rw-r--r--dists/win32/scummvm.nsi4
-rw-r--r--doc/de/Liesmich104
-rw-r--r--doc/de/Neues90
-rw-r--r--engines/advancedDetector.cpp2
-rw-r--r--engines/agos/midi.cpp4
-rw-r--r--engines/cge/cge.h6
-rw-r--r--engines/cge/detection.cpp113
-rw-r--r--engines/cge/fileio.cpp2
-rw-r--r--engines/cge/vga13h.cpp64
-rw-r--r--engines/cge/vga13h.h32
-rw-r--r--engines/cge2/bitmap.cpp458
-rw-r--r--engines/cge2/bitmap.h94
-rw-r--r--engines/cge2/cge2.cpp206
-rw-r--r--engines/cge2/cge2.h341
-rw-r--r--engines/cge2/cge2_main.cpp960
-rw-r--r--engines/cge2/cge2_main.h52
-rw-r--r--engines/cge2/configure.engine3
-rw-r--r--engines/cge2/console.cpp33
-rw-r--r--engines/cge2/console.h40
-rw-r--r--engines/cge2/detection.cpp245
-rw-r--r--engines/cge2/events.cpp293
-rw-r--r--engines/cge2/events.h116
-rw-r--r--engines/cge2/fileio.cpp272
-rw-r--r--engines/cge2/fileio.h133
-rw-r--r--engines/cge2/general.h45
-rw-r--r--engines/cge2/hero.cpp620
-rw-r--r--engines/cge2/hero.h114
-rw-r--r--engines/cge2/inventory.cpp104
-rw-r--r--engines/cge2/map.cpp92
-rw-r--r--engines/cge2/map.h55
-rw-r--r--engines/cge2/module.mk30
-rw-r--r--engines/cge2/saveload.cpp279
-rw-r--r--engines/cge2/snail.cpp865
-rw-r--r--engines/cge2/snail.h129
-rw-r--r--engines/cge2/sound.cpp273
-rw-r--r--engines/cge2/sound.h131
-rw-r--r--engines/cge2/spare.cpp128
-rw-r--r--engines/cge2/spare.h56
-rw-r--r--engines/cge2/talk.cpp312
-rw-r--r--engines/cge2/talk.h94
-rw-r--r--engines/cge2/text.cpp197
-rw-r--r--engines/cge2/text.h68
-rw-r--r--engines/cge2/toolbar.cpp225
-rw-r--r--engines/cge2/vga13h.cpp1218
-rw-r--r--engines/cge2/vga13h.h308
-rw-r--r--engines/cge2/vmenu.cpp162
-rw-r--r--engines/cge2/vmenu.h89
-rw-r--r--engines/composer/composer.cpp5
-rw-r--r--engines/composer/scripting.cpp1
-rw-r--r--engines/cruise/cruise.cpp3
-rw-r--r--engines/cruise/cruise.h2
-rw-r--r--engines/cruise/cruise_main.cpp36
-rw-r--r--engines/cruise/function.cpp5
-rw-r--r--engines/cruise/mainDraw.cpp4
-rw-r--r--engines/cruise/mainDraw.h2
-rw-r--r--engines/cruise/menu.cpp6
-rw-r--r--engines/cruise/saveload.cpp2
-rw-r--r--engines/cruise/sound.cpp8
-rw-r--r--engines/cruise/vars.cpp4
-rw-r--r--engines/cruise/vars.h4
-rw-r--r--engines/drascula/animation.cpp28
-rw-r--r--engines/drascula/drascula.cpp3
-rw-r--r--engines/fullpipe/configure.engine2
-rw-r--r--engines/fullpipe/fullpipe.cpp37
-rw-r--r--engines/fullpipe/fullpipe.h4
-rw-r--r--engines/fullpipe/gameloader.cpp35
-rw-r--r--engines/fullpipe/gfx.cpp425
-rw-r--r--engines/fullpipe/gfx.h25
-rw-r--r--engines/fullpipe/mgm.cpp719
-rw-r--r--engines/fullpipe/mgm.h95
-rw-r--r--engines/fullpipe/modal.cpp33
-rw-r--r--engines/fullpipe/modal.h4
-rw-r--r--engines/fullpipe/module.mk1
-rw-r--r--engines/fullpipe/motion.cpp727
-rw-r--r--engines/fullpipe/motion.h68
-rw-r--r--engines/fullpipe/scene.cpp12
-rw-r--r--engines/fullpipe/scenes/scene04.cpp4
-rw-r--r--engines/fullpipe/scenes/scene29.cpp2
-rw-r--r--engines/fullpipe/sound.cpp8
-rw-r--r--engines/fullpipe/stateloader.cpp38
-rw-r--r--engines/fullpipe/statics.cpp27
-rw-r--r--engines/gob/detection/tables_ween.h87
-rw-r--r--engines/kyra/items_lol.cpp2
-rw-r--r--engines/kyra/sound_adlib.cpp327
-rw-r--r--engines/lastexpress/debug.cpp12
-rw-r--r--engines/lastexpress/entities/abbot.cpp10
-rw-r--r--engines/lastexpress/entities/alexei.cpp2
-rw-r--r--engines/lastexpress/entities/anna.cpp14
-rw-r--r--engines/lastexpress/entities/august.cpp47
-rw-r--r--engines/lastexpress/entities/boutarel.cpp8
-rw-r--r--engines/lastexpress/entities/chapters.cpp35
-rw-r--r--engines/lastexpress/entities/chapters.h2
-rw-r--r--engines/lastexpress/entities/cooks.cpp43
-rw-r--r--engines/lastexpress/entities/cooks.h24
-rw-r--r--engines/lastexpress/entities/entity.cpp4
-rw-r--r--engines/lastexpress/entities/gendarmes.cpp111
-rw-r--r--engines/lastexpress/entities/gendarmes.h18
-rw-r--r--engines/lastexpress/entities/hadija.cpp62
-rw-r--r--engines/lastexpress/entities/hadija.h10
-rw-r--r--engines/lastexpress/entities/ivo.cpp64
-rw-r--r--engines/lastexpress/entities/ivo.h18
-rw-r--r--engines/lastexpress/entities/kahina.cpp94
-rw-r--r--engines/lastexpress/entities/kahina.h34
-rw-r--r--engines/lastexpress/entities/kronos.cpp74
-rw-r--r--engines/lastexpress/entities/kronos.h18
-rw-r--r--engines/lastexpress/entities/max.cpp38
-rw-r--r--engines/lastexpress/entities/max.h19
-rw-r--r--engines/lastexpress/entities/milos.cpp4
-rw-r--r--engines/lastexpress/entities/pascale.cpp82
-rw-r--r--engines/lastexpress/entities/pascale.h24
-rw-r--r--engines/lastexpress/entities/rebecca.cpp18
-rw-r--r--engines/lastexpress/entities/tatiana.cpp4
-rw-r--r--engines/lastexpress/entities/waiter1.cpp (renamed from engines/lastexpress/entities/servers0.cpp)343
-rw-r--r--engines/lastexpress/entities/waiter1.h (renamed from engines/lastexpress/entities/servers0.h)78
-rw-r--r--engines/lastexpress/entities/waiter2.cpp (renamed from engines/lastexpress/entities/servers1.cpp)268
-rw-r--r--engines/lastexpress/entities/waiter2.h (renamed from engines/lastexpress/entities/servers1.h)66
-rw-r--r--engines/lastexpress/game/action.cpp2
-rw-r--r--engines/lastexpress/game/entities.cpp16
-rw-r--r--engines/lastexpress/game/inventory.cpp19
-rw-r--r--engines/lastexpress/game/savepoint.cpp16
-rw-r--r--engines/lastexpress/game/savepoint.h4
-rw-r--r--engines/lastexpress/lastexpress.cpp2
-rw-r--r--engines/lastexpress/module.mk4
-rw-r--r--engines/lastexpress/shared.h8
-rw-r--r--engines/lastexpress/sound/entry.cpp9
-rw-r--r--engines/lastexpress/sound/sound.cpp10
-rw-r--r--engines/made/database.cpp2
-rw-r--r--engines/made/resource.cpp3
-rw-r--r--engines/made/screen.cpp3
-rw-r--r--engines/mads/debugger.cpp37
-rw-r--r--engines/mads/dialogs.h4
-rw-r--r--engines/mads/dragonsphere/dragonsphere_scenes.cpp31
-rw-r--r--engines/mads/dragonsphere/game_dragonsphere.cpp4
-rw-r--r--engines/mads/events.cpp13
-rw-r--r--engines/mads/events.h22
-rw-r--r--engines/mads/game.cpp36
-rw-r--r--engines/mads/game.h6
-rw-r--r--engines/mads/mads.cpp12
-rw-r--r--engines/mads/mads.h1
-rw-r--r--engines/mads/messages.cpp5
-rw-r--r--engines/mads/module.mk1
-rw-r--r--engines/mads/msurface.cpp5
-rw-r--r--engines/mads/msurface.h10
-rw-r--r--engines/mads/nebular/dialogs_nebular.cpp496
-rw-r--r--engines/mads/nebular/dialogs_nebular.h108
-rw-r--r--engines/mads/nebular/game_nebular.cpp14
-rw-r--r--engines/mads/nebular/menu_nebular.cpp986
-rw-r--r--engines/mads/nebular/menu_nebular.h287
-rw-r--r--engines/mads/nebular/nebular_scenes.cpp2
-rw-r--r--engines/mads/nebular/nebular_scenes1.cpp2
-rw-r--r--engines/mads/nebular/nebular_scenes8.cpp2
-rw-r--r--engines/mads/nebular/sound_nebular.cpp331
-rw-r--r--engines/mads/nebular/sound_nebular.h79
-rw-r--r--engines/mads/palette.h2
-rw-r--r--engines/mads/phantom/game_phantom.cpp4
-rw-r--r--engines/mads/phantom/phantom_scenes.cpp31
-rw-r--r--engines/mads/scene.cpp40
-rw-r--r--engines/mads/scene.h2
-rw-r--r--engines/mads/scene_data.cpp83
-rw-r--r--engines/mads/scene_data.h3
-rw-r--r--engines/mads/screen.cpp65
-rw-r--r--engines/mads/screen.h24
-rw-r--r--engines/mads/sound.cpp22
-rw-r--r--engines/mads/sound.h3
-rw-r--r--engines/mohawk/detection_tables.h20
-rw-r--r--engines/mohawk/myst_stacks/stoneship.cpp1
-rw-r--r--engines/mohawk/myst_state.cpp3
-rw-r--r--engines/mortevielle/detection_tables.h30
-rw-r--r--engines/neverhood/graphics.cpp10
-rw-r--r--engines/neverhood/modules/module1400.cpp7
-rw-r--r--engines/neverhood/modules/module1400_sprites.cpp5
-rw-r--r--engines/neverhood/modules/module1400_sprites.h2
-rw-r--r--engines/neverhood/modules/module1600_sprites.cpp3
-rw-r--r--engines/neverhood/sprite.cpp14
-rw-r--r--engines/pegasus/energymonitor.cpp4
-rw-r--r--engines/pegasus/interaction.cpp38
-rw-r--r--engines/pegasus/interaction.h6
-rw-r--r--engines/pegasus/module.mk1
-rw-r--r--engines/pegasus/neighborhood/caldoria/caldoria.cpp146
-rw-r--r--engines/pegasus/neighborhood/caldoria/caldoria4dsystem.cpp42
-rw-r--r--engines/pegasus/neighborhood/mars/shuttlehud.cpp42
-rw-r--r--engines/pegasus/neighborhood/norad/alpha/ecrmonitor.cpp4
-rw-r--r--engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp118
-rw-r--r--engines/pegasus/neighborhood/norad/delta/globegame.cpp30
-rw-r--r--engines/pegasus/neighborhood/norad/subcontrolroom.cpp191
-rw-r--r--engines/pegasus/neighborhood/tsa/fulltsa.cpp845
-rw-r--r--engines/pegasus/neighborhood/tsa/tinytsa.cpp124
-rw-r--r--engines/pegasus/neighborhood/wsc/wsc.cpp698
-rw-r--r--engines/pegasus/pegasus.cpp2
-rw-r--r--engines/saga/console.cpp46
-rw-r--r--engines/saga/console.h4
-rw-r--r--engines/saga/detection_tables.h24
-rw-r--r--engines/saga/events.cpp12
-rw-r--r--engines/saga/events.h9
-rw-r--r--engines/saga/interface.cpp5
-rw-r--r--engines/saga/introproc_ite.cpp626
-rw-r--r--engines/saga/introproc_saga2.cpp6
-rw-r--r--engines/saga/itedata.cpp486
-rw-r--r--engines/saga/itedata.h37
-rw-r--r--engines/saga/music.cpp24
-rw-r--r--engines/saga/music.h5
-rw-r--r--engines/saga/resource.cpp14
-rw-r--r--engines/saga/resource.h16
-rw-r--r--engines/saga/resource_hrs.cpp45
-rw-r--r--engines/saga/saga.cpp1
-rw-r--r--engines/saga/scene.cpp8
-rw-r--r--engines/saga/scene.h35
-rw-r--r--engines/saga/sfuncs_ihnm.cpp9
-rw-r--r--engines/saga/shorten.cpp60
-rw-r--r--engines/saga/sndres.h1
-rw-r--r--engines/savestate.h2
-rw-r--r--engines/sci/detection_tables.h19
-rw-r--r--engines/sci/engine/features.cpp6
-rw-r--r--engines/sci/engine/kernel_tables.h3
-rw-r--r--engines/sci/engine/seg_manager.cpp2
-rw-r--r--engines/sci/engine/workarounds.cpp3
-rw-r--r--engines/sci/graphics/frameout.cpp6
-rw-r--r--engines/sci/parser/said.cpp35
-rw-r--r--engines/sci/parser/vocabulary.cpp15
-rw-r--r--engines/sci/sound/drivers/midi.cpp5
-rw-r--r--engines/scumm/cdda.cpp120
-rw-r--r--engines/scumm/cdda.h57
-rw-r--r--engines/scumm/charset.cpp95
-rw-r--r--engines/scumm/charset.h29
-rw-r--r--engines/scumm/detection.cpp48
-rw-r--r--engines/scumm/detection.h2
-rw-r--r--engines/scumm/detection_tables.h22
-rw-r--r--engines/scumm/dialogs.cpp4
-rw-r--r--engines/scumm/file.cpp24
-rw-r--r--engines/scumm/file.h27
-rw-r--r--engines/scumm/he/sprite_he.cpp14
-rw-r--r--engines/scumm/input.cpp5
-rw-r--r--engines/scumm/module.mk1
-rw-r--r--engines/scumm/nut_renderer.cpp55
-rw-r--r--engines/scumm/players/player_ad.cpp84
-rw-r--r--engines/scumm/saveload.cpp2
-rw-r--r--engines/scumm/script.cpp12
-rw-r--r--engines/scumm/script_v5.cpp2
-rw-r--r--engines/scumm/scumm-md5.h11
-rw-r--r--engines/scumm/scumm.cpp55
-rw-r--r--engines/scumm/scumm.h4
-rw-r--r--engines/scumm/smush/smush_font.cpp66
-rw-r--r--engines/scumm/sound.cpp75
-rw-r--r--engines/scumm/sound.h7
-rw-r--r--engines/scumm/vars.cpp1
-rw-r--r--engines/sword1/animation.cpp4
-rw-r--r--engines/sword1/console.cpp23
-rw-r--r--engines/sword1/console.h1
-rw-r--r--engines/sword1/sound.cpp55
-rw-r--r--engines/sword1/sound.h1
-rw-r--r--engines/sword1/sword1.h1
-rw-r--r--engines/sword2/animation.cpp2
-rw-r--r--engines/sword25/gfx/animation.cpp8
-rw-r--r--engines/sword25/gfx/bitmapresource.h18
-rw-r--r--engines/sword25/gfx/dynamicbitmap.cpp8
-rw-r--r--engines/sword25/gfx/graphicengine.cpp10
-rw-r--r--engines/sword25/gfx/image/image.h22
-rw-r--r--engines/sword25/gfx/image/imgloader.cpp4
-rw-r--r--engines/sword25/gfx/image/renderedimage.cpp292
-rw-r--r--engines/sword25/gfx/image/renderedimage.h11
-rw-r--r--engines/sword25/gfx/image/swimage.h2
-rw-r--r--engines/sword25/gfx/image/vectorimage.h2
-rw-r--r--engines/sword25/gfx/image/vectorimagerenderer.cpp10
-rw-r--r--engines/sword25/gfx/staticbitmap.cpp8
-rw-r--r--engines/sword25/gfx/text.cpp6
-rw-r--r--engines/sword25/sword25.cpp2
-rw-r--r--engines/testbed/sound.cpp2
-rw-r--r--engines/toltecs/detection.cpp14
-rw-r--r--engines/toon/toon.cpp22
-rw-r--r--engines/tsage/ringworld/ringworld_scenes10.cpp2
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.h2
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes1.cpp2
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes3.cpp15
-rw-r--r--engines/tsage/sound.cpp7
-rw-r--r--engines/voyeur/configure.engine2
-rw-r--r--engines/voyeur/files_threads.cpp9
-rw-r--r--engines/voyeur/voyeur.cpp4
-rw-r--r--engines/wintermute/base/base_file_manager.cpp9
-rw-r--r--engines/wintermute/base/base_file_manager.h1
-rw-r--r--engines/wintermute/base/base_frame.cpp2
-rw-r--r--engines/wintermute/base/base_frame.h3
-rw-r--r--engines/wintermute/base/base_game.cpp4
-rw-r--r--engines/wintermute/base/base_game_settings.cpp4
-rw-r--r--engines/wintermute/base/base_game_settings.h3
-rw-r--r--engines/wintermute/base/base_object.cpp8
-rw-r--r--engines/wintermute/base/base_object.h3
-rw-r--r--engines/wintermute/base/base_persistence_manager.cpp4
-rw-r--r--engines/wintermute/base/base_sprite.cpp2
-rw-r--r--engines/wintermute/base/base_sprite.h10
-rw-r--r--engines/wintermute/base/base_string_table.cpp25
-rw-r--r--engines/wintermute/base/base_string_table.h4
-rw-r--r--engines/wintermute/base/base_sub_frame.cpp36
-rw-r--r--engines/wintermute/base/base_sub_frame.h3
-rw-r--r--engines/wintermute/base/font/base_font_truetype.cpp2
-rw-r--r--engines/wintermute/base/gfx/base_image.cpp6
-rw-r--r--engines/wintermute/base/gfx/base_renderer.h1
-rw-r--r--engines/wintermute/base/gfx/base_surface.cpp2
-rw-r--r--engines/wintermute/base/gfx/base_surface.h14
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.cpp6
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.h4
-rw-r--r--engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp58
-rw-r--r--engines/wintermute/base/gfx/osystem/base_surface_osystem.h20
-rw-r--r--engines/wintermute/base/gfx/osystem/render_ticket.cpp18
-rw-r--r--engines/wintermute/base/gfx/osystem/render_ticket.h8
-rw-r--r--engines/wintermute/base/sound/base_sound_manager.cpp1
-rw-r--r--engines/wintermute/dcgf.h4
-rw-r--r--engines/wintermute/dctypes.h8
-rw-r--r--engines/wintermute/detection_tables.h111
-rw-r--r--engines/wintermute/module.mk3
-rw-r--r--engines/wintermute/utils/utils.cpp5
-rw-r--r--engines/zvision/scripting/actions.cpp12
-rw-r--r--engines/zvision/scripting/controls/input_control.cpp2
-rw-r--r--graphics/VectorRenderer.h4
-rw-r--r--graphics/conversion.h8
-rw-r--r--graphics/fontman.h1
-rw-r--r--graphics/module.mk3
-rw-r--r--graphics/pixelformat.h132
-rw-r--r--graphics/surface.h5
-rw-r--r--graphics/transform_struct.cpp (renamed from engines/wintermute/graphics/transform_struct.cpp)57
-rw-r--r--graphics/transform_struct.h (renamed from engines/wintermute/graphics/transform_struct.h)28
-rw-r--r--graphics/transform_tools.cpp (renamed from engines/wintermute/graphics/transform_tools.cpp)20
-rw-r--r--graphics/transform_tools.h (renamed from engines/wintermute/graphics/transform_tools.h)50
-rw-r--r--graphics/transparent_surface.cpp (renamed from engines/wintermute/graphics/transparent_surface.cpp)479
-rw-r--r--graphics/transparent_surface.h (renamed from engines/wintermute/graphics/transparent_surface.h)94
-rw-r--r--gui/ThemeEngine.h2
-rw-r--r--gui/browser_osx.mm2
-rw-r--r--gui/credits.h15
-rw-r--r--gui/debugger.h2
-rw-r--r--gui/gui-manager.cpp2
-rw-r--r--gui/launcher.cpp22
-rw-r--r--gui/options.cpp16
-rw-r--r--gui/saveload-dialog.cpp6
-rw-r--r--gui/themes/default.inc2
-rw-r--r--gui/themes/scummclassic.zipbin110107 -> 110106 bytes
-rw-r--r--gui/themes/scummclassic/classic_layout.stx2
-rw-r--r--gui/themes/translations.datbin430660 -> 464738 bytes
-rw-r--r--image/codecs/cinepak.cpp9
-rw-r--r--image/tga.cpp2
-rw-r--r--po/be_BY.po237
-rw-r--r--po/ca_ES.po123
-rw-r--r--po/cs_CZ.po115
-rw-r--r--po/da_DA.po152
-rw-r--r--po/de_DE.po160
-rw-r--r--po/es_ES.po213
-rw-r--r--po/eu.po121
-rw-r--r--po/fi_FI.po115
-rw-r--r--po/fr_FR.po161
-rw-r--r--po/gl_ES.po158
-rw-r--r--po/hu_HU.po119
-rw-r--r--po/it_IT.po157
-rw-r--r--po/nb_NO.po193
-rw-r--r--po/nl_NL.po3269
-rw-r--r--po/nn_NO.po514
-rw-r--r--po/pl_PL.po153
-rw-r--r--po/pt_BR.po117
-rw-r--r--po/ru_RU.po189
-rw-r--r--po/scummvm.pot109
-rw-r--r--po/se_SE.po149
-rw-r--r--po/uk_UA.po164
-rw-r--r--ports.mk57
-rw-r--r--test/common/rendermode.h1
-rw-r--r--video/bink_decoder.cpp8
-rw-r--r--video/video_decoder.cpp25
-rw-r--r--video/video_decoder.h11
518 files changed, 24609 insertions, 8742 deletions
diff --git a/AUTHORS b/AUTHORS
index da077dbbaa..37067e5e04 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -70,6 +70,11 @@ ScummVM Team
Arnaud Boutonne
Paul Gilbert
+ CGE2:
+ Peter Bozso
+ Arnaud Boutonne
+ Paul Gilbert
+
Cine:
Vincent Hamm - (retired)
Pawel Kolodziejski
@@ -308,6 +313,7 @@ ScummVM Team
SymbianOS:
Jurgen Braam
Lars Persson
+ Fedor Strizhniou
Tizen / BADA:
Chris Warren-Smith
@@ -400,7 +406,7 @@ Other contributions
Keith Scroggins
BeOS:
- Stefan Parviainen
+ Stefan Parviainen - (retired)
Luc Schrijvers
Debian GNU/Linux:
@@ -410,6 +416,9 @@ Other contributions
Fedora / RedHat:
Willem Jan Palenstijn
+ Haiku:
+ Luc Schrijvers
+
Mac OS X:
Max Horn - (retired)
Oystein Eftevaag
@@ -459,6 +468,9 @@ Other contributions
Danish:
Steffen Nyeland
+ Dutch:
+ Ben Castricum
+
Finnish:
Toni Saarela
diff --git a/COPYRIGHT b/COPYRIGHT
index 2050c6d98f..3344dd64d1 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -65,9 +65,10 @@ Tim Phillips
Edward Rudd
Eugene Sandulenko
Johannes Schickel
+Keith Scroggins
Won Star
Ludvig Strigeus
-Keith Scroggins
+Fedor Strizhniou
David Symonds
Jordi Vilalta
Robin Watts
diff --git a/NEWS b/NEWS
index 3db2bd2b4a..6c174d5f44 100644
--- a/NEWS
+++ b/NEWS
@@ -1,13 +1,15 @@
For a more comprehensive changelog of the latest experimental code, see:
https://github.com/scummvm/scummvm/commits/
-1.7.0 (????-??-??)
+1.8.0 (????-??-??)
+
+1.7.0 (2014-07-21)
New Games:
- Added support for Chivalry is Not Dead.
- Added support for Return to Ringworld.
- Added support for The Neverhood.
- Added support for Mortville Manor.
- - Added support for Voyeur
+ - Added support for Voyeur.
General:
- Updated Munt MT-32 emulation code to version 1.3.0.
@@ -15,6 +17,15 @@ For a more comprehensive changelog of the latest experimental code, see:
libpng, which are faster and can handle more images.
(NOTE: The change to libpng was done in version 1.6.0, but it was not
added to the NEWS file).
+ - Added generic OpenGL (ES) output (based on GSoC Task).
+ - The GUI can now be rendered in 32-bits.
+ - The build system has been changed to be more modular and easier to add new
+ engines.
+
+ SDL:
+ - Added OpenGL graphics mode based on our generic OpenGL output. This
+ allows for arbitrary output sizes. However, it does not support special
+ filters like AdvMAME, HQ, etc.
AGOS:
- Added mouse wheel support for inventory and save game lists.
@@ -39,6 +50,10 @@ For a more comprehensive changelog of the latest experimental code, see:
- Added an option to toggle "Gore Mode" from the ScummVM GUI.
- Fixed bug that could cause the music to stop prematurely.
+ Pegasus:
+ - Fixed several rare crashes and glitches.
+ - Fixed multiple bugs carried over from the original binary.
+
SCI:
- Added support for the more detailed RAVE lip syncing data in the Windows
version of King's Quest 6. Portraits should now be much more expressive
@@ -59,10 +74,30 @@ For a more comprehensive changelog of the latest experimental code, see:
- Improved AdLib support for Loom and Indiana Jones and the Last Crusade.
This makes sound effects like, for example, the typewriter and waterfall
in Indiana Jones and the Last Crusade sound like in the original.
+ - Added support for the Steam versions of Indiana Jones and the Last
+ Crusade, Indiana Jones and the Fate of Atlantis, Loom and The Dig. Both
+ the Windows and the Macintosh versions are supported.
+
+ TONY:
+ - Savegames in Tony Tough now work on big-endian systems.
Tinsel:
- Discworld 1 and 2 no longer crash on big-endian systems.
+ Android port:
+ - Added experimental support for the OUYA console.
+
+ PS2 port:
+ - Added configurable TV modes: NTSC and PAL.
+ - Added configurable graphics modes: SDTV progressive, SDTV interlaced, EDTV
+ progressive and VESA.
+ - Added a configuration option for the HDD partition used.
+ - Added a configuration option for the IP address used.
+ - Added a configuration option to toggle USB mass storage.
+
+ Tizen port:
+ - The BADA port has been merged/updated into Tizen.
+
1.6.0 (2013-05-31)
New Games:
- Added support for 3 Skulls of the Toltecs.
@@ -273,7 +308,7 @@ For a more comprehensive changelog of the latest experimental code, see:
SCI:
- Added better handling of digital vs. synthesized sound effects. If the
- "Mixed Adlib / MIDI mode" checkbox is checked, the engine will prefer
+ "Mixed AdLib / MIDI mode" checkbox is checked, the engine will prefer
digital sound effects, otherwise their synthesized counterparts will be
preferred instead, if both versions of the same effect exist.
diff --git a/README b/README
index a6070e4a34..0a256b39f3 100644
--- a/README
+++ b/README
@@ -42,10 +42,10 @@ Table of Contents:
* 5.3 Graphics Filters
* 5.4 Global Menu
* 5.5 Hotkeys
-6.0) Savegames
+6.0) Saved Games
* 6.1 Autosaves
- * 6.2 Converting savegames
- * 6.3 Viewing/Loading savegames from the command line
+ * 6.2 Converting saved games
+ * 6.3 Viewing/Loading saved games from the command line
7.0) Music and Sound
* 7.1 AdLib emulation
* 7.2 FluidSynth MIDI emulation
@@ -171,7 +171,7 @@ Please include the following information:
- Language of game (English, German, ...)
- Version of game (talkie, floppy, ...)
- Platform and Compiler (Win32, Linux, FreeBSD, ...)
- - Attach a savegame if possible
+ - Attach a saved game if possible
- If this bug only occurred recently, please note the last version
without the bug, and the first version including the bug. That way
we can fix it quicker by looking at the changes made.
@@ -1016,12 +1016,12 @@ arguments -- see the next section.
-h, --help Display a brief help text and exit
-z, --list-games Display list of supported games and exit
-t, --list-targets Display list of configured targets and exit
- --list-saves=TARGET Display a list of savegames for the game (TARGET) specified
+ --list-saves=TARGET Display a list of saved games for the game (TARGET) specified
--console Enable the console window (default: enabled) (Windows only)
-c, --config=CONFIG Use alternate configuration file
-p, --path=PATH Path to where the game is installed
- -x, --save-slot[=NUM] Savegame slot to load (default: autosave)
+ -x, --save-slot[=NUM] Saved game slot to load (default: autosave)
-f, --fullscreen Force full-screen mode
-F, --no-fullscreen Force windowed mode
-g, --gfx-mode=MODE Select graphics scaler (see also section 5.3)
@@ -1050,7 +1050,7 @@ arguments -- see the next section.
--platform=WORD Specify platform of game (allowed values: 2gs, 3do,
acorn, amiga, atari, c64, fmtowns, mac, nes, pc,
pce, segacd, windows)
- --savepath=PATH Path to where savegames are stored
+ --savepath=PATH Path to where saved games are stored
--extrapath=PATH Extra path to additional game data
--soundfont=FILE Select the SoundFont for MIDI playback (Only
supported by some MIDI drivers)
@@ -1268,6 +1268,9 @@ other games.
instead, or a multiple thereof
Alt-Enter - Toggles full screen/windowed
Alt-s - Make a screenshot (SDL backend only)
+ Ctrl-F7 - Open virtual keyboard (if enabled)
+ This can also be triggered by a long press
+ of the middle mouse button or wheel.
SCUMM:
Ctrl 0-9 and Alt 0-9 - Load and save game state
@@ -1414,9 +1417,9 @@ a small subset of these hot keys are supported via key remapping and/or
panel actions. Please consult the README-WinCE.txt file.
-6.0) Savegames:
+6.0) Saved Games:
---- ----------
-Savegames are by default put in the current directory on some platforms
+Saved games are by default put in the current directory on some platforms
and preset directories on others. You can specify the save in the
config file by setting the savepath parameter. See the example config
file later in this README.
@@ -1437,13 +1440,13 @@ The platforms that currently have a different default directory are:
Windows NT4:
<windir>\Profiles\username\Application Data\ScummVM\Saved games\
-Savegames are stored under a hidden area in Windows NT4/2000/XP/Vista/7,
+Saved games are stored under a hidden area in Windows NT4/2000/XP/Vista/7,
which can be accessed by running "%APPDATA%\ScummVM\Saved Games\" or by
enabling hidden files in Windows Explorer.
-Note for Windows NT4/2000/XP/Vista/7 users: The default savegames location
+Note for Windows NT4/2000/XP/Vista/7 users: The default saved games location
changed in ScummVM 1.5.0. The migration batch file can be used to copy
-savegames from the old default location, to the new default location.
+saved games from the old default location, to the new default location.
6.1) Autosaves:
---- ----------
@@ -1451,48 +1454,48 @@ For some games (namely "Beneath a Steel Sky", "Flight of the Amazon
Queen", all AGI games, and all SCUMM games), ScummVM will by default
automatically save the current state every five minutes (adjustable via
the "autosave_period" config setting). For the AGI and SCUMM engines, it
-will save in Slot 0. For the SCUMM engine, this savestate can then be
+will save in Slot 0. For the SCUMM engine, this saved game can then be
loaded again via Ctrl-0, or the F5 menu.
-6.2) Converting Savegames:
+6.2) Converting Saved Games:
---- ---------------------
-Using savegames from original versions isn't supported by all game
-engines. Only the following games can use savegames from their original
+Using saved games from original versions isn't supported by all game
+engines. Only the following games can use saved games from their original
versions.
Elvira 1
- - Add 8 bytes (savegame name) to the start of the savegame file
- - Rename the savegame to 'elvira1.xxx'
+ - Add 8 bytes (saved game name) to the start of the saved game file
+ - Rename the saved game to 'elvira1.xxx'
Elvira 2
- - Add 8 bytes (savegame name) to the start of the savegame file
- - Rename the savegame to 'elvira2-pc.xxx' (DOS version) or
+ - Add 8 bytes (saved game name) to the start of the saved game file
+ - Rename the saved game to 'elvira2-pc.xxx' (DOS version) or
'elvira2.xxx' (Other versions)
Waxworks
- - Add 8 bytes (savegame name) to the start of the savegame file
- - Rename the savegame to 'waxworks-pc.xxx' (DOS version) or
+ - Add 8 bytes (saved game name) to the start of the saved game file
+ - Rename the saved game to 'waxworks-pc.xxx' (DOS version) or
'waxworks.xxx' (Other versions)
Simon the Sorcerer 1
- - Rename the savegame to 'simon1.xxx'
+ - Rename the saved game to 'simon1.xxx'
Simon the Sorcerer 2
- - Rename the savegame to 'simon2.xxx'
+ - Rename the saved game to 'simon2.xxx'
The Feeble Files
- - Rename the savegame to 'feeble.xxx'
+ - Rename the saved game to 'feeble.xxx'
Where 'xxx' is exact the saved game slot (ie 001) under ScummVM
-6.3) Viewing/Loading savegames from the command line:
+6.3) Viewing/Loading saved games from the command line:
---- ------------------------------------------------
--list-saves:
- This switch may be used to display a list of the current savegames
+ This switch may be used to display a list of the current saved games
of the specified target game and their corresponding save slots.
Usage: --list-saves=[TARGET], where [TARGET] is the target game.
@@ -1527,7 +1530,7 @@ Where 'xxx' is exact the saved game slot (ie 001) under ScummVM
--save-slot/-x:
- This switch may be used to load a savegame directly from the command line.
+ This switch may be used to load a saved game directly from the command line.
Usage: --save-slot[SLOT] or -x[SLOT], where [SLOT] is the save slot number.
@@ -2065,9 +2068,9 @@ The following keywords are recognized:
path string The path to where a game's data files are
autosave_period number The seconds between autosaving (default: 300)
- save_slot number The savegame number to load on startup.
+ save_slot number The saved game number to load on startup.
savepath string The path to where a game will store its
- savegames.
+ saved games.
versioninfo string The version of the ScummVM that created the
configuration file.
@@ -2281,15 +2284,15 @@ debug messages (see http://www.sysinternals.com/ntw2k/freeware/debugview.shtml).
respectively
http://wiki.scummvm.org/index.php/Compiling_ScummVM/MinGW
- Microsoft Visual C++ 8/9/10:
- * Read up on how to create the project files in "dists\msvc8",
- "dists\msvc9" respectively "dists\msvc10".
+ Microsoft Visual C++ 9+:
+ * Read up on how to create the project files in the appropriate
+ "dists\msvc*" directory.
* Open the resulting solution file.
* Enter the path to the needed libraries and includes in
Tools|Options|Projects and Solutions|VC++ Directories".
* Now it should compile successfully.
* For more information refer to:
- http://wiki.scummvm.org/index.php/Compiling_ScummVM/VS2005
+ http://wiki.scummvm.org/index.php/Compiling_ScummVM/Visual_Studio
Windows Mobile:
* Please refer to:
diff --git a/audio/audiostream.cpp b/audio/audiostream.cpp
index 4dd5d236be..c413edb73d 100644
--- a/audio/audiostream.cpp
+++ b/audio/audiostream.cpp
@@ -98,7 +98,7 @@ LoopingAudioStream::LoopingAudioStream(RewindableAudioStream *stream, uint loops
// TODO: Properly indicate error
_loops = _completeIterations = 1;
}
- if (stream->endOfData()) {
+ if (stream->endOfStream()) {
// Apparently this is an empty stream
_loops = _completeIterations = 1;
}
@@ -122,7 +122,7 @@ int LoopingAudioStream::readBuffer(int16 *buffer, const int numSamples) {
_loops = _completeIterations = 1;
return samplesRead;
}
- if (_parent->endOfData()) {
+ if (_parent->endOfStream()) {
// Apparently this is an empty stream
_loops = _completeIterations = 1;
}
@@ -134,7 +134,11 @@ int LoopingAudioStream::readBuffer(int16 *buffer, const int numSamples) {
}
bool LoopingAudioStream::endOfData() const {
- return (_loops != 0 && (_completeIterations == _loops));
+ return (_loops != 0 && _completeIterations == _loops) || _parent->endOfData();
+}
+
+bool LoopingAudioStream::endOfStream() const {
+ return _loops != 0 && _completeIterations == _loops;
}
AudioStream *makeLoopingAudioStream(RewindableAudioStream *stream, uint loops) {
@@ -189,7 +193,7 @@ int SubLoopingAudioStream::readBuffer(int16 *buffer, const int numSamples) {
int framesRead = _parent->readBuffer(buffer, framesLeft);
_pos = _pos.addFrames(framesRead);
- if (framesRead < framesLeft && _parent->endOfData()) {
+ if (framesRead < framesLeft && _parent->endOfStream()) {
// TODO: Proper error indication.
_done = true;
return framesRead;
@@ -216,6 +220,18 @@ int SubLoopingAudioStream::readBuffer(int16 *buffer, const int numSamples) {
}
}
+bool SubLoopingAudioStream::endOfData() const {
+ // We're out of data if this stream is finished or the parent
+ // has run out of data for now.
+ return _done || _parent->endOfData();
+}
+
+bool SubLoopingAudioStream::endOfStream() const {
+ // The end of the stream has been reached only when we've gone
+ // through all the iterations.
+ return _done;
+}
+
#pragma mark -
#pragma mark --- SubSeekableAudioStream ---
#pragma mark -
@@ -315,18 +331,27 @@ public:
virtual int readBuffer(int16 *buffer, const int numSamples);
virtual bool isStereo() const { return _stereo; }
virtual int getRate() const { return _rate; }
+
virtual bool endOfData() const {
- //Common::StackLock lock(_mutex);
- return _queue.empty();
+ Common::StackLock lock(_mutex);
+ return _queue.empty() || _queue.front()._stream->endOfData();
+ }
+
+ virtual bool endOfStream() const {
+ Common::StackLock lock(_mutex);
+ return _finished && _queue.empty();
}
- virtual bool endOfStream() const { return _finished && _queue.empty(); }
// Implement the QueuingAudioStream API
virtual void queueAudioStream(AudioStream *stream, DisposeAfterUse::Flag disposeAfterUse);
- virtual void finish() { _finished = true; }
+
+ virtual void finish() {
+ Common::StackLock lock(_mutex);
+ _finished = true;
+ }
uint32 numQueuedStreams() const {
- //Common::StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
return _queue.size();
}
};
@@ -356,11 +381,17 @@ int QueuingAudioStreamImpl::readBuffer(int16 *buffer, const int numSamples) {
AudioStream *stream = _queue.front()._stream;
samplesDecoded += stream->readBuffer(buffer + samplesDecoded, numSamples - samplesDecoded);
- if (stream->endOfData()) {
+ // Done with the stream completely
+ if (stream->endOfStream()) {
StreamHolder tmp = _queue.pop();
if (tmp._disposeAfterUse == DisposeAfterUse::YES)
delete stream;
+ continue;
}
+
+ // Done with data but not the stream, bail out
+ if (stream->endOfData())
+ break;
}
return samplesDecoded;
@@ -416,12 +447,14 @@ public:
return samplesRead;
}
- bool endOfData() const { return _parentStream->endOfData() || _samplesRead >= _totalSamples; }
+ bool endOfData() const { return _parentStream->endOfData() || reachedLimit(); }
+ bool endOfStream() const { return _parentStream->endOfStream() || reachedLimit(); }
bool isStereo() const { return _parentStream->isStereo(); }
int getRate() const { return _parentStream->getRate(); }
private:
int getChannels() const { return isStereo() ? 2 : 1; }
+ bool reachedLimit() const { return _samplesRead >= _totalSamples; }
AudioStream *_parentStream;
DisposeAfterUse::Flag _disposeAfterUse;
diff --git a/audio/audiostream.h b/audio/audiostream.h
index d5d7d0b6c7..347a37b9dc 100644
--- a/audio/audiostream.h
+++ b/audio/audiostream.h
@@ -118,14 +118,13 @@ public:
int readBuffer(int16 *buffer, const int numSamples);
bool endOfData() const;
+ bool endOfStream() const;
bool isStereo() const { return _parent->isStereo(); }
int getRate() const { return _parent->getRate(); }
/**
* Returns number of loops the stream has played.
- *
- * @param numLoops number of loops to play, 0 - infinite
*/
uint getCompleteIterations() const { return _completeIterations; }
private:
@@ -247,7 +246,8 @@ public:
DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES);
int readBuffer(int16 *buffer, const int numSamples);
- bool endOfData() const { return _done; }
+ bool endOfData() const;
+ bool endOfStream() const;
bool isStereo() const { return _parent->isStereo(); }
int getRate() const { return _parent->getRate(); }
@@ -287,7 +287,8 @@ public:
int getRate() const { return _parent->getRate(); }
- bool endOfData() const { return (_pos >= _length) || _parent->endOfStream(); }
+ bool endOfData() const { return (_pos >= _length) || _parent->endOfData(); }
+ bool endOfStream() const { return (_pos >= _length) || _parent->endOfStream(); }
bool seek(const Timestamp &where);
diff --git a/audio/decoders/aac.cpp b/audio/decoders/aac.cpp
index 7700bb3215..beabf7bff9 100644
--- a/audio/decoders/aac.cpp
+++ b/audio/decoders/aac.cpp
@@ -117,6 +117,7 @@ AudioStream *AACDecoder::decodeFrame(Common::SeekableReadStream &stream) {
inBufferPos += frameInfo.bytesconsumed;
}
+ audioStream->finish();
return audioStream;
}
diff --git a/audio/decoders/mp3.cpp b/audio/decoders/mp3.cpp
index 091f64569d..c1b3faaeb1 100644
--- a/audio/decoders/mp3.cpp
+++ b/audio/decoders/mp3.cpp
@@ -59,7 +59,7 @@ protected:
State _state;
Timestamp _length;
- mad_timer_t _totalTime;
+ mad_timer_t _curTime;
mad_stream _stream;
mad_frame _frame;
@@ -99,7 +99,7 @@ MP3Stream::MP3Stream(Common::SeekableReadStream *inStream, DisposeAfterUse::Flag
_posInFrame(0),
_state(MP3_STATE_INIT),
_length(0, 1000),
- _totalTime(mad_timer_zero) {
+ _curTime(mad_timer_zero) {
// The MAD_BUFFER_GUARD must always contain zeros (the reason
// for this is that the Layer III Huffman decoder of libMAD
@@ -119,7 +119,7 @@ MP3Stream::MP3Stream(Common::SeekableReadStream *inStream, DisposeAfterUse::Flag
// Note that we allow "MAD_ERROR_BUFLEN" as error code here, since according
// to mad.h it is also set on EOF.
if ((_stream.error == MAD_ERROR_NONE || _stream.error == MAD_ERROR_BUFLEN) && getRate() > 0)
- _length = Timestamp(mad_timer_count(_totalTime, MAD_UNITS_MILLISECONDS), getRate());
+ _length = Timestamp(mad_timer_count(_curTime, MAD_UNITS_MILLISECONDS), getRate());
deinitStream();
@@ -166,6 +166,8 @@ void MP3Stream::decodeMP3Data() {
}
}
+ // Sum up the total playback time so far
+ mad_timer_add(&_curTime, _frame.header.duration);
// Synthesize PCM data
mad_synth_frame(&_synth, &_frame);
_posInFrame = 0;
@@ -220,10 +222,10 @@ bool MP3Stream::seek(const Timestamp &where) {
mad_timer_t destination;
mad_timer_set(&destination, time / 1000, time % 1000, 1000);
- if (_state != MP3_STATE_READY || mad_timer_compare(destination, _totalTime) < 0)
+ if (_state != MP3_STATE_READY || mad_timer_compare(destination, _curTime) < 0)
initStream();
- while (mad_timer_compare(destination, _totalTime) > 0 && _state != MP3_STATE_EOS)
+ while (mad_timer_compare(destination, _curTime) > 0 && _state != MP3_STATE_EOS)
readHeader();
decodeMP3Data();
@@ -242,7 +244,7 @@ void MP3Stream::initStream() {
// Reset the stream data
_inStream->seek(0, SEEK_SET);
- _totalTime = mad_timer_zero;
+ _curTime = mad_timer_zero;
_posInFrame = 0;
// Update state
@@ -280,7 +282,7 @@ void MP3Stream::readHeader() {
}
// Sum up the total playback time so far
- mad_timer_add(&_totalTime, _frame.header.duration);
+ mad_timer_add(&_curTime, _frame.header.duration);
break;
}
diff --git a/audio/decoders/qdm2.cpp b/audio/decoders/qdm2.cpp
index 743ca1cb7d..97d73b3a03 100644
--- a/audio/decoders/qdm2.cpp
+++ b/audio/decoders/qdm2.cpp
@@ -2607,6 +2607,7 @@ AudioStream *QDM2Stream::decodeFrame(Common::SeekableReadStream &stream) {
while (qdm2_decodeFrame(stream, audioStream))
;
+ audioStream->finish();
return audioStream;
}
diff --git a/audio/decoders/quicktime.cpp b/audio/decoders/quicktime.cpp
index 547abd2aa4..331c850b1a 100644
--- a/audio/decoders/quicktime.cpp
+++ b/audio/decoders/quicktime.cpp
@@ -414,8 +414,15 @@ void QuickTimeAudioDecoder::QuickTimeAudioTrack::skipSamples(const Timestamp &le
}
void QuickTimeAudioDecoder::QuickTimeAudioTrack::findEdit(const Timestamp &position) {
- for (_curEdit = 0; _curEdit < _parentTrack->editCount - 1 && position > Timestamp(0, _parentTrack->editList[_curEdit].timeOffset, _decoder->_timeScale); _curEdit++)
- ;
+ // Go through the edits look for where we find out we need to be. As long
+ // as the position is >= to the edit's start time, it is considered to be in that
+ // edit. seek() already figured out if we reached the last edit, so we don't need
+ // to handle that case here.
+ for (_curEdit = 0; _curEdit < _parentTrack->editCount - 1; _curEdit++) {
+ Timestamp nextEditTime(0, _parentTrack->editList[_curEdit + 1].timeOffset, _decoder->_timeScale);
+ if (position < nextEditTime)
+ break;
+ }
enterNewEdit(position);
}
diff --git a/audio/softsynth/mt32/BReverbModel.cpp b/audio/softsynth/mt32/BReverbModel.cpp
index c16f7f17da..37b3e9670d 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
@@ -34,70 +34,143 @@ static const Bit32u PROCESS_DELAY = 1;
static const Bit32u MODE_3_ADDITIONAL_DELAY = 1;
static const Bit32u MODE_3_FEEDBACK_DELAY = 1;
-// Default reverb settings for modes 0-2. These correspond to CM-32L / LAPC-I "new" reverb settings. MT-32 reverb is a bit different.
+// Default reverb settings for "new" reverb model implemented in CM-32L / LAPC-I.
// Found by tracing reverb RAM data lines (thanks go to Lord_Nightmare & balrog).
+const BReverbSettings &BReverbModel::getCM32L_LAPCSettings(const ReverbMode mode) {
+ static const Bit32u MODE_0_NUMBER_OF_ALLPASSES = 3;
+ static const Bit32u MODE_0_ALLPASSES[] = {994, 729, 78};
+ static const Bit32u MODE_0_NUMBER_OF_COMBS = 4; // Well, actually there are 3 comb filters, but the entrance LPF + delay can be processed via a hacked comb.
+ 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,
+ 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 Bit32u MODE_1_NUMBER_OF_ALLPASSES = 3;
+ static const Bit32u MODE_1_ALLPASSES[] = {1324, 809, 176};
+ static const Bit32u MODE_1_NUMBER_OF_COMBS = 4; // Same as for mode 0 above
+ 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,
+ 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 Bit32u MODE_2_NUMBER_OF_ALLPASSES = 3;
+ static const Bit32u MODE_2_ALLPASSES[] = {969, 644, 157};
+ static const Bit32u MODE_2_NUMBER_OF_COMBS = 4; // Same as for mode 0 above
+ 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,
+ 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 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,
+ 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 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};
+ static const BReverbSettings REVERB_MODE_2_SETTINGS = {MODE_2_NUMBER_OF_ALLPASSES, MODE_2_ALLPASSES, MODE_2_NUMBER_OF_COMBS, MODE_2_COMBS, MODE_2_OUTL, MODE_2_OUTR, MODE_2_COMB_FACTOR, MODE_2_COMB_FEEDBACK, MODE_2_DRY_AMP, MODE_2_WET_AMP, MODE_2_LPF_AMP};
+ static const BReverbSettings REVERB_MODE_3_SETTINGS = {MODE_3_NUMBER_OF_ALLPASSES, NULL, MODE_3_NUMBER_OF_COMBS, MODE_3_DELAY, MODE_3_OUTL, MODE_3_OUTR, MODE_3_COMB_FACTOR, MODE_3_COMB_FEEDBACK, MODE_3_DRY_AMP, MODE_3_WET_AMP, 0};
+
+ static const BReverbSettings * const REVERB_SETTINGS[] = {&REVERB_MODE_0_SETTINGS, &REVERB_MODE_1_SETTINGS, &REVERB_MODE_2_SETTINGS, &REVERB_MODE_3_SETTINGS};
+
+ return *REVERB_SETTINGS[mode];
+}
-static const Bit32u MODE_0_NUMBER_OF_ALLPASSES = 3;
-static const Bit32u MODE_0_ALLPASSES[] = {994, 729, 78};
-static const Bit32u MODE_0_NUMBER_OF_COMBS = 4; // Well, actually there are 3 comb filters, but the entrance LPF + delay can be processed via a hacked comb.
-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,
- 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 Bit32u MODE_1_NUMBER_OF_ALLPASSES = 3;
-static const Bit32u MODE_1_ALLPASSES[] = {1324, 809, 176};
-static const Bit32u MODE_1_NUMBER_OF_COMBS = 4; // Same as for mode 0 above
-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,
- 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 Bit32u MODE_2_NUMBER_OF_ALLPASSES = 3;
-static const Bit32u MODE_2_ALLPASSES[] = {969, 644, 157};
-static const Bit32u MODE_2_NUMBER_OF_COMBS = 4; // Same as for mode 0 above
-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,
- 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 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 Bit32u 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};
-static const BReverbSettings REVERB_MODE_2_SETTINGS = {MODE_2_NUMBER_OF_ALLPASSES, MODE_2_ALLPASSES, MODE_2_NUMBER_OF_COMBS, MODE_2_COMBS, MODE_2_OUTL, MODE_2_OUTR, MODE_2_COMB_FACTOR, MODE_2_COMB_FEEDBACK, MODE_2_DRY_AMP, MODE_2_WET_AMP, MODE_2_LPF_AMP};
-static const BReverbSettings REVERB_MODE_3_SETTINGS = {MODE_3_NUMBER_OF_ALLPASSES, NULL, MODE_3_NUMBER_OF_COMBS, MODE_3_DELAY, MODE_3_OUTL, MODE_3_OUTR, MODE_3_COMB_FACTOR, MODE_3_COMB_FEEDBACK, MODE_3_DRY_AMP, MODE_3_WET_AMP, 0};
-
-static const BReverbSettings * const REVERB_SETTINGS[] = {&REVERB_MODE_0_SETTINGS, &REVERB_MODE_1_SETTINGS, &REVERB_MODE_2_SETTINGS, &REVERB_MODE_3_SETTINGS};
+// Default reverb settings for "old" reverb model implemented in MT-32.
+// Found by tracing reverb RAM data lines (thanks go to Lord_Nightmare & balrog).
+const BReverbSettings &BReverbModel::getMT32Settings(const ReverbMode mode) {
+ static const Bit32u MODE_0_NUMBER_OF_ALLPASSES = 3;
+ static const Bit32u MODE_0_ALLPASSES[] = {994, 729, 78};
+ static const Bit32u MODE_0_NUMBER_OF_COMBS = 4; // Same as above in the new model implementation
+ 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,
+ 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 Bit32u MODE_1_NUMBER_OF_ALLPASSES = 3;
+ static const Bit32u MODE_1_ALLPASSES[] = {1324, 809, 176};
+ static const Bit32u MODE_1_NUMBER_OF_COMBS = 4; // Same as above in the new model implementation
+ 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,
+ 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 Bit32u MODE_2_NUMBER_OF_ALLPASSES = 3;
+ static const Bit32u MODE_2_ALLPASSES[] = {969, 644, 157};
+ static const Bit32u MODE_2_NUMBER_OF_COMBS = 4; // Same as above in the new model implementation
+ 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,
+ 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 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,
+ 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 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};
+ static const BReverbSettings REVERB_MODE_2_SETTINGS = {MODE_2_NUMBER_OF_ALLPASSES, MODE_2_ALLPASSES, MODE_2_NUMBER_OF_COMBS, MODE_2_COMBS, MODE_2_OUTL, MODE_2_OUTR, MODE_2_COMB_FACTOR, MODE_2_COMB_FEEDBACK, MODE_2_DRY_AMP, MODE_2_WET_AMP, MODE_2_LPF_AMP};
+ static const BReverbSettings REVERB_MODE_3_SETTINGS = {MODE_3_NUMBER_OF_ALLPASSES, NULL, MODE_3_NUMBER_OF_COMBS, MODE_3_DELAY, MODE_3_OUTL, MODE_3_OUTR, MODE_3_COMB_FACTOR, MODE_3_COMB_FEEDBACK, MODE_3_DRY_AMP, MODE_3_WET_AMP, 0};
+
+ static const BReverbSettings * const REVERB_SETTINGS[] = {&REVERB_MODE_0_SETTINGS, &REVERB_MODE_1_SETTINGS, &REVERB_MODE_2_SETTINGS, &REVERB_MODE_3_SETTINGS};
+
+ return *REVERB_SETTINGS[mode];
+}
// This algorithm tries to emulate exactly Boss multiplication operation (at least this is what we see on reverb RAM data lines).
// Also LA32 is suspected to use the similar one to perform PCM interpolation and ring modulation.
@@ -153,14 +226,7 @@ bool RingBuffer::isEmpty() const {
}
void RingBuffer::mute() {
-#if MT32EMU_USE_FLOAT_SAMPLES
- Sample *buf = buffer;
- for (Bit32u i = 0; i < size; i++) {
- *buf++ = 0;
- }
-#else
- memset(buffer, 0, size * sizeof(Sample));
-#endif
+ Synth::muteSampleBuffer(buffer, size);
}
AllpassFilter::AllpassFilter(const Bit32u useSize) : RingBuffer(useSize) {}
@@ -195,10 +261,10 @@ void CombFilter::process(const Sample in) {
const Sample last = buffer[index];
// prepare input + feedback
- const Sample filterIn = in + weirdMul(next(), feedbackFactor, 0xF0 /* Maybe 0x80 ? */);
+ const Sample filterIn = in + weirdMul(next(), feedbackFactor, 0xF0);
// store input + feedback processed by a low-pass filter
- buffer[index] = weirdMul(last, filterFactor, 0x40) - filterIn;
+ buffer[index] = weirdMul(last, filterFactor, 0xC0) - filterIn;
}
Sample CombFilter::getOutputAt(const Bit32u outIndex) const {
@@ -256,8 +322,10 @@ void TapDelayCombFilter::setOutputPositions(const Bit32u useOutL, const Bit32u u
outR = useOutR;
}
-BReverbModel::BReverbModel(const ReverbMode mode)
- : allpasses(NULL), combs(NULL), currentSettings(*REVERB_SETTINGS[mode]), tapDelayMode(mode == REVERB_MODE_TAP_DELAY) {}
+BReverbModel::BReverbModel(const ReverbMode mode, const bool mt32CompatibleModel) :
+ allpasses(NULL), combs(NULL),
+ currentSettings(mt32CompatibleModel ? getMT32Settings(mode) : getCM32L_LAPCSettings(mode)),
+ tapDelayMode(mode == REVERB_MODE_TAP_DELAY) {}
BReverbModel::~BReverbModel() {
close();
@@ -334,12 +402,21 @@ void BReverbModel::setParameters(Bit8u time, Bit8u level) {
if (time == 0 && level == 0) {
dryAmp = wetLevel = 0;
} else {
- dryAmp = currentSettings.dryAmps[level];
+ if (tapDelayMode && ((time == 0) || (time == 1 && level == 1))) {
+ // Looks like MT-32 implementation has some minor quirks in this mode:
+ // for odd level values, the output level changes sometimes depending on the time value which doesn't seem right.
+ dryAmp = currentSettings.dryAmps[level + 8];
+ } else {
+ dryAmp = currentSettings.dryAmps[level];
+ }
wetLevel = currentSettings.wetLevels[level];
}
}
bool BReverbModel::isActive() const {
+ if (combs == NULL) {
+ return false;
+ }
for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) {
if (!allpasses[i]->isEmpty()) return true;
}
@@ -349,14 +426,34 @@ bool BReverbModel::isActive() const {
return false;
}
+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) {
+ if (combs == NULL) {
+ Synth::muteSampleBuffer(outLeft, numSamples);
+ Synth::muteSampleBuffer(outRight, numSamples);
+ return;
+ }
+
Sample dry;
- while (numSamples > 0) {
+ while ((numSamples--) > 0) {
if (tapDelayMode) {
- dry = *inLeft + *inRight;
+#if MT32EMU_USE_FLOAT_SAMPLES
+ dry = (*(inLeft++) * 0.5f) + (*(inRight++) * 0.5f);
+#else
+ dry = (*(inLeft++) >> 1) + (*(inRight++) >> 1);
+#endif
} else {
- dry = *inLeft / 2 + *inRight / 2;
+#if MT32EMU_USE_FLOAT_SAMPLES
+ dry = (*(inLeft++) * 0.25f) + (*(inRight++) * 0.25f);
+#elif MT32EMU_BOSS_REVERB_PRECISE_MODE
+ dry = (*(inLeft++) >> 1) / 2 + (*(inRight++) >> 1) / 2;
+#else
+ dry = (*(inLeft++) >> 2) + (*(inRight++) >> 2);
+#endif
}
// Looks like dryAmp doesn't change in MT-32 but it does in CM-32L / LAPC-I
@@ -365,8 +462,12 @@ void BReverbModel::process(const Sample *inLeft, const Sample *inRight, Sample *
if (tapDelayMode) {
TapDelayCombFilter *comb = static_cast<TapDelayCombFilter *> (*combs);
comb->process(dry);
- *outLeft = weirdMul(comb->getLeftOutput(), wetLevel, 0xFF);
- *outRight = weirdMul(comb->getRightOutput(), wetLevel, 0xFF);
+ if (outLeft != NULL) {
+ *(outLeft++) = weirdMul(comb->getLeftOutput(), wetLevel, 0xFF);
+ }
+ if (outRight != NULL) {
+ *(outRight++) = weirdMul(comb->getRightOutput(), wetLevel, 0xFF);
+ }
} else {
// If the output position is equal to the comb size, get it now in order not to loose it
Sample link = combs[0]->getOutputAt(currentSettings.combSizes[0] - 1);
@@ -389,33 +490,38 @@ void BReverbModel::process(const Sample *inLeft, const Sample *inRight, Sample *
combs[2]->process(link);
combs[3]->process(link);
- Sample outL2 = combs[2]->getOutputAt(currentSettings.outLPositions[1]);
- Sample outL3 = combs[3]->getOutputAt(currentSettings.outLPositions[2]);
- Sample outR1 = combs[1]->getOutputAt(currentSettings.outRPositions[0]);
- Sample outR2 = combs[2]->getOutputAt(currentSettings.outRPositions[1]);
- Sample outR3 = combs[3]->getOutputAt(currentSettings.outRPositions[2]);
-
+ if (outLeft != NULL) {
+ Sample outL2 = combs[2]->getOutputAt(currentSettings.outLPositions[1]);
+ Sample outL3 = combs[3]->getOutputAt(currentSettings.outLPositions[2]);
#if MT32EMU_USE_FLOAT_SAMPLES
- *outLeft = 1.5f * (outL1 + outL2) + outL3;
- *outRight = 1.5f * (outR1 + outR2) + outR3;
+ Sample outSample = 1.5f * (outL1 + outL2) + outL3;
+#elif MT32EMU_BOSS_REVERB_PRECISE_MODE
+ /* NOTE:
+ * Thanks to Mok for discovering, the adder in BOSS reverb chip is found to perform addition with saturation to avoid integer overflow.
+ * 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::clipBit16s(Synth::clipBit16s(Synth::clipBit16s(Synth::clipBit16s((Bit32s)outL1 + Bit32s(outL1 >> 1)) + (Bit32s)outL2) + Bit32s(outL2 >> 1)) + (Bit32s)outL3);
#else
- outL1 += outL1 >> 1;
- outL2 += outL2 >> 1;
- *outLeft = outL1 + outL2 + outL3;
-
- outR1 += outR1 >> 1;
- outR2 += outR2 >> 1;
- *outRight = outR1 + outR2 + outR3;
+ Sample outSample = Synth::clipBit16s((Bit32s)outL1 + Bit32s(outL1 >> 1) + (Bit32s)outL2 + Bit32s(outL2 >> 1) + (Bit32s)outL3);
+#endif
+ *(outLeft++) = weirdMul(outSample, wetLevel, 0xFF);
+ }
+ if (outRight != NULL) {
+ Sample outR1 = combs[1]->getOutputAt(currentSettings.outRPositions[0]);
+ Sample outR2 = combs[2]->getOutputAt(currentSettings.outRPositions[1]);
+ Sample outR3 = combs[3]->getOutputAt(currentSettings.outRPositions[2]);
+#if MT32EMU_USE_FLOAT_SAMPLES
+ 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::clipBit16s(Synth::clipBit16s(Synth::clipBit16s(Synth::clipBit16s((Bit32s)outR1 + Bit32s(outR1 >> 1)) + (Bit32s)outR2) + Bit32s(outR2 >> 1)) + (Bit32s)outR3);
+#else
+ Sample outSample = Synth::clipBit16s((Bit32s)outR1 + Bit32s(outR1 >> 1) + (Bit32s)outR2 + Bit32s(outR2 >> 1) + (Bit32s)outR3);
#endif
- *outLeft = weirdMul(*outLeft, wetLevel, 0xFF);
- *outRight = weirdMul(*outRight, wetLevel, 0xFF);
+ *(outRight++) = weirdMul(outSample, wetLevel, 0xFF);
+ }
}
-
- numSamples--;
- inLeft++;
- inRight++;
- outLeft++;
- outRight++;
}
}
diff --git a/audio/softsynth/mt32/BReverbModel.h b/audio/softsynth/mt32/BReverbModel.h
index 7cf431db0d..9b840900c3 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
@@ -97,8 +97,11 @@ class BReverbModel {
Bit32u wetLevel;
void mute();
+ static const BReverbSettings &getCM32L_LAPCSettings(const ReverbMode mode);
+ static const BReverbSettings &getMT32Settings(const ReverbMode mode);
+
public:
- BReverbModel(const ReverbMode mode);
+ BReverbModel(const ReverbMode mode, const bool mt32CompatibleModel = false);
~BReverbModel();
// After construction or a close(), open() must be called at least once before any other call (with the exception of close()).
void open();
@@ -107,6 +110,7 @@ public:
void setParameters(Bit8u time, Bit8u level);
void process(const Sample *inLeft, const Sample *inRight, Sample *outLeft, Sample *outRight, unsigned long numSamples);
bool isActive() const;
+ bool isMT32Compatible(const ReverbMode mode) const;
};
}
diff --git a/audio/softsynth/mt32/LA32FloatWaveGenerator.cpp b/audio/softsynth/mt32/LA32FloatWaveGenerator.cpp
index 0c9687b4d8..9265d80c88 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/LA32FloatWaveGenerator.h b/audio/softsynth/mt32/LA32FloatWaveGenerator.h
index 9046160083..329e5de258 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/LA32Ramp.cpp b/audio/softsynth/mt32/LA32Ramp.cpp
index b4ac6f1d46..454612c842 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/LA32Ramp.h b/audio/softsynth/mt32/LA32Ramp.h
index 8f55941a12..796b4d1eec 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/LA32WaveGenerator.cpp b/audio/softsynth/mt32/LA32WaveGenerator.cpp
index 1d115c12ef..7ac7cc6aaa 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/LA32WaveGenerator.h b/audio/softsynth/mt32/LA32WaveGenerator.h
index b5f4dedff4..212abe2b19 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/Part.cpp b/audio/softsynth/mt32/Part.cpp
index 8a0daf3b38..d92473b5db 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
@@ -33,14 +33,6 @@ static const Bit8u PartialMixStruct[13] = {
1, 3, 3, 2, 2, 2, 2
};
-static const float floatKeyfollow[17] = {
- -1.0f, -1.0f / 2.0f, -1.0f / 4.0f, 0.0f,
- 1.0f / 8.0f, 1.0f / 4.0f, 3.0f / 8.0f, 1.0f / 2.0f, 5.0f / 8.0f, 3.0f / 4.0f, 7.0f / 8.0f, 1.0f,
- 5.0f / 4.0f, 3.0f / 2.0f, 2.0f,
- 1.0009765625f, 1.0048828125f
-};
-
-
RhythmPart::RhythmPart(Synth *useSynth, unsigned int usePartNum): Part(useSynth, usePartNum) {
strcpy(name, "Rhythm");
rhythmTemp = &synth->mt32ram.rhythmTemp[0];
diff --git a/audio/softsynth/mt32/Part.h b/audio/softsynth/mt32/Part.h
index 2aeeaf5bd7..b458fb3988 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/Partial.cpp b/audio/softsynth/mt32/Partial.cpp
index 75e674074f..7dcc6e945a 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/Partial.h b/audio/softsynth/mt32/Partial.h
index 05c1c740c4..749468135d 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/PartialManager.cpp b/audio/softsynth/mt32/PartialManager.cpp
index 905b5b8cf3..fe73087581 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/PartialManager.h b/audio/softsynth/mt32/PartialManager.h
index 229b6e8121..f2e8767bbb 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/Poly.cpp b/audio/softsynth/mt32/Poly.cpp
index 1554881270..e07ceb4231 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/Poly.h b/audio/softsynth/mt32/Poly.h
index 33abc35fdf..9c6431ce36 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/ROMInfo.cpp b/audio/softsynth/mt32/ROMInfo.cpp
index 9d05420874..eb9622620f 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
@@ -20,20 +20,24 @@
namespace MT32Emu {
-// 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, NULL};
-static const ROMInfo CTRL_MT32_V1_05 = {65536, "e17a3a6d265bf1fa150312061134293d2b58288c", ROMInfo::Control, "ctrl_mt32_1_05", "MT-32 Control v1.05", ROMInfo::Full, NULL, NULL};
-static const ROMInfo CTRL_MT32_V1_06 = {65536, "a553481f4e2794c10cfe597fef154eef0d8257de", ROMInfo::Control, "ctrl_mt32_1_06", "MT-32 Control v1.06", ROMInfo::Full, NULL, NULL};
-static const ROMInfo CTRL_MT32_V1_07 = {65536, "b083518fffb7f66b03c23b7eb4f868e62dc5a987", ROMInfo::Control, "ctrl_mt32_1_07", "MT-32 Control v1.07", ROMInfo::Full, NULL, NULL};
-static const ROMInfo CTRL_MT32_BLUER = {65536, "7b8c2a5ddb42fd0732e2f22b3340dcf5360edf92", ROMInfo::Control, "ctrl_mt32_bluer", "MT-32 Control BlueRidge", ROMInfo::Full, NULL, NULL};
+static const ROMInfo *getKnownROMInfoFromList(unsigned int index) {
+ static const ControlROMFeatureSet MT32_COMPATIBLE(true);
+ static const ControlROMFeatureSet CM32L_COMPATIBLE(false);
-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, 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, NULL};
+ // 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 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 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 * const ROM_INFOS[] = {
+ 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 * const ROM_INFOS[] = {
&CTRL_MT32_V1_04,
&CTRL_MT32_V1_05,
&CTRL_MT32_V1_06,
@@ -45,13 +49,16 @@ static const ROMInfo * const ROM_INFOS[] = {
&PCM_CM32L,
NULL};
+ return ROM_INFOS[index];
+}
+
const ROMInfo* ROMInfo::getROMInfo(Common::File *file) {
size_t fileSize = file->size();
// We haven't added the SHA1 checksum code in ScummVM, as the file size
// suffices for our needs for now.
//const char *fileDigest = file->getSHA1();
- for (int i = 0; ROM_INFOS[i] != NULL; i++) {
- const ROMInfo *romInfo = ROM_INFOS[i];
+ for (int i = 0; getKnownROMInfoFromList(i) != NULL; i++) {
+ const ROMInfo *romInfo = getKnownROMInfoFromList(i);
if (fileSize == romInfo->fileSize /*&& !strcmp(fileDigest, romInfo->sha1Digest)*/) {
return romInfo;
}
@@ -65,7 +72,7 @@ void ROMInfo::freeROMInfo(const ROMInfo *romInfo) {
static int getROMCount() {
int count;
- for(count = 0; ROM_INFOS[count] != NULL; count++) {
+ for(count = 0; getKnownROMInfoFromList(count) != NULL; count++) {
}
return count;
}
@@ -73,8 +80,8 @@ static int getROMCount() {
const ROMInfo** ROMInfo::getROMInfoList(unsigned int types, unsigned int pairTypes) {
const ROMInfo **romInfoList = new const ROMInfo*[getROMCount() + 1];
const ROMInfo **currentROMInList = romInfoList;
- for(int i = 0; ROM_INFOS[i] != NULL; i++) {
- const ROMInfo *romInfo = ROM_INFOS[i];
+ for(int i = 0; getKnownROMInfoFromList(i) != NULL; i++) {
+ const ROMInfo *romInfo = getKnownROMInfoFromList(i);
if ((types & (1 << romInfo->type)) && (pairTypes & (1 << romInfo->pairType))) {
*currentROMInList++ = romInfo;
}
@@ -108,4 +115,11 @@ const ROMInfo* ROMImage::getROMInfo() const {
return romInfo;
}
+ControlROMFeatureSet::ControlROMFeatureSet(bool useDefaultReverbMT32Compatible) : defaultReverbMT32Compatible(useDefaultReverbMT32Compatible) {
+}
+
+bool ControlROMFeatureSet::isDefaultReverbMT32Compatible() const {
+ return defaultReverbMT32Compatible;
+}
+
}
diff --git a/audio/softsynth/mt32/ROMInfo.h b/audio/softsynth/mt32/ROMInfo.h
index 1d837dc5ee..cecbb6054f 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
@@ -23,6 +23,8 @@
namespace MT32Emu {
+struct ControlROMFeatureSet;
+
// Defines vital info about ROM file to be used by synth and applications
struct ROMInfo {
@@ -34,7 +36,7 @@ public:
const char *description;
enum PairType {Full, FirstHalf, SecondHalf, Mux0, Mux1} pairType;
ROMInfo *pairROMInfo;
- void *controlROMInfo;
+ const ControlROMFeatureSet *controlROMFeatures;
// Returns a ROMInfo struct by inspecting the size and the SHA1 hash
static const ROMInfo* getROMInfo(Common::File *file);
@@ -72,6 +74,15 @@ public:
const ROMInfo *getROMInfo() const;
};
+struct ControlROMFeatureSet {
+private:
+ unsigned int defaultReverbMT32Compatible : 1;
+
+public:
+ ControlROMFeatureSet(bool defaultReverbMT32Compatible);
+ bool isDefaultReverbMT32Compatible() const;
+};
+
}
#endif
diff --git a/audio/softsynth/mt32/Structures.h b/audio/softsynth/mt32/Structures.h
index 421e427fc0..35dcee90d6 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/Synth.cpp b/audio/softsynth/mt32/Synth.cpp
index efba9b7514..3bff429875 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
@@ -20,13 +20,11 @@
//#include <cstdlib>
//#include <cstring>
-#define FORBIDDEN_SYMBOL_EXCEPTION_printf
-#define FORBIDDEN_SYMBOL_EXCEPTION_vprintf
-
#include "mt32emu.h"
#include "mmath.h"
#include "PartialManager.h"
#include "BReverbModel.h"
+#include "common/debug.h"
namespace MT32Emu {
@@ -42,19 +40,6 @@ static const ControlROMMap ControlROMMaps[7] = {
// (Note that all but CM-32L ROM actually have 86 entries for rhythmTemp)
};
-static inline void muteStream(Sample *stream, Bit32u len) {
- if (stream == NULL) return;
-
-#if MT32EMU_USE_FLOAT_SAMPLES
- // FIXME: Use memset() where compatibility is guaranteed (if this turns out to be a win)
- while (len--) {
- *stream++ = 0.0f;
- }
-#else
- memset(stream, 0, len * sizeof(Sample));
-#endif
-}
-
static inline void advanceStreamPosition(Sample *&stream, Bit32u posDelta) {
if (stream != NULL) {
stream += posDelta;
@@ -74,9 +59,9 @@ Bit8u Synth::calcSysexChecksum(const Bit8u *data, Bit32u len, Bit8u checksum) {
Synth::Synth(ReportHandler *useReportHandler) {
isOpen = false;
- reverbEnabled = true;
reverbOverridden = false;
partialCount = DEFAULT_MAX_PARTIALS;
+ controlROMFeatures = NULL;
if (useReportHandler == NULL) {
reportHandler = new ReportHandler;
@@ -86,11 +71,9 @@ Synth::Synth(ReportHandler *useReportHandler) {
isDefaultReportHandler = false;
}
- reverbModels[REVERB_MODE_ROOM] = new BReverbModel(REVERB_MODE_ROOM);
- reverbModels[REVERB_MODE_HALL] = new BReverbModel(REVERB_MODE_HALL);
- reverbModels[REVERB_MODE_PLATE] = new BReverbModel(REVERB_MODE_PLATE);
- reverbModels[REVERB_MODE_TAP_DELAY] = new BReverbModel(REVERB_MODE_TAP_DELAY);
-
+ for (int i = 0; i < 4; i++) {
+ reverbModels[i] = NULL;
+ }
reverbModel = NULL;
setDACInputMode(DACInputMode_NICE);
setMIDIDelayMode(MIDIDelayMode_DELAY_SHORT_MESSAGES_ONLY);
@@ -106,22 +89,29 @@ Synth::Synth(ReportHandler *useReportHandler) {
Synth::~Synth() {
close(); // Make sure we're closed and everything is freed
- for (int i = 0; i < 4; i++) {
- delete reverbModels[i];
- }
if (isDefaultReportHandler) {
delete reportHandler;
}
}
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
}
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) {
@@ -143,11 +133,22 @@ void Synth::printDebug(const char *fmt, ...) {
}
void Synth::setReverbEnabled(bool newReverbEnabled) {
- reverbEnabled = newReverbEnabled;
+ if (isReverbEnabled() == newReverbEnabled) return;
+ if (newReverbEnabled) {
+ bool oldReverbOverridden = reverbOverridden;
+ reverbOverridden = false;
+ refreshSystemReverbParameters();
+ reverbOverridden = oldReverbOverridden;
+ } else {
+#if MT32EMU_REDUCE_REVERB_MEMORY
+ reverbModel->close();
+#endif
+ reverbModel = NULL;
+ }
}
bool Synth::isReverbEnabled() const {
- return reverbEnabled;
+ return reverbModel != NULL;
}
void Synth::setReverbOverridden(bool newReverbOverridden) {
@@ -158,7 +159,40 @@ bool Synth::isReverbOverridden() const {
return reverbOverridden;
}
+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);
+ }
+}
+
+bool Synth::isMT32ReverbCompatibilityMode() const {
+ return isOpen && (reverbModels[REVERB_MODE_ROOM]->isMT32Compatible(REVERB_MODE_ROOM));
+}
+
void Synth::setDACInputMode(DACInputMode mode) {
+#if MT32EMU_USE_FLOAT_SAMPLES
+ // We aren't emulating these in float mode, so better to inform the invoker
+ if ((mode == DACInputMode_GENERATION1) || (mode == DACInputMode_GENERATION2)) {
+ mode = DACInputMode_NICE;
+ }
+#endif
dacInputMode = mode;
}
@@ -174,10 +208,13 @@ MIDIDelayMode Synth::getMIDIDelayMode() const {
return midiDelayMode;
}
-#if MT32EMU_USE_FLOAT_SAMPLES
-
void Synth::setOutputGain(float newOutputGain) {
+ if (newOutputGain < 0.0f) newOutputGain = -newOutputGain;
outputGain = newOutputGain;
+#if !MT32EMU_USE_FLOAT_SAMPLES
+ if (256.0f < newOutputGain) newOutputGain = 256.0f;
+ effectiveOutputGain = int(newOutputGain * 256.0f);
+#endif
}
float Synth::getOutputGain() const {
@@ -185,38 +222,21 @@ float Synth::getOutputGain() const {
}
void Synth::setReverbOutputGain(float newReverbOutputGain) {
+ if (newReverbOutputGain < 0.0f) newReverbOutputGain = -newReverbOutputGain;
reverbOutputGain = newReverbOutputGain;
+ if (!isMT32ReverbCompatibilityMode()) newReverbOutputGain *= CM32L_REVERB_TO_LA32_ANALOG_OUTPUT_GAIN_FACTOR;
+#if MT32EMU_USE_FLOAT_SAMPLES
+ effectiveReverbOutputGain = newReverbOutputGain;
+#else
+ if (256.0f < newReverbOutputGain) newReverbOutputGain = 256.0f;
+ effectiveReverbOutputGain = int(newReverbOutputGain * 256.0f);
+#endif
}
float Synth::getReverbOutputGain() const {
return reverbOutputGain;
}
-#else // #if MT32EMU_USE_FLOAT_SAMPLES
-
-void Synth::setOutputGain(float newOutputGain) {
- if (newOutputGain < 0.0f) newOutputGain = -newOutputGain;
- if (256.0f < newOutputGain) newOutputGain = 256.0f;
- outputGain = int(newOutputGain * 256.0f);
-}
-
-float Synth::getOutputGain() const {
- return outputGain / 256.0f;
-}
-
-void Synth::setReverbOutputGain(float newReverbOutputGain) {
- if (newReverbOutputGain < 0.0f) newReverbOutputGain = -newReverbOutputGain;
- float maxValue = 256.0f / CM32L_REVERB_TO_LA32_ANALOG_OUTPUT_GAIN_FACTOR;
- if (maxValue < newReverbOutputGain) newReverbOutputGain = maxValue;
- reverbOutputGain = int(newReverbOutputGain * 256.0f);
-}
-
-float Synth::getReverbOutputGain() const {
- return reverbOutputGain / 256.0f;
-}
-
-#endif // #if MT32EMU_USE_FLOAT_SAMPLES
-
void Synth::setReversedStereoEnabled(bool enabled) {
reversedStereoEnabled = enabled;
}
@@ -226,7 +246,6 @@ bool Synth::isReversedStereoEnabled() {
}
bool Synth::loadControlROM(const ROMImage &controlROMImage) {
- if (&controlROMImage == NULL) return false;
Common::File *file = controlROMImage.getFile();
const ROMInfo *controlROMInfo = controlROMImage.getROMInfo();
if ((controlROMInfo == NULL)
@@ -234,6 +253,14 @@ bool Synth::loadControlROM(const ROMImage &controlROMImage) {
|| (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");
+#endif
+ return false;
+ }
+
#if MT32EMU_MONITOR_INIT
printDebug("Found Control ROM: %s, %s", controlROMInfo->shortName, controlROMInfo->description);
#endif
@@ -254,7 +281,6 @@ bool Synth::loadControlROM(const ROMImage &controlROMImage) {
}
bool Synth::loadPCMROM(const ROMImage &pcmROMImage) {
- if (&pcmROMImage == NULL) return false;
Common::File *file = pcmROMImage.getFile();
const ROMInfo *pcmROMInfo = pcmROMImage.getROMInfo();
if ((pcmROMInfo == NULL)
@@ -373,14 +399,6 @@ bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, u
}
partialCount = usePartialCount;
abortingPoly = NULL;
-#if MT32EMU_MONITOR_INIT
- printDebug("Initialising Constant Tables");
-#endif
-#if !MT32EMU_REDUCE_REVERB_MEMORY
- for (int i = REVERB_MODE_ROOM; i <= REVERB_MODE_TAP_DELAY; i++) {
- reverbModels[i]->open();
- }
-#endif
// This is to help detect bugs
memset(&mt32ram, '?', sizeof(mt32ram));
@@ -412,6 +430,15 @@ bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, u
}
#if MT32EMU_MONITOR_INIT
+ printDebug("Initialising Reverb Models");
+#endif
+ bool mt32CompatibleReverb = controlROMFeatures->isDefaultReverbMT32Compatible();
+#if MT32EMU_MONITOR_INIT
+ printDebug("Using %s Compatible Reverb Models", mt32CompatibleReverb ? "MT-32" : "CM-32L");
+#endif
+ setReverbCompatibilityMode(mt32CompatibleReverb);
+
+#if MT32EMU_MONITOR_INIT
printDebug("Initialising Timbre Bank A");
#endif
if (!initTimbres(controlROMMap->timbreAMap, controlROMMap->timbreAOffset, 0x40, 0, controlROMMap->timbreACompressed)) {
@@ -484,7 +511,11 @@ bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, u
mt32ram.system.chanAssign[i] = i + 1;
}
mt32ram.system.masterVol = 100; // Confirmed
+
+ bool oldReverbOverridden = reverbOverridden;
+ reverbOverridden = false;
refreshSystem();
+ reverbOverridden = oldReverbOverridden;
for (int i = 0; i < 9; i++) {
MemParams::PatchTemp *patchTemp = &mt32ram.patchTemp[i];
@@ -526,8 +557,8 @@ bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, u
return true;
}
-void Synth::close() {
- if (!isOpen) {
+void Synth::close(bool forced) {
+ if (!forced && !isOpen) {
return;
}
@@ -548,9 +579,11 @@ void Synth::close() {
deleteMemoryRegions();
for (int i = 0; i < 4; i++) {
- reverbModels[i]->close();
+ delete reverbModels[i];
+ reverbModels[i] = NULL;
}
reverbModel = NULL;
+ controlROMFeatures = NULL;
isOpen = false;
}
@@ -1249,7 +1282,7 @@ void Synth::refreshSystemReverbParameters() {
#if MT32EMU_MONITOR_SYSEX > 0
printDebug(" Reverb: mode=%d, time=%d, level=%d", mt32ram.system.reverbMode, mt32ram.system.reverbTime, mt32ram.system.reverbLevel);
#endif
- if (reverbOverridden && reverbModel != NULL) {
+ if (reverbOverridden) {
#if MT32EMU_MONITOR_SYSEX > 0
printDebug(" (Reverb overridden - ignoring)");
#endif
@@ -1259,17 +1292,31 @@ void Synth::refreshSystemReverbParameters() {
reportHandler->onNewReverbTime(mt32ram.system.reverbTime);
reportHandler->onNewReverbLevel(mt32ram.system.reverbLevel);
- BReverbModel *newReverbModel = reverbModels[mt32ram.system.reverbMode];
+ BReverbModel *oldReverbModel = reverbModel;
+ if (mt32ram.system.reverbTime == 0 && mt32ram.system.reverbLevel == 0) {
+ // Setting both time and level to 0 effectively disables wet reverb output on real devices.
+ // Take a shortcut in this case to reduce CPU load.
+ reverbModel = NULL;
+ } else {
+ reverbModel = reverbModels[mt32ram.system.reverbMode];
+ }
+ if (reverbModel != oldReverbModel) {
#if MT32EMU_REDUCE_REVERB_MEMORY
- if (reverbModel != newReverbModel) {
- if (reverbModel != NULL) {
- reverbModel->close();
+ if (oldReverbModel != NULL) {
+ oldReverbModel->close();
+ }
+ if (isReverbEnabled()) {
+ reverbModel->open();
+ }
+#else
+ if (isReverbEnabled()) {
+ reverbModel->mute();
}
- newReverbModel->open();
- }
#endif
- reverbModel = newReverbModel;
- reverbModel->setParameters(mt32ram.system.reverbTime, mt32ram.system.reverbLevel);
+ }
+ if (isReverbEnabled()) {
+ reverbModel->setParameters(mt32ram.system.reverbTime, mt32ram.system.reverbLevel);
+ }
}
void Synth::refreshSystemReserveSettings() {
@@ -1468,94 +1515,103 @@ void Synth::renderStreams(Sample *nonReverbLeft, Sample *nonReverbRight, Sample
}
}
-void Synth::convertSamplesToOutput(Sample *target, const Sample *source, Bit32u len, bool reverb) {
- if (target == NULL) return;
-
- if (dacInputMode == DACInputMode_PURE) {
- memcpy(target, source, len * sizeof(Sample));
- return;
- }
-
-#if MT32EMU_USE_FLOAT_SAMPLES
- float gain = reverb ? reverbOutputGain * CM32L_REVERB_TO_LA32_ANALOG_OUTPUT_GAIN_FACTOR : 2.0f * outputGain;
- while (len--) {
- *(target++) = *(source++) * gain;
- }
-#else
- int gain;
- if (reverb) {
- gain = int(reverbOutputGain * CM32L_REVERB_TO_LA32_ANALOG_OUTPUT_GAIN_FACTOR);
- } else {
- gain = outputGain;
- switch (dacInputMode) {
- case DACInputMode_NICE:
- // Since we're not shooting for accuracy here, don't worry about the rounding mode.
- gain <<= 1;
- break;
- case DACInputMode_GENERATION1:
+// 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) {
+#if !MT32EMU_USE_FLOAT_SAMPLES
+ switch (dacInputMode) {
+ case DACInputMode_GENERATION2:
while (len--) {
- *target = clipBit16s(Bit32s((*source * gain) >> 8));
- *target = (*target & 0x8000) | ((*target << 1) & 0x7FFE);
- source++;
- target++;
+ *buffer = (*buffer & 0x8000) | ((*buffer << 1) & 0x7FFE) | ((*buffer >> 14) & 0x0001);
+ ++buffer;
}
- return;
- case DACInputMode_GENERATION2:
+ break;
+ case DACInputMode_NICE:
while (len--) {
- *target = clipBit16s(Bit32s((*source * gain) >> 8));
- *target = (*target & 0x8000) | ((*target << 1) & 0x7FFE) | ((*target >> 14) & 0x0001);
- source++;
- target++;
+ *buffer = clipBit16s(Bit32s(*buffer) << 1);
+ ++buffer;
}
- return;
+ break;
default:
break;
+ }
+#endif
+}
+
+void Synth::convertSamplesToOutput(Sample *buffer, Bit32u len, bool reverb) {
+ if (dacInputMode == DACInputMode_PURE) return;
+
+#if MT32EMU_USE_FLOAT_SAMPLES
+ float gain = reverb ? effectiveReverbOutputGain : outputGain;
+ while (len--) {
+ *(buffer++) *= gain;
+ }
+#else
+ int gain = reverb ? effectiveReverbOutputGain : effectiveOutputGain;
+ if (dacInputMode == DACInputMode_GENERATION1) {
+ while (len--) {
+ Bit32s target = Bit16s((*buffer & 0x8000) | ((*buffer << 1) & 0x7FFE));
+ *(buffer++) = clipBit16s((target * gain) >> 8);
}
+ return;
}
while (len--) {
- *(target++) = clipBit16s(Bit32s((*(source++) * gain) >> 8));
+ *buffer = clipBit16s((Bit32s(*buffer) * gain) >> 8);
+ ++buffer;
}
#endif
}
void Synth::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;
+ if (nonReverbLeft == NULL) nonReverbRight = tmpBufNonReverbRight;
+
+ Sample tmpBufReverbDryLeft[MAX_SAMPLES_PER_RUN], tmpBufReverbDryRight[MAX_SAMPLES_PER_RUN];
+ if (reverbDryLeft == NULL) reverbDryLeft = tmpBufReverbDryLeft;
+ if (reverbDryRight == NULL) reverbDryRight = tmpBufReverbDryRight;
+
+ muteSampleBuffer(nonReverbLeft, len);
+ muteSampleBuffer(nonReverbRight, len);
+ muteSampleBuffer(reverbDryLeft, len);
+ muteSampleBuffer(reverbDryRight, len);
+
if (isEnabled) {
- Sample tmpBufMixLeft[MAX_SAMPLES_PER_RUN], tmpBufMixRight[MAX_SAMPLES_PER_RUN];
- muteStream(tmpBufMixLeft, len);
- muteStream(tmpBufMixRight, len);
for (unsigned int i = 0; i < getPartialCount(); i++) {
- if (!reverbEnabled || !partialManager->shouldReverb(i)) {
- partialManager->produceOutput(i, tmpBufMixLeft, tmpBufMixRight, len);
+ if (partialManager->shouldReverb(i)) {
+ partialManager->produceOutput(i, reverbDryLeft, reverbDryRight, len);
+ } else {
+ partialManager->produceOutput(i, nonReverbLeft, nonReverbRight, len);
}
}
- convertSamplesToOutput(nonReverbLeft, tmpBufMixLeft, len, false);
- convertSamplesToOutput(nonReverbRight, tmpBufMixRight, len, false);
- } else {
- muteStream(nonReverbLeft, len);
- muteStream(nonReverbRight, len);
- }
- if (isEnabled && reverbEnabled) {
- Sample tmpBufMixLeft[MAX_SAMPLES_PER_RUN], tmpBufMixRight[MAX_SAMPLES_PER_RUN];
- muteStream(tmpBufMixLeft, len);
- muteStream(tmpBufMixRight, len);
- for (unsigned int i = 0; i < getPartialCount(); i++) {
- if (partialManager->shouldReverb(i)) {
- partialManager->produceOutput(i, tmpBufMixLeft, tmpBufMixRight, len);
- }
+ produceLA32Output(reverbDryLeft, len);
+ produceLA32Output(reverbDryRight, len);
+
+ if (isReverbEnabled()) {
+ reverbModel->process(reverbDryLeft, reverbDryRight, reverbWetLeft, reverbWetRight, len);
+ if (reverbWetLeft != NULL) convertSamplesToOutput(reverbWetLeft, len, true);
+ if (reverbWetRight != NULL) convertSamplesToOutput(reverbWetRight, len, true);
+ } else {
+ muteSampleBuffer(reverbWetLeft, len);
+ muteSampleBuffer(reverbWetRight, len);
}
- convertSamplesToOutput(reverbDryLeft, tmpBufMixLeft, len, false);
- convertSamplesToOutput(reverbDryRight, tmpBufMixRight, len, false);
- Sample tmpBufReverbOutLeft[MAX_SAMPLES_PER_RUN], tmpBufReverbOutRight[MAX_SAMPLES_PER_RUN];
- reverbModel->process(tmpBufMixLeft, tmpBufMixRight, tmpBufReverbOutLeft, tmpBufReverbOutRight, len);
- convertSamplesToOutput(reverbWetLeft, tmpBufReverbOutLeft, len, true);
- convertSamplesToOutput(reverbWetRight, tmpBufReverbOutRight, len, true);
+ // Don't bother with conversion if the output is going to be unused
+ if (nonReverbLeft != tmpBufNonReverbLeft) {
+ produceLA32Output(nonReverbLeft, len);
+ convertSamplesToOutput(nonReverbLeft, len, false);
+ }
+ if (nonReverbRight != tmpBufNonReverbRight) {
+ produceLA32Output(nonReverbRight, len);
+ convertSamplesToOutput(nonReverbRight, len, false);
+ }
+ if (reverbDryLeft != tmpBufReverbDryLeft) convertSamplesToOutput(reverbDryLeft, len, false);
+ if (reverbDryRight != tmpBufReverbDryRight) convertSamplesToOutput(reverbDryRight, len, false);
} else {
- muteStream(reverbDryLeft, len);
- muteStream(reverbDryRight, len);
- muteStream(reverbWetLeft, len);
- muteStream(reverbWetRight, len);
+ muteSampleBuffer(reverbWetLeft, len);
+ muteSampleBuffer(reverbWetRight, len);
}
partialManager->clearAlreadyOutputed();
@@ -1589,7 +1645,7 @@ bool Synth::isActive() const {
if (hasActivePartials()) {
return true;
}
- if (reverbEnabled) {
+ if (isReverbEnabled()) {
return reverbModel->isActive();
}
return false;
diff --git a/audio/softsynth/mt32/Synth.h b/audio/softsynth/mt32/Synth.h
index 8816711bf3..37fb7b280a 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
@@ -322,6 +322,7 @@ private:
PCMWaveEntry *pcmWaves; // Array
+ const ControlROMFeatureSet *controlROMFeatures;
const ControlROMMap *controlROMMap;
Bit8u controlROMData[CONTROL_ROM_SIZE];
Bit16s *pcmROMData;
@@ -338,18 +339,18 @@ private:
BReverbModel *reverbModels[4];
BReverbModel *reverbModel;
- bool reverbEnabled;
bool reverbOverridden;
MIDIDelayMode midiDelayMode;
DACInputMode dacInputMode;
-#if MT32EMU_USE_FLOAT_SAMPLES
float outputGain;
float reverbOutputGain;
+#if MT32EMU_USE_FLOAT_SAMPLES
+ float effectiveReverbOutputGain;
#else
- int outputGain;
- int reverbOutputGain;
+ int effectiveOutputGain;
+ int effectiveReverbOutputGain;
#endif
bool reversedStereoEnabled;
@@ -370,7 +371,8 @@ private:
Bit32u getShortMessageLength(Bit32u msg);
Bit32u addMIDIInterfaceDelay(Bit32u len, Bit32u timestamp);
- void convertSamplesToOutput(Sample *target, const Sample *source, Bit32u len, bool reverb);
+ void produceLA32Output(Sample *buffer, Bit32u len);
+ void convertSamplesToOutput(Sample *buffer, Bit32u len, bool reverb);
bool isAbortingPoly() const;
void doRenderStreams(Sample *nonReverbLeft, Sample *nonReverbRight, Sample *reverbDryLeft, Sample *reverbDryRight, Sample *reverbWetLeft, Sample *reverbWetRight, Bit32u len);
@@ -405,10 +407,23 @@ private:
public:
static inline Bit16s clipBit16s(Bit32s sample) {
// Clamp values above 32767 to 32767, and values below -32768 to -32768
- if ((sample + 32768) & ~65535) {
- return (sample >> 31) ^ 32767;
+ // 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 ((sample + 0x8000) & ~0xFFFF) ? (sample >> 31) ^ 0x7FFF : (Bit16s)sample;
+ return ((-0x8000 <= sample) && (sample <= 0x7FFF)) ? (Bit16s)sample : (sample >> 31) ^ 0x7FFF;
+ }
+
+ static inline void muteSampleBuffer(Sample *buffer, Bit32u len) {
+ if (buffer == NULL) return;
+
+#if MT32EMU_USE_FLOAT_SAMPLES
+ // FIXME: Use memset() where compatibility is guaranteed (if this turns out to be a win)
+ while (len--) {
+ *(buffer++) = 0.0f;
}
- return (Bit16s)sample;
+#else
+ memset(buffer, 0, len * sizeof(Sample));
+#endif
}
static Bit8u calcSysexChecksum(const Bit8u *data, Bit32u len, Bit8u checksum);
@@ -424,7 +439,7 @@ public:
bool open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage, unsigned int usePartialCount = DEFAULT_MAX_PARTIALS);
// Closes the MT-32 and deallocates any memory used by the synthesizer
- void close(void);
+ void close(bool forced = false);
// All the enqueued events are processed by the synth immediately.
void flushMIDIQueue();
@@ -464,8 +479,17 @@ public:
void setReverbEnabled(bool reverbEnabled);
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;
+ // 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);
diff --git a/audio/softsynth/mt32/TVA.cpp b/audio/softsynth/mt32/TVA.cpp
index 5438471fa4..3fefb791f2 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/TVA.h b/audio/softsynth/mt32/TVA.h
index e6e5cc4bc7..a100107a69 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/TVF.cpp b/audio/softsynth/mt32/TVF.cpp
index 49a0d85c9e..bf8d50a7c9 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/TVF.h b/audio/softsynth/mt32/TVF.h
index 22d81da7b0..1e2c6d1728 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/TVP.cpp b/audio/softsynth/mt32/TVP.cpp
index 8f68245753..374646e5f1 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/TVP.h b/audio/softsynth/mt32/TVP.h
index cd5fb4cdc7..e9d05ffa7a 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/Tables.cpp b/audio/softsynth/mt32/Tables.cpp
index 743820b1f8..ae9f11fff0 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/Tables.h b/audio/softsynth/mt32/Tables.h
index bfb80e121e..e7b97af515 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/mmath.h b/audio/softsynth/mt32/mmath.h
index ee6a652c36..602242e74f 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/audio/softsynth/mt32/mt32emu.h b/audio/softsynth/mt32/mt32emu.h
index ab963886ac..d738a5de35 100644
--- 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013, 2014 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
diff --git a/backends/audiocd/audiocd.h b/backends/audiocd/audiocd.h
index db9a15505a..6eae8e096b 100644
--- a/backends/audiocd/audiocd.h
+++ b/backends/audiocd/audiocd.h
@@ -58,8 +58,8 @@ public:
/**
* Start audio CD playback
* @param track the track to play.
- * @param num_loops how often playback should be repeated (-1 = infinitely often).
- * @param start_frame the frame at which playback should start (75 frames = 1 second).
+ * @param numLoops how often playback should be repeated (-1 = infinitely often).
+ * @param startFrame the frame at which playback should start (75 frames = 1 second).
* @param duration the number of frames to play.
* @param only_emulate determines if the track should be emulated only
*/
diff --git a/backends/events/dinguxsdl/dinguxsdl-events.cpp b/backends/events/dinguxsdl/dinguxsdl-events.cpp
index 46089a4fcd..6f9f2a7748 100644
--- a/backends/events/dinguxsdl/dinguxsdl-events.cpp
+++ b/backends/events/dinguxsdl/dinguxsdl-events.cpp
@@ -144,8 +144,9 @@ bool DINGUXSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
return true;
} else if (ev.key.keysym.sym == BUT_SELECT) { // virtual keyboard
- ev.key.keysym.sym = SDLK_F7;
-
+#ifdef ENABLE_VKEYBD
+ event.type = Common::EVENT_VIRTUAL_KEYBOARD;
+#endif
} else if (ev.key.keysym.sym == BUT_START) { // F5, menu in some games
ev.key.keysym.sym = SDLK_F5;
diff --git a/backends/events/gph/gph-events.cpp b/backends/events/gph/gph-events.cpp
index 90b6a2a29d..88fc97d3d1 100644
--- a/backends/events/gph/gph-events.cpp
+++ b/backends/events/gph/gph-events.cpp
@@ -348,8 +348,7 @@ bool GPHEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_KEYDOWN;
if (BUTTON_STATE_L == true) {
#ifdef ENABLE_VKEYBD
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = mapKey(SDLK_F7, ev.key.keysym.mod, 0);
+ event.type = Common::EVENT_VIRTUAL_KEYBOARD;
#else
event.kbd.keycode = Common::KEYCODE_0;
event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0);
diff --git a/backends/events/linuxmotosdl/linuxmotosdl-events.cpp b/backends/events/linuxmotosdl/linuxmotosdl-events.cpp
index ce34662612..b0d443ff9f 100644
--- a/backends/events/linuxmotosdl/linuxmotosdl-events.cpp
+++ b/backends/events/linuxmotosdl/linuxmotosdl-events.cpp
@@ -73,7 +73,10 @@ bool LinuxmotoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
}
// VirtualKeyboard - Camera key
else if (ev.key.keysym.sym == SDLK_PAUSE) {
- ev.key.keysym.sym = SDLK_F7;
+#ifdef ENABLE_VKEYBD
+ event.type = Common::EVENT_VIRTUAL_KEYBOARD;
+ return true;
+#endif
}
// Enter - mod+fire key
else if (ev.key.keysym.sym == SDLK_b) {
@@ -117,7 +120,10 @@ bool LinuxmotoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
}
// VirtualKeyboard - Right Soft key
else if (ev.key.keysym.sym == SDLK_F11) {
- ev.key.keysym.sym = SDLK_F7;
+#ifdef ENABLE_VKEYBD
+ event.type = Common::EVENT_VIRTUAL_KEYBOARD;
+ return true;
+#endif
}
#endif
diff --git a/backends/events/maemosdl/maemosdl-events.cpp b/backends/events/maemosdl/maemosdl-events.cpp
index 5045363286..8b7514004a 100644
--- a/backends/events/maemosdl/maemosdl-events.cpp
+++ b/backends/events/maemosdl/maemosdl-events.cpp
@@ -86,12 +86,11 @@ bool MaemoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
return true;
} else if (ev.key.keysym.sym == SDLK_F6) {
if (!model.hasHwKeyboard) {
- event.type = Common::EVENT_KEYDOWN;
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = Common::ASCII_F7;
- event.kbd.flags = 0;
- debug(9, "remapping to F7 down (virtual keyboard)");
+#ifdef ENABLE_VKEYBD
+ event.type = Common::EVENT_VIRTUAL_KEYBOARD;
+ debug(9, "remapping to virtual keyboard trigger");
return true;
+#endif
} else {
// handled in keyup
}
@@ -102,12 +101,11 @@ bool MaemoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
return true;
} else if (ev.key.keysym.sym == SDLK_F8) {
if (ev.key.keysym.mod & KMOD_CTRL) {
- event.type = Common::EVENT_KEYDOWN;
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = Common::ASCII_F7;
- event.kbd.flags = 0;
- debug(9, "remapping to F7 down (virtual keyboard)");
+#ifdef ENABLE_VKEYBD
+ event.type = Common::EVENT_VIRTUAL_KEYBOARD;
+ debug(9, "remapping to virtual keyboard trigger");
return true;
+#endif
} else {
// handled in keyup
return true;
@@ -125,12 +123,7 @@ bool MaemoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
return true;
} else if (ev.key.keysym.sym == SDLK_F6) {
if (!model.hasHwKeyboard) {
- event.type = Common::EVENT_KEYUP;
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = Common::ASCII_F7;
- event.kbd.flags = 0;
- debug(9, "remapping to F7 down (virtual keyboard)");
- return true;
+ // handled in keydown
} else {
bool currentState = ((OSystem_SDL *)g_system)->getGraphicsManager()->getFeatureState(OSystem::kFeatureFullscreenMode);
g_system->beginGFXTransaction();
@@ -146,12 +139,7 @@ bool MaemoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
return true;
} else if (ev.key.keysym.sym == SDLK_F8) {
if (ev.key.keysym.mod & KMOD_CTRL) {
- event.type = Common::EVENT_KEYUP;
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = Common::ASCII_F7;
- event.kbd.flags = 0;
- debug(9, "remapping to F7 up (virtual keyboard)");
- return true;
+ // handled in key down
} else {
toggleClickMode();
debug(9, "remapping to click toggle");
diff --git a/backends/events/ps3sdl/ps3sdl-events.cpp b/backends/events/ps3sdl/ps3sdl-events.cpp
index 1a854436f1..0f6e01857b 100644
--- a/backends/events/ps3sdl/ps3sdl-events.cpp
+++ b/backends/events/ps3sdl/ps3sdl-events.cpp
@@ -72,9 +72,9 @@ bool PS3SdlEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event)
event.kbd.ascii = mapKey(SDLK_F5, (SDLMod) ev.key.keysym.mod, 0);
break;
case BTN_SELECT: // Virtual keyboard
- event.type = Common::EVENT_KEYDOWN;
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = mapKey(SDLK_F7, (SDLMod) ev.key.keysym.mod, 0);
+#ifdef ENABLE_VKEYBD
+ event.type = Common::EVENT_VIRTUAL_KEYBOARD;
+#endif
break;
case BTN_SQUARE: // Escape
event.type = Common::EVENT_KEYDOWN;
@@ -110,9 +110,7 @@ bool PS3SdlEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {
event.kbd.ascii = mapKey(SDLK_F5, (SDLMod) ev.key.keysym.mod, 0);
break;
case BTN_SELECT: // Virtual keyboard
- event.type = Common::EVENT_KEYUP;
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = mapKey(SDLK_F7, (SDLMod) ev.key.keysym.mod, 0);
+ // Handled in key down
break;
case BTN_SQUARE: // Escape
event.type = Common::EVENT_KEYUP;
diff --git a/backends/events/samsungtvsdl/samsungtvsdl-events.cpp b/backends/events/samsungtvsdl/samsungtvsdl-events.cpp
index f5b919a060..61499b566d 100644
--- a/backends/events/samsungtvsdl/samsungtvsdl-events.cpp
+++ b/backends/events/samsungtvsdl/samsungtvsdl-events.cpp
@@ -38,10 +38,10 @@ bool SamsungTVSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
event.kbd.ascii = Common::ASCII_F5;
return true;
} else if (ev.key.keysym.sym == SDLK_F2 && ev.key.keysym.scancode == 21) {
- event.type = Common::EVENT_KEYDOWN;
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = Common::ASCII_F7;
+#ifdef ENABLE_VKEYBD
+ event.type = Common::EVENT_VIRTUAL_KEYBOARD;
return true;
+#endif
}
break;
}
@@ -54,11 +54,6 @@ bool SamsungTVSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
event.kbd.keycode = Common::KEYCODE_F5;
event.kbd.ascii = Common::ASCII_F5;
return true;
- } else if (ev.key.keysym.sym == SDLK_F2 && ev.key.keysym.scancode == 21) {
- event.type = Common::EVENT_KEYUP;
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = Common::ASCII_F7;
- return true;
}
break;
}
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index d16f92d148..dde21533b0 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -131,7 +131,7 @@ protected:
*
* @param defaultFormat The new default format for the game screen
* (this is used for the CLUT8 game screens).
- * @param defaultFromatAlpha The new default format with an alpha channel
+ * @param defaultFormatAlpha The new default format with an alpha channel
* (this is used for the overlay and cursor).
*/
void notifyContextCreate(const Graphics::PixelFormat &defaultFormat, const Graphics::PixelFormat &defaultFormatAlpha);
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 9540a19e9e..c998f3d1f1 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -104,11 +104,6 @@ void OpenGLSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable)
case OSystem::kFeatureFullscreenMode:
assert(getTransactionMode() != kTransactionNone);
_wantsFullScreen = enable;
- // When we switch to windowed mode we will ignore resize events. This
- // avoids bad resizes to the (former) fullscreen resolution.
- if (!enable) {
- _ignoreResizeEvents = 10;
- }
break;
case OSystem::kFeatureIconifyWindow:
@@ -316,7 +311,6 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
SDL_Delay(10);
}
}
- _lastVideoModeLoad = curTime;
uint32 flags = SDL_OPENGL;
if (_wantsFullScreen) {
@@ -343,6 +337,9 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
}
}
+ // Part of the WORKAROUND mentioned above.
+ _lastVideoModeLoad = SDL_GetTicks();
+
if (_hwScreen) {
// This is pretty confusing since RGBA8888 talks about the memory
// layout here. This is a different logical layout depending on
@@ -359,6 +356,12 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
setActualScreenSize(_hwScreen->w, _hwScreen->h);
}
+ // Ignore resize events (from SDL) for a few frames, if this isn't
+ // caused by a notification from SDL. This avoids bad resizes to a
+ // (former) resolution for which we haven't processed an event yet.
+ if (!_gotResize)
+ _ignoreResizeEvents = 10;
+
return _hwScreen != nullptr;
}
diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp
index 7c709e91a3..e3b15b8c59 100644
--- a/backends/mixer/sdl/sdl-mixer.cpp
+++ b/backends/mixer/sdl/sdl-mixer.cpp
@@ -33,9 +33,8 @@
#ifdef GP2X
#define SAMPLES_PER_SEC 11025
#else
-#define SAMPLES_PER_SEC 22050
+#define SAMPLES_PER_SEC 44100
#endif
-//#define SAMPLES_PER_SEC 44100
SdlMixerManager::SdlMixerManager()
:
diff --git a/backends/mixer/sdl13/sdl13-mixer.cpp b/backends/mixer/sdl13/sdl13-mixer.cpp
index f9894a6f91..dc38242bde 100644
--- a/backends/mixer/sdl13/sdl13-mixer.cpp
+++ b/backends/mixer/sdl13/sdl13-mixer.cpp
@@ -33,9 +33,8 @@
#ifdef GP2X
#define SAMPLES_PER_SEC 11025
#else
-#define SAMPLES_PER_SEC 22050
+#define SAMPLES_PER_SEC 44100
#endif
-//#define SAMPLES_PER_SEC 44100
Sdl13MixerManager::Sdl13MixerManager()
:
diff --git a/backends/platform/android/android.mk b/backends/platform/android/android.mk
index 7c4fe01d54..69aa9d8303 100644
--- a/backends/platform/android/android.mk
+++ b/backends/platform/android/android.mk
@@ -26,13 +26,10 @@ PATH_RESOURCES = $(PATH_DIST)/res
PORT_DISTFILES = $(PATH_DIST)/README.Android
-# FIXME: OUYA specific.
-# "values-television" not present in vanilla Android.
-# $(PATH_RESOURCES)/../res-ouya/values-television/margins.xml \
-
RESOURCES = \
$(PATH_RESOURCES)/values/strings.xml \
$(PATH_RESOURCES)/values/margins.xml \
+ $(PATH_RESOURCES)/values-television/margins.xml \
$(PATH_RESOURCES)/layout/main.xml \
$(PATH_RESOURCES)/layout/splash.xml \
$(PATH_RESOURCES)/drawable/gradient.xml \
@@ -48,10 +45,10 @@ PLUGIN_RESOURCES = \
#LDFLAGS += -Wl,--gc-sections
#CXXFLAGS += -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden
-AAPT = $(ANDROID_SDK)/platform-tools/aapt
+AAPT = $(ANDROID_SDK)/$(ANDROID_BTOOLS)/aapt
ADB = $(ANDROID_SDK)/platform-tools/adb
-DX = $(ANDROID_SDK)/platform-tools/dx
-APKBUILDER = $(ANDROID_SDK)/tools/apkbuilder
+DX = $(ANDROID_SDK)/$(ANDROID_BTOOLS)/dx
+APKBUILDER = java -Xmx128M -classpath $(ANDROID_SDK)/tools/lib/sdklib.jar com.android.sdklib.build.ApkBuilderMain
JAVAC ?= javac
JAVACFLAGS = -source 1.5 -target 1.5
diff --git a/backends/platform/android/events.cpp b/backends/platform/android/events.cpp
index c60626ec36..8039981a92 100644
--- a/backends/platform/android/events.cpp
+++ b/backends/platform/android/events.cpp
@@ -263,7 +263,7 @@ void OSystem_Android::setupKeymapper() {
Action *act;
act = new Action(globalMap, "VIRT", "Display keyboard");
- act->addKeyEvent(KeyState(KEYCODE_F7, ASCII_F7, 0));
+ act->addKeyEvent(KeyState(KEYCODE_F7, ASCII_F7, KBD_CTRL));
mapper->addGlobalKeymap(globalMap);
diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
index 5964d5bfde..f4eb7ddd0b 100644
--- a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
+++ b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
@@ -3,6 +3,7 @@ package org.scummvm.scummvm;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
+import android.content.Intent;
import android.media.AudioManager;
import android.os.Build;
import android.os.Bundle;
@@ -201,6 +202,7 @@ public class ScummVMActivity extends Activity {
if (_scummvm != null)
_scummvm.setPause(false);
+ showMouseCursor(false);
}
@Override
@@ -211,6 +213,7 @@ public class ScummVMActivity extends Activity {
if (_scummvm != null)
_scummvm.setPause(true);
+ showMouseCursor(true);
}
@Override
@@ -267,4 +270,15 @@ public class ScummVMActivity extends Activity {
imm.hideSoftInputFromWindow(main_surface.getWindowToken(),
InputMethodManager.HIDE_IMPLICIT_ONLY);
}
+
+ private void showMouseCursor(boolean show) {
+ /* Currently hiding the system mouse cursor is only
+ supported on OUYA. If other systems provide similar
+ intents, please add them here as well */
+ Intent intent =
+ new Intent(show?
+ "tv.ouya.controller.action.SHOW_CURSOR" :
+ "tv.ouya.controller.action.HIDE_CURSOR");
+ sendBroadcast(intent);
+ }
}
diff --git a/backends/platform/dingux/dingux.mk b/backends/platform/dingux/dingux.mk
index e0aca42856..48a9347143 100644
--- a/backends/platform/dingux/dingux.mk
+++ b/backends/platform/dingux/dingux.mk
@@ -26,6 +26,7 @@ ifdef DYNAMIC_MODULES
$(STRIP) $(bundle_name)/plugins/*
endif
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)/
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip $(bundle_name)/
$(CP) $(srcdir)/backends/platform/dingux/scummvm.gpe $(bundle_name)/
$(CP) $(srcdir)/backends/platform/dingux/README.DINGUX $(bundle_name)/
$(CP) $(srcdir)/backends/platform/dingux/scummvm.png $(bundle_name)/
diff --git a/backends/platform/gph/caanoo-bundle.mk b/backends/platform/gph/caanoo-bundle.mk
index 2cf8e62b37..9362daeba3 100644
--- a/backends/platform/gph/caanoo-bundle.mk
+++ b/backends/platform/gph/caanoo-bundle.mk
@@ -24,6 +24,7 @@ caanoo-bundle: $(EXECUTABLE)
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/scummvm/engine-data
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip $(bundle_name)/scummvm/
$(STRIP) $(EXECUTABLE) -o $(bundle_name)/scummvm/$(EXECUTABLE)
@@ -55,6 +56,7 @@ caanoo-bundle-debug: $(EXECUTABLE)
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/scummvm/engine-data
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip $(bundle_name)/scummvm/
$(INSTALL) -c -m 777 $(srcdir)/$(EXECUTABLE) $(bundle_name)/scummvm/$(EXECUTABLE)
diff --git a/backends/platform/gph/gp2x-bundle.mk b/backends/platform/gph/gp2x-bundle.mk
index 9fcb379e04..d430ae6ebe 100644
--- a/backends/platform/gph/gp2x-bundle.mk
+++ b/backends/platform/gph/gp2x-bundle.mk
@@ -21,6 +21,7 @@ gp2x-bundle: $(EXECUTABLE)
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)
$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/engine-data
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip $(bundle_name)
$(STRIP) $(EXECUTABLE) -o $(bundle_name)/$(EXECUTABLE)
@@ -52,6 +53,7 @@ gp2x-bundle-debug: $(EXECUTABLE)
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)
$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/engine-data
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip $(bundle_name)
$(INSTALL) -c -m 777 $(srcdir)/$(EXECUTABLE) $(bundle_name)/$(EXECUTABLE)
diff --git a/backends/platform/gph/gp2xwiz-bundle.mk b/backends/platform/gph/gp2xwiz-bundle.mk
index 4f49850813..36a720aae6 100644
--- a/backends/platform/gph/gp2xwiz-bundle.mk
+++ b/backends/platform/gph/gp2xwiz-bundle.mk
@@ -23,6 +23,7 @@ gp2xwiz-bundle: $(EXECUTABLE)
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/scummvm/engine-data
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip $(bundle_name)/scummvm/
$(STRIP) $(EXECUTABLE) -o $(bundle_name)/scummvm/$(EXECUTABLE)
@@ -57,6 +58,7 @@ gp2xwiz-bundle-debug: $(EXECUTABLE)
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/scummvm/engine-data
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip $(bundle_name)/scummvm/
$(INSTALL) -c -m 777 $(srcdir)/$(EXECUTABLE) $(bundle_name)/scummvm/$(EXECUTABLE)
diff --git a/backends/platform/linuxmoto/linuxmoto.mk b/backends/platform/linuxmoto/linuxmoto.mk
index f64fadbccd..937fb4ef69 100644
--- a/backends/platform/linuxmoto/linuxmoto.mk
+++ b/backends/platform/linuxmoto/linuxmoto.mk
@@ -5,6 +5,7 @@ motoezx: $(EXECUTABLE)
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) release/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) release/scummvm/
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip release/scummvm/
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip release/scummvm/
$(CP) $(srcdir)/dists/motoezx/* release/scummvm/
tar -C release -cvzf release/ScummVM-motoezx.pkg scummvm
$(RM) -r release/scummvm
@@ -16,6 +17,7 @@ motomagx-mpkg: $(EXECUTABLE)
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) release/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) release/scummvm/
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip release/scummvm/
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip release/scummvm/
$(CP) $(srcdir)/dists/motomagx/mpkg/* release/scummvm/
tar -C release -cvzf release/ScummVM-motomagx.mpkg scummvm
$(RM) -r release/scummvm
@@ -26,6 +28,7 @@ motomagx-mgx: $(EXECUTABLE)
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) release/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) release/scummvm/
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip release/scummvm/
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip release/scummvm/
$(CP) $(srcdir)/dists/motomagx/mgx/* release/scummvm/
tar -C release -cvf release/ScummVM-motomagx.mgx scummvm
$(RM) -r release/scummvm
@@ -38,6 +41,7 @@ motomagx-pep: $(EXECUTABLE)
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) release/pep/app
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) release/pep/app
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip release/pep/app
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip release/pep/app
tar -C release/pep -czvf release/ScummVM-motomagx.pep app description.ini scummvm_big_usr.png scummvm_small_usr.png
$(RM) -r release/pep
diff --git a/backends/platform/maemo/debian/changelog b/backends/platform/maemo/debian/changelog
index 568edd0282..49e8de69d6 100644
--- a/backends/platform/maemo/debian/changelog
+++ b/backends/platform/maemo/debian/changelog
@@ -1,8 +1,8 @@
-scummvm (1.7.0~git) unstable; urgency=low
+scummvm (1.7.0) unstable; urgency=low
- * Development snapshot
+ * 1.7.0 release
- -- Tarek Soliman <tsoliman@scummvm.org> Sat, 01 Jun 2013 21:03:52 -0500
+ -- Tarek Soliman <tsoliman@scummvm.org> Mon, 21 Jul 2014 23:24:12 +0100
scummvm (1.6.0) unstable; urgency=low
diff --git a/backends/platform/maemo/debian/rules b/backends/platform/maemo/debian/rules
index c713403876..2aa7f339c9 100755
--- a/backends/platform/maemo/debian/rules
+++ b/backends/platform/maemo/debian/rules
@@ -46,6 +46,7 @@ install: build
install -m0644 dists/pred.dic debian/scummvm/opt/scummvm/share
install -m0644 gui/themes/scummclassic.zip gui/themes/scummmodern.zip debian/scummvm/opt/scummvm/share
install -m0644 backends/vkeybd/packs/vkeybd_default.zip debian/scummvm/opt/scummvm/share
+ install -m0644 backends/vkeybd/packs/vkeybd_small.zip debian/scummvm/opt/scummvm/share
# for optified version we can also add engine datafiles
install -m0644 dists/engine-data/drascula.dat dists/engine-data/hugo.dat dists/engine-data/kyra.dat dists/engine-data/lure.dat dists/engine-data/queen.tbl dists/engine-data/sky.cpt dists/engine-data/teenagent.dat dists/engine-data/tony.dat dists/engine-data/toon.dat debian/scummvm/opt/scummvm/share
diff --git a/backends/platform/n64/n64.mk b/backends/platform/n64/n64.mk
index 83ad405503..3198170788 100644
--- a/backends/platform/n64/n64.mk
+++ b/backends/platform/n64/n64.mk
@@ -20,6 +20,7 @@ ifdef DIST_FILES_ENGINEDATA
endif
$(CP) $(DIST_FILES_DOCS) $(bundle_name)/
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)/romfs
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip $(bundle_name)/romfs
genromfs -f $(bundle_name)/romfs.img -d $(bundle_name)/romfs -V scummvmn64
mips64-objcopy $(EXECUTABLE) $(bundle_name)/scummvm.elf -O binary
cat $(N64SDK)/hkz-libn64/bootcode $(bundle_name)/scummvm.elf $(bundle_name)/romfs.img > scummvm.v64
diff --git a/backends/platform/psp/README.PSP b/backends/platform/psp/README.PSP
index 18833d9f23..d92202bf4e 100644
--- a/backends/platform/psp/README.PSP
+++ b/backends/platform/psp/README.PSP
@@ -1,4 +1,4 @@
-ScummVM-PSP 1.7.0git README
+ScummVM-PSP 1.8.0git README
==============================================================================
Installation
diff --git a/backends/platform/sdl/amigaos/amigaos-main.cpp b/backends/platform/sdl/amigaos/amigaos-main.cpp
index 0743b3f9a0..65da6bbf85 100644
--- a/backends/platform/sdl/amigaos/amigaos-main.cpp
+++ b/backends/platform/sdl/amigaos/amigaos-main.cpp
@@ -30,6 +30,9 @@
int main(int argc, char *argv[]) {
+ // Set up a stack cookie to avoid crashes due to too few stack set by users
+ static const char *stack_cookie __attribute__((used)) = "$STACK: 600000";
+
// Create our OSystem instance
g_system = new OSystem_AmigaOS();
assert(g_system);
diff --git a/backends/platform/sdl/amigaos/amigaos.mk b/backends/platform/sdl/amigaos/amigaos.mk
new file mode 100644
index 0000000000..e998c6f3b2
--- /dev/null
+++ b/backends/platform/sdl/amigaos/amigaos.mk
@@ -0,0 +1,12 @@
+# Special target to create an AmigaOS snapshot installation
+amigaosdist: $(EXECUTABLE)
+ mkdir -p $(AMIGAOSPATH)
+ mkdir -p $(AMIGAOSPATH)/themes
+ mkdir -p $(AMIGAOSPATH)/extras
+ $(STRIP) $(EXECUTABLE) -o $(AMIGAOSPATH)/$(EXECUTABLE)
+ cp ${srcdir}/icons/scummvm.info $(AMIGAOSPATH)/$(EXECUTABLE).info
+ cp $(DIST_FILES_THEMES) $(AMIGAOSPATH)/themes/
+ifdef DIST_FILES_ENGINEDATA
+ cp $(DIST_FILES_ENGINEDATA) $(AMIGAOSPATH)/extras/
+endif
+ cp $(DIST_FILES_DOCS) $(AMIGAOSPATH)
diff --git a/backends/platform/sdl/ps3/ps3.mk b/backends/platform/sdl/ps3/ps3.mk
new file mode 100644
index 0000000000..a06409fc65
--- /dev/null
+++ b/backends/platform/sdl/ps3/ps3.mk
@@ -0,0 +1,27 @@
+ps3pkg: $(EXECUTABLE)
+ $(STRIP) $(EXECUTABLE)
+ sprxlinker $(EXECUTABLE)
+ mkdir -p ps3pkg/USRDIR/data/
+ mkdir -p ps3pkg/USRDIR/doc/
+ mkdir -p ps3pkg/USRDIR/saves/
+ make_self_npdrm "$(EXECUTABLE)" ps3pkg/USRDIR/EBOOT.BIN UP0001-SCUM12000_00-0000000000000000
+ cp $(DIST_FILES_THEMES) ps3pkg/USRDIR/data/
+ifdef DIST_FILES_ENGINEDATA
+ cp $(DIST_FILES_ENGINEDATA) ps3pkg/USRDIR/data/
+endif
+ cp $(DIST_FILES_DOCS) ps3pkg/USRDIR/doc/
+ cp $(srcdir)/dists/ps3/readme-ps3.md ps3pkg/USRDIR/doc/
+ cp $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip ps3pkg/USRDIR/data/
+ cp $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip ps3pkg/USRDIR/data/
+ cp $(srcdir)/dists/ps3/ICON0.PNG ps3pkg/
+ cp $(srcdir)/dists/ps3/PIC1.PNG ps3pkg/
+ sfo.py -f $(srcdir)/dists/ps3/sfo.xml ps3pkg/PARAM.SFO
+ pkg.py --contentid UP0001-SCUM12000_00-0000000000000000 ps3pkg/ scummvm-ps3.pkg
+
+ps3run: $(EXECUTABLE)
+ $(STRIP) $(EXECUTABLE)
+ sprxlinker $(EXECUTABLE)
+ make_self $(EXECUTABLE) $(EXECUTABLE).self
+ ps3load $(EXECUTABLE).self
+
+.PHONY: ps3pkg ps3run
diff --git a/backends/platform/symbian/AdaptAllMMPs.pl b/backends/platform/symbian/AdaptAllMMPs.pl
index 2f76acf012..18a464b580 100644
--- a/backends/platform/symbian/AdaptAllMMPs.pl
+++ b/backends/platform/symbian/AdaptAllMMPs.pl
@@ -14,45 +14,48 @@ chdir("../../../");
"mmp/scummvm_cine.mmp",
"mmp/scummvm_composer.mmp",
"mmp/scummvm_cruise.mmp",
+ "mmp/scummvm_draci.mmp",
"mmp/scummvm_drascula.mmp",
"mmp/scummvm_gob.mmp",
"mmp/scummvm_groovie.mmp",
+ "mmp/scummvm_hopkins.mmp",
+ "mmp/scummvm_hugo.mmp",
"mmp/scummvm_kyra.mmp",
"mmp/scummvm_lure.mmp",
"mmp/scummvm_m4.mmp",
"mmp/scummvm_made.mmp",
+ "mmp/scummvm_mohawk.mmp",
+ "mmp/scummvm_neverhood.mmp",
"mmp/scummvm_parallaction.mmp",
+ "mmp/scummvm_pegasus.mmp",
"mmp/scummvm_queen.mmp",
"mmp/scummvm_saga.mmp",
+ "mmp/scummvm_sci.mmp",
"mmp/scummvm_scumm.mmp",
"mmp/scummvm_sky.mmp",
"mmp/scummvm_sword1.mmp",
"mmp/scummvm_sword2.mmp",
- "mmp/scummvm_touche.mmp",
- "mmp/scummvm_tinsel.mmp",
- "mmp/scummvm_tucker.mmp",
- "mmp/scummvm_sci.mmp",
- "mmp/scummvm_draci.mmp",
"mmp/scummvm_teenagent.mmp",
- "mmp/scummvm_mohawk.mmp",
- "mmp/scummvm_hugo.mmp",
+ "mmp/scummvm_tinsel.mmp",
+ "mmp/scummvm_toltecs.mmp",
+ "mmp/scummvm_tony.mmp",
"mmp/scummvm_toon.mmp",
- "mmp/scummvm_lastexpress.mmp",
+ "mmp/scummvm_touche.mmp",
"mmp/scummvm_tsage.mmp",
- "mmp/scummvm_tony.mmp",
- "mmp/scummvm_hopkins.mmp",
- "mmp/scummvm_toltecs.mmp",
- "mmp/scummvm_pegasus.mmp",
+ "mmp/scummvm_tucker.mmp",
"mmp/scummvm_wintermute.mmp",
# New engines
"mmp/scummvm_avalanche.mmp",
+ "mmp/scummvm_bbvs.mmp",
"mmp/scummvm_dreamweb.mmp",
"mmp/scummvm_fullpipe.mmp",
+ "mmp/scummvm_lastexpress.mmp",
+ "mmp/scummvm_mads.mmp",
"mmp/scummvm_mortevielle.mmp",
- "mmp/scummvm_neverhood.mmp",
"mmp/scummvm_sword25.mmp",
"mmp/scummvm_testbed.mmp",
"mmp/scummvm_zvision.mmp",
+ "mmp/scummvm_voyeur.mmp",
# Target Platform Project Files
"S60/ScummVM_S60.mmp",
"S60v3/ScummVM_S60v3.mmp",
@@ -89,7 +92,7 @@ Preparing to update all the Symbian MMP project files with objects from module.m
# some modules.mk files have #ifndef ENABLE_XXXX blocks:
my @section_empty = (""); # section standard: no #ifdef's in module.mk files
my @sections_agos = ("", "ENABLE_AGOS2"); # special sections for engine AGOS
-my @section_video = ("", "USE_BINK", "USE_MPEG2"); # special sections for engine VIDEO ###, "USE_THEORADEC"
+my @section_video = ("", "USE_BINK"); # special sections for engine VIDEO ###, "USE_THEORADEC"
my @sections_groovie = ("", "ENABLE_GROOVIE2"); # special sections for engine GROOVIE
my @sections_kyra = ("", "ENABLE_LOL","ENABLE_EOB"); # special sections for engine KYRA
my @sections_mohawk = ("", "ENABLE_CSTIME", "ENABLE_MYST", "ENABLE_RIVEN"); # special sections for engine MOHAWK
@@ -144,6 +147,7 @@ ParseModule("_base", "base", \@section_empty); # now in ./TRG/ScummVM_TRG.mmp,
ParseModule("_base", "common", \@section_empty);
ParseModule("_base", "gui", \@section_empty, \@excludes_gui);
ParseModule("_base", "graphics", \@section_empty, \@excludes_graphics);
+ParseModule("_base", "image", \@section_empty);
ParseModule("_base", "audio", \@section_empty, \@excludes_snd);
ParseModule("_base", "video", \@section_video); #
@@ -151,8 +155,8 @@ chdir("engines/");
ParseModule("_scumm", "scumm", \@sections_scumm, \@excludes_scumm );
ParseModule("_queen", "queen", \@section_empty);
ParseModule("_agos", "agos", \@sections_agos);
-ParseModule("_sky", "sky", \@section_empty);
-ParseModule("_gob", "gob", \@section_empty);
+ParseModule("_sky", "sky", \@section_empty);
+ParseModule("_gob", "gob", \@section_empty);
ParseModule("_saga", "saga", \@sections_saga);
ParseModule("_kyra", "kyra", \@sections_kyra);
ParseModule("_sword1", "sword1", \@section_empty);
@@ -161,25 +165,25 @@ ParseModule("_lure", "lure", \@section_empty);
ParseModule("_cine", "cine", \@section_empty);
ParseModule("_cge", "cge", \@section_empty);
ParseModule("_composer","composer", \@section_empty);
-ParseModule("_agi", "agi", \@section_empty);
+ParseModule("_agi", "agi", \@section_empty);
ParseModule("_touche", "touche", \@section_empty);
ParseModule("_parallaction","parallaction",\@section_empty);
ParseModule("_cruise", "cruise", \@section_empty);
ParseModule("_drascula","drascula", \@section_empty);
ParseModule("_made", "made", \@section_empty);
-ParseModule("_m4", "m4", \@section_empty);
+ParseModule("_m4", "m4", \@section_empty);
ParseModule("_tinsel", "tinsel", \@section_empty);
ParseModule("_groovie", "groovie", \@sections_groovie);
ParseModule("_tucker", "tucker", \@section_empty);
-ParseModule("_sci", "sci", \@sections_sci);
+ParseModule("_sci", "sci", \@sections_sci);
ParseModule("_draci", "draci", \@section_empty);
ParseModule("_teenagent","teenagent", \@section_empty);
ParseModule("_mohawk" ,"mohawk", \@sections_mohawk);
ParseModule("_hugo" ,"hugo", \@section_empty);
ParseModule("_toon" ,"toon", \@section_empty);
ParseModule("_lastexpress","lastexpress", \@section_empty);
-ParseModule("_tsage","tsage", \@section_empty);
-ParseModule("_tony", "tony", \@section_empty);
+ParseModule("_tsage", "tsage", \@section_empty);
+ParseModule("_tony", "tony", \@section_empty);
ParseModule("_toltecs","toltecs", \@section_empty);
ParseModule("_hopkins","hopkins", \@section_empty);
ParseModule("_pegasus","pegasus", \@section_empty);
@@ -188,11 +192,14 @@ ParseModule("_wintermute","wintermute", \@section_empty);
ParseModule("_avalanche" ,"avalanche", \@section_empty);
ParseModule("_dreamweb" ,"dreamweb", \@section_empty);
ParseModule("_fullpipe" ,"fullpipe", \@section_empty);
+ParseModule("_mads" ,"mads", \@section_empty);
ParseModule("_mortevielle" ,"mortevielle", \@section_empty);
ParseModule("_neverhood" ,"neverhood", \@section_empty);
ParseModule("_sword25" ,"sword25", \@section_empty);
ParseModule("_testbed" ,"testbed", \@section_empty);
ParseModule("_zvision" ,"zvision", \@section_empty);
+ParseModule("_voyeur" ,"voyeur", \@section_empty);
+ParseModule("_bbvs" ,"bbvs", \@section_empty);
print "
=======================================================================================
Done. Enjoy :P
diff --git a/backends/platform/symbian/BuildPackageUpload_AllVersions.pl b/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
index 560439f4e1..a038bd90f8 100644
--- a/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
+++ b/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
@@ -64,7 +64,8 @@ $ExtraMacros .= "MACRO ENABLE_VKEYBD\n";
$ExtraMacros .= "MACRO DISABLE_FANCY_THEMES\n";
$ExtraMacros .= "MACRO USE_TRANSLATION\n";
$ExtraMacros .= "MACRO USE_BINK\n";
-$ExtraMacros .= "MACRO USE_MPEG2\n";
+#$ExtraMacros .= "MACRO USE_THEORADEC\n";
+#$ExtraMacros .= "MACRO USE_MPEG2\n";
# $ExtraMacros .= "MACRO \n";
# candidates are : , USE_TIMIDITY,
diff --git a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
index 4ff485b3e3..26c2e4f69d 100644
--- a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
+++ b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
@@ -2,31 +2,32 @@
##################################################################################################################
@WorkingEngines = qw(
- agos agi cine cge composer cruise draci
+ agos agi bbvs cine cge composer cruise draci
drascula hugo gob groovie kyra lastexpress
lure made mohawk parallaction pegasus queen
saga sci scumm sky sword1 sword2 teenagent tinsel
toltecs tony toon touche tsage tucker wintermute
- dreamweb fullpipe hopkins mortevielle
- neverhood testbed avalanche zvision
+ dreamweb fullpipe hopkins mortevielle mads
+ neverhood testbed avalanche zvision voyeur
);
#### New engines
#### sword25
@WorkingEngines_1st = qw(
- cine composer cruise drascula groovie
- lastexpress made parallaction queen
- saga scumm touche tucker wintermute
- avalanche zvision
+ bbvs cine composer cruise
+ drascula groovie lastexpress
+ lure made mohawk parallaction pegasus queen
+ saga scumm
+ toltecs tony toon touche tucker wintermute
+ neverhood avalanche zvision voyeur
);
@WorkingEngines_2nd = qw(
- agi agos cge draci gob hopkins
- hugo kyra lure mohawk pegasus sci
- sky sword1 sword2 teenagent
- tinsel tsage toltecs tony toon
- dreamweb fullpipe mortevielle
- neverhood testbed
+ agos agi cge draci
+ hugo gob kyra
+ sci sky sword1 sword2 teenagent tinsel
+ tsage
+ dreamweb fullpipe hopkins mortevielle mads
);
#### sword25
@@ -55,20 +56,22 @@
# see configure.engines
%UseableFeatures = (
- 'zlib' => 'zlib.lib',
- 'mad' => 'libmad.lib',
- 'tremor' => 'libtremor.lib',
- 'flac' => 'libflacdec.lib',
'freetype2' => 'freetype.lib',
'faad' => 'libFAAD2.lib',
- 'mpeg2' => 'libmpeg2.lib'
+ 'flac' => 'libflacdec.lib',
+ 'jpeg' => 'libjpeg.lib',
+ 'mad' => 'libmad.lib',
+ 'mpeg2' => 'libmpeg2.lib',
+ 'png' => 'libpng.lib',
+ 'tremor' => 'libtremor.lib',
+ 'theoradec' => 'theora.lib',
+ 'zlib' => 'zlib.lib'
);
- # 'mpeg2' => 'libmpeg2.lib'
# these are normally enabled for each variation
#$DefaultFeatures = qw(zlib,mad);
#$DefaultFeatures = qw(zlib,mad,tremor,);
- $DefaultFeatures = qw(mad,tremor,faad,flac,freetype2,mpeg2,zlib,);
+ $DefaultFeatures = qw(faad,flac,freetype2,jpeg,mad,mpeg2,png,theoradec,tremor,zlib,);
##################################################################################################################
##
@@ -102,7 +105,7 @@
# $SDK_RootDirs{'UIQ3'} = "$DevBase\\UIQ3";
# $SDK_RootDirs{'S60v1'} = "$DevBase\\S60v1";
# $SDK_RootDirs{'S60v2'} = "$DevBase\\S60v2";
- $SDK_RootDirs{'S60v3'} = "$DevBase\\S60v3";
+ $SDK_RootDirs{'S60v3'} = "$DevBase\\S60v5";
# $SDK_RootDirs{'S80'} = "$DevBase\\S80";
# $SDK_RootDirs{'S90'} = "$DevBase\\S90";
@@ -123,7 +126,7 @@
my $SdlBase = "$DevBase\\SDL-1.2.12-ag\\Symbian";
#$SDK_LibraryDirs{'S60v1'}{'esdl.lib'} = "$SdlBase\\S60"; // unsupported?
#$SDK_LibraryDirs{'S60v2'}{'esdl.lib'} = "$SdlBase\\S60v2";
- $SDK_LibraryDirs{'S60v3'}{'esdl.lib'} = "$SdlBase\\S60v3";
+ $SDK_LibraryDirs{'S60v3'}{'esdl.lib'} = "$SdlBase\\S60v5";
#$SDK_LibraryDirs{'S80'}{'esdl.lib'} = "$SdlBase\\S80";
#$SDK_LibraryDirs{'S90'}{'esdl.lib'} = "$SdlBase\\S90";
#$SDK_LibraryDirs{'UIQ2'}{'esdl.lib'} = "$SdlBase\\UIQ2"
@@ -225,7 +228,7 @@
$SDK_RootDirs{'UIQ3'}= "G:\\UIQ3";
#$SDK_RootDirs{'S60v1'}= "D:\\S60v1";
#$SDK_RootDirs{'S60v2'}= "D:\\S60v2";
- $SDK_RootDirs{'S60v3'}= "G:\\S60v3";
+ $SDK_RootDirs{'S60v3'}= "G:\\S60v5";
#$SDK_RootDirs{'S80'}= "D:\\S80";
#$SDK_RootDirs{'S90'}= "D:\\S90";
#$ECompXL_BinDir= "D:\\ECompXL\\";
@@ -245,14 +248,14 @@
# now you can add $VariationSets only built on this PC below this line :)
}
- elsif ($ENV{'COMPUTERNAME'} eq "PC-FOREVER1111") #################################################################
+ elsif ($ENV{'COMPUTERNAME'} eq "FEDOR4EVER") #################################################################
{
$Producer = "Fedor";
$RedirectSTDERR = 1;
$HaltOnError = 0;
$SkipExistingPackages = 0;
$ReallyQuiet = 0;
- $Compiler = "D:\\Program/ Files\\CodeSourcery\\Sourcery/ G++ Lite";
+ $Compiler = "D:\\Program/ Files\\CodeSourcery\\Sourcery/ G++/ Lite";
#$FTP_Host = "host.com";
#$FTP_User = "ag@host.com";
@@ -324,6 +327,7 @@
# the first one includes all SDKs & release-ready engines
$VariationSets{'ALL'}{'all'} = "$DefaultFeatures @WorkingEngines @EnablableSubEngines";
+ #$VariationSets{'ALL'}{'split'} = "$DefaultFeatures @WorkingEngines @EnablableSubEngines";
# $VariationSets{'ALL'}{'1St'} = "$DefaultFeatures @WorkingEngines_1st @EnablableSubEngines";
# $VariationSets{'ALL'}{'2nd'} = "$DefaultFeatures @WorkingEngines_2nd @EnablableSubEngines";
# now one for each ready-for-release engine
diff --git a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
index 56456f37e4..3a08763e64 100644
--- a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
+++ b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
@@ -1,8 +1,9 @@
/* ScummVM - Graphic Adventure Engine
* 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) 2003-2014 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2013 The ScummVM project
+ * Copyright (C) 2013-2014 Fedor Strizhniou Additional library porting, engine support, help files etc
+ * Copyright (C) 2005-2014 The ScummVM project
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
@@ -35,8 +36,7 @@ TARGETPATH sys\bin
TARGETTYPE exe
OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
// fixes error "section .data loaded at [...] overlaps section .text loaded at [...]"
-// in future simple add 'a'
-LINKEROPTION GCCE -Tdata 0xAA00000
+LINKEROPTION GCCE -Tdata 0xAA00000
UID 0x100039ce 0xA0000658
@@ -57,7 +57,7 @@ LANG SC
END
EPOCSTACKSIZE 80000
-EPOCHEAPSIZE 5000000 64000000
+EPOCHEAPSIZE 5000000 128000000
START BITMAP ScummVM.mbm
TARGETPATH \Resource\Apps
@@ -137,21 +137,21 @@ SOURCE gui\Actions.cpp
SOURCE gui\Dialog.cpp
// Common error
-source common\error.cpp
-source common\quicktime.cpp
+SOURCE common\error.cpp
+SOURCE common\quicktime.cpp
// Special for graphics
-source backends\graphics\symbiansdl\symbiansdl-graphics.cpp
-source backends\graphics\surfacesdl\surfacesdl-graphics.cpp
-source engines\obsolete.cpp
+SOURCE backends\graphics\symbiansdl\symbiansdl-graphics.cpp
+SOURCE backends\graphics\surfacesdl\surfacesdl-graphics.cpp
+SOURCE engines\obsolete.cpp
// *** Dynamic Libraries
-LIBRARY cone.lib eikcore.lib
-LIBRARY euser.lib apparc.lib fbscli.lib
-LIBRARY estlib.lib apgrfx.lib
-LIBRARY gdi.lib hal.lib bitgdi.lib
-LIBRARY mediaclientaudiostream.lib efsrv.lib ws32.lib
-library avkon.lib bafl.lib remconcoreapi.lib remconinterfacebase.lib
+LIBRARY cone.lib eikcore.lib euser.lib
+LIBRARY apparc.lib fbscli.lib estlib.lib
+LIBRARY apgrfx.lib gdi.lib hal.lib bitgdi.lib
+LIBRARY esock.lib mediaclientaudiostream.lib
+LIBRARY efsrv.lib ws32.lib avkon.lib bafl.lib
+LIBRARY remconcoreapi.lib remconinterfacebase.lib
CAPABILITY LocalServices ReadUserData
MACRO SDL_BACKEND
diff --git a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
index 0c0dd9b6b6..f65be1208e 100644
--- a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
+++ b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
@@ -1,8 +1,9 @@
/* ScummVM - Graphic Adventure Engine
* 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) 2003-2014 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2013 The ScummVM project
+ * Copyright (C) 2013-2014 Fedor Strizhniou Additional library porting, engine support, help files etc
+ * Copyright (C) 2005-2014 The ScummVM project
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
@@ -35,6 +36,9 @@ TARGETPATH sys\bin
TARGETTYPE exe
OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
+// fixes error "section .data loaded at [...] overlaps section .text loaded at [...]"
+LINKEROPTION GCCE -Tdata 0xAA00000
+
UID 0x100039ce 0xA0000657
START RESOURCE ScummVM_reg.rss
@@ -54,7 +58,7 @@ LANG SC
END
EPOCSTACKSIZE 80000
-EPOCHEAPSIZE 5000000 64000000
+EPOCHEAPSIZE 5000000 128000000
START BITMAP ScummVM.mbm
TARGETPATH \Resource\Apps
@@ -134,21 +138,21 @@ SOURCE gui\Actions.cpp
SOURCE gui\Dialog.cpp
// Common error
-source common\error.cpp
-source common\quicktime.cpp
+SOURCE common\error.cpp
+SOURCE common\quicktime.cpp
// Special for graphics
-source backends\graphics\symbiansdl\symbiansdl-graphics.cpp
-source backends\graphics\surfacesdl\surfacesdl-graphics.cpp
-source engines\obsolete.cpp
+SOURCE backends\graphics\symbiansdl\symbiansdl-graphics.cpp
+SOURCE backends\graphics\surfacesdl\surfacesdl-graphics.cpp
+SOURCE engines\obsolete.cpp
// *** Dynamic Libraries
-LIBRARY cone.lib eikcore.lib
-LIBRARY euser.lib apparc.lib fbscli.lib
-LIBRARY estlib.lib apgrfx.lib
-LIBRARY gdi.lib hal.lib bitgdi.lib
-LIBRARY mediaclientaudiostream.lib efsrv.lib ws32.lib
-library avkon.lib bafl.lib remconcoreapi.lib remconinterfacebase.lib
+LIBRARY cone.lib eikcore.lib euser.lib
+LIBRARY apparc.lib fbscli.lib estlib.lib
+LIBRARY apgrfx.lib gdi.lib hal.lib bitgdi.lib
+LIBRARY esock.lib mediaclientaudiostream.lib
+LIBRARY efsrv.lib ws32.lib avkon.lib bafl.lib
+LIBRARY remconcoreapi.lib remconinterfacebase.lib
CAPABILITY LocalServices ReadUserData
MACRO SDL_BACKEND
diff --git a/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg b/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg
index 5f74bee1c7..4c83b32805 100644
--- a/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg
+++ b/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg
@@ -33,7 +33,7 @@
:"ScummVM"
; UID is the app's UID
-#{"ScummVM S60v3"},(0xA0000657),1,70,0
+#{"ScummVM S60v3"},(0xA0000657),1,80,0
;Supports Series 60 v 3.0
[0x101F7961], 0, 0, 0, {"Series60ProductID"}
@@ -74,6 +74,7 @@
"..\..\..\..\dists\engine-data\toon.dat"-"c:\data\scummvm\toon.dat"
"..\..\..\..\dists\engine-data\wintermute.zip"-"c:\data\scummvm\wintermute.zip"
"..\..\..\vkeybd\packs\vkeybd_default.zip"-"c:\data\scummvm\vkeybd_default.zip"
+"..\..\..\vkeybd\packs\vkeybd_small.zip"-"c:\data\scummvm\vkeybd_small.zip"
"..\..\..\..\gui\themes\translations.dat"-"c:\data\scummvm\translations.dat"
"..\..\..\..\gui\themes\scummmodern.zip"-"c:\data\scummvm\scummmodern.zip"
diff --git a/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3_split.pkg b/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3_split.pkg
index 4ef085d600..3d55584d28 100644
--- a/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3_split.pkg
+++ b/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3_split.pkg
@@ -36,7 +36,7 @@
:"ScummVM"
; UID is the app's UID
-#{"ScummVM S60v3"},(0xA0000657),1,70,6
+#{"ScummVM S60v3"},(0xA0000657),1,80,0
;Supports Series 60 v 3.0
[0x101F7961], 0, 0, 0, {"Series60ProductID"}
@@ -82,6 +82,7 @@
"..\..\..\..\dists\engine-data\toon.dat"-"c:\data\scummvm\toon.dat"
"..\..\..\..\dists\engine-data\wintermute.zip"-"c:\data\scummvm\wintermute.zip"
"..\..\..\vkeybd\packs\vkeybd_default.zip"-"c:\data\scummvm\vkeybd_default.zip"
+"..\..\..\vkeybd\packs\vkeybd_small.zip"-"c:\data\scummvm\vkeybd_small.zip"
"..\..\..\..\gui\themes\translations.dat"-"c:\data\scummvm\translations.dat"
"..\..\..\..\gui\themes\scummmodern.zip"-"c:\data\scummvm\scummmodern.zip"
diff --git a/backends/platform/symbian/UIQ3/BLD.INF.in b/backends/platform/symbian/UIQ3/BLD.INF.in
index ff12dbdd75..4ca6be145b 100644
--- a/backends/platform/symbian/UIQ3/BLD.INF.in
+++ b/backends/platform/symbian/UIQ3/BLD.INF.in
@@ -7,5 +7,6 @@ PRJ_MMPFILES
// empty base file, will be updated by Perl build scripts
//STOP_AUTO_PROJECTS//
+gnumakefile ..\help\build_help.mk
.\ScummVM_A0000658_UIQ3.mmp
.\ScummVM_UIQ3.mmp
diff --git a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
index c68e780f11..6e84ab7b08 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
+++ b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
@@ -35,6 +35,9 @@ TARGETPATH sys\bin
TARGETTYPE exe
OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
+// fixes error "section .data loaded at [...] overlaps section .text loaded at [...]"
+// in future simple add 'a'
+LINKEROPTION GCCE -Tdata 0xAA00000
UID 0x100039ce 0xA0000658
@@ -55,7 +58,7 @@ LANG SC
END
EPOCSTACKSIZE 80000
-EPOCHEAPSIZE 5000000 64000000
+EPOCHEAPSIZE 5000000 128000000
START BITMAP ScummVM.mbm
TARGETPATH \Resource\Apps
@@ -89,11 +92,17 @@ STATICLIBRARY esdl.lib
// *** Include paths
USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\engines
-USERINCLUDE ..\..\..\..\backends\fs ..\src ..\..\..\..\backends\platform\sdl ..\..\..\..\sound
+USERINCLUDE ..\..\..\..\backends\fs ..\src ..\..\..\..\backends\platform\sdl ..\..\..\..\audio
+SYSTEMINCLUDE \epoc32\include\freetype
+SYSTEMINCLUDE \epoc32\include\mpeg2dec
+SYSTEMINCLUDE \epoc32\include\jpeg
+SYSTEMINCLUDE \epoc32\include\png
SYSTEMINCLUDE \epoc32\include\ESDL
SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\theora
+SYSTEMINCLUDE \epoc32\include\tremor
SYSTEMINCLUDE \epoc32\include
SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
index f554bb3afd..fee0c81e7a 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
+++ b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
@@ -35,6 +35,9 @@ TARGETPATH sys\bin
TARGETTYPE exe
OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
+// fixes error "section .data loaded at [...] overlaps section .text loaded at [...]"
+// in future simple add 'a'
+LINKEROPTION GCCE -Tdata 0xAA00000
UID 0x100039ce 0xA0000657
@@ -55,7 +58,7 @@ LANG SC
END
EPOCSTACKSIZE 80000
-EPOCHEAPSIZE 5000000 64000000
+EPOCHEAPSIZE 5000000 128000000
START BITMAP ScummVM.mbm
TARGETPATH \Resource\Apps
@@ -89,11 +92,17 @@ STATICLIBRARY esdl.lib
// *** Include paths
USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\engines
-USERINCLUDE ..\..\..\..\backends\fs ..\src ..\..\..\..\backends\platform\sdl ..\..\..\..\sound
+USERINCLUDE ..\..\..\..\backends\fs ..\src ..\..\..\..\backends\platform\sdl ..\..\..\..\audio
+SYSTEMINCLUDE \epoc32\include\freetype
+SYSTEMINCLUDE \epoc32\include\mpeg2dec
+SYSTEMINCLUDE \epoc32\include\jpeg
+SYSTEMINCLUDE \epoc32\include\png
SYSTEMINCLUDE \epoc32\include\ESDL
SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\theora
+SYSTEMINCLUDE \epoc32\include\tremor
SYSTEMINCLUDE \epoc32\include
SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
index b4f1cfdd5c..8ac6f97d9f 100644
--- a/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
+++ b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
@@ -32,7 +32,7 @@
:"ScummVM"
; UID is the app's UID
-#{"ScummVM UIQ3"},(0xA0000657),1,70,0
+#{"ScummVM UIQ3"},(0xA0000657),1,80,0
; ProductID for UIQ 3.0
; Product/platform version UID, Major, Minor, Build, Product ID
@@ -50,20 +50,29 @@
; Scummvm Documentation
"..\..\..\..\COPYRIGHT"-"!:\resource\apps\scummvm\COPYRIGHT", FT, TC
"..\..\..\..\COPYING"-"!:\resource\apps\scummvm\COPYING", FT, TC
-"..\README"-"!:\system\apps\scummvm\SYMBIAN_README", FT, TC
+"..\README"-"!:\resource\apps\scummvm\SYMBIAN_README", FT, TC
"..\..\..\..\AUTHORS"-"!:\resource\apps\scummvm\AUTHORS"
"..\..\..\..\README"-"!:\resource\apps\scummvm\README"
"..\..\..\..\NEWS"-"!:\resource\apps\scummvm\NEWS"
+; Scummvm help
+"..\help\ScummVM.hlp"-"!:\resource\help\ScummVM.hlp"
+
; Common datafiles needed for some games
-"..\..\..\..\dists\engine-data\kyra.dat"-"c:\shared\scummvm\kyra.dat"
-"..\..\..\..\dists\engine-data\sky.cpt"-"c:\shared\scummvm\sky.cpt"
+"..\..\..\..\dists\engine-data\drascula.dat"-"c:\shared\scummvm\drascula.dat"
"..\..\..\..\dists\engine-data\hugo.dat"-"c:\shared\scummvm\hugo.dat"
+"..\..\..\..\dists\engine-data\kyra.dat"-"c:\shared\scummvm\kyra.dat"
"..\..\..\..\dists\engine-data\lure.dat"-"c:\shared\scummvm\lure.dat"
-"..\..\..\..\dists\engine-data\drascula.dat"-"c:\shared\scummvm\drascula.dat"
+"..\..\..\..\dists\engine-data\mort.dat"-"c:\shared\scummvm\mort.dat"
+"..\..\..\..\dists\engine-data\neverhood.dat"-"c:\shared\scummvm\neverhood.dat"
+"..\..\..\..\dists\engine-data\queen.tbl"-"c:\shared\scummvm\queen.tbl"
+"..\..\..\..\dists\engine-data\sky.cpt"-"c:\shared\scummvm\sky.cpt"
"..\..\..\..\dists\engine-data\teenagent.dat"-"c:\shared\scummvm\teenagent.dat"
+"..\..\..\..\dists\engine-data\tony.dat"-"c:\shared\scummvm\tony.dat"
"..\..\..\..\dists\engine-data\toon.dat"-"c:\shared\scummvm\toon.dat"
+"..\..\..\..\dists\engine-data\wintermute.zip"-"c:\shared\scummvm\wintermute.zip"
"..\..\..\vkeybd\packs\vkeybd_default.zip"-"c:\shared\scummvm\vkeybd_default.zip"
+"..\..\..\vkeybd\packs\vkeybd_small.zip"-"c:\shared\scummvm\vkeybd_small.zip"
"..\..\..\..\gui\themes\translations.dat"-"c:\shared\scummvm\translations.dat"
"..\..\..\..\gui\themes\scummmodern.zip"-"c:\shared\scummvm\scummmodern.zip"
diff --git a/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3_split.pkg b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3_split.pkg
index 722e23a1b8..4c46be50a1 100644
--- a/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3_split.pkg
+++ b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3_split.pkg
@@ -35,7 +35,7 @@
:"ScummVM"
; UID is the app's UID
-#{"ScummVM UIQ3"},(0xA0000657),1,70,0
+#{"ScummVM UIQ3"},(0xA0000657),1,80,0
; ProductID for UIQ 3.0
; Product/platform version UID, Major, Minor, Build, Product ID
@@ -58,20 +58,29 @@
; Scummvm Documentation
"..\..\..\..\COPYRIGHT"-"!:\resource\apps\scummvm\COPYRIGHT", FT, TC
"..\..\..\..\COPYING"-"!:\resource\apps\scummvm\COPYING", FT, TC
-"..\README"-"!:\system\apps\scummvm\SYMBIAN_README", FT, TC
+"..\README"-"!:\resource\apps\scummvm\SYMBIAN_README", FT, TC
"..\..\..\..\AUTHORS"-"!:\resource\apps\scummvm\AUTHORS"
"..\..\..\..\README"-"!:\resource\apps\scummvm\README"
"..\..\..\..\NEWS"-"!:\resource\apps\scummvm\NEWS"
+; Scummvm help
+"..\help\ScummVM.hlp"-"!:\resource\help\ScummVM.hlp"
+
; Common datafiles needed for some games
-"..\..\..\..\dists\engine-data\kyra.dat"-"c:\shared\scummvm\kyra.dat"
-"..\..\..\..\dists\engine-data\sky.cpt"-"c:\shared\scummvm\sky.cpt"
+"..\..\..\..\dists\engine-data\drascula.dat"-"c:\shared\scummvm\drascula.dat"
"..\..\..\..\dists\engine-data\hugo.dat"-"c:\shared\scummvm\hugo.dat"
+"..\..\..\..\dists\engine-data\kyra.dat"-"c:\shared\scummvm\kyra.dat"
"..\..\..\..\dists\engine-data\lure.dat"-"c:\shared\scummvm\lure.dat"
-"..\..\..\..\dists\engine-data\drascula.dat"-"c:\shared\scummvm\drascula.dat"
+"..\..\..\..\dists\engine-data\mort.dat"-"c:\shared\scummvm\mort.dat"
+"..\..\..\..\dists\engine-data\neverhood.dat"-"c:\shared\scummvm\neverhood.dat"
+"..\..\..\..\dists\engine-data\queen.tbl"-"c:\shared\scummvm\queen.tbl"
+"..\..\..\..\dists\engine-data\sky.cpt"-"c:\shared\scummvm\sky.cpt"
"..\..\..\..\dists\engine-data\teenagent.dat"-"c:\shared\scummvm\teenagent.dat"
+"..\..\..\..\dists\engine-data\tony.dat"-"c:\shared\scummvm\tony.dat"
"..\..\..\..\dists\engine-data\toon.dat"-"c:\shared\scummvm\toon.dat"
+"..\..\..\..\dists\engine-data\wintermute.zip"-"c:\shared\scummvm\wintermute.zip"
"..\..\..\vkeybd\packs\vkeybd_default.zip"-"c:\shared\scummvm\vkeybd_default.zip"
+"..\..\..\vkeybd\packs\vkeybd_small.zip"-"c:\shared\scummvm\vkeybd_small.zip"
"..\..\..\..\gui\themes\translations.dat"-"c:\shared\scummvm\translations.dat"
"..\..\..\..\gui\themes\scummmodern.zip"-"c:\shared\scummvm\scummmodern.zip"
diff --git a/backends/platform/symbian/help/ScummVM.rtf b/backends/platform/symbian/help/ScummVM.rtf
index 4b5ae5afe0..25254f5338 100644
--- a/backends/platform/symbian/help/ScummVM.rtf
+++ b/backends/platform/symbian/help/ScummVM.rtf
@@ -49,15 +49,17 @@ Synonyms;}{\*\cs33 \additive \super \sbasedon10 endnote reference;}{\s34\ql \fi-
{\listoverride\listid-129\listoverridecount0\ls2}{\listoverride\listid-119\listoverridecount0\ls3}{\listoverride\listid-125\listoverridecount0\ls4}{\listoverride\listid-120\listoverridecount0\ls5}{\listoverride\listid-129\listoverridecount0\ls6}
{\listoverride\listid-119\listoverridecount0\ls7}{\listoverride\listid-125\listoverridecount0\ls8}{\listoverride\listid-120\listoverridecount0\ls9}{\listoverride\listid-129\listoverridecount0\ls10}{\listoverride\listid-119\listoverridecount0\ls11}
{\listoverride\listid-125\listoverridecount0\ls12}{\listoverride\listid-120\listoverridecount0\ls13}{\listoverride\listid-129\listoverridecount0\ls14}{\listoverride\listid-119\listoverridecount0\ls15}{\listoverride\listid-125\listoverridecount0\ls16}
-{\listoverride\listid-2\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'01\u-3991 ?;}{\levelnumbers;}\f30\chbrdr
-\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-283\li283 }}\ls17}{\listoverride\listid-2\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0
-\levelindent283{\leveltext\'01\u-3991 ?;}{\levelnumbers;}\f30\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-283\li283 }}\ls18}}{\info{\author Fedor}{\operator Fedor}{\creatim\yr2013\mo11\dy30\hr23\min4}
-{\revtim\yr2013\mo12\dy14\hr12\min27}{\version95}{\edmins91}{\nofpages8}{\nofwords1514}{\nofchars8634}{\*\company DEV}{\nofcharsws0}{\vern8249}}\margl1701\margr850\margt1134\margb1134
-\deftab708\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind4\viewscale100\nolnhtadjtbl \fet0{\*\template
-E:\\Documents and Settings\\Administrator\\Application Data\\Microsoft\\\'d8\'e0\'e1\'eb\'ee\'ed\'fb\\cshelp2000.dot}\sectd \linex0\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang
-{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang
-{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain
-\s17\ql \li0\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin0\itap0 \i\f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\lang1033\langfe1033\langnp1033 Author: Fedor Strizhniou.}{\f28
+{\listoverride\listid-120\listoverridecount0\ls17}{\listoverride\listid-129\listoverridecount0\ls18}{\listoverride\listid-119\listoverridecount0\ls19}{\listoverride\listid-125\listoverridecount0\ls20}{\listoverride\listid-120\listoverridecount0\ls21}
+{\listoverride\listid-129\listoverridecount0\ls22}{\listoverride\listid-119\listoverridecount0\ls23}{\listoverride\listid-125\listoverridecount0\ls24}{\listoverride\listid-2\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc23\levelnfcn23
+\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'01\u-3991 ?;}{\levelnumbers;}\f30\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-283\li283 }}\ls25}{\listoverride\listid-2
+\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'01\u-3991 ?;}{\levelnumbers;}\f30\chbrdr\brdrnone\brdrcf1
+\chshdng0\chcfpat1\chcbpat1\fbias0 \fi-283\li283 }}\ls26}}{\info{\author Fedor}{\operator Fedor}{\creatim\yr2013\mo11\dy30\hr23\min4}{\revtim\yr2014\mo7\dy2\hr12\min57}{\version98}{\edmins92}{\nofpages8}{\nofwords1514}{\nofchars8634}{\*\company DEV}
+{\nofcharsws0}{\vern8249}}\margl1701\margr850\margt1134\margb1134 \deftab708\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3
+\jcompress\viewkind4\viewscale100\nolnhtadjtbl \fet0{\*\template E:\\Documents and Settings\\Administrator\\Application Data\\Microsoft\\\'d8\'e0\'e1\'eb\'ee\'ed\'fb\\cshelp2000.dot}\sectd \linex0\sectdefaultcl {\*\pnseclvl1
+\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5
+\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang
+{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s17\ql \li0\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin0\itap0 \i\f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {
+\lang1033\langfe1033\langnp1033 Author: Fedor Strizhniou.}{\f28
\par }{\lang1033\langfe1033\langnp1033 Date: November 2013}{\f28
\par }{\lang1033\langfe1033\langnp1033 Version: 1.7.0
\par }\pard\plain \s1\ql \li0\ri0\sb360\sa240\keepn\widctlpar\nooverflow\faroman\outlinelevel0\rin0\lin0\itap0 \b\f1\fs32\lang2057\langfe1033\kerning28\cgrid\langnp2057\langfenp1033 {ScummVM Help
@@ -65,8 +67,8 @@ E:\\Documents and Settings\\Administrator\\Application Data\\Microsoft\\\'d8\'e0
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0 \b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\b0\f28
About ScummVM Help
-\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls17\pnrnot0
-\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls17\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {About ScummVM Help
+\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls25\pnrnot0
+\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls25\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {About ScummVM Help
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par }{
This help file based on ScummVM forum thread with some elaborations(in Anotherguest section) and text correction. If you wish add some text or translate you may download and modify source document from https://sourceforge.net/projects/scummvms60git/ and t
@@ -77,8 +79,8 @@ hen send me to fedor_qd@mail.ru
\par }{\f29
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\b0\f28 1st guide
-\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls17\pnrnot0
-\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls17\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, UIQ, UIQ3, S80, s80, S90, s90
+\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls25\pnrnot0
+\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls25\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, UIQ, UIQ3, S80, s80, S90, s90
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par }{UIQ3 devices: To the top right (holding the phone portrait) you four icons, from the top they are
\par
@@ -119,21 +121,22 @@ hen send me to fedor_qd@mail.ru
\par
\par What are these Joystick, Keyboard and Cursor modes anyway?
\par }{\f28
-\par }{Joystick mode sends SDL joystick events to ScummVM which acts as a mouse control in ScummVM. Cursor mode sends keyboard arrows instead, so for example it can be used to navigate
-through directorylist (one hand use perhaps!?) or save games etc. Keyboard mode is only available for S60 and enables multi-tap to enter text characters in save dialogs. These modes are implemented at the underlying SDL level, so this determines the types
- of events that ScummVM receives from SDL.
+\par }{Joystick mode sends SDL joystick events to ScummVM which acts as a mouse control in ScummVM. Cursor mode sends keyboard arrows instead, so for examp
+le it can be used to navigate through directorylist (one hand use perhaps!?) or save games etc. Keyboard mode is only available for S60 and enables multi-tap to enter text characters in save dialogs. These modes are implemented at the underlying SDL level
+, so this determines the types of events that ScummVM receives from SDL.
\par What are these Shrinked, Zoomed and Upscaled modes anyway?
\par
-\par Shrink displays the game on your screen but in a shrinked way, either in Portrait or Landscape mode, so not all the pixels can be seen. Zoom mode uses the maximum resolution of your phone displaying a smaller part of the game zoomed at 1:1 pixels. For scr
-olling in S60 Zoom mode: 0+Cursor keys to scroll around, 0+Ok button to center view. Upscale tries to fill the larger screens on S80/S90 devices in a better way for low resolution games. Currently it uses a pixel interpolation upscaling routine.
+\par Shrink displays the game on your screen but in a shrinked way, either in Portrait or Landscape mode, so not all the pixels c
+an be seen. Zoom mode uses the maximum resolution of your phone displaying a smaller part of the game zoomed at 1:1 pixels. For scrolling in S60 Zoom mode: 0+Cursor keys to scroll around, 0+Ok button to center view. Upscale tries to fill the larger screen
+s on S80/S90 devices in a better way for low resolution games. Currently it uses a pixel interpolation upscaling routine.
\par
\par You can also use a bluetooth mouse with S60v3 devices to control your game. You need the bluetooth hid library from Hinkka http://koti.mbnet.fi/hinkka/Download.html to get it to work properly.
\par }{\f29
\par
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\b0\f28 2nd guide
-\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls17\pnrnot0
-\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls17\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, s60
+\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls25\pnrnot0
+\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls25\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, s60
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par
\par }{More user-friendly guide for Nokia phones (based on N96 but should apply to most phones)
@@ -158,8 +161,9 @@ olling in S60 Zoom mode: 0+Cursor keys to scroll around, 0+Ok button to center v
\par }{1 - Change Input.
\par This is the option you'll probably use the most. There are three settings; A,C and J.
\par
-\par A - This is the "Text Input" mode. It allows you to type directl
-y into ScummVM as if you were using a keyboard. Type the same way you would when sending a text message off of your phone. Please note that the pointer is disabled when in this mode. Don't forget to exit Configuration Mode before typing!
+\par A -
+ This is the "Text Input" mode. It allows you to type directly into ScummVM as if you were using a keyboard. Type the same way you would when sending a text message off of your phone. Please note that the pointer is disabled when in this mode. Don't forge
+t to exit Configuration Mode before typing!
\par
\par C - This is the "Cursor" mode. This emulates the arrow keys of the keyboard. Some games require using this instead of the mouse (e.g. the destruction derby section towards the end of Full Throttle).
\par
@@ -174,8 +178,8 @@ y into ScummVM as if you were using a keyboard. Type the same way you would when
\par Only applies to Landscape mode, simply swaps the screen output between having the phone tilted on its left side or on its right side.
\par
\par 4 - Toggle Zoom On and Off
-\par Zooms in on a portion of the screen. Handy for when you are looking through a screen for items or having trouble reading subtitles. Use the navigation buttons for panning around the play area. Don't forget you'll have to exit out of Confi
-guration Mode before you can move the pointer again. Exiting Configuration Mode does not reset the zoom level.
+\par Zooms in on a portion of the screen. Handy for when you are looking through a screen for items or having trouble readin
+g subtitles. Use the navigation buttons for panning around the play area. Don't forget you'll have to exit out of Configuration Mode before you can move the pointer again. Exiting Configuration Mode does not reset the zoom level.
\par }{\f29
\par }{5 & 6 - Unused
\par
@@ -196,8 +200,8 @@ guration Mode before you can move the pointer again. Exiting Configuration Mode
\par
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\b0\f28 3rd guide
-\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls17\pnrnot0
-\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls17\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, s60
+\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls25\pnrnot0
+\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls25\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, s60
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par
\par }{ScummVM keys on Nokia e71 (most likely on any other qwerty-device, too), tested on version 0.14.0svn (Feb. 18 2009
@@ -251,8 +255,9 @@ guration Mode before you can move the pointer again. Exiting Configuration Mode
\par p -- punch (hand)
\par
\par AGI games (King's Quest, Police Quest etc.):
-\par The games work beautifully on the E71, but there's some stupid bugs (in input). I recall finding some debug keys and "last sentence" / "inventory" -keys in earlier version, but I can't find them any more. Also you can't turn on sirens in Police Quest, whi
-ch kinda makes it unplayable.
+\par The
+ games work beautifully on the E71, but there's some stupid bugs (in input). I recall finding some debug keys and "last sentence" / "inventory" -keys in earlier version, but I can't find them any more. Also you can't turn on sirens in Police Quest, which
+kinda makes it unplayable.
\par
\par There's good side and bad side to each input mode:
\par Keyboard (I use this primarily)
@@ -273,8 +278,8 @@ ch kinda makes it unplayable.
\par }{\f28
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {ScummVM1 engines list
-\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls18\pnrnot0
-\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls18\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Supported games
+\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls26\pnrnot0
+\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls26\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Supported engines
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {agi
\par agos
\par \tab AGOS2
@@ -301,12 +306,13 @@ ch kinda makes it unplayable.
\par \tab SCUMM_7_8
\par touche
\par tucker
+\par voyeur
\par wintermute
\par
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {ScummVM2 engines list
-\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls18\pnrnot0
-\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls18\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Supported games
+\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls26\pnrnot0
+\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls26\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Supported engines
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {avalanche
\par cge
\par composer
@@ -316,6 +322,7 @@ ch kinda makes it unplayable.
\par hopkins
\par hugo
\par lure
+\par mads
\par mohawk
\par \tab CSTIME
\par \tab MYST
diff --git a/backends/platform/symbian/mmp/config.mmh b/backends/platform/symbian/mmp/config.mmh
new file mode 100644
index 0000000000..12c1fc2d2d
--- /dev/null
+++ b/backends/platform/symbian/mmp/config.mmh
@@ -0,0 +1,69 @@
+/* ScummVM - Graphic Adventure Engine
+ * 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-2014 The ScummVM Team
+ * Copyright (C) 2014 Fedor Strizhniou
+ *
+ * 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.
+ *
+ */
+
+//
+// Common EPOC MMP makefiles option storage for ScummVM
+//
+
+/*
+ * MACRO REMOVE_UNDEFINED used for bypass this bug -
+ * http://sourceforge.net/p/scummvm/bugs/6437/
+ * Requre change in epoc32\include\libc\sys\unistd.h by
+ *
+ * #ifndef REMOVE_UNDEFINED
+ * #define remove(x) unlink(x)
+ * #define wremove(x) wunlink(x)
+ * #endif //REMOVE_UNDEFINED
+ *
+ * Affects Avalanche, CGE2 and Tsage
+ */
+
+// *** Definitions
+
+OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
+OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
+// -Wno-psabi turn off "note: the mangling of 'va_list' has changed in GCC 4.4"
+OPTION GCCE -pipe -Wno-multichar -Wno-reorder -Wno-unused \
+ -Wno-format -fsigned-char-Wno-psabi
+ALWAYS_BUILD_AS_ARM
+
+// *** Include paths
+
+USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
+
+SYSTEMINCLUDE \epoc32\include\freetype
+SYSTEMINCLUDE \epoc32\include\mpeg2dec
+SYSTEMINCLUDE \epoc32\include\jpeg
+SYSTEMINCLUDE \epoc32\include\png
+SYSTEMINCLUDE \epoc32\include\ESDL
+SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
+SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\theora
+SYSTEMINCLUDE \epoc32\include\tremor
+SYSTEMINCLUDE \epoc32\include
+SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_avalanche.mmp.in b/backends/platform/symbian/mmp/scummvm_avalanche.mmp.in
index 5260edc79d..40047bb6b7 100644
--- a/backends/platform/symbian/mmp/scummvm_avalanche.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_avalanche.mmp.in
@@ -33,10 +33,8 @@
TARGET scummvm_avalanche.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+MACRO REMOVE_UNDEFINED
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -54,19 +52,3 @@ SOURCEPATH ..\..\..\..\engines\avalanche
//STOP_AUTO_OBJECTS_AVALANCHE_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_base.mmp.in b/backends/platform/symbian/mmp/scummvm_base.mmp.in
index cc65980b71..c3f12f6858 100644
--- a/backends/platform/symbian/mmp/scummvm_base.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_base.mmp.in
@@ -35,7 +35,7 @@ TARGETTYPE lib
OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
// using option -Wno-psabi to supress warning "note: the mangling of 'va_list' has changed in GCC 4.4"
-// compiler will use png.h from libpng.lib instead ScummVM's
+// compiler must use png.h from libpng.lib instead ScummVM's
OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char -Wno-psabi -I'/Symbian/S60_5th_Edition_SDK_v1.0/epoc32/include/png'
ALWAYS_BUILD_AS_ARM
@@ -85,6 +85,15 @@ SOURCEPATH ..\..\..\..\graphics
//STOP_AUTO_OBJECTS_GRAPHICS_//
+SOURCEPATH ..\..\..\..\image
+//START_AUTO_OBJECTS_IMAGE_//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_OBJECTS_IMAGE_//
+// add a few files manually, since they are not parsed from modules.mk files
+SOURCE codecs\mpeg.cpp
+
SOURCEPATH ..\..\..\..\gui
//START_AUTO_OBJECTS_GUI_//
@@ -122,7 +131,6 @@ SOURCEPATH ..\..\..\..\video
// add a few files manually, since they are not parsed from modules.mk files
SOURCE theora_decoder.cpp
SOURCE bink_decoder.cpp
-SOURCE codecs\mpeg.cpp
SOURCEPATH ..\..\..\..
SOURCE backends\events\default\default-events.cpp
diff --git a/backends/platform/symbian/mmp/scummvm_bbvs.mmp.in b/backends/platform/symbian/mmp/scummvm_bbvs.mmp.in
new file mode 100644
index 0000000000..b4981e6eec
--- /dev/null
+++ b/backends/platform/symbian/mmp/scummvm_bbvs.mmp.in
@@ -0,0 +1,72 @@
+/* ScummVM - Graphic Adventure Engine
+ * 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-2014 The ScummVM Team
+ * Copyright (C) 2014 Fedor Strizhniou - Epoc project file
+ *
+ * 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.
+ *
+ */
+
+//
+// EPOC MMP makefile project for ScummVM
+//
+
+// *** Definitions
+
+TARGET scummvm_bbvs.lib
+TARGETTYPE lib
+OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
+OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
+OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
+ALWAYS_BUILD_AS_ARM
+
+//START_AUTO_MACROS_SLAVE//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_MACROS_SLAVE//
+
+// *** SOURCE files
+
+SOURCEPATH ..\..\..\..\engines\bbvs
+
+//START_AUTO_OBJECTS_BBVS_//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_OBJECTS_BBVS_//
+
+// *** Include paths
+
+USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
+
+SYSTEMINCLUDE \epoc32\include\freetype
+SYSTEMINCLUDE \epoc32\include\mpeg2dec
+SYSTEMINCLUDE \epoc32\include\jpeg
+SYSTEMINCLUDE \epoc32\include\png
+SYSTEMINCLUDE \epoc32\include\ESDL
+SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
+SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\theora
+SYSTEMINCLUDE \epoc32\include\tremor
+SYSTEMINCLUDE \epoc32\include
+SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_cge2.mmp.in b/backends/platform/symbian/mmp/scummvm_cge2.mmp.in
new file mode 100644
index 0000000000..f9c97e1d83
--- /dev/null
+++ b/backends/platform/symbian/mmp/scummvm_cge2.mmp.in
@@ -0,0 +1,53 @@
+/* ScummVM - Graphic Adventure Engine
+ * 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-2013 The ScummVM project
+ *
+ * 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.
+ *
+ */
+
+//
+// EPOC MMP makefile project for ScummVM
+//
+
+// *** Definitions
+
+TARGET scummvm_cge2.lib
+TARGETTYPE lib
+MACRO REMOVE_UNDEFINED
+#include "config.mmh"
+
+//START_AUTO_MACROS_SLAVE//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_MACROS_SLAVE//
+
+// *** SOURCE files
+
+SOURCEPATH ..\..\..\..\engines\cge2
+
+//START_AUTO_OBJECTS_CGE2_//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_OBJECTS_CGE2_//
+
diff --git a/backends/platform/symbian/mmp/scummvm_fullpipe.mmp.in b/backends/platform/symbian/mmp/scummvm_fullpipe.mmp.in
index 7612ad2bae..dc5d4da6b7 100644
--- a/backends/platform/symbian/mmp/scummvm_fullpipe.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_fullpipe.mmp.in
@@ -33,10 +33,7 @@
TARGET scummvm_fullpipe.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -54,19 +51,3 @@ SOURCEPATH ..\..\..\..\engines\fullpipe
//STOP_AUTO_OBJECTS_FULLPIPE_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_groovie.mmp.in b/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
index de6483bebf..53fb33fef0 100644
--- a/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
@@ -52,6 +52,7 @@ SOURCEPATH ..\..\..\..\engines\groovie
// empty base file, will be updated by Perl build scripts
//STOP_AUTO_OBJECTS_GROOVIE_//
+SOURCE roq.cpp
// *** Include paths
diff --git a/backends/platform/symbian/mmp/scummvm_mads.mmp.in b/backends/platform/symbian/mmp/scummvm_mads.mmp.in
new file mode 100644
index 0000000000..d0d6091f83
--- /dev/null
+++ b/backends/platform/symbian/mmp/scummvm_mads.mmp.in
@@ -0,0 +1,72 @@
+/* ScummVM - Graphic Adventure Engine
+ * 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-2013 The ScummVM project
+ * Copyright (C) 2014 Fedor Strizhniou - Epoc project file
+ *
+ * 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.
+ *
+ */
+
+//
+// EPOC MMP makefile project for ScummVM
+//
+
+// *** Definitions
+
+TARGET scummvm_mads.lib
+TARGETTYPE lib
+OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
+OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
+OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
+ALWAYS_BUILD_AS_ARM
+
+//START_AUTO_MACROS_SLAVE//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_MACROS_SLAVE//
+
+// *** SOURCE files
+
+SOURCEPATH ..\..\..\..\engines\mads
+
+//START_AUTO_OBJECTS_MADS_//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_OBJECTS_MADS_//
+
+// *** Include paths
+
+USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
+
+SYSTEMINCLUDE \epoc32\include\freetype
+SYSTEMINCLUDE \epoc32\include\mpeg2dec
+SYSTEMINCLUDE \epoc32\include\jpeg
+SYSTEMINCLUDE \epoc32\include\png
+SYSTEMINCLUDE \epoc32\include\ESDL
+SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
+SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\theora
+SYSTEMINCLUDE \epoc32\include\tremor
+SYSTEMINCLUDE \epoc32\include
+SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_tsage.mmp.in b/backends/platform/symbian/mmp/scummvm_tsage.mmp.in
index cd5c5ec7b9..e18db61683 100644
--- a/backends/platform/symbian/mmp/scummvm_tsage.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_tsage.mmp.in
@@ -32,10 +32,8 @@
TARGET scummvm_tsage.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+MACRO REMOVE_UNDEFINED
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +51,3 @@ SOURCEPATH ..\..\..\..\engines\tsage
//STOP_AUTO_OBJECTS_TSAGE_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_voyeur.mmp.in b/backends/platform/symbian/mmp/scummvm_voyeur.mmp.in
new file mode 100644
index 0000000000..86dc32b3f8
--- /dev/null
+++ b/backends/platform/symbian/mmp/scummvm_voyeur.mmp.in
@@ -0,0 +1,71 @@
+/* ScummVM - Graphic Adventure Engine
+ * 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-2014 The ScummVM Team
+ *
+ * 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.
+ *
+ */
+
+//
+// EPOC MMP makefile project for ScummVM
+//
+
+// *** Definitions
+
+TARGET scummvm_voyeur.lib
+TARGETTYPE lib
+OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
+OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
+OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
+ALWAYS_BUILD_AS_ARM
+
+//START_AUTO_MACROS_SLAVE//
+
+// empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_MACROS_SLAVE//
+
+// *** SOURCE files
+
+SOURCEPATH ..\..\..\..\engines\voyeur
+
+//START_AUTO_OBJECTS_VOYEUR_//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_OBJECTS_VOYEUR_//
+
+// *** Include paths
+
+USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
+
+SYSTEMINCLUDE \epoc32\include\freetype
+SYSTEMINCLUDE \epoc32\include\mpeg2dec
+SYSTEMINCLUDE \epoc32\include\jpeg
+SYSTEMINCLUDE \epoc32\include\png
+SYSTEMINCLUDE \epoc32\include\ESDL
+SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
+SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\theora
+SYSTEMINCLUDE \epoc32\include\tremor
+SYSTEMINCLUDE \epoc32\include
+SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in b/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in
index a430f64847..63dd7d39d8 100644
--- a/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in
@@ -34,7 +34,8 @@ TARGET scummvm_wintermute.lib
TARGETTYPE lib
OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
+// -Wno-psabi turn off "note: the mangling of 'va_list' has changed in GCC 4.4"
+OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char -Wno-psabi
ALWAYS_BUILD_AS_ARM
//START_AUTO_MACROS_SLAVE//
diff --git a/backends/platform/symbian/mmp/scummvm_zvision.mmp.in b/backends/platform/symbian/mmp/scummvm_zvision.mmp.in
index f8448e0423..642f659551 100644
--- a/backends/platform/symbian/mmp/scummvm_zvision.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_zvision.mmp.in
@@ -3,7 +3,7 @@
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
* Copyright (C) 2005-2013 The ScummVM project
- * Copyright (C) 2013 Strizniou Fedor
+ * Copyright (C) 2013 Strizniou Fedor - Epoc project file
*
* 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/tizen/form.cpp b/backends/platform/tizen/form.cpp
index 3f7b918102..568829dc96 100644
--- a/backends/platform/tizen/form.cpp
+++ b/backends/platform/tizen/form.cpp
@@ -338,7 +338,14 @@ void TizenAppForm::showKeypad() {
// display the soft keyboard
if (_state == kActiveState) {
_buttonState = kLeftButton;
- pushKey(Common::KEYCODE_F7);
+
+ Common::Event e;
+ e.type = Common::EVENT_VIRTUAL_KEYBOARD;
+ if (_eventQueueLock) {
+ _eventQueueLock->Acquire();
+ _eventQueue.push(e);
+ _eventQueueLock->Release();
+ }
}
}
diff --git a/backends/platform/wii/osystem_events.cpp b/backends/platform/wii/osystem_events.cpp
index 2da1d80917..0563639de3 100644
--- a/backends/platform/wii/osystem_events.cpp
+++ b/backends/platform/wii/osystem_events.cpp
@@ -357,8 +357,8 @@ bool OSystem_Wii::pollEvent(Common::Event &event) {
PAD_EVENT(PADS_Y, Common::KEYCODE_PERIOD, '.', flags);
PAD_EVENT(PADS_START, Common::KEYCODE_F5, Common::ASCII_F5, flags);
PAD_EVENT(PADS_UP, Common::KEYCODE_LSHIFT, 0, flags);
- PAD_EVENT(PADS_DOWN, Common::KEYCODE_F7, Common::ASCII_F7, flags);
- //PAD_EVENT(PADS_LEFT, Common::KEYCODE_F8, Common::ASCII_F8, 0);
+ PAD_EVENT(PADS_DOWN, Common::KEYCODE_F7, Common::ASCII_F7, Common::KBD_CTRL);
+ //PAD_EVENT(PADS_LEFT, Common::KEYCODE_F8, Common::ASCII_F8, Common::KBD_CTRL);
if ((bd | bu) & (PADS_A | PADS_B)) {
if (bd & PADS_A)
diff --git a/backends/platform/wii/wii.mk b/backends/platform/wii/wii.mk
index 99ef46338c..62a8900d9a 100644
--- a/backends/platform/wii/wii.mk
+++ b/backends/platform/wii/wii.mk
@@ -43,6 +43,7 @@ ifneq ($(DIST_FILES_ENGINEDATA),)
$(CP) $(DIST_FILES_ENGINEDATA) wiidist/scummvm/
endif
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip wiidist/scummvm/
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip wiidist/scummvm/
wiiloaddist: wiidist
cd wiidist && zip -9r scummvm.zip scummvm/
diff --git a/backends/vkeybd/packs/vkeybd_small.zip b/backends/vkeybd/packs/vkeybd_small.zip
new file mode 100644
index 0000000000..d1c7fc75e5
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_small.zip
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_small/lowercase-symbols320x240.bmp b/backends/vkeybd/packs/vkeybd_small/lowercase-symbols320x240.bmp
new file mode 100644
index 0000000000..08d40a0373
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_small/lowercase-symbols320x240.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_small/lowercase320x240.bmp b/backends/vkeybd/packs/vkeybd_small/lowercase320x240.bmp
new file mode 100644
index 0000000000..25579234bb
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_small/lowercase320x240.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_small/uppercase-symbols320x240.bmp b/backends/vkeybd/packs/vkeybd_small/uppercase-symbols320x240.bmp
new file mode 100644
index 0000000000..76a7f51839
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_small/uppercase-symbols320x240.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_small/uppercase320x240.bmp b/backends/vkeybd/packs/vkeybd_small/uppercase320x240.bmp
new file mode 100644
index 0000000000..96ce1adbe4
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_small/uppercase320x240.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_small/vkeybd_small.xml b/backends/vkeybd/packs/vkeybd_small/vkeybd_small.xml
new file mode 100644
index 0000000000..20e91fe2fc
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_small/vkeybd_small.xml
@@ -0,0 +1,637 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<keyboard initial_mode="lowercase" v_align="bottom" h_align="center">
+<!-- coords key = "start x, start y, end x, end y" -->
+ <!-- Lowercase -->
+ <mode name="lowercase" resolutions="320x240">
+ <layout resolution="320x240" bitmap="lowercase320x240.bmp" transparent_color="255,0,255">
+ <map>
+ <area shape="rect" coords="13,8,306,20" target="display_area" />
+ <area shape="rect" coords="9,26,25,42" target="esc" />
+ <area shape="rect" coords="50,25,67,43" target="f2" />
+ <area shape="rect" coords="29,24,46,43" target="f1" />
+ <area shape="rect" coords="71,26,88,44" target="f3" />
+ <area shape="rect" coords="90,25,107,43" target="f4" />
+ <area shape="rect" coords="111,26,128,44" target="f5" />
+ <area shape="rect" coords="132,26,149,44" target="f6" />
+ <area shape="rect" coords="153,25,170,44" target="f7" />
+ <area shape="rect" coords="173,26,190,44" target="f8" />
+ <area shape="rect" coords="194,24,211,43" target="f9" />
+ <area shape="rect" coords="215,26,231,44" target="f10" />
+ <area shape="rect" coords="235,26,253,43" target="f11" />
+ <area shape="rect" coords="255,26,272,45" target="f12" />
+ <area shape="rect" coords="276,27,310,43" target="del" />
+ <area shape="rect" coords="276,46,299,65" target="delete" />
+ <area shape="rect" coords="300,46,311,65" target="backspace" />
+ <area shape="rect" coords="8,68,32,85" target="tab" />
+ <area shape="rect" coords="36,68,53,85" target="q" />
+ <area shape="rect" coords="57,68,75,86" target="w" />
+ <area shape="rect" coords="78,67,94,85" target="e" />
+ <area shape="rect" coords="98,67,115,85" target="r" />
+ <area shape="rect" coords="119,67,136,85" target="t" />
+ <area shape="rect" coords="141,68,158,86" target="y" />
+ <area shape="rect" coords="161,67,179,86" target="u" />
+ <area shape="rect" coords="182,67,199,86" target="i" />
+ <area shape="rect" coords="202,67,220,85" target="o" />
+ <area shape="rect" coords="223,68,240,86" target="p" />
+ <area shape="rect" coords="44,88,63,107" target="a" />
+ <area shape="rect" coords="65,88,84,106" target="s" />
+ <area shape="rect" coords="86,89,104,107" target="d" />
+ <area shape="rect" coords="107,89,124,107" target="f" />
+ <area shape="rect" coords="128,89,145,107" target="g" />
+ <area shape="rect" coords="149,88,165,107" target="h" />
+ <area shape="rect" coords="169,89,186,107" target="j" />
+ <area shape="rect" coords="189,89,207,107" target="k" />
+ <area shape="rect" coords="210,89,228,107" target="l" />
+ <area shape="rect" coords="273,89,311,106" target="enter" />
+ <area shape="rect" coords="9,110,50,127" target="shift" />
+ <area shape="rect" coords="8,89,41,106" target="caps" />
+ <area shape="rect" coords="58,110,75,128" target="z" />
+ <area shape="rect" coords="79,110,96,128" target="x" />
+ <area shape="rect" coords="99,109,116,127" target="c" />
+ <area shape="rect" coords="120,110,138,128" target="v" />
+ <area shape="rect" coords="141,109,157,127" target="b" />
+ <area shape="rect" coords="162,110,179,128" target="n" />
+ <area shape="rect" coords="182,110,199,128" target="m" />
+ <area shape="rect" coords="271,109,311,128" target="symbols" />
+ <area shape="rect" coords="9,130,33,148" target="ctrl" />
+ <area shape="rect" coords="38,130,61,147" target="alt" />
+ <area shape="rect" coords="67,130,262,148" target="space" />
+ <area shape="rect" coords="8,47,26,64" target="|" />
+ <area shape="rect" coords="28,47,45,64" target="1" />
+ <area shape="rect" coords="50,47,67,65" target="2" />
+ <area shape="rect" coords="70,46,87,65" target="3" />
+ <area shape="rect" coords="91,46,108,64" target="4" />
+ <area shape="rect" coords="111,46,129,65" target="5" />
+ <area shape="rect" coords="132,47,149,65" target="6" />
+ <area shape="rect" coords="152,47,170,64" target="7" />
+ <area shape="rect" coords="174,46,191,63" target="8" />
+ <area shape="rect" coords="194,47,211,65" target="9" />
+ <area shape="rect" coords="215,46,232,64" target="0" />
+ <area shape="rect" coords="235,47,252,65" target="-" />
+ <area shape="rect" coords="255,46,272,65" target="=" />
+ <area shape="rect" coords="244,68,261,86" target="[" />
+ <area shape="rect" coords="264,67,282,86" target="]" />
+ <area shape="rect" coords="284,68,309,86" target="#" />
+ <area shape="rect" coords="231,88,249,106" target=";" />
+ <area shape="rect" coords="251,89,269,107" target="т€™" />
+ <area shape="rect" coords="202,110,219,128" target="," />
+ <area shape="rect" coords="223,110,241,128" target="." />
+ <area shape="rect" coords="243,110,261,128" target="/" />
+ <area shape="rect" coords="269,131,288,150" target="ok" />
+ <area shape="rect" coords="292,131,311,150" target="cancel" />
+ </map>
+ </layout>
+ <event name="esc" type="key" code="27" ascii="27" modifiers="" />
+ <event name="f1" type="key" code="282" ascii="315" modifiers="" />
+ <event name="f2" type="key" code="283" ascii="316" modifiers="" />
+ <event name="f3" type="key" code="284" ascii="317" modifiers="" />
+ <event name="f4" type="key" code="285" ascii="318" modifiers="" />
+ <event name="f5" type="key" code="286" ascii="319" modifiers="" />
+ <event name="f6" type="key" code="287" ascii="320" modifiers="" />
+ <event name="f7" type="key" code="288" ascii="321" modifiers="" />
+ <event name="f8" type="key" code="289" ascii="322" modifiers="" />
+ <event name="f9" type="key" code="290" ascii="323" modifiers="" />
+ <event name="f10" type="key" code="291" ascii="324" modifiers="" />
+ <event name="f11" type="key" code="292" ascii="325" modifiers="" />
+ <event name="f12" type="key" code="293" ascii="326" modifiers="" />
+ <event name="del" type="key" code="127" ascii="0" modifiers="" />
+ <event name="ctrl" type="modifier" modifiers="ctrl" />
+ <event name="alt" type="modifier" modifiers="alt" />
+ <event name="shift" type="modifier" modifiers="shift" />
+ <event name="caps" type="switch_mode" mode="uppercase" />
+ <event name="symbols" type="switch_mode" mode="lowercasesymbols" />
+ <event name="backspace" type="key" code="8" ascii="8" modifiers="" />
+ <event name="enter" type="key" code="13" ascii="13" modifiers="" />
+ <event name="|" type="key" code="124" ascii="124" modifiers="" />
+ <event name="-" type="key" code="45" ascii="45" modifiers="" />
+ <event name="=" type="key" code="61" ascii="61" modifiers="" />
+ <event name="[" type="key" code="91" ascii="91" modifiers="" />
+ <event name="]" type="key" code="93" ascii="93" modifiers="" />
+ <event name="#" type="key" code="35" ascii="35" modifiers="" />
+ <event name=";" type="key" code="59" ascii="59" modifiers="" />
+ <event name="'" type="key" code="39" ascii="39" modifiers="" />
+ <event name="," type="key" code="44" ascii="44" modifiers="" />
+ <event name="." type="key" code="46" ascii="46" modifiers="" />
+ <event name="/" type="key" code="47" ascii="47" modifiers="" />
+ <event name="space" type="key" code="32" ascii="32" modifiers="" />
+ <event name="tab" type="key" code="9" ascii="9" modifiers="" />
+ <event name="a" type="key" code="97" ascii="97" modifiers="" />
+ <event name="b" type="key" code="98" ascii="98" modifiers="" />
+ <event name="c" type="key" code="99" ascii="99" modifiers="" />
+ <event name="d" type="key" code="100" ascii="100" modifiers="" />
+ <event name="e" type="key" code="101" ascii="101" modifiers="" />
+ <event name="f" type="key" code="102" ascii="102" modifiers="" />
+ <event name="g" type="key" code="103" ascii="103" modifiers="" />
+ <event name="h" type="key" code="104" ascii="104" modifiers="" />
+ <event name="i" type="key" code="105" ascii="105" modifiers="" />
+ <event name="j" type="key" code="106" ascii="106" modifiers="" />
+ <event name="k" type="key" code="107" ascii="107" modifiers="" />
+ <event name="l" type="key" code="108" ascii="108" modifiers="" />
+ <event name="m" type="key" code="109" ascii="109" modifiers="" />
+ <event name="n" type="key" code="110" ascii="110" modifiers="" />
+ <event name="o" type="key" code="111" ascii="111" modifiers="" />
+ <event name="p" type="key" code="112" ascii="112" modifiers="" />
+ <event name="q" type="key" code="113" ascii="113" modifiers="" />
+ <event name="r" type="key" code="114" ascii="114" modifiers="" />
+ <event name="s" type="key" code="115" ascii="115" modifiers="" />
+ <event name="t" type="key" code="116" ascii="116" modifiers="" />
+ <event name="u" type="key" code="117" ascii="117" modifiers="" />
+ <event name="v" type="key" code="118" ascii="118" modifiers="" />
+ <event name="w" type="key" code="119" ascii="119" modifiers="" />
+ <event name="x" type="key" code="120" ascii="120" modifiers="" />
+ <event name="y" type="key" code="121" ascii="121" modifiers="" />
+ <event name="z" type="key" code="122" ascii="122" modifiers="" />
+ <event name="0" type="key" code="48" ascii="48" modifiers="" />
+ <event name="1" type="key" code="49" ascii="49" modifiers="" />
+ <event name="2" type="key" code="50" ascii="50" modifiers="" />
+ <event name="3" type="key" code="51" ascii="51" modifiers="" />
+ <event name="4" type="key" code="52" ascii="52" modifiers="" />
+ <event name="5" type="key" code="53" ascii="53" modifiers="" />
+ <event name="6" type="key" code="54" ascii="54" modifiers="" />
+ <event name="7" type="key" code="55" ascii="55" modifiers="" />
+ <event name="8" type="key" code="56" ascii="56" modifiers="" />
+ <event name="9" type="key" code="57" ascii="57" modifiers="" />
+ <event name="ok" type="submit" />
+ <event name="cancel" type="cancel" />
+ <event name="quit" type="submit" />
+ <event name="delete" type="delete" />
+ </mode>
+
+ <!-- Uppercase -->
+ <mode name="uppercase" resolutions="320x240">
+ <layout resolution="320x240" bitmap="uppercase320x240.bmp" transparent_color="255,0,255">
+ <map>
+ <area shape="rect" coords="13,8,306,20" target="display_area" />
+ <area shape="rect" coords="9,26,25,42" target="esc" />
+ <area shape="rect" coords="50,25,67,43" target="f2" />
+ <area shape="rect" coords="29,24,46,43" target="f1" />
+ <area shape="rect" coords="71,26,88,44" target="f3" />
+ <area shape="rect" coords="90,25,107,43" target="f4" />
+ <area shape="rect" coords="111,26,128,44" target="f5" />
+ <area shape="rect" coords="132,26,149,44" target="f6" />
+ <area shape="rect" coords="153,25,170,44" target="f7" />
+ <area shape="rect" coords="173,26,190,44" target="f8" />
+ <area shape="rect" coords="194,24,211,43" target="f9" />
+ <area shape="rect" coords="215,26,231,44" target="f10" />
+ <area shape="rect" coords="235,26,253,43" target="f11" />
+ <area shape="rect" coords="255,26,272,45" target="f12" />
+ <area shape="rect" coords="276,27,310,43" target="del" />
+ <area shape="rect" coords="276,46,299,65" target="delete" />
+ <area shape="rect" coords="300,46,311,65" target="backspace" />
+ <area shape="rect" coords="8,68,32,85" target="tab" />
+ <area shape="rect" coords="36,68,53,85" target="Q" />
+ <area shape="rect" coords="57,68,75,86" target="W" />
+ <area shape="rect" coords="78,67,94,85" target="E" />
+ <area shape="rect" coords="98,67,115,85" target="R" />
+ <area shape="rect" coords="119,67,136,85" target="T" />
+ <area shape="rect" coords="141,68,158,86" target="Y" />
+ <area shape="rect" coords="161,67,179,86" target="U" />
+ <area shape="rect" coords="182,67,199,86" target="I" />
+ <area shape="rect" coords="202,67,220,85" target="O" />
+ <area shape="rect" coords="223,68,240,86" target="P" />
+ <area shape="rect" coords="44,88,63,107" target="A" />
+ <area shape="rect" coords="65,88,84,106" target="S" />
+ <area shape="rect" coords="86,89,104,107" target="D" />
+ <area shape="rect" coords="107,89,124,107" target="F" />
+ <area shape="rect" coords="128,89,145,107" target="G" />
+ <area shape="rect" coords="149,88,165,107" target="H" />
+ <area shape="rect" coords="169,89,186,107" target="J" />
+ <area shape="rect" coords="189,89,207,107" target="K" />
+ <area shape="rect" coords="210,89,228,107" target="L" />
+ <area shape="rect" coords="273,89,311,106" target="enter" />
+ <area shape="rect" coords="9,110,50,127" target="shift" />
+ <area shape="rect" coords="8,89,41,106" target="caps" />
+ <area shape="rect" coords="58,110,75,128" target="Z" />
+ <area shape="rect" coords="79,110,96,128" target="X" />
+ <area shape="rect" coords="99,109,116,127" target="C" />
+ <area shape="rect" coords="120,110,138,128" target="V" />
+ <area shape="rect" coords="141,109,157,127" target="B" />
+ <area shape="rect" coords="162,110,179,128" target="N" />
+ <area shape="rect" coords="182,110,199,128" target="M" />
+ <area shape="rect" coords="271,109,311,128" target="symbols" />
+ <area shape="rect" coords="9,130,33,148" target="ctrl" />
+ <area shape="rect" coords="38,130,61,147" target="alt" />
+ <area shape="rect" coords="67,130,262,148" target="space" />
+ <area shape="rect" coords="8,47,26,64" target="|" />
+ <area shape="rect" coords="28,47,45,64" target="1" />
+ <area shape="rect" coords="50,47,67,65" target="2" />
+ <area shape="rect" coords="70,46,87,65" target="3" />
+ <area shape="rect" coords="91,46,108,64" target="4" />
+ <area shape="rect" coords="111,46,129,65" target="5" />
+ <area shape="rect" coords="132,47,149,65" target="6" />
+ <area shape="rect" coords="152,47,170,64" target="7" />
+ <area shape="rect" coords="174,46,191,63" target="8" />
+ <area shape="rect" coords="194,47,211,65" target="9" />
+ <area shape="rect" coords="215,46,232,64" target="0" />
+ <area shape="rect" coords="235,47,252,65" target="-" />
+ <area shape="rect" coords="255,46,272,65" target="=" />
+ <area shape="rect" coords="244,68,261,86" target="[" />
+ <area shape="rect" coords="264,67,282,86" target="]" />
+ <area shape="rect" coords="284,68,309,86" target="#" />
+ <area shape="rect" coords="231,88,249,106" target=";" />
+ <area shape="rect" coords="251,89,269,107" target="т€™" />
+ <area shape="rect" coords="202,110,219,128" target="," />
+ <area shape="rect" coords="223,110,241,128" target="." />
+ <area shape="rect" coords="243,110,261,128" target="/" />
+ <area shape="rect" coords="269,131,288,150" target="ok" />
+ <area shape="rect" coords="292,131,311,150" target="cancel" />
+ </map>
+ </layout>
+ <event name="esc" type="key" code="27" ascii="27" modifiers="" />
+ <event name="f1" type="key" code="282" ascii="315" modifiers="" />
+ <event name="f2" type="key" code="283" ascii="316" modifiers="" />
+ <event name="f3" type="key" code="284" ascii="317" modifiers="" />
+ <event name="f4" type="key" code="285" ascii="318" modifiers="" />
+ <event name="f5" type="key" code="286" ascii="319" modifiers="" />
+ <event name="f6" type="key" code="287" ascii="320" modifiers="" />
+ <event name="f7" type="key" code="288" ascii="321" modifiers="" />
+ <event name="f8" type="key" code="289" ascii="322" modifiers="" />
+ <event name="f9" type="key" code="290" ascii="323" modifiers="" />
+ <event name="f10" type="key" code="291" ascii="324" modifiers="" />
+ <event name="f11" type="key" code="292" ascii="325" modifiers="" />
+ <event name="f12" type="key" code="293" ascii="326" modifiers="" />
+ <event name="del" type="key" code="127" ascii="0" modifiers="" />
+ <event name="ctrl" type="modifier" modifiers="ctrl" />
+ <event name="alt" type="modifier" modifiers="alt" />
+ <event name="shift" type="modifier" modifiers="shift" />
+ <event name="caps" type="switch_mode" mode="lowercase" />
+ <event name="symbols" type="switch_mode" mode="uppercasesymbols" />
+ <event name="backspace" type="key" code="8" ascii="8" modifiers="" />
+ <event name="enter" type="key" code="13" ascii="13" modifiers="" />
+ <event name="|" type="key" code="124" ascii="124" modifiers="" />
+ <event name="-" type="key" code="45" ascii="45" modifiers="" />
+ <event name="=" type="key" code="61" ascii="61" modifiers="" />
+ <event name="[" type="key" code="91" ascii="91" modifiers="" />
+ <event name="]" type="key" code="93" ascii="93" modifiers="" />
+ <event name="#" type="key" code="35" ascii="35" modifiers="" />
+ <event name=";" type="key" code="59" ascii="59" modifiers="" />
+ <event name="'" type="key" code="39" ascii="39" modifiers="" />
+ <event name="," type="key" code="44" ascii="44" modifiers="" />
+ <event name="." type="key" code="46" ascii="46" modifiers="" />
+ <event name="/" type="key" code="47" ascii="47" modifiers="" />
+ <event name="space" type="key" code="32" ascii="32" modifiers="" />
+ <event name="tab" type="key" code="9" ascii="9" modifiers="" />
+ <event name="A" type="key" code="97" ascii="65" modifiers="shift" />
+ <event name="B" type="key" code="98" ascii="66" modifiers="shift" />
+ <event name="C" type="key" code="99" ascii="67" modifiers="shift" />
+ <event name="D" type="key" code="100" ascii="68" modifiers="shift" />
+ <event name="E" type="key" code="101" ascii="69" modifiers="shift" />
+ <event name="F" type="key" code="102" ascii="70" modifiers="shift" />
+ <event name="G" type="key" code="103" ascii="71" modifiers="shift" />
+ <event name="H" type="key" code="104" ascii="72" modifiers="shift" />
+ <event name="I" type="key" code="105" ascii="73" modifiers="shift" />
+ <event name="J" type="key" code="106" ascii="74" modifiers="shift" />
+ <event name="K" type="key" code="107" ascii="75" modifiers="shift" />
+ <event name="L" type="key" code="108" ascii="76" modifiers="shift" />
+ <event name="M" type="key" code="109" ascii="77" modifiers="shift" />
+ <event name="N" type="key" code="110" ascii="78" modifiers="shift" />
+ <event name="O" type="key" code="111" ascii="79" modifiers="shift" />
+ <event name="P" type="key" code="112" ascii="80" modifiers="shift" />
+ <event name="Q" type="key" code="113" ascii="81" modifiers="shift" />
+ <event name="R" type="key" code="114" ascii="82" modifiers="shift" />
+ <event name="S" type="key" code="115" ascii="83" modifiers="shift" />
+ <event name="T" type="key" code="116" ascii="84" modifiers="shift" />
+ <event name="U" type="key" code="117" ascii="85" modifiers="shift" />
+ <event name="V" type="key" code="118" ascii="86" modifiers="shift" />
+ <event name="W" type="key" code="119" ascii="87" modifiers="shift" />
+ <event name="X" type="key" code="120" ascii="88" modifiers="shift" />
+ <event name="Y" type="key" code="121" ascii="89" modifiers="shift" />
+ <event name="Z" type="key" code="122" ascii="90" modifiers="shift" />
+ <event name="0" type="key" code="48" ascii="48" modifiers="" />
+ <event name="1" type="key" code="49" ascii="49" modifiers="" />
+ <event name="2" type="key" code="50" ascii="50" modifiers="" />
+ <event name="3" type="key" code="51" ascii="51" modifiers="" />
+ <event name="4" type="key" code="52" ascii="52" modifiers="" />
+ <event name="5" type="key" code="53" ascii="53" modifiers="" />
+ <event name="6" type="key" code="54" ascii="54" modifiers="" />
+ <event name="7" type="key" code="55" ascii="55" modifiers="" />
+ <event name="8" type="key" code="56" ascii="56" modifiers="" />
+ <event name="9" type="key" code="57" ascii="57" modifiers="" />
+ <event name="ok" type="submit" />
+ <event name="cancel" type="cancel" />
+ <event name="quit" type="submit" />
+ <event name="delete" type="delete" />
+ </mode>
+
+ <!-- Lowercase Symbols -->
+ <mode name="lowercasesymbols" resolutions="320x240">
+ <layout resolution="320x240" bitmap="lowercase-symbols320x240.bmp" transparent_color="255,0,255">
+ <map>
+ <area shape="rect" coords="13,8,306,20" target="display_area" />
+ <area shape="rect" coords="9,26,25,42" target="esc" />
+ <area shape="rect" coords="50,25,67,43" target="f2" />
+ <area shape="rect" coords="29,24,46,43" target="f1" />
+ <area shape="rect" coords="71,26,88,44" target="f3" />
+ <area shape="rect" coords="90,25,107,43" target="f4" />
+ <area shape="rect" coords="111,26,128,44" target="f5" />
+ <area shape="rect" coords="132,26,149,44" target="f6" />
+ <area shape="rect" coords="153,25,170,44" target="f7" />
+ <area shape="rect" coords="173,26,190,44" target="f8" />
+ <area shape="rect" coords="194,24,211,43" target="f9" />
+ <area shape="rect" coords="215,26,231,44" target="f10" />
+ <area shape="rect" coords="235,26,253,43" target="f11" />
+ <area shape="rect" coords="255,26,272,45" target="f12" />
+ <area shape="rect" coords="276,27,310,43" target="del" />
+ <area shape="rect" coords="8,47,26,64" target="ТЌ" />
+ <area shape="rect" coords="28,47,45,64" target="!" />
+ <area shape="rect" coords="50,47,67,65" target="quote" />
+ <area shape="rect" coords="70,46,87,65" target="ТЃ" />
+ <area shape="rect" coords="91,46,108,64" target="$" />
+ <area shape="rect" coords="111,46,129,65" target="%" />
+ <area shape="rect" coords="132,47,149,65" target="^" />
+ <area shape="rect" coords="152,47,170,64" target="&amp;" />
+ <area shape="rect" coords="174,46,191,63" target="*" />
+ <area shape="rect" coords="194,47,211,65" target="(" />
+ <area shape="rect" coords="215,46,232,64" target=")" />
+ <area shape="rect" coords="235,47,252,65" target="_" />
+ <area shape="rect" coords="255,46,272,65" target="+" />
+ <area shape="rect" coords="276,46,299,65" target="delete" />
+ <area shape="rect" coords="300,46,311,65" target="backspace" />
+ <area shape="rect" coords="8,68,32,85" target="tab" />
+ <area shape="rect" coords="36,68,53,85" target="q" />
+ <area shape="rect" coords="57,68,75,86" target="w" />
+ <area shape="rect" coords="78,67,94,85" target="e" />
+ <area shape="rect" coords="98,67,115,85" target="r" />
+ <area shape="rect" coords="119,67,136,85" target="t" />
+ <area shape="rect" coords="141,68,158,86" target="y" />
+ <area shape="rect" coords="161,67,179,86" target="u" />
+ <area shape="rect" coords="182,67,199,86" target="i" />
+ <area shape="rect" coords="202,67,220,85" target="o" />
+ <area shape="rect" coords="223,68,240,86" target="p" />
+ <area shape="rect" coords="244,68,261,86" target="{" />
+ <area shape="rect" coords="264,67,282,86" target="}" />
+ <area shape="rect" coords="284,68,309,86" target="~" />
+ <area shape="rect" coords="8,89,41,106" target="caps" />
+ <area shape="rect" coords="44,88,63,107" target="a" />
+ <area shape="rect" coords="65,88,84,106" target="s" />
+ <area shape="rect" coords="86,89,104,107" target="d" />
+ <area shape="rect" coords="107,89,124,107" target="f" />
+ <area shape="rect" coords="128,89,145,107" target="g" />
+ <area shape="rect" coords="149,88,165,107" target="h" />
+ <area shape="rect" coords="169,89,186,107" target="j" />
+ <area shape="rect" coords="189,89,207,107" target="k" />
+ <area shape="rect" coords="210,89,228,107" target="l" />
+ <area shape="rect" coords="231,88,249,106" target=":" />
+ <area shape="rect" coords="251,89,269,107" target="@" />
+ <area shape="rect" coords="273,89,311,106" target="enter" />
+ <area shape="rect" coords="9,110,50,127" target="shift" />
+ <area shape="rect" coords="58,110,75,128" target="z" />
+ <area shape="rect" coords="79,110,96,128" target="x" />
+ <area shape="rect" coords="99,109,116,127" target="c" />
+ <area shape="rect" coords="120,110,138,128" target="v" />
+ <area shape="rect" coords="141,109,157,127" target="b" />
+ <area shape="rect" coords="162,110,179,128" target="n" />
+ <area shape="rect" coords="182,110,199,128" target="m" />
+ <area shape="rect" coords="202,110,219,128" target="&lt;" />
+ <area shape="rect" coords="223,110,241,128" target="&gt;" />
+ <area shape="rect" coords="243,110,261,128" target="?" />
+ <area shape="rect" coords="271,109,311,128" target="symbols" />
+ <area shape="rect" coords="9,130,33,148" target="ctrl" />
+ <area shape="rect" coords="38,130,61,147" target="alt" />
+ <area shape="rect" coords="67,130,262,148" target="space" />
+ <area shape="rect" coords="269,131,288,150" target="ok" />
+ <area shape="rect" coords="292,131,311,150" target="cancel" />
+ </map>
+ </layout>
+ <event name="esc" type="key" code="27" ascii="27" modifiers="" />
+ <event name="f1" type="key" code="282" ascii="315" modifiers="" />
+ <event name="f2" type="key" code="283" ascii="316" modifiers="" />
+ <event name="f3" type="key" code="284" ascii="317" modifiers="" />
+ <event name="f4" type="key" code="285" ascii="318" modifiers="" />
+ <event name="f5" type="key" code="286" ascii="319" modifiers="" />
+ <event name="f6" type="key" code="287" ascii="320" modifiers="" />
+ <event name="f7" type="key" code="288" ascii="321" modifiers="" />
+ <event name="f8" type="key" code="289" ascii="322" modifiers="" />
+ <event name="f9" type="key" code="290" ascii="323" modifiers="" />
+ <event name="f10" type="key" code="291" ascii="324" modifiers="" />
+ <event name="f11" type="key" code="292" ascii="325" modifiers="" />
+ <event name="f12" type="key" code="293" ascii="326" modifiers="" />
+ <event name="del" type="key" code="127" ascii="0" modifiers="" />
+ <event name="ctrl" type="modifier" modifiers="ctrl" />
+ <event name="alt" type="modifier" modifiers="alt" />
+ <event name="shift" type="modifier" modifiers="shift" />
+ <event name="symbols" type="switch_mode" mode="lowercase" />
+ <event name="caps" type="switch_mode" mode="uppercasesymbols" />
+ <event name="backspace" type="key" code="8" ascii="8" modifiers="" />
+ <event name="enter" type="key" code="13" ascii="13" modifiers="" />
+ <event name="quote" type="key" code="34" ascii="34" modifiers="" />
+ <event name="ТЃ" type="key" code="163" ascii="163" modifiers="" />
+ <event name="$" type="key" code="36" ascii="36" modifiers="" />
+ <event name="%" type="key" code="37" ascii="37" modifiers="" />
+ <event name="^" type="key" code="94" ascii="94" modifiers="" />
+ <event name="&amp;" type="key" code="38" ascii="38" modifiers="" />
+ <event name="*" type="key" code="42" ascii="42" modifiers="" />
+ <event name="(" type="key" code="40" ascii="40" modifiers="" />
+ <event name=")" type="key" code="41" ascii="41" modifiers="" />
+ <event name="_" type="key" code="95" ascii="95" modifiers="" />
+ <event name="+" type="key" code="43" ascii="43" modifiers="" />
+ <event name="ТЌ" type="key" code="172" ascii="172" modifiers="" />
+ <event name="!" type="key" code="33" ascii="33" modifiers="" />
+ <event name="{" type="key" code="123" ascii="123" modifiers="" />
+ <event name="}" type="key" code="125" ascii="125" modifiers="" />
+ <event name="~" type="key" code="126" ascii="126" modifiers="" />
+ <event name=":" type="key" code="58" ascii="58" modifiers="" />
+ <event name="@" type="key" code="64" ascii="64" modifiers="" />
+ <event name="&lt;" type="key" code="60" ascii="60" modifiers="" />
+ <event name="&gt;" type="key" code="62" ascii="62" modifiers="" />
+ <event name="?" type="key" code="63" ascii="63" modifiers="" />
+ <event name="space" type="key" code="32" ascii="32" modifiers="" />
+ <event name="tab" type="key" code="9" ascii="9" modifiers="" />
+ <event name="a" type="key" code="97" ascii="97" modifiers="" />
+ <event name="b" type="key" code="98" ascii="98" modifiers="" />
+ <event name="c" type="key" code="99" ascii="99" modifiers="" />
+ <event name="d" type="key" code="100" ascii="100" modifiers="" />
+ <event name="e" type="key" code="101" ascii="101" modifiers="" />
+ <event name="f" type="key" code="102" ascii="102" modifiers="" />
+ <event name="g" type="key" code="103" ascii="103" modifiers="" />
+ <event name="h" type="key" code="104" ascii="104" modifiers="" />
+ <event name="i" type="key" code="105" ascii="105" modifiers="" />
+ <event name="j" type="key" code="106" ascii="106" modifiers="" />
+ <event name="k" type="key" code="107" ascii="107" modifiers="" />
+ <event name="l" type="key" code="108" ascii="108" modifiers="" />
+ <event name="m" type="key" code="109" ascii="109" modifiers="" />
+ <event name="n" type="key" code="110" ascii="110" modifiers="" />
+ <event name="o" type="key" code="111" ascii="111" modifiers="" />
+ <event name="p" type="key" code="112" ascii="112" modifiers="" />
+ <event name="q" type="key" code="113" ascii="113" modifiers="" />
+ <event name="r" type="key" code="114" ascii="114" modifiers="" />
+ <event name="s" type="key" code="115" ascii="115" modifiers="" />
+ <event name="t" type="key" code="116" ascii="116" modifiers="" />
+ <event name="u" type="key" code="117" ascii="117" modifiers="" />
+ <event name="v" type="key" code="118" ascii="118" modifiers="" />
+ <event name="w" type="key" code="119" ascii="119" modifiers="" />
+ <event name="x" type="key" code="120" ascii="120" modifiers="" />
+ <event name="y" type="key" code="121" ascii="121" modifiers="" />
+ <event name="z" type="key" code="122" ascii="122" modifiers="" />
+ <event name="ok" type="submit" />
+ <event name="cancel" type="cancel" />
+ <event name="quit" type="submit" />
+ <event name="delete" type="delete" />
+ </mode>
+
+ <!-- Uppercase Symbols -->
+ <mode name="uppercasesymbols" resolutions="320x240">
+ <layout resolution="320x240" bitmap="uppercase-symbols320x240.bmp" transparent_color="255,0,255">
+ <map>
+ <area shape="rect" coords="13,8,306,20" target="display_area" />
+ <area shape="rect" coords="9,26,25,42" target="esc" />
+ <area shape="rect" coords="50,25,67,43" target="f2" />
+ <area shape="rect" coords="29,24,46,43" target="f1" />
+ <area shape="rect" coords="71,26,88,44" target="f3" />
+ <area shape="rect" coords="90,25,107,43" target="f4" />
+ <area shape="rect" coords="111,26,128,44" target="f5" />
+ <area shape="rect" coords="132,26,149,44" target="f6" />
+ <area shape="rect" coords="153,25,170,44" target="f7" />
+ <area shape="rect" coords="173,26,190,44" target="f8" />
+ <area shape="rect" coords="194,24,211,43" target="f9" />
+ <area shape="rect" coords="215,26,231,44" target="f10" />
+ <area shape="rect" coords="235,26,253,43" target="f11" />
+ <area shape="rect" coords="255,26,272,45" target="f12" />
+ <area shape="rect" coords="276,27,310,43" target="del" />
+ <area shape="rect" coords="8,47,26,64" target="ТЌ" />
+ <area shape="rect" coords="28,47,45,64" target="!" />
+ <area shape="rect" coords="50,47,67,65" target="quote" />
+ <area shape="rect" coords="70,46,87,65" target="ТЃ" />
+ <area shape="rect" coords="91,46,108,64" target="$" />
+ <area shape="rect" coords="111,46,129,65" target="%" />
+ <area shape="rect" coords="132,47,149,65" target="^" />
+ <area shape="rect" coords="152,47,170,64" target="&amp;" />
+ <area shape="rect" coords="174,46,191,63" target="*" />
+ <area shape="rect" coords="194,47,211,65" target="(" />
+ <area shape="rect" coords="215,46,232,64" target=")" />
+ <area shape="rect" coords="235,47,252,65" target="_" />
+ <area shape="rect" coords="255,46,272,65" target="+" />
+ <area shape="rect" coords="276,46,299,65" target="delete" />
+ <area shape="rect" coords="300,46,311,65" target="backspace" />
+ <area shape="rect" coords="8,68,32,85" target="tab" />
+ <area shape="rect" coords="36,68,53,85" target="Q" />
+ <area shape="rect" coords="57,68,75,86" target="W" />
+ <area shape="rect" coords="78,67,94,85" target="E" />
+ <area shape="rect" coords="98,67,115,85" target="R" />
+ <area shape="rect" coords="119,67,136,85" target="T" />
+ <area shape="rect" coords="141,68,158,86" target="Y" />
+ <area shape="rect" coords="161,67,179,86" target="U" />
+ <area shape="rect" coords="182,67,199,86" target="I" />
+ <area shape="rect" coords="202,67,220,85" target="O" />
+ <area shape="rect" coords="223,68,240,86" target="P" />
+ <area shape="rect" coords="244,68,261,86" target="{" />
+ <area shape="rect" coords="264,67,282,86" target="}" />
+ <area shape="rect" coords="284,68,309,86" target="~" />
+ <area shape="rect" coords="8,89,41,106" target="caps" />
+ <area shape="rect" coords="44,88,63,107" target="A" />
+ <area shape="rect" coords="65,88,84,106" target="S" />
+ <area shape="rect" coords="86,89,104,107" target="D" />
+ <area shape="rect" coords="107,89,124,107" target="F" />
+ <area shape="rect" coords="128,89,145,107" target="G" />
+ <area shape="rect" coords="149,88,165,107" target="H" />
+ <area shape="rect" coords="169,89,186,107" target="J" />
+ <area shape="rect" coords="189,89,207,107" target="K" />
+ <area shape="rect" coords="210,89,228,107" target="L" />
+ <area shape="rect" coords="231,88,249,106" target=":" />
+ <area shape="rect" coords="251,89,269,107" target="@" />
+ <area shape="rect" coords="273,89,311,106" target="enter" />
+ <area shape="rect" coords="9,110,50,127" target="shift" />
+ <area shape="rect" coords="58,110,75,128" target="z" />
+ <area shape="rect" coords="79,110,96,128" target="x" />
+ <area shape="rect" coords="99,109,116,127" target="c" />
+ <area shape="rect" coords="120,110,138,128" target="v" />
+ <area shape="rect" coords="141,109,157,127" target="b" />
+ <area shape="rect" coords="162,110,179,128" target="n" />
+ <area shape="rect" coords="182,110,199,128" target="m" />
+ <area shape="rect" coords="202,110,219,128" target="&lt;" />
+ <area shape="rect" coords="223,110,241,128" target="&gt;" />
+ <area shape="rect" coords="243,110,261,128" target="?" />
+ <area shape="rect" coords="271,109,311,128" target="symbols" />
+ <area shape="rect" coords="9,130,33,148" target="ctrl" />
+ <area shape="rect" coords="38,130,61,147" target="alt" />
+ <area shape="rect" coords="67,130,262,148" target="space" />
+ <area shape="rect" coords="269,131,288,150" target="ok" />
+ <area shape="rect" coords="292,131,311,150" target="cancel" />
+ </map>
+ </layout>
+ <event name="esc" type="key" code="27" ascii="27" modifiers="" />
+ <event name="f1" type="key" code="282" ascii="315" modifiers="" />
+ <event name="f2" type="key" code="283" ascii="316" modifiers="" />
+ <event name="f3" type="key" code="284" ascii="317" modifiers="" />
+ <event name="f4" type="key" code="285" ascii="318" modifiers="" />
+ <event name="f5" type="key" code="286" ascii="319" modifiers="" />
+ <event name="f6" type="key" code="287" ascii="320" modifiers="" />
+ <event name="f7" type="key" code="288" ascii="321" modifiers="" />
+ <event name="f8" type="key" code="289" ascii="322" modifiers="" />
+ <event name="f9" type="key" code="290" ascii="323" modifiers="" />
+ <event name="f10" type="key" code="291" ascii="324" modifiers="" />
+ <event name="f11" type="key" code="292" ascii="325" modifiers="" />
+ <event name="f12" type="key" code="293" ascii="326" modifiers="" />
+ <event name="del" type="key" code="127" ascii="0" modifiers="" />
+ <event name="ctrl" type="modifier" modifiers="ctrl" />
+ <event name="alt" type="modifier" modifiers="alt" />
+ <event name="shift" type="switch_mode" mode="shiftlowercase" />
+ <event name="caps" type="switch_mode" mode="lowercasesymbols" />
+ <event name="symbols" type="switch_mode" mode="uppercase" />
+ <event name="backspace" type="key" code="8" ascii="8" modifiers="" />
+ <event name="enter" type="key" code="13" ascii="13" modifiers="" />
+ <event name="quote" type="key" code="34" ascii="34" modifiers="" />
+ <event name="ТЃ" type="key" code="163" ascii="163" modifiers="" />
+ <event name="$" type="key" code="36" ascii="36" modifiers="" />
+ <event name="%" type="key" code="37" ascii="37" modifiers="" />
+ <event name="^" type="key" code="94" ascii="94" modifiers="" />
+ <event name="&amp;" type="key" code="38" ascii="38" modifiers="" />
+ <event name="*" type="key" code="42" ascii="42" modifiers="" />
+ <event name="(" type="key" code="40" ascii="40" modifiers="" />
+ <event name=")" type="key" code="41" ascii="41" modifiers="" />
+ <event name="_" type="key" code="95" ascii="95" modifiers="" />
+ <event name="+" type="key" code="43" ascii="43" modifiers="" />
+ <event name="ТЌ" type="key" code="172" ascii="172" modifiers="" />
+ <event name="!" type="key" code="33" ascii="33" modifiers="" />
+ <event name="{" type="key" code="123" ascii="123" modifiers="" />
+ <event name="}" type="key" code="125" ascii="125" modifiers="" />
+ <event name="~" type="key" code="126" ascii="126" modifiers="" />
+ <event name=":" type="key" code="58" ascii="58" modifiers="" />
+ <event name="@" type="key" code="64" ascii="64" modifiers="" />
+ <event name="&lt;" type="key" code="60" ascii="60" modifiers="" />
+ <event name="&gt;" type="key" code="62" ascii="62" modifiers="" />
+ <event name="?" type="key" code="63" ascii="63" modifiers="" />
+ <event name="space" type="key" code="32" ascii="32" modifiers="" />
+ <event name="tab" type="key" code="9" ascii="9" modifiers="" />
+ <event name="A" type="key" code="97" ascii="65" modifiers="shift" />
+ <event name="B" type="key" code="98" ascii="66" modifiers="shift" />
+ <event name="C" type="key" code="99" ascii="67" modifiers="shift" />
+ <event name="D" type="key" code="100" ascii="68" modifiers="shift" />
+ <event name="E" type="key" code="101" ascii="69" modifiers="shift" />
+ <event name="F" type="key" code="102" ascii="70" modifiers="shift" />
+ <event name="G" type="key" code="103" ascii="71" modifiers="shift" />
+ <event name="H" type="key" code="104" ascii="72" modifiers="shift" />
+ <event name="I" type="key" code="105" ascii="73" modifiers="shift" />
+ <event name="J" type="key" code="106" ascii="74" modifiers="shift" />
+ <event name="K" type="key" code="107" ascii="75" modifiers="shift" />
+ <event name="L" type="key" code="108" ascii="76" modifiers="shift" />
+ <event name="M" type="key" code="109" ascii="77" modifiers="shift" />
+ <event name="N" type="key" code="110" ascii="78" modifiers="shift" />
+ <event name="O" type="key" code="111" ascii="79" modifiers="shift" />
+ <event name="P" type="key" code="112" ascii="80" modifiers="shift" />
+ <event name="Q" type="key" code="113" ascii="81" modifiers="shift" />
+ <event name="R" type="key" code="114" ascii="82" modifiers="shift" />
+ <event name="S" type="key" code="115" ascii="83" modifiers="shift" />
+ <event name="T" type="key" code="116" ascii="84" modifiers="shift" />
+ <event name="U" type="key" code="117" ascii="85" modifiers="shift" />
+ <event name="V" type="key" code="118" ascii="86" modifiers="shift" />
+ <event name="W" type="key" code="119" ascii="87" modifiers="shift" />
+ <event name="X" type="key" code="120" ascii="88" modifiers="shift" />
+ <event name="Y" type="key" code="121" ascii="89" modifiers="shift" />
+ <event name="Z" type="key" code="122" ascii="90" modifiers="shift" />
+ <event name="0" type="key" code="48" ascii="48" modifiers="" />
+ <event name="1" type="key" code="49" ascii="49" modifiers="" />
+ <event name="2" type="key" code="50" ascii="50" modifiers="" />
+ <event name="3" type="key" code="51" ascii="51" modifiers="" />
+ <event name="4" type="key" code="52" ascii="52" modifiers="" />
+ <event name="5" type="key" code="53" ascii="53" modifiers="" />
+ <event name="6" type="key" code="54" ascii="54" modifiers="" />
+ <event name="7" type="key" code="55" ascii="55" modifiers="" />
+ <event name="8" type="key" code="56" ascii="56" modifiers="" />
+ <event name="9" type="key" code="57" ascii="57" modifiers="" />
+ <event name="ok" type="submit" />
+ <event name="cancel" type="cancel" />
+ <event name="quit" type="submit" />
+ <event name="delete" type="delete" />
+ </mode>
+</keyboard>
diff --git a/backends/vkeybd/virtual-keyboard.cpp b/backends/vkeybd/virtual-keyboard.cpp
index 678c751410..ce19e9d462 100644
--- a/backends/vkeybd/virtual-keyboard.cpp
+++ b/backends/vkeybd/virtual-keyboard.cpp
@@ -98,7 +98,7 @@ bool VirtualKeyboard::openPack(const String &packName, const FSNode &node) {
return false;
}
} else {
- warning("Could not find %s.xml file in %s.zip keyboard pack", packName.c_str(), packName.c_str());
+ warning("Could not find %s.xml file in %s.zip virtual keyboard pack", packName.c_str(), packName.c_str());
delete _fileArchive;
_fileArchive = 0;
return false;
@@ -132,15 +132,15 @@ bool VirtualKeyboard::loadKeyboardPack(const String &packName) {
_loaded = _parser->parse();
if (_loaded) {
- debug("Keyboard pack '%s' loaded successfully", packName.c_str());
+ debug("Virtual keyboard pack '%s' loaded successfully", packName.c_str());
} else {
- warning("Error parsing the keyboard pack '%s'", packName.c_str());
+ warning("Error parsing the virtual keyboard pack '%s'", packName.c_str());
delete _fileArchive;
_fileArchive = 0;
}
} else {
- warning("Keyboard pack not found");
+ warning("Virtual keyboard disabled due to missing pack file");
}
return _loaded;
@@ -205,7 +205,7 @@ void VirtualKeyboard::switchMode(Mode *newMode) {
void VirtualKeyboard::switchMode(const String &newMode) {
if (!_modes.contains(newMode)) {
- warning("Keyboard mode '%s' unknown", newMode.c_str());
+ warning("Virtual keyboard mode '%s' unknown", newMode.c_str());
} else {
switchMode(&_modes[newMode]);
}
@@ -227,7 +227,7 @@ void VirtualKeyboard::handleMouseUp(int16 x, int16 y) {
void VirtualKeyboard::show() {
if (!_loaded) {
- warning("Virtual keyboard not loaded");
+ debug(1, "VirtualKeyboard::show() - Virtual keyboard not loaded");
return;
} else {
_kbdGUI->checkScreenChanged();
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index d883323976..285fd632b7 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -67,7 +67,7 @@ static const char HELP_STRING[] =
" -h, --help Display a brief help text and exit\n"
" -z, --list-games Display list of supported games and exit\n"
" -t, --list-targets Display list of configured targets and exit\n"
- " --list-saves=TARGET Display a list of savegames for the game (TARGET) specified\n"
+ " --list-saves=TARGET Display a list of saved games for the game (TARGET) specified\n"
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
" --console Enable the console window (default:enabled)\n"
#endif
@@ -106,7 +106,7 @@ static const char HELP_STRING[] =
" --platform=WORD Specify platform of game (allowed values: 2gs, 3do,\n"
" acorn, amiga, atari, c64, fmtowns, nes, mac, pc, pc98,\n"
" pce, segacd, wii, windows)\n"
- " --savepath=PATH Path to where savegames are stored\n"
+ " --savepath=PATH Path to where saved games are stored\n"
" --extrapath=PATH Extra path to additional game data\n"
" --soundfont=FILE Select the SoundFont for MIDI playback (only\n"
" supported by some MIDI drivers)\n"
@@ -401,7 +401,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
DO_LONG_OPTION("list-saves")
// FIXME: Need to document this.
- // TODO: Make the argument optional. If no argument is given, list all savegames
+ // TODO: Make the argument optional. If no argument is given, list all saved games
// for all configured targets.
return "list-saves";
END_OPTION
@@ -529,9 +529,9 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
DO_LONG_OPTION("savepath")
Common::FSNode path(option);
if (!path.exists()) {
- usage("Non-existent savegames path '%s'", option);
+ usage("Non-existent saved games path '%s'", option);
} else if (!path.isWritable()) {
- usage("Non-writable savegames path '%s'", option);
+ usage("Non-writable saved games path '%s'", option);
}
END_OPTION
@@ -693,7 +693,7 @@ static Common::Error listSaves(const char *target) {
return Common::Error(Common::kEnginePluginNotSupportSaves,
Common::String::format("target '%s', gameid '%s", target, gameid.c_str()));
} else {
- // Query the plugin for a list of savegames
+ // Query the plugin for a list of saved games
SaveStateList saveList = (*plugin)->listSaves(target);
if (saveList.size() > 0) {
diff --git a/base/internal_version.h b/base/internal_version.h
index 11f596df79..b6526c5c14 100644
--- a/base/internal_version.h
+++ b/base/internal_version.h
@@ -16,4 +16,4 @@
#define SCUMMVM_REVISION
#endif
-#define SCUMMVM_VERSION "1.7.0git" SCUMMVM_REVISION
+#define SCUMMVM_VERSION "1.8.0git" SCUMMVM_REVISION
diff --git a/base/main.cpp b/base/main.cpp
index 7451c007a4..b5de7d94d2 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -323,7 +323,7 @@ static void setupKeymapper(OSystem &system) {
act = new Action(primaryGlobalKeymap, "REMP", _("Remap keys"));
act->addEvent(EVENT_KEYMAPPER_REMAP);
- act = new Action(primaryGlobalKeymap, "FULS", _("Toggle FullScreen"));
+ act = new Action(primaryGlobalKeymap, "FULS", _("Toggle fullscreen"));
act->addKeyEvent(KeyState(KEYCODE_RETURN, ASCII_RETURN, KBD_ALT));
mapper->addGlobalKeymap(primaryGlobalKeymap);
diff --git a/base/version.cpp b/base/version.cpp
index fba3554f67..ef02ff9d21 100644
--- a/base/version.cpp
+++ b/base/version.cpp
@@ -56,6 +56,9 @@
* to properly work in exports (i.e. release tar balls etc.).
*/
const char *gScummVMVersion = SCUMMVM_VERSION;
+#ifdef __amigaos4__
+static const char *version_cookie __attribute__((used)) = "$VER: ScummVM " SCUMMVM_VERSION " (" __DATE__ ", " __TIME__ ")";
+#endif
#ifdef __PLAYSTATION2__
const char *gScummVMBuildDate = "Git Master"; /* ScummVM Git Master */
const char *gScummVMVersionDate = SCUMMVM_VERSION " - PlayStation2";
diff --git a/common/EventMapper.cpp b/common/EventMapper.cpp
index 30896d7514..b92116cbe7 100644
--- a/common/EventMapper.cpp
+++ b/common/EventMapper.cpp
@@ -30,23 +30,45 @@ namespace Common {
List<Event> DefaultEventMapper::mapEvent(const Event &ev, EventSource *source) {
List<Event> events;
Event mappedEvent;
+#ifdef ENABLE_VKEYBD
+ // Trigger virtual keyboard on long press of more than 1 second
+ // of middle mouse button.
+ const uint32 vkeybdTime = 1000;
+
+ static bool vkeybd = false;
+ static uint32 vkeybdThen = 0;
+
+ if (ev.type == EVENT_MBUTTONDOWN) {
+ vkeybdThen = g_system->getMillis();
+ }
+
+ if (ev.type == EVENT_MBUTTONUP) {
+ if ((g_system->getMillis() - vkeybdThen) >= vkeybdTime) {
+ mappedEvent.type = EVENT_VIRTUAL_KEYBOARD;
+
+ // Avoid blocking event from engine.
+ addDelayedEvent(100, ev);
+ }
+ }
+#endif
+
if (ev.type == EVENT_KEYDOWN) {
if (ev.kbd.hasFlags(KBD_CTRL) && ev.kbd.keycode == KEYCODE_F5) {
mappedEvent.type = EVENT_MAINMENU;
}
#ifdef ENABLE_VKEYBD
- else if (ev.kbd.keycode == KEYCODE_F7 && ev.kbd.hasFlags(0)) {
+ else if (ev.kbd.hasFlags(KBD_CTRL) && ev.kbd.keycode == KEYCODE_F7) {
mappedEvent.type = EVENT_VIRTUAL_KEYBOARD;
- // Avoid blocking F7 events from engine.
+ // Avoid blocking CTRL-F7 events from engine.
addDelayedEvent(100, ev);
}
#endif
#ifdef ENABLE_KEYMAPPER
- else if (ev.kbd.keycode == KEYCODE_F8 && ev.kbd.hasFlags(0)) {
+ else if (ev.kbd.hasFlags(KBD_CTRL) && ev.kbd.keycode == KEYCODE_F8) {
mappedEvent.type = EVENT_KEYMAPPER_REMAP;
- // Avoid blocking F8 events from engine.
+ // Avoid blocking CTRL-F8 events from engine.
addDelayedEvent(100, ev);
}
#endif
diff --git a/common/bitstream.h b/common/bitstream.h
index 0fe16b5beb..b789f2ac8d 100644
--- a/common/bitstream.h
+++ b/common/bitstream.h
@@ -52,6 +52,9 @@ public:
/** Skip the specified amount of bits. */
virtual void skip(uint32 n) = 0;
+ /** Skip the bits to closest data value border. */
+ virtual void align() = 0;
+
/** Read a bit from the bit stream. */
virtual uint32 getBit() = 0;
@@ -276,6 +279,12 @@ public:
getBit();
}
+ /** Skip the bits to closest data value border. */
+ void align() {
+ while (_inValue)
+ getBit();
+ }
+
/** Return the stream position in bits. */
uint32 pos() const {
if (_stream->pos() == 0)
diff --git a/common/config-manager.cpp b/common/config-manager.cpp
index feb3ddcf56..24c877a4e9 100644
--- a/common/config-manager.cpp
+++ b/common/config-manager.cpp
@@ -597,7 +597,7 @@ void ConfigManager::setActiveDomain(const String &domName) {
_activeDomain = 0;
} else {
assert(isValidDomainName(domName));
- _activeDomain = & _gameDomains[domName];
+ _activeDomain = &_gameDomains[domName];
}
_activeDomainName = domName;
}
@@ -626,6 +626,10 @@ void ConfigManager::addMiscDomain(const String &domName) {
void ConfigManager::removeGameDomain(const String &domName) {
assert(!domName.empty());
assert(isValidDomainName(domName));
+ if (domName == _activeDomainName) {
+ _activeDomainName.clear();
+ _activeDomain = 0;
+ }
_gameDomains.erase(domName);
}
@@ -638,6 +642,10 @@ void ConfigManager::removeMiscDomain(const String &domName) {
void ConfigManager::renameGameDomain(const String &oldName, const String &newName) {
renameDomain(oldName, newName, _gameDomains);
+ if (_activeDomainName == oldName) {
+ _activeDomainName = newName;
+ _activeDomain = &_gameDomains[newName];
+ }
}
void ConfigManager::renameMiscDomain(const String &oldName, const String &newName) {
diff --git a/common/dcl.cpp b/common/dcl.cpp
index bb4e283de5..2f4cdeda6b 100644
--- a/common/dcl.cpp
+++ b/common/dcl.cpp
@@ -38,8 +38,7 @@ protected:
* @param src source stream to read from
* @param dest destination stream to write to
* @param nPacked size of packed data
- * @param nUnpacket size of unpacked data
- * @return 0 on success, non-zero on error
+ * @param nUnpacked size of unpacked data
*/
void init(ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked);
diff --git a/common/endian.h b/common/endian.h
index 529e7f5ac0..6d6563f802 100644
--- a/common/endian.h
+++ b/common/endian.h
@@ -92,8 +92,7 @@
return __builtin_bswap32(a);
}
-// test for MSVC 7 or newer
-#elif defined(_MSC_VER) && _MSC_VER >= 1300
+#elif defined(_MSC_VER)
FORCEINLINE uint32 SWAP_BYTES_32(uint32 a) {
return _byteswap_ulong(a);
diff --git a/common/events.h b/common/events.h
index 488d586b3f..484564e3db 100644
--- a/common/events.h
+++ b/common/events.h
@@ -317,7 +317,7 @@ public:
/**
* Registers a new EventObserver with the Dispatcher.
*
- * @param listenPools if set, then all pollEvent() calls are passed to observer
+ * @param listenPolls if set, then all pollEvent() calls are passed to observer
* currently it is used by keyMapper
*/
void registerObserver(EventObserver *obs, uint priority, bool autoFree, bool listenPolls = false);
diff --git a/common/file.h b/common/file.h
index 29f12b255d..c055acc57d 100644
--- a/common/file.h
+++ b/common/file.h
@@ -82,8 +82,7 @@ public:
* those cases gracefully.
* @note Must not be called if this file already is open (i.e. if isOpen returns true).
*
- * @param filename the name of the file to open
- * @param archive the archive in which to search for the file
+ * @param node the node to consider.
* @return true if file was opened successfully, false otherwise
*/
virtual bool open(const FSNode &node);
diff --git a/common/localization.h b/common/localization.h
index 096c5e95f5..51803279e7 100644
--- a/common/localization.h
+++ b/common/localization.h
@@ -35,7 +35,7 @@ namespace Common {
*
* @param id Language id
* @param keyYes Key code for yes
- * @param keyYes Key code for no
+ * @param keyNo Key code for no
*/
void getLanguageYesNo(Language id, KeyCode &keyYes, KeyCode &keyNo);
@@ -44,7 +44,7 @@ void getLanguageYesNo(Language id, KeyCode &keyYes, KeyCode &keyNo);
* language of the ScummVM GUI.
*
* @param keyYes Key code for yes
- * @param keyYes Key code for no
+ * @param keyNo Key code for no
*/
void getLanguageYesNo(KeyCode &keyYes, KeyCode &keyNo);
diff --git a/common/macresman.h b/common/macresman.h
index 373545795e..43ec8d8e2c 100644
--- a/common/macresman.h
+++ b/common/macresman.h
@@ -58,7 +58,7 @@ public:
* This uses SearchMan to find the data/resource forks. This should only be used
* from inside an engine.
*
- * @param filename The base file name of the file
+ * @param fileName The base file name of the file
* @note This will check for the raw resource fork, MacBinary, and AppleDouble formats.
* @return True on success
*/
@@ -68,7 +68,7 @@ public:
* Open a Mac data/resource fork pair.
*
* @param path The path that holds the forks
- * @param filename The base file name of the file
+ * @param fileName The base file name of the file
* @note This will check for the raw resource fork, MacBinary, and AppleDouble formats.
* @return True on success
*/
@@ -76,7 +76,7 @@ public:
/**
* See if a Mac data/resource fork pair exists.
- * @param filename The base file name of the file
+ * @param fileName The base file name of the file
* @return True if either a data fork or resource fork with this name exists
*/
static bool exists(const String &fileName);
diff --git a/common/quicktime.h b/common/quicktime.h
index f5fd578e3a..f74d1ed0d9 100644
--- a/common/quicktime.h
+++ b/common/quicktime.h
@@ -74,7 +74,7 @@ public:
/**
* Set the beginning offset of the video so we can modify the offsets in the stco
* atom of videos inside the Mohawk archives
- * @param the beginning offset of the video
+ * @param offset the beginning offset of the video
*/
void setChunkBeginOffset(uint32 offset) { _beginOffset = offset; }
diff --git a/common/singleton.h b/common/singleton.h
index 13bdb0c3a3..9bcd590183 100644
--- a/common/singleton.h
+++ b/common/singleton.h
@@ -44,8 +44,8 @@ private:
* and you specialise makeInstance to return an instance of a subclass.
*/
//template<class T>
-#if defined(_WIN32_WCE) || defined(_MSC_VER) || defined(__WINS__)
-//FIXME evc4 and msvc7 doesn't like it as private member
+#if defined(__WINS__)
+//FIXME verify if __WINS__ needs this still
public:
#endif
static T *makeInstance() {
diff --git a/common/str.h b/common/str.h
index a2451f2f69..dede87a005 100644
--- a/common/str.h
+++ b/common/str.h
@@ -166,7 +166,6 @@ public:
* String: monkey.s101 Pattern: monkey.s* => true
* String: monkey.s99 Pattern: monkey.s*1 => false
*
- * @param str Text to be matched against the given pattern.
* @param pat Glob pattern.
* @param ignoreCase Whether to ignore the case when doing pattern match
* @param pathMode Whether to use path mode, i.e., whether slashes must be matched explicitly.
diff --git a/common/stream.h b/common/stream.h
index 238844a860..2702068cf3 100644
--- a/common/stream.h
+++ b/common/stream.h
@@ -390,7 +390,7 @@ public:
* @note This methods is closely modeled after the standard fgets()
* function from stdio.h.
*
- * @param buf the buffer to store into
+ * @param s the buffer to store into
* @param bufSize the size of the buffer
* @return a pointer to the read string, or NULL if an error occurred
*/
diff --git a/common/util.h b/common/util.h
index 1c0e45662e..f51aa00925 100644
--- a/common/util.h
+++ b/common/util.h
@@ -72,7 +72,7 @@ template<typename T> inline void SWAP(T &a, T &b) { T tmp = a; a = b; b = tmp; }
# define SCUMMVM_CURRENT_FUNCTION __PRETTY_FUNCTION__
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
# define SCUMMVM_CURRENT_FUNCTION __func__
-#elif defined(_MSC_VER) && _MSC_VER >= 1300
+#elif defined(_MSC_VER)
# define SCUMMVM_CURRENT_FUNCTION __FUNCTION__
#else
# define SCUMMVM_CURRENT_FUNCTION "<unknown>"
diff --git a/common/zlib.h b/common/zlib.h
index e2936a334a..5adba64076 100644
--- a/common/zlib.h
+++ b/common/zlib.h
@@ -68,7 +68,7 @@ bool uncompress(byte *dst, unsigned long *dstLen, const byte *src, unsigned long
* @param dst the buffer to store into.
* @param dstLen the size of the destination buffer.
* @param src the data to be decompressed.
- * @param dstLen the size of the compressed data.
+ * @param srcLen the size of the compressed data.
* @param dict (optional) a decompress dictionary.
* @param dictLen (optional) the size of the dictionary.
* Mandatory if dict is not 0.
@@ -90,7 +90,7 @@ bool inflateZlibHeaderless(byte *dst, uint dstLen, const byte *src, uint srcLen,
* @param dst the buffer to store into.
* @param dstLen the size of the destination buffer.
* @param src the data to be decompressed.
- * @param dstLen the size of the compressed data.
+ * @param srcLen the size of the compressed data.
*
* @return true on success (Z_OK or Z_STREAM_END), false otherwise.
*/
diff --git a/configure b/configure
index 46edeafa4e..541d1c2198 100755
--- a/configure
+++ b/configure
@@ -168,7 +168,7 @@ _as="as"
_windres=windres
_stagingpath="staging"
_win32path="c:/scummvm"
-_aos4path="Games:ScummVM"
+_amigaospath="Games:ScummVM"
_staticlibpath=
_sdlconfig=sdl-config
_freetypeconfig=freetype-config
@@ -1844,7 +1844,7 @@ fi
echo $_global_constructors
echo_n "Checking for $_host_alias-strings... " >> "$TMPLOG"
-if test ! "x$(which $_host_alias-strings 2>/dev/null)" = "x"; then
+if `which $_host_alias-strings >/dev/null 2>&1`; then
_strings=$_host_alias-strings
echo yes >> "$TMPLOG"
else
@@ -2074,6 +2074,7 @@ case $_host_os in
# Supress format warnings as the long 4 byte causes noisy warnings.
CXXFLAGS="$CXXFLAGS -Wno-format"
add_line_to_config_mk 'AMIGAOS = 1'
+ _port_mk="backends/platform/sdl/amigaos/amigaos.mk"
;;
android)
case $_host in
@@ -2157,6 +2158,12 @@ case $_host_os in
LDFLAGS="$LDFLAGS -L$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/`$CXX -dumpversion`/libs/$ABI/"
LIBS="$LIBS -lsupc++"
add_line_to_config_mk "ANDROID_SDK = $ANDROID_SDK"
+ if test -d "$ANDROID_SDK"/build-tools; then
+ _build_tools_version=`cd "$ANDROID_SDK"/build-tools && ls -1 | sort -rn | head -1`
+ add_line_to_config_mk "ANDROID_BTOOLS = build-tools/$_build_tools_version"
+ else
+ add_line_to_config_mk "ANDROID_BTOOLS = platform-tools"
+ fi
_seq_midi=no
;;
beos*)
@@ -2746,6 +2753,8 @@ if test -n "$_host"; then
_ar="$_host-ar cru"
_as="$_host-as"
_windres=$_host-windres
+
+ _port_mk="backends/platform/sdl/amigaos/amigaos.mk"
;;
ps2)
DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE"
@@ -2791,6 +2800,8 @@ if test -n "$_host"; then
_mt32emu=no
_timidity=no
_vkeybd=yes
+ _eventrec=no
+ _port_mk="backends/platform/sdl/ps3/ps3.mk"
;;
psp)
_backend="psp"
@@ -4491,7 +4502,7 @@ WINDRES := $_windres
WINDRESFLAGS := $WINDRESFLAGS
STAGINGPATH=$_stagingpath
WIN32PATH=$_win32path
-AOS4PATH=$_aos4path
+AMIGAOSPATH=$_amigaospath
STATICLIBPATH=$_staticlibpath
BACKEND := $_backend
diff --git a/devtools/README b/devtools/README
index 482c24edc2..509048bfe0 100644
--- a/devtools/README
+++ b/devtools/README
@@ -72,7 +72,7 @@ create_mort (Strangerke)
create_project (LordHoto, Littleboy)
--------------
- Creates project files for Visual Studio 2005, 2008, 2010, 2012, Xcode and
+ Creates project files for Visual Studio 2008, 2010, 2012, 2013, Xcode and
Code::Blocks out of the configure / Makefile based build system.
It also offers a way to enable or disable certain engines and the use
of external libraries similar to configure. Run the tool without
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 876c116b5c..e71816f575 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -175,7 +175,7 @@ int main(int argc, char *argv[]) {
msvcVersion = atoi(argv[++i]);
- if (msvcVersion != 8 && msvcVersion != 9 && msvcVersion != 10 && msvcVersion != 11 && msvcVersion != 12) {
+ if (msvcVersion != 9 && msvcVersion != 10 && msvcVersion != 11 && msvcVersion != 12) {
std::cerr << "ERROR: Unsupported version: \"" << msvcVersion << "\" passed to \"--msvc-version\"!\n";
return -1;
}
@@ -526,7 +526,7 @@ int main(int argc, char *argv[]) {
projectWarnings["m4"].push_back("4355");
- if (msvcVersion == 8 || msvcVersion == 9)
+ if (msvcVersion == 9)
provider = new CreateProjectTool::VisualStudioProvider(globalWarnings, projectWarnings, msvcVersion);
else
provider = new CreateProjectTool::MSBuildProvider(globalWarnings, projectWarnings, msvcVersion);
@@ -619,10 +619,10 @@ void displayHelp(const char *exe) {
"\n"
"MSVC specific settings:\n"
" --msvc-version version set the targeted MSVC version. Possible values:\n"
- " 8 stands for \"Visual Studio 2005\"\n"
" 9 stands for \"Visual Studio 2008\"\n"
" 10 stands for \"Visual Studio 2010\"\n"
" 11 stands for \"Visual Studio 2012\"\n"
+ " 12 stands for \"Visual Studio 2013\"\n"
" The default is \"9\", thus \"Visual Studio 2008\"\n"
" --build-events Run custom build events as part of the build\n"
" (default: false)\n"
diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index 018a04370f..87c9066199 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -352,7 +352,7 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea
"\t\t<_PropertySheetDisplayName>" << setup.projectDescription << "_Global</_PropertySheetDisplayName>\n"
"\t\t<ExecutablePath>$(" << LIBS_DEFINE << ")\\bin;$(ExecutablePath)</ExecutablePath>\n"
"\t\t<LibraryPath>$(" << LIBS_DEFINE << ")\\lib\\" << (bits == 32 ? "x86" : "x64") << ";$(LibraryPath)</LibraryPath>\n"
- "\t\t<IncludePath>$(" << LIBS_DEFINE << ")\\include;$(IncludePath)</IncludePath>\n"
+ "\t\t<IncludePath>$(" << LIBS_DEFINE << ")\\include;$(" << LIBS_DEFINE << ")\\include\\SDL;$(IncludePath)</IncludePath>\n"
"\t\t<OutDir>$(Configuration)" << bits << "\\</OutDir>\n"
"\t\t<IntDir>$(Configuration)" << bits << "/$(ProjectName)\\</IntDir>\n"
"\t</PropertyGroup>\n"
diff --git a/devtools/create_project/msvc10/create_project.vcxproj b/devtools/create_project/msvc10/create_project.vcxproj
index 40c515f26b..80dfd5e8d3 100644
--- a/devtools/create_project/msvc10/create_project.vcxproj
+++ b/devtools/create_project/msvc10/create_project.vcxproj
@@ -61,7 +61,6 @@
<Command>@echo off
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\"
-xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command>
</PostBuildEvent>
@@ -87,7 +86,6 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command>
<Command>@echo off
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\"
-xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command>
</PostBuildEvent>
diff --git a/devtools/create_project/msvc11/create_project.vcxproj b/devtools/create_project/msvc11/create_project.vcxproj
index c87461c049..8bbd25e9ba 100644
--- a/devtools/create_project/msvc11/create_project.vcxproj
+++ b/devtools/create_project/msvc11/create_project.vcxproj
@@ -66,7 +66,6 @@
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\"
-xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command>
</PostBuildEvent>
@@ -93,7 +92,6 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command>
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\"
-xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command>
</PostBuildEvent>
diff --git a/devtools/create_project/msvc12/create_project.vcxproj b/devtools/create_project/msvc12/create_project.vcxproj
index c26b1e5f45..6da1556547 100644
--- a/devtools/create_project/msvc12/create_project.vcxproj
+++ b/devtools/create_project/msvc12/create_project.vcxproj
@@ -66,7 +66,6 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc12\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\"
-xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command>
</PostBuildEvent>
@@ -94,7 +93,6 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc12\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\"
-xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\"
xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command>
</PostBuildEvent>
diff --git a/devtools/create_project/msvc8/create_project.sln b/devtools/create_project/msvc8/create_project.sln
deleted file mode 100644
index 4a0152f33f..0000000000
--- a/devtools/create_project/msvc8/create_project.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-яЛП
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "create_project", "create_project.vcproj", "{CF177559-077D-4A08-AABE-BE0FD35F6C63}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Debug|Win32.ActiveCfg = Debug|Win32
- {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Debug|Win32.Build.0 = Debug|Win32
- {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Release|Win32.ActiveCfg = Release|Win32
- {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/devtools/create_project/msvc8/create_project.vcproj b/devtools/create_project/msvc8/create_project.vcproj
deleted file mode 100644
index 6e9e0d5cb0..0000000000
--- a/devtools/create_project/msvc8/create_project.vcproj
+++ /dev/null
@@ -1,251 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="create_project"
- ProjectGUID="{CF177559-077D-4A08-AABE-BE0FD35F6C63}"
- RootNamespace="create_project"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="4"
- DebugInformationFormat="4"
- DisableSpecificWarnings="4003;4512;4127"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Rpcrt4.lib"
- GenerateDebugInformation="true"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- WarningLevel="3"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4003;4512;4127"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Rpcrt4.lib"
- GenerateDebugInformation="true"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\create_project.cpp"
- >
- </File>
- <File
- RelativePath="..\codeblocks.cpp"
- >
- </File>
- <File
- RelativePath="..\msvc.cpp"
- >
- </File>
- <File
- RelativePath="..\msbuild.cpp"
- >
- </File>
- <File
- RelativePath="..\visualstudio.cpp"
- >
- </File>
- <File
- RelativePath="..\xcode.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\create_project.h"
- >
- </File>
- <File
- RelativePath="..\codeblocks.h"
- >
- </File>
- <File
- RelativePath="..\config.h"
- >
- </File>
- <File
- RelativePath="..\msvc.h"
- >
- </File>
- <File
- RelativePath="..\msbuild.h"
- >
- </File>
- <File
- RelativePath="..\visualstudio.h"
- >
- </File>
- <File
- RelativePath="..\xcode.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Scripts"
- Filter="vbs;cmd"
- UniqueIdentifier="{45B110C8-4C64-4677-8ED6-F9A93C6D55A0}"
- >
- <File
- RelativePath="..\scripts\prebuild.cmd"
- >
- </File>
- <File
- RelativePath="..\scripts\postbuild.cmd"
- >
- </File>
- <File
- RelativePath="..\scripts\revision.vbs"
- >
- </File>
- <File
- RelativePath="..\scripts\installer.vbs"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd
index 8b70ec3dd8..fcbd8c534a 100644
--- a/devtools/create_project/scripts/postbuild.cmd
+++ b/devtools/create_project/scripts/postbuild.cmd
@@ -26,7 +26,8 @@ echo.
xcopy /F /Y "%~4/lib/%~3/SDL.dll" "%~2" 1>NUL 2>&1
xcopy /F /Y "%~4/lib/%~3/freetype6.dll" "%~2" 1>NUL 2>&1
xcopy /F /Y "%~1/backends/vkeybd/packs/vkeybd_default.zip" "%~2" 1>NUL 2>&1
-xcopy /F /Y "%~1/gui/themes/translations.dat" "%~2" 1>NUL 2>&1
+xcopy /F /Y "%~1/backends/vkeybd/packs/vkeybd_small.zip" "%~2" 1>NUL 2>&1
+xcopy /F /Y "%~1/gui/themes/translations.dat" "%~2" 1>NUL 2>&1
if "%~5"=="0" goto done
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp
index 84bc674f9a..9b928bf520 100644
--- a/devtools/create_project/visualstudio.cpp
+++ b/devtools/create_project/visualstudio.cpp
@@ -29,7 +29,7 @@
namespace CreateProjectTool {
//////////////////////////////////////////////////////////////////////////
-// Visual Studio Provider (Visual Studio 2005 & 2008)
+// Visual Studio Provider (Visual Studio 2008)
//////////////////////////////////////////////////////////////////////////
VisualStudioProvider::VisualStudioProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version)
@@ -48,9 +48,6 @@ int VisualStudioProvider::getVisualStudioVersion() {
if (_version == 9)
return 2008;
- if (_version == 8)
- return 2005;
-
error("Unsupported version passed to getVisualStudioVersion");
}
@@ -70,8 +67,7 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
"\tRootNamespace=\"" << name << "\"\n"
"\tKeyword=\"Win32Proj\"\n";
- if (_version >= 9)
- project << "\tTargetFrameworkVersion=\"131072\"\n";
+ project << "\tTargetFrameworkVersion=\"131072\"\n";
project << "\t>\n"
"\t<Platforms>\n"
@@ -232,7 +228,7 @@ void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::of
"\t\tName=\"VCCLCompilerTool\"\n"
"\t\tDisableLanguageExtensions=\"" << (setup.devTools ? "false" : "true") << "\"\n"
"\t\tDisableSpecificWarnings=\"" << warnings << "\"\n"
- "\t\tAdditionalIncludeDirectories=\".\\;" << prefix << ";" << prefix << "\\engines;$(" << LIBS_DEFINE << ")\\include;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir)\"\n"
+ "\t\tAdditionalIncludeDirectories=\".\\;" << prefix << ";" << prefix << "\\engines;$(" << LIBS_DEFINE << ")\\include;$(" << LIBS_DEFINE << ")\\include\\SDL;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir)\"\n"
"\t\tPreprocessorDefinitions=\"" << definesList << "\"\n"
"\t\tExceptionHandling=\"" << ((setup.devTools || setup.tests) ? "1" : "0") << "\"\n";
diff --git a/devtools/credits.pl b/devtools/credits.pl
index 5f2f6c12f9..0960011802 100755
--- a/devtools/credits.pl
+++ b/devtools/credits.pl
@@ -562,6 +562,12 @@ begin_credits("Credits");
add_person("Arnaud Boutonn&eacute;", "Strangerke", "");
add_person("Paul Gilbert", "dreammaster", "");
end_section();
+
+ begin_section("CGE2");
+ add_person("Peter Bozs&oacute;", "uruk", "");
+ add_person("Arnaud Boutonn&eacute;", "Strangerke", "");
+ add_person("Paul Gilbert", "dreammaster", "");
+ end_section();
begin_section("Cine");
add_person("Vincent Hamm", "yaz0r", "(retired)");
@@ -853,6 +859,7 @@ begin_credits("Credits");
begin_section("SymbianOS");
add_person("Jurgen Braam", "SumthinWicked", "");
add_person("Lars Persson", "AnotherGuest", "");
+ add_person("Fedor Strizhniou", "zanac", "");
end_section();
begin_section("Tizen / BADA");
@@ -953,7 +960,7 @@ begin_credits("Credits");
end_section();
begin_section("BeOS");
- add_person("Stefan Parviainen", "", "");
+ add_person("Stefan Parviainen", "", "(retired)");
add_person("Luc Schrijvers", "Begasus", "");
end_section();
@@ -966,6 +973,10 @@ begin_credits("Credits");
add_person("Willem Jan Palenstijn", "wjp", "");
end_section();
+ begin_section("Haiku");
+ add_person("Luc Schrijvers", "Begasus", "");
+ end_section();
+
begin_section("Mac OS X");
add_person("Max Horn", "Fingolfin", "(retired)");
add_person("Oystein Eftevaag", "vinterstum", "");
@@ -1025,6 +1036,9 @@ begin_credits("Credits");
begin_section("Danish");
add_person("Steffen Nyeland", "", "");
end_section();
+ begin_section("Dutch");
+ add_person("Ben Castricum", "", "");
+ end_section();
begin_section("Finnish");
add_person("Toni Saarela", "catnose", "");
end_section();
diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt
index a52bbaecf8..f0cb577237 100644
--- a/devtools/scumm-md5.txt
+++ b/devtools/scumm-md5.txt
@@ -137,6 +137,8 @@ indy3 Indiana Jones and the Last Crusade
1dd7aa088e09f96d06818aa9a9deabe0 5361 en Mac No AdLib EGA v1.7, 8/17/90 Fingolfin
1875b90fade138c9253a8e967007031a 6295 en DOS VGA VGA IBM 256 color v2.0 from 3 May 90 Peter Eckerlein, Fingolfin
+ 7fbcff27c323499beaedd605e1ebd47d 561152 en Windows Steam Steam Steam Version Ben Castricum, Filippos Karapetis
+ a15d6e1e2c52bbd0ff7fa6b63ab7f796 680340 en Mac Steam Steam Steam Version Filippos Karapetis
399b217b0c8d65d0398076da486363a9 6295 de DOS VGA VGA VGA v1.02 from 7 Nov 91 Peter Eckerlein, Fingolfin
17b5d5e6af4ae89d62631641d66d5a05 -1 it DOS VGA VGA IBM 256 color v2.1 from 3 May 01 Andrea Petrucci, Peter Eckerlein
3cce1913a3bc586b51a75c3892ff18dd -1 ru DOS VGA VGA VGA
@@ -170,6 +172,8 @@ loom Loom
6f0be328c64d689bb606d22a389e1b0f 5748 en Mac No AdLib EGA v1.2 25 Jan 91 Fingolfin
5d88b9d6a88e6f8e90cded9d01b7f082 8307 en DOS VGA VGA CD Version v1.0 from 10. Feb 92 (Talkie) Peter Eckerlein, Fingolfin
+ 0354ee0d14cde1264ec762261c04c14a 585728 en Windows Steam Steam Steam Version Ben Castricum, Filippos Karapetis
+ b4a677bf27c010a747975705108ff1e6 393572 en Mac Steam Steam Steam Version Filippos Karapetis
c5d10e190d4b4d59114b824f2fdbd00e 7540 en FM-TOWNS FM-TOWNS - - dhewg, Andrea Petrucci
31b8fda4c8c7413fa6b39997e776eba4 -1 jp FM-TOWNS FM-TOWNS - - khalek, Andrea Petrucci
@@ -279,6 +283,8 @@ atlantis Indiana Jones and the Fate of Atlantis
d6dd0646404768a63e963891a96daadd 12035 en Mac Floppy Floppy two data files Fingolfin
182344899c2e2998fca0bebcd82aa81a 12035 en DOS - CD - Fingolfin
+ f3c5d9bf3f091bd1f18dc1013fba5396 638976 en Windows Steam Steam Steam Version Ben Castricum, Filippos Karapetis
+ 6a8133b63d46f6663fbcbb49d5a2edb1 520548 en Mac Steam Steam Steam Version Filippos Karapetis
1a6e5ae2777a6a33f06ffc0226210934 -1 en Mac - CD - Scott Summers
2d9d46f23cb07bbc90b8ad464d3e4ff8 -1 en Mac - CD Mac bundle Joachim Eberhard
8e9417564f33790815445b2136efa667 11915 jp Mac - CD - Petr Maruska
@@ -358,6 +364,8 @@ ft Full Throttle
dig The Dig
d8323015ecb8b10bf53474f6e6b0ae33 16304 All All - - - Fingolfin
+ aad201302286c1cfee92321cd406e427 811008 en Windows Steam Steam Steam Version Ben Castricum, Filippos Karapetis
+ d93cc8be628ed5d3b3a29188fc7105d3 1061296 en Mac Steam Steam Steam Version Filippos Karapetis
d62047a6729349ab36f7ee065bf26509 -1 ru All - - - sev
35a2d3040fa512f8232d9e443319d84d 659335495 en Mac - - Mac bundle Fingolfin
21a6592322f92550f144f68a8a4e685e -1 fr Mac - - Mac bundle kaminari
@@ -529,6 +537,7 @@ freddi3 Freddi Fish 3: The Case of the Stolen Conch Shell
02cae0e7ff8504f73618391873d5781a -1 de Windows HE 98.5 - - Julius
78c07ca088526d8d4446a4c2cb501203 -1 fr All HE 99 - - alamaz, gist974
83cedbe26aa8b58988e984e3d34cac8e -1 de All HE 99 - - Joachim Eberhard
+ 45adb5065e77559196dc0477e0f91fb9 -1 gb Windows HE 99 - - George Q. Greg
75bff95816b84672b877d22a911ab811 -1 ru Windows HE 99 Updated - sev
0ddf1174d0d097956ba10dd452ea65e6 -1 he Windows HE 99 - - Matan Bareket
diff --git a/dists/android/AndroidManifest.xml b/dists/android/AndroidManifest.xml
index 16d1ee578b..db8a9adc54 100644
--- a/dists/android/AndroidManifest.xml
+++ b/dists/android/AndroidManifest.xml
@@ -4,7 +4,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.scummvm.scummvm"
android:versionCode="@ANDROID_VERSIONCODE@"
- android:versionName="1.7.0git"
+ android:versionName="1.8.0git"
android:installLocation="preferExternal"
android:sharedUserId="org.scummvm.scummvm">
diff --git a/dists/android/plugin-manifest.xml b/dists/android/plugin-manifest.xml
index f96cd4eb91..040d1ea57c 100644
--- a/dists/android/plugin-manifest.xml
+++ b/dists/android/plugin-manifest.xml
@@ -3,7 +3,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.scummvm.scummvm.plugin.@PLUGIN_NAME@"
android:versionCode="@PLUGIN_VERSION_CODE@"
- android:versionName="1.7.0git"
+ android:versionName="1.8.0git"
android:installLocation="preferExternal"
android:sharedUserId="org.scummvm.scummvm">
diff --git a/dists/android/res-ouya/values-television/margins.xml b/dists/android/res/values-television/margins.xml
index df586eea34..df586eea34 100644
--- a/dists/android/res-ouya/values-television/margins.xml
+++ b/dists/android/res/values-television/margins.xml
diff --git a/dists/gph/README-GPH b/dists/gph/README-GPH
index e3ce3e86b6..1c5e6d2898 100644
--- a/dists/gph/README-GPH
+++ b/dists/gph/README-GPH
@@ -1,4 +1,4 @@
-ScummVM 1.7.0git - GPH DEVICE SPECIFIC README
+ScummVM 1.8.0git - GPH DEVICE SPECIFIC README
------------------------------------------------------------------------
diff --git a/dists/gph/scummvm.ini b/dists/gph/scummvm.ini
index 36251c7c5c..1c57a3cf08 100644
--- a/dists/gph/scummvm.ini
+++ b/dists/gph/scummvm.ini
@@ -1,5 +1,5 @@
[info]
-name="ScummVM 1.7.0git"
+name="ScummVM 1.8.0git"
path="/scummvm/scummvm.gpe"
icon="/scummvm/scummvm.png"
title="/scummvm/scummvmb.png"
diff --git a/dists/iphone/Info.plist b/dists/iphone/Info.plist
index 6fdd7f2696..d630801504 100644
--- a/dists/iphone/Info.plist
+++ b/dists/iphone/Info.plist
@@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.7.0git</string>
+ <string>1.8.0git</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.7.0git</string>
+ <string>1.8.0git</string>
<key>CFBundleIconFile</key>
<string>icon.png</string>
<key>CFBundleIconFiles</key>
diff --git a/dists/irix/scummvm.spec b/dists/irix/scummvm.spec
index 66f7bda998..973f7aefae 100644
--- a/dists/irix/scummvm.spec
+++ b/dists/irix/scummvm.spec
@@ -1,5 +1,5 @@
product scummvm
- id "ScummVM 1.7.0git"
+ id "ScummVM 1.8.0git"
image sw
id "software"
version 18
diff --git a/dists/macosx/Info.plist b/dists/macosx/Info.plist
index 63813c06de..fff0e47668 100644
--- a/dists/macosx/Info.plist
+++ b/dists/macosx/Info.plist
@@ -28,7 +28,7 @@
<key>CFBundleExecutable</key>
<string>scummvm</string>
<key>CFBundleGetInfoString</key>
- <string>1.7.0git, Copyright 2001-2014 The ScummVM Team</string>
+ <string>1.8.0git, Copyright 2001-2014 The ScummVM Team</string>
<key>CFBundleIconFile</key>
<string>scummvm.icns</string>
<key>CFBundleIdentifier</key>
@@ -40,9 +40,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.7.0git</string>
+ <string>1.8.0git</string>
<key>CFBundleVersion</key>
- <string>1.7.0git</string>
+ <string>1.8.0git</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHumanReadableCopyright</key>
diff --git a/dists/msvc8/create_msvc8.bat b/dists/msvc8/create_msvc8.bat
deleted file mode 100644
index 1e0d339001..0000000000
--- a/dists/msvc8/create_msvc8.bat
+++ /dev/null
@@ -1,105 +0,0 @@
-@echo off
-
-echo.
-echo Automatic creation of the MSVC9 project files
-echo.
-
-if "%~1"=="/stable" goto stable
-if "%~1"=="/STABLE" goto stable
-if "%~1"=="/all" goto all
-if "%~1"=="/ALL" goto all
-if "%~1"=="/tools" goto tools
-if "%~1"=="/TOOLS" goto tools
-if "%~1"=="/tests" goto tests
-if "%~1"=="/TESTS" goto tests
-if "%~1"=="/clean" goto clean_check
-if "%~1"=="/CLEAN" goto clean_check
-if "%~1"=="/help" goto command_help
-if "%~1"=="/HELP" goto command_help
-if "%~1"=="/?" goto command_help
-
-if "%~1"=="" goto check_tool
-
-echo Invalid command parameter: %~1
-echo.
-
-:command_help
-echo Valid command parameters are:
-echo stable Generated stable engines project files
-echo all Generate all engines project files
-echo tools Generate project files for the devtools
-echo clean Clean generated project files
-echo help Show help message
-goto done
-
-:check_tool
-if not exist create_project.exe goto no_tool
-
-:question
-echo.
-set batchanswer=S
-set /p batchanswer="Enable stable engines only, or all engines? (S/a)"
-if "%batchanswer%"=="s" goto stable
-if "%batchanswer%"=="S" goto stable
-if "%batchanswer%"=="a" goto all
-if "%batchanswer%"=="A" goto all
-goto question
-
-:no_tool
-echo create_project.exe not found in the current folder.
-echo You need to build it first and copy it in this
-echo folder
-goto done
-
-:all
-echo.
-echo Creating project files with all engines enabled (stable and unstable)
-echo.
-create_project ..\.. --enable-all-engines --msvc --msvc-version 8
-goto done
-
-:stable
-echo.
-echo Creating normal project files, with only the stable engines enabled
-echo.
-create_project ..\.. --msvc --msvc-version 8
-goto done
-
-:tools
-echo.
-echo Creating tools project files
-echo.
-create_project ..\.. --tools --msvc --msvc-version 8
-goto done
-
-:tests
-echo.
-echo Creating tests project files
-echo.
-create_project ..\.. --tests --msvc --msvc-version 8
-goto done
-
-:clean_check
-echo.
-set cleananswer=N
-set /p cleananswer="This will remove all project files. Are you sure you want to continue? (N/y)"
-if "%cleananswer%"=="n" goto done
-if "%cleananswer%"=="N" goto done
-if "%cleananswer%"=="y" goto clean
-if "%cleananswer%"=="Y" goto clean
-goto clean_check
-
-:clean
-echo.
-echo Removing all project files
-del /Q *.vcproj* > NUL 2>&1
-del /Q *.vsprops > NUL 2>&1
-del /Q *.sln* > NUL 2>&1
-del /Q scummvm* > NUL 2>&1
-del /Q devtools* > NUL 2>&1
-del /Q test_runner.cpp
-goto done
-
-:done
-echo.
-pause
diff --git a/dists/msvc8/readme.txt b/dists/msvc8/readme.txt
deleted file mode 100644
index 95b55e973a..0000000000
--- a/dists/msvc8/readme.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-The Visual Studio project files can now be created automatically from the GCC
-files using the create_project tool inside the /devtools/create_project folder.
-
-To create the default project files, build create_project.exe, copy it inside
-this folder and run the create_msvc8.bat file for a default build. You can run
-create_project.exe with no parameters to check the possible command-line options
diff --git a/dists/openpandora/PXML.xml b/dists/openpandora/PXML.xml
index 157a773677..877a7fd6b4 100644
--- a/dists/openpandora/PXML.xml
+++ b/dists/openpandora/PXML.xml
@@ -4,11 +4,11 @@
<package id="scummvm.djwillis.0001">
<author name="DJWillis" website="http://www.scummvm.org/"/>
<!-- version type can be alpha, beta or release, set to release in branch -->
- <version major="1" minor="7" release="0" build="1" type="release"/>
+ <version major="1" minor="8" release="0" build="1" type="release"/>
<!-- Both title and titles are needed -->
- <title lang="en_US">ScummVM 1.7.0git</title>
+ <title lang="en_US">ScummVM 1.8.0git</title>
<titles>
- <title lang="en_US">ScummVM 1.7.0git</title>
+ <title lang="en_US">ScummVM 1.8.0git</title>
</titles>
<descriptions>
<description lang="en_US">
@@ -25,7 +25,7 @@
<exec command="./runscummvm.sh"/>
<author name="DJWillis" website="http://www.scummvm.org/"/>
<!-- version type can be alpha, beta or release, set to release in branch -->
- <version major="1" minor="7" release="0" build="1" type="release"/>
+ <version major="1" minor="8" release="0" build="1" type="release"/>
<!-- Both title and titles are needed -->
<title lang="en_US">ScummVM</title>
<titles>
diff --git a/dists/openpandora/README-OPENPANDORA b/dists/openpandora/README-OPENPANDORA
index d9c4c9d0bb..70cff11858 100644
--- a/dists/openpandora/README-OPENPANDORA
+++ b/dists/openpandora/README-OPENPANDORA
@@ -1,4 +1,4 @@
-ScummVM 1.7.0git - OPENPANDORA SPECIFIC README
+ScummVM 1.8.0git - OPENPANDORA SPECIFIC README
------------------------------------------------------------------------
Please refer to the:
diff --git a/dists/openpandora/README-PND.txt b/dists/openpandora/README-PND.txt
index e7fee27f1b..9012c9116b 100644
--- a/dists/openpandora/README-PND.txt
+++ b/dists/openpandora/README-PND.txt
@@ -1,4 +1,4 @@
-ScummVM 1.7.0git - OPENPANDORA README - HOW TO INSTALL
+ScummVM 1.8.0git - OPENPANDORA README - HOW TO INSTALL
------------------------------------------------------------------------
Please refer to the:
diff --git a/dists/openpandora/index.html b/dists/openpandora/index.html
index b109e55df3..e664623bf8 100644
--- a/dists/openpandora/index.html
+++ b/dists/openpandora/index.html
@@ -5,7 +5,7 @@
</h3>
<h4>
- <p>ScummVM 1.7.0git: OpenPandora Specific Documentation</p>
+ <p>ScummVM 1.8.0git: OpenPandora Specific Documentation</p>
</h4>
<A href="docs/README-OPENPANDORA">ScummVM OpenPandora README</a><br/>
@@ -13,7 +13,7 @@
<A href="http://wiki.scummvm.org/index.php/OpenPandora">ScummVM OpenPandora WiKi</a><br/>
<h4>
- <p>ScummVM 1.7.0git: General Documentation</p>
+ <p>ScummVM 1.8.0git: General Documentation</p>
</h4>
<A href="http://www.scummvm.org/">ScummVM website</a><br/>
diff --git a/dists/redhat/scummvm-tools.spec b/dists/redhat/scummvm-tools.spec
index 50af873541..74e86089f1 100644
--- a/dists/redhat/scummvm-tools.spec
+++ b/dists/redhat/scummvm-tools.spec
@@ -7,7 +7,7 @@
# Prologue information
#------------------------------------------------------------------------------
Name : scummvm-tools
-Version : 1.7.0git
+Version : 1.8.0git
Release : 1
Summary : ScummVM-related tools
Group : Interpreters
diff --git a/dists/redhat/scummvm.spec b/dists/redhat/scummvm.spec
index 33622ffb9b..18eb020cdc 100644
--- a/dists/redhat/scummvm.spec
+++ b/dists/redhat/scummvm.spec
@@ -7,7 +7,7 @@
# Prologue information
#------------------------------------------------------------------------------
Name : scummvm
-Version : 1.7.0git
+Version : 1.8.0git
Release : 1
Summary : Graphic adventure game interpreter
Group : Interpreters
@@ -18,6 +18,8 @@ Url : http://www.scummvm.org
Source : %{name}-%{version}.tar.bz2
Source1 : libmad-0.15.1b.tar.bz2
Source2 : faad2-2.7.tar.bz2
+Source3 : mpeg2dec-0.4.1.tar.bz2
+Patch0 : libmad-0.15.1b-fixes-1.patch
BuildRoot : %{_tmppath}/%{name}-%{version}-root
BuildRequires: desktop-file-utils
@@ -46,13 +48,15 @@ games) and many more. See http://www.scummvm.org for a full compatibility list.
# install scripts
#------------------------------------------------------------------------------
%prep
-%setup -q -a 1 -a 2 -n scummvm-%{version}
+%setup -q -a 1 -a 2 -a 3 -n scummvm-%{version}
+%patch0 -p0
mkdir tmp
%build
(cd libmad-0.15.1b; ./configure --enable-static --disable-shared --prefix=%{_builddir}/scummvm-%{version}/tmp; make; make install)
(cd faad2-2.7; ./configure --enable-static --disable-shared --prefix=%{_builddir}/scummvm-%{version}/tmp; make; make install)
-./configure --with-mad-prefix=%{_builddir}/scummvm-%{version}/tmp --with-faad-prefix=%{_builddir}/scummvm-%{version}/tmp --prefix=%{_prefix} --enable-release
+(cd mpeg2dec-0.4.1; ./configure --enable-static --disable-shared --prefix=%{_builddir}/scummvm-%{version}/tmp; make; make install)
+./configure --with-mad-prefix=%{_builddir}/scummvm-%{version}/tmp --with-faad-prefix=%{_builddir}/scummvm-%{version}/tmp --with-mpeg2-prefix=%{_builddir}/scummvm-%{version}/tmp --prefix=%{_prefix} --enable-release
make
%install
@@ -74,6 +78,8 @@ install -m644 -D dists/engine-data/teenagent.dat %{buildroot}%{_datadir}/scummvm
install -m644 -D dists/engine-data/hugo.dat %{buildroot}%{_datadir}/scummvm/hugo.dat
install -m644 -D dists/engine-data/tony.dat %{buildroot}%{_datadir}/scummvm/tony.dat
install -m644 -D dists/engine-data/toon.dat %{buildroot}%{_datadir}/scummvm/toon.dat
+install -m644 -D dists/engine-data/wintermute.zip %{buildroot}%{_datadir}/scummvm/wintermute.zip
+install -m644 -D dists/engine-data/neverhood.dat %{buildroot}%{_datadir}/scummvm/neverhood.dat
desktop-file-install --vendor scummvm --dir=%{buildroot}/%{_datadir}/applications dists/scummvm.desktop
%clean
@@ -114,6 +120,8 @@ fi
%{_datadir}/scummvm/hugo.dat
%{_datadir}/scummvm/tony.dat
%{_datadir}/scummvm/toon.dat
+%{_datadir}/scummvm/wintermute.zip
+%{_datadir}/scummvm/neverhood.dat
%{_mandir}/man6/scummvm.6*
#------------------------------------------------------------------------------
diff --git a/dists/redhat/scummvm.spec.in b/dists/redhat/scummvm.spec.in
index 5db2807d0e..6429e74128 100644
--- a/dists/redhat/scummvm.spec.in
+++ b/dists/redhat/scummvm.spec.in
@@ -18,6 +18,8 @@ Url : http://www.scummvm.org
Source : %{name}-%{version}.tar.bz2
Source1 : libmad-0.15.1b.tar.bz2
Source2 : faad2-2.7.tar.bz2
+Source3 : mpeg2dec-0.4.1.tar.bz2
+Patch0 : libmad-0.15.1b-fixes-1.patch
BuildRoot : %{_tmppath}/%{name}-%{version}-root
BuildRequires: desktop-file-utils
@@ -46,13 +48,15 @@ games) and many more. See http://www.scummvm.org for a full compatibility list.
# install scripts
#------------------------------------------------------------------------------
%prep
-%setup -q -a 1 -a 2 -n scummvm-%{version}
+%setup -q -a 1 -a 2 -a 3 -n scummvm-%{version}
+%patch0 -p0
mkdir tmp
%build
(cd libmad-0.15.1b; ./configure --enable-static --disable-shared --prefix=%{_builddir}/scummvm-%{version}/tmp; make; make install)
(cd faad2-2.7; ./configure --enable-static --disable-shared --prefix=%{_builddir}/scummvm-%{version}/tmp; make; make install)
-./configure --with-mad-prefix=%{_builddir}/scummvm-%{version}/tmp --with-faad-prefix=%{_builddir}/scummvm-%{version}/tmp --prefix=%{_prefix} --enable-release
+(cd mpeg2dec-0.4.1; ./configure --enable-static --disable-shared --prefix=%{_builddir}/scummvm-%{version}/tmp; make; make install)
+./configure --with-mad-prefix=%{_builddir}/scummvm-%{version}/tmp --with-faad-prefix=%{_builddir}/scummvm-%{version}/tmp --with-mpeg2-prefix=%{_builddir}/scummvm-%{version}/tmp --prefix=%{_prefix} --enable-release
make
%install
@@ -74,6 +78,8 @@ install -m644 -D dists/engine-data/teenagent.dat %{buildroot}%{_datadir}/scummvm
install -m644 -D dists/engine-data/hugo.dat %{buildroot}%{_datadir}/scummvm/hugo.dat
install -m644 -D dists/engine-data/tony.dat %{buildroot}%{_datadir}/scummvm/tony.dat
install -m644 -D dists/engine-data/toon.dat %{buildroot}%{_datadir}/scummvm/toon.dat
+install -m644 -D dists/engine-data/wintermute.zip %{buildroot}%{_datadir}/scummvm/wintermute.zip
+install -m644 -D dists/engine-data/neverhood.dat %{buildroot}%{_datadir}/scummvm/neverhood.dat
desktop-file-install --vendor scummvm --dir=%{buildroot}/%{_datadir}/applications dists/scummvm.desktop
%clean
@@ -114,6 +120,8 @@ fi
%{_datadir}/scummvm/hugo.dat
%{_datadir}/scummvm/tony.dat
%{_datadir}/scummvm/toon.dat
+%{_datadir}/scummvm/wintermute.zip
+%{_datadir}/scummvm/neverhood.dat
%{_mandir}/man6/scummvm.6*
#------------------------------------------------------------------------------
diff --git a/dists/scummvm.rc b/dists/scummvm.rc
index f0609c1a79..def6ee49f7 100644
--- a/dists/scummvm.rc
+++ b/dists/scummvm.rc
@@ -61,8 +61,8 @@ pred.dic FILE "dists/pred.dic"
#endif
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,7,0,0
- PRODUCTVERSION 1,7,0,0
+ FILEVERSION 1,8,0,0
+ PRODUCTVERSION 1,8,0,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -79,13 +79,13 @@ BEGIN
BEGIN
VALUE "Comments", "Look! A three headed monkey (TM)! .. Nice use of the TM!\0"
VALUE "FileDescription", "http://www.scummvm.org/\0"
- VALUE "FileVersion", "1.7.0git\0"
+ VALUE "FileVersion", "1.8.0git\0"
VALUE "InternalName", "scummvm\0"
VALUE "LegalCopyright", "Copyright Љ 2001-2014 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"
- VALUE "ProductVersion", "1.7.0git\0"
+ VALUE "ProductVersion", "1.8.0git\0"
END
END
diff --git a/dists/slackware/scummvm.SlackBuild b/dists/slackware/scummvm.SlackBuild
index 215b502f2a..b1e1fe2c77 100755
--- a/dists/slackware/scummvm.SlackBuild
+++ b/dists/slackware/scummvm.SlackBuild
@@ -9,7 +9,7 @@ if [ "$TMP" = "" ]; then
fi
PKG=$TMP/package-scummvm
-VERSION=1.7.0git
+VERSION=1.8.0git
ARCH=i486
BUILD=1
diff --git a/dists/wii/meta.xml b/dists/wii/meta.xml
index ad4ec9cc7d..2dbd8da7fd 100644
--- a/dists/wii/meta.xml
+++ b/dists/wii/meta.xml
@@ -2,7 +2,7 @@
<app version="1">
<name>ScummVM</name>
<coder>The ScummVM Team</coder>
- <version>1.7.0git@REVISION@</version>
+ <version>1.8.0git@REVISION@</version>
<release_date>@TIMESTAMP@</release_date>
<short_description>Point &amp; Click Adventures</short_description>
<long_description>ScummVM is a program which allows you to run certain classic graphical point-and-click adventure games, provided you already have their data files. The clever part about this: ScummVM just replaces the executables shipped with the games, allowing you to play them on systems for which they were never designed!
diff --git a/dists/win32/scummvm.nsi b/dists/win32/scummvm.nsi
index 602b9fd6c3..bdefad43da 100644
--- a/dists/win32/scummvm.nsi
+++ b/dists/win32/scummvm.nsi
@@ -72,7 +72,7 @@ Name ScummVM
# General Symbol Definitions
#########################################################################################
!define REGKEY "Software\$(^Name)\$(^Name)"
-!define VERSION "1.7.0git"
+!define VERSION "1.8.0git"
!define COMPANY "ScummVM Team"
!define URL "http://scummvm.org/"
!define DESCRIPTION "ScummVM Installer. Look! A three headed monkey (TM)!"
@@ -92,7 +92,7 @@ XPStyle on
#TargetMinimalOS 5.0 ; Minimal version of windows for installer: Windows 2000 or more recent
; (will build unicode installer with NSIS 2.50+)
-VIProductVersion 1.7.0.0
+VIProductVersion 1.8.0.0
VIAddVersionKey ProductName $(^Name)
VIAddVersionKey ProductVersion "${VERSION}"
VIAddVersionKey CompanyName "${COMPANY}"
diff --git a/doc/de/Liesmich b/doc/de/Liesmich
index 8e28c201c7..9190bb0852 100644
--- a/doc/de/Liesmich
+++ b/doc/de/Liesmich
@@ -33,7 +33,8 @@ Inhaltsverzeichnis:
* 3.17 Hinweise zu Winnie the Pooh
* 3.18 Hinweise zu Troll's Tale
* 3.19 Hinweise zu DraФi Historie
- * 3.20 Bekannte Probleme
+ * 3.20 Gleichzeitige Sprachausgabe und Untertitel in Sierra-SCI-Spielen
+ * 3.21 Bekannte Probleme
4.0) UnterstУМtzte Plattformen
5.0) ScummVM verwenden
* 5.1 Kommandozeilenoptionen
@@ -690,7 +691,7 @@ Alternativ kУЖnnen Sie das Tool т€žcompress_queenт€œ aus dem Tools-Paket verwend
um Ihre FOTAQ-Spieldatei neu т€žzusammenzubauenт€œ, um die Tabellendatei fУМr diese
spezielle Version miteinzubeziehen und somit die Laufzeit-AbhУЄngigkeit von der
Datei т€žqueen.tblт€œ zu lУЖsen. Dieses Tool kann auch die Sprachausgabe und
-Sound-Effekte mittels MP3, Ogg Vorbis oder FLAC komprimieren.
+GerУЄusch-Effekte mittels MP3, Ogg Vorbis oder FLAC komprimieren.
3.10) Hinweise zu Gobliiins:
@@ -875,7 +876,63 @@ Alle Spieldateien und die KomplettlУЖsung kУЖnnen von der folgenden Website
heruntergeladen werden: http://www.ucw.cz/draci-historie/index-en.html
-3.20) Bekannte Probleme:
+3.20) Gleichzeitige Sprachausgabe und Untertitel in Sierra-SCI-Spielen:
+----- -----------------------------------------------------------------
+Bestimmte CD-Versionen von Sierra-SCI-Spielen boten sowohl Sprachausgabe als
+auch Untertitel an. Bei einigen gab es die MУЖglichkeit, zwischen beidem hin- und
+herzuwechseln, aber in einigen FУЄllen war keine Option vorhanden, um beides
+gleichzeitig zu aktivieren. Mit ScummVM ist es mУЖglich, auf einen kombinierten
+Modus zurУМckzugreifen, in welchem Sprachausgabe und Untertitel zur selben Zeit
+wiedergegeben werden. Dieser Modus kann in ScummVMs Audio-Optionen deaktiviert
+und aktiviert werden, aber jedes Spiel hat eigene Optionen, um einen Wechsel
+zwischen Sprachausgabe und Text innerhalb des Spiels zu ermУЖglichen.
+
+In diesen CD-Spielen ist es mУЖglich, gleichzeitige Sprachausgabe und Untertitel
+anzeigen zu lassen:
+ EcoQuest 1 CD
+ Freddy Pharkas CD
+ King's Quest 6 CD
+ Laura Bow 2 CD
+ Leisure Suit Larry 6 CD
+ Space Quest 4 CD
+
+EcoQuest 1 CD:
+ Der Modus Sprachausgabe und Untertitel kann УМber die Spieloptionen oder auch
+ УМber ScummVMs Audio-Optionen deaktiviert und aktiviert werden.
+
+Freddy Pharkas CD:
+ Es gibt innerhalb des Spiels keine Option, um gleichzeitige Sprachausgabe
+ und Untertitel zu aktivieren. Dies ist nur УМber ScummVMs Audio-Optionen
+ mУЖglich. Bitte beachten Sie, dass einige gesprochene Teile in den
+ Untertiteln fehlen.
+
+King's Quest 6 CD:
+ Der Modus Sprachausgabe und Untertitel kann УМber die ModusschaltflУЄche in
+ den Spieloptionen (УМber die fУМr ScummVM zusУЄtzlich hinzugefУМgte Einstellung
+ т€žDualт€œ) oder auch УМber ScummVMs Audio-Optionen deaktiviert und aktiviert
+ werden.
+
+Laura Bow 2 CD:
+ Der Modus Sprachausgabe und Untertitel kann УМber die ModusschaltflУЄche in
+ den Spieloptionen (УМber die fУМr ScummVM zusУЄtzlich hinzugefУМgte Einstellung
+ т€žDualт€œ) oder auch УМber ScummVMs Audio-Optionen deaktiviert und aktiviert
+ werden.
+
+Leisure Suit Larry 6 CD:
+ Either speech only or speech and text can be selected. There is no
+ in-game option to toggle text only. Only ScummVM's audio options can
+ be used to enable the text only mode.
+ Es kann zwischen alleiniger Sprachausgabe und Sprachausgabe und Untertitel
+ gewУЄhlt werden. Es gibt innerhalb des Spiels keine Option, um alleinige
+ Untertitel zu aktivieren. Dies ist nur УМber ScummVMs Audio-Optionen mУЖglich.
+
+Space Quest 4 CD:
+ Der Modus Sprachausgabe und Untertitel kann УМber die SchaltflУЄche fУМr den
+ Anzeige-Modus in den Spieloptionen oder auch УМber ScummVMs Audio-Optionen
+ deaktiviert und aktiviert werden.
+
+
+3.21) Bekannte Probleme:
----- ------------------
Diese verУЖffentlichte Version hat die unten folgenden bekannten Probleme. Es ist
nicht notwendig, diese zu berichten, jedoch sind Patches, um diese zu beheben,
@@ -916,7 +973,7 @@ KompatibilitУЄtsseite der Website aufgefУМhrt ist, sehen Sie bitte im Abschnitt
Elvira II - The Jaws of Cerberus
- Keine Musik in der Atari-ST-Version
- - Keine Sound-Effekte in der PC-Version
+ - Keine GerУЄusch-Effekte in der PC-Version
- Palettenprobleme in der Atari-ST-Version
Inherit the Earth: Quest for the Orb
@@ -944,9 +1001,9 @@ KompatibilitУЄtsseite der Website aufgefУМhrt ist, sehen Sie bitte im Abschnitt
Originalspiel immer ausgeschaltet waren.
The Legend of Kyrandia:
- - Keine Musik oder Sound-Effekte in der Macintosh-Diskettenversion
+ - Keine Musik oder GerУЄusch-Effekte in der Macintosh-Diskettenversion
- Die Macintosh-CD-Version verwendet eingebundene DOS-Musik und
- DOS-Sound-Effekte.
+ DOS-GerУЄusch-Effekte.
Spiele von Humongous Entertainment:
- Nur die OriginaloberflУЄche kann zum Laden und Speichern verwendet werden.
@@ -1396,7 +1453,7 @@ zwischen SCUMM-Spielen und anderen Spielen.
Escape - Уœberspringt Zwischensequenzen.
- und + - MusiklautstУЄrke, leiser/lauter
m - Musik EIN/AUS
- s - Sound-Effekte EIN/AUS
+ s - GerУЄusch-Effekte EIN/AUS
b - HintergrundgerУЄusche EIN/AUS
[nur in Simon the Sorcerer 2 mУЖglich]
Pause - Spielpause
@@ -1415,7 +1472,7 @@ zwischen SCUMM-Spielen und anderen Spielen.
F12 - Hohes Tempo in Swampy Adventures EIN/AUS
- und + - MusiklautstУЄrke, leiser/lauter
m - Musik EIN/AUS
- s - Sound-Effekte EIN/AUS
+ s - GerУЄusch-Effekte EIN/AUS
Pause - Spielpause
Floyd - Es gibt noch Helden
@@ -1423,7 +1480,7 @@ zwischen SCUMM-Spielen und anderen Spielen.
Strg+f - Schneller Modus EIN/AUS
F7 - Wechselt Figuren.
F9 - Objektnamen-Anzeige EIN/AUS
- s - Sound-Effekte EIN/AUS
+ s - GerУЄusch-Effekte EIN/AUS
Pause - Spielpause
t - Wechselt zwischen Sprachausgabe allein und
Sprachausgabe und Untertiteln zusammen.
@@ -1745,9 +1802,9 @@ Wenn keine der oberen Einstellungen aktiviert ist, wird ScummVM Ihr GerУЄt im
General-MIDI-Modus initialisieren und GM-Emulation in Spielen mit
MT-32-Soundtrack verwenden.
-Einige Spiele beinhalten Sound-Effekte, die exklusiv fУМr den AdLib-Soundtrack
+Einige Spiele beinhalten GerУЄusch-Effekte, die exklusiv fУМr den AdLib-Soundtrack
vorgesehen sind. FУМr diese Spiele sollten Sie --multi-midi festlegen, um
-MIDI-Musik mit AdLib-Sound-Effekten zu kombinieren.
+MIDI-Musik mit AdLib-GerУЄusch-Effekten zu kombinieren.
7.6) Sound-Wiedergabe mittels MIDI-Sequenzer: [NUR IN UNIX]
@@ -2243,7 +2300,7 @@ folgende nicht standardmУЄУŸige SchlУМsselwУЖrter:
disable_dithering Bool Entfernung von Fehlerdiffusionsartefakten in
EGA-Spielen
- prefer_digitalsfx Bool Falls т€žtrueт€œ, werden digitale Sound-Effekte
+ prefer_digitalsfx Bool Falls т€žtrueт€œ, werden digitale GerУЄusch-Effekte
statt synthetisierter bevorzugt.
originalsaveload Bool Falls т€žtrueт€œ, werden die originalen MenУМs zum
Speichern und Laden statt der
@@ -2268,6 +2325,12 @@ SchlУМsselwУЖrter:
music_mute Bool Falls т€žtrueт€œ, wird Musik unterdrУМckt.
sfx_mute Bool Falls т€žtrueт€œ, werden GerУЄusche unterdrУМckt.
+Hopkins FBI verfУМgt zusУЄtzlich УМber folgendes nicht standardmУЄУŸiges
+SchlУМsselwort:
+
+ enable_gore Bool Falls т€žtrueт€œ, wird optionaler brutaler
+ Spielinhalt angezeigt.
+
Jones in the Fast Lane verfУМgt zusУЄtzlich УМber folgendes nicht standardmУЄУŸiges
SchlУМsselwort:
@@ -2309,6 +2372,10 @@ standardmУЄУŸige SchlУМsselwУЖrter:
music_mute Bool Falls т€žtrueт€œ, wird Musik unterdrУМckt.
sfx_mute Bool Falls т€žtrueт€œ, werden GerУЄusche unterdrУМckt.
+Soltys verfУМgt zusУЄtzlich УМber folgendes nicht standardmУЄУŸiges SchlУМsselwort:
+
+ enable_color_blind Bool Falls т€žtrueт€œ, werden die Farben des Spiels durch
+ GrautУЖne ersetzt.
The Legend of Kyrandia verfУМgt zusУЄtzlich УМber folgendes nicht standardmУЄУŸiges
SchlУМsselwort:
@@ -2332,6 +2399,19 @@ standardmУЄУŸige SchlУМsselwУЖrter:
helium_mode Bool Falls т€žtrueт€œ, klingen alle Spielfiguren so,
als hУЄtten sie Helium eingeatmet.
+The Neverhood verfУМgt zusУЄtzlich УМber folgende nicht standardmУЄУŸige
+SchlУМsselwУЖrter:
+
+ originalsaveload Bool Falls т€žtrueт€œ, werden die originalen MenУМs zum
+ Speichern und Laden statt der
+ erweiterten von ScummVM verwendet.
+ skiphallofrecordsscenes Bool
+ Falls т€žtrueт€œ, kann der Spieler die Szenenbuch-
+ Sequenz in der Chronikhalle УМberspringen.
+ scalemakingofvideos Bool Falls т€žtrueт€œ, werden die Making-Of-Videos
+ skaliert, sodass sie den gesamten Bildschirm
+ ausfУМllen.
+
The 7th Guest verfУМgt zusУЄtzlich УМber folgendes nicht standardmУЄУŸiges
SchlУМsselwort:
diff --git a/doc/de/Neues b/doc/de/Neues
index 11dbb9309a..8858e86c02 100644
--- a/doc/de/Neues
+++ b/doc/de/Neues
@@ -2,6 +2,70 @@ Umfangreichere У„nderungsaufzeichnungen des neusten experimentellen Codes finden
Sie auf Englisch unter:
https://github.com/scummvm/scummvm/commits/
+1.7.0 (21.07.2014)
+ Neue Spiele:
+ - UnterstУМtzung fУМr Chivalry is Not Dead hinzugefУМgt.
+ - UnterstУМtzung fУМr Return to Ringworld hinzugefУМgt.
+ - UnterstУМtzung fУМr The Neverhood hinzugefУМgt.
+ - UnterstУМtzung fУМr Mortville Manor hinzugefУМgt.
+ - UnterstУМtzung fУМr Voyeur hinzugefУМgt.
+
+ Allgemein:
+ - Munt-MT-32-Emulationscode zu Version 1.3.0 aktualisiert.
+ - Von unseren eigenen JPEG- und PNG-Dekodieren zu libjpeg(-turbo) und libpng
+ gewechselt, welche schneller sind und mehr Bilder verarbeiten kУЖnnen.
+ (HINWEIS: Der Wechsel zu libpng fand bereits in Version 1.6.0 statt, wurde
+ jedoch nicht in der Datei NEUES erwУЄhnt.)
+
+ AGOS:
+ - UnterstУМtzung fУМr Mausrad bei Inventar und Spielstandliste hinzugefУМgt.
+ - Anzeige der Interaktionsverben in Simon the Sorcerer 2 aktiviert.
+ - Fehler bei LoyalitУЄtseinstufung in englischer 4CD-Version von
+ Floyd - Es gibt noch Helden beseitigt. (Dies war offensichtlich ein Fehler
+ im ursprУМnglichen Spiel. Es ist zurzeit nicht bekannt, ob noch weitere
+ Versionen hiervon betroffen sind.)
+
+ Baphomets Fluch 1:
+ - UnterstУМtzung fУМr MPEG-2-Videos wiederhergestellt.
+
+ Baphomets Fluch 2:
+ - UnterstУМtzung fУМr MPEG-2-Videos wiederhergestellt.
+
+ CGE:
+ - Option fУМr einen т€žFarbenblindheitsmodusт€œ zum ScummVM-MenУМ hinzugefУМgt.
+
+ Gob:
+ - Video-QualitУЄt in Urban Runner verbessert.
+
+ Hopkins:
+ - Option fУМr einen Brutalo-Modus zu ScummVM-MenУМ hinzugefУМgt.
+ - Fehler beseitigt, durch welchen die Musik manchmal vorzeitig zu spielen
+ aufhУЖrte.
+
+ SCI:
+ - UnterstУМtzung fУМr die detailreicheren RAVE-Lippensynchronisationsdaten in
+ der Windows-Version von Kingт€™s Quest 6 hinzugefУМgt. Portraits wirken beim
+ Sprechen nun viel ausdrucksstarker.
+ - UnterstУМtzung fУМr gleichzeitige Sprachausgabe und Untertitel in den
+ CD-Versionen von Laura Bow 2 und Kingт€™s Quest 6 hinzugefУМgt (kann sowohl im
+ Spiel selbst УМber den neuen т€žDualт€œ-Audiostatus als auch УМber ScummVMs
+ Audio-Optionen aktiviert werden).
+ - MusikУМbergУЄnge korrigiert.
+ - Mehrere Skriptfehler in Camelot, Crazy Nick's, Hoyle 3, QFG1VGA, KQ5,
+ KQ6, LB2, LSL2, LSL5, Pharkas, PQ1VGA, SQ4 und SQ5 beseitigt.
+ - MIDI-Parser verbessert, sodass Musikereignisse genauer verarbeitet werden.
+
+SCUMM:
+ - Spielstandsbenennungsschema von HE-Spielen geУЄndert, sodass immer der
+ Zielname des Spiels enthalten ist.
+ - Fehler beseitigt, durch den man mehrere Trainer in Backyard Football hatte.
+ - AdLib-UnterstУМtzung fУМr Loom und Indiana Jones and the Last Crusade
+ verbessert. Dadurch klingen GerУЄusch-Effekte wie beispielsweise von der
+ Schreibmaschine und vom Wasserfall wie im Original.
+
+ Tinsel:
+ - Discworld 1 und 2 stУМrzen nicht mehr auf Big-Endian-Systemen ab.
+
1.6.0 (31.05.2013)
Neue Spiele:
- UnterstУМtzung fУМr 3 Skulls of the Toltecs hinzugefУМgt.
@@ -37,8 +101,8 @@ Sie auf Englisch unter:
Cine:
- Audio-UnterstУМtzung fУМr Amiga und AtariST-Versionen von Future Wars
verbessert. Musik wird nun langsam ausgeblendet anstatt abrupt zu stoppen.
- Die Balance-Regelung der Sound-Effekte funktioniert nun richtig, wenn sie
- vom Spiel verlangt wird.
+ Die Balance-Regelung der GerУЄusch-Effekte funktioniert nun richtig, wenn
+ sie vom Spiel verlangt wird.
CGE:
- Soltys enthУЄlt ein Puzzle, bei welchem man die ALT-Taste drУМcken muss,
@@ -127,7 +191,7 @@ Sie auf Englisch unter:
- Verschiedene Verbesserungen der grafischen BenutzeroberflУЄche.
Baphomets Fluch 1:
- - Falsche Soundeffekte in der DOS-/Windows-Demo korrigiert.
+ - Falsche GerУЄusch-Effekte in der DOS-/Windows-Demo korrigiert.
- UnterstУМtzung fУМr PlayStation-Videos hinzugefУМgt.
- Fehlende Untertitel zur Demo hinzugefУМgt.
@@ -196,9 +260,9 @@ Sie auf Englisch unter:
- Abfolgebedingung bei SCI1.1-PalettenУЄnderungen korrigiert. Dies behebt
einen Fehler in QFG1VGA, wenn man in Erana's Peace schlУЄft.
- Die Option, um zwischen digitalisierten und synthetisierten
- Soundeffekten auszuwУЄhlen, wurde bis auf Weiteres deaktiviert, bis eine
+ GerУЄusch-Effekten auszuwУЄhlen, wurde bis auf Weiteres deaktiviert, bis eine
anwenderfreundlichere BenutzeroberflУЄchen-Option mУЖglich ist.
- Digitale Soundeffekte werden vorerst immer bevorzugt.
+ Digitale GerУЄusch-Effekte werden vorerst immer bevorzugt.
- Fehler in einem Fall beseitigt, bei welchem bei Beginn eines neuen Liedes
nicht alle KanУЄle zurУМckgesetzt wurden und somit einige Noten falsch
klangen.
@@ -245,10 +309,10 @@ Sie auf Englisch unter:
SCI:
- Bessere Handhabung der Auswahl zwischen digitalen und synthetisierten
- Sound-Effekten hinzugefУМgt. Wenn das KontrollkУЄstchen т€žAdLib-/MIDI-Modusт€œ
- markiert ist, wird die Engine digitale Sound-Effekte bevorzugen, ansonsten
- werden stattdessen deren synthetisierten GegenstУМcke bevorzugt, wenn beide
- Versionen des gleichen Effekts existieren.
+ GerУЄusch-Effekten hinzugefУМgt. Wenn das KontrollkУЄstchen
+ т€žAdLib-/MIDI-Modusт€œ markiert ist, wird die Engine digitale GerУЄusch-Effekte
+ bevorzugen, ansonsten werden stattdessen deren synthetisierten GegenstУМcke
+ bevorzugt, wenn beide Versionen des gleichen Effekts existieren.
SCUMM:
- PC-Lautsprecher-UnterstУМtzung fУМr V5-Spiele integriert.
@@ -689,7 +753,7 @@ Sie auf Englisch unter:
SCUMM:
- UnterstУМtzung fУМr die PC-Engine-Version von Loom hinzugefУМgt.
- - UnterstУМtzung fУМr Musik und Klang-Effekte in der Amiga-Version von
+ - UnterstУМtzung fУМr Musik und GerУЄusch-Effekte in der Amiga-Version von
The Secret of Monkey Island hinzugefУМgt. (GSoC-Aufgabe)
- Einige weitere Fehler im Zusammenhang mit Amiga-Versionen von Spielen
beseitigt.
@@ -835,7 +899,7 @@ Sie auf Englisch unter:
zu entsprechen.
KYRA:
- - UnterstУМtzung fУМr auf PC-Lautsprecher basierende Musik und Klang-Effekte
+ - UnterstУМtzung fУМr auf PC-Lautsprecher basierende Musik und GerУЄusch-Effekte
hinzugefУМgt.
- UnterstУМtzung fУМr 16-Farben-Fehlerdiffusion in Kyrandia PC-9801
hinzugefУМgt.
@@ -978,7 +1042,7 @@ Sie auf Englisch unter:
- Teile von Digital iMUSE umgeschrieben, was einige Fehler beseitigt.
- Code fУМr interne Zeitplanung umgeschrieben, was einige
Geschwindigkeitsprobleme behebt, beispielsweise in COMI.
- - UnterstУМtzung fУМr Klang-Effekte in Amiga-Versionen von Zak McKracken
+ - UnterstУМtzung fУМr GerУЄusch-Effekte in Amiga-Versionen von Zak McKracken
verbessert.
- UnterstУМtzung fУМr AdLib-MIDI-Kombination in Monkey Island 1
(Diskettenversion) hinzugefУМgt.
@@ -1680,7 +1744,7 @@ Sie auf Englisch unter:
Spiele hinzugefУМgt.
- AdLib-UnterstУМtzung fУМr indy3ega und loom (EGA) hinzugefУМgt.
- MIDI-UnterstУМtzung fУМr loom (EGA), monkeyega und monkeyvga hinzugefУМgt.
- - UnterstУМtzung fУМr Klang-Effekte fУМr indy3/monkeyega/monkeyvga/pass
+ - UnterstУМtzung fУМr GerУЄusch-Effekte fУМr indy3/monkeyega/monkeyvga/pass
hinzugefУМgt.
- FM-TOWNS-Ziele fУМr Loom und Indy3 hinzugefУМgt.
- MenУМ im Spiel (aufrufbar mit F5) umgeschrieben, um einfachere Verwendung zu
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index fa23f5fa1a..72629a833e 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -122,7 +122,7 @@ bool cleanupPirated(ADGameDescList &matched) {
// We ruled out all variants and now have nothing
if (matched.empty()) {
- warning("Illegitimate game copy detected. We give no support in such cases %d", matched.size());
+ warning("Illegitimate game copy detected. We provide no support in such cases");
return true;
}
}
diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp
index 392ee08ea1..c26fbe3331 100644
--- a/engines/agos/midi.cpp
+++ b/engines/agos/midi.cpp
@@ -235,10 +235,6 @@ void MidiPlayer::startTrack(int track) {
_music.parser = parser; // That plugs the power cord into the wall
} else if (_music.parser) {
if (!_music.parser->setTrack(track)) {
- // The Roland MT32 music in Simon the Sorcerer 2
- // is missing the extra tracks in many scenes,
- // like the introduction sequence.
- stop();
return;
}
_currentTrack = (byte)track;
diff --git a/engines/cge/cge.h b/engines/cge/cge.h
index a65069ff46..c43358f252 100644
--- a/engines/cge/cge.h
+++ b/engines/cge/cge.h
@@ -80,12 +80,6 @@ class Talk;
#define kSayTheEnd 41
-enum GameType {
- kGameTypeNone = 0,
- kGameTypeSoltys,
- kGameTypeSfinx
-};
-
// our engine debug channels
enum {
kCGEDebugBitmap = 1 << 0,
diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp
index 4c2f81c1ae..022ff4df95 100644
--- a/engines/cge/detection.cpp
+++ b/engines/cge/detection.cpp
@@ -33,7 +33,6 @@ namespace CGE {
struct CgeGameDescription {
ADGameDescription desc;
- GameType gameType;
};
#define GAMEOPTION_COLOR_BLIND_DEFAULT_OFF GUIO_GAMEOPTIONS1
@@ -42,117 +41,81 @@ struct CgeGameDescription {
static const PlainGameDescriptor CGEGames[] = {
{ "soltys", "Soltys" },
- { "sfinx", "Sfinx" },
{ 0, 0 }
};
namespace CGE {
-static const CgeGameDescription gameDescriptions[] = {
-
- {
- {
- "soltys", "",
- {
- {"vol.cat", 0, "0c33e2c304821a2444d297fc5e2d67c6", 50176},
- {"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437572},
- AD_LISTEND
- },
- Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
- },
- kGameTypeSoltys
- },
+static const ADGameDescription gameDescriptions[] = {
{
+ "soltys", "",
{
- "soltys", "Soltys Freeware",
- {
- {"vol.cat", 0, "0c33e2c304821a2444d297fc5e2d67c6", 50176},
- {"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437676},
- AD_LISTEND
- },
- Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
+ {"vol.cat", 0, "0c33e2c304821a2444d297fc5e2d67c6", 50176},
+ {"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437572},
+ AD_LISTEND
},
- kGameTypeSoltys
+ Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
},
{
+ "soltys", "Freeware",
{
- "soltys", "Soltys Demo (not supported)",
- {
- {"vol.cat", 0, "1e077c8ff58109a187f07ac54b0c873a", 18788},
- {"vol.dat", 0, "75d385a6074c58b69f7730481f256051", 1796710},
- AD_LISTEND
- },
- Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
+ {"vol.cat", 0, "0c33e2c304821a2444d297fc5e2d67c6", 50176},
+ {"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437676},
+ AD_LISTEND
},
- kGameTypeSoltys
+ Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
{
+ "soltys", "Demo (not supported)",
{
- "soltys", "Soltys Demo (not supported)",
- {
- {"vol.cat", 0, "f17987487fab1ebddd781d8d02fedecc", 7168},
- {"vol.dat", 0, "c5d9b15863cab61dc125551576dece04", 1075272},
- AD_LISTEND
- },
- Common::PL_POL, Common::kPlatformDOS, ADGF_DEMO , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
+ {"vol.cat", 0, "1e077c8ff58109a187f07ac54b0c873a", 18788},
+ {"vol.dat", 0, "75d385a6074c58b69f7730481f256051", 1796710},
+ AD_LISTEND
},
- kGameTypeSoltys
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
{
+ "soltys", "Demo (not supported)",
{
- "soltys", "Soltys Freeware v1.0",
- {
- {"vol.cat", 0, "f1675684c68ab90272f5776f8f2c3974", 50176},
- {"vol.dat", 0, "4ffeff4abc99ac5999b55ccfc56ab1df", 8430868},
- AD_LISTEND
- },
- Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
+ {"vol.cat", 0, "f17987487fab1ebddd781d8d02fedecc", 7168},
+ {"vol.dat", 0, "c5d9b15863cab61dc125551576dece04", 1075272},
+ AD_LISTEND
},
- kGameTypeSoltys
+ Common::PL_POL, Common::kPlatformDOS, ADGF_DEMO , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
{
+ "soltys", "Freeware v1.0",
{
- "soltys", "Soltys Freeware v1.0",
- {
- {"vol.cat", 0, "20fdce799adb618100ef9ee2362be875", 50176},
- {"vol.dat", 0, "0e43331c846094d77f5dd201827e0a3b", 8439339},
- AD_LISTEND
- },
- Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
+ {"vol.cat", 0, "f1675684c68ab90272f5776f8f2c3974", 50176},
+ {"vol.dat", 0, "4ffeff4abc99ac5999b55ccfc56ab1df", 8430868},
+ AD_LISTEND
},
- kGameTypeSoltys
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
{
+ "soltys", "Freeware v1.0",
{
- "soltys", "Soltys Freeware v1.0",
- {
- {"vol.cat", 0, "fcae86b20eaa5cedec17b24fa5e85eb4", 50176},
- {"vol.dat", 0, "ff10d54acc2c95696c57e05819b6906f", 8450151},
- AD_LISTEND
- },
- Common::ES_ESP, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
+ {"vol.cat", 0, "20fdce799adb618100ef9ee2362be875", 50176},
+ {"vol.dat", 0, "0e43331c846094d77f5dd201827e0a3b", 8439339},
+ AD_LISTEND
},
- kGameTypeSoltys
+ Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
{
+ "soltys", "Freeware v1.0",
{
- // Polish version, provided by Strangerke
- "sfinx", "Sfinx Freeware",
- {
- {"vol.cat", 0, "21197b287d397c53261b6616bf0dd880", 129024},
- {"vol.dat", 0, "de14291869a8eb7c2732ab783c7542ef", 34180844},
- AD_LISTEND
- },
- Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
+ {"vol.cat", 0, "fcae86b20eaa5cedec17b24fa5e85eb4", 50176},
+ {"vol.dat", 0, "ff10d54acc2c95696c57e05819b6906f", 8450151},
+ AD_LISTEND
},
- kGameTypeSfinx
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
- {AD_TABLE_END_MARKER, kGameTypeNone}
+ AD_TABLE_END_MARKER
};
static const ADFileBasedFallback fileBasedFallback[] = {
- { &gameDescriptions[0].desc, { "vol.cat", "vol.dat", 0 } },
+ { &gameDescriptions[0], { "vol.cat", "vol.dat", 0 } },
{ 0, { 0 } }
};
} // End of namespace CGE
diff --git a/engines/cge/fileio.cpp b/engines/cge/fileio.cpp
index 2b1f74db02..d910e275eb 100644
--- a/engines/cge/fileio.cpp
+++ b/engines/cge/fileio.cpp
@@ -228,7 +228,7 @@ uint32 EncryptedStream::read(byte *dataPtr, uint32 dataSize) {
}
bool EncryptedStream::err() {
- return (_error & _readStream->err());
+ return (_error || _readStream->err());
}
bool EncryptedStream::eos() {
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index d7dccd2c65..babcb7e667 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -482,39 +482,39 @@ void Sprite::sync(Common::Serializer &s) {
uint16 flags = 0;
if (s.isLoading()) {
s.syncAsUint16LE(flags);
- _flags._hide = flags & 0x0001 ? true : false;
- _flags._near = flags & 0x0002 ? true : false;
- _flags._drag = flags & 0x0004 ? true : false;
- _flags._hold = flags & 0x0008 ? true : false;
- _flags._dummy = flags & 0x0010 ? true : false;
- _flags._slav = flags & 0x0020 ? true : false;
- _flags._syst = flags & 0x0040 ? true : false;
- _flags._kill = flags & 0x0080 ? true : false;
- _flags._xlat = flags & 0x0100 ? true : false;
- _flags._port = flags & 0x0200 ? true : false;
- _flags._kept = flags & 0x0400 ? true : false;
- _flags._east = flags & 0x0800 ? true : false;
- _flags._shad = flags & 0x1000 ? true : false;
- _flags._back = flags & 0x2000 ? true : false;
- _flags._bDel = flags & 0x4000 ? true : false;
- _flags._tran = flags & 0x8000 ? true : false;
+ _flags._hide = flags & 0x0001;
+ _flags._near = flags & 0x0002;
+ _flags._drag = flags & 0x0004;
+ _flags._hold = flags & 0x0008;
+ _flags._dummy = flags & 0x0010;
+ _flags._slav = flags & 0x0020;
+ _flags._syst = flags & 0x0040;
+ _flags._kill = flags & 0x0080;
+ _flags._xlat = flags & 0x0100;
+ _flags._port = flags & 0x0200;
+ _flags._kept = flags & 0x0400;
+ _flags._east = flags & 0x0800;
+ _flags._shad = flags & 0x1000;
+ _flags._back = flags & 0x2000;
+ _flags._bDel = flags & 0x4000;
+ _flags._tran = flags & 0x8000;
} else {
- flags = (flags << 1) | _flags._tran;
- flags = (flags << 1) | _flags._bDel;
- flags = (flags << 1) | _flags._back;
- flags = (flags << 1) | _flags._shad;
- flags = (flags << 1) | _flags._east;
- flags = (flags << 1) | _flags._kept;
- flags = (flags << 1) | _flags._port;
- flags = (flags << 1) | _flags._xlat;
- flags = (flags << 1) | _flags._kill;
- flags = (flags << 1) | _flags._syst;
- flags = (flags << 1) | _flags._slav;
- flags = (flags << 1) | _flags._dummy;
- flags = (flags << 1) | _flags._hold;
- flags = (flags << 1) | _flags._drag;
- flags = (flags << 1) | _flags._near;
- flags = (flags << 1) | _flags._hide;
+ flags = (flags << 1) | (_flags._tran ? 1 : 0);
+ flags = (flags << 1) | (_flags._bDel ? 1 : 0);
+ flags = (flags << 1) | (_flags._back ? 1 : 0);
+ flags = (flags << 1) | (_flags._shad ? 1 : 0);
+ flags = (flags << 1) | (_flags._east ? 1 : 0);
+ flags = (flags << 1) | (_flags._kept ? 1 : 0);
+ flags = (flags << 1) | (_flags._port ? 1 : 0);
+ flags = (flags << 1) | (_flags._xlat ? 1 : 0);
+ flags = (flags << 1) | (_flags._kill ? 1 : 0);
+ flags = (flags << 1) | (_flags._syst ? 1 : 0);
+ flags = (flags << 1) | (_flags._slav ? 1 : 0);
+ flags = (flags << 1) | (_flags._dummy ? 1 : 0);
+ flags = (flags << 1) | (_flags._hold ? 1 : 0);
+ flags = (flags << 1) | (_flags._drag ? 1 : 0);
+ flags = (flags << 1) | (_flags._near ? 1 : 0);
+ flags = (flags << 1) | (_flags._hide ? 1 : 0);
s.syncAsUint16LE(flags);
}
diff --git a/engines/cge/vga13h.h b/engines/cge/vga13h.h
index 9511559df0..a976d7078c 100644
--- a/engines/cge/vga13h.h
+++ b/engines/cge/vga13h.h
@@ -88,22 +88,22 @@ public:
int _ref;
signed char _scene;
struct Flags {
- uint16 _hide : 1; // general visibility switch
- uint16 _near : 1; // Near action lock
- uint16 _drag : 1; // sprite is moveable
- uint16 _hold : 1; // sprite is held with mouse
- uint16 _dummy : 1; // intrrupt driven animation
- uint16 _slav : 1; // slave object
- uint16 _syst : 1; // system object
- uint16 _kill : 1; // dispose memory after remove
- uint16 _xlat : 1; // 2nd way display: xlat table
- uint16 _port : 1; // portable
- uint16 _kept : 1; // kept in pocket
- uint16 _east : 1; // talk to east (in opposite to west)
- uint16 _shad : 1; // shadow
- uint16 _back : 1; // 'send to background' request
- uint16 _bDel : 1; // delete bitmaps in ~SPRITE
- uint16 _tran : 1; // transparent (untouchable)
+ bool _hide; // general visibility switch
+ bool _near; // Near action lock
+ bool _drag; // sprite is moveable
+ bool _hold; // sprite is held with mouse
+ bool _dummy; // interrupt driven animation
+ bool _slav; // slave object
+ bool _syst; // system object
+ bool _kill; // dispose memory after remove
+ bool _xlat; // 2nd way display: xlat table
+ bool _port; // portable
+ bool _kept; // kept in pocket
+ bool _east; // talk to east (in opposite to west)
+ bool _shad; // shadow
+ bool _back; // 'send to background' request
+ bool _bDel; // delete bitmaps in ~SPRITE
+ bool _tran; // transparent (untouchable)
} _flags;
int _x;
int _y;
diff --git a/engines/cge2/bitmap.cpp b/engines/cge2/bitmap.cpp
new file mode 100644
index 0000000000..0f442b8c77
--- /dev/null
+++ b/engines/cge2/bitmap.cpp
@@ -0,0 +1,458 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "cge2/bitmap.h"
+#include "cge2/cge2.h"
+#include "cge2/vga13h.h"
+#include "cge2/talk.h"
+#include "common/system.h"
+#include "common/debug.h"
+#include "common/debug-channels.h"
+
+namespace CGE2 {
+
+Bitmap::Bitmap() : _w(0), _h(0), _v(nullptr), _b(nullptr), _map(0), _vm(nullptr) {
+}
+
+void Bitmap::setVM(CGE2Engine *vm) {
+ _vm = vm;
+}
+
+Bitmap::Bitmap(CGE2Engine *vm, const char *fname) : _w(0), _h(0), _v(nullptr), _b(nullptr), _map(0), _vm(vm) {
+ Common::String path;
+
+ if (!strcmp(fname, "04tal201")) {
+ path = "04tal202";
+ warning("Workaround for missing VBM: 04tal201");
+ } else if (!strcmp(fname, "11oqlist-")) {
+ path = "11oqlist";
+ warning("Workaround for wrong VBM name: 11oqlist-");
+ } else
+ path = fname;
+
+ path = setExtension(path, ".VBM");
+
+ if (_vm->_resman->exist(path.c_str())) {
+ EncryptedStream file(_vm, path.c_str());
+ if (file.err())
+ error("Unable to find VBM [%s]", fname);
+ if (!loadVBM(&file))
+ error("Bad VBM [%s]", fname);
+ } else {
+ warning("Missing VBM [%s]", path.c_str());
+ }
+}
+
+Bitmap::Bitmap(CGE2Engine *vm, uint16 w, uint16 h, uint8 *map) : _w(w), _h(h), _v(nullptr), _map(0), _b(nullptr), _vm(vm) {
+ if (map)
+ code(map);
+}
+
+// following routine creates filled rectangle
+// immediately as VGA video chunks, in near memory as fast as possible,
+// especially for text line real time display
+Bitmap::Bitmap(CGE2Engine *vm, uint16 w, uint16 h, uint8 fill)
+ : _w((w + 3) & ~3), // only full uint32 allowed!
+ _h(h), _map(0), _b(nullptr), _vm(vm) {
+
+ uint16 dsiz = _w >> 2; // data size (1 plane line size)
+ uint16 lsiz = 2 + dsiz + 2; // uint16 for line header, uint16 for gap
+ uint16 psiz = _h * lsiz; // - last gape, but + plane trailer
+ uint8 *v = new uint8[4 * psiz + _h * sizeof(*_b)];// the same for 4 planes
+ // + room for wash table
+
+ WRITE_LE_UINT16(v, (kBmpCPY | dsiz)); // data chunk hader
+ memset(v + 2, fill, dsiz); // data bytes
+ WRITE_LE_UINT16(v + lsiz - 2, (kBmpSKP | ((kScrWidth / 4) - dsiz))); // gap
+
+ // Replicate lines
+ byte *destP;
+ for (destP = v + lsiz; destP < (v + psiz); destP += lsiz)
+ Common::copy(v, v + lsiz, destP);
+
+ WRITE_LE_UINT16(v + psiz - 2, kBmpEOI); // plane trailer uint16
+
+ // Replicate planes
+ for (destP = v + psiz; destP < (v + 4 * psiz); destP += psiz)
+ Common::copy(v, v + psiz, destP);
+
+ HideDesc *b = (HideDesc *)(v + 4 * psiz);
+ b->_skip = (kScrWidth - _w) >> 2;
+ b->_hide = _w >> 2;
+
+ // Replicate across the entire table
+ for (HideDesc *hdP = b + 1; hdP < (b + _h); hdP++)
+ *hdP = *b;
+
+ b->_skip = 0; // fix the first entry
+ _v = v;
+ _b = b;
+}
+
+Bitmap::Bitmap(CGE2Engine *vm, const Bitmap &bmp) : _w(bmp._w), _h(bmp._h), _v(nullptr), _map(0), _b(nullptr), _vm(vm) {
+ uint8 *v0 = bmp._v;
+ if (!v0)
+ return;
+
+ uint16 vsiz = (uint8 *)(bmp._b) - (uint8 *)(v0);
+ uint16 siz = vsiz + _h * sizeof(HideDesc);
+ uint8 *v1 = new uint8[siz];
+ memcpy(v1, v0, siz);
+ _b = (HideDesc *)((_v = v1) + vsiz);
+}
+
+Bitmap::~Bitmap() {
+ release();
+}
+
+void Bitmap::release() {
+ if (_v != nullptr)
+ delete[] _v;
+ _v = nullptr;
+}
+
+Bitmap &Bitmap::operator=(const Bitmap &bmp) {
+ if (this == &bmp)
+ return *this;
+
+ uint8 *v0 = bmp._v;
+ _w = bmp._w;
+ _h = bmp._h;
+ _map = 0;
+ _vm = bmp._vm;
+ delete[] _v;
+ _v = nullptr;
+
+ if (v0) {
+ uint16 vsiz = (uint8 *)bmp._b - (uint8 *)v0;
+ uint16 siz = vsiz + _h * sizeof(HideDesc);
+ uint8 *v1 = new uint8[siz];
+ memcpy(v1, v0, siz);
+ _b = (HideDesc *)((_v = v1) + vsiz);
+ }
+ return *this;
+}
+
+// Blatant rip from hopkins engine where it's ripped from gob engine. Hi DrMcCoy, hi Strangerke! ;>
+Common::String Bitmap::setExtension(const Common::String &str, const Common::String &ext) {
+ if (str.empty())
+ return str;
+
+ const char *dot = strrchr(str.c_str(), '.');
+ if (dot)
+ return Common::String(str.c_str(), dot - str.c_str()) + ext;
+
+ return str + ext;
+}
+
+BitmapPtr Bitmap::code(uint8 *map) {
+ if (!map)
+ return nullptr;
+
+ uint16 cnt;
+
+ if (_v) { // old X-map exists, so remove it
+ delete[] _v;
+ _v = nullptr;
+ }
+
+ while (true) { // at most 2 times: for (V == NULL) & for allocated block;
+ uint8 *im = _v + 2;
+ uint16 *cp = (uint16 *) _v;
+
+ if (_v) { // 2nd pass - fill the hide table
+ for (uint i = 0; i < _h; i++) {
+ _b[i]._skip = 0xFFFF;
+ _b[i]._hide = 0x0000;
+ }
+ }
+ for (int bpl = 0; bpl < 4; bpl++) { // once per each bitplane
+ uint8 *bm = map;
+ bool skip = (bm[bpl] == kPixelTransp);
+ uint16 j;
+
+ cnt = 0;
+ for (uint i = 0; i < _h; i++) { // once per each line
+ uint8 pix;
+ for (j = bpl; j < _w; j += 4) {
+ pix = bm[j];
+ if (_v && (pix != kPixelTransp)) {
+ if (j < _b[i]._skip)
+ _b[i]._skip = j;
+
+ if (j >= _b[i]._hide)
+ _b[i]._hide = j + 1;
+ }
+ if (((pix == kPixelTransp) != skip) || (cnt >= 0x3FF0)) { // end of block
+ cnt |= (skip) ? kBmpSKP : kBmpCPY;
+ if (_v)
+ WRITE_LE_UINT16(cp, cnt); // store block description uint16
+
+ cp = (uint16 *) im;
+ im += 2;
+ skip = (pix == kPixelTransp);
+ cnt = 0;
+ }
+ if (!skip) {
+ if (_v)
+ *im = pix;
+ im++;
+ }
+ cnt++;
+ }
+
+ bm += _w;
+ if (_w < kScrWidth) {
+ if (skip)
+ cnt += (kScrWidth - j + 3) / 4;
+ else {
+ cnt |= kBmpCPY;
+ if (_v)
+ WRITE_LE_UINT16(cp, cnt);
+
+ cp = (uint16 *) im;
+ im += 2;
+ skip = true;
+ cnt = (kScrWidth - j + 3) / 4;
+ }
+ }
+ }
+ if (cnt && ! skip) {
+ cnt |= kBmpCPY;
+ if (_v)
+ WRITE_LE_UINT16(cp, cnt);
+
+ cp = (uint16 *) im;
+ im += 2;
+ }
+ if (_v)
+ WRITE_LE_UINT16(cp, kBmpEOI);
+ cp = (uint16 *) im;
+ im += 2;
+ }
+ if (_v)
+ break;
+
+ uint16 sizV = (uint16)(im - 2 - _v);
+ _v = new uint8[sizV + _h * sizeof(*_b)];
+ _b = (HideDesc *)(_v + sizV);
+ }
+ cnt = 0;
+ for (uint i = 0; i < _h; i++) {
+ if (_b[i]._skip == 0xFFFF) { // whole line is skipped
+ _b[i]._skip = (cnt + kScrWidth) >> 2;
+ cnt = 0;
+ } else {
+ uint16 s = _b[i]._skip & ~3;
+ uint16 h = (_b[i]._hide + 3) & ~3;
+ _b[i]._skip = (cnt + s) >> 2;
+ _b[i]._hide = (h - s) >> 2;
+ cnt = kScrWidth - h;
+ }
+ }
+
+ return this;
+}
+
+bool Bitmap::solidAt(V2D pos) {
+ pos.x += _w >> 1;
+ pos.y = _h - pos.y;
+
+ if (!pos.limited(V2D(_vm, _w, _h)))
+ return false;
+
+ uint8 *m = _v;
+ uint16 r = static_cast<uint16>(pos.x) % 4;
+ uint16 n0 = (kScrWidth * pos.y + pos.x) / 4;
+ uint16 n = 0;
+
+ while (r) {
+ uint16 w, t;
+
+ w = READ_LE_UINT16(m);
+ m += 2;
+ t = w & 0xC000;
+ w &= 0x3FFF;
+
+ switch (t) {
+ case kBmpEOI:
+ r--;
+ // No break on purpose
+ case kBmpSKP:
+ w = 0;
+ break;
+ case kBmpREP:
+ w = 1;
+ break;
+ }
+ m += w;
+ }
+
+ while (true) {
+ uint16 w, t;
+
+ w = READ_LE_UINT16(m);
+ m += 2;
+ t = w & 0xC000;
+ w &= 0x3FFF;
+
+ if (n > n0)
+ return false;
+
+ n += w;
+ switch (t) {
+ case kBmpEOI:
+ return false;
+ case kBmpSKP:
+ w = 0;
+ break;
+ case kBmpREP:
+ case kBmpCPY:
+ if ((n - w <= n0) && (n > n0))
+ return true;
+ break;
+ }
+ m += ((t == kBmpREP) ? 1 : w);
+ }
+}
+
+bool Bitmap::loadVBM(EncryptedStream *f) {
+ uint16 p = 0, n = 0;
+ if (!f->err())
+ f->read((uint8 *)&p, sizeof(p));
+ p = FROM_LE_16(p);
+
+ if (!f->err())
+ f->read((uint8 *)&n, sizeof(n));
+ n = FROM_LE_16(n);
+
+ if (!f->err())
+ f->read((uint8 *)&_w, sizeof(_w));
+ _w = FROM_LE_16(_w);
+
+ if (!f->err())
+ f->read((uint8 *)&_h, sizeof(_h));
+ _h = FROM_LE_16(_h);
+
+ if (!f->err()) {
+ if (p) {
+ if (_vm->_bitmapPalette) {
+ // Read in the palette
+ byte palData[kPalSize];
+ f->read(palData, kPalSize);
+
+ const byte *srcP = palData;
+ for (int idx = 0; idx < kPalCount; idx++, srcP += 3) {
+ _vm->_bitmapPalette[idx]._r = *srcP;
+ _vm->_bitmapPalette[idx]._g = *(srcP + 1);
+ _vm->_bitmapPalette[idx]._b = *(srcP + 2);
+ }
+ } else
+ f->seek(f->pos() + kPalSize);
+ }
+ }
+ _v = new uint8[n];
+
+ if (!f->err())
+ f->read(_v, n);
+
+ _b = (HideDesc *)(_v + n - _h * sizeof(HideDesc));
+ return (!f->err());
+}
+
+void Bitmap::xLatPos(V2D& p) {
+ p.x -= (_w >> 1);
+ p.y = kWorldHeight - p.y - _h;
+}
+
+#define _ kPixelTransp,
+#define L 1,
+#define G 2,
+#define D 3,
+#define kDesignSize 240
+
+uint8 *Bitmap::makeSpeechBubbleTail(int which, uint8 colorSet[][4]) {
+ static const uint8 kSLDesign[kDesignSize] = {
+ G G G G G G G G G _ _ _ _ _ _
+ L G G G G G G G G D _ _ _ _ _
+ _ L G G G G G G G D _ _ _ _ _
+ _ _ L G G G G G G G D _ _ _ _
+ _ _ _ L G G G G G G D _ _ _ _
+ _ _ _ _ L G G G G G D _ _ _ _
+ _ _ _ _ _ L G G G G G D _ _ _
+ _ _ _ _ _ _ L G G G G D _ _ _
+ _ _ _ _ _ _ _ L G G G D _ _ _
+ _ _ _ _ _ _ _ _ L G G G D _ _
+ _ _ _ _ _ _ _ _ _ L G G D _ _
+ _ _ _ _ _ _ _ _ _ _ L G D _ _
+ _ _ _ _ _ _ _ _ _ _ _ L G D _
+ _ _ _ _ _ _ _ _ _ _ _ _ L D _
+ _ _ _ _ _ _ _ _ _ _ _ _ _ L D
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _ D
+ };
+
+ static const uint8 kSRDesign[kDesignSize] = {
+ _ _ _ _ _ _ G G G G G G G G G
+ _ _ _ _ _ L G G G G G G G G D
+ _ _ _ _ _ L G G G G G G G D _
+ _ _ _ _ L G G G G G G G D _ _
+ _ _ _ _ L G G G G G G D _ _ _
+ _ _ _ _ L G G G G G D _ _ _ _
+ _ _ _ L G G G G G D _ _ _ _ _
+ _ _ _ L G G G G D _ _ _ _ _ _
+ _ _ _ L G G G D _ _ _ _ _ _ _
+ _ _ L G G G D _ _ _ _ _ _ _ _
+ _ _ L G G D _ _ _ _ _ _ _ _ _
+ _ _ L G D _ _ _ _ _ _ _ _ _ _
+ _ L G D _ _ _ _ _ _ _ _ _ _ _
+ _ L D _ _ _ _ _ _ _ _ _ _ _ _
+ L D _ _ _ _ _ _ _ _ _ _ _ _ _
+ D _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ };
+
+ uint8 *des = new uint8[kDesignSize];
+ switch (which) {
+ case 0:
+ memcpy(des, kSLDesign, sizeof(kSLDesign));
+ break;
+ case 1:
+ memcpy(des, kSRDesign, sizeof(kSRDesign));
+ break;
+ default:
+ error("Wrong parameter in Bitmap::makeSpeechBubbleTail!");
+ break;
+ }
+
+ for (int i = 0; i < kDesignSize; i++) {
+ if ((des[i] >= 1) && (des[i] <= 3))
+ des[i] = colorSet[kCBSay][des[i]];
+ }
+
+ return des;
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/bitmap.h b/engines/cge2/bitmap.h
new file mode 100644
index 0000000000..613222fc6e
--- /dev/null
+++ b/engines/cge2/bitmap.h
@@ -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.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_BITMAP_H
+#define CGE2_BITMAP_H
+
+#include "cge2/general.h"
+#include "common/file.h"
+
+namespace CGE2 {
+
+class CGE2Engine;
+class EncryptedStream;
+class V2D;
+
+#define kMaxPath 128
+
+enum {
+ kBmpEOI = 0x0000,
+ kBmpSKP = 0x4000,
+ kBmpREP = 0x8000,
+ kBmpCPY = 0xC000
+};
+
+#include "common/pack-start.h"
+
+struct HideDesc {
+ uint16 _skip;
+ uint16 _hide;
+};
+
+#include "common/pack-end.h"
+
+class Bitmap {
+ CGE2Engine *_vm;
+
+ Common::String setExtension(const Common::String &str, const Common::String &ext);
+ bool loadVBM(EncryptedStream *f);
+public:
+ uint16 _w;
+ uint16 _h;
+ uint8 *_v;
+ int32 _map;
+ HideDesc *_b;
+
+ Bitmap();
+ Bitmap(CGE2Engine *vm, const char *fname);
+ Bitmap(CGE2Engine *vm, uint16 w, uint16 h, uint8 *map);
+ Bitmap(CGE2Engine *vm, uint16 w, uint16 h, uint8 fill);
+ Bitmap(CGE2Engine *vm, const Bitmap &bmp);
+ ~Bitmap();
+
+ void setVM(CGE2Engine *vm);
+ Bitmap *code(uint8 *map);
+ Bitmap &operator=(const Bitmap &bmp);
+ void release();
+ void hide(V2D pos);
+ void show(V2D pos);
+ bool solidAt(V2D pos);
+ void xLatPos(V2D &p);
+
+ static uint8 *makeSpeechBubbleTail(int des, uint8 colorSet[][4]);
+};
+
+
+typedef Bitmap *BitmapPtr;
+
+} // End of namespace CGE2
+
+#endif // CGE2_BITMAP_H
diff --git a/engines/cge2/cge2.cpp b/engines/cge2/cge2.cpp
new file mode 100644
index 0000000000..852b7afb22
--- /dev/null
+++ b/engines/cge2/cge2.cpp
@@ -0,0 +1,206 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "engines/util.h"
+#include "common/config-manager.h"
+#include "common/debug.h"
+#include "common/debug-channels.h"
+#include "cge2/cge2.h"
+#include "cge2/bitmap.h"
+#include "cge2/vga13h.h"
+#include "cge2/sound.h"
+#include "cge2/text.h"
+#include "cge2/hero.h"
+#include "cge2/general.h"
+#include "cge2/spare.h"
+#include "cge2/talk.h"
+#include "cge2/cge2_main.h"
+#include "cge2/map.h"
+
+namespace CGE2 {
+
+CGE2Engine::CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription)
+ : Engine(syst), _gameDescription(gameDescription), _randomSource("cge2") {
+
+ // Debug/console setup
+ DebugMan.addDebugChannel(kCGE2DebugOpcode, "opcode", "CGE2 opcode debug channel");
+
+ _resman = nullptr;
+ _vga = nullptr;
+ _midiPlayer = nullptr;
+ _fx = nullptr;
+ _sound = nullptr;
+ _text = nullptr;
+ for (int i = 0; i < 2; i++)
+ _heroTab[i] = nullptr;
+ _eye = nullptr;
+ for (int i = 0; i < kSceneMax; i++)
+ _eyeTab[i] = nullptr;
+ _spare = nullptr;
+ _commandHandler = nullptr;
+ _commandHandlerTurbo = nullptr;
+ _font = nullptr;
+ _infoLine = nullptr;
+ _mouse = nullptr;
+ _keyboard = nullptr;
+ _talk = nullptr;
+ for (int i = 0; i < kMaxPoint; i++)
+ _point[i] = nullptr;
+ _sys = nullptr;
+ _busyPtr = nullptr;
+ for (int i = 0; i < 2; i++)
+ _vol[i] = nullptr;
+ _eventManager = nullptr;
+ _map = nullptr;
+ _quitFlag = false;
+ _bitmapPalette = nullptr;
+ _gamePhase = kPhaseIntro;
+ _now = 1;
+ _sex = 1;
+ _mouseTop = kWorldHeight / 3;
+ _dark = false;
+ _lastFrame = 0;
+ _lastTick = 0;
+ _waitSeq = 0;
+ _waitRef = 0;
+ _soundStat._wait = nullptr;
+ _soundStat._ref[0] = 0;
+ _soundStat._ref[1] = 0;
+ _taken = false;
+ _endGame = false;
+ _req = 1;
+ _midiNotify = nullptr;
+ _spriteNotify = nullptr;
+ _startGameSlot = 0;
+
+ _sayCap = ConfMan.getBool("subtitles");
+ _sayVox = !ConfMan.getBool("speech_mute");
+ _muteAll = ConfMan.getBool("mute");
+ if (_muteAll) {
+ _oldMusicVolume = _oldSfxVolume = 0;
+ _music = _sayVox = false;
+ } else {
+ _oldMusicVolume = ConfMan.getInt("music_volume");
+ _oldSfxVolume = ConfMan.getInt("sfx_volume");
+ _music = _oldMusicVolume != 0;
+ }
+}
+
+void CGE2Engine::init() {
+ // Create debugger console
+ _console = new CGE2Console(this);
+ _resman = new ResourceManager();
+ _vga = new Vga(this);
+ _fx = new Fx(this, 16);
+ _sound = new Sound(this);
+ _midiPlayer = new MusicPlayer(this);
+ _text = new Text(this, "CGE");
+
+ for (int i = 0; i < 2; i++)
+ _heroTab[i] = new HeroTab(this);
+
+ _eye = new V3D();
+ for (int i = 0; i < kSceneMax; i++)
+ _eyeTab[i] = new V3D();
+
+ _spare = new Spare(this);
+ _commandHandler = new CommandHandler(this, false);
+ _commandHandlerTurbo = new CommandHandler(this, true);
+ _font = new Font(this);
+ _infoLine = new InfoLine(this, kInfoW);
+ _mouse = new Mouse(this);
+ _keyboard = new Keyboard(this);
+
+ for (int i = 0; i < kMaxPoint; i++)
+ _point[i] = new V3D();
+
+ _sys = new System(this);
+ _eventManager = new EventManager(this);
+ _map = new Map(this);
+ _startGameSlot = ConfMan.hasKey("save_slot") ? ConfMan.getInt("save_slot") : -1;
+}
+
+void CGE2Engine::deinit() {
+ // Remove all of our debug levels here
+ DebugMan.clearAllDebugChannels();
+
+ delete _console;
+
+ delete _spare;
+ delete _resman;
+ delete _vga;
+ delete _fx;
+ delete _sound;
+ delete _midiPlayer;
+ delete _text;
+
+ for (int i = 0; i < 2; i++)
+ delete _heroTab[i];
+
+ for (int i = 0; i < kSceneMax; i++)
+ delete _eyeTab[i];
+
+ delete _eye;
+ delete _commandHandler;
+ delete _commandHandlerTurbo;
+ delete _font;
+ delete _infoLine;
+ delete _mouse;
+ delete _keyboard;
+
+ if (_talk != nullptr)
+ delete _talk;
+
+ for (int i = 0; i < kMaxPoint; i++)
+ delete _point[i];
+
+ delete _sys;
+ delete _eventManager;
+ delete _map;
+}
+
+bool CGE2Engine::hasFeature(EngineFeature f) const {
+ return (f == kSupportsLoadingDuringRuntime) || (f == kSupportsSavingDuringRuntime)
+ || (f == kSupportsRTL);
+}
+
+Common::Error CGE2Engine::run() {
+ syncSoundSettings();
+ initGraphics(kScrWidth, kScrHeight, false);
+
+ init();
+ cge2_main();
+ deinit();
+
+ ConfMan.setBool("subtitles", _sayCap);
+ ConfMan.setBool("speech_mute", !_sayVox);
+ ConfMan.flushToDisk();
+
+ return Common::kNoError;
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/cge2.h b/engines/cge2/cge2.h
new file mode 100644
index 0000000000..1f1cb17b48
--- /dev/null
+++ b/engines/cge2/cge2.h
@@ -0,0 +1,341 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_H
+#define CGE2_H
+
+#include "common/random.h"
+#include "common/savefile.h"
+#include "common/serializer.h"
+#include "engines/engine.h"
+#include "engines/advancedDetector.h"
+#include "common/system.h"
+#include "cge2/fileio.h"
+#include "cge2/console.h"
+#include "audio/mixer.h"
+
+namespace CGE2 {
+
+class Vga;
+class Sprite;
+class MusicPlayer;
+class Fx;
+class Sound;
+class Text;
+struct HeroTab;
+class FXP;
+class V3D;
+class V2D;
+struct Dac;
+class Spare;
+class CommandHandler;
+class InfoLine;
+class Mouse;
+class Keyboard;
+class Talk;
+class Hero;
+class Bitmap;
+class System;
+class EventManager;
+class Font;
+class Map;
+struct SavegameHeader;
+
+#define kScrWidth 320
+#define kScrHeight 240
+#define kScrDepth 480
+#define kPanHeight 40
+#define kWorldHeight (kScrHeight - kPanHeight)
+#define kMaxFile 128
+#define kPathMax 128
+#define kDimMax 8
+#define kWayMax 10
+#define kPocketMax 4
+#define kSceneMax 100
+#define kMaxPoint 4
+#define kInfoX 160
+#define kInfoY -11
+#define kInfoW 180
+#define kPocketsWidth 59
+#define kLineMax 512
+
+#define kIntroExt ".I80"
+#define kTabName "CGE.TAB"
+#define kPocketFull 170
+#define kGameFrameDelay (750 / 50)
+#define kGameTickDelay (750 / 62)
+
+#define kMusicRef 122
+#define kPowerRef 123
+#define kDvolRef 124
+#define kMvolRef 125
+#define kRef 126
+#define kBusyRef 127
+#define kCapRef 128
+#define kVoxRef 129
+
+#define kOffUseCount 130
+#define kOffUseText 131
+
+#define kSysTimeRate 6 // 12 Hz
+#define kBlinkRate 4 // 3 Hz
+
+#define kQuitTitle 200
+#define kQuitText 201
+#define kNoQuitText 202
+
+#define kSavegameVersion 1
+#define kSavegameStrSize 12
+#define kSavegameStr "SCUMMVM_CGE2"
+
+#define kColorNum 6
+
+struct SavegameHeader {
+ uint8 version;
+ Common::String saveName;
+ Graphics::Surface *thumbnail;
+ int saveYear, saveMonth, saveDay;
+ int saveHour, saveMinutes;
+};
+
+enum ColorBank { kCBRel, kCBStd, kCBSay, kCBInf, kCBMnu, kCBWar };
+
+enum GamePhase { kPhaseInGame, kPhaseIntro, kPhaseOver };
+
+// our engine debug channels
+enum {
+ kCGE2DebugOpcode = 1 << 0
+};
+
+enum CallbackType {
+ kNullCB = 0, kQGame, kXScene
+};
+
+enum Action { kNear, kMTake, kFTake, kActions };
+
+typedef void (CGE2Engine::*NotifyFunctionType)();
+
+class CGE2Engine : public Engine {
+private:
+ uint32 _lastFrame, _lastTick;
+ void tick();
+
+ CGE2Console *_console;
+ void init();
+ void deinit();
+
+ Common::String generateSaveName(int slot);
+ void writeSavegameHeader(Common::OutSaveFile *out, SavegameHeader &header);
+ void saveGame(int slotNumber, const Common::String &desc);
+ bool loadGame(int slotNumber);
+ void syncHeader(Common::Serializer &s);
+ void syncGame(Common::SeekableReadStream *readStream, Common::WriteStream *writeStream);
+ void resetGame();
+public:
+ CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription);
+ virtual bool hasFeature(EngineFeature f) const;
+ virtual bool canSaveGameStateCurrently();
+ virtual bool canLoadGameStateCurrently();
+ virtual Common::Error saveGameState(int slot, const Common::String &desc);
+ virtual Common::Error loadGameState(int slot);
+ virtual Common::Error run();
+
+ static bool readSavegameHeader(Common::InSaveFile *in, SavegameHeader &header);
+
+ GUI::Debugger *getDebugger() {
+ return _console;
+ }
+
+ bool showTitle(const char *name);
+ void cge2_main();
+ char *mergeExt(char *buf, const char *name, const char *ext);
+ void inf(const char *text, ColorBank col = kCBInf);
+ void movie(const char *ext);
+ void runGame();
+ void loadHeroes();
+ void loadScript(const char *fname, bool onlyToolbar = false);
+ Sprite *loadSprite(const char *fname, int ref, int scene, V3D &pos);
+ void badLab(const char *fn);
+ void sceneUp(int cav);
+ void sceneDown();
+ void closePocket();
+ void switchScene(int scene);
+ void storeHeroPos();
+ void showBak(int ref);
+ void loadTab();
+ int newRandom(int range);
+ void openPocket();
+ void selectPocket(int n);
+ void busy(bool on);
+ void feedSnail(Sprite *spr, Action snq, Hero *hero);
+ int freePockets(int sx);
+ int findActivePocket(int ref);
+ void pocFul();
+ void killText();
+ void mainLoop();
+ void handleFrame();
+ Sprite *locate(int ref);
+ bool isHero(Sprite *spr);
+ void loadUser();
+ void loadPos();
+ void releasePocket(Sprite *spr);
+ void switchHero(int sex);
+ void offUse();
+ void setAutoColors();
+ bool cross(const V2D &a, const V2D &b, const V2D &c, const V2D &d);
+ bool contain(const V2D &a, const V2D &b, const V2D &p);
+ long det(const V2D &a, const V2D &b, const V2D &c);
+ int sgn(long n);
+ int mapCross(const V2D &a, const V2D &b);
+ Sprite *spriteAt(V2D pos);
+ void keyClick();
+ void swapInPocket(Sprite *spr, Sprite *xspr);
+ void busyStep();
+
+ void optionTouch(int opt, uint16 mask);
+ void switchColorMode();
+ void switchMusic();
+ void quit();
+ void setVolume(int idx, int cnt);
+ void checkVolumeSwitches();
+ void switchCap();
+ void switchVox();
+ void switchSay();
+ void initToolbar();
+ void initVolumeSwitch(Sprite *volSwitch, int val);
+ void checkMute();
+
+ void checkSounds();
+
+ void setEye(const V3D &e);
+ void setEye(const V2D& e2, int z = -kScrWidth);
+ void setEye(const char *s);
+
+ int number(char *s);
+ char *token(char *s);
+ char *tail(char *s);
+ int takeEnum(const char **tab, const char *text);
+ ID ident(const char *s);
+ bool testBool(char *s);
+
+ void snKill(Sprite *spr);
+ void snHide(Sprite *spr, int val);
+ void snMidi(int val);
+ void snSeq(Sprite *spr, int val);
+ void snRSeq(Sprite *spr, int val);
+ void snSend(Sprite *spr, int val);
+ void snSwap(Sprite *spr, int val);
+ void snCover(Sprite *spr, int val);
+ void snUncover(Sprite *spr, Sprite *spr2);
+ void snKeep(Sprite *spr, int val);
+ void snGive(Sprite *spr, int val);
+ void snGoto(Sprite *spr, int val);
+ void snPort(Sprite *spr, int port);
+ void snMouse(bool on);
+ void snNNext(Sprite *spr, Action act, int val);
+ void snRNNext(Sprite *spr, int val);
+ void snRMTNext(Sprite *spr, int val);
+ void snRFTNext(Sprite *spr, int val);
+ void snRmNear(Sprite *spr);
+ void snRmMTake(Sprite *spr);
+ void snRmFTake(Sprite *spr);
+ void snSetRef(Sprite *spr, int val);
+ void snFlash(bool on);
+ void snCycle(int cnt);
+ void snWalk(Sprite *spr, int val);
+ void snReach(Sprite *spr, int val);
+ void snSound(Sprite *spr, int wav, Audio::Mixer::SoundType soundType = Audio::Mixer::kSFXSoundType);
+ void snRoom(Sprite *spr, bool on);
+ void snGhost(Bitmap *bmp);
+ void snSay(Sprite *spr, int val);
+
+ void hide1(Sprite *spr);
+ Sprite *expandSprite(Sprite *spr);
+ void qGame();
+ void xScene();
+
+ const ADGameDescription *_gameDescription;
+
+ Common::RandomSource _randomSource;
+
+ bool _quitFlag;
+ Dac *_bitmapPalette;
+ GamePhase _gamePhase; // Original name: startupmode
+ int _now;
+ int _sex;
+ int _mouseTop;
+ bool _dark;
+ int _waitSeq;
+ int _waitRef;
+
+ struct {
+ int *_wait;
+ int _ref[2];
+ } _soundStat;
+
+ bool _taken;
+ bool _endGame;
+ int _req;
+ NotifyFunctionType _midiNotify;
+ NotifyFunctionType _spriteNotify;
+ int _startGameSlot;
+
+ bool _sayCap;
+ bool _sayVox;
+ int _oldMusicVolume;
+ int _oldSfxVolume;
+ bool _music;
+ bool _muteAll;
+
+ ResourceManager *_resman;
+ Vga *_vga;
+ MusicPlayer *_midiPlayer;
+ Fx *_fx;
+ Sound *_sound;
+ Text *_text;
+ HeroTab *_heroTab[2];
+ V3D *_eye;
+ V3D *_eyeTab[kSceneMax];
+ Spare *_spare;
+ CommandHandler *_commandHandler;
+ CommandHandler *_commandHandlerTurbo;
+ Font *_font;
+ InfoLine *_infoLine;
+ Mouse *_mouse;
+ Keyboard *_keyboard;
+ Talk *_talk;
+ V3D *_point[kMaxPoint];
+ System *_sys;
+ Sprite *_busyPtr;
+ Sprite *_vol[2];
+ EventManager *_eventManager;
+ Map *_map;
+};
+
+} // End of namespace CGE2
+
+#endif // CGE2_H
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp
new file mode 100644
index 0000000000..1057b00089
--- /dev/null
+++ b/engines/cge2/cge2_main.cpp
@@ -0,0 +1,960 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "sound.h"
+#include "cge2/cge2_main.h"
+#include "cge2/cge2.h"
+#include "cge2/vga13h.h"
+#include "cge2/text.h"
+#include "cge2/snail.h"
+#include "cge2/hero.h"
+#include "cge2/spare.h"
+#include "cge2/map.h"
+
+namespace CGE2 {
+
+System::System(CGE2Engine *vm) : Sprite(vm), _vm(vm) {
+ _blinkCounter = 0;
+ _blinkSprite = nullptr;
+ tick();
+}
+
+void System::touch(uint16 mask, V2D pos, Common::KeyCode keyCode) {
+ if (mask & kEventKeyb) {
+ if (keyCode == Common::KEYCODE_ESCAPE) {
+ // The original was calling keyClick()
+ // The sound is uselessly annoying and noisy, so it has been removed
+ _vm->killText();
+ if (_vm->_gamePhase == kPhaseIntro) {
+ _vm->_commandHandler->addCommand(kCmdClear, -1, 0, nullptr);
+ return;
+ }
+ }
+ } else {
+ if (_vm->_gamePhase != kPhaseInGame)
+ return;
+ _vm->_infoLine->setText(nullptr);
+
+ if (mask & kMouseLeftUp) {
+ if (pos.y >= 0) { // world
+ if (!_vm->_talk && pos.y < _vm->_mouseTop)
+ _vm->_heroTab[_vm->_sex]->_ptr->walkTo(pos);
+ } else { // panel
+ if (_vm->_commandHandler->idle()) {
+ int sex = pos.x < kPocketsWidth;
+ if (sex || pos.x >= kScrWidth - kPocketsWidth) {
+ _vm->switchHero(sex);
+ if (_vm->_sex == sex) {
+ int dx = kPocketsWidth >> 1,
+ dy = 1 - (kPanHeight >> 1);
+ Sprite *s;
+ if (!sex)
+ pos.x -= kScrWidth - kPocketsWidth;
+ dx -= pos.x;
+ dy -= pos.y;
+ if (dx * dx + dy * dy > 10 * 10) {
+ int n = 0;
+ if (1 - pos.y >= (kPanHeight >> 1))
+ n += 2;
+ if (pos.x >= (kPocketsWidth >> 1))
+ ++n;
+ s = _vm->_heroTab[_vm->_sex]->_pocket[n];
+ if (_vm->_sys->_blinkSprite)
+ _vm->_sys->_blinkSprite->_flags._hide = false;
+ if (_vm->_sys->_blinkSprite == s)
+ _vm->_sys->_blinkSprite = nullptr;
+ else
+ _vm->_sys->_blinkSprite = s;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void System::tick() {
+ _time = kSysTimeRate;
+
+ if (_blinkCounter)
+ --_blinkCounter;
+ else {
+ if (_blinkSprite)
+ _blinkSprite->_flags._hide ^= 1;
+ _blinkCounter = kBlinkRate;
+ }
+}
+
+int CGE2Engine::number(char *str) {
+ char *s = token(str);
+ if (s == nullptr)
+ error("Wrong input for CGE2Engine::number()");
+ int r = atoi(s);
+ char *pp = strchr(s, ':');
+ if (pp)
+ r = (r << 8) + atoi(pp + 1);
+ return r;
+}
+
+char *CGE2Engine::token(char *s) {
+ return strtok(s, " =\t,;/()");
+}
+
+char *CGE2Engine::tail(char *s) {
+ if (s && (*s == '='))
+ s++;
+ return s;
+}
+
+int CGE2Engine::takeEnum(const char **tab, const char *text) {
+ if (text) {
+ for (const char **e = tab; *e; e++) {
+ if (scumm_stricmp(text, *e) == 0)
+ return e - tab;
+ }
+ }
+ return -1;
+}
+
+ID CGE2Engine::ident(const char *s) {
+ return ID(takeEnum(EncryptedStream::kIdTab, s));
+}
+
+bool CGE2Engine::testBool(char *s) {
+ return number(s) != 0;
+}
+
+void CGE2Engine::badLab(const char *fn) {
+ error("Misplaced label in %s!", fn);
+}
+
+Sprite *CGE2Engine::loadSprite(const char *fname, int ref, int scene, V3D &pos) {
+ int shpcnt = 0;
+ int seqcnt = 0;
+ int cnt[kActions];
+
+ for (int i = 0; i < kActions; i++)
+ cnt[i] = 0;
+
+ ID section = kIdPhase;
+ bool frnt = true;
+ bool east = false;
+ bool port = false;
+ bool tran = false;
+ Hero *h;
+ ID id;
+
+ char tmpStr[kLineMax + 1];
+ mergeExt(tmpStr, fname, kSprExt);
+
+ if (_resman->exist(tmpStr)) { // sprite description file exist
+ EncryptedStream sprf(this, tmpStr);
+ if (sprf.err())
+ error("Bad SPR [%s]", tmpStr);
+
+ int label = kNoByte;
+ Common::String line;
+
+ for (line = sprf.readLine(); !sprf.eos(); line = sprf.readLine()){
+ if (line.empty())
+ continue;
+ Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
+
+ char *p = token(tmpStr);
+ if (*p == '@') {
+ if (label != kNoByte)
+ badLab(fname);
+ label = atoi(p + 1);
+ continue;
+ }
+
+ id = ident(p);
+ switch (id) {
+ case kIdName: // will be taken in Expand routine
+ if (label != kNoByte)
+ badLab(fname);
+ break;
+ case kIdType:
+ if (label != kNoByte)
+ badLab(fname);
+ break;
+ case kIdNear:
+ case kIdMTake:
+ case kIdFTake:
+ case kIdPhase:
+ case kIdSeq:
+ if (label != kNoByte)
+ badLab(fname);
+ section = id;
+ break;
+ case kIdFront:
+ if (label != kNoByte)
+ badLab(fname);
+ p = token(nullptr);
+ frnt = testBool(p);
+ break;
+ case kIdEast:
+ if (label != kNoByte)
+ badLab(fname);
+ p = token(nullptr);
+ east = testBool(p);
+ break;
+ case kIdPortable:
+ if (label != kNoByte)
+ badLab(fname);
+ p = token(nullptr);
+ port = testBool(p);
+ break;
+ case kIdTransparent:
+ if (label != kNoByte)
+ badLab(fname);
+ p = token(nullptr);
+ tran = testBool(p);
+ break;
+ default:
+ if (id >= kIdNear)
+ break;
+ switch (section) {
+ case kIdNear:
+ case kIdMTake:
+ case kIdFTake:
+ if (_commandHandler->getComId(p) >= 0)
+ ++cnt[section];
+ else
+ error("Bad line %d [%s]", sprf.getLineCount(), tmpStr);
+ break;
+ case kIdPhase:
+ if (label != kNoByte)
+ badLab(fname);
+ ++shpcnt;
+ break;
+ case kIdSeq:
+ if (label != kNoByte)
+ badLab(fname);
+ ++seqcnt;
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+ label = kNoByte;
+ }
+
+ if (!shpcnt)
+ error("No shapes - %s", fname);
+ } else // No sprite description: mono-shaped sprite with only .BMP file.
+ ++shpcnt;
+
+ // Make sprite of chosen type:
+ Sprite *sprite = nullptr;
+ char c = *fname | 0x20;
+ if (c >= 'a' && c <= 'z' && fname[1] == '0' && fname[2] == '\0') {
+ h = new Hero(this);
+ h->gotoxyz(pos);
+ sprite = h;
+ } else {
+ sprite = new Sprite(this);
+ sprite->gotoxyz(pos);
+ }
+
+ if (sprite) {
+ sprite->_ref = ref;
+ sprite->_scene = scene;
+
+ sprite->_flags._frnt = frnt;
+ sprite->_flags._east = east;
+ sprite->_flags._port = port;
+ sprite->_flags._tran = tran;
+ sprite->_flags._kill = true;
+
+ // Extract the filename, without the extension
+ Common::strlcpy(sprite->_file, fname, sizeof(sprite->_file));
+ char *p = strchr(sprite->_file, '.');
+ if (p)
+ *p = '\0';
+
+ sprite->_shpCnt = shpcnt;
+ sprite->_seqCnt = seqcnt;
+
+ for (int i = 0; i < kActions; i++)
+ sprite->_actionCtrl[i]._cnt = cnt[i];
+ }
+
+ return sprite;
+}
+
+void CGE2Engine::loadScript(const char *fname, bool onlyToolbar) {
+ EncryptedStream scrf(this, fname);
+
+ if (scrf.err())
+ return;
+
+ bool ok = true;
+ int lcnt = 0;
+
+ char tmpStr[kLineMax + 1];
+ Common::String line;
+
+ for (line = scrf.readLine(); !scrf.eos(); line = scrf.readLine()) {
+ if (line.empty())
+ continue;
+
+ lcnt++;
+ Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
+
+ ok = false; // not OK if break
+
+ V3D P;
+
+ // sprite ident number
+ int SpI = number(tmpStr);
+
+ if (onlyToolbar && SpI >= 141)
+ return;
+
+ // sprite file name
+ char *SpN;
+ if ((SpN = token(nullptr)) == nullptr)
+ break;
+
+ // sprite scene
+ int SpA = number(nullptr);
+
+ // sprite column
+ P._x = number(nullptr);
+
+ // sprite row
+ P._y = number(nullptr);
+
+ // sprite Z pos
+ P._z = number(nullptr);
+
+ // sprite life
+ bool BkG = number(nullptr) == 0;
+
+ ok = true; // no break: OK
+
+ Sprite *sprite = loadSprite(SpN, SpI, SpA, P);
+ if (sprite) {
+ if (BkG)
+ sprite->_flags._back = true;
+
+ int n = _spare->count();
+ if (_spare->locate(sprite->_ref) == nullptr)
+ _spare->dispose(sprite);
+ else
+ delete sprite;
+
+ if (_spare->count() == n)
+ error("Duplicate reference! %s", SpN);
+ }
+ }
+
+ if (!ok)
+ error("Bad INI line %d [%s]", scrf.getLineCount(), fname);
+}
+
+void CGE2Engine::movie(const char *ext) {
+ assert(ext);
+
+ if (_quitFlag)
+ return;
+
+ char fn[12];
+ snprintf(fn, 12, "CGE%s", ext);
+
+ if (_resman->exist(fn)) {
+ int now = _now;
+ _now = atoi(ext + 2);
+ loadScript(fn);
+ sceneUp(_now);
+ _keyboard->setClient(_sys);
+
+ while (!_commandHandler->idle() && !_quitFlag)
+ mainLoop();
+
+ _keyboard->setClient(nullptr);
+ _commandHandler->addCommand(kCmdClear, -1, 0, nullptr);
+ _commandHandlerTurbo->addCommand(kCmdClear, -1, 0, nullptr);
+ _spare->clear();
+ _vga->_showQ->clear();
+ _now = now;
+ }
+}
+
+void CGE2Engine::sceneUp(int cav) {
+ _now = cav;
+ int bakRef = _now << 8;
+ if (_music)
+ _midiPlayer->loadMidi(bakRef);
+ showBak(bakRef);
+ *_eye = *(_eyeTab[_now]);
+ _mouseTop = V2D(this, V3D(0, 1, kScrDepth)).y;
+ _map->load(_now);
+ _spare->takeScene(_now);
+ openPocket();
+
+ for (int i = 0; i < 2; i++) {
+ Hero *h = _heroTab[i]->_ptr;
+ if (h && h->_scene == _now) {
+ V2D p = *_heroTab[i]->_posTab[_now];
+ h->gotoxyz(V3D(p.x, 0, p.y));
+ h->clrHide();
+ _vga->_showQ->insert(h);
+ h->park();
+ h->setCurrent();
+ h->setContact();
+ }
+ }
+
+ _sound->stop();
+ _fx->clear();
+
+ selectPocket(-1);
+ _infoLine->setText(nullptr);
+ busy(false);
+
+ if (!_dark)
+ _vga->sunset();
+
+ _vga->show();
+ _vga->copyPage(1, 0);
+ _vga->show();
+ _vga->sunrise(_vga->_sysPal);
+
+ _dark = false;
+
+ if (_gamePhase == kPhaseInGame)
+ _mouse->on();
+
+ feedSnail(_vga->_showQ->locate(bakRef + 255), kNear, _heroTab[_sex]->_ptr);
+}
+
+void CGE2Engine::sceneDown() {
+ busy(true);
+ _soundStat._wait = nullptr; // unlock snail
+ Sprite *spr = _vga->_showQ->locate((_now << 8) | 254);
+
+ if (spr)
+ feedSnail(spr, kNear, _heroTab[_sex]->_ptr);
+
+ while (!(_commandHandler->idle() && _commandHandlerTurbo->idle())) {
+ _commandHandlerTurbo->runCommand();
+ _commandHandler->runCommand();
+ }
+
+ closePocket();
+ for (int i = 0; i < 2; i++)
+ _spare->update(_vga->_showQ->remove(_heroTab[i]->_ptr));
+ _spare->dispose();
+}
+
+void CGE2Engine::switchScene(int scene) {
+ if (scene == _now)
+ return;
+
+ _req = scene;
+ storeHeroPos();
+ *(_eyeTab[_now]) = *_eye;
+
+ if (scene < 0)
+ _commandHandler->addCallback(kCmdExec, -1, 0, kQGame); // quit game
+ else {
+ if (_heroTab[_sex]->_ptr->_scene == _now) {
+ _heroTab[_sex]->_ptr->setScene(scene);
+ if (_heroTab[!_sex]->_ptr->_scene == _now)
+ _heroTab[!_sex]->_ptr->setScene(scene);
+ }
+ _mouse->off();
+ if (_heroTab[_sex]->_ptr)
+ _heroTab[_sex]->_ptr->park();
+ killText();
+ _commandHandler->addCallback(kCmdExec, -1, 0, kXScene); // switch scene
+ }
+}
+
+void CGE2Engine::storeHeroPos() {
+ for (int i = 0; i < 2; i++) {
+ Hero *h = _heroTab[i]->_ptr;
+ if (h->_scene == _now) {
+ delete _heroTab[i]->_posTab[_now];
+ V2D *temp = new V2D(this, h->_pos3D._x.trunc(), h->_pos3D._z.trunc());
+ _heroTab[i]->_posTab[_now] = temp;
+ }
+ }
+}
+
+void CGE2Engine::showBak(int ref) {
+ Sprite *spr = _spare->locate(ref);
+ if (spr != nullptr) {
+ _bitmapPalette = _vga->_sysPal;
+ spr->expand();
+ _bitmapPalette = nullptr;
+ spr->show(2);
+ _vga->copyPage(1, 2);
+ }
+}
+
+void CGE2Engine::mainLoop() {
+ if (_gamePhase == kPhaseInGame)
+ checkSounds();
+
+ _vga->show();
+ _commandHandlerTurbo->runCommand();
+ _commandHandler->runCommand();
+
+ // Handle a delay between game frames
+ handleFrame();
+
+ // Handle any pending events
+ _eventManager->poll();
+
+ // Check shouldQuit()
+ _quitFlag = shouldQuit();
+}
+
+void CGE2Engine::checkSounds() {
+ checkMute();
+ _sound->checkSoundHandles();
+ checkVolumeSwitches();
+ _midiPlayer->syncVolume();
+ syncSoundSettings();
+}
+
+void CGE2Engine::handleFrame() {
+ // Game frame delay
+ uint32 millis = g_system->getMillis();
+ while (!_quitFlag && (millis < (_lastFrame + kGameFrameDelay))) {
+ // Handle any pending events
+ _eventManager->poll();
+
+ if (millis >= (_lastTick + kGameTickDelay)) {
+ // Dispatch the tick to any active objects
+ tick();
+ _lastTick = millis;
+ }
+
+ // Slight delay
+ g_system->delayMillis(5);
+ millis = g_system->getMillis();
+ }
+ _lastFrame = millis;
+
+ if (millis >= (_lastTick + kGameTickDelay)) {
+ // Dispatch the tick to any active objects
+ tick();
+ _lastTick = millis;
+ }
+}
+
+Sprite *CGE2Engine::locate(int ref) {
+ _taken = false;
+ Sprite *spr = _vga->_showQ->locate(ref);
+ if (!spr) {
+ spr = _spare->locate(ref);
+ if (spr)
+ _taken = true;
+ }
+ return spr;
+}
+
+bool CGE2Engine::isHero(Sprite *spr) {
+ return spr && spr->_ref / 10 == 14;
+}
+
+void CGE2Engine::tick() {
+ // system pseudo-sprite
+ if (_sys && _sys->_time && (--_sys->_time == 0))
+ _sys->tick();
+
+ for (Sprite *spr = _vga->_showQ->first(); spr; spr = spr->_next) {
+ if (spr->_time && (--spr->_time == 0))
+ spr->tick();
+
+ if (_waitRef && (_waitRef == spr->_ref) && spr->seqTest(_waitSeq))
+ _waitRef = 0;
+ }
+
+ _mouse->tick();
+}
+
+void CGE2Engine::busy(bool on) {
+ if (on) {
+ _spriteNotify = _midiNotify = &CGE2::CGE2Engine::busyStep;
+ busyStep();
+ } else {
+ if (_busyPtr)
+ _busyPtr->step(0);
+ _spriteNotify = _midiNotify = nullptr;
+ }
+}
+
+void CGE2Engine::busyStep() {
+ if (_busyPtr) {
+ _busyPtr->step((_busyPtr->_seqPtr) ? -1 : 1);
+ _busyPtr->show(0);
+ }
+}
+
+void CGE2Engine::runGame() {
+ if (_quitFlag)
+ return;
+
+ loadUser();
+ sceneUp(_now);
+ initToolbar();
+
+ // main loop
+ while (!_endGame && !_quitFlag)
+ mainLoop();
+
+ // If leaving the game (close window, return to launcher, etc.
+ // - except finishing the game), explicitly save it's state:
+ if (!_endGame && canSaveGameStateCurrently())
+ qGame();
+
+ _keyboard->setClient(nullptr);
+ _commandHandler->addCommand(kCmdClear, -1, 0, nullptr);
+ _commandHandlerTurbo->addCommand(kCmdClear, -1, 0, nullptr);
+ _mouse->off();
+}
+
+void CGE2Engine::loadUser() {
+ loadPos();
+
+ if (_startGameSlot != -1)
+ loadGame(_startGameSlot);
+ else {
+ loadScript("CGE.INI");
+ loadHeroes();
+ }
+}
+
+void CGE2Engine::loadHeroes() { // Original name: loadGame()
+ // load sprites & pocket
+
+ Sprite *s;
+ Hero *h = nullptr;
+
+ // initialize Andzia/Anna
+ s = _spare->take(142);
+ if (s) {
+ h = new Hero(this);
+ *(Sprite*)h = *s;
+ delete s;
+ h->expand();
+ _spare->update(h);
+ }
+ _heroTab[0]->_ptr = h;
+ s = _spare->locate(152);
+ _vga->_showQ->insert(s);
+ _heroTab[0]->_face = s;
+
+ // initialize Wacek/Vincent
+ s = _spare->take(141);
+ if (s) {
+ h = new Hero(this);
+ *(Sprite*)h = *s;
+ delete s;
+ h->expand();
+ _spare->update(h);
+ }
+ _heroTab[1]->_ptr = h;
+ s = _spare->locate(151);
+ _vga->_showQ->insert(s);
+ _heroTab[1]->_face = s;
+
+ //--- start!
+ switchHero(_sex);
+}
+
+void CGE2Engine::loadPos() {
+ if (_resman->exist("CGE.HXY")) {
+ for (int cav = 0; cav < kSceneMax; cav++)
+ _heroTab[1]->_posTab[cav] = new V2D(this, 180, 10);
+
+ EncryptedStream file(this, "CGE.HXY");
+
+ for (int cav = 0; cav < kSceneMax; cav++) {
+ _heroTab[0]->_posTab[cav] = new V2D(this);
+ _heroTab[0]->_posTab[cav]->x = file.readSint16LE();
+ _heroTab[0]->_posTab[cav]->y = file.readSint16LE();
+ }
+
+ for (int cav = 0; cav < 41; cav++) { // (564 - 400) / 4 = 41
+ _heroTab[1]->_posTab[cav]->x = file.readSint16LE();
+ _heroTab[1]->_posTab[cav]->y = file.readSint16LE();
+ }
+ } else
+ error("Missing file: CGE.HXY");
+}
+
+void CGE2Engine::loadTab() {
+ setEye(_text->getText(240));
+ for (int i = 0; i < kSceneMax; i++)
+ *(_eyeTab[i]) = *_eye;
+
+ if (_resman->exist(kTabName)) {
+ EncryptedStream f(this, kTabName);
+ uint32 v;
+
+ for (int i = 0; i < kSceneMax; i++) {
+ v = f.readUint32LE();
+ _eyeTab[i]->_x = FXP(v >> 8, static_cast<int>((int8)(v & 0xff)));
+
+ v = f.readUint32LE();
+ _eyeTab[i]->_y = FXP(v >> 8, static_cast<int>((int8)(v & 0xff)));
+
+ v = f.readUint32LE();
+ _eyeTab[i]->_z = FXP(v >> 8, static_cast<int>((int8)(v & 0xff)));
+ }
+ }
+}
+
+void CGE2Engine::cge2_main() {
+ loadTab();
+
+ if (_startGameSlot != -1) {
+ // Starting up a savegame from the launcher
+ runGame();
+ return;
+ }
+
+ if (showTitle("WELCOME")) {
+ movie(kIntroExt);
+
+ if (_text->getText(255) != nullptr) {
+ runGame();
+ _gamePhase = kPhaseOver;
+ }
+
+ _vga->sunset();
+ } else
+ _vga->sunset();
+}
+
+char *CGE2Engine::mergeExt(char *buf, const char *name, const char *ext) {
+ strcpy(buf, name);
+ char *dot = strrchr(buf, '.');
+ if (!dot)
+ strcat(buf, ext);
+
+ return buf;
+}
+
+void CGE2Engine::setEye(const V3D &e) {
+ *_eye = e;
+}
+
+void CGE2Engine::setEye(const V2D& e2, int z) {
+ _eye->_x = e2.x;
+ _eye->_y = e2.y;
+ _eye->_z = z;
+}
+
+void CGE2Engine::setEye(const char *s) {
+ char *tempStr = new char[strlen(s) + 1];
+ strcpy(tempStr, s);
+ _eye->_x = atoi(token(tempStr));
+ _eye->_y = atoi(token(nullptr));
+ _eye->_z = atoi(token(nullptr));
+ delete[] tempStr;
+}
+
+int CGE2Engine::newRandom(int range) {
+ if (!range)
+ return 0;
+
+ return _randomSource.getRandomNumber(range - 1);
+}
+
+bool CGE2Engine::showTitle(const char *name) {
+ if (_quitFlag)
+ return false;
+
+ _bitmapPalette = _vga->_sysPal;
+ BitmapPtr LB = new Bitmap[1];
+ LB[0] = Bitmap(this, name);
+ _bitmapPalette = nullptr;
+
+ Sprite D(this, LB, 1);
+ D._flags._kill = true;
+ D.gotoxyz(kScrWidth >> 1, -(kPanHeight >> 1));
+
+ _vga->sunset();
+ D.show(2);
+ _vga->copyPage(1, 2);
+ _vga->copyPage(0, 1);
+ _vga->sunrise(_vga->_sysPal);
+ _vga->update();
+
+ g_system->delayMillis(2500);
+
+ return true;
+}
+
+void CGE2Engine::killText() {
+ if (!_talk)
+ return;
+
+ _commandHandlerTurbo->addCommand(kCmdKill, -1, 0, _talk);
+ _talk = nullptr;
+}
+
+void CGE2Engine::switchHero(int sex) {
+ if (sex != _sex) {
+ int scene = _heroTab[sex]->_ptr->_scene;
+ if (_sys->_blinkSprite) {
+ _sys->_blinkSprite->_flags._hide = false;
+ _sys->_blinkSprite = nullptr;
+ }
+
+ if (scene >= 0) {
+ _commandHandler->addCommand(kCmdSeq, -1, 2, _heroTab[_sex]->_face);
+ _sex ^= 1;
+ switchScene(scene);
+ }
+ }
+ Sprite *face = _heroTab[_sex]->_face;
+ if (face->_seqPtr == 0)
+ _commandHandler->addCommand(kCmdSeq, -1, 1, face);
+}
+
+void Sprite::touch(uint16 mask, V2D pos, Common::KeyCode keyCode) {
+ if ((mask & kEventAttn) != 0)
+ return;
+
+ if (_vm->_gamePhase == kPhaseInGame)
+ _vm->_infoLine->setText(name());
+
+ if (_ref < 0)
+ return; // cannot access system sprites
+
+ if (_ref / 10 == 12) {
+ _vm->optionTouch(_ref % 10, mask);
+ return;
+ }
+
+ if ((mask & kMouseLeftUp) && _vm->_commandHandler->idle()) {
+ if (_vm->isHero(this) && !_vm->_sys->_blinkSprite) {
+ _vm->switchHero((this == _vm->_heroTab[1]->_ptr) ? 1 : 0);
+ } else if (_flags._kept) { // sprite in pocket
+ for (int sex = 0; sex < 2; ++sex) {
+ for (int p = 0; p < kPocketMax; ++p) {
+ if (_vm->_heroTab[sex]->_pocket[p] == this) {
+ _vm->switchHero(sex);
+ if (_vm->_sex == sex) {
+ if (_vm->_sys->_blinkSprite)
+ _vm->_sys->_blinkSprite->_flags._hide = false;
+
+ if (_vm->_sys->_blinkSprite == this)
+ _vm->_sys->_blinkSprite = nullptr;
+ else
+ _vm->_sys->_blinkSprite = this;
+ }
+ }
+ }
+ }
+ } else { // sprite NOT in pocket
+ Hero *h = _vm->_heroTab[_vm->_sex]->_ptr;
+ if (!_vm->_talk) {
+ // the "+3" is a hack used to work around a script issue in scene 5
+ if ((_ref & 0xFF) < 200 && h->distance(this) > (h->_maxDist << 1) + 3)
+ h->walkTo(this);
+ else if (_vm->_sys->_blinkSprite) {
+ if (works(_vm->_sys->_blinkSprite)) {
+ _vm->feedSnail(_vm->_sys->_blinkSprite, (_vm->_sex) ? kMTake : kFTake, _vm->_heroTab[_vm->_sex]->_ptr);
+ _vm->_sys->_blinkSprite->_flags._hide = false;
+ _vm->_sys->_blinkSprite = nullptr;
+ } else
+ _vm->offUse();
+
+ _vm->selectPocket(-1);
+ // else, no pocket sprite selected
+ } else if (_flags._port) { // portable
+ if (_vm->findActivePocket(-1) < 0)
+ _vm->pocFul();
+ else {
+ _vm->_commandHandler->addCommand(kCmdReach, -2, _ref, nullptr);
+ _vm->_commandHandler->addCommand(kCmdKeep, -1, -1, this);
+ _flags._port = false;
+ }
+ } else { // non-portable
+ Action a = h->action();
+ if (_actionCtrl[a]._cnt) {
+ CommandHandler::Command *cmdList = snList(a);
+ if (cmdList[_actionCtrl[a]._ptr]._commandType == kCmdNext)
+ _vm->offUse();
+ else
+ _vm->feedSnail(this, a, h);
+ } else
+ _vm->offUse();
+ }
+ }
+ }
+ }
+}
+
+void CGE2Engine::keyClick() {
+ _commandHandlerTurbo->addCommand(kCmdSound, -1, 5, nullptr);
+}
+
+void CGE2Engine::offUse() {
+ int seq = 0;
+ int offUseCount = atoi(_text->getText(kOffUseCount));
+
+ // This fixes the issue of empty speech bubbles in the original.
+ // Now we only let this cycle pass if it randoms a valid value for getText().
+ int txt = 0;
+ do {
+ txt = kOffUseText + _sex * offUseCount + newRandom(offUseCount);
+ } while (_text->getText(txt) == nullptr);
+
+ Hero *h = _heroTab[_sex]->_ptr;
+ h->park();
+ _commandHandler->addCommand(kCmdWait, -1, -1, h);
+ _commandHandler->addCommand(kCmdSeq, -1, seq, h);
+ if (!_sayVox)
+ _commandHandler->addCommand(kCmdSound, -1, 6 + _sex, h);
+ _commandHandler->addCommand(kCmdWait, -1, -1, h);
+ _commandHandler->addCommand(kCmdSay, -1, txt, h);
+}
+
+Sprite *CGE2Engine::spriteAt(V2D pos) {
+ Sprite *spr;
+
+ for (spr = _vga->_showQ->last(); spr; spr = spr->_prev) {
+ if (!spr->_flags._hide && !spr->_flags._tran && (spr->getShp()->solidAt(pos - spr->_pos2D)))
+ break;
+ }
+
+ return spr;
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/cge2_main.h b/engines/cge2/cge2_main.h
new file mode 100644
index 0000000000..88cca1cc1e
--- /dev/null
+++ b/engines/cge2/cge2_main.h
@@ -0,0 +1,52 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_MAIN_H
+#define CGE2_MAIN_H
+
+#include "cge2/events.h"
+
+namespace CGE2 {
+
+#define kShowScummVMVersion 15
+
+class System : public Sprite {
+public:
+ int _blinkCounter;
+ Sprite *_blinkSprite;
+
+ System(CGE2Engine *vm);
+
+ virtual void touch(uint16 mask, V2D pos, Common::KeyCode keyCode);
+ void tick();
+private:
+ CGE2Engine *_vm;
+};
+
+} // End of namespace CGE2
+
+#endif // CGE2_MAIN_H
diff --git a/engines/cge2/configure.engine b/engines/cge2/configure.engine
new file mode 100644
index 0000000000..6ccbfee088
--- /dev/null
+++ b/engines/cge2/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine cge2 "CGE2" no
diff --git a/engines/cge2/console.cpp b/engines/cge2/console.cpp
new file mode 100644
index 0000000000..c67c7ab788
--- /dev/null
+++ b/engines/cge2/console.cpp
@@ -0,0 +1,33 @@
+/* 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 "cge2/console.h"
+
+namespace CGE2 {
+
+CGE2Console::CGE2Console(CGE2Engine *vm) : GUI::Debugger() {
+}
+
+CGE2Console::~CGE2Console() {
+}
+
+} // End of namespace CGE
diff --git a/engines/cge2/console.h b/engines/cge2/console.h
new file mode 100644
index 0000000000..15956bf728
--- /dev/null
+++ b/engines/cge2/console.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CGE2_CONSOLE_H
+#define CGE2_CONSOLE_H
+
+#include "gui/debugger.h"
+
+namespace CGE2 {
+
+class CGE2Engine;
+
+class CGE2Console : public GUI::Debugger {
+public:
+ CGE2Console(CGE2Engine *vm);
+ virtual ~CGE2Console();
+};
+
+} // End of namespace CGE
+
+#endif // CGE2_CONSOLE_H
diff --git a/engines/cge2/detection.cpp b/engines/cge2/detection.cpp
new file mode 100644
index 0000000000..605a3fe377
--- /dev/null
+++ b/engines/cge2/detection.cpp
@@ -0,0 +1,245 @@
+/* ScummVM - Graphic Adventure Engine
+*
+* ScummVM is the legal property of its developers, whose names
+* are too numerous to list here. Please refer to the COPYRIGHT
+* file distributed with this source distribution.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+*/
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "cge2/cge2.h"
+#include "engines/advancedDetector.h"
+#include "common/translation.h"
+#include "graphics/surface.h"
+
+namespace CGE2 {
+
+#define GAMEOPTION_COLOR_BLIND_DEFAULT_OFF GUIO_GAMEOPTIONS1
+
+static const PlainGameDescriptor CGE2Games[] = {
+ { "sfinx", "Sfinx" },
+ { 0, 0 }
+};
+
+static const ADGameDescription gameDescriptions[] = {
+ {
+ "sfinx", "Freeware",
+ {
+ { "vol.cat", 0, "21197b287d397c53261b6616bf0dd880", 129024 },
+ { "vol.dat", 0, "de14291869a8eb7c2732ab783c7542ef", 34180844 },
+ AD_LISTEND
+ },
+ Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
+ },
+
+ {
+ "sfinx", "Freeware v1.0",
+ {
+ {"vol.cat", 0, "aa402aed24a72c53a4d1211c456b79dd", 129024},
+ {"vol.dat", 0, "5966ac26d91d664714349669f9dd09b5", 34180164},
+ AD_LISTEND
+ },
+ Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
+ },
+
+ AD_TABLE_END_MARKER
+};
+
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_COLOR_BLIND_DEFAULT_OFF,
+ {
+ _s("Color Blind Mode"),
+ _s("Enable Color Blind Mode by default"),
+ "enable_color_blind",
+ false
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
+class CGE2MetaEngine : public AdvancedMetaEngine {
+public:
+ CGE2MetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(ADGameDescription), CGE2Games, optionsList) {
+ _singleid = "sfinx";
+ }
+
+ virtual const char *getName() const {
+ return "CGE2";
+ }
+
+ virtual const char *getOriginalCopyright() const {
+ return "Sfinx (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon";
+ }
+
+ virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
+ virtual bool hasFeature(MetaEngineFeature f) const;
+ virtual int getMaximumSaveSlot() const;
+ virtual SaveStateList listSaves(const char *target) const;
+ SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
+ virtual void removeSaveState(const char *target, int slot) const;
+
+ const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const;
+};
+
+bool CGE2MetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
+ if (desc)
+ *engine = new CGE2::CGE2Engine(syst, desc);
+
+ return desc != 0;
+}
+
+bool CGE2MetaEngine::hasFeature(MetaEngineFeature f) const {
+ return
+ (f == kSupportsDeleteSave) ||
+ (f == kSavesSupportMetaInfo) ||
+ (f == kSavesSupportThumbnail) ||
+ (f == kSavesSupportCreationDate) ||
+ (f == kSupportsListSaves) ||
+ (f == kSupportsLoadingDuringStartup);
+}
+
+const ADGameDescription *CGE2MetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ static ADGameDescription desc;
+
+ for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
+ if (file->isDirectory())
+ continue;
+
+ if (file->getName().equalsIgnoreCase("lang.eng")) {
+ Common::File dataFile;
+ if (!dataFile.open(*file))
+ continue;
+
+ desc.gameid = "sfinx";
+ desc.extra = "Translation Alpha v0.3";
+ desc.language = Common::EN_ANY;
+ desc.platform = Common::kPlatformDOS;
+ desc.flags = ADGF_NO_FLAGS;
+ desc.guioptions = GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF);
+
+ return (const ADGameDescription *)&desc;
+ }
+ }
+ return 0;
+}
+
+int CGE2MetaEngine::getMaximumSaveSlot() const {
+ return 99;
+}
+
+SaveStateList CGE2MetaEngine::listSaves(const char *target) const {
+ Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
+ Common::StringArray filenames;
+ Common::String pattern = target;
+ pattern += ".???";
+
+ filenames = saveFileMan->listSavefiles(pattern);
+ sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
+
+ SaveStateList saveList;
+ for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) {
+ // Obtain the last 3 digits of the filename, since they correspond to the save slot
+ int slotNum = atoi(filename->c_str() + filename->size() - 3);
+
+ if (slotNum >= 0 && slotNum <= 99) {
+
+ Common::InSaveFile *file = saveFileMan->openForLoading(*filename);
+ if (file) {
+ CGE2::SavegameHeader header;
+
+ // Check to see if it's a ScummVM savegame or not
+ char buffer[kSavegameStrSize + 1];
+ file->read(buffer, kSavegameStrSize + 1);
+
+ if (!strncmp(buffer, kSavegameStr, kSavegameStrSize + 1)) {
+ // Valid savegame
+ if (CGE2::CGE2Engine::readSavegameHeader(file, header)) {
+ saveList.push_back(SaveStateDescriptor(slotNum, header.saveName));
+ if (header.thumbnail) {
+ header.thumbnail->free();
+ delete header.thumbnail;
+ }
+ }
+ } else {
+ // Must be an original format savegame
+ saveList.push_back(SaveStateDescriptor(slotNum, "Unknown"));
+ }
+
+ delete file;
+ }
+ }
+ }
+
+ return saveList;
+}
+
+SaveStateDescriptor CGE2MetaEngine::querySaveMetaInfos(const char *target, int slot) const {
+ Common::String fileName = Common::String::format("%s.%03d", target, slot);
+ Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(fileName);
+
+ if (f) {
+ CGE2::SavegameHeader header;
+
+ // Check to see if it's a ScummVM savegame or not
+ char buffer[kSavegameStrSize + 1];
+ f->read(buffer, kSavegameStrSize + 1);
+
+ bool hasHeader = !strncmp(buffer, kSavegameStr, kSavegameStrSize + 1) &&
+ CGE2::CGE2Engine::readSavegameHeader(f, header);
+ delete f;
+
+ if (!hasHeader) {
+ // Original savegame perhaps?
+ SaveStateDescriptor desc(slot, "Unknown");
+ return desc;
+ } else {
+ // Create the return descriptor
+ SaveStateDescriptor desc(slot, header.saveName);
+ desc.setThumbnail(header.thumbnail);
+ desc.setSaveDate(header.saveYear, header.saveMonth, header.saveDay);
+ desc.setSaveTime(header.saveHour, header.saveMinutes);
+
+ // Slot 0 is used for the 'automatic save on exit' save in Soltys, thus
+ // we prevent it from being deleted or overwritten by accident.
+ desc.setDeletableFlag(slot != 0);
+ desc.setWriteProtectedFlag(slot == 0);
+
+ return desc;
+ }
+ }
+
+ return SaveStateDescriptor();
+}
+
+void CGE2MetaEngine::removeSaveState(const char *target, int slot) const {
+ Common::String fileName = Common::String::format("%s.%03d", target, slot);
+ g_system->getSavefileManager()->removeSavefile(fileName);
+}
+
+} // End of namespace CGE2
+
+#if PLUGIN_ENABLED_DYNAMIC(CGE2)
+ REGISTER_PLUGIN_DYNAMIC(CGE2, PLUGIN_TYPE_ENGINE, CGE2::CGE2MetaEngine);
+#else
+ REGISTER_PLUGIN_STATIC(CGE2, PLUGIN_TYPE_ENGINE, CGE2::CGE2MetaEngine);
+#endif
diff --git a/engines/cge2/events.cpp b/engines/cge2/events.cpp
new file mode 100644
index 0000000000..ed1ec66bb1
--- /dev/null
+++ b/engines/cge2/events.cpp
@@ -0,0 +1,293 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "gui/saveload.h"
+#include "gui/about.h"
+#include "gui/message.h"
+#include "common/config-manager.h"
+#include "common/events.h"
+#include "engines/advancedDetector.h"
+#include "cge2/events.h"
+#include "cge2/text.h"
+#include "cge2/cge2_main.h"
+
+namespace CGE2 {
+
+/*----------------- KEYBOARD interface -----------------*/
+
+Keyboard::Keyboard(CGE2Engine *vm) : _client(nullptr), _vm(vm) {
+}
+
+Keyboard::~Keyboard() {
+}
+
+Sprite *Keyboard::setClient(Sprite *spr) {
+ SWAP(_client, spr);
+ return spr;
+}
+
+bool Keyboard::getKey(Common::Event &event) {
+ Common::KeyCode keycode = event.kbd.keycode;
+
+ switch (keycode) {
+ case Common::KEYCODE_F1:
+ if (event.type == Common::EVENT_KEYUP)
+ return false;
+ // Display ScummVM version and translation strings
+ for (int i = 0; i < 3; i++)
+ _vm->_commandHandler->addCommand(kCmdInf, 1, kShowScummVMVersion + i, NULL);
+ return false;
+ case Common::KEYCODE_F5:
+ if (_vm->canSaveGameStateCurrently()) {
+ GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save", true);
+ int16 savegameId = dialog->runModalWithCurrentTarget();
+ Common::String savegameDescription = dialog->getResultString();
+ delete dialog;
+
+ if (savegameId != -1)
+ _vm->saveGameState(savegameId, savegameDescription);
+ }
+ return false;
+ case Common::KEYCODE_F7:
+ if (_vm->canLoadGameStateCurrently()) {
+ GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore", false);
+ int16 savegameId = dialog->runModalWithCurrentTarget();
+ delete dialog;
+
+ if (savegameId != -1)
+ _vm->loadGameState(savegameId);
+ }
+ return false;
+ case Common::KEYCODE_d:
+ if (event.kbd.flags & Common::KBD_CTRL) {
+ // Start the debugger
+ _vm->getDebugger()->attach();
+ _vm->getDebugger()->onFrame();
+ return false;
+ }
+ break;
+ case Common::KEYCODE_x:
+ if (event.kbd.flags & Common::KBD_ALT) {
+ _vm->quit();
+ return false;
+ }
+ break;
+ case Common::KEYCODE_F10:
+ if (_vm->_commandHandler->idle())
+ _vm->switchScene(-1); // Exits the game.
+ return false;
+ default:
+ break;
+ }
+
+ return true;
+}
+
+void Keyboard::newKeyboard(Common::Event &event) {
+ if (!getKey(event))
+ return;
+
+ if ((event.type == Common::EVENT_KEYDOWN) && _client) {
+ CGE2Event &evt = _vm->_eventManager->getNextEvent();
+ evt._x = 0;
+ evt._y = 0;
+ evt._keyCode = event.kbd.keycode; // Keycode
+ evt._mask = kEventKeyb; // Event mask
+ evt._spritePtr = _client; // Sprite pointer
+ }
+}
+
+/*----------------- MOUSE interface -----------------*/
+
+Mouse::Mouse(CGE2Engine *vm) : Sprite(vm), _busy(nullptr), _hold(nullptr), _hx(0), _point(vm), _vm(vm) {
+ _hold = nullptr;
+ _hx = 0;
+ _hy = 0;
+ _exist = true;
+ _buttons = 0;
+ _busy = nullptr;
+ _active = false;
+ _flags._kill = false;
+
+ setSeq(_stdSeq8);
+
+ BitmapPtr MC = new Bitmap[2];
+ MC[0] = Bitmap(_vm, "MOUSE");
+ MC[1] = Bitmap(_vm, "DUMMY");
+ setShapeList(MC, 2);
+
+ step(1);
+ on();
+ off();
+}
+
+Mouse::~Mouse() {
+ off();
+}
+
+void Mouse::on() {
+ if (_seqPtr && _exist) {
+ _active = true;
+ step(0);
+ if (_busy)
+ _busy->step(0);
+ }
+}
+
+void Mouse::off() {
+ if (_seqPtr == 0) {
+ if (_exist)
+ _active = false;
+
+ step(1);
+ if (_busy)
+ _busy->step(1);
+ }
+}
+
+void Mouse::newMouse(Common::Event &event) {
+ if (!_active)
+ return;
+
+ CGE2Event &evt = _vm->_eventManager->getNextEvent();
+ evt._x = event.mouse.x;
+ evt._y = event.mouse.y;
+ evt._keyCode = Common::KEYCODE_INVALID;
+ evt._spritePtr = _vm->spriteAt(V2D(_vm, evt._x, evt._y));
+
+ switch (event.type) {
+ case Common::EVENT_MOUSEMOVE:
+ evt._mask = kMouseRoll;
+ break;
+ case Common::EVENT_LBUTTONDOWN:
+ evt._mask = kMouseLeftDown;
+ _buttons |= 1;
+ break;
+ case Common::EVENT_LBUTTONUP:
+ evt._mask = kMouseLeftUp;
+ _buttons &= ~1;
+ break;
+ case Common::EVENT_RBUTTONDOWN:
+ evt._mask = kMouseRightDown;
+ _buttons |= 2;
+ break;
+ case Common::EVENT_RBUTTONUP:
+ evt._mask = kMouseRightUp;
+ _buttons &= ~2;
+ break;
+ default:
+ break;
+ }
+}
+
+/*----------------- EventManager interface -----------------*/
+
+EventManager::EventManager(CGE2Engine *vm) : _vm(vm) {
+ _eventQueueHead = 0;
+ _eventQueueTail = 0;
+ memset(&_eventQueue, 0, kEventMax * sizeof(CGE2Event));
+ memset(&_event, 0, sizeof(Common::Event));
+}
+
+void EventManager::poll() {
+ while (g_system->getEventManager()->pollEvent(_event)) {
+ _event.mouse.y = kWorldHeight - _event.mouse.y;
+ switch (_event.type) {
+ case Common::EVENT_KEYDOWN:
+ case Common::EVENT_KEYUP:
+ // Handle keyboard events
+ _vm->_keyboard->newKeyboard(_event);
+ handleEvents();
+ break;
+ case Common::EVENT_MOUSEMOVE:
+ case Common::EVENT_LBUTTONDOWN:
+ case Common::EVENT_LBUTTONUP:
+ case Common::EVENT_RBUTTONDOWN:
+ case Common::EVENT_RBUTTONUP:
+ // Handle mouse events
+ _vm->_mouse->newMouse(_event);
+ handleEvents();
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+void EventManager::handleEvents() {
+ while (_eventQueueTail != _eventQueueHead) {
+ CGE2Event e = _eventQueue[_eventQueueTail];
+ _vm->_mouse->_point = V2D(_vm, e._x, e._y);
+ if (e._mask) {
+ if (e._mask & kMouseMask) {
+ e._spritePtr = _vm->spriteAt(_vm->_mouse->_point);
+ e._x += (_vm->_mouse->_siz.x >> 1);
+ e._y -= _vm->_mouse->_siz.y;
+ if (_vm->_mouse->_hold && (e._spritePtr != _vm->_mouse->_hold)) {
+ _vm->_mouse->_hold->touch(e._mask | kEventAttn,
+ V2D(_vm, e._x - _vm->_mouse->_hold->_pos2D.x, e._y - _vm->_mouse->_hold->_pos2D.y), e._keyCode);
+ }
+ // update mouse cursor position
+ if (e._mask & kMouseRoll)
+ _vm->_mouse->gotoxyz(V2D(_vm, e._x, e._y));
+ }
+
+ // activate current touched SPRITE
+ if (e._spritePtr) {
+ if (e._mask & kEventKeyb)
+ e._spritePtr->touch(e._mask, _vm->_mouse->_point, e._keyCode);
+ else
+ e._spritePtr->touch(e._mask, _vm->_mouse->_point - e._spritePtr->_pos2D, e._keyCode);
+ } else if (_vm->_sys)
+ _vm->_sys->touch(e._mask, _vm->_mouse->_point, e._keyCode);
+
+ // discard Text if button released
+ if (e._mask & (kMouseLeftUp | kMouseRightUp))
+ _vm->killText();
+ }
+ _eventQueueTail = (_eventQueueTail + 1) % kEventMax;
+ }
+}
+
+void EventManager::clearEvent(Sprite *spr) {
+ if (spr) {
+ for (uint16 e = _eventQueueTail; e != _eventQueueHead; e = (e + 1) % kEventMax) {
+ if (_eventQueue[e]._spritePtr == spr)
+ _eventQueue[e]._mask = 0;
+ }
+ } else
+ _eventQueueTail = _eventQueueHead;
+}
+
+CGE2Event &EventManager::getNextEvent() {
+ CGE2Event &evt = _eventQueue[_eventQueueHead];
+ _eventQueueHead = (_eventQueueHead + 1) % kEventMax;
+
+ return evt;
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/events.h b/engines/cge2/events.h
new file mode 100644
index 0000000000..d1aaca2ded
--- /dev/null
+++ b/engines/cge2/events.h
@@ -0,0 +1,116 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_EVENTS_H
+#define CGE2_EVENTS_H
+
+#include "common/events.h"
+#include "cge2/talk.h"
+#include "cge2/vga13h.h"
+
+namespace CGE2 {
+
+/*----------------- KEYBOARD interface -----------------*/
+
+#define kEventMax 256
+
+enum EventMask {
+ kMouseRoll = 1 << 0,
+ kMouseLeftDown = 1 << 1,
+ kMouseLeftUp = 1 << 2,
+ kMouseRightDown = 1 << 3,
+ kMouseRightUp = 1 << 4,
+ kEventAttn = 1 << 5,
+ kMouseMask = (kMouseRoll | kMouseLeftDown | kMouseLeftUp | kMouseRightDown | kMouseRightUp),
+ kEventKeyb = 1 << 7
+};
+
+class Keyboard {
+private:
+ bool getKey(Common::Event &event);
+ CGE2Engine *_vm;
+public:
+ Sprite *_client;
+
+ void newKeyboard(Common::Event &event);
+ Sprite *setClient(Sprite *spr);
+
+ Keyboard(CGE2Engine *vm);
+ ~Keyboard();
+};
+
+/*----------------- MOUSE interface -----------------*/
+
+struct CGE2Event {
+ uint16 _mask;
+ uint16 _x;
+ uint16 _y;
+ Common::KeyCode _keyCode;
+ Sprite *_spritePtr;
+};
+
+class Mouse : public Sprite {
+public:
+ V2D _point;
+ Sprite *_hold;
+ bool _active;
+ int _hx;
+ int _hy;
+ bool _exist;
+ int _buttons;
+ Sprite *_busy;
+ Mouse(CGE2Engine *vm);
+ ~Mouse();
+ void on();
+ void off();
+ void newMouse(Common::Event &event);
+private:
+ CGE2Engine *_vm;
+};
+
+/*----------------- EventManager interface -----------------*/
+
+class EventManager {
+private:
+ CGE2Engine *_vm;
+ Common::Event _event;
+ CGE2Event _eventQueue[kEventMax];
+ uint16 _eventQueueHead;
+ uint16 _eventQueueTail;
+
+ void handleEvents();
+public:
+ EventManager(CGE2Engine *vm);
+ void poll();
+ void clearEvent(Sprite *spr);
+
+ CGE2Event &getNextEvent();
+};
+
+} // End of namespace CGE
+
+#endif // #define CGE2_EVENTS_H
diff --git a/engines/cge2/fileio.cpp b/engines/cge2/fileio.cpp
new file mode 100644
index 0000000000..6f8009716b
--- /dev/null
+++ b/engines/cge2/fileio.cpp
@@ -0,0 +1,272 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "common/system.h"
+#include "common/str.h"
+#include "common/debug.h"
+#include "common/debug-channels.h"
+#include "common/memstream.h"
+#include "cge2/cge2.h"
+#include "cge2/fileio.h"
+
+namespace CGE2 {
+
+/*-----------------------------------------------------------------------
+ * BtPage
+ *-----------------------------------------------------------------------*/
+void BtPage::readBTree(Common::ReadStream &s) {
+ _header._count = s.readUint16LE();
+ _header._down = s.readUint16LE();
+
+ if (_header._down == kBtValNone) {
+ // Leaf list
+ for (int i = 0; i < kBtLeafCount; ++i) {
+ s.read(_leaf[i]._key, kBtKeySize);
+ _leaf[i]._pos = s.readUint32LE();
+ _leaf[i]._size = s.readUint32LE();
+ }
+ } else {
+ // Root index
+ for (int i = 0; i < kBtInnerCount; ++i) {
+ s.read(_inner[i]._key, kBtKeySize);
+ _inner[i]._down = s.readUint16LE();
+ }
+ }
+}
+
+/*-----------------------------------------------------------------------
+ * ResourceManager
+ *-----------------------------------------------------------------------*/
+ResourceManager::ResourceManager() {
+ _datFile = new Common::File();
+ _datFile->open(kDatName);
+
+ _catFile = new Common::File();
+ _catFile->open(kCatName);
+
+ if (!_datFile->isOpen() || !_catFile->isOpen())
+ error("Unable to open data files");
+
+ for (int i = 0; i < kBtLevel; i++) {
+ _buff[i]._page = new BtPage;
+ _buff[i]._pageNo = kBtValNone;
+ _buff[i]._index = -1;
+ assert(_buff[i]._page != nullptr);
+ }
+}
+
+ResourceManager::~ResourceManager() {
+ _datFile->close();
+ delete _datFile;
+
+ _catFile->close();
+ delete _catFile;
+
+ for (int i = 0; i < kBtLevel; i++)
+ delete _buff[i]._page;
+}
+
+void ResourceManager::xCrypt(byte *buf, uint16 length) {
+ byte *b = buf;
+
+ for (uint16 i = 0; i < length; i++)
+ *b++ ^= kCryptSeed;
+}
+
+bool ResourceManager::seek(int32 offs, int whence) {
+ return _datFile->seek(offs, whence);
+}
+
+uint16 ResourceManager::read(byte *buf, uint16 length) {
+ if (!_datFile->isOpen())
+ return 0;
+
+ uint16 bytesRead = _datFile->read(buf, length);
+ if (!bytesRead)
+ error("Read %s - %d bytes", _datFile->getName(), length);
+ xCrypt(buf, length);
+ return bytesRead;
+}
+
+BtPage *ResourceManager::getPage(int level, uint16 pageId) {
+ if (_buff[level]._pageNo != pageId) {
+ int32 pos = pageId * kBtSize;
+ _buff[level]._pageNo = pageId;
+ assert(_catFile->size() > pos);
+ // In the original, there was a check verifying if the
+ // purpose was to write a new file. This should only be
+ // to create a new file, thus it was removed.
+ _catFile->seek(pageId * kBtSize, SEEK_SET);
+
+ // Read in the page
+ byte buffer[kBtSize];
+ int bytesRead = catRead(buffer, kBtSize);
+
+ // Unpack it into the page structure
+ Common::MemoryReadStream stream(buffer, bytesRead, DisposeAfterUse::NO);
+ _buff[level]._page->readBTree(stream);
+ _buff[level]._index = -1;
+ }
+ return _buff[level]._page;
+}
+
+BtKeypack *ResourceManager::find(const char *key) {
+ int lev = 0;
+ uint16 nxt = kBtValRoot;
+ while (!_catFile->eos()) {
+ BtPage *pg = getPage(lev, nxt);
+ // search
+ if (pg->_header._down != kBtValNone) {
+ int i;
+ for (i = 0; i < pg->_header._count; i++) {
+ // Does this work, or does it have to compare the entire buffer?
+ if (scumm_strnicmp((const char *)key, (const char*)pg->_inner[i]._key, kBtKeySize) < 0)
+ break;
+ }
+ nxt = (i) ? pg->_inner[i - 1]._down : pg->_header._down;
+ _buff[lev]._index = i - 1;
+ lev++;
+ } else {
+ int i;
+ for (i = 0; i < pg->_header._count - 1; i++) {
+ if (scumm_stricmp((const char *)key, (const char *)pg->_leaf[i]._key) <= 0)
+ break;
+ }
+
+ // Hack to work around a mix between 24piram_ and 24pirami
+ if (!strcmp(key, "24piram_.SPR") && (scumm_stricmp((const char *)key, (const char *)pg->_leaf[i]._key) < 0))
+ ++i;
+ //
+
+ _buff[lev]._index = i;
+ return &pg->_leaf[i];
+ }
+ }
+ return nullptr;
+}
+
+bool ResourceManager::exist(const char *name) {
+ return scumm_stricmp(find(name)->_key, name) == 0;
+}
+
+uint16 ResourceManager::catRead(byte *buf, uint16 length) {
+ if (!_catFile->isOpen())
+ return 0;
+
+ uint16 bytesRead = _catFile->read(buf, length);
+ if (!bytesRead)
+ error("Read %s - %d bytes", _catFile->getName(), length);
+ xCrypt(buf, length);
+ return bytesRead;
+}
+
+/*-----------------------------------------------------------------------
+ * EncryptedStream
+ *-----------------------------------------------------------------------*/
+EncryptedStream::EncryptedStream(CGE2Engine *vm, const char *name) : _vm(vm), _lineCount(0) {
+ _error = false;
+ BtKeypack *kp = _vm->_resman->find(name);
+ if (scumm_stricmp(kp->_key, name) != 0)
+ _error = true;
+
+ _vm->_resman->seek(kp->_pos);
+ byte *dataBuffer;
+ int bufSize;
+
+ if ((strlen(name) > 4) && (scumm_stricmp(name + strlen(name) - 4, ".SPR") == 0)) {
+ // SPR files have some inconsistencies. Some have extra 0x1A at the end, some others
+ // do not have a carriage return at the end of the last line
+ // Therefore, we remove this ending 0x1A and add extra new lines.
+ // This fixes bug #3537527
+ dataBuffer = (byte *)malloc(kp->_size + 2);
+ _vm->_resman->read(dataBuffer, kp->_size);
+ if (dataBuffer[kp->_size - 1] == 0x1A)
+ dataBuffer[kp->_size - 1] = '\n';
+ dataBuffer[kp->_size] = '\n';
+ dataBuffer[kp->_size + 1] = '\n';
+ bufSize = kp->_size + 2;
+ } else {
+ dataBuffer = (byte *)malloc(kp->_size);
+ _vm->_resman->read(dataBuffer, kp->_size);
+ bufSize = kp->_size;
+ }
+
+ _readStream = new Common::MemoryReadStream(dataBuffer, bufSize, DisposeAfterUse::YES);
+}
+
+uint32 EncryptedStream::read(byte *dataPtr, uint32 dataSize) {
+ return _readStream->read(dataPtr, dataSize);
+}
+
+int16 EncryptedStream::readSint16LE() {
+ return _readStream->readSint16LE();
+}
+
+uint32 EncryptedStream::readUint32LE() {
+ return _readStream->readUint32LE();
+}
+
+bool EncryptedStream::err() {
+ return (_error || _readStream->err());
+}
+
+bool EncryptedStream::eos() {
+ return _readStream->eos();
+}
+
+bool EncryptedStream::seek(int32 offset) {
+ return _readStream->seek(offset);
+}
+
+Common::String EncryptedStream::readLine() {
+ _lineCount++;
+ Common::String line = _readStream->readLine();
+ if (!line.empty() && (line[0] == ';' || line[0] == '.' || line[0] == '*'))
+ line.clear(); // Returns an empty string, if the line is invalid.
+ return line;
+}
+
+int32 EncryptedStream::size() {
+ return _readStream->size();
+}
+
+int32 EncryptedStream::pos() {
+ return _readStream->pos();
+}
+
+EncryptedStream::~EncryptedStream() {
+ delete _readStream;
+}
+
+const char *EncryptedStream::kIdTab[] = {
+ "[near]", "[mtake]", "[ftake]", "[phase]", "[seq]",
+ "Name", "Type", "Front", "East",
+ "Portable", "Transparent",
+ nullptr
+};
+
+} // End of namespace CGE2
diff --git a/engines/cge2/fileio.h b/engines/cge2/fileio.h
new file mode 100644
index 0000000000..e236c73b49
--- /dev/null
+++ b/engines/cge2/fileio.h
@@ -0,0 +1,133 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_FILEIO_H
+#define CGE2_FILEIO_H
+
+#include "common/file.h"
+
+namespace CGE2 {
+
+class CGE2Engine;
+
+#define kBtSize 2048
+#define kBtKeySize 13
+#define kBtLevel 2
+#define kBtInnerCount ((kBtSize - 4 /*sizeof(Header) */) / (kBtKeySize + 2 /*sizeof(Inner) */))
+#define kBtLeafCount ((kBtSize - 4 /*sizeof(Header) */) / (kBtKeySize + 4 + 4 /*sizeof(BtKeypack) */))
+#define kBtValNone 0xFFFF
+#define kBtValRoot 0
+#define kCatName "VOL.CAT"
+#define kDatName "VOL.DAT"
+#define kCryptSeed 0xA5
+
+enum ID {
+ kIdNear, kIdMTake, kIdFTake, kIdPhase, kIdSeq,
+ kIdName, kIdType, kIdFront, kIdEast,
+ kIdPortable, kIdTransparent,
+ kIdNone = -1
+};
+
+struct BtKeypack {
+ char _key[kBtKeySize];
+ uint32 _pos;
+ uint32 _size;
+};
+
+struct Inner {
+ uint8 _key[kBtKeySize];
+ uint16 _down;
+};
+
+struct Header {
+ uint16 _count;
+ uint16 _down;
+};
+
+struct BtPage {
+ Header _header;
+ union {
+ // dummy filler to make proper size of union
+ uint8 _data[kBtSize - 4]; /* 4 is the size of struct Header */
+ // inner version of data: key + word-sized page link
+ Inner _inner[kBtInnerCount];
+ // leaf version of data: key + all user data
+ BtKeypack _leaf[kBtLeafCount];
+ };
+
+ void readBTree(Common::ReadStream &s);
+};
+
+class ResourceManager {
+private:
+ struct {
+ BtPage *_page;
+ uint16 _pageNo;
+ int _index;
+ } _buff[kBtLevel];
+
+ BtPage *getPage(int level, uint16 pageId);
+ uint16 catRead(byte *buf, uint16 length);
+ Common::File *_catFile;
+ Common::File *_datFile;
+ void xCrypt(byte *buf, uint16 length);
+public:
+ ResourceManager();
+ ~ResourceManager();
+ uint16 read(byte *buf, uint16 length);
+ bool seek(int32 offs, int whence = SEEK_SET);
+
+ BtKeypack *find(const char *key);
+ bool exist(const char *name);
+};
+
+class EncryptedStream {
+private:
+ CGE2Engine *_vm;
+ Common::SeekableReadStream *_readStream;
+ int _lineCount;
+ bool _error;
+public:
+ EncryptedStream(CGE2Engine *vm, const char *name);
+ ~EncryptedStream();
+ bool err();
+ bool eos();
+ bool seek(int32 offset);
+ int32 pos();
+ int32 size();
+ uint32 read(byte *dataPtr, uint32 dataSize);
+ int16 readSint16LE();
+ uint32 readUint32LE();
+ Common::String readLine();
+ int getLineCount() { return _lineCount; }
+
+ static const char *kIdTab[];
+};
+
+} // End of namespace CGE2
+
+#endif // CGE2_FILEIO_H
diff --git a/engines/cge2/general.h b/engines/cge2/general.h
new file mode 100644
index 0000000000..7213c2e24d
--- /dev/null
+++ b/engines/cge2/general.h
@@ -0,0 +1,45 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_GENERAL_H
+#define CGE2_GENERAL_H
+
+#include "common/file.h"
+
+namespace CGE2 {
+
+class CGE2Engine;
+
+struct Dac {
+ uint8 _r;
+ uint8 _g;
+ uint8 _b;
+};
+
+} // End of namespace CGE2
+
+#endif // CGE2_GENERAL_H
diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp
new file mode 100644
index 0000000000..86bd7ac953
--- /dev/null
+++ b/engines/cge2/hero.cpp
@@ -0,0 +1,620 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "cge2/hero.h"
+#include "cge2/text.h"
+#include "cge2/map.h"
+
+namespace CGE2 {
+
+Hero::Hero(CGE2Engine *vm)
+ : Sprite(vm), _contact(nullptr), _dir(kNoDir),
+ _curDim(0), _tracePtr(-1), _ignoreMap(false), _maxDist(0) {
+
+ for (int i = 0; i < kDimMax; i++) {
+ _dim[i] = nullptr;
+ }
+}
+
+Hero::~Hero() {
+ contract();
+}
+
+Sprite *Hero::expand() {
+ if (_ext)
+ return this;
+
+ char fname[kMaxPath];
+ _vm->mergeExt(fname, _file, kSprExt);
+
+ if (_ext != nullptr)
+ delete _ext;
+
+ _ext = new SprExt(_vm);
+
+ if (!*_file)
+ return this;
+
+ for (int i = 0; i < kDimMax; i++) {
+ if (_dim[i] != nullptr) {
+ delete[] _dim[i];
+ _dim[i] = nullptr;
+ }
+ }
+ for (int i = 0; i < kDimMax; i++) {
+ _dim[i] = new Bitmap[_shpCnt];
+ for (int j = 0; j < _shpCnt; j++)
+ _dim[i][j].setVM(_vm);
+ }
+
+ int cnt[kActions];
+
+ for (int i = 0; i < kActions; i++)
+ cnt[i] = 0;
+
+ for (int i = 0; i < kActions; i++) {
+ byte n = _actionCtrl[i]._cnt;
+ if (n)
+ _ext->_actions[i] = new CommandHandler::Command[n];
+ else
+ _ext->_actions[i] = nullptr;
+ }
+
+ Seq *curSeq = nullptr;
+ if (_seqCnt)
+ curSeq = new Seq[_seqCnt];
+
+ if (_vm->_resman->exist(fname)) { // sprite description file exist
+ EncryptedStream sprf(_vm, fname);
+ if (sprf.err())
+ error("Bad SPR [%s]", fname);
+
+ ID section = kIdPhase;
+ ID id;
+ Common::String line;
+ char tmpStr[kLineMax + 1];
+ int shpcnt = 0;
+ int seqcnt = 0;
+ int maxnow = 0;
+ int maxnxt = 0;
+
+ for (line = sprf.readLine(); !sprf.eos(); line = sprf.readLine()) {
+ if (line.empty())
+ continue;
+ Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
+
+ char *p = _vm->token(tmpStr);
+
+ id = _vm->ident(p);
+ switch (id) {
+ case kIdNear:
+ case kIdMTake:
+ case kIdFTake:
+ case kIdPhase:
+ case kIdSeq:
+ section = id;
+ break;
+ case kIdName:
+ Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
+ for (p = tmpStr; *p != '='; p++); // We search for the =
+ setName(_vm->tail(p));
+ break;
+ default:
+ if (id >= kIdNear)
+ break;
+ Seq *s;
+ switch (section) {
+ case kIdNear:
+ case kIdMTake:
+ case kIdFTake:
+ id = (ID)_vm->_commandHandler->getComId(p);
+ if (_actionCtrl[section]._cnt) {
+ CommandHandler::Command *c = &_ext->_actions[section][cnt[section]++];
+ c->_commandType = CommandType(id);
+ c->_ref = _vm->number(nullptr);
+ c->_val = _vm->number(nullptr);
+ c->_spritePtr = nullptr;
+ }
+ break;
+ case kIdSeq:
+ s = &curSeq[seqcnt++];
+ s->_now = atoi(p);
+ if (s->_now > maxnow)
+ maxnow = s->_now;
+ s->_next = _vm->number(nullptr);
+ switch (s->_next) {
+ case 0xFF:
+ s->_next = seqcnt;
+ break;
+ case 0xFE:
+ s->_next = seqcnt - 1;
+ break;
+ }
+ if (s->_next > maxnxt)
+ maxnxt = s->_next;
+ s->_dx = _vm->number(nullptr);
+ s->_dy = _vm->number(nullptr);
+ s->_dz = _vm->number(nullptr);
+ s->_dly = _vm->number(nullptr);
+ break;
+ case kIdPhase:
+ for (int i = 0; i < kDimMax; i++) {
+ char *q = p;
+ q[1] = '0' + i;
+ Bitmap b(_vm, q);
+ _dim[i][shpcnt] = b;
+ if (!shpcnt)
+ _hig[i] = b._h;
+ }
+ ++shpcnt;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ if (curSeq) {
+ if (maxnow >= shpcnt)
+ error("Bad PHASE in SEQ %s", fname);
+ if (maxnxt >= seqcnt)
+ error("Bad JUMP in SEQ %s", fname);
+ setSeq(curSeq);
+ } else
+ setSeq(_stdSeq8);
+
+ setShapeList(_dim[0], shpcnt);
+ }
+
+ char *tempStr = _vm->_text->getText(_ref + 100);
+ char *text = new char[strlen(tempStr) + 1];
+ strcpy(text, tempStr);
+ _reachStart = atoi(_vm->token(text));
+ _reachCycle = atoi(_vm->token(nullptr));
+ _sayStart = atoi(_vm->token(nullptr));
+ _funStart = atoi(_vm->token(nullptr));
+ _funDel = _funDel0 = (72 / _ext->_seq[0]._dly) * atoi(_vm->token(nullptr));
+ delete[] text;
+
+ int i = stepSize() / 2;
+ _maxDist = sqrt(double(i * i * 2));
+ setCurrent();
+
+ return this;
+}
+
+Sprite *Hero::contract() {
+ for (int i = 0; i < kDimMax; i++) {
+ if (_dim[i] != nullptr) {
+ delete[] _dim[i];
+ if (_ext->_shpList == _dim[i])
+ _ext->_shpList = nullptr;
+ _dim[i] = nullptr;
+ }
+ }
+ Sprite::contract();
+ return this;
+}
+
+void Hero::setCurrent() {
+ FXP m = _vm->_eye->_z / (_pos3D._z - _vm->_eye->_z);
+ FXP tmp = m * _siz.y;
+ int h = -(tmp.trunc());
+
+ int i = 0;
+ for (; i < kDimMax - 1; i++) {
+ if (h >= (_hig[i] + _hig[i + 1]) / 2)
+ break;
+ }
+
+ _ext->_shpList = _dim[_curDim = i];
+}
+
+void Hero::hStep() {
+ if (!_ignoreMap && _ext) {
+ Seq *seq = _ext->_seq;
+ int ptr = seq[_seqPtr]._next;
+ seq += ptr;
+ if (seq->_dx | seq->_dz) {
+ V2D p0(_vm, _pos3D._x.round(), _pos3D._z.round());
+ V2D p1(_vm, p0.x + seq->_dx, p0.y + seq->_dz);
+ if (mapCross(p0, p1)) {
+ park();
+ return;
+ }
+ }
+ }
+ step();
+}
+
+Sprite *Hero::setContact() {
+ Sprite *spr;
+ int md = _maxDist << 1;
+ for (spr = _vm->_vga->_showQ->first(); spr; spr = spr->_next) {
+ if (spr->_actionCtrl[kNear]._cnt && ((spr->_ref & 255) != 255) && (distance(spr) <= md)) {
+ if (spr == _contact)
+ return nullptr;
+ else
+ break;
+ }
+ }
+ return (_contact = spr);
+}
+
+void Hero::tick() {
+ int z = _pos3D._z.trunc();
+ //-- maybe not exactly wid/2, but wid/3 ?
+ int d = ((_siz.x / 2) * _vm->_eye->_z.trunc()) / (_vm->_eye->_z.trunc() - z);
+
+ if (_dir != kNoDir) { // just walking...
+ if (_flags._hold || _tracePtr < 0)
+ park();
+ else {
+ Sprite *spr = setContact();
+ if (spr)
+ _vm->feedSnail(spr, kNear, this);
+ }
+ }
+ //---------------------------------------------------------------
+ if (_tracePtr >= 0) {
+ if (distance(_trace[_tracePtr]) <= _maxDist)
+ --_tracePtr;
+
+ if (_tracePtr < 0)
+ park();
+ else {
+ int stp = stepSize() / 2;
+ int dx = _trace[_tracePtr]._x.round() - _pos3D._x.round();
+ int dz = _trace[_tracePtr]._z.round() - _pos3D._z.round();
+ Dir dir = (dx > stp) ? kEE : ((-dx > stp) ? kWW : ((dz > stp) ? kNN : kSS));
+ turn(dir);
+ }
+ }
+
+ //---------------------------------------------------------------
+ hStep();
+ setCurrent();
+ switch (_dir) {
+ case kSS:
+ if (_pos3D._z < stepSize() / 2)
+ park();
+ break;
+ case kWW:
+ if (_pos2D.x <= d)
+ park();
+ break;
+ case kNN:
+ if (_pos3D._z > kScrDepth)
+ park();
+ break;
+ case kEE:
+ if (_pos2D.x >= kScrWidth - 1 - d)
+ park();
+ break;
+ default:
+ break;
+ }
+ if (_flags._trim)
+ gotoxyz_(_pos2D);
+
+ if (_pos3D._z.trunc() != z)
+ _flags._zmov = true;
+
+ if (--_funDel == 0)
+ fun();
+}
+
+int Hero::distance(V3D pos) {
+ V3D di = _pos3D - pos;
+ int x = di._x.round();
+ int z = di._z.round();
+ int retval = (int)sqrt((double)x * x + z * z);
+ return retval;
+}
+
+int Hero::distance(Sprite *spr) {
+ V3D pos = spr->_pos3D;
+ int mdx = (spr->_siz.x >> 1) + (_siz.x >> 1);
+ int dx = (_pos3D._x - spr->_pos3D._x).round();
+ if (dx < 0) {
+ mdx = -mdx;
+ if (dx > mdx)
+ pos._x = _pos3D._x;
+ else
+ pos._x += mdx;
+ } else if (dx < mdx)
+ pos._x = _pos3D._x;
+ else
+ pos._x += mdx;
+
+ return distance(pos);
+}
+
+void Hero::turn(Dir d) {
+ Dir dir = (_dir == kNoDir) ? kSS : _dir;
+ if (d != _dir) {
+ step((d == dir) ? 57 : (8 + 4 * dir + d));
+ _dir = d;
+ }
+ resetFun();
+}
+
+void Hero::park() {
+ if (_dir != kNoDir) {
+ step(8 + 5 * _dir);
+ _dir = kNoDir;
+ _trace[0] = _pos3D;
+ _tracePtr = -1;
+ setCurrent();
+ _flags._zmov = true;
+ }
+ _ignoreMap = false;
+ if (_time == 0)
+ ++_time;
+}
+
+bool Hero::lower(Sprite * spr) {
+ return (spr->_pos3D._y + (spr->_siz.y >> 2) < 10);
+}
+
+void Hero::reach(int mode) {
+ Sprite *spr = nullptr;
+ if (mode >= 4) {
+ spr = _vm->_vga->_showQ->locate(mode);
+ if (spr) {
+ mode = !spr->_flags._east; // 0-1
+ if (lower(spr)) // 2-3
+ mode += 2;
+ }
+ }
+ // note: insert SNAIL commands in reverse order
+ _vm->_commandHandler->insertCommand(kCmdPause, -1, 24, nullptr);
+ _vm->_commandHandler->insertCommand(kCmdSeq, -1, _reachStart + _reachCycle * mode, this);
+ if (spr) {
+ _vm->_commandHandler->insertCommand(kCmdWait, -1, -1, this);
+ _vm->_commandHandler->insertCommand(kCmdWalk, -1, spr->_ref, this);
+ }
+ // sequence is not finished,
+ // now it is just at sprite appear (disappear) point
+ resetFun();
+}
+
+void Hero::fun() {
+ if (_vm->_commandHandler->idle()) {
+ park();
+ _vm->_commandHandler->addCommand(kCmdWait, -1, -1, this);
+ _vm->_commandHandler->addCommand(kCmdSeq, -1, _funStart, this);
+ }
+ _funDel = _funDel0 >> 2;
+}
+
+int Hero::len(V2D v) {
+ return sqrt(double(v.x * v.x + v.y * v.y));
+}
+
+bool Hero::findWay(){
+ V2D p0(_vm, _pos3D._x.round(), _pos3D._z.round());
+ V2D p1(_vm, _trace[_tracePtr]._x.round(), _trace[_tracePtr]._z.round());
+ V2D ph(_vm, p1.x, p0.y);
+ V2D pv(_vm, p0.x, p1.y);
+ bool pvOk = (!mapCross(p0, pv) && !mapCross(pv, p1));
+ bool phOk = (!mapCross(p0, ph) && !mapCross(ph, p1));
+ int md = (_maxDist >> 1);
+ if (pvOk && (len(ph - p0) <= md || len(p1 - ph) <= md))
+ return true;
+
+ if (phOk && (len(pv - p0) <= md || len(p1 - pv) <= md))
+ return true;
+
+ if (pvOk) {
+ _trace[++_tracePtr] = V3D(pv.x, 0, pv.y);
+ return true;
+ }
+
+ if (phOk) {
+ _trace[++_tracePtr] = V3D(ph.x, 0, ph.y);
+ return true;
+ }
+
+ return false;
+}
+
+int Hero::snap(int p, int q, int grid) {
+ int d = abs(q - p) % grid;
+ if (d > (grid >> 1))
+ d -= grid;
+ return (q >= p) ? (q - d) : (q + d);
+}
+
+void Hero::walkTo(V3D pos) {
+ if (distance(pos) <= _maxDist)
+ return;
+
+ int stp = stepSize();
+ pos._x = snap(_pos3D._x.round(), pos._x.round(), stp);
+ pos._y = 0;
+ pos._z = snap(_pos3D._z.round(), pos._z.round(), stp);
+
+ V2D p0(_vm, _pos3D._x.round(), _pos3D._z.round());
+ V2D p1(_vm, pos._x.round(), pos._z.round());
+ resetFun();
+ int cnt = mapCross(p0, p1);
+ if ((cnt & 1) == 0) { // even == way exists
+ _trace[_tracePtr = 0] = pos;
+ if (!findWay()) {
+ int i;
+ ++_tracePtr;
+ for (i = stp; i < kMaxTry; i += stp) {
+ _trace[_tracePtr] = pos + V3D(i, 0, 0);
+ if (!mapCross(_trace[_tracePtr - 1], _trace[_tracePtr]) && findWay())
+ break;
+
+ _trace[_tracePtr] = pos + V3D(-i, 0, 0);
+ if (!mapCross(_trace[_tracePtr - 1], _trace[_tracePtr]) && findWay())
+ break;
+
+ _trace[_tracePtr] = pos + V3D(0, 0, i);
+ if (!mapCross(_trace[_tracePtr - 1], _trace[_tracePtr]) && findWay())
+ break;
+
+ _trace[_tracePtr] = pos + V3D(0, 0, -i);
+ if (!mapCross(_trace[_tracePtr - 1], _trace[_tracePtr]) && findWay())
+ break;
+ }
+ if (i >= kMaxTry)
+ _trace[_tracePtr] = V3D(_pos3D._x, 0, pos._z); // not found
+ }
+ }
+}
+
+void Hero::walkTo(Sprite *spr) {
+ int mdx = _siz.x >> 1;
+ int stp = (stepSize() + 1) / 2;
+ if (!spr->_flags._east)
+ mdx = -mdx;
+ walkTo(spr->_pos3D + V3D(mdx, 0, (!spr->_flags._frnt || spr->_pos3D._z < 8) ? stp : -stp));
+}
+
+V3D Hero::screenToGround(V2D pos) {
+ FXP z = _vm->_eye->_z + (_vm->_eye->_y * _vm->_eye->_z) / (FXP(pos.y) - _vm->_eye->_y);
+ FXP x = _vm->_eye->_x - ((FXP(pos.x) - _vm->_eye->_x) * (z - _vm->_eye->_z)) / _vm->_eye->_z;
+ return V3D(x.round(), 0, z.round());
+}
+
+int Hero::cross(const V2D &a, const V2D &b) {
+ int x = _pos3D._x.trunc();
+ int z = _pos3D._z.trunc();
+ int r = ((_siz.x / 3) * _vm->_eye->_z.trunc()) / (_vm->_eye->_z.trunc() - z);
+ return _vm->cross(a, b, V2D(_vm, x - r, z), V2D(_vm, x + r, z)) << 1;
+}
+
+bool CGE2Engine::cross(const V2D &a, const V2D &b, const V2D &c, const V2D &d) {
+ if (contain(a, b, c) || contain(a, b, d) || contain(c, d, a) || contain(c, d, b))
+ return true;
+
+ return sgn(det(a, b, c)) != sgn(det(a, b, d)) && sgn(det(c, d, a)) != sgn(det(c, d, b));
+}
+
+bool CGE2Engine::contain(const V2D &a, const V2D &b, const V2D &p) {
+ if (det(a, b, p))
+ return false;
+
+ return ((long)(a.x - p.x) * (p.x - b.x) >= 0 && (long)(a.y - p.y) * (p.y - b.y) >= 0);
+}
+
+long CGE2Engine::det(const V2D &a, const V2D &b, const V2D &c) {
+ return ((long)a.x * b.y + (long)b.x * c.y + (long)c.x * a.y) - ((long)c.x * b.y + (long)b.x * a.y + (long)a.x * c.y);
+}
+
+int CGE2Engine::sgn(long n) {
+ return (n == 0) ? 0 : ((n > 0) ? 1 : -1);
+}
+
+int Hero::mapCross(const V2D &a, const V2D &b) {
+ Hero *o = other();
+ int n = (o->_scene == _scene) ? o->cross(a, b) : 0;
+ if (!_ignoreMap)
+ n += _vm->mapCross(a, b);
+
+ return n;
+}
+
+int Hero::mapCross(const V3D &a, const V3D &b) {
+ return mapCross(V2D(_vm, a._x.round(), a._z.round()), V2D(_vm, b._x.round(), b._z.round()));
+}
+
+int CGE2Engine::mapCross(const V2D &a, const V2D &b) {
+ int cnt = 0;
+ V2D *n0 = nullptr;
+ V2D *p = nullptr;
+ for (int i = 0; i < _map->size(); i++) {
+ V2D *n = _map->getCoord(i);
+ if (p) {
+ if (cross(a, b, *n0, *n))
+ ++cnt;
+
+ if (*n == *p)
+ p = nullptr;
+ } else {
+ p = n;
+ }
+ n0 = n;
+ }
+ return cnt;
+}
+
+void Hero::setScene(int c) {
+ Sprite::setScene(c);
+ resetFun();
+}
+
+void Hero::operator++() {
+ if (_curDim > 0)
+ _ext->_shpList = _dim[--_curDim];
+}
+
+void Hero::operator--() {
+ if (_curDim < kDimMax - 1)
+ _ext->_shpList = _dim[++_curDim];
+}
+
+bool Sprite::works(Sprite *spr) {
+ if (!spr || !spr->_ext)
+ return false;
+
+ bool ok = false;
+
+ Action a = _vm->_heroTab[_vm->_sex]->_ptr->action();
+ CommandHandler::Command *ct = spr->_ext->_actions[a];
+ if (ct) {
+ int i = spr->_actionCtrl[a]._ptr;
+ int n = spr->_actionCtrl[a]._cnt;
+ while (i < n && !ok) {
+ CommandHandler::Command *c = &ct[i++];
+ if (c->_commandType != kCmdUse)
+ break;
+ ok = (c->_ref == _ref);
+ if (c->_val > 255) {
+ if (ok) {
+ int p = spr->labVal(a, c->_val >> 8);
+ if (p >= 0)
+ spr->_actionCtrl[a]._ptr = p;
+ else
+ ok = false;
+ }
+ } else {
+ if (c->_val && c->_val != _vm->_now)
+ ok = false;
+ break;
+ }
+ }
+ }
+
+ return ok;
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/hero.h b/engines/cge2/hero.h
new file mode 100644
index 0000000000..3b5329e12c
--- /dev/null
+++ b/engines/cge2/hero.h
@@ -0,0 +1,114 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_HERO_H
+#define CGE2_HERO_H
+
+#include "cge2/cge2.h"
+#include "cge2/vga13h.h"
+#include "cge2/snail.h"
+
+namespace CGE2 {
+
+#define kMaxTry 400
+
+class Hero;
+
+struct HeroTab {
+ Hero *_ptr;
+ Sprite *_face;
+ Sprite *_pocket[kPocketMax + 1];
+ int _downPocketId[kPocketMax + 1];
+ int _pocPtr;
+ V2D *_posTab[kSceneMax];
+ HeroTab(CGE2Engine *vm) {
+ _ptr = nullptr;
+ _face = nullptr;
+ for (int i = 0; i < kPocketMax + 1; i++) {
+ _pocket[i] = nullptr;
+ _downPocketId[i] = -1;
+ }
+ _pocPtr = 0;
+ for (int i = 0; i < kSceneMax; i++)
+ _posTab[i] = nullptr;
+ }
+ ~HeroTab() {
+ for (int i = 0; i < kSceneMax; i++)
+ delete _posTab[i];
+ }
+};
+
+class Hero : public Sprite {
+ int _hig[kDimMax];
+ Sprite *_contact;
+public:
+ BitmapPtr _dim[kDimMax];
+ V3D _trace[kWayMax];
+ enum Dir { kNoDir = -1, kSS, kWW, kNN, kEE } _dir;
+ int _curDim;
+ int _tracePtr;
+ int _reachStart, _reachCycle, _sayStart, _funStart;
+ int _funDel0, _funDel;
+ int _maxDist;
+ bool _ignoreMap;
+ Hero(CGE2Engine *vm);
+ ~Hero();
+ void tick();
+ Sprite *expand();
+ Sprite *contract();
+ Sprite *setContact();
+ int stepSize() { return _ext->_seq[7]._dx; }
+ int distance(V3D pos);
+ int distance(Sprite * spr);
+ void turn(Dir d);
+ void park();
+ int len(V2D v);
+ bool findWay();
+ static int snap(int p, int q, int grid);
+ void walkTo(V3D pos);
+ void walkTo(V2D pos) { walkTo(screenToGround(pos)); }
+ V3D screenToGround(V2D pos);
+ void walkTo(Sprite *spr);
+ void say() { step(_sayStart); }
+ void fun();
+ void resetFun() { _funDel = _funDel0; }
+ void hStep();
+ bool lower(Sprite * spr);
+ int cross(const V2D &a, const V2D &b);
+ int mapCross(const V2D &a, const V2D &b);
+ int mapCross(const V3D &a, const V3D &b);
+ Hero *other() { return _vm->_heroTab[!(_ref & 1)]->_ptr;}
+ Action action() { return (Action)(_ref % 10); }
+ void reach(int mode);
+ void setCurrent();
+ void setScene(int c);
+ void operator++();
+ void operator--();
+};
+
+} // End of namespace CGE2
+
+#endif // CGE2_HERO_H
diff --git a/engines/cge2/inventory.cpp b/engines/cge2/inventory.cpp
new file mode 100644
index 0000000000..e62aa01e99
--- /dev/null
+++ b/engines/cge2/inventory.cpp
@@ -0,0 +1,104 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "cge2/cge2.h"
+#include "cge2/hero.h"
+
+namespace CGE2 {
+
+int CGE2Engine::findActivePocket(int ref) {
+ for (int i = 0; i < kPocketMax; i++) {
+ Sprite *spr = _heroTab[_sex]->_pocket[i];
+ if (ref >= 0) {
+ if (spr && (spr->_ref == ref))
+ return i;
+ } else if (!spr)
+ return i;
+ }
+ return -1;
+}
+
+void CGE2Engine::selectPocket(int n) {
+ Sprite **p = _heroTab[_sex]->_pocket;
+ int &pp = _heroTab[_sex]->_pocPtr;
+ if ((n < 0) || (pp == n)) {
+ n = findActivePocket(-1);
+ if (n >= 0)
+ pp = n;
+ } else if (p[n])
+ pp = n;
+}
+
+void CGE2Engine::pocFul() {
+ Hero *h = _heroTab[_sex]->_ptr;
+ h->park();
+ _commandHandler->addCommand(kCmdWait, -1, -1, h);
+ _commandHandler->addCommand(kCmdSound, -1, 2, h);
+ _commandHandler->addCommand(kCmdSay, -1, kPocketFull + _sex, h);
+}
+
+void CGE2Engine::releasePocket(Sprite *spr) {
+ for (int i = 0; i < 2; i++) {
+ for (int j = 0; j < kPocketMax; j++) {
+ Sprite *&poc = _heroTab[i]->_pocket[j];
+ if (poc == spr) {
+ spr->_flags._kept = false;
+ poc = nullptr;
+ return;
+ }
+ }
+ }
+}
+
+int CGE2Engine::freePockets(int sx) {
+ int n = 0;
+ for (int i = 0; i < kPocketMax; i++){
+ if (_heroTab[sx]->_pocket[i] == nullptr)
+ ++n;
+ }
+ return n;
+}
+
+void CGE2Engine::openPocket() {
+ for (int i = 0; i < 2; i++) {
+ for (int j = 0; j < kPocketMax + 1; j++) {
+ int ref = (int)_heroTab[i]->_downPocketId[j];
+ _heroTab[i]->_pocket[j] = (ref == -1) ? nullptr : _vga->_showQ->locate(ref);
+ }
+ }
+}
+
+void CGE2Engine::closePocket() {
+ for (int i = 0; i < 2; i++) {
+ for (int j = 0; j < kPocketMax + 1; j++) {
+ Sprite *spr = _heroTab[i]->_pocket[j];
+ _heroTab[i]->_downPocketId[j] = (spr) ? spr->_ref : -1;
+ }
+ }
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/map.cpp b/engines/cge2/map.cpp
new file mode 100644
index 0000000000..1ed0ea7daf
--- /dev/null
+++ b/engines/cge2/map.cpp
@@ -0,0 +1,92 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "cge2/map.h"
+
+namespace CGE2 {
+
+Map::Map(CGE2Engine *vm) :_vm(vm) {}
+
+Map::~Map() {
+ _container.clear();
+}
+
+void Map::clear() {
+ _container.clear();
+}
+
+void Map::load(int scene) {
+ clear();
+
+ char fname[] = "%.2d.MAP\0";
+ Common::String fileName = Common::String::format(fname, scene);
+ if (!_vm->_resman->exist(fileName.c_str()))
+ return;
+
+ EncryptedStream file(_vm, fileName.c_str());
+
+ Common::String line;
+ for (line = file.readLine(); !file.eos(); line = file.readLine()) {
+ if (line.empty())
+ continue;
+
+ char tmpStr[kLineMax + 1];
+ Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
+
+ char *currPos = tmpStr;
+ int x = nextNum(currPos);
+ while (true) {
+ int y = nextNum(nullptr);
+ _container.push_back(V2D(_vm, convertCoord(x), convertCoord(y)));
+ x = nextNum(nullptr);
+ if (x == -1) // We stop if there are no more data left to process in the current line.
+ break;
+ }
+ }
+}
+
+int Map::nextNum(char *currPos) {
+ currPos = strtok(currPos, " (),");
+ if (currPos == nullptr)
+ return -1;
+ int num = atoi(currPos);
+ return num;
+}
+
+int Map::convertCoord(int coord) {
+ return (coord + (kMapGrid >> 1)) & kMapMask;
+}
+
+int Map::size() {
+ return _container.size();
+}
+
+V2D *Map::getCoord(int idx) {
+ return &_container[idx];
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/map.h b/engines/cge2/map.h
new file mode 100644
index 0000000000..206479b929
--- /dev/null
+++ b/engines/cge2/map.h
@@ -0,0 +1,55 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_MAP_H
+#define CGE2_MAP_H
+
+#include "cge2/vga13h.h"
+
+namespace CGE2 {
+
+#define kMapGrid 4
+#define kMapMask (~(kMapGrid - 1))
+
+class Map {
+ CGE2Engine *_vm;
+ Common::Array<V2D> _container;
+
+ int convertCoord(int coord);
+ int nextNum(char *currPos);
+public:
+ Map(CGE2Engine *vm);
+ ~Map();
+ void clear();
+ void load(int scene);
+ int size();
+ V2D *getCoord(int idx);
+};
+
+} // End of namespace CGE2
+
+#endif // CGE2_MAP_H
diff --git a/engines/cge2/module.mk b/engines/cge2/module.mk
new file mode 100644
index 0000000000..4b321d88a8
--- /dev/null
+++ b/engines/cge2/module.mk
@@ -0,0 +1,30 @@
+MODULE := engines/cge2
+
+MODULE_OBJS = \
+ cge2.o \
+ detection.o \
+ fileio.o \
+ vga13h.o \
+ bitmap.o \
+ sound.o \
+ cge2_main.o \
+ text.o \
+ hero.o \
+ snail.o \
+ spare.o \
+ talk.o \
+ events.o \
+ map.o \
+ vmenu.o \
+ saveload.o \
+ toolbar.o \
+ inventory.o \
+ console.o
+
+# This module can be built as a plugin
+ifeq ($(ENABLE_CGE2), DYNAMIC_PLUGIN)
+PLUGIN := 1
+endif
+
+# Include common rules
+include $(srcdir)/rules.mk
diff --git a/engines/cge2/saveload.cpp b/engines/cge2/saveload.cpp
new file mode 100644
index 0000000000..fd60422dff
--- /dev/null
+++ b/engines/cge2/saveload.cpp
@@ -0,0 +1,279 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "common/config-manager.h"
+#include "common/savefile.h"
+#include "common/system.h"
+#include "graphics/thumbnail.h"
+#include "graphics/surface.h"
+#include "graphics/palette.h"
+#include "graphics/scaler.h"
+#include "cge2/events.h"
+#include "cge2/snail.h"
+#include "cge2/hero.h"
+#include "cge2/text.h"
+#include "cge2/sound.h"
+#include "cge2/cge2_main.h"
+
+namespace CGE2 {
+
+#define kSavegameCheckSum (1997 + _now + _sex + kWorldHeight)
+#define kBadSVG 99
+
+bool CGE2Engine::canSaveGameStateCurrently() {
+ return (_gamePhase == kPhaseInGame) && _mouse->_active &&
+ _commandHandler->idle() && (_soundStat._wait == nullptr);
+}
+
+Common::Error CGE2Engine::saveGameState(int slot, const Common::String &desc) {
+ storeHeroPos();
+ saveGame(slot, desc);
+ sceneUp(_now);
+ return Common::kNoError;
+}
+
+void CGE2Engine::saveGame(int slotNumber, const Common::String &desc) {
+ // Set up the serializer
+ Common::String slotName = generateSaveName(slotNumber);
+ Common::OutSaveFile *saveFile = g_system->getSavefileManager()->openForSaving(slotName);
+
+ // Write out the ScummVM savegame header
+ SavegameHeader header;
+ header.saveName = desc;
+ header.version = kSavegameVersion;
+ writeSavegameHeader(saveFile, header);
+
+ // Write out the data of the savegame
+ sceneDown();
+ syncGame(nullptr, saveFile);
+
+ // Finish writing out game data
+ saveFile->finalize();
+ delete saveFile;
+}
+
+bool CGE2Engine::canLoadGameStateCurrently() {
+ return (_gamePhase == kPhaseInGame) && _mouse->_active;
+}
+
+Common::Error CGE2Engine::loadGameState(int slot) {
+ _commandHandler->clear();
+ _commandHandlerTurbo->clear();
+ sceneDown();
+ if (!loadGame(slot))
+ return Common::kReadingFailed;
+ sceneUp(_now);
+ initToolbar();
+ return Common::kNoError;
+}
+
+bool CGE2Engine::loadGame(int slotNumber) {
+ Common::MemoryReadStream *readStream;
+
+ // Open up the savegame file
+ Common::String slotName = generateSaveName(slotNumber);
+ Common::InSaveFile *saveFile = g_system->getSavefileManager()->openForLoading(slotName);
+
+ // Read the data into a data buffer
+ int size = saveFile->size();
+ byte *dataBuffer = (byte *)malloc(size);
+ saveFile->read(dataBuffer, size);
+ readStream = new Common::MemoryReadStream(dataBuffer, size, DisposeAfterUse::YES);
+ delete saveFile;
+
+ // Check to see if it's a ScummVM savegame or not
+ char buffer[kSavegameStrSize + 1];
+ readStream->read(buffer, kSavegameStrSize + 1);
+
+ if (strncmp(buffer, kSavegameStr, kSavegameStrSize + 1) != 0) {
+ delete readStream;
+ return false;
+ } else {
+ SavegameHeader saveHeader;
+
+ if (!readSavegameHeader(readStream, saveHeader)) {
+ delete readStream;
+ return false;
+ }
+
+ // Delete the thumbnail
+ saveHeader.thumbnail->free();
+ delete saveHeader.thumbnail;
+ }
+
+ resetGame();
+
+ // Get in the savegame
+ syncGame(readStream, nullptr);
+ delete readStream;
+
+ loadHeroes();
+
+ return true;
+}
+
+void CGE2Engine::resetGame() {
+ _busyPtr = nullptr;
+ busy(false);
+ _spare->clear();
+ _vga->_showQ->clear();
+ loadScript("CGE.INI", true);
+ delete _infoLine;
+ _infoLine = new InfoLine(this, kInfoW);
+}
+
+void CGE2Engine::writeSavegameHeader(Common::OutSaveFile *out, SavegameHeader &header) {
+ // Write out a savegame header
+ out->write(kSavegameStr, kSavegameStrSize + 1);
+
+ out->writeByte(kSavegameVersion);
+
+ // Write savegame name
+ out->write(header.saveName.c_str(), header.saveName.size() + 1);
+
+ // Get the active palette
+ uint8 thumbPalette[256 * 3];
+ g_system->getPaletteManager()->grabPalette(thumbPalette, 0, 256);
+
+ // Stop the heroes from moving and redraw them before taking the picture.
+ for (int i = 0; i < 2; i++)
+ _heroTab[i]->_ptr->park();
+ _vga->show();
+
+ // Create a thumbnail and save it
+ Graphics::Surface *thumb = new Graphics::Surface();
+ Graphics::Surface *s = _vga->_page[0];
+ ::createThumbnail(thumb, (const byte *)s->getPixels(), kScrWidth, kScrHeight, thumbPalette);
+ Graphics::saveThumbnail(*out, *thumb);
+ thumb->free();
+ delete thumb;
+
+ // Write out the save date/time
+ TimeDate td;
+ g_system->getTimeAndDate(td);
+ out->writeSint16LE(td.tm_year + 1900);
+ out->writeSint16LE(td.tm_mon + 1);
+ out->writeSint16LE(td.tm_mday);
+ out->writeSint16LE(td.tm_hour);
+ out->writeSint16LE(td.tm_min);
+}
+
+bool CGE2Engine::readSavegameHeader(Common::InSaveFile *in, SavegameHeader &header) {
+ header.thumbnail = nullptr;
+
+ // Get the savegame version
+ header.version = in->readByte();
+ if (header.version > kSavegameVersion)
+ return false;
+
+ // Read in the string
+ header.saveName.clear();
+ char ch;
+ while ((ch = (char)in->readByte()) != '\0')
+ header.saveName += ch;
+
+ // Get the thumbnail
+ header.thumbnail = Graphics::loadThumbnail(*in);
+ if (!header.thumbnail)
+ return false;
+
+ // Read in save date/time
+ header.saveYear = in->readSint16LE();
+ header.saveMonth = in->readSint16LE();
+ header.saveDay = in->readSint16LE();
+ header.saveHour = in->readSint16LE();
+ header.saveMinutes = in->readSint16LE();
+
+ return true;
+}
+
+void CGE2Engine::syncGame(Common::SeekableReadStream *readStream, Common::WriteStream *writeStream) {
+ Common::Serializer s(readStream, writeStream);
+
+ // Synchronise header data
+ syncHeader(s);
+
+ // Synchronise _spare
+ _spare->sync(s);
+
+ if (s.isSaving()) {
+ // Save the references of the items in the heroes pockets:
+ for (int i = 0; i < 2; i++) {
+ for (int j = 0; j < kPocketMax; j++) {
+ int ref = _heroTab[i]->_downPocketId[j];
+ s.syncAsSint16LE(ref);
+ }
+ }
+ } else {
+ // Load items to the pockets
+ for (int i = 0; i < 2; i++) {
+ for (int j = 0; j < kPocketMax; j++) {
+ int ref = 0;
+ s.syncAsSint16LE(ref);
+ _heroTab[i]->_downPocketId[j] = ref;
+ }
+ }
+ }
+
+ // Heroes' _posTabs
+ for (int i = 0; i < 2; i++) {
+ for (int j = 0; j < kSceneMax; j++) {
+ s.syncAsSint16LE(_heroTab[i]->_posTab[j]->x);
+ s.syncAsSint16LE(_heroTab[i]->_posTab[j]->y);
+ }
+ }
+}
+
+void CGE2Engine::syncHeader(Common::Serializer &s) {
+ s.syncAsUint16LE(_now);
+ s.syncAsUint16LE(_sex);
+ s.syncAsUint16LE(_vga->_rot._len);
+ s.syncAsUint16LE(_waitSeq);
+ s.syncAsUint16LE(_waitRef);
+
+ if (s.isSaving()) {
+ // Write checksum
+ int checksum = kSavegameCheckSum;
+ s.syncAsUint16LE(checksum);
+ } else {
+ // Read checksum and validate it
+ uint16 checksum = 0;
+ s.syncAsUint16LE(checksum);
+ if (checksum != kSavegameCheckSum)
+ error("%s", _text->getText(kBadSVG));
+ }
+}
+
+/**
+* Support method that generates a savegame name
+* @param slot Slot number
+*/
+Common::String CGE2Engine::generateSaveName(int slot) {
+ return Common::String::format("%s.%03d", _targetName.c_str(), slot);
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/snail.cpp b/engines/cge2/snail.cpp
new file mode 100644
index 0000000000..0bf63839e9
--- /dev/null
+++ b/engines/cge2/snail.cpp
@@ -0,0 +1,865 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "cge2/snail.h"
+#include "cge2/fileio.h"
+#include "cge2/hero.h"
+#include "cge2/text.h"
+#include "cge2/sound.h"
+#include "cge2/events.h"
+
+namespace CGE2 {
+
+const char *CommandHandler::_commandText[] = {
+ "NOP", "USE", "PAUSE", "INF", "CAVE", "SETX", "SETY", "SETZ", "ADD",
+ "FLASH", "CYCLE", "CLEAR", "MOUSE", "MAP", "MIDI", ".DUMMY.", "WAIT",
+ "HIDE", "ROOM", "SAY", "SOUND", "KILL", "RSEQ", "SEQ", "SEND", "SWAP",
+ "KEEP", "GIVE", "GETPOS", "GOTO", "PORT", "NEXT", "NNEXT", "MTNEXT",
+ "FTNEXT", "RNNEXT", "RMTNEXT", "RFTNEXT", "RMNEAR", "RMMTAKE", "RMFTAKE",
+ "SETREF", "WALKTO", "REACH", "COVER", "UNCOVER", "EXEC", "GHOST",
+ nullptr };
+
+CommandHandler::CommandHandler(CGE2Engine *vm, bool turbo)
+ : _turbo(turbo), _textDelay(false), _timerExpiry(0), _talkEnable(true),
+ _head(0), _tail(0), _commandList((Command *)malloc(sizeof(Command)* 256)),
+ _vm(vm) {
+}
+
+CommandHandler::~CommandHandler() {
+ free(_commandList);
+}
+
+void CommandHandler::runCommand() {
+ if (!_turbo && _vm->_soundStat._wait) {
+ if (*(_vm->_soundStat._wait))
+ return;
+
+ ++_vm->_soundStat._ref[0];
+ if (_vm->_fx->exist(_vm->_soundStat._ref[1], _vm->_soundStat._ref[0])) {
+ int16 oldRepeat = _vm->_sound->getRepeat();
+ _vm->_sound->setRepeat(1);
+ _vm->_sound->play(Audio::Mixer::kSFXSoundType, _vm->_fx->load(_vm->_soundStat._ref[1], _vm->_soundStat._ref[0]), _vm->_sound->_smpinf._span);
+ _vm->_sound->setRepeat(oldRepeat);
+ return;
+ }
+ _vm->_soundStat._wait = nullptr;
+ }
+
+ uint8 tmpHead = _head;
+ while (_tail != tmpHead) {
+ Command tailCmd = _commandList[_tail];
+
+ if (!_turbo) { // only for the slower one
+ if (_vm->_waitRef)
+ break;
+
+ if (_timerExpiry) {
+ // Delay in progress
+ if (_timerExpiry > g_system->getMillis())
+ // Delay not yet ended
+ break;
+
+ // Delay is finished
+ _timerExpiry = 0;
+ } else if (_textDelay) {
+ if (_vm->_talk) {
+ _vm->snKill((Sprite *)_vm->_talk);
+ _vm->_talk = nullptr;
+ }
+ _textDelay = false;
+ }
+
+ if (_vm->_talk && tailCmd._commandType != kCmdPause)
+ break;
+ }
+ ++_tail;
+ _vm->_taken = false;
+ Sprite *spr = nullptr;
+ if (tailCmd._commandType > kCmdSpr)
+ spr = (tailCmd._ref < 0) ? ((Sprite *)tailCmd._spritePtr) : _vm->locate(tailCmd._ref);
+
+ Common::String sprStr;
+ if (spr && *spr->_file && (tailCmd._commandType != kCmdGhost))
+ // In case of kCmdGhost _spritePtr stores a pointer to a Bitmap, not to a Sprite...
+ sprStr = Common::String(spr->_file);
+ else
+ sprStr = "None";
+
+ if (sprStr.empty())
+ sprStr = "None";
+ debugC(1, kCGE2DebugOpcode, "Command: %s; Ref: %d; Val: %d; Sprite: %s;", getComStr(tailCmd._commandType), tailCmd._ref, tailCmd._val, sprStr.c_str());
+
+ switch (tailCmd._commandType) {
+ case kCmdUse:
+ break;
+ case kCmdPause:
+ _timerExpiry = g_system->getMillis() + tailCmd._val * kCommandFrameDelay;
+ if (_vm->_talk)
+ _textDelay = true;
+ break;
+ case kCmdWait:
+ if (spr && spr->active() && (spr->_scene == _vm->_now || spr->_scene == 0)) {
+ _vm->_waitSeq = tailCmd._val;
+ _vm->_waitRef = spr->_ref;
+ }
+ break;
+ case kCmdHide:
+ _vm->snHide(spr, tailCmd._val);
+ break;
+ case kCmdSay:
+ _vm->snSay(spr, tailCmd._val);
+ break;
+ case kCmdInf:
+ if (_talkEnable)
+ _vm->inf(((tailCmd._val) >= 0) ? _vm->_text->getText(tailCmd._val) : (const char *)tailCmd._spritePtr);
+ break;
+ case kCmdCave:
+ _vm->switchScene(tailCmd._val);
+ break;
+ case kCmdMidi:
+ _vm->snMidi(tailCmd._val);
+ break;
+ case kCmdKill:
+ _vm->snKill(spr);
+ break;
+ case kCmdSeq:
+ _vm->snSeq(spr, tailCmd._val);
+ break;
+ case kCmdRSeq:
+ _vm->snRSeq(spr, tailCmd._val);
+ break;
+ case kCmdSend:
+ _vm->snSend(spr, tailCmd._val);
+ break;
+ case kCmdSwap:
+ _vm->snSwap(spr, tailCmd._val);
+ break;
+ case kCmdCover:
+ _vm->snCover(spr, tailCmd._val);
+ break;
+ case kCmdUncover:
+ _vm->snUncover(spr, (tailCmd._val >= 0) ? _vm->locate(tailCmd._val) : ((Sprite *)tailCmd._spritePtr));
+ break;
+ case kCmdKeep:
+ _vm->snKeep(spr, tailCmd._val);
+ break;
+ case kCmdGive:
+ _vm->snGive(spr, tailCmd._val);
+ break;
+ case kCmdSetX:
+ _vm->_point[tailCmd._val]->_x = tailCmd._ref;
+ break;
+ case kCmdSetY:
+ _vm->_point[tailCmd._val]->_y = tailCmd._ref;
+ break;
+ case kCmdSetZ:
+ _vm->_point[tailCmd._val]->_z = tailCmd._ref;
+ break;
+ case kCmdAdd:
+ *(_vm->_point[tailCmd._ref]) = *(_vm->_point[tailCmd._ref]) + *(_vm->_point[tailCmd._val]);
+ break;
+ case kCmdGetPos:
+ if (spr)
+ *(_vm->_point[tailCmd._val]) = spr->_pos3D;
+ break;
+ case kCmdGoto:
+ _vm->snGoto(spr, tailCmd._val);
+ break;
+ case kCmdPort:
+ _vm->snPort(spr, tailCmd._val);
+ break;
+ case kCmdNext:
+ break;
+ case kCmdMouse:
+ _vm->snMouse(tailCmd._val != 0);
+ break;
+ case kCmdNNext:
+ _vm->snNNext(spr, kNear, tailCmd._val);
+ break;
+ case kCmdMTNext:
+ _vm->snNNext(spr, kMTake, tailCmd._val);
+ break;
+ case kCmdFTNext:
+ _vm->snNNext(spr, kFTake, tailCmd._val);
+ break;
+ case kCmdRNNext:
+ _vm->snRNNext(spr, tailCmd._val);
+ break;
+ case kCmdRMTNext:
+ _vm->snRMTNext(spr, tailCmd._val);
+ break;
+ case kCmdRFTNext:
+ _vm->snRFTNext(spr, tailCmd._val);
+ break;
+ case kCmdRMNear:
+ _vm->snRmNear(spr);
+ break;
+ case kCmdRMMTake:
+ _vm->snRmMTake(spr);
+ break;
+ case kCmdRMFTake:
+ _vm->snRmFTake(spr);
+ break;
+ case kCmdSetRef:
+ _vm->snSetRef(spr, tailCmd._val);
+ break;
+ case kCmdFlash:
+ _vm->snFlash(tailCmd._val != 0);
+ break;
+ case kCmdCycle:
+ _vm->snCycle(tailCmd._val);
+ break;
+ case kCmdWalk:
+ _vm->snWalk(spr, tailCmd._val);
+ break;
+ case kCmdReach:
+ _vm->snReach(spr, tailCmd._val);
+ break;
+ case kCmdSound:
+ _vm->snSound(spr, tailCmd._val);
+ _vm->_sound->setRepeat(1);
+ break;
+ case kCmdMap:
+ _vm->_heroTab[tailCmd._ref & 1]->_ptr->_ignoreMap = tailCmd._val == 0;
+ break;
+ case kCmdRoom:
+ _vm->snRoom(spr, tailCmd._val);
+ break;
+ case kCmdExec:
+ switch (tailCmd._cbType) {
+ case kQGame:
+ _vm->qGame();
+ break;
+ case kXScene:
+ _vm->xScene();
+ break;
+ default:
+ error("Unknown Callback Type in SNEXEC");
+ break;
+ }
+ break;
+ case kCmdGhost:
+ _vm->snGhost((Bitmap *)tailCmd._spritePtr);
+ break;
+ case kCmdNop: // Do nothing.
+ break;
+ default:
+ warning("Unhandled command");
+ break;
+ }
+
+ if (_vm->_taken && spr)
+ _vm->_spare->dispose(spr);
+
+ if (!_turbo)
+ break;
+ }
+}
+
+void CGE2Engine::snKill(Sprite *spr) {
+ if (spr) {
+ if (spr->_flags._kept)
+ releasePocket(spr);
+ Sprite *nx = spr->_next;
+ hide1(spr);
+ _vga->_showQ->remove(spr);
+ _eventManager->clearEvent(spr);
+ if (spr->_flags._kill) {
+ _spare->take(spr->_ref);
+ delete spr;
+ } else {
+ spr->setScene(-1);
+ _spare->dispose(spr);
+ }
+ if (nx && nx->_flags._slav)
+ snKill(nx);
+ }
+}
+
+void CGE2Engine::snHide(Sprite *spr, int val) {
+ if (spr) {
+ spr->_flags._hide = (val >= 0) ? (val != 0) : (!spr->_flags._hide);
+ if (spr->_flags._shad)
+ spr->_prev->_flags._hide = spr->_flags._hide;
+ }
+}
+
+void CGE2Engine::snMidi(int val) {
+ if (val < 0)
+ _midiPlayer->killMidi();
+ else if (_music)
+ _midiPlayer->loadMidi(val);
+}
+
+void CGE2Engine::snSeq(Sprite *spr, int val) {
+ if (spr) {
+ if (isHero(spr) && (val == 0))
+ ((Hero*)spr)->park();
+ else
+ spr->step(val);
+ }
+}
+
+void CGE2Engine::snRSeq(Sprite *spr, int val) {
+ if (spr)
+ snSeq(spr, spr->_seqPtr + val);
+}
+
+void CGE2Engine::snSend(Sprite *spr, int val) {
+ if (!spr)
+ return;
+
+ // Sending", spr->_file
+ // from scene", spr->_scene
+ // to scene", val
+ bool was1 = (_vga->_showQ->locate(spr->_ref) != nullptr);
+ bool val1 = (val == 0 || val == _now);
+ spr->_scene = val;
+ releasePocket(spr);
+ if (val1 != was1) {
+ if (was1) {
+ // deactivating
+ hide1(spr);
+ spr->_flags._slav = false;
+ if ((spr == _heroTab[_sex]->_ptr) && (_heroTab[!_sex]->_ptr->_scene == _now))
+ switchHero(!_sex);
+ _spare->dispose(spr);
+ } else {
+ // activating
+ if (byte(spr->_ref) == 0)
+ _bitmapPalette = _vga->_sysPal;
+ _vga->_showQ->insert(spr);
+ if (isHero(spr)) {
+ V2D p = *_heroTab[spr->_ref & 1]->_posTab[val];
+ spr->gotoxyz(V3D(p.x, 0, p.y));
+ ((Hero*)spr)->setCurrent();
+ }
+ _taken = false;
+ _bitmapPalette = nullptr;
+ }
+ }
+}
+
+void CGE2Engine::snSwap(Sprite *spr, int val) {
+ bool tak = _taken;
+ Sprite *xspr = locate(val);
+ if (spr && xspr) {
+ bool was1 = (_vga->_showQ->locate(spr->_ref) != nullptr);
+ bool xwas1 = (_vga->_showQ->locate(val) != nullptr);
+
+ int tmp = spr->_scene;
+ spr->setScene(xspr->_scene);
+ xspr->setScene(tmp);
+
+ SWAP(spr->_pos2D, xspr->_pos2D);
+ SWAP(spr->_pos3D, xspr->_pos3D);
+ if (spr->_flags._kept)
+ swapInPocket(spr, xspr);
+ if (xwas1 != was1) {
+ if (was1) {
+ hide1(spr);
+ _spare->dispose(spr);
+ } else
+ expandSprite(spr);
+ if (xwas1) {
+ hide1(xspr);
+ _spare->dispose(xspr);
+ } else {
+ expandSprite(xspr);
+ _taken = false;
+ }
+ }
+ }
+ if (_taken)
+ _spare->dispose(xspr);
+ _taken = tak;
+}
+
+void CGE2Engine::snCover(Sprite *spr, int val) {
+ bool tak = _taken;
+ Sprite *xspr = locate(val);
+ if (spr && xspr) {
+ spr->_flags._hide = true;
+ xspr->setScene(spr->_scene);
+ xspr->gotoxyz(spr->_pos3D);
+ expandSprite(xspr);
+ if ((xspr->_flags._shad = spr->_flags._shad) == true) {
+ _vga->_showQ->insert(_vga->_showQ->remove(spr->_prev), xspr);
+ spr->_flags._shad = false;
+ }
+ feedSnail(xspr, kNear, _heroTab[_sex]->_ptr);
+ _taken = false;
+ }
+ if (_taken)
+ _spare->dispose(xspr);
+ _taken = tak;
+}
+
+void CGE2Engine::snUncover(Sprite *spr, Sprite *spr2) {
+ if (spr && spr2) {
+ spr->_flags._hide = false;
+ spr->setScene(spr2->_scene);
+ if ((spr->_flags._shad = spr2->_flags._shad) == true) {
+ _vga->_showQ->insert(_vga->_showQ->remove(spr2->_prev), spr);
+ spr2->_flags._shad = false;
+ }
+ spr->gotoxyz(spr2->_pos3D);
+ snSend(spr2, -1);
+ if (spr->_time == 0)
+ ++spr->_time;
+ }
+}
+
+void CGE2Engine::snKeep(Sprite *spr, int stp) {
+ int sex = _sex;
+ if (stp > 127) {
+ _sex = stp & 1; // for another hero
+ stp = -1;
+ }
+ HeroTab *ht = _heroTab[_sex];
+ selectPocket(-1);
+ int pp = ht->_pocPtr;
+
+ if (spr && !spr->_flags._kept && ht->_pocket[pp] == nullptr) {
+ V3D pos(14, -10, -1);
+ int16 oldRepeat = _sound->getRepeat();
+ _sound->setRepeat(1);
+ snSound(ht->_ptr, 3);
+ _sound->setRepeat(oldRepeat);
+ if (_taken) {
+ _vga->_showQ->insert(spr);
+ _taken = false;
+ }
+ ht->_pocket[pp] = spr;
+ spr->setScene(0);
+ spr->_flags._kept = true;
+ if (!_sex)
+ pos._x += kScrWidth - 58;
+ if (pp & 1)
+ pos._x += 29;
+ if (pp >> 1)
+ pos._y -= 20;
+ pos._y -= (spr->_siz.y / 2);
+ spr->gotoxyz(pos);
+ if (stp >= 0)
+ spr->step(stp);
+ }
+ _sex = sex;
+ selectPocket(-1);
+}
+
+void CGE2Engine::snGive(Sprite *spr, int val) {
+ if (spr) {
+ int p = findActivePocket(spr->_ref);
+ if (p >= 0) {
+ releasePocket(spr);
+ spr->setScene(_now);
+ if (val >= 0)
+ spr->step(val);
+ }
+ }
+ selectPocket(-1);
+}
+
+void CGE2Engine::snGoto(Sprite *spr, int val) {
+ if (spr) {
+ V3D eye = *_eye;
+ if (spr->_scene > 0)
+ setEye(*_eyeTab[spr->_scene]);
+ spr->gotoxyz(*_point[val]);
+ setEye(eye);
+ }
+}
+
+void CGE2Engine::snPort(Sprite *spr, int port) {
+ if (spr)
+ spr->_flags._port = (port < 0) ? !spr->_flags._port : (port != 0);
+}
+
+void CGE2Engine::snMouse(bool on) {
+ if (on)
+ _mouse->on();
+ else
+ _mouse->off();
+}
+
+void CGE2Engine::snNNext(Sprite *spr, Action act, int val) {
+ if (spr) {
+ if (val > 255)
+ val = spr->labVal(act, val >> 8);
+ spr->_actionCtrl[act]._ptr = val;
+ }
+}
+
+void CGE2Engine::snRNNext(Sprite *spr, int val) {
+ if (spr)
+ spr->_actionCtrl[kNear]._ptr += val;
+}
+
+void CGE2Engine::snRMTNext(Sprite *spr, int val) {
+ if (spr)
+ spr->_actionCtrl[kMTake]._ptr += val;
+}
+
+void CGE2Engine::snRFTNext(Sprite * spr, int val) {
+ if (spr)
+ spr->_actionCtrl[kFTake]._ptr += val;
+}
+
+void CGE2Engine::snRmNear(Sprite *spr) {
+ if (spr)
+ spr->_actionCtrl[kNear]._cnt = 0;
+}
+
+void CGE2Engine::snRmMTake(Sprite *spr) {
+ if (spr)
+ spr->_actionCtrl[kMTake]._cnt = 0;
+}
+
+void CGE2Engine::snRmFTake(Sprite *spr) {
+ if (spr)
+ spr->_actionCtrl[kFTake]._cnt = 0;
+}
+
+void CGE2Engine::snSetRef(Sprite *spr, int val) {
+ if (spr)
+ spr->_ref = val;
+}
+
+void CGE2Engine::snFlash(bool on) {
+ if (on) {
+ Dac *pal = (Dac *)malloc(sizeof(Dac) * kPalCount);
+ if (pal) {
+ memcpy(pal, _vga->_sysPal, kPalSize);
+ for (int i = 0; i < kPalCount; i++) {
+ register int c;
+ c = pal[i]._r << 1;
+ pal[i]._r = (c < 64) ? c : 63;
+ c = pal[i]._g << 1;
+ pal[i]._g = (c < 64) ? c : 63;
+ c = pal[i]._b << 1;
+ pal[i]._b = (c < 64) ? c : 63;
+ }
+ _vga->setColors(pal, 64);
+ }
+
+ free(pal);
+ } else
+ _vga->setColors(_vga->_sysPal, 64);
+ _dark = false;
+}
+
+void CGE2Engine::snCycle(int cnt) {
+ _vga->_rot._len = cnt;
+}
+
+void CGE2Engine::snWalk(Sprite *spr, int val) {
+ if (isHero(spr)) {
+ if (val < kMaxPoint)
+ ((Hero *)spr)->walkTo(*_point[val]);
+ else {
+ Sprite *s = _vga->_showQ->locate(val);
+ if (s)
+ ((Hero *)spr)->walkTo(s);
+ }
+ ((Hero *)spr)->_time = 1;
+ }
+}
+
+void CGE2Engine::snReach(Sprite *spr, int val) {
+ if (isHero(spr))
+ ((Hero *)spr)->reach(val);
+}
+
+void CGE2Engine::snSound(Sprite *spr, int wav, Audio::Mixer::SoundType soundType) {
+ if (wav == -1)
+ _sound->stop();
+ else {
+ if (_sound->_smpinf._counter && wav < 20)
+ return;
+ if (_soundStat._wait && ((wav & 255) > 80))
+ return;
+
+ _soundStat._ref[1] = wav;
+ _soundStat._ref[0] = !_fx->exist(_soundStat._ref[1]);
+ _sound->play(soundType, _fx->load(_soundStat._ref[1], _soundStat._ref[0]),
+ (spr) ? (spr->_pos2D.x / (kScrWidth / 16)) : 8);
+ }
+}
+
+void CGE2Engine::snRoom(Sprite *spr, bool on) {
+ if (!isHero(spr))
+ return;
+
+ int sex = spr->_ref & 1;
+ Sprite **p = _heroTab[sex]->_pocket;
+ if (on) {
+ if (freePockets(sex) == 0 && p[kPocketMax] == nullptr) {
+ SWAP(p[kPocketMax], p[kPocketMax - 1]);
+ snHide(p[kPocketMax], 1);
+ }
+ } else if (p[kPocketMax]) {
+ for (int i = 0; i < kPocketMax; i++) {
+ if (p[i] == nullptr) {
+ snHide(p[kPocketMax], 0);
+ SWAP(p[kPocketMax], p[i]);
+ break;
+ }
+ }
+ }
+}
+
+void CGE2Engine::snGhost(Bitmap *bmp) {
+ V2D p(this, bmp->_map & 0xFFFF, bmp->_map >> 16);
+ bmp->hide(p);
+ bmp->release();
+ delete[] bmp->_b;
+ bmp->_b = nullptr;
+ delete bmp;
+ bmp = nullptr;
+}
+
+void CGE2Engine::snSay(Sprite *spr, int val) {
+ if (spr && spr->active() && _commandHandler->_talkEnable) {
+ //-- mouth animation
+ if (isHero(spr) && spr->seqTest(-1))
+ ((Hero *)spr)->say();
+ if (_sayCap)
+ _text->say(_text->getText(val), spr);
+ if (_sayVox) {
+ int i = val;
+ if (i < 256)
+ i -= 100;
+ int16 oldRepeat = _sound->getRepeat();
+ _sound->setRepeat(1);
+ snSound(spr, i, Audio::Mixer::kSpeechSoundType);
+ _sound->setRepeat(oldRepeat);
+ _soundStat._wait = &_sound->_smpinf._counter;
+ }
+ }
+}
+
+void CGE2Engine::hide1(Sprite *spr) {
+ _commandHandlerTurbo->addCommand(kCmdGhost, -1, 0, spr->ghost());
+}
+
+void CGE2Engine::swapInPocket(Sprite *spr, Sprite *xspr) {
+ for (int i = 0; i < 2; i++) {
+ for (int j = 0; j < kPocketMax; j++) {
+ Sprite *&poc = _heroTab[i]->_pocket[j];
+ if (poc == spr) {
+ spr->_flags._kept = false;
+ poc = xspr;
+ xspr->_flags._kept = true;
+ xspr->_flags._port = false;
+ return;
+ }
+ }
+ }
+}
+
+Sprite *CGE2Engine::expandSprite(Sprite *spr) {
+ if (spr)
+ _vga->_showQ->insert(spr);
+ return spr;
+}
+
+void CGE2Engine::qGame() {
+ // Write out the user's progress
+ saveGame(0, Common::String("Automatic Savegame"));
+
+ busy(false);
+ _vga->sunset();
+ _endGame = true;
+}
+
+void CGE2Engine::xScene() {
+ sceneDown();
+ sceneUp(_req);
+}
+
+void CommandHandler::addCommand(CommandType com, int ref, int val, void *ptr) {
+ if (ref == -2)
+ ref = 142 - _vm->_sex;
+ Command *headCmd = &_commandList[_head++];
+ headCmd->_commandType = com;
+ headCmd->_ref = ref;
+ headCmd->_val = val;
+ headCmd->_spritePtr = ptr;
+ headCmd->_cbType = kNullCB;
+ if (headCmd->_commandType == kCmdClear) {
+ clear();
+ }
+}
+
+void CommandHandler::addCallback(CommandType com, int ref, int val, CallbackType cbType) {
+ Command *headCmd = &_commandList[_head++];
+ headCmd->_commandType = com;
+ headCmd->_ref = ref;
+ headCmd->_val = val;
+ headCmd->_spritePtr = nullptr;
+ headCmd->_cbType = cbType;
+ if (headCmd->_commandType == kCmdClear) {
+ _tail = _head;
+ _vm->killText();
+ _timerExpiry = 0;
+ }
+}
+
+void CommandHandler::insertCommand(CommandType com, int ref, int val, void *ptr) {
+ if (ref == -2)
+ ref = 142 - _vm->_sex;
+ --_tail;
+ Command *tailCmd = &_commandList[_tail];
+ tailCmd->_commandType = com;
+ tailCmd->_ref = ref;
+ tailCmd->_val = val;
+ tailCmd->_spritePtr = ptr;
+ tailCmd->_cbType = kNullCB;
+ if (com == kCmdClear) {
+ _tail = _head;
+ _vm->killText();
+ _timerExpiry = 0;
+ }
+}
+
+bool CommandHandler::idle() {
+ return (!_vm->_waitRef && _head == _tail);
+}
+
+void CommandHandler::clear() {
+ _tail = _head;
+ _vm->killText();
+ _timerExpiry = 0;
+}
+
+int CommandHandler::getComId(const char *com) {
+ int i = _vm->takeEnum(_commandText, com);
+ return (i < 0) ? i : i + kCmdCom0 + 1;
+}
+
+const char *CommandHandler::getComStr(CommandType cmdType) {
+ return _commandText[cmdType - kCmdNop];
+}
+
+void CGE2Engine::feedSnail(Sprite *spr, Action snq, Hero *hero) {
+ if (!spr || !spr->active())
+ return;
+
+ int cnt = spr->_actionCtrl[snq]._cnt;
+ if (cnt) {
+ byte ptr = spr->_actionCtrl[snq]._ptr;
+ CommandHandler::Command *comtab = spr->snList(snq);
+ CommandHandler::Command *c = &comtab[ptr];
+ CommandHandler::Command *q = &comtab[cnt];
+
+ if (hero != nullptr) {
+ int pocFre = freePockets(hero->_ref & 1);
+ int pocReq = 0;
+ CommandHandler::Command *p = c;
+ for (; p < q && p->_commandType != kCmdNext; p++) { // scan commands
+ // drop from pocket?
+ if ((p->_commandType == kCmdSend && p->_val != _now)
+ || p->_commandType == kCmdGive) {
+ int ref = p->_ref;
+ if (ref < 0)
+ ref = spr->_ref;
+ if (findActivePocket(ref) >= 0)
+ --pocReq;
+ }
+ // make/dispose additional room?
+ if (p->_commandType == kCmdRoom) {
+ if (p->_val == 0)
+ ++pocReq;
+ else
+ --pocReq;
+ }
+ // put into pocket?
+ if (p->_commandType == kCmdKeep)
+ ++pocReq;
+ // overloaded?
+ if (pocReq > pocFre) {
+ pocFul();
+ return;
+ }
+ }
+ }
+
+ while (c < q) {
+ if ((c->_val == -1) && (c->_commandType == kCmdWalk || c->_commandType == kCmdReach))
+ c->_val = spr->_ref;
+
+ if (c->_commandType == kCmdNext) {
+ Sprite *s;
+
+ switch (c->_ref) {
+ case -2:
+ s = hero;
+ break;
+ case -1:
+ s = spr;
+ break;
+ default:
+ s = _vga->_showQ->locate(c->_ref);
+ break;
+ }
+
+ if (s && s->_actionCtrl[snq]._cnt) {
+ int v;
+ switch (c->_val) {
+ case -1:
+ v = int(c - comtab + 1);
+ break;
+ case -2:
+ v = int(c - comtab);
+ break;
+ case -3:
+ v = -1;
+ break;
+ default:
+ v = c->_val;
+ if ((v > 255) && s)
+ v = s->labVal(snq, v >> 8);
+ break;
+ }
+ if (v >= 0)
+ s->_actionCtrl[snq]._ptr = v;
+ }
+
+ if (s == spr)
+ break;
+ }
+
+ _commandHandler->addCommand(c->_commandType, c->_ref, c->_val, spr);
+
+ ++c;
+ }
+ }
+
+}
+
+} // End of namespace CGE2.
diff --git a/engines/cge2/snail.h b/engines/cge2/snail.h
new file mode 100644
index 0000000000..7e618daac8
--- /dev/null
+++ b/engines/cge2/snail.h
@@ -0,0 +1,129 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_SNAIL_H
+#define CGE2_SNAIL_H
+
+#include "cge2/cge2.h"
+
+namespace CGE2 {
+
+#define kCommandFrameRate 80
+#define kCommandFrameDelay (1000 / kCommandFrameRate)
+#define kNoByte -1 // Recheck this! We have no proof for it's original value.
+
+
+enum CommandType {
+ kCmdCom0 = 128,
+ kCmdNop, // NOP :: do nothing
+ kCmdUse, // USE <spr> <cav>|<lab> :: hint for using
+ kCmdPause, // PAUSE -1 <dly> :: delay <dly>/72 seconds
+ kCmdInf, // INF -1 <ref> :: show text referrenced by <ref>
+ kCmdCave, // CAVE -1 <cav> :: go to board <cav>
+ kCmdSetX, // SETX <x> <idx> :: set sprite shift in x axis
+ kCmdSetY, // SETX <y> <idx> :: set sprite shift in y axis
+ kCmdSetZ, // SETX <z> <idx> :: set sprite shift in z axis
+ kCmdAdd, // ADD <idx1> <idx2> :: sum vectors
+ kCmdFlash, // FLASH -1 0|1 :: lighten whole image (on/off)
+ kCmdCycle, // CYCLE <cnt> :: rotate <cnt> colors from 1
+ kCmdClear, // CLEAR -1 0 :: clear kCmdAIL queue
+ kCmdMouse, // MOUSE -1 0|1 :: enable mouse (on/off)
+ kCmdMap, // MAP 0|1 0 :: temporarily turn off map for hero
+ kCmdMidi, // MIDI -1 <midi> :: play MIDI referenced by <midi> (-1 = off)
+
+ kCmdSpr,
+
+ kCmdWait, // WAIT <spr> <seq>|-1 :: wait for SEQ <seq> (-1 = freeze)
+ kCmdHide, // HIDE <spr> 0|1 :: visibility of sprite
+ kCmdRoom, // ROOM <hero> 0|1 :: additional room in pocket (no/yes)
+ kCmdSay, // SAY <spr> <ref> :: say text referenced by <ref>
+ kCmdSound, // SOUND <spr> <ref> :: play sound effect referenced by <ref>
+ kCmdKill, // KILL <spr> 0 :: remove sprite
+ kCmdRSeq, // RSEQ <spr> <nr> :: relative jump SEQ <nr> lines
+ kCmdSeq, // SEQ <spr> <seq> :: jump to certain SEQ
+ kCmdSend, // SEND <spr> <cav> :: move sprite to board <cav>
+ kCmdSwap, // SWAP <spr1> spr2> :: sprite exchange
+ kCmdKeep, // KEEP <spr> <seq> :: take sprite into pocket and jump to <seq>
+ kCmdGive, // GIVE <spr> <seq> :: remove sprite from pocket and jump to <seq>
+ kCmdGetPos, // GETPOS <spr> <idx> :: take sprite's position
+ kCmdGoto, // GOTO <spr> <idx> :: move sprite to position
+ kCmdPort, // PORT <spr> 0|1 :: clear/set "takeability" of sprite
+ kCmdNext, // NEXT <spr> <nr> :: jump to <nr> - NEAR or TAKE
+ kCmdNNext, // NNEXT <spr> <nr> :: jump to <nr> - NEAR
+ kCmdMTNext, // MTNEXT <spr> <nr> :: jump to <nr> - TAKE
+ kCmdFTNext, // FTNEXT <spr> <nr> :: jump to <nr> - TAKE
+ kCmdRNNext, // RNNEXT <spr> <nr> :: relative jump to <nr> - NEAR
+ kCmdRMTNext, // RMTNEXT <spr> <nr> :: relative jump to <nr> - TAKE
+ kCmdRFTNext, // RFTNEXT <spr> <nr> :: relative jump to <nr> - TAKE
+ kCmdRMNear, // RMNEAR <spr> 0 :: remove NEAR list
+ kCmdRMMTake, // RMMTAKE <spr> 0 :: remove TAKE list
+ kCmdRMFTake, // RMFTAKE <spr> 0 :: remove TAKE list
+ kCmdSetRef, // SETREF <spr> <ref> :: change reference of sprite <spr> to <ref>
+ kCmdWalk, // WALKTO <hero> <ref>|<point> :: go close to the sprite or point
+ kCmdReach, // REACH <hero> <ref>|<m> :: reach the sprite or point with <m> method
+ kCmdCover, // COVER <sp1> <sp2> :: cover sprite <sp1> with sprite <sp2>
+ kCmdUncover, // UNCOVER <sp1> <sp2> :: restore the state before COVER
+
+ kCmdExec,
+ kCmdGhost
+};
+
+class CommandHandler {
+public:
+ struct Command {
+ CommandType _commandType;
+ byte _lab;
+ int _ref;
+ int _val;
+ void *_spritePtr;
+ CallbackType _cbType;
+ } *_commandList;
+ static const char *_commandText[];
+ bool _talkEnable;
+
+ CommandHandler(CGE2Engine *vm, bool turbo);
+ ~CommandHandler();
+ void runCommand();
+ void addCommand(CommandType com, int ref, int val, void *ptr);
+ void addCallback(CommandType com, int ref, int val, CallbackType cbType);
+ void insertCommand(CommandType com, int ref, int val, void *ptr);
+ bool idle();
+ void clear();
+ int getComId(const char *com);
+ const char *getComStr(CommandType cmdType);
+private:
+ CGE2Engine *_vm;
+ bool _turbo;
+ uint8 _head;
+ uint8 _tail;
+ bool _textDelay;
+ uint32 _timerExpiry; // "pause" in the original.
+};
+
+} // End of namespace CGE2
+
+#endif
diff --git a/engines/cge2/sound.cpp b/engines/cge2/sound.cpp
new file mode 100644
index 0000000000..32f94b17b9
--- /dev/null
+++ b/engines/cge2/sound.cpp
@@ -0,0 +1,273 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "cge2/sound.h"
+#include "common/config-manager.h"
+#include "common/memstream.h"
+#include "audio/decoders/raw.h"
+#include "audio/audiostream.h"
+#include "cge2/cge2.h"
+
+namespace CGE2 {
+
+DataCk::DataCk(byte *buf, int bufSize) {
+ _buf = buf;
+ _ckSize = bufSize;
+}
+
+DataCk::~DataCk() {
+ free(_buf);
+}
+
+Sound::Sound(CGE2Engine *vm) : _vm(vm) {
+ _audioStream = nullptr;
+ _soundRepeatCount = 1;
+ open();
+}
+
+Sound::~Sound() {
+ close();
+}
+
+void Sound::close() {
+ _vm->_midiPlayer->killMidi();
+}
+
+void Sound::open() {
+ setRepeat(1);
+ if (_vm->_commandHandlerTurbo != nullptr)
+ _vm->switchSay();
+ play(Audio::Mixer::kSFXSoundType, _vm->_fx->load(99, 99));
+}
+
+void Sound::setRepeat(int16 count) {
+ _soundRepeatCount = count;
+}
+
+int16 Sound::getRepeat() {
+ return _soundRepeatCount;
+}
+
+void Sound::play(Audio::Mixer::SoundType soundType, DataCk *wav, int pan) {
+ if (wav) {
+ stop();
+ _smpinf._saddr = &*(wav->addr());
+ _smpinf._slen = (uint16)wav->size();
+ _smpinf._span = pan;
+ _smpinf._counter = getRepeat();
+ sndDigiStart(&_smpinf, soundType);
+ }
+}
+
+void Sound::sndDigiStart(SmpInfo *PSmpInfo, Audio::Mixer::SoundType soundType) {
+ // Create an audio stream wrapper for sound
+ Common::MemoryReadStream *stream = new Common::MemoryReadStream(PSmpInfo->_saddr,
+ PSmpInfo->_slen, DisposeAfterUse::NO);
+ _audioStream = Audio::makeWAVStream(stream, DisposeAfterUse::YES);
+
+ // Decide which handle to use
+ Audio::SoundHandle *handle = nullptr;
+ switch (soundType) {
+ case Audio::Mixer::kSFXSoundType:
+ handle = &_sfxHandle;
+ break;
+ case Audio::Mixer::kSpeechSoundType:
+ handle = &_speechHandle;
+ break;
+ default:
+ error("Wrong sound type passed to sndDigiStart()");
+ }
+
+ // Start the new sound
+ _vm->_mixer->playStream(soundType, handle,
+ Audio::makeLoopingAudioStream(_audioStream, (uint)PSmpInfo->_counter));
+
+ // CGE pan:
+ // 8 = Center
+ // Less = Left
+ // More = Right
+ _vm->_mixer->setChannelBalance(*handle, (int8)CLIP(((PSmpInfo->_span - 8) * 16), -127, 127));
+}
+
+void Sound::stop() {
+ sndDigiStop(_sfxHandle);
+ sndDigiStop(_speechHandle);
+ _audioStream = nullptr;
+}
+
+void Sound::checkSoundHandles() {
+ if (!_vm->_mixer->isSoundHandleActive(_speechHandle) && !_vm->_mixer->isSoundHandleActive(_sfxHandle))
+ _smpinf._counter = 0;
+}
+
+void Sound::sndDigiStop(Audio::SoundHandle &handle) {
+ if (_vm->_mixer->isSoundHandleActive(handle))
+ _vm->_mixer->stopHandle(handle);
+}
+
+Fx::Fx(CGE2Engine *vm, int size) : _current(nullptr), _vm(vm) {
+}
+
+Fx::~Fx() {
+ clear();
+}
+
+void Fx::clear() {
+ if (_current)
+ delete _current;
+ _current = nullptr;
+}
+
+Common::String Fx::name(int ref, int sub) {
+ char fxname[] = "%.2dfx%.2d.WAV\0";
+ char subName[] = "%.2dfx%.2d?.WAV\0";
+ char *p = (sub) ? subName : fxname;
+ Common::String filename = Common::String::format(p, ref >> 8, ref & 0xFF);
+ if (sub)
+ filename.setChar('@' + sub, 6);
+ return filename;
+}
+
+bool Fx::exist(int ref, int sub) {
+ return _vm->_resman->exist(name(ref, sub).c_str());
+}
+
+DataCk *Fx::load(int ref, int sub) {
+ Common::String filename = name(ref, sub);
+ EncryptedStream file(_vm, filename.c_str());
+ clear();
+ return (_current = loadWave(&file));
+}
+
+DataCk *Fx::loadWave(EncryptedStream *file) {
+ byte *data = (byte *)malloc(file->size());
+
+ if (!data)
+ return 0;
+
+ file->read(data, file->size());
+
+ return new DataCk(data, file->size());
+}
+
+MusicPlayer::MusicPlayer(CGE2Engine *vm) : _vm(vm) {
+ _data = nullptr;
+ _isGM = false;
+
+ MidiPlayer::createDriver();
+
+ int ret = _driver->open();
+ if (ret == 0) {
+ if (_nativeMT32)
+ _driver->sendMT32Reset();
+ else
+ _driver->sendGMReset();
+
+ // TODO: Load cmf.ins with the instrument table. It seems that an
+ // interface for such an operation is supported for AdLib. Maybe for
+ // this card, setting instruments is necessary.
+
+ _driver->setTimerCallback(this, &timerCallback);
+ }
+ _dataSize = -1;
+}
+
+MusicPlayer::~MusicPlayer() {
+ killMidi();
+}
+
+void MusicPlayer::killMidi() {
+ Audio::MidiPlayer::stop();
+
+ free(_data);
+ _data = nullptr;
+}
+
+void MusicPlayer::loadMidi(int ref) {
+ if (_vm->_midiNotify != nullptr)
+ (_vm->*_vm->_midiNotify)();
+
+ // Work out the filename and check the given MIDI file exists
+ Common::String filename = Common::String::format("%.2dSG%.2d.MID", ref >> 8, ref & 0xFF);
+ if (!_vm->_resman->exist(filename.c_str()))
+ return;
+
+ // Stop any currently playing MIDI file
+ killMidi();
+
+ // Read in the data for the file
+ EncryptedStream mid(_vm, filename.c_str());
+ _dataSize = mid.size();
+ _data = (byte *)malloc(_dataSize);
+ mid.read(_data, _dataSize);
+
+ // Start playing the music
+ sndMidiStart();
+}
+
+void MusicPlayer::sndMidiStart() {
+ _isGM = true;
+
+ MidiParser *parser = MidiParser::createParser_SMF();
+ if (parser->loadMusic(_data, _dataSize)) {
+ parser->setTrack(0);
+ parser->setMidiDriver(this);
+ parser->setTimerRate(_driver->getBaseTempo());
+ parser->property(MidiParser::mpCenterPitchWheelOnUnload, 1);
+
+ _parser = parser;
+
+ syncVolume();
+
+ // Al the tracks are supposed to loop
+ _isLooping = true;
+ _isPlaying = true;
+ }
+}
+
+void MusicPlayer::send(uint32 b) {
+ if (((b & 0xF0) == 0xC0) && !_isGM && !_nativeMT32) {
+ b = (b & 0xFFFF00FF) | MidiDriver::_mt32ToGm[(b >> 8) & 0xFF] << 8;
+ }
+
+ Audio::MidiPlayer::send(b);
+}
+
+void MusicPlayer::sendToChannel(byte channel, uint32 b) {
+ if (!_channelsTable[channel]) {
+ _channelsTable[channel] = (channel == 9) ? _driver->getPercussionChannel() : _driver->allocateChannel();
+ // If a new channel is allocated during the playback, make sure
+ // its volume is correctly initialized.
+ if (_channelsTable[channel])
+ _channelsTable[channel]->volume(_channelsVolume[channel] * _masterVolume / 255);
+ }
+
+ if (_channelsTable[channel])
+ _channelsTable[channel]->send(b);
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/sound.h b/engines/cge2/sound.h
new file mode 100644
index 0000000000..6673b67b7a
--- /dev/null
+++ b/engines/cge2/sound.h
@@ -0,0 +1,131 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_SOUND_H
+#define CGE2_SOUND_H
+
+#include "cge2/fileio.h"
+#include "audio/audiostream.h"
+#include "audio/decoders/wave.h"
+#include "audio/fmopl.h"
+#include "audio/mididrv.h"
+#include "audio/midiparser.h"
+#include "audio/midiplayer.h"
+#include "audio/mixer.h"
+#include "common/memstream.h"
+
+namespace CGE2 {
+
+class CGE2Engine;
+
+// sample info
+struct SmpInfo {
+ const uint8 *_saddr; // address
+ uint16 _slen; // length
+ uint16 _span; // left/right pan (0-15)
+ int _counter; // number of time the sample should be played
+};
+
+class DataCk {
+ byte *_buf;
+ int _ckSize;
+public:
+ DataCk(byte *buf, int bufSize);
+ ~DataCk();
+ inline const byte *addr() {
+ return _buf;
+ }
+ inline int size() {
+ return _ckSize;
+ }
+};
+
+class Sound {
+public:
+ SmpInfo _smpinf;
+
+ Sound(CGE2Engine *vm);
+ ~Sound();
+ void open();
+ void close();
+ void play(Audio::Mixer::SoundType soundType, DataCk *wav, int pan = 8);
+ int16 getRepeat();
+ void setRepeat(int16 count);
+ void stop();
+ void checkSoundHandles();
+private:
+ int _soundRepeatCount;
+ CGE2Engine *_vm;
+ Audio::SoundHandle _sfxHandle;
+ Audio::SoundHandle _speechHandle;
+ Audio::RewindableAudioStream *_audioStream;
+
+ void sndDigiStart(SmpInfo *PSmpInfo, Audio::Mixer::SoundType soundType);
+ void sndDigiStop(Audio::SoundHandle &handle);
+};
+
+class Fx {
+ CGE2Engine *_vm;
+
+ DataCk *loadWave(EncryptedStream *file);
+ Common::String name(int ref, int sub);
+public:
+ DataCk *_current;
+
+ Fx(CGE2Engine *vm, int size);
+ ~Fx();
+ void clear();
+ bool exist(int ref, int sub = 0);
+ DataCk *load(int ref, int sub = 0);
+};
+
+class MusicPlayer: public Audio::MidiPlayer {
+private:
+ CGE2Engine *_vm;
+ byte *_data;
+ int _dataSize;
+ bool _isGM;
+
+ // Start MIDI File
+ void sndMidiStart();
+
+ // Stop MIDI File
+ void sndMidiStop();
+public:
+ MusicPlayer(CGE2Engine *vm);
+ ~MusicPlayer();
+
+ void loadMidi(int ref);
+ void killMidi();
+
+ virtual void send(uint32 b);
+ virtual void sendToChannel(byte channel, uint32 b);
+};
+
+} // End of namespace CGE2
+
+#endif // CGE2_SOUND_H
diff --git a/engines/cge2/spare.cpp b/engines/cge2/spare.cpp
new file mode 100644
index 0000000000..76bdbfa7ef
--- /dev/null
+++ b/engines/cge2/spare.cpp
@@ -0,0 +1,128 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "cge2/spare.h"
+
+namespace CGE2 {
+
+void Spare::sync(Common::Serializer &s) {
+ int size = 0;
+ if (s.isSaving()) {
+ for (uint i = 0; i < _container.size(); i++)
+ if (_container[i]->_ref >= 141)
+ size++;
+ s.syncAsSint16LE(size);
+
+ for (uint i = 0; i < _container.size(); i++) {
+ if (_container[i]->_ref >= 141)
+ _container[i]->sync(s);
+ }
+ } else {
+ s.syncAsSint16LE(size);
+
+ for (int i = 0; i < size; i++) {
+ Sprite *sprite = new Sprite(_vm);
+ sprite->sync(s);
+ update(sprite);
+ }
+ }
+}
+
+void Spare::clear() {
+ for (uint i = 0; i < _container.size(); i++)
+ delete _container[i];
+
+ _container.clear();
+}
+
+Sprite *Spare::locate(int ref) {
+ for (uint i = 0; i < _container.size(); ++i) {
+ if (_container[i]->_ref == ref)
+ return _container[i];
+ }
+ return nullptr;
+}
+
+Sprite *Spare::take(int ref) {
+ Sprite *spr = nullptr;
+ if ((spr = locate(ref)) != nullptr) {
+ for (uint i = 0; i < _container.size(); ++i) {
+ if (spr == _container[i]) {
+ _container.remove_at(i);
+ break;
+ }
+ }
+ }
+ return spr;
+}
+
+void Spare::takeScene(int cav) {
+ int bakRef = cav << 8;
+ Common::Array<Sprite*> tempCont = _container;
+ for (uint i = 0; i < tempCont.size(); ++i) {
+ Sprite *spr = tempCont[i];
+ int c = spr->_scene;
+ if ((c == _vm->_now || c == 0) && spr->_ref != bakRef) {
+ spr = locate(spr->_ref);
+ _vm->_vga->_showQ->insert(spr);
+ }
+ }
+}
+
+void Spare::store(Sprite *spr) {
+ _container.push_back(spr);
+}
+
+void Spare::update(Sprite *spr) {
+ Sprite *sp = locate(spr->_ref);
+ if (sp == nullptr)
+ store(spr);
+ else {
+ sp->contract();
+ *sp = *spr;
+ }
+}
+
+void Spare::dispose(Sprite *spr) {
+ if (spr) {
+ _vm->_vga->_showQ->remove(spr);
+ update(spr->contract());
+ }
+}
+
+void Spare::dispose(int ref) {
+ dispose(_vm->_vga->_showQ->locate(ref));
+}
+
+void Spare::dispose() {
+ for (uint i = 0; i < _container.size(); ++i) {
+ if (_container[i]->_ref > 255)
+ dispose(_container[i]);
+ }
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/spare.h b/engines/cge2/spare.h
new file mode 100644
index 0000000000..7dc6ce60f5
--- /dev/null
+++ b/engines/cge2/spare.h
@@ -0,0 +1,56 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_SPARE_H
+#define CGE2_SPARE_H
+
+#include "cge2/vga13h.h"
+
+namespace CGE2 {
+
+class Spare {
+ CGE2Engine *_vm;
+ Common::Array<Sprite*> _container;
+public:
+ Spare(CGE2Engine *vm) : _vm(vm) {}
+ ~Spare() { clear(); }
+ void store(Sprite *spr);
+ Sprite *locate(int ref);
+ Sprite *take(int ref);
+ void takeScene(int cav);
+ void update(Sprite *spr);
+ void dispose(Sprite *spr);
+ void dispose(int ref);
+ void dispose();
+ void sync(Common::Serializer &s);
+ uint16 count() { return _container.size(); }
+ void clear();
+};
+
+} // End of namespace CGE2
+
+#endif // CGE2_SPARE_H
diff --git a/engines/cge2/talk.cpp b/engines/cge2/talk.cpp
new file mode 100644
index 0000000000..9109da90f1
--- /dev/null
+++ b/engines/cge2/talk.cpp
@@ -0,0 +1,312 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "cge2/general.h"
+#include "cge2/talk.h"
+
+namespace CGE2 {
+
+void CGE2Engine::setAutoColors() {
+ Dac def[4] = {
+ { 0, 0, 0 },
+ { 220 >> 2, 220 >> 2, 220 >> 2 },
+ { 190 >> 2, 190 >> 2, 190 >> 2 },
+ { 160 >> 2, 160 >> 2, 160 >> 2 },
+ };
+ Dac pal[kPalCount];
+ _vga->getColors(pal);
+ for (int i = 0; i < 4; i++)
+ _font->_colorSet[kCBRel][i] = _vga->closest(pal, def[i]);
+}
+
+Font::Font(CGE2Engine *vm) : _vm(vm) {
+ _map = new uint8[kMapSize];
+ _pos = new uint16[kPosSize];
+ _widthArr = new uint8[kWidSize];
+
+ load();
+}
+
+Font::~Font() {
+ delete[] _map;
+ delete[] _pos;
+ delete[] _widthArr;
+}
+
+void Font::load() {
+ char path[10];
+ strcpy(path, "CGE.CFT");
+ if (!_vm->_resman->exist(path))
+ error("Missing Font file! %s", path);
+
+ EncryptedStream fontFile(_vm, path);
+ assert(!fontFile.err());
+
+ fontFile.read(_widthArr, kWidSize);
+ assert(!fontFile.err());
+
+ uint16 p = 0;
+ for (uint16 i = 0; i < kPosSize; i++) {
+ _pos[i] = p;
+ p += _widthArr[i];
+ }
+ fontFile.read(_map, p);
+
+ strcpy(path, "CGE.TXC");
+ if (!_vm->_resman->exist(path))
+ error("Missing Color file! %s", path);
+
+ // Reading in _colorSet:
+ EncryptedStream colorFile(_vm, path);
+ assert(!colorFile.err());
+
+ char tmpStr[kLineMax + 1];
+ int n = 0;
+
+ for (Common::String line = colorFile.readLine(); !colorFile.eos(); line = colorFile.readLine()){
+ if (line.empty())
+ continue;
+ Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
+ _colorSet[n][0] = _vm->number(tmpStr);
+
+ for (int i = 1; i < 4; i++)
+ _colorSet[n][i] = _vm->number(nullptr);
+
+ n++;
+ }
+}
+
+uint16 Font::width(const char *text) {
+ uint16 w = 0;
+ if (!text)
+ return 0;
+ while (*text)
+ w += _widthArr[(unsigned char)*(text++)];
+ return w;
+}
+
+Talk::Talk(CGE2Engine *vm, const char *text, TextBoxStyle mode, ColorBank color, bool wideSpace)
+ : Sprite(vm), _mode(mode), _created(false), _wideSpace(wideSpace), _vm(vm) {
+ _color = _vm->_font->_colorSet[color];
+
+ if (color == kCBRel)
+ _vm->setAutoColors();
+ update(text);
+}
+
+Talk::Talk(CGE2Engine *vm, ColorBank color)
+ : Sprite(vm), _mode(kTBPure), _created(false), _wideSpace(false), _vm(vm) {
+ _color = _vm->_font->_colorSet[color];
+
+ if (color == kCBRel)
+ _vm->setAutoColors();
+}
+
+uint8 *Talk::box(V2D siz) {
+ uint16 n, r = (_mode == kTBRound) ? kTextRoundCorner : 0;
+ const byte lt = _color[1], bg = _color[2], dk = _color[3];
+
+ if (siz.x < 8)
+ siz.x = 8;
+ if (siz.y < 8)
+ siz.y = 8;
+ uint8 *b = new uint8[n = siz.area()];
+ memset(b, bg, n);
+
+ if (_mode) {
+ uint8 *p = b;
+ uint8 *q = b + n - siz.x;
+ memset(p, lt, siz.x);
+ memset(q, dk, siz.x);
+ while (p < q) {
+ p += siz.x;
+ *(p - 1) = dk;
+ *p = lt;
+ }
+ p = b;
+ for (int i = 0; i < r; i++) {
+ int j = 0;
+ for (; j < r - i; j++) {
+ p[j] = kPixelTransp;
+ p[siz.x - j - 1] = kPixelTransp;
+ q[j] = kPixelTransp;
+ q[siz.x - j - 1] = kPixelTransp;
+ }
+ p[j] = lt;
+ p[siz.x - j - 1] = dk;
+ q[j] = lt;
+ q[siz.x - j - 1] = dk;
+ p += siz.x;
+ q -= siz.x;
+ }
+ }
+ return b;
+}
+
+void Talk::update(const char *text) {
+ const uint16 vmarg = (_mode) ? kTextVMargin : 0;
+ const uint16 hmarg = (_mode) ? kTextHMargin : 0;
+ uint16 mw;
+ uint16 mh;
+ uint16 ln = vmarg;
+ uint8 *m;
+ uint8 *map;
+ uint8 fg = _color[0];
+
+ if (_created) {
+ mw = _ext->_shpList->_w;
+ mh = _ext->_shpList->_h;
+ delete _ext->_shpList;
+ } else {
+ uint16 k = 2 * hmarg;
+ mh = 2 * vmarg + kFontHigh;
+ mw = 0;
+ for (const char *p = text; *p; p++) {
+ if ((*p == '|') || (*p == '\n')) {
+ mh += kFontHigh + kTextLineSpace;
+ if (k > mw)
+ mw = k;
+ k = 2 * hmarg;
+ } else if ((*p == 0x20) && (_vm->_font->_widthArr[(unsigned char)*p] > 4) && (!_wideSpace))
+ k += _vm->_font->_widthArr[(unsigned char)*p] - 2;
+ else
+ k += _vm->_font->_widthArr[(unsigned char)*p];
+ }
+ if (k > mw)
+ mw = k;
+
+ _created = true;
+ }
+
+ V2D sz(_vm, mw, mh);
+ map = box(sz);
+
+ m = map + ln * mw + hmarg;
+
+ while (*text) {
+ if ((*text == '|') || (*text == '\n'))
+ m = map + (ln += kFontHigh + kTextLineSpace) * mw + hmarg;
+ else {
+ int cw = _vm->_font->_widthArr[(unsigned char)*text];
+ uint8 *f = _vm->_font->_map + _vm->_font->_pos[(unsigned char)*text];
+
+ // Handle properly space size, after it was enlarged to display properly
+ // 'F1' text.
+ int8 fontStart = 0;
+ if ((*text == 0x20) && (cw > 4) && (!_wideSpace))
+ fontStart = 2;
+
+ for (int i = fontStart; i < cw; i++) {
+ uint8 *pp = m;
+ uint16 n;
+ uint16 b = *(f++);
+ for (n = 0; n < kFontHigh; n++) {
+ if (b & 1)
+ *pp = fg;
+ b >>= 1;
+ pp += mw;
+ }
+ m++;
+ }
+ }
+ text++;
+ }
+ BitmapPtr b = new Bitmap[1];
+ b[0] = Bitmap(_vm, sz.x, sz.y, map);
+ delete[] map;
+ setShapeList(b, 1);
+}
+
+InfoLine::InfoLine(CGE2Engine *vm, uint16 w, ColorBank color)
+: Talk(vm), _oldText(nullptr), _newText(nullptr), _realTime(false), _vm(vm) {
+ _wideSpace = false;
+ BitmapPtr b = new Bitmap[1];
+ if (color == kCBRel)
+ _vm->setAutoColors();
+ _color = _vm->_font->_colorSet[color];
+ V2D siz = V2D(_vm, w, kFontHigh);
+ b[0] = Bitmap(_vm, siz.x, siz.y, _color[2]);
+ setShapeList(b, 1);
+}
+
+void InfoLine::update(const char *text) {
+ if (!_realTime && (text == _oldText))
+ return;
+
+ _oldText = text;
+
+ uint16 w = _ext->_shpList->_w;
+ uint16 h = _ext->_shpList->_h;
+ uint8 *v = _ext->_shpList->_v;
+ uint16 dsiz = w >> 2; // data size (1 plane line size)
+ uint16 lsiz = 2 + dsiz + 2; // uint16 for line header, uint16 for gap
+ uint16 psiz = h * lsiz; // - last gape, but + plane trailer
+ uint16 size = 4 * psiz; // whole map size
+ uint8 fg = _color[0];
+ uint8 bg = _color[2];
+
+ // clear whole rectangle
+ memset(v + 2, bg, dsiz); // data bytes
+ for (byte *pDest = v + lsiz; pDest < (v + psiz); pDest += lsiz) {
+ Common::copy(v, v + lsiz, pDest);
+ }
+ *(uint16 *)(v + psiz - 2) = TO_LE_16(kBmpEOI); // plane trailer uint16
+ for (byte *pDest = v + psiz; pDest < (v + 4 * psiz); pDest += psiz) {
+ Common::copy(v, v + psiz, pDest);
+ }
+
+ // paint text line
+ if (_newText) {
+ uint8 *p = v + 2, *q = p + size;
+
+ while (*text) {
+ uint16 cw = _vm->_font->_widthArr[(unsigned char)*text];
+ uint8 *fp = _vm->_font->_map + _vm->_font->_pos[(unsigned char)*text];
+
+ // Handle properly space size, after it was enlarged to display properly
+ // 'F1' text.
+ int8 fontStart = 0;
+ if ((*text == 0x20) && (cw > 4) && (!_wideSpace))
+ fontStart = 2;
+
+ for (int i = fontStart; i < cw; i++) {
+ uint16 b = fp[i];
+ for (uint16 n = 0; n < kFontHigh; n++) {
+ if (b & 1)
+ *p = fg;
+ b >>= 1;
+ p += lsiz;
+ }
+ if (p >= q)
+ p = p - size + 1;
+ }
+ text++;
+ }
+ }
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/talk.h b/engines/cge2/talk.h
new file mode 100644
index 0000000000..d7484655cc
--- /dev/null
+++ b/engines/cge2/talk.h
@@ -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.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_TALK_H
+#define CGE2_TALK_H
+
+#include "cge2/general.h"
+#include "cge2/vga13h.h"
+
+namespace CGE2 {
+
+#define kTextHMargin (6&~1) // EVEN horizontal margins!
+#define kTextVMargin 5 // vertical margins
+#define kTextLineSpace 2 // line spacing
+#define kTextRoundCorner 3 // rounded corners
+#define kWidSize 256
+#define kPosSize 256
+#define kMapSize (256*8)
+#define kFontHigh 8
+#define kCaptionSide 24
+#define kInfName 101
+#define kSayName 102
+
+class Font {
+ void load();
+ CGE2Engine *_vm;
+public:
+ uint8 *_widthArr;
+ uint16 *_pos;
+ uint8 *_map;
+ uint8 _colorSet[kColorNum][4];
+ Font(CGE2Engine *vm);
+ ~Font();
+ uint16 width(const char *text);
+};
+
+enum TextBoxStyle { kTBPure, kTBRect, kTBRound };
+
+class Talk : public Sprite {
+protected:
+ TextBoxStyle _mode;
+ bool _created;
+ uint8 *box(V2D siz);
+ bool _wideSpace;
+public:
+ uint8 *_color;
+
+ Talk(CGE2Engine *vm, const char *text, TextBoxStyle mode = kTBPure, ColorBank color = kCBStd, bool wideSpace = false);
+ Talk(CGE2Engine *vm, ColorBank color = kCBStd);
+
+ void update(const char *text);
+private:
+ CGE2Engine *_vm;
+};
+
+class InfoLine : public Talk {
+ const char *_oldText, *_newText;
+public:
+ bool _realTime;
+ InfoLine(CGE2Engine *vm, uint16 wid, ColorBank color = kCBStd);
+ void update(const char *text);
+ void update() { update(_newText); }
+ void setText(const char *txt) { _newText = txt; }
+private:
+ CGE2Engine *_vm;
+};
+
+} // End of namespace CGE2
+
+#endif // CGE2_TALK_H
diff --git a/engines/cge2/text.cpp b/engines/cge2/text.cpp
new file mode 100644
index 0000000000..d51c04843d
--- /dev/null
+++ b/engines/cge2/text.cpp
@@ -0,0 +1,197 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "cge2/text.h"
+#include "common/str.h"
+
+namespace CGE2 {
+
+Text::Text(CGE2Engine *vm, const char *fname) : _vm(vm) {
+ _vm->mergeExt(_fileName, fname, kSayExt);
+ if (!_vm->_resman->exist(_fileName))
+ error("No talk (%s)", _fileName);
+ _txtCount = count();
+ if (_txtCount == -1)
+ error("Unable to read dialog file %s", _fileName);
+
+ _txtCount += 2;
+ _cache = new Handler[_txtCount];
+ for (_size = 0; _size < _txtCount; _size++) {
+ _cache[_size]._ref = 0;
+ _cache[_size]._text = nullptr;
+ }
+ load();
+
+ _cache[_txtCount - 1]._ref = -1;
+ _cache[_txtCount - 1]._text = new char[3];
+ strcpy(_cache[_txtCount - 1]._text, "");
+}
+
+Text::~Text() {
+ clear();
+ delete[] _cache;
+}
+
+int16 Text::count() {
+ EncryptedStream tf(_vm, _fileName);
+ if (tf.err())
+ return -1;
+
+ Common::String line;
+ char tmpStr[kLineMax + 1];
+
+ int counter = 0;
+
+ for (line = tf.readLine(); !tf.eos(); line = tf.readLine()) {
+ char *s;
+ assert(line.size() <= 513);
+ Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
+ if ((s = strtok(tmpStr, " =,;/\t\n")) == nullptr)
+ continue;
+ if (!Common::isDigit(*s))
+ continue;
+
+ counter++;
+ }
+ return counter;
+}
+
+void Text::clear() {
+ for (int i = 0; i < _txtCount; i++) {
+ if (_cache[i]._ref) {
+ _cache[i]._ref = 0;
+ delete[] _cache[i]._text;
+ _cache[i]._text = nullptr;
+ }
+ }
+}
+
+void Text::load() {
+ EncryptedStream tf(_vm, _fileName);
+ assert(!tf.err());
+
+ Common::String line;
+ char tmpStr[kLineMax + 1];
+ int idx;
+
+ for (idx = 0, line = tf.readLine(); !tf.eos(); line = tf.readLine()) {
+ int n = line.size();
+ char *s;
+ Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
+ if ((s = strtok(tmpStr, " =,;/\t\n")) == nullptr)
+ continue;
+ if (!Common::isDigit(*s))
+ continue;
+
+ int r = _vm->number(s);
+
+ s += strlen(s);
+ if (s < tmpStr + n)
+ ++s;
+
+ _cache[idx]._ref = r;
+ _cache[idx]._text = new char[strlen(s) + 1];
+ strcpy(_cache[idx]._text, s);
+ idx++;
+ }
+}
+
+char *Text::getText(int ref) {
+ int i;
+ for (i = 0; (i < _size) && (_cache[i]._ref != ref); i++)
+ ;
+
+ if (i < _size)
+ return _cache[i]._text;
+
+ warning("getText: Unable to find ref %d:%d", ref / 256, ref % 256);
+ return nullptr;
+}
+
+void Text::say(const char *text, Sprite *spr) {
+ _vm->killText();
+
+ _vm->_talk = new Talk(_vm, text, kTBRound, kCBSay);
+
+ Speaker *speaker = new Speaker(_vm);
+
+ bool east = spr->_flags._east;
+ V2D d(_vm, 20, spr->_siz.y - 2);
+ if (!east)
+ d.x = -d.x;
+ if (_vm->isHero(spr))
+ d = d.scale(spr->_pos3D._z.trunc());
+ V2D pos = spr->_pos2D + d;
+ uint16 sw = (speaker->_siz.x >> 1);
+ if (!east)
+ sw = -sw;
+
+ if (east) {
+ if (pos.x + sw + kTextRoundCorner + kCaptionSide >= kScrWidth)
+ east = false;
+ } else if (pos.x <= kCaptionSide + kTextRoundCorner - sw)
+ east = true;
+
+ if (east != (d.x > 0)) {
+ d.x = -d.x;
+ sw = -sw;
+ }
+ pos.x = spr->_pos2D.x + d.x + sw;
+
+ _vm->_talk->_flags._kill = true;
+ _vm->_talk->setName(getText(kSayName));
+ _vm->_talk->gotoxyz(pos.x, pos.y + speaker->_siz.y - 1, 0);
+
+ speaker->gotoxyz(pos.x, _vm->_talk->_pos3D._y.trunc() - speaker->_siz.y + 1, 0);
+ speaker->_flags._slav = true;
+ speaker->_flags._kill = true;
+ speaker->setName(getText(kSayName));
+ speaker->step(east);
+
+ _vm->_vga->_showQ->append(_vm->_talk);
+ _vm->_vga->_showQ->append(speaker);
+}
+
+void CGE2Engine::inf(const char *text, ColorBank col) {
+ killText();
+ _talk = new Talk(this, text, kTBRect, col, true);
+ _talk->_flags._kill = true;
+ _talk->setName(_text->getText(kInfName));
+ _talk->center();
+ _vga->_showQ->append(_talk);
+}
+
+void Text::sayTime(Sprite *spr) {
+ TimeDate curTime;
+ _vm->_system->getTimeAndDate(curTime);
+
+ char t[6];
+ snprintf(t, 6, "%d:%02d", curTime.tm_hour, curTime.tm_min);
+ say(t, spr);
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/text.h b/engines/cge2/text.h
new file mode 100644
index 0000000000..88ed501158
--- /dev/null
+++ b/engines/cge2/text.h
@@ -0,0 +1,68 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_TEXT_H
+#define CGE2_TEXT_H
+
+#include "cge2/talk.h"
+#include "cge2/cge2.h"
+
+namespace CGE2 {
+
+#define kSayExt ".SAY"
+#define kSysTextMax 1000
+#define kTextNoMouse 95
+#define kInfName 101
+#define kSayName 102
+#define kInfRef 301
+#define kSayRef 302
+
+
+class Text {
+ struct Handler {
+ int _ref;
+ char *_text;
+ } *_cache;
+ int _size;
+ int16 _txtCount;
+ char _fileName[kPathMax];
+ void load();
+ int16 count();
+public:
+ Text(CGE2Engine *vm, const char *fname);
+ ~Text();
+ void clear();
+ char *getText(int ref);
+ void say(const char *text, Sprite *spr);
+ void sayTime(Sprite *spr);
+private:
+ CGE2Engine *_vm;
+};
+
+} // End of namespace CGE2
+
+#endif // CGE2_TEXT_H
diff --git a/engines/cge2/toolbar.cpp b/engines/cge2/toolbar.cpp
new file mode 100644
index 0000000000..6af64b1f5c
--- /dev/null
+++ b/engines/cge2/toolbar.cpp
@@ -0,0 +1,225 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "sound.h"
+#include "common/config-manager.h"
+#include "cge2/cge2.h"
+#include "cge2/events.h"
+#include "cge2/vmenu.h"
+#include "cge2/text.h"
+#include "cge2/cge2_main.h"
+
+namespace CGE2 {
+
+#define kSoundNumtoStateRate 25.7
+// == 257 / 10; where 10 equals to the volume switches' number of states [0..9]
+// and ScummVM has a scale of 257 different values for setting sounds.
+
+#define kSoundStatetoNumRate 28.45
+// == 256 / 9 + 0.1; where 256 is the positive range of numbers we can set the volume to
+// and the 10 states of a switch cut this range up to 9 equally big parts.
+// We don't take into account 0 regarding the 256 different values (it would be the 257th),
+// since 0 * x == 0.
+// 0.1 is only for correct rounding at the 10th state.
+
+void CGE2Engine::optionTouch(int opt, uint16 mask) {
+ bool notMuted = !ConfMan.getBool("mute");
+ switch (opt) {
+ case 1:
+ if (mask & kMouseLeftUp)
+ switchColorMode();
+ break;
+ case 2:
+ if ((mask & kMouseLeftUp) && notMuted)
+ switchMusic();
+ break;
+ case 3:
+ if (mask & kMouseLeftUp)
+ quit();
+ break;
+ case 4:
+ if ((mask & (kMouseLeftUp | kMouseRightUp)) && notMuted)
+ setVolume(opt - 4, (mask & kMouseLeftUp) ? 1 : -1);
+ break;
+ case 5:
+ if ((mask & (kMouseLeftUp | kMouseRightUp)) && notMuted)
+ setVolume(opt - 4, (mask & kMouseLeftUp) ? 1 : -1);
+ break;
+ case 8:
+ if ((mask & kMouseLeftUp) && notMuted)
+ switchCap();
+ break;
+ case 9:
+ if ((mask & kMouseLeftUp) && notMuted)
+ switchVox();
+ break;
+ default:
+ break;
+ }
+}
+
+void CGE2Engine::switchColorMode() {
+ _commandHandlerTurbo->addCommand(kCmdSeq, 121, _vga->_mono = !_vga->_mono, nullptr);
+ ConfMan.setBool("enable_color_blind", _vga->_mono);
+ ConfMan.flushToDisk();
+ keyClick();
+ _vga->setColors(_vga->_sysPal, 64);
+}
+
+void CGE2Engine::switchMusic() {
+ _music = !_music;
+ _mixer->muteSoundType(Audio::Mixer::kMusicSoundType, !_music);
+ _commandHandlerTurbo->addCommand(kCmdSeq, kMusicRef, _music, nullptr);
+ keyClick();
+ _commandHandlerTurbo->addCommand(kCmdMidi, -1, _music ? (_now << 8) : -1, nullptr);
+}
+
+void CGE2Engine::quit() {
+ if (_commandHandler->idle()) {
+ if (VMenu::_addr) {
+ _commandHandlerTurbo->addCommand(kCmdKill, -1, 0, VMenu::_addr);
+ ReturnToGameChoice rqsChoice(this);
+ rqsChoice.proc();
+ } else {
+ Common::Array<Choice *> quitMenu; // Deleted in VMenu's destructor.
+ quitMenu.push_back(new ExitGameChoice(this));
+ quitMenu.push_back(new ReturnToGameChoice(this));
+ (new VMenu(this, quitMenu, V2D(this, -1, -1), kCBMnu))->setName(_text->getText(kQuitTitle));
+ _commandHandlerTurbo->addCommand(kCmdSeq, kPowerRef, 0, nullptr);
+ keyClick();
+ }
+ }
+}
+
+void CGE2Engine::setVolume(int idx, int cnt) {
+ if (cnt && _vol[idx]) {
+ int p = _vol[idx]->_seqPtr + cnt;
+ if ((p >= 0) && (p < _vol[idx]->_seqCnt)) {
+ _vol[idx]->step(p);
+ int newVolume = p * kSoundStatetoNumRate;
+ switch (idx) {
+ case 0:
+ _oldSfxVolume = ConfMan.getInt("sfx_volume");
+ ConfMan.setInt("sfx_volume", newVolume);
+ break;
+ case 1:
+ _oldMusicVolume = ConfMan.getInt("music_volume");
+ ConfMan.setInt("music_volume", newVolume);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+}
+
+void CGE2Engine::checkVolumeSwitches() {
+ int musicVolume = ConfMan.getInt("music_volume");
+ if (musicVolume != _oldMusicVolume)
+ _vol[1]->step(musicVolume / kSoundNumtoStateRate);
+
+ int sfxVolume = ConfMan.getInt("sfx_volume");
+ if (sfxVolume != _oldSfxVolume)
+ _vol[0]->step(sfxVolume / kSoundNumtoStateRate);
+}
+
+void CGE2Engine::switchCap() {
+ _sayCap = !_sayCap;
+ if (!_sayCap)
+ _sayVox = true;
+ keyClick();
+ switchSay();
+}
+
+void CGE2Engine::switchVox() {
+ _sayVox = !_sayVox;
+ _mixer->muteSoundType(Audio::Mixer::kSpeechSoundType, _sayVox);
+ if (!_sayVox)
+ _sayCap = true;
+ keyClick();
+ switchSay();
+}
+
+void CGE2Engine::switchSay() {
+ _commandHandlerTurbo->addCommand(kCmdSeq, 129, _sayVox, nullptr);
+ _commandHandlerTurbo->addCommand(kCmdSeq, 128, _sayCap, nullptr);
+}
+
+void CGE2Engine::initToolbar() {
+ selectPocket(-1);
+
+ _commandHandlerTurbo->addCommand(kCmdSeq, kMusicRef, _music, nullptr);
+ if (!_music)
+ _midiPlayer->killMidi();
+
+ switchSay();
+
+ _infoLine->gotoxyz(V3D(kInfoX, kInfoY, 0));
+ _infoLine->setText(nullptr);
+ _vga->_showQ->insert(_infoLine);
+
+ _gamePhase = kPhaseInGame;
+ _mouse->center();
+ _mouse->off();
+ _mouse->on();
+
+ _keyboard->setClient(_sys);
+ _commandHandler->addCommand(kCmdSeq, kPowerRef, 1, nullptr);
+
+ _busyPtr = _vga->_showQ->locate(kBusyRef);
+
+ _vol[0] = _vga->_showQ->locate(kDvolRef);
+ _vol[1] = _vga->_showQ->locate(kMvolRef);
+
+ if (_vol[0]) {
+ int val = ConfMan.getInt("sfx_volume");
+ initVolumeSwitch(_vol[0], val);
+ }
+
+ if (_vol[1]) {
+ int val = ConfMan.getInt("music_volume");
+ initVolumeSwitch(_vol[1], val);
+ }
+}
+
+void CGE2Engine::initVolumeSwitch(Sprite *volSwitch, int val) {
+ int state = 0;
+ state = val / kSoundNumtoStateRate;
+ volSwitch->step(state);
+}
+
+void CGE2Engine::checkMute() {
+ bool mute = ConfMan.getBool("mute");
+ bool mutedChanged = mute != _muteAll;
+ if (mutedChanged) {
+ switchMusic();
+ switchVox();
+ _muteAll = mute;
+ }
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp
new file mode 100644
index 0000000000..db96682237
--- /dev/null
+++ b/engines/cge2/vga13h.cpp
@@ -0,0 +1,1218 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "common/array.h"
+#include "common/config-manager.h"
+#include "common/rect.h"
+#include "graphics/palette.h"
+#include "cge2/general.h"
+#include "cge2/vga13h.h"
+#include "cge2/bitmap.h"
+#include "cge2/text.h"
+#include "cge2/cge2_main.h"
+#include "cge2/cge2.h"
+#include "cge2/vga13h.h"
+
+namespace CGE2 {
+
+void V3D::sync(Common::Serializer &s) {
+ _x.sync(s);
+ _y.sync(s);
+ _z.sync(s);
+}
+
+FXP FXP::operator*(const FXP& x) const {
+ FXP y;
+ int32 t1 = (v >> 8) * x.v;
+ int32 t2 = ((v & 0xFF) * x.v) >> 8;
+
+ y.v = t1 + t2;
+ return y;
+}
+
+FXP FXP::operator/(const FXP& x) const {
+ FXP y;
+ if (x.v != 0) {
+ int32 v1 = this->v;
+ int32 v2 = x.v;
+ bool negFlag = false;
+
+ if (v1 < 0) {
+ v1 = -v1;
+ negFlag = true;
+ }
+ if (v2 < 0) {
+ v2 = -v2;
+ negFlag ^= true;
+ }
+
+ int32 v3 = v1 / v2;
+ v1 -= v3 * v2;
+ v3 <<= 8;
+
+ if (v1 < 0xFFFFFF)
+ v1 <<= 8;
+ else
+ v2 >>= 8;
+
+ v3 += v1 / v2;
+
+ if (negFlag)
+ v3 = -v3;
+
+ y.v = v3;
+ }
+
+ return y;
+}
+
+void FXP::sync(Common::Serializer &s) {
+ s.syncAsSint32LE(v);
+}
+
+Seq *getConstantSeq(bool seqFlag) {
+ const Seq seq1[] = { { 0, 0, 0, 0, 0, 0 } };
+ const Seq seq2[] = { { 0, 1, 0, 0, 0, 0 }, { 1, 0, 0, 0, 0, 0 } };
+
+ Seq *seq;
+ if (seqFlag) {
+ seq = (Seq *)malloc(1 * sizeof(Seq));
+ *seq = seq1[0];
+ } else {
+ seq = (Seq *)malloc(2 * sizeof(Seq));
+ seq[0] = seq2[0];
+ seq[1] = seq2[1];
+ }
+
+ return seq;
+}
+
+byte Sprite::_constY = 0;
+byte Sprite::_follow = 0;
+
+Seq Sprite::_stdSeq8[] =
+{ { 0, 0, 0, 0, 0, 0 },
+ { 1, 1, 0, 0, 0, 0 },
+ { 2, 2, 0, 0, 0, 0 },
+ { 3, 3, 0, 0, 0, 0 },
+ { 4, 4, 0, 0, 0, 0 },
+ { 5, 5, 0, 0, 0, 0 },
+ { 6, 6, 0, 0, 0, 0 },
+ { 7, 7, 0, 0, 0, 0 },
+};
+
+SprExt::SprExt(CGE2Engine *vm)
+ : _p0(vm, 0, 0), _p1(vm, 0, 0),
+ _b0(nullptr), _b1(nullptr), _shpList(nullptr),
+ _location(0), _seq(nullptr), _name(nullptr) {
+ for (int i = 0; i < kActions; i++)
+ _actions[i] = nullptr;
+}
+
+Sprite::Sprite(CGE2Engine *vm)
+ : _siz(_vm, 0, 0), _seqPtr(kNoSeq), _seqCnt(0), _shpCnt(0),
+ _next(nullptr), _prev(nullptr), _time(0),
+ _ext(nullptr), _ref(-1), _scene(0), _vm(vm),
+ _pos2D(_vm, kScrWidth >> 1, 0), _pos3D(kScrWidth >> 1, 0, 0) {
+ memset(_actionCtrl, 0, sizeof(_actionCtrl));
+ memset(_file, 0, sizeof(_file));
+ memset(&_flags, 0, sizeof(_flags));
+ _flags._frnt = 1;
+}
+
+Sprite::Sprite(CGE2Engine *vm, BitmapPtr shpP, int cnt)
+ : _siz(_vm, 0, 0), _seqPtr(kNoSeq), _seqCnt(0), _shpCnt(0),
+ _next(nullptr), _prev(nullptr), _time(0),
+ _ext(nullptr), _ref(-1), _scene(0), _vm(vm),
+ _pos2D(_vm, kScrWidth >> 1, 0), _pos3D(kScrWidth >> 1, 0, 0) {
+ memset(_actionCtrl, 0, sizeof(_actionCtrl));
+ memset(_file, 0, sizeof(_file));
+ memset(&_flags, 0, sizeof(_flags));
+ _flags._frnt = 1;
+
+ setShapeList(shpP, cnt);
+}
+
+Sprite::~Sprite() {
+ contract();
+}
+
+BitmapPtr Sprite::getShp() {
+ SprExt *e = _ext;
+ if (!e || !e->_seq)
+ return nullptr;
+
+ int i = e->_seq[_seqPtr]._now;
+ if (i >= _shpCnt)
+ error("Invalid PHASE in SPRITE::Shp() %s - %d", _file, i);
+ return e->_shpList + i;
+}
+
+void Sprite::setShapeList(BitmapPtr shp, int cnt) {
+ _shpCnt = cnt;
+ _siz.x = 0;
+ _siz.y = 0;
+
+ if (shp) {
+ for (int i = 0; i < cnt; i++) {
+ BitmapPtr p = shp + i;
+ if (p->_w > _siz.x)
+ _siz.x = p->_w;
+ if (p->_h > _siz.y)
+ _siz.y = p->_h;
+ }
+ expand();
+ _ext->_shpList = shp;
+ if (!_ext->_seq) {
+ setSeq(_stdSeq8);
+ _seqCnt = (cnt < ARRAYSIZE(_stdSeq8)) ? cnt : ARRAYSIZE(_stdSeq8);
+ }
+ }
+}
+
+Seq *Sprite::setSeq(Seq *seq) {
+ expand();
+
+ Seq *s = _ext->_seq;
+ _ext->_seq = seq;
+ if (_seqPtr == kNoSeq)
+ step(0);
+ else if (_time == 0)
+ step(_seqPtr);
+ return s;
+}
+
+bool Sprite::seqTest(int n) {
+ if (n >= 0)
+ return (_seqPtr == n);
+ if (_ext)
+ return (_ext->_seq[_seqPtr]._next == _seqPtr);
+ return true;
+}
+
+void Sprite::setName(char *newName) {
+ if (!_ext)
+ return;
+
+ if (_ext->_name) {
+ delete[] _ext->_name;
+ _ext->_name = nullptr;
+ }
+ if (newName) {
+ _ext->_name = new char[strlen(newName) + 1];
+ strcpy(_ext->_name, newName);
+ }
+}
+
+int Sprite::labVal(Action snq, int lab) {
+ int lv = -1;
+ if (active()) {
+ int count = _actionCtrl[snq]._cnt;
+ CommandHandler::Command *com = snList(snq);
+
+ int i = 0;
+ for (; i < count; i++) {
+ if (com[i]._lab == lab)
+ break;
+ }
+
+ if (i < count)
+ return i;
+ } else {
+ char tmpStr[kLineMax + 1];
+ _vm->mergeExt(tmpStr, _file, kSprExt);
+
+ if (_vm->_resman->exist(tmpStr)) { // sprite description file exist
+ EncryptedStream sprf(_vm, tmpStr);
+ if (sprf.err())
+ error("Bad SPR [%s]", tmpStr);
+
+ int cnt = 0;
+ ID section = kIdPhase;
+ ID id;
+ Common::String line;
+
+ while (lv == -1 && !sprf.eos()) {
+ line = sprf.readLine();
+ if (line.empty())
+ continue;
+
+ Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
+
+ char *p;
+ p = _vm->token(tmpStr);
+
+ if (*p == '@') {
+ if ((int)section == (int)snq && atoi(p + 1) == lab)
+ lv = cnt;
+ } else {
+ id = _vm->ident(p);
+ switch (id) {
+ case kIdMTake:
+ case kIdFTake:
+ case kIdNear:
+ case kIdPhase:
+ case kIdSeq:
+ section = id;
+ break;
+ default:
+ if (id < 0 && (int)section == (int)snq)
+ ++cnt;
+ break;
+ }
+ }
+ }
+ }
+ }
+ return lv;
+}
+
+CommandHandler::Command *Sprite::snList(Action type) {
+ SprExt *e = _ext;
+ return (e) ? e->_actions[type] : nullptr;
+}
+
+Sprite *Sprite::expand() {
+ if (_ext)
+ return this;
+
+ if (_vm->_spriteNotify != nullptr)
+ (_vm->*_vm->_spriteNotify)();
+
+ char fname[kPathMax];
+ _vm->mergeExt(fname, _file, kSprExt);
+
+ if (_ext != nullptr)
+ delete _ext;
+ _ext = new SprExt(_vm);
+
+ if (!*_file)
+ return this;
+
+ BitmapPtr shplist = new Bitmap[_shpCnt];
+
+ int cnt[kActions],
+ shpcnt = 0,
+ seqcnt = 0,
+ maxnow = 0,
+ maxnxt = 0;
+
+ for (int i = 0; i < kActions; i++)
+ cnt[i] = 0;
+
+ for (int i = 0; i < kActions; i++){
+ byte n = _actionCtrl[i]._cnt;
+ if (n)
+ _ext->_actions[i] = new CommandHandler::Command[n];
+ else
+ _ext->_actions[i] = nullptr;
+ }
+
+ Seq *curSeq = nullptr;
+ if (_seqCnt)
+ curSeq = new Seq[_seqCnt];
+
+ if (_vm->_resman->exist(fname)) { // sprite description file exist
+ EncryptedStream sprf(_vm, fname);
+ if (sprf.err())
+ error("Bad SPR [%s]", fname);
+
+ int label = kNoByte;
+ ID section = kIdPhase;
+ ID id;
+ Common::String line;
+ char tmpStr[kLineMax + 1];
+
+ for (line = sprf.readLine(); !sprf.eos(); line = sprf.readLine()) {
+ if (line.empty())
+ continue;
+ Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
+
+ char *p = _vm->token(tmpStr);
+ if (*p == '@') {
+ label = atoi(p + 1);
+ continue;
+ }
+
+ id = _vm->ident(p);
+ switch (id) {
+ case kIdType:
+ break;
+ case kIdNear:
+ case kIdMTake:
+ case kIdFTake:
+ case kIdPhase:
+ case kIdSeq:
+ section = id;
+ break;
+ case kIdName:
+ Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
+ for (p = tmpStr; *p != '='; p++); // We search for the =
+ setName(_vm->tail(p));
+ break;
+ default:
+ if (id >= kIdNear)
+ break;
+ Seq *s;
+ switch (section) {
+ case kIdNear:
+ case kIdMTake:
+ case kIdFTake:
+ id = (ID)_vm->_commandHandler->getComId(p);
+ if (_actionCtrl[section]._cnt) {
+ CommandHandler::Command *c = &_ext->_actions[section][cnt[section]++];
+ c->_commandType = CommandType(id);
+ c->_lab = label;
+ c->_ref = _vm->number(nullptr);
+ c->_val = _vm->number(nullptr);
+ c->_spritePtr = nullptr;
+ }
+ break;
+ case kIdSeq:
+ s = &curSeq[seqcnt++];
+ s->_now = atoi(p);
+ if (s->_now > maxnow)
+ maxnow = s->_now;
+ s->_next = _vm->number(nullptr);
+ switch (s->_next) {
+ case 0xFF:
+ s->_next = seqcnt;
+ break;
+ case 0xFE:
+ s->_next = seqcnt - 1;
+ break;
+ }
+ if (s->_next > maxnxt)
+ maxnxt = s->_next;
+ s->_dx = _vm->number(nullptr);
+ s->_dy = _vm->number(nullptr);
+ s->_dz = _vm->number(nullptr);
+ s->_dly = _vm->number(nullptr);
+ break;
+ case kIdPhase:
+ shplist[shpcnt] = Bitmap(_vm, p);
+ shpcnt++;
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+ label = kNoByte;
+ }
+
+ if (!shpcnt)
+ error("No shapes - %s", fname);
+ } else // no sprite description: try to read immediately from .BMP
+ shplist[shpcnt++] = Bitmap(_vm, _file);
+
+ if (curSeq) {
+ if (maxnow >= shpcnt)
+ error("Bad PHASE in SEQ %s", fname);
+ if (maxnxt && (maxnxt >= seqcnt))
+ error("Bad JUMP in SEQ %s", fname);
+ setSeq(curSeq);
+ } else {
+ setSeq(_stdSeq8);
+ _seqCnt = (shpcnt < ARRAYSIZE(_stdSeq8)) ? shpcnt : ARRAYSIZE(_stdSeq8);
+ }
+
+ setShapeList(shplist, shpcnt);
+
+ if (_file[2] == '~') { // FLY-type sprite
+ Seq *nextSeq = _ext->_seq;
+ int x = (nextSeq + 1)->_dx, y = (nextSeq + 1)->_dy, z = (nextSeq + 1)->_dz;
+ // random position
+ nextSeq->_dx = _vm->newRandom(x + x) - x;
+ nextSeq->_dy = _vm->newRandom(y + y) - y;
+ nextSeq->_dz = _vm->newRandom(z + z) - z;
+ gotoxyz(_pos3D + V3D(nextSeq->_dx, nextSeq->_dy, nextSeq->_dz));
+ }
+
+ return this;
+}
+
+Sprite *Sprite::contract() {
+ SprExt *e = _ext;
+ if (!e)
+ return this;
+
+ if (_file[2] == '~') { // FLY-type sprite
+ Seq *curSeq = _ext->_seq;
+ // return to middle
+ gotoxyz(_pos3D - V3D(curSeq->_dx, curSeq->_dy, curSeq->_dz));
+ curSeq->_dx = curSeq->_dy = curSeq->_dz = 0;
+ }
+
+ if (_vm->_spriteNotify != nullptr)
+ (_vm->*_vm->_spriteNotify)();
+
+ if (e->_name) {
+ delete[] e->_name;
+ e->_name = nullptr;
+ }
+
+ if (e->_shpList) {
+ for (int i = 0; i < _shpCnt; i++)
+ e->_shpList[i].release();
+ delete[] e->_shpList;
+ e->_shpList = nullptr;
+ }
+
+ if (e->_seq) {
+ if (e->_seq == _stdSeq8)
+ _seqCnt = 0;
+ else {
+ delete[] e->_seq;
+ e->_seq = nullptr;
+ }
+ }
+
+ for (int i = 0; i < kActions; i++) {
+ if (e->_actions[i]) {
+ delete[] e->_actions[i];
+ e->_actions[i] = nullptr;
+ }
+ }
+
+ delete _ext;
+ _ext = nullptr;
+
+ return this;
+}
+
+void Sprite::backShow() {
+ expand();
+ show(2);
+ show(1);
+ _vm->_spare->dispose(this);
+}
+
+void Sprite::step(int nr) {
+ if (nr >= 0)
+ _seqPtr = nr;
+
+ if (_ext && _ext->_seq) {
+ V3D p = _pos3D;
+ Seq *seq = nullptr;
+
+ if (nr < 0)
+ _seqPtr = _ext->_seq[_seqPtr]._next;
+
+ if (_file[2] == '~') { // FLY-type sprite
+ seq = _ext->_seq;
+ // return to middle
+ p._x -= seq->_dx;
+ p._y -= seq->_dy;
+ p._z -= seq->_dz;
+ // generate motion
+ if (_vm->newRandom(10) < 5) {
+ if ((seq + 1)->_dx)
+ seq->_dx += _vm->newRandom(3) - 1;
+ if ((seq + 1)->_dy)
+ seq->_dy += _vm->newRandom(3) - 1;
+ if ((seq + 1)->_dz)
+ seq->_dz += _vm->newRandom(3) - 1;
+ }
+ if (seq->_dx < -(seq + 1)->_dx)
+ seq->_dx += 2;
+ if (seq->_dx >= (seq + 1)->_dx)
+ seq->_dx -= 2;
+ if (seq->_dy < -(seq + 1)->_dy)
+ seq->_dy += 2;
+ if (seq->_dy >= (seq + 1)->_dy)
+ seq->_dy -= 2;
+ if (seq->_dz < -(seq + 1)->_dz)
+ seq->_dz += 2;
+ if (seq->_dz >= (seq + 1)->_dz)
+ seq->_dz -= 2;
+ p._x += seq->_dx;
+ p._y += seq->_dy;
+ p._z += seq->_dz;
+ gotoxyz(p);
+ } else {
+ seq = _ext->_seq + _seqPtr;
+ if (seq) {
+ if (seq->_dz == 127 && seq->_dx != 0) {
+ _vm->_commandHandlerTurbo->addCommand(kCmdSound, -1, 256 * seq->_dy + seq->_dx, this);
+ } else {
+ p._x += seq->_dx;
+ p._y += seq->_dy;
+ p._z += seq->_dz;
+ gotoxyz(p);
+ }
+ }
+ }
+ if (seq && (seq->_dly >= 0))
+ _time = seq->_dly;
+ } else if (_vm->_waitRef && _vm->_waitRef == _ref)
+ _vm->_waitRef = 0;
+}
+
+void Sprite::tick() {
+ step();
+}
+
+void Sprite::setScene(int c) {
+ _scene = c;
+}
+
+void Sprite::gotoxyz(int x, int y, int z) {
+ gotoxyz(V3D(x, y, z));
+}
+
+void Sprite::gotoxyz() {
+ gotoxyz(_pos3D);
+}
+
+void Sprite::gotoxyz(V2D pos) {
+ V2D o = _pos2D;
+ int ctr = _siz.x >> 1;
+ int rem = _siz.x - ctr;
+ byte trim = 0;
+
+ if (_ref / 10 == 14) { // HERO
+ int z = _pos3D._z.trunc();
+ ctr = (ctr * _vm->_eye->_z.trunc()) / (_vm->_eye->_z.trunc() - z);
+ rem = (rem * _vm->_eye->_z.trunc()) / (_vm->_eye->_z.trunc() - z);
+ ctr = (ctr * 3) / 4;
+ rem = (rem * 3) / 4;
+ }
+
+ if (pos.x - ctr < 0) {
+ pos.x = ctr;
+ ++trim;
+ }
+ if (pos.x + rem > kScrWidth) {
+ pos.x = kScrWidth - rem;
+ ++trim;
+ }
+ _pos2D.x = pos.x;
+
+ if (pos.y < -kPanHeight) {
+ pos.y = -kPanHeight;
+ ++trim;
+ }
+ if (pos.y + _siz.y > kWorldHeight) {
+ pos.y = kWorldHeight - _siz.y;
+ ++trim;
+ }
+ _pos2D.y = pos.y;
+
+ _flags._trim = (trim != 0);
+
+ if (!_follow) {
+ FXP m = _vm->_eye->_z / (_pos3D._z - _vm->_eye->_z);
+ _pos3D._x = (_vm->_eye->_x + (_vm->_eye->_x - _pos2D.x) / m);
+ _pos3D._x.round();
+
+ if (!_constY) {
+ _pos3D._y = _vm->_eye->_y + (_vm->_eye->_y - _pos2D.y) / m;
+ _pos3D._y.round();
+ }
+ }
+
+ if (_next && _next->_flags._slav)
+ _next->gotoxyz(_next->_pos2D - o + _pos2D);
+
+ if (_flags._shad)
+ _prev->gotoxyz(_prev->_pos2D - o + _pos2D);
+}
+
+void Sprite::gotoxyz_(V2D pos) {
+ _constY++;
+ gotoxyz(pos);
+ --_constY;
+}
+
+void Sprite::gotoxyz(V3D pos) {
+ _follow++;
+ if (pos._z != _pos3D._z)
+ _flags._zmov = true;
+ gotoxyz(V2D(_vm, _pos3D = pos));
+ --_follow;
+}
+
+void Sprite::center() {
+ gotoxyz(kScrWidth >> 1, (kWorldHeight - _siz.y) >> 1, 0);
+}
+
+void Sprite::show() {
+ SprExt *e = _ext;
+ if (e) {
+ e->_p0 = e->_p1;
+ e->_b0 = e->_b1;
+ e->_p1 = _pos2D;
+ e->_b1 = getShp();
+
+ if (!_flags._hide)
+ e->_b1->show(e->_p1);
+ }
+}
+
+void Sprite::show(uint16 pg) {
+ assert(pg < 4);
+ Graphics::Surface *a = _vm->_vga->_page[1];
+ _vm->_vga->_page[1] = _vm->_vga->_page[pg];
+ getShp()->show(_pos2D);
+ _vm->_vga->_page[1] = a;
+}
+
+void Sprite::hide() {
+ SprExt *e = _ext;
+ if (e->_b0)
+ e->_b0->hide(e->_p0);
+}
+
+BitmapPtr Sprite::ghost() {
+ SprExt *e = _ext;
+ if (!e->_b1)
+ return nullptr;
+
+ BitmapPtr bmp = new Bitmap(_vm, 0, 0, (uint8 *)nullptr);
+ bmp->_w = e->_b1->_w;
+ bmp->_h = e->_b1->_h;
+ bmp->_b = new HideDesc[bmp->_h];
+ memcpy(bmp->_b, e->_b1->_b, sizeof(HideDesc)* bmp->_h);
+ uint8 *v = new uint8[1];
+ *v = (e->_p1.y << 16) + e->_p1.x;
+ bmp->_v = v;
+ bmp->_map = (e->_p1.y << 16) + e->_p1.x;
+
+ return bmp;
+}
+
+void Sprite::sync(Common::Serializer &s) {
+ s.syncAsUint16LE(_ref);
+ s.syncAsByte(_scene);
+
+ // bitfield in-memory storage is unpredictable, so to avoid
+ // any issues, pack/unpack everything manually
+ uint16 flags = 0;
+ if (s.isLoading()) {
+ s.syncAsUint16LE(flags);
+ _flags._hide = flags & 0x0001;
+ _flags._drag = flags & 0x0002;
+ _flags._hold = flags & 0x0004;
+ _flags._trim = flags & 0x0008;
+ _flags._slav = flags & 0x0010;
+ _flags._kill = flags & 0x0020;
+ _flags._xlat = flags & 0x0040;
+ _flags._port = flags & 0x0080;
+ _flags._kept = flags & 0x0100;
+ _flags._frnt = flags & 0x0200;
+ _flags._east = flags & 0x0400;
+ _flags._near = flags & 0x0800;
+ _flags._shad = flags & 0x1000;
+ _flags._back = flags & 0x2000;
+ _flags._zmov = flags & 0x4000;
+ _flags._tran = flags & 0x8000;
+ } else {
+ flags = (flags << 1) | (_flags._tran ? 1 : 0);
+ flags = (flags << 1) | (_flags._zmov ? 1 : 0);
+ flags = (flags << 1) | (_flags._back ? 1 : 0);
+ flags = (flags << 1) | (_flags._shad ? 1 : 0);
+ flags = (flags << 1) | (_flags._near ? 1 : 0);
+ flags = (flags << 1) | (_flags._east ? 1 : 0);
+ flags = (flags << 1) | (_flags._frnt ? 1 : 0);
+ flags = (flags << 1) | (_flags._kept ? 1 : 0);
+ flags = (flags << 1) | (_flags._port ? 1 : 0);
+ flags = (flags << 1) | (_flags._xlat ? 1 : 0);
+ flags = (flags << 1) | (_flags._kill ? 1 : 0);
+ flags = (flags << 1) | (_flags._slav ? 1 : 0);
+ flags = (flags << 1) | (_flags._trim ? 1 : 0);
+ flags = (flags << 1) | (_flags._hold ? 1 : 0);
+ flags = (flags << 1) | (_flags._drag ? 1 : 0);
+ flags = (flags << 1) | (_flags._hide ? 1 : 0);
+ s.syncAsUint16LE(flags);
+ }
+
+ s.syncAsSint16LE(_pos2D.x);
+ s.syncAsSint16LE(_pos2D.y);
+
+ _pos3D.sync(s);
+
+ s.syncAsSint16LE(_siz.x);
+ s.syncAsSint16LE(_siz.y);
+
+ s.syncAsUint16LE(_time);
+ for (int i = 0; i < kActions; i++){
+ s.syncAsByte(_actionCtrl[i]._ptr);
+ s.syncAsByte(_actionCtrl[i]._cnt);
+ }
+ s.syncAsSint16LE(_seqPtr);
+ s.syncAsSint16LE(_seqCnt);
+ s.syncAsUint16LE(_shpCnt);
+ s.syncBytes((byte *)&_file[0], 9);
+ _file[8] = '\0';
+}
+
+Queue::Queue(bool show) : _head(nullptr), _tail(nullptr) {
+}
+
+void Queue::append(Sprite *spr) {
+ if (spr->_flags._back)
+ spr->backShow();
+ else {
+ spr->expand();
+ if (_tail) {
+ spr->_prev = _tail;
+ _tail->_next = spr;
+ } else
+ _head = spr;
+
+ _tail = spr;
+ }
+}
+
+void Queue::insert(Sprite *spr, Sprite *nxt) {
+ if (spr->_flags._back)
+ spr->backShow();
+ else {
+ spr->expand();
+ if (nxt == _head) {
+ spr->_next = _head;
+ _head = spr;
+ if (!_tail)
+ _tail = spr;
+ } else {
+ spr->_next = nxt;
+ spr->_prev = nxt->_prev;
+ if (spr->_prev)
+ spr->_prev->_next = spr;
+ }
+ if (spr->_next)
+ spr->_next->_prev = spr;
+ }
+}
+
+void Queue::insert(Sprite *spr) {
+ if (locate(spr))
+ return; // We only queue it if it's not already queued.
+
+ Sprite *s;
+ for (s = _head; s; s = s->_next) {
+ if (s->_pos3D._z < spr->_pos3D._z)
+ break;
+ }
+
+ if (s)
+ insert(spr, s);
+ else
+ append(spr);
+}
+
+Sprite *Queue::remove(Sprite *spr) {
+ if (spr == _head)
+ _head = spr->_next;
+
+ if (spr == _tail)
+ _tail = spr->_prev;
+
+ if (spr->_next)
+ spr->_next->_prev = spr->_prev;
+
+ if (spr->_prev)
+ spr->_prev->_next = spr->_next;
+
+ spr->_prev = nullptr;
+ spr->_next = nullptr;
+ return spr;
+}
+
+Sprite *Queue::locate(int ref) {
+ for (Sprite *spr = _head; spr; spr = spr->_next) {
+ if (spr->_ref == ref)
+ return spr;
+ }
+ return nullptr;
+}
+
+bool Queue::locate(Sprite *spr) {
+ Sprite *s;
+ for (s = _head; s; s = s->_next) {
+ if (s == spr)
+ return true;
+ }
+
+ return false;
+}
+
+Vga::Vga(CGE2Engine *vm) : _frmCnt(0), _msg(nullptr), _name(nullptr), _setPal(false), _vm(vm) {
+ _rot._org = 1;
+ _rot._len = 0;
+ _rot._cnt = 0;
+ _rot._dly = 1;
+
+ _oldColors = nullptr;
+ _newColors = nullptr;
+ _showQ = new Queue(true);
+ _sysPal = new Dac[kPalCount];
+
+ for (int idx = 0; idx < 4; idx++) {
+ _page[idx] = new Graphics::Surface();
+ _page[idx]->create(kScrWidth, kScrHeight, Graphics::PixelFormat::createFormatCLUT8());
+ }
+
+ _mono = ConfMan.getBool("enable_color_blind");
+
+ _oldColors = (Dac *)malloc(sizeof(Dac) * kPalCount);
+ _newColors = (Dac *)malloc(sizeof(Dac) * kPalCount);
+ getColors(_oldColors);
+ sunset();
+ setColors();
+ clear(0);
+}
+
+Vga::~Vga() {
+ Common::String buffer = "";
+
+ free(_oldColors);
+ free(_newColors);
+ if (_msg)
+ buffer = Common::String(_msg);
+
+ if (_name)
+ buffer = buffer + " [" + _name + "]";
+
+ debugN("%s", buffer.c_str());
+
+ delete _showQ;
+ delete[] _sysPal;
+
+ for (int idx = 0; idx < 4; idx++) {
+ _page[idx]->free();
+ delete _page[idx];
+ }
+}
+
+void Vga::waitVR() {
+ // Since some of the game parts rely on using vertical sync as a delay mechanism,
+ // we're introducing a short delay to simulate it
+ g_system->delayMillis(5);
+}
+
+void Vga::getColors(Dac *tab) {
+ byte palData[kPalSize];
+ g_system->getPaletteManager()->grabPalette(palData, 0, kPalCount);
+ palToDac(palData, tab);
+}
+
+uint8 Vga::closest(Dac *pal, const uint8 colR, const uint8 colG, const uint8 colB) {
+#define f(col, lum) ((((uint16)(col)) << 8) / lum)
+ uint16 i, dif = 0xFFFF, found = 0;
+ uint16 L = colR + colG + colB;
+ if (!L)
+ L++;
+ uint16 R = f(colR, L), G = f(colG, L), B = f(colB, L);
+ for (i = 0; i < 256; i++) {
+ uint16 l = pal[i]._r + pal[i]._g + pal[i]._b;
+ if (!l)
+ l++;
+ int r = f(pal[i]._r, l), g = f(pal[i]._g, l), b = f(pal[i]._b, l);
+ uint16 D = ((r > R) ? (r - R) : (R - r)) +
+ ((g > G) ? (g - G) : (G - g)) +
+ ((b > B) ? (b - B) : (B - b)) +
+ ((l > L) ? (l - L) : (L - l)) * 10 ;
+
+ if (D < dif) {
+ found = i;
+ dif = D;
+ if (D == 0)
+ break; // exact!
+ }
+ }
+ return found;
+#undef f
+}
+
+uint8 Vga::closest(Dac *pal, Dac x) {
+ int exp = (sizeof(long) * 8 - 1);
+ long D = (1 << exp) - 1; // Maximum value of long.
+ long R = x._r;
+ long G = x._g;
+ long B = x._b;
+ int idx = 255;
+ for (int n = 0; n < 256; n++) {
+ long dR = R - pal[n]._r;
+ long dG = G - pal[n]._g;
+ long dB = B - pal[n]._b,
+ d = dR * dR + dG * dG + dB * dB;
+ if (d < D) {
+ idx = n;
+ D = d;
+ if (!d)
+ break;
+ }
+ }
+ return idx;
+}
+
+uint8 *Vga::glass(Dac *pal, const uint8 colR, const uint8 colG, const uint8 colB) {
+ uint8 *x = (uint8 *)malloc(256);
+ if (x) {
+ for (uint16 i = 0; i < 256; i++) {
+ x[i] = closest(pal, ((uint16)(pal[i]._r) * colR) / 255,
+ ((uint16)(pal[i]._g) * colG) / 255,
+ ((uint16)(pal[i]._b) * colB) / 255);
+ }
+ }
+ return x;
+}
+
+void Vga::palToDac(const byte *palData, Dac *tab) {
+ const byte *colP = palData;
+ for (int idx = 0; idx < kPalCount; idx++, colP += 3) {
+ tab[idx]._r = *colP >> 2;
+ tab[idx]._g = *(colP + 1) >> 2;
+ tab[idx]._b = *(colP + 2) >> 2;
+ }
+}
+
+void Vga::dacToPal(const Dac *tab, byte *palData) {
+ for (int idx = 0; idx < kPalCount; idx++, palData += 3) {
+ *palData = tab[idx]._r << 2;
+ *(palData + 1) = tab[idx]._g << 2;
+ *(palData + 2) = tab[idx]._b << 2;
+ }
+}
+
+void Vga::setColors(Dac *tab, int lum) {
+ Dac *palP = tab, *destP = _newColors;
+ for (int idx = 0; idx < kPalCount; idx++, palP++, destP++) {
+ destP->_r = (palP->_r * lum) >> 6;
+ destP->_g = (palP->_g * lum) >> 6;
+ destP->_b = (palP->_b * lum) >> 6;
+ }
+
+ if (_mono) {
+ destP = _newColors;
+ for (int idx = 0; idx < kPalCount; idx++, destP++) {
+ // Form a grayscale color from 30% R, 59% G, 11% B
+ uint8 intensity = (((int)destP->_r * 77) + ((int)destP->_g * 151) + ((int)destP->_b * 28)) >> 8;
+ destP->_r = intensity;
+ destP->_g = intensity;
+ destP->_b = intensity;
+ }
+ }
+
+ _setPal = true;
+}
+
+void Vga::setColors() {
+ memset(_newColors, 0, kPalSize);
+ updateColors();
+}
+
+void Vga::sunrise(Dac *tab) {
+ for (int i = 0; i <= 64; i += kFadeStep) {
+ setColors(tab, i);
+ waitVR();
+ updateColors();
+ g_system->updateScreen();
+ }
+}
+
+void Vga::sunset() {
+ Dac tab[256];
+ getColors(tab);
+ for (int i = 64; i >= 0; i -= kFadeStep) {
+ setColors(tab, i);
+ waitVR();
+ updateColors();
+ g_system->updateScreen();
+ }
+}
+
+void Vga::show() {
+ _vm->_infoLine->update();
+
+ for (Sprite *spr = _showQ->first(); spr; spr = spr->_next) {
+ spr->show();
+ }
+
+ _vm->_mouse->show();
+ update();
+ rotate();
+
+ for (Sprite *spr = _showQ->first(); spr; spr = spr->_next) {
+ spr->hide();
+ if (spr->_flags._zmov) {
+ Sprite *s = nullptr;
+ Sprite *p = spr->_prev;
+ Sprite *n = spr->_next;
+
+ if (spr->_flags._shad) {
+ s = p;
+ p = s->_prev;
+ }
+
+ if ((p && spr->_pos3D._z > p->_pos3D._z) ||
+ (n && spr->_pos3D._z < n->_pos3D._z)) {
+ _showQ->insert(_showQ->remove(spr));
+ }
+ spr->_flags._zmov = false;
+ }
+ }
+ _vm->_mouse->hide();
+}
+
+void Vga::updateColors() {
+ byte palData[kPalSize];
+ dacToPal(_newColors, palData);
+ g_system->getPaletteManager()->setPalette(palData, 0, 256);
+}
+
+void Vga::update() {
+ SWAP(Vga::_page[0], Vga::_page[1]);
+
+ if (_setPal) {
+ updateColors();
+ _setPal = false;
+ }
+
+ g_system->copyRectToScreen(Vga::_page[0]->getPixels(), kScrWidth, 0, 0, kScrWidth, kScrHeight);
+ g_system->updateScreen();
+}
+
+void Vga::rotate() {
+ if (_rot._len) {
+ Dac c;
+ getColors(_newColors);
+ c = _newColors[_rot._org];
+ memmove(_newColors + _rot._org, _newColors + _rot._org + 1, (_rot._len - 1) * sizeof(Dac));
+ _newColors[_rot._org + _rot._len - 1] = c;
+ _setPal = true;
+ }
+}
+
+void Vga::clear(uint8 color) {
+ for (int paneNum = 0; paneNum < 4; paneNum++)
+ _page[paneNum]->fillRect(Common::Rect(0, 0, kScrWidth, kScrHeight), color);
+}
+
+void Vga::copyPage(uint16 d, uint16 s) {
+ _page[d]->copyFrom(*_page[s]);
+}
+
+void Bitmap::show(V2D pos) {
+ xLatPos(pos);
+
+ const byte *srcP = (const byte *)_v;
+ byte *screenStartP = (byte *)_vm->_vga->_page[1]->getPixels();
+ byte *screenEndP = (byte *)_vm->_vga->_page[1]->getBasePtr(0, kScrHeight);
+
+ // Loop through processing data for each plane. The game originally ran in plane mapped mode, where a
+ // given plane holds each fourth pixel sequentially. So to handle an entire picture, each plane's data
+ // must be decompressed and inserted into the surface
+ for (int planeCtr = 0; planeCtr < 4; planeCtr++) {
+ byte *destP = (byte *)_vm->_vga->_page[1]->getBasePtr(pos.x + planeCtr, pos.y);
+
+ for (;;) {
+ uint16 v = READ_LE_UINT16(srcP);
+ srcP += 2;
+ int cmd = v >> 14;
+ int count = v & 0x3FFF;
+
+ if (cmd == 0) {
+ // End of image
+ break;
+ }
+
+ // Handle a set of pixels
+ while (count-- > 0) {
+ // Transfer operation
+ switch (cmd) {
+ case 1:
+ // SKIP
+ break;
+ case 2:
+ // REPEAT
+ if (destP >= screenStartP && destP < screenEndP)
+ *destP = *srcP;
+ break;
+ case 3:
+ // COPY
+ if (destP >= screenStartP && destP < screenEndP)
+ *destP = *srcP;
+ srcP++;
+ break;
+ }
+
+ // Move to next dest position
+ destP += 4;
+ }
+
+ if (cmd == 2)
+ srcP++;
+ }
+ }
+}
+
+void Bitmap::hide(V2D pos) {
+ xLatPos(pos);
+
+ // Perform clipping to screen
+ int w = MIN<int>(_w, kScrWidth - pos.x);
+ int h = MIN<int>(_h, kScrHeight - pos.y);
+ if (pos.x < 0) {
+ w -= -pos.x;
+ pos.x = 0;
+ if (w < 0)
+ return;
+ }
+ if (pos.y < 0) {
+ h -= -pos.y;
+ pos.y = 0;
+ if (h < 0)
+ return;
+ }
+
+ // Perform copying of screen section
+ for (int yp = pos.y; yp < pos.y + h; yp++) {
+ if (yp >= 0 && yp < kScrHeight) {
+ const byte *srcP = (const byte *)_vm->_vga->_page[2]->getBasePtr(pos.x, yp);
+ byte *destP = (byte *)_vm->_vga->_page[1]->getBasePtr(pos.x, yp);
+
+ Common::copy(srcP, srcP + w, destP);
+ }
+ }
+}
+
+Speaker::Speaker(CGE2Engine *vm): Sprite(vm), _vm(vm) {
+ // Set the sprite list
+ BitmapPtr SP = new Bitmap[2];
+ uint8 *map = Bitmap::makeSpeechBubbleTail(0, _vm->_font->_colorSet);
+ SP[0] = Bitmap(_vm, 15, 16, map);
+ delete[] map;
+ map = Bitmap::makeSpeechBubbleTail(1, _vm->_font->_colorSet);
+ SP[1] = Bitmap(_vm, 15, 16, map);
+ delete[] map;
+ setShapeList(SP, 2);
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/vga13h.h b/engines/cge2/vga13h.h
new file mode 100644
index 0000000000..553f183de4
--- /dev/null
+++ b/engines/cge2/vga13h.h
@@ -0,0 +1,308 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_VGA13H_H
+#define CGE2_VGA13H_H
+
+#include "common/serializer.h"
+#include "common/events.h"
+#include "graphics/surface.h"
+#include "cge2/general.h"
+#include "cge2/bitmap.h"
+#include "cge2/snail.h"
+#include "cge2/spare.h"
+#include "cge2/cge2.h"
+
+namespace CGE2 {
+
+#define kFadeStep 2
+#define kVgaColDark 207
+#define kVgaColDarkGray 225 /*219*/
+#define kVgaColGray 231
+#define kVgaColLightGray 237
+#define kPixelTransp 0xFE
+#define kNoSeq (-1)
+#define kNoPtr ((uint8)-1)
+#define kSprExt ".SPR"
+#define kPalCount 256
+#define kPalSize (kPalCount * 3)
+
+class FXP {
+ int32 v;
+public:
+ FXP(void) : v(0) {}
+ FXP (int i0, int f0 = 0) : v((i0 * 256) + ((i0 < 0) ? -f0 : f0)) {}
+ FXP &operator=(const int &x) { v = x << 8; return *this; }
+ FXP operator+(const FXP &x) const { FXP y; y.v = v + x.v; return y; }
+ FXP operator-(const FXP &x) const { FXP y; y.v = v - x.v; return y; }
+ FXP operator*(const FXP &x) const;
+ FXP operator/(const FXP &x) const;
+
+ friend int &operator+=(int &a, const FXP &b) { return a += b.trunc(); }
+ friend int &operator-=(int &a, const FXP &b) { return a -= b.trunc(); }
+ friend FXP &operator+=(FXP &a, const int &b) { a.v += b << 8; return a; }
+ friend FXP &operator-=(FXP &a, const int &b) { a.v -= b << 8; return a; }
+ friend bool operator==(const FXP &a, const FXP &b) { return a.v == b.v; }
+ friend bool operator!=(const FXP &a, const FXP &b) { return a.v != b.v; }
+ friend bool operator<(const FXP &a, const FXP &b) { return a.v < b.v; }
+ friend bool operator>(const FXP &a, const FXP &b) { return a.v > b.v; }
+ int trunc(void) const { return v >> 8; }
+ int round(void) const { return (v + 0x80) >> 8; }
+ bool empty() const { return v == 0; }
+ void sync(Common::Serializer &s);
+};
+
+class V3D {
+public:
+ FXP _x, _y, _z;
+ V3D() { }
+ V3D(FXP x, FXP y, FXP z = 0) : _x(x), _y(y), _z(z) { }
+ V3D(const V3D &p) : _x(p._x), _y(p._y), _z(p._z) { }
+ V3D operator+(const V3D &p) const { return V3D(_x + p._x, _y + p._y, _z + p._z); }
+ V3D operator-(const V3D &p) const { return V3D(_x - p._x, _y - p._y, _z - p._z); }
+ V3D operator*(long n) const { return V3D(_x * n, _y * n, _z * n); }
+ V3D operator/ (long n) const { return V3D(_x / n, _y / n, _z / n); }
+ bool operator==(const V3D &p) const { return _x == p._x && _y == p._y && _z == p._z; }
+ bool operator!=(const V3D &p) const { return _x != p._x || _y != p._y || _z != p._z; }
+ V3D& operator+=(const V3D &x) { return *this = *this + x; }
+ V3D& operator-=(const V3D &x) { return *this = *this - x; }
+ void sync(Common::Serializer &s);
+};
+
+class V2D : public Common::Point {
+ CGE2Engine *_vm;
+public:
+ V2D &operator=(const V3D &p3) {
+ FXP m = _vm->_eye->_z / (p3._z - _vm->_eye->_z);
+ FXP posx = _vm->_eye->_x + (_vm->_eye->_x - p3._x) * m;
+ x = posx.round();
+ FXP posy = _vm->_eye->_y + (_vm->_eye->_y - p3._y) * m;
+ y = posy.round();
+ return *this;
+ }
+ V2D(CGE2Engine *vm) : _vm(vm) { }
+ V2D(CGE2Engine *vm, const V3D &p3) : _vm(vm) { *this = p3; }
+ V2D(CGE2Engine *vm, int posx, int posy) : _vm(vm), Common::Point(posx, posy) { }
+ bool operator<(const V2D &p) const { return (x < p.x) && (y < p.y); }
+ bool operator<=(const V2D &p) const { return (x <= p.x) && (y <= p.y); }
+ bool operator>(const V2D &p) const { return (x > p.x) && (y > p.y); }
+ bool operator>=(const V2D &p) const { return (x >= p.x) && (y >= p.y); }
+ V2D operator+(const V2D &p) const { return V2D(_vm, x + p.x, y + p.y); }
+ V2D operator-(const V2D &p) const { return V2D(_vm, x - p.x, y - p.y); }
+ bool operator==(const V3D &p) const { V3D tmp(x, y); return tmp._x == p._x && tmp._y == p._y && tmp._z == p._z; }
+ bool operator!=(const V3D &p) const { V3D tmp(x, y); return tmp._x != p._x || tmp._y != p._y || tmp._z == p._z; }
+ bool operator==(const V2D &p) const { return x == p.x && y == p.y; }
+ uint16 area() { return x * y; }
+ bool limited(const V2D &p) {
+ return ((x < p.x) && (y < p.y));
+ }
+ V2D scale (int z) {
+ FXP m = _vm->_eye->_z / (_vm->_eye->_z - z);
+ FXP posx = m * x;
+ FXP posy = m * y;
+ return V2D(_vm, posx.trunc(), posy.trunc());
+ }
+};
+
+struct Seq {
+ uint8 _now;
+ uint8 _next;
+ int8 _dx;
+ int8 _dy;
+ int8 _dz;
+ int _dly;
+};
+
+class SprExt {
+public:
+ V2D _p0;
+ V2D _p1;
+ BitmapPtr _b0;
+ BitmapPtr _b1;
+ BitmapPtr _shpList;
+ int _location;
+ Seq *_seq;
+ char *_name;
+ CommandHandler::Command *_actions[kActions];
+ SprExt(CGE2Engine *vm);
+};
+
+class Sprite {
+protected:
+ SprExt *_ext;
+ CGE2Engine *_vm;
+public:
+ int _ref;
+ signed char _scene;
+ struct Flags {
+ bool _hide; // general visibility switch
+ bool _drag; // sprite is moveable
+ bool _hold; // sprite is held with mouse
+ bool _trim; // Trim flag
+ bool _slav; // slave object
+ bool _kill; // dispose memory after remove
+ bool _xlat; // 2nd way display: xlat table
+ bool _port; // portable
+ bool _kept; // kept in pocket
+ bool _frnt; // stay in front of sprite
+ bool _east; // talk to east (in opposite to west)
+ bool _near; // Near action lock
+ bool _shad; // shadow
+ bool _back; // 'send to background' request
+ bool _zmov; // sprite needs Z-update in queue
+ bool _tran; // transparent (untouchable)
+ } _flags;
+ V2D _pos2D;
+ V3D _pos3D;
+ V2D _siz;
+ uint16 _time;
+ struct { byte _ptr, _cnt; } _actionCtrl[kActions];
+ int _seqPtr;
+ int _seqCnt;
+ int _shpCnt;
+ char _file[kMaxFile];
+ // Following trailer is not saved with the game:
+ Sprite *_prev;
+ Sprite *_next;
+ static byte _constY;
+ static byte _follow;
+ static Seq _stdSeq8[];
+
+ bool works(Sprite *spr);
+ bool seqTest(int n);
+ inline bool active() {
+ return _ext != nullptr;
+ }
+ Sprite(CGE2Engine *vm);
+ Sprite(CGE2Engine *vm, BitmapPtr shp, int cnt);
+ virtual ~Sprite();
+ BitmapPtr getShp();
+ void setShapeList(BitmapPtr shp, int cnt);
+ void moveShapesHi();
+ void moveShapesLo();
+ int labVal(Action snq, int lab);
+ virtual Sprite *expand();
+ virtual Sprite *contract();
+ void backShow();
+ void setName(char *newName);
+ inline char *name() {
+ return (_ext) ? _ext->_name : nullptr;
+ }
+ void gotoxyz(int x, int y, int z = 0);
+ void gotoxyz();
+ void gotoxyz(V2D pos);
+ void gotoxyz_(V2D pos);
+ void gotoxyz(V3D pos);
+ void center();
+ void show(uint16 pg);
+ void hide(uint16 pg);
+ void show();
+ void hide();
+ BitmapPtr ghost();
+ void step(int nr = -1);
+ Seq *setSeq(Seq *seq);
+ CommandHandler::Command *snList(Action type);
+ virtual void touch(uint16 mask, V2D pos, Common::KeyCode keyCode);
+ virtual void tick();
+ virtual void setScene(int c);
+ void clrHide() { if (_ext) _ext->_b0 = nullptr; }
+
+ void sync(Common::Serializer &s);
+
+ static void (*notify) ();
+};
+
+class Queue {
+ Sprite *_head;
+ Sprite *_tail;
+public:
+ Queue(bool show);
+
+ void append(Sprite *spr);
+ void insert(Sprite *spr, Sprite *nxt);
+ void insert(Sprite *spr);
+ Sprite *remove(Sprite *spr);
+ Sprite *first() {
+ return _head;
+ }
+ Sprite *last() {
+ return _tail;
+ }
+ Sprite *locate(int ref);
+ bool locate(Sprite *spr);
+ void clear() { _head = _tail = nullptr; }
+};
+
+class Vga {
+ CGE2Engine *_vm;
+ bool _setPal;
+ Dac *_oldColors;
+ Dac *_newColors;
+ const char *_msg;
+ const char *_name;
+
+ void updateColors();
+ void setColors();
+ void waitVR();
+ uint8 closest(Dac *pal, const uint8 colR, const uint8 colG, const uint8 colB);
+
+public:
+ uint32 _frmCnt;
+ Queue *_showQ;
+ bool _mono;
+ Graphics::Surface *_page[4];
+ Dac *_sysPal;
+ struct { uint8 _org, _len, _cnt, _dly; } _rot;
+
+ Vga(CGE2Engine *vm);
+ ~Vga();
+
+ uint8 *glass(Dac *pal, const uint8 colR, const uint8 colG, const uint8 colB);
+ void getColors(Dac *tab);
+ void setColors(Dac *tab, int lum);
+ void clear(uint8 color);
+ void copyPage(uint16 d, uint16 s);
+ void sunrise(Dac *tab);
+ void sunset();
+ void show();
+ void update();
+ void rotate();
+ uint8 closest(Dac *pal, Dac x);
+
+ void palToDac(const byte *palData, Dac *tab);
+ void dacToPal(const Dac *tab, byte *palData);
+};
+
+class Speaker: public Sprite {
+ CGE2Engine *_vm;
+public:
+ Speaker(CGE2Engine *vm);
+};
+
+} // End of namespace CGE2
+
+#endif // CGE2_VGA13H_H
diff --git a/engines/cge2/vmenu.cpp b/engines/cge2/vmenu.cpp
new file mode 100644
index 0000000000..6afe5e9a61
--- /dev/null
+++ b/engines/cge2/vmenu.cpp
@@ -0,0 +1,162 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#include "cge2/text.h"
+#include "cge2/vmenu.h"
+#include "cge2/events.h"
+
+namespace CGE2 {
+
+Choice::Choice(CGE2Engine *vm) : _vm(vm), _text(nullptr) {}
+
+ExitGameChoice::ExitGameChoice(CGE2Engine *vm) : Choice(vm) {
+ _text = _vm->_text->getText(kQuitText);
+}
+
+void ExitGameChoice::proc() {
+ _vm->switchScene(-1);
+}
+
+ReturnToGameChoice::ReturnToGameChoice(CGE2Engine *vm) : Choice(vm) {
+ _text = _vm->_text->getText(kNoQuitText);
+}
+
+void ReturnToGameChoice::proc() {
+ _vm->_commandHandlerTurbo->addCommand(kCmdSeq, kPowerRef, 1, nullptr);
+ _vm->keyClick();
+}
+
+MenuBar::MenuBar(CGE2Engine *vm, uint16 w, byte *c) : Talk(vm) {
+ _color = c;
+ int h = kFontHigh + 2 * kMenuBarVerticalMargin, i = (w += 2 * kMenuBarHorizontalMargin) * h;
+ uint8 *p = new uint8[i];
+ uint8 *p1;
+ uint8 *p2;
+ uint8 lt = _color[kLt];
+ uint8 rb = _color[kRb];
+ BitmapPtr b;
+
+ memset(p + w, kPixelTransp, i - 2 * w);
+ memset(p, lt, w);
+ memset(p + i - w, rb, w);
+ p1 = p;
+ p2 = p + i - 1;
+ for (i = 0; i < h; i++) {
+ *p1 = lt;
+ *p2 = rb;
+ p1 += w;
+ p2 -= w;
+ }
+ b = new Bitmap[1];
+ b[0] = Bitmap(vm, w, h, p);
+ delete[] p;
+ setShapeList(b, 1);
+ _flags._slav = true;
+ _flags._tran = true;
+ _flags._kill = true;
+}
+
+VMenu *VMenu::_addr = nullptr;
+
+VMenu::VMenu(CGE2Engine *vm, Common::Array<Choice *> list, V2D pos, ColorBank col)
+ : Talk(vm, vmGather(list), kTBRect, col), _menu(list), _bar(nullptr), _items(list.size()), _vm(vm) {
+ delete[] _vmgt; // Lefotver of vmGather.
+
+ _addr = this;
+ _recent = -1;
+ _flags._kill = true;
+
+ if (pos.x < 0 || pos.y < 0)
+ center();
+ else
+ gotoxyz(V2D(_vm, pos.x - _siz.x / 2, pos.y - (kTextVMargin + kFontHigh / 2)));
+
+ _vm->_vga->_showQ->append(this);
+ _bar = new MenuBar(_vm, _siz.x - 2 * kTextHMargin, _color);
+ _bar->gotoxyz(V2D(_vm, _pos2D.x, _pos2D.y + kTextVMargin - kMenuBarVerticalMargin));
+ _vm->_vga->_showQ->append(_bar);
+}
+
+char *VMenu::vmGather(Common::Array<Choice *> list) {
+ int len = 0;
+ int h = 0;
+
+ for (uint i = 0; i < list.size(); i++) {
+ len += strlen(list[i]->_text);
+ ++h;
+ }
+ _vmgt = new char[len + h];
+ *_vmgt = '\0';
+ for (uint i = 0; i < list.size(); i++) {
+ if (*_vmgt)
+ strcat(_vmgt, "|");
+ strcat(_vmgt, list[i]->_text);
+ ++h;
+ }
+
+ return _vmgt;
+}
+
+
+VMenu::~VMenu() {
+ _addr = nullptr;
+
+ for (uint i = 0; i < _menu.size(); i++) {
+ delete _menu[i];
+ }
+}
+
+void VMenu::touch(uint16 mask, V2D pos, Common::KeyCode keyCode) {
+ if (_items) {
+ Sprite::touch(mask, pos, keyCode);
+
+ int n = 0;
+ bool ok = false;
+ int h = kFontHigh + kTextLineSpace;
+ pos.y -= kTextVMargin - 1;
+ if (pos.y >= 0) {
+ if (pos.x < 0)
+ pos.x = -pos.x;
+ n = pos.y / h;
+ if (n < _items)
+ ok = (pos.x <= (_siz.x >> 1) - kTextHMargin);
+ else
+ n = _items - 1;
+ }
+
+ _bar->gotoxyz(V2D(_vm, _pos2D.x, _pos2D.y + kTextVMargin + n * h - kMenuBarVerticalMargin));
+ n = _items - 1 - n;
+
+ if (ok && (mask & kMouseLeftUp)) {
+ _items = 0;
+ _vm->_commandHandlerTurbo->addCommand(kCmdKill, -1, 0, this);
+ _menu[_recent = n]->proc();
+ }
+ }
+}
+
+} // End of namespace CGE2
diff --git a/engines/cge2/vmenu.h b/engines/cge2/vmenu.h
new file mode 100644
index 0000000000..f34812dcf4
--- /dev/null
+++ b/engines/cge2/vmenu.h
@@ -0,0 +1,89 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This code is based on original Sfinx source code
+ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
+ */
+
+#ifndef CGE2_VMENU_H
+#define CGE2_VMENU_H
+
+#define kMenuBarVerticalMargin 1
+#define kMenuBarHorizontalMargin 3
+#define kLt 3
+#define kRb 1
+
+#include "cge2/cge2.h"
+#include "cge2/talk.h"
+
+namespace CGE2 {
+
+class Choice {
+protected:
+ CGE2Engine *_vm;
+public:
+ char *_text;
+
+ virtual void proc() = 0;
+
+ Choice(CGE2Engine *vm);
+ virtual ~Choice() {};
+};
+
+class ExitGameChoice : public Choice {
+public:
+ ExitGameChoice(CGE2Engine *vm);
+ void proc();
+};
+
+class ReturnToGameChoice : public Choice {
+public:
+ ReturnToGameChoice(CGE2Engine *vm);
+ void proc();
+};
+
+class MenuBar : public Talk {
+public:
+ MenuBar(CGE2Engine *vm, uint16 w, byte *c);
+};
+
+class VMenu : public Talk {
+ CGE2Engine *_vm;
+
+ uint16 _items;
+ Common::Array<Choice *> _menu;
+public:
+ char *_vmgt;
+ static VMenu *_addr;
+ int _recent;
+ MenuBar *_bar;
+
+ VMenu(CGE2Engine *vm, Common::Array<Choice *> list, V2D pos, ColorBank col);
+ ~VMenu();
+ void touch(uint16 mask, V2D pos, Common::KeyCode keyCode);
+ char *vmGather(Common::Array<Choice *> list);
+};
+
+} // End of namespace CGE2
+
+#endif // CGE2_VMENU_H
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index 471a29030b..f070338978 100644
--- a/engines/composer/composer.cpp
+++ b/engines/composer/composer.cpp
@@ -135,7 +135,7 @@ Common::Error ComposerEngine::run() {
else
loadLibrary(_pendingPageChanges[i]._pageId);
- lastDrawTime = _system->getMillis();
+ lastDrawTime = 0;
}
_pendingPageChanges.clear();
@@ -168,9 +168,10 @@ Common::Error ComposerEngine::run() {
else
lastDrawTime += frameTime;
+ tickOldScripts();
+
redraw();
- tickOldScripts();
processAnimFrame();
} else if (_needsUpdate) {
redraw();
diff --git a/engines/composer/scripting.cpp b/engines/composer/scripting.cpp
index 94ca2c1bc8..cd78202ecd 100644
--- a/engines/composer/scripting.cpp
+++ b/engines/composer/scripting.cpp
@@ -746,6 +746,7 @@ void ComposerEngine::stopOldScript(uint16 id) {
for (Common::List<OldScript *>::iterator i = _oldScripts.begin(); i != _oldScripts.end(); i++) {
if ((*i)->_id == id) {
+ removeSprite(0, id);
delete *i;
i = _oldScripts.reverse_erase(i);
}
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index 5c1a37a8eb..eebd8fdc15 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -53,8 +53,7 @@ CruiseEngine::CruiseEngine(OSystem * syst, const CRUISEGameDescription *gameDesc
PCFadeFlag = false;
_preLoad = false;
_savedCursor = CURSOR_NOMOUSE;
- lastTick = 0;
- lastTickDebug = 0;
+ _lastTick = 0;
_gameSpeed = GAME_FRAME_DELAY_1;
_speedFlag = false;
_polyStructs = nullptr;
diff --git a/engines/cruise/cruise.h b/engines/cruise/cruise.h
index c81e5dd5ec..8624ba693e 100644
--- a/engines/cruise/cruise.h
+++ b/engines/cruise/cruise.h
@@ -60,7 +60,7 @@ private:
PCSound *_sound;
Common::StringArray _langStrings;
CursorType _savedCursor;
- uint32 lastTick, lastTickDebug;
+ uint32 _lastTick;
int _gameSpeed;
bool _speedFlag;
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index f2f7e0c2b0..0ad1416df2 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -934,8 +934,11 @@ bool createDialog(int objOvl, int objIdx, int x, int y) {
else
color = -1;
- ptr = getObjectName(ptrHead->obj1Number, ovl3->arrayNameObj);
- addSelectableMenuEntry(j, i, menuTable[0], 1, color, ptr);
+ if (ovl3) {
+ ptr = getObjectName(ptrHead->obj1Number, ovl3->arrayNameObj);
+ addSelectableMenuEntry(j, i, menuTable[0], 1, color, ptr);
+ } else
+ error("Unexpected null pointer in createDialog()");
}
}
}
@@ -1157,7 +1160,7 @@ void callSubRelation(menuElementSubStruct *pMenuElement, int nOvl, int nObj) {
createTextObject(&cellHead, ovlIdx, pHeader->id, x, y, 200, findHighColor(), masterScreen, 0, 0);
}
- userWait = 1;
+ userWait = true;
autoOvl = ovlIdx;
autoMsg = pHeader->id;
@@ -1186,7 +1189,7 @@ void callSubRelation(menuElementSubStruct *pMenuElement, int nOvl, int nObj) {
pTrack->flag = 1;
autoTrack = true;
- userWait = 0;
+ userWait = false;
userEnabled = 0;
freezeCell(&cellHead, ovlIdx, pHeader->id, 5, -1, 0, 9998);
}
@@ -1303,7 +1306,7 @@ void callRelation(menuElementSubStruct *pMenuElement, int nObj2) {
createTextObject(&cellHead, ovlIdx, pHeader->id, x, y, 200, findHighColor(), masterScreen, 0, 0);
}
- userWait = 1;
+ userWait = true;
autoOvl = ovlIdx;
autoMsg = pHeader->id;
@@ -1334,7 +1337,7 @@ void callRelation(menuElementSubStruct *pMenuElement, int nObj2) {
pTrack->flag = 1;
autoTrack = true;
- userWait = 0;
+ userWait = false;
userEnabled = 0;
freezeCell(&cellHead, ovlIdx, pHeader->id, 5, -1, 0, 9998);
}
@@ -1455,7 +1458,7 @@ int CruiseEngine::processInput() {
if (userWait) {
// Check for left mouse button click or Space to end user waiting
if ((keyboardCode == Common::KEYCODE_SPACE) || (button == CRS_MB_LEFT))
- userWait = 0;
+ userWait = false;
keyboardCode = Common::KEYCODE_INVALID;
return 0;
@@ -1772,9 +1775,7 @@ void CruiseEngine::mainLoop() {
currentActiveMenu = -1;
autoMsg = -1;
linkedRelation = 0;
- main21 = 0;
- main22 = 0;
- userWait = 0;
+ userWait = false;
autoTrack = false;
initAllData();
@@ -1829,10 +1830,7 @@ void CruiseEngine::mainLoop() {
if (!skipEvents || bFastMode)
skipEvents = manageEvents();
- if (bFastMode) {
- if (currentTick >= (lastTickDebug + 10))
- lastTickDebug = currentTick;
- } else {
+ if (!bFastMode) {
g_system->delayMillis(10);
currentTick = g_system->getMillis();
}
@@ -1841,11 +1839,11 @@ void CruiseEngine::mainLoop() {
break;
_vm->getDebugger()->onFrame();
- } while (currentTick < lastTick + _gameSpeed && !bFastMode);
+ } while (currentTick < _lastTick + _gameSpeed && !bFastMode);
if (_playerDontAskQuit)
break;
- lastTick = g_system->getMillis();
+ _lastTick = g_system->getMillis();
// Handle switchover in game speed after intro
if (!_speedFlag && canLoadGameStateCurrently()) {
@@ -1860,7 +1858,7 @@ void CruiseEngine::mainLoop() {
// readKeyboard();
- bool isUserWait = userWait != 0;
+ bool isUserWait = userWait;
// WORKAROUND: This prevents hotspots responding during
// delays i.e. Menu opening if you click fast on another
// hotspot after trying to open a locked door, which
@@ -1941,7 +1939,7 @@ void CruiseEngine::mainLoop() {
mainDraw(userWait);
flipScreen();
- if (userWait == 1) {
+ if (userWait) {
// Waiting for press - original wait loop has been integrated into the
// main event loop
continue;
@@ -1956,7 +1954,7 @@ void CruiseEngine::mainLoop() {
char* pText = getText(autoMsg, autoOvl);
if (strlen(pText))
- userWait = 1;
+ userWait = true;
}
changeScriptParamInList(-1, -1, &relHead, 9998, 0);
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index 33f3bbaf4a..3f794c4e70 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -1512,6 +1512,9 @@ int16 Op_Itoa() {
int param[160];
char txt[40];
+ for (int i = 0; i < 160; ++i)
+ param[i] = 0;
+
for (int i = nbp - 1; i >= 0; i--)
param[i] = popVar();
@@ -1829,7 +1832,7 @@ int16 Op_ThemeReset() {
}
int16 Op_UserWait() {
- userWait = 1;
+ userWait = true;
if (currentScriptPtr->type == scriptType_PROC) {
changeScriptParamInList(currentScriptPtr->overlayNumber, currentScriptPtr->scriptNumber, &procHead, -1, 9999);
} else if (currentScriptPtr->type == scriptType_REL) {
diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp
index 98e7e66aa6..5777b846b4 100644
--- a/engines/cruise/mainDraw.cpp
+++ b/engines/cruise/mainDraw.cpp
@@ -1377,7 +1377,7 @@ int getValueFromObjectQuerry(objectParamsQuery *params, int idx) {
return 0;
}
-void mainDraw(int16 param) {
+void mainDraw(bool waitFl) {
uint8 *bgPtr;
cellStruct *currentObjPtr;
int16 currentObjIdx;
@@ -1461,7 +1461,7 @@ void mainDraw(int16 param) {
}
// automatic animation process
- if (currentObjPtr->animStep && !param) {
+ if (currentObjPtr->animStep && !waitFl) {
if (currentObjPtr->animCounter <= 0) {
bool change = true;
diff --git a/engines/cruise/mainDraw.h b/engines/cruise/mainDraw.h
index bb71b9759b..1af403fca5 100644
--- a/engines/cruise/mainDraw.h
+++ b/engines/cruise/mainDraw.h
@@ -33,7 +33,7 @@ extern int m_color;
int upscaleValue(int value, int scale);
void pixel(int x, int y, char color);
-void mainDraw(int16 param);
+void mainDraw(bool waitFl);
void flipScreen();
void buildPolyModel(int X, int Y, int scale, char *ptr2, char *destBuffer, char *dataPtr);
void drawSprite(int width, int height, cellStruct *currentObjPtr, const uint8 *dataIn, int ys, int xs, uint8 *output, const uint8 *dataBuf);
diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp
index c72192fc1b..cf0b872646 100644
--- a/engines/cruise/menu.cpp
+++ b/engines/cruise/menu.cpp
@@ -160,7 +160,7 @@ int processMenu(menuStruct *pMenu) {
int si;
currentActiveMenu = 0;
- mainDraw(1);
+ mainDraw(true);
flipScreen();
di = 0;
@@ -179,7 +179,7 @@ int processMenu(menuStruct *pMenu) {
di = 1;
}
- mainDraw(1);
+ mainDraw(true);
flipScreen();
manageEvents();
@@ -190,7 +190,7 @@ int processMenu(menuStruct *pMenu) {
currentActiveMenu = -1;
- mainDraw(1);
+ mainDraw(true);
flipScreen();
if (mouseButton & 1) {
diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp
index 8e64faa14c..a62648df08 100644
--- a/engines/cruise/saveload.cpp
+++ b/engines/cruise/saveload.cpp
@@ -947,7 +947,7 @@ Common::Error loadSavegameData(int saveGameIdx) {
// to finish
changeCursor(CURSOR_NORMAL);
- mainDraw(1);
+ mainDraw(true);
flipScreen();
return Common::kNoError;
diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp
index cc9a17eb9a..0b0fab8c4a 100644
--- a/engines/cruise/sound.cpp
+++ b/engines/cruise/sound.cpp
@@ -607,6 +607,13 @@ PCSoundFxPlayer::PCSoundFxPlayer(PCSoundDriver *driver)
_sfxData = NULL;
_fadeOutCounter = 0;
_driver->setUpdateCallback(updateCallback, this);
+
+ _currentPos = 0;
+ _currentOrder = 0;
+ _numOrders = 0;
+ _eventsDelay = 0;
+ _looping = false;
+ _updateTicksCounter = 0;
}
PCSoundFxPlayer::~PCSoundFxPlayer() {
@@ -792,6 +799,7 @@ PCSound::PCSound(Audio::Mixer *mixer, CruiseEngine *vm) {
_mixer = mixer;
_soundDriver = new AdLibSoundDriverADL(_mixer);
_player = new PCSoundFxPlayer(_soundDriver);
+ _genVolume = 0;
}
PCSound::~PCSound() {
diff --git a/engines/cruise/vars.cpp b/engines/cruise/vars.cpp
index 9a59c8a714..e9b68968ef 100644
--- a/engines/cruise/vars.cpp
+++ b/engines/cruise/vars.cpp
@@ -53,9 +53,7 @@ char nextOverlay[38];
int16 currentActiveMenu;
int16 autoMsg;
menuElementSubStruct* linkedRelation;
-int16 main21;
-int16 main22;
-int16 userWait;
+bool userWait;
int16 autoTrack;
int16 currentDiskNumber = 1;
diff --git a/engines/cruise/vars.h b/engines/cruise/vars.h
index fe3f7d6303..e7c687d5fb 100644
--- a/engines/cruise/vars.h
+++ b/engines/cruise/vars.h
@@ -156,9 +156,7 @@ extern char nextOverlay[38];
extern int16 currentActiveMenu;
extern int16 autoMsg;
extern menuElementSubStruct* linkedRelation;
-extern int16 main21;
-extern int16 main22;
-extern int16 userWait;
+extern bool userWait;
extern int16 autoTrack;
extern int16 currentDiskNumber;
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index b158969f46..5009a62e84 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -45,9 +45,6 @@ void DrasculaEngine::updateAnim(int y, int destX, int destY, int width, int heig
void DrasculaEngine::animation_1_1() {
debug(4, "animation_1_1()");
- int l, l2, p;
- //int pixelPos[6];
-
while (term_int == 0 && !shouldQuit()) {
playMusic(29);
playFLI("logoddm.bin", 9);
@@ -119,8 +116,8 @@ void DrasculaEngine::animation_1_1() {
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit())
break;
- for (l2 = 0; l2 < 3; l2++)
- for (l = 0; l < 7; l++) {
+ for (int l2 = 0; l2 < 3; l2++)
+ for (int l = 0; l < 7; l++) {
copyBackground();
copyBackground(interf_x[l], interf_y[l], 156, 45, 63, 31, drawSurface2, screenSurface);
updateScreen();
@@ -133,9 +130,7 @@ void DrasculaEngine::animation_1_1() {
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit())
break;
- l2 = 0; p = 0;
-
- for (l = 0; l < 180; l++) {
+ for (int l = 0, l2 = 0, p = 0; l < 180; l++) {
copyBackground(0, 0, 320 - l, 0, l, 200, drawSurface3, screenSurface);
copyBackground(l, 0, 0, 0, 320 - l, 200, bgSurface, screenSurface);
@@ -703,17 +698,15 @@ void DrasculaEngine::animation_4_2() {
void DrasculaEngine::animation_14_2() {
debug(4, "animation_14_2()");
- int cY = -160;
- int l = 0;
-
loadPic("an14_2.alg", backSurface);
+ int l = 0;
for (int n = -160; n <= 0; n = n + 5 + l) {
copyBackground();
updateRefresh_pre();
moveCharacters();
moveVonBraun();
- cY = n;
+ int cY = n;
copyRect(150, 6, 69, cY, 158, 161, backSurface, screenSurface);
updateRefresh();
updateScreen();
@@ -959,8 +952,6 @@ void DrasculaEngine::animation_23_2() {
void DrasculaEngine::animation_25_2() {
debug(4, "animation_25_2()");
- int cY = 0;
-
loadPic("an14_2.alg", backSurface);
loadPic(18, bgSurface);
@@ -975,8 +966,7 @@ void DrasculaEngine::animation_25_2() {
moveCharacters();
moveVonBraun();
- cY = n;
-
+ int cY = n;
copyRect(150, 6, 69, cY, 158, 161, backSurface, screenSurface);
updateRefresh();
@@ -1594,20 +1584,18 @@ void DrasculaEngine::animation_1_6() {
void DrasculaEngine::animation_5_6() {
debug(4, "animation_5_6()");
- int pY = -125;
-
animate("man.bin", 14);
for (int n = -125; n <= 0; n = n + 2) {
copyBackground();
updateRefresh_pre();
- pY = n;
+ int pY = n;
copyRect(1, 29, 204, pY, 18, 125, drawSurface3, screenSurface);
updateRefresh();
-
updateScreen();
updateEvents();
+
pause(2);
}
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 35461f1d71..797b6d94b0 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -194,6 +194,9 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam
_console = 0;
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "audio");
+
int cd_num = ConfMan.getInt("cdrom");
if (cd_num >= 0)
_system->getAudioCDManager()->openCD(cd_num);
diff --git a/engines/fullpipe/configure.engine b/engines/fullpipe/configure.engine
index fce5951e26..a9042449db 100644
--- a/engines/fullpipe/configure.engine
+++ b/engines/fullpipe/configure.engine
@@ -1,3 +1,3 @@
# This file is included from the main "configure" script
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine fullpipe "Full Pipe" no
+add_engine fullpipe "Full Pipe" no "" "" "16bit"
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index f4444ef707..bb0838395d 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -34,6 +34,7 @@
#include "fullpipe/modal.h"
#include "fullpipe/input.h"
#include "fullpipe/motion.h"
+#include "fullpipe/statics.h"
#include "fullpipe/scenes.h"
#include "fullpipe/floaters.h"
#include "fullpipe/console.h"
@@ -83,6 +84,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_currentCheatPos = 0;
_modalObject = 0;
+ _origFormat = 0;
_liftEnterMQ = 0;
_liftExitMQ = 0;
@@ -242,12 +244,14 @@ void FullpipeEngine::restartGame() {
}
Common::Error FullpipeEngine::run() {
- const Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
+ const Graphics::PixelFormat format(4, 8, 8, 8, 8, 24, 16, 8, 0);
// Initialize backend
initGraphics(800, 600, true, &format);
_backgroundSurface.create(800, 600, format);
+ _origFormat = new Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
+
_console = new Console(this);
initialize();
@@ -413,21 +417,34 @@ void FullpipeEngine::updateEvents() {
}
}
-
-#if 0
- warning("STUB: FullpipeEngine::updateEvents() <mainWindowProc>");
- if (Msg == MSG_SC11_SHOWSWING && _modalObject) {
- _modalObject->method14();
- }
-#endif
+ // pollEvent() is implemented only for video player. So skip it.
+ //if (event.kbd.keycode == MSG_SC11_SHOWSWING && _modalObject) {
+ // _modalObject->pollEvent();
+ //}
}
void FullpipeEngine::freeGameLoader() {
- warning("STUB: FullpipeEngine::freeGameLoader()");
+ setCursor(0);
+ delete _movTable;
+ _floaters->stopAll();
+ delete _gameLoader;
+ _currentScene = 0;
+ _scene2 = 0;
+ _loaderScene = 0;
}
void FullpipeEngine::cleanup() {
- warning("STUB: FullpipeEngine::cleanup()");
+ //cleanRecorder();
+ clearMessageHandlers();
+ clearMessages();
+ _globalMessageQueueList->compact();
+
+ for (uint i = 0; i < _globalMessageQueueList->size(); i++)
+ delete (*_globalMessageQueueList)[i];
+
+ stopAllSoundStreams();
+
+ delete _origFormat;
}
void FullpipeEngine::updateScreen() {
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index afdc493258..7f20a6d6af 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -32,7 +32,7 @@
#include "audio/mixer.h"
-#include "graphics/surface.h"
+#include "graphics/transparent_surface.h"
#include "engines/engine.h"
@@ -108,6 +108,7 @@ public:
void updateEvents();
Graphics::Surface _backgroundSurface;
+ Graphics::PixelFormat *_origFormat;
GameLoader *_gameLoader;
GameProject *_gameProject;
@@ -242,6 +243,7 @@ public:
int (*_updateCursorCallback)();
void drawAlphaRectangle(int x1, int y1, int x2, int y2, int alpha);
+ void sceneFade(Scene *sc, bool direction);
int _cursorId;
int _minCursorId;
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index c8b01939dd..fbf96b3060 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -84,7 +84,29 @@ GameLoader::~GameLoader() {
delete _interactionController;
delete _inputController;
- warning("STUB: GameLoader::~GameLoader()");
+ g_fp->_gameLoader = 0;
+
+ for (uint i = 0; i < _sc2array.size(); i++) {
+ if (_sc2array[i]._defPicAniInfos)
+ delete _sc2array[i]._defPicAniInfos;
+
+ if (_sc2array[i]._picAniInfos)
+ delete _sc2array[i]._picAniInfos;
+
+ if (_sc2array[i]._motionController)
+ delete _sc2array[i]._motionController;
+
+ if (_sc2array[i]._data1)
+ free(_sc2array[i]._data1);
+
+ if (_sc2array[i]._entranceData)
+ free(_sc2array[i]._entranceData);
+ }
+
+ delete _gameVar;
+ _gameVar = 0;
+
+ _sc2array.clear();
}
bool GameLoader::load(MfcArchive &file) {
@@ -635,7 +657,16 @@ bool readSavegameHeader(Common::InSaveFile *in, FullpipeSavegameHeader &header)
}
void GameLoader::restoreDefPicAniInfos() {
- warning("STUB: restoreDefPicAniInfos()");
+ for (uint i = 0; i < _sc2array.size(); i++) {
+ if (_sc2array[i]._picAniInfos) {
+ free(_sc2array[i]._picAniInfos);
+ _sc2array[i]._picAniInfos = 0;
+ _sc2array[i]._picAniInfosCount = 0;
+ }
+
+ if (_sc2array[i]._scene)
+ applyPicAniInfos(_sc2array[i]._scene, _sc2array[i]._defPicAniInfos, _sc2array[i]._defPicAniInfosCount);
+ }
}
GameVar *FullpipeEngine::getGameLoaderGameVar() {
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index 520e81835b..61fbf7192f 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -33,51 +33,6 @@
namespace Fullpipe {
-Bitmap::Bitmap() {
- _x = 0;
- _y = 0;
- _width = 0;
- _height = 0;
- _pixels = 0;
- _type = 0;
- _dataSize = 0;
- _flags = 0;
-}
-
-Bitmap::Bitmap(Bitmap *src) {
- _x = src->_x;
- _y = src->_y;
- _flags = src->_flags;
- _dataSize = src->_dataSize;
- _type = src->_type;
- _width = src->_width;
- _height = src->_height;
- _pixels = src->_pixels;
-}
-
-Bitmap::~Bitmap() {
- if (_pixels)
- free(_pixels);
-
- _pixels = 0;
-}
-
-void Bitmap::load(Common::ReadStream *s) {
- debug(5, "Bitmap::load()");
-
- _x = s->readUint32LE();
- _y = s->readUint32LE();
- _width = s->readUint32LE();
- _height = s->readUint32LE();
- s->readUint32LE(); // pixels
- _type = s->readUint32LE();
- _dataSize = s->readUint32LE();
- _flags = s->readUint32LE();
-
- debug(8, "Bitmap: x: %d y: %d w: %d h: %d dataSize: 0x%x", _x, _y, _width, _height, _dataSize);
- debug(8, "Bitmap: type: %s (0x%04x) flags: 0x%x", Common::tag2string(_type).c_str(), _type, _flags);
-}
-
Background::Background() {
_x = 0;
_y = 0;
@@ -514,7 +469,7 @@ void Picture::freePicture() {
if (_bitmap) {
if (testFlags() && !_field_54) {
freeData();
- free(_bitmap);
+ //free(_bitmap);
_bitmap = 0;
}
}
@@ -633,6 +588,10 @@ void Picture::getDibInfo() {
_bitmap->load(s);
_bitmap->_pixels = _data;
+
+ _bitmap->decode((int32 *)(_paletteData ? _paletteData : g_fp->_globalPalette));
+
+ _bitmap->_pixels = 0;
}
Bitmap *Picture::getPixelData() {
@@ -677,12 +636,12 @@ void Picture::draw(int x, int y, int style, int angle) {
case 1:
//flip
getDimensions(&point);
- _bitmap->flipVertical()->drawShaded(1, x1, y1 + 30 + point.y, pal);
+ _bitmap->flipVertical()->drawShaded(1, x1, y1 + 30 + point.y, pal, _alpha);
break;
case 2:
//vrtSetFadeRatio(g_vrtDrawHandle, 0.34999999);
//vrtSetFadeTable(g_vrtDrawHandle, &unk_477F88, 1.0, 1000.0, 0, 0);
- _bitmap->drawShaded(2, x1, y1, pal);
+ _bitmap->drawShaded(2, x1, y1, pal, _alpha);
//vrtSetFadeRatio(g_vrtDrawHandle, 0.0);
//vrtSetFadeTable(g_vrtDrawHandle, &unk_477F90, 1.0, 1000.0, 0, 0);
break;
@@ -690,7 +649,7 @@ void Picture::draw(int x, int y, int style, int angle) {
if (angle)
drawRotated(x1, y1, angle);
else {
- _bitmap->putDib(x1, y1, (int32 *)pal);
+ _bitmap->putDib(x1, y1, (int32 *)pal, _alpha);
}
}
}
@@ -789,54 +748,71 @@ int Picture::getPixelAtPosEx(int x, int y) {
return 0;
}
-bool Bitmap::isPixelHitAtPos(int x, int y) {
- if (x < _x || x >= _width + _x || y < _y || y >= _y + _height)
- return false;
+Bitmap::Bitmap() {
+ _x = 0;
+ _y = 0;
+ _width = 0;
+ _height = 0;
+ _pixels = 0;
+ _type = 0;
+ _dataSize = 0;
+ _flags = 0;
+ _surface = 0;
+ _flipping = Graphics::FLIP_NONE;
+}
- int off;
+Bitmap::Bitmap(Bitmap *src) {
+ _x = src->_x;
+ _y = src->_y;
+ _flags = src->_flags;
+ _dataSize = src->_dataSize;
+ _type = src->_type;
+ _width = src->_width;
+ _height = src->_height;
+ _pixels = src->_pixels;
+ _surface = new Graphics::TransparentSurface(*src->_surface);
+ _flipping = src->_flipping;
+}
- if (_type == 'CB\x05e')
- off = 2 * ((_width + 1) / 2);
- else
- off = 4 * ((_width + 3) / 4);
+Bitmap::~Bitmap() {
+ if (_pixels)
+ free(_pixels);
- off = x + off * (_y + _height - y - 1) - _x;
+ delete _surface;
- if (_flags & 0x1000000) {
- switch (_type) {
- case 'CB\0\0':
- if (_pixels[off] == (_flags & 0xff))
- return false;
- break;
- case 'CB\x05e':
- if (!*(int16 *)&_pixels[2 * off])
- return false;
- break;
- case 'RB\0\0':
- return isPixelAtHitPosRB(x, y);
- }
- }
- return true;
+ _pixels = 0;
}
-bool Bitmap::isPixelAtHitPosRB(int x, int y) {
- int ox = _x;
- int oy = _y;
+void Bitmap::load(Common::ReadStream *s) {
+ debug(5, "Bitmap::load()");
+
+ _x = s->readUint32LE();
+ _y = s->readUint32LE();
+ _width = s->readUint32LE();
+ _height = s->readUint32LE();
+ s->readUint32LE(); // pixels
+ _type = s->readUint32LE();
+ _dataSize = s->readUint32LE();
+ _flags = s->readUint32LE();
+
+ debug(8, "Bitmap: x: %d y: %d w: %d h: %d dataSize: 0x%x", _x, _y, _width, _height, _dataSize);
+ debug(8, "Bitmap: type: %s (0x%04x) flags: 0x%x", Common::tag2string(_type).c_str(), _type, _flags);
+}
- _x = _y = 0;
+bool Bitmap::isPixelHitAtPos(int x, int y) {
+ if (x < _x || x >= _width + _x || y < _y || y >= _y + _height)
+ return false;
- bool res = putDibRB(0, x, y);
- _x = ox;
- _y = oy;
+ if (!_surface)
+ return false;
- return res;
+ return ((*((int32 *)_surface->getBasePtr(x, y)) & 0xff000000) != 0);
}
-void Bitmap::putDib(int x, int y, int32 *palette) {
- debug(7, "Bitmap::putDib(%d, %d)", x, y);
+void Bitmap::decode(int32 *palette) {
+ _surface = new Graphics::TransparentSurface;
- _x = x - g_fp->_sceneRect.left;
- _y = y - g_fp->_sceneRect.top;
+ _surface->create(_width, _height, Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0));
if (_type == MKTAG('R', 'B', '\0', '\0'))
putDibRB(palette);
@@ -844,46 +820,64 @@ void Bitmap::putDib(int x, int y, int32 *palette) {
putDibCB(palette);
}
-bool Bitmap::putDibRB(int32 *palette, int pX, int pY) {
- uint16 *curDestPtr;
+void Bitmap::putDib(int x, int y, int32 *palette, int alpha) {
+ debug(7, "Bitmap::putDib(%d, %d)", x, y);
+
+ int x1 = x - g_fp->_sceneRect.left;
+ int y1 = y - g_fp->_sceneRect.top;
+
+ if (!_width || !_height || !_surface)
+ return;
+
+ Common::Rect sub(0, 0, _width, _height);
+
+ if (x1 < 0) {
+ sub.left = -x1;
+ x1 = 0;
+ }
+
+ if (y1 < 0) {
+ sub.top = -y1;
+ y1 = 0;
+ }
+
+ if (x1 + sub.width() > 799)
+ sub.right -= x1 + sub.width() - 799;
+
+ if (y1 + sub.height() > 599)
+ sub.bottom -= y1 + sub.height() - 599;
+
+ if (sub.width() <= 0 || sub.height() <= 0)
+ return;
+
+ 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());
+}
+
+bool Bitmap::putDibRB(int32 *palette) {
+ uint32 *curDestPtr;
int endy;
int x;
int start1;
int fillLen;
uint16 pixel;
- int endx;
int y;
uint16 *srcPtr2;
uint16 *srcPtr;
- if (!palette && pX == -1) {
+ if (!palette) {
debug(2, "Bitmap::putDibRB(): Both global and local palettes are empty");
return false;
}
debug(8, "Bitmap::putDibRB()");
- endx = _width + _x - 1;
- endy = _height + _y - 1;
-
- if (_x > 799 || endx < 0 || _y > 599 || endy < 0)
- return false;
-
- if (pX == -1) {
- if (endy > 599)
- endy = 599;
-
- if (endx > 799)
- endx = 799;
- }
-
- int startx = _x;
- if (startx < 0)
- startx = 0;
+ endy = _height - 1;
- int starty = _y;
- if (starty < 0)
- starty = 0;
+ int startx = 0;
+ int starty = 0;
y = endy;
@@ -927,14 +921,9 @@ bool Bitmap::putDibRB(int32 *palette, int pX, int pY) {
if (fillLen > 0 || start1 >= 0) {
if (x <= 799 + 1 || (fillLen += 799 - x + 1, fillLen > 0)) {
if (y <= endy) {
- if (pX == -1) {
- int bgcolor = palette[(pixel >> 8) & 0xff];
- curDestPtr = (uint16 *)g_fp->_backgroundSurface.getBasePtr(start1, y);
- colorFill(curDestPtr, fillLen, bgcolor);
- } else {
- if (y == pY && pX >= start1 && pX < start1 + fillLen)
- return true;
- }
+ int bgcolor = palette[(pixel >> 8) & 0xff];
+ curDestPtr = (uint32 *)_surface->getBasePtr(start1, y);
+ colorFill(curDestPtr, fillLen, bgcolor);
}
}
}
@@ -959,45 +948,26 @@ bool Bitmap::putDibRB(int32 *palette, int pX, int pY) {
}
if (y <= endy) {
- if (pX == -1) {
- curDestPtr = (uint16 *)g_fp->_backgroundSurface.getBasePtr(start1, y);
- paletteFill(curDestPtr, (byte *)srcPtr2, fillLen, (int32 *)palette);
- } else {
- if (y == pY && pX >= start1 && pX < start1 + fillLen)
- return true;
- }
+ curDestPtr = (uint32 *)_surface->getBasePtr(start1, y);
+ paletteFill(curDestPtr, (byte *)srcPtr2, fillLen, (int32 *)palette);
}
}
}
}
- if (pX == -1)
- g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface.getBasePtr(startx, starty), g_fp->_backgroundSurface.pitch, startx, starty, endx + 1 - startx, endy + 1 - starty);
-
return false;
}
void Bitmap::putDibCB(int32 *palette) {
- uint16 *curDestPtr;
+ uint32 *curDestPtr;
int endx;
int endy;
int bpp;
uint pitch;
bool cb05_format;
- endx = _width + _x - 1;
- endy = _height + _y - 1;
-
- debug(8, "Bitmap::putDibCB(): %d, %d, %d, %d [%d, %d]", _x, _y, endx, endy, _width, _height);
-
- if (_x > 799 || endx < 0 || _y > 599 || endy < 0)
- return;
-
- if (endy > 599)
- endy = 599;
-
- if (endx > 799)
- endx = 799;
+ endx = _width - 1;
+ endy = _height - 1;
cb05_format = (_type == MKTAG('C', 'B', '\05', 'e'));
@@ -1007,39 +977,28 @@ void Bitmap::putDibCB(int32 *palette) {
bpp = cb05_format ? 2 : 1;
pitch = (bpp * _width + 3) & 0xFFFFFFFC;
- byte *srcPtr = &_pixels[pitch * (endy - _y)];
+ byte *srcPtr = &_pixels[pitch * endy];
- if (endy - _y < _height)
+ if (endy < _height)
srcPtr = &_pixels[pitch * (_height - 1)];
- int starty = _y;
- if (starty < 0) {
- starty = 0;
- srcPtr = &_pixels[pitch * (_height + _y)];
- }
-
- int startx = _x;
- if (startx < 0) {
- srcPtr += bpp * -_x;
- startx = 0;
- }
+ int starty = 0;
+ int startx = 0;
if (_flags & 0x1000000) {
for (int y = starty; y <= endy; srcPtr -= pitch, y++) {
- curDestPtr = (uint16 *)g_fp->_backgroundSurface.getBasePtr(startx, y);
+ curDestPtr = (uint32 *)_surface->getBasePtr(startx, y);
copierKeyColor(curDestPtr, srcPtr, endx - startx + 1, _flags & 0xff, (int32 *)palette, cb05_format);
}
} else {
for (int y = starty; y <= endy; srcPtr -= pitch, y++) {
- curDestPtr = (uint16 *)g_fp->_backgroundSurface.getBasePtr(startx, y);
+ curDestPtr = (uint32 *)_surface->getBasePtr(startx, y);
copier(curDestPtr, srcPtr, endx - startx + 1, (int32 *)palette, cb05_format);
}
}
-
- g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface.getBasePtr(startx, starty), g_fp->_backgroundSurface.pitch, startx, starty, endx + 1 - startx, endy + 1 - starty);
}
-void Bitmap::colorFill(uint16 *dest, int len, int32 color) {
+void Bitmap::colorFill(uint32 *dest, int len, int32 color) {
#if 0
if (blendMode) {
if (blendMode != 1)
@@ -1050,12 +1009,17 @@ void Bitmap::colorFill(uint16 *dest, int len, int32 color) {
colorFill = ptrfillColor16bit;
}
#endif
+ byte r, g, b;
+
+ g_fp->_origFormat->colorToRGB(color, r, g, b);
+
+ uint32 c = TS_ARGB(0xff, r, g, b);
for (int i = 0; i < len; i++)
- *dest++ = (int16)(color & 0xffff);
+ *dest++ = c;
}
-void Bitmap::paletteFill(uint16 *dest, byte *src, int len, int32 *palette) {
+void Bitmap::paletteFill(uint32 *dest, byte *src, int len, int32 *palette) {
#if 0
if (blendMode) {
if (blendMode != 1)
@@ -1067,11 +1031,16 @@ void Bitmap::paletteFill(uint16 *dest, byte *src, int len, int32 *palette) {
}
#endif
- for (int i = 0; i < len; i++)
- *dest++ = READ_LE_UINT32(&palette[*src++]) & 0xffff;
+ byte r, g, b;
+
+ for (int i = 0; i < len; i++) {
+ g_fp->_origFormat->colorToRGB(READ_LE_UINT32(&palette[*src++]) & 0xffff, r, g, b);
+
+ *dest++ = TS_ARGB(0xff, r, g, b);
+ }
}
-void Bitmap::copierKeyColor(uint16 *dest, byte *src, int len, int keyColor, int32 *palette, bool cb05_format) {
+void Bitmap::copierKeyColor(uint32 *dest, byte *src, int len, int keyColor, int32 *palette, bool cb05_format) {
#if 0
if (blendMode) {
if (blendMode == 1) {
@@ -1089,10 +1058,14 @@ void Bitmap::copierKeyColor(uint16 *dest, byte *src, int len, int keyColor, int3
}
#endif
+ byte r, g, b;
+
if (!cb05_format) {
for (int i = 0; i < len; i++) {
- if (*src != keyColor)
- *dest = READ_LE_UINT32(&palette[*src]) & 0xffff;
+ if (*src != keyColor) {
+ g_fp->_origFormat->colorToRGB(READ_LE_UINT32(&palette[*src]) & 0xffff, r, g, b);
+ *dest = TS_ARGB(0xff, r, g, b);
+ }
dest++;
src++;
@@ -1101,8 +1074,10 @@ void Bitmap::copierKeyColor(uint16 *dest, byte *src, int len, int keyColor, int3
int16 *src16 = (int16 *)src;
for (int i = 0; i < len; i++) {
- if (*src16 != 0)
- *dest = *src16;
+ if (*src16 != 0) {
+ g_fp->_origFormat->colorToRGB(READ_LE_UINT16(src16) & 0xffff, r, g, b);
+ *dest = TS_ARGB(0xff, r, g, b);
+ }
dest++;
src16++;
@@ -1110,7 +1085,7 @@ void Bitmap::copierKeyColor(uint16 *dest, byte *src, int len, int keyColor, int3
}
}
-void Bitmap::copier(uint16 *dest, byte *src, int len, int32 *palette, bool cb05_format) {
+void Bitmap::copier(uint32 *dest, byte *src, int len, int32 *palette, bool cb05_format) {
#if 0
if (blendMode) {
if (blendMode == 1) {
@@ -1128,100 +1103,49 @@ void Bitmap::copier(uint16 *dest, byte *src, int len, int32 *palette, bool cb05_
}
#endif
- if (!cb05_format) {
- for (int i = 0; i < len; i++)
- *dest++ = READ_LE_UINT32(&palette[*src++]) & 0xffff;
- } else {
- int16 *src16 = (int16 *)src;
-
- for (int i = 0; i < len; i++)
- *dest++ = *src16++;
- }
-}
-
-Bitmap *Bitmap::reverseImage() {
- switch (_type) {
- case MKTAG('R', 'B', '\0', '\0'):
- return reverseImageRB();
- case MKTAG('C', 'B', '\0', '\0'):
- return reverseImageCB();
- case MKTAG('C', 'B', '\05', 'e'):
- return reverseImageCB05();
- default:
- error("Bitmap::reverseImage: Unknown image type: %x", _type);
- }
-
- return 0;
-}
-
-Bitmap *Bitmap::reverseImageRB() {
- uint16 *newpixels = (uint16 *)calloc(((_dataSize + 15) & 0xfffffff0) + sizeof(Bitmap), 1);
- uint16 *srcPtr = (uint16 *)_pixels;
-
- int idx = 0;
- while (srcPtr[idx] != 0x100) {
- uint16 *srcPtr2 = &srcPtr[idx];
+ byte r, g, b;
- int prevIdx = idx;
- int i = idx;
+ if (!cb05_format) {
+ for (int i = 0; i < len; i++) {
+ g_fp->_origFormat->colorToRGB(READ_LE_UINT32(&palette[*src++]) & 0xffff, r, g, b);
- while (*srcPtr2) {
- ++srcPtr2;
- ++idx;
+ *dest++ = TS_ARGB(0xff, r, g, b);
}
+ } else {
+ int16 *src16 = (int16 *)src;
- int idx2 = idx;
-
- newpixels[idx] = srcPtr[idx];
-
- while (i != idx) {
- int fillLen = 2 - ((srcPtr[prevIdx] & 0xff) != 0 ? 1 : 0);
- idx2 -= fillLen;
- memcpy(&newpixels[idx2], &srcPtr[prevIdx], 2 * fillLen);
- prevIdx = fillLen + i;
- i += fillLen;
+ for (int i = 0; i < len; i++) {
+ g_fp->_origFormat->colorToRGB(READ_LE_UINT32(src16++) & 0xffff, r, g, b);
+ *dest++ = TS_ARGB(0xff, r, g, b);
}
- ++idx;
}
- newpixels[idx] = 256;
-
- int oldBmp = ((_dataSize + 15) >> 1) & 0x7FFFFFF8;
- memcpy(&newpixels[oldBmp], &srcPtr[oldBmp], sizeof(Bitmap));
-
- Bitmap *res = new Bitmap(this);
- res->_pixels = (byte *)newpixels;
-
- return res;
}
-Bitmap *Bitmap::reverseImageCB() {
- warning("STUB: Bitmap::reverseImageCB()");
-
- return this;
-}
-
-Bitmap *Bitmap::reverseImageCB05() {
- warning("STUB: Bitmap::reverseImageCB05()");
+Bitmap *Bitmap::reverseImage(bool flip) {
+ if (flip)
+ _flipping = Graphics::FLIP_H;
+ else
+ _flipping = Graphics::FLIP_NONE;
return this;
}
Bitmap *Bitmap::flipVertical() {
- warning("STUB: Bitmap::flipVertical()");
+ _flipping = Graphics::FLIP_V;
return this;
}
-void Bitmap::drawShaded(int type, int x, int y, byte *palette) {
+void Bitmap::drawShaded(int type, int x, int y, byte *palette, int alpha) {
warning("STUB: Bitmap::drawShaded(%d, %d, %d)", type, x, y);
- putDib(x, y, (int32 *)palette);
+ putDib(x, y, (int32 *)palette, alpha);
}
- void Bitmap::drawRotated(int x, int y, int angle, byte *palette) {
+void Bitmap::drawRotated(int x, int y, int angle, byte *palette, int alpha) {
warning("STUB: Bitmap::drawShaded(%d, %d, %d)", x, y, angle);
- putDib(x, y, (int32 *)palette);
+ putDib(x, y, (int32 *)palette, alpha);
}
bool BigPicture::load(MfcArchive &file) {
@@ -1251,7 +1175,7 @@ void BigPicture::draw(int x, int y, int style, int angle) {
//vrtSetAlphaBlendMode(g_vrtDrawHandle, 1, v9);
}
- _bitmap->putDib(nx, ny, 0);
+ _bitmap->putDib(nx, ny, 0, 0xff);
if (_alpha < 0xFF) {
//vrtSetAlphaBlendMode(g_vrtDrawHandle, 0, 255);
@@ -1332,4 +1256,23 @@ void FullpipeEngine::drawAlphaRectangle(int x1, int y1, int x2, int y2, int alph
warning("STUB: FullpipeEngine::drawAlphaRectangle()");
}
+void FullpipeEngine::sceneFade(Scene *sc, bool direction) {
+ warning("STUB: FullpipeEngine::sceneFade()");
+
+#if 0
+ for (int dim = 0; dim < 255; dim += 20) {
+ v5 = GetTickCount();
+ vrtSetAlphaBlendMode(*(_DWORD *)virt, 0, 255);
+ sc->draw();
+ drawAlphaRectangle(0, 0, 800, 600, direction ? 255 - dim : dim);
+ vrtFlush(*(_DWORD *)virt);
+ v7 = GetTickCount();
+ if ( v7 - v5 < 42 )
+ Sleep(v5 - v7 + 42);
+ }
+ vrtSetAlphaBlendMode(*(_DWORD *)virt, 0, 255);
+#endif
+
+}
+
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h
index 191df7709a..d94dd40452 100644
--- a/engines/fullpipe/gfx.h
+++ b/engines/fullpipe/gfx.h
@@ -38,32 +38,31 @@ struct Bitmap {
int _type;
int _dataSize;
int _flags;
+ Graphics::TransparentSurface *_surface;
+ int _flipping;
Bitmap();
Bitmap(Bitmap *src);
~Bitmap();
void load(Common::ReadStream *s);
- void putDib(int x, int y, int32 *palette);
- bool putDibRB(int32 *palette, int x = -1, int y = -1);
+ void decode(int32 *palette);
+ void putDib(int x, int y, int32 *palette, int alpha);
+ bool putDibRB(int32 *palette);
void putDibCB(int32 *palette);
- void colorFill(uint16 *dest, int len, int32 color);
- void paletteFill(uint16 *dest, byte *src, int len, int32 *palette);
- void copierKeyColor(uint16 *dest, byte *src, int len, int keyColor, int32 *palette, bool cb05_format);
- void copier(uint16 *dest, byte *src, int len, int32 *palette, bool cb05_format);
+ void colorFill(uint32 *dest, int len, int32 color);
+ void paletteFill(uint32 *dest, byte *src, int len, int32 *palette);
+ void copierKeyColor(uint32 *dest, byte *src, int len, int keyColor, int32 *palette, bool cb05_format);
+ void copier(uint32 *dest, byte *src, int len, int32 *palette, bool cb05_format);
- Bitmap *reverseImage();
- Bitmap *reverseImageRB();
- Bitmap *reverseImageCB();
- Bitmap *reverseImageCB05();
+ Bitmap *reverseImage(bool flip = true);
Bitmap *flipVertical();
- void drawShaded(int type, int x, int y, byte *palette);
- void drawRotated(int x, int y, int angle, byte *palette);
+ void drawShaded(int type, int x, int y, byte *palette, int alpha);
+ void drawRotated(int x, int y, int angle, byte *palette, int alpha);
bool isPixelHitAtPos(int x, int y);
- bool isPixelAtHitPosRB(int x, int y);
};
class Picture : public MemoryObject {
diff --git a/engines/fullpipe/mgm.cpp b/engines/fullpipe/mgm.cpp
new file mode 100644
index 0000000000..aacfd5452a
--- /dev/null
+++ b/engines/fullpipe/mgm.cpp
@@ -0,0 +1,719 @@
+/* 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/utils.h"
+#include "fullpipe/statics.h"
+#include "fullpipe/motion.h"
+#include "fullpipe/messages.h"
+
+namespace Fullpipe {
+
+void MGM::clear() {
+ _items.clear();
+}
+
+MessageQueue *MGM::genMQ(StaticANIObject *ani, int staticsIndex, int staticsId, int *resStatId, Common::Point **pointArr) {
+ int idx = getItemIndexById(ani->_id);
+
+ if (idx == -1)
+ return 0;
+
+ int stid = staticsId;
+
+ if (!staticsId) {
+ if (ani->_movement) {
+ stid = ani->_movement->_staticsObj2->_staticsId;
+ } else {
+ if (!ani->_statics)
+ return 0;
+
+ stid = ani->_statics->_staticsId;
+ }
+ }
+
+ if (stid == staticsIndex)
+ return new MessageQueue(g_fp->_globalMessageQueueList->compact());
+
+ int startidx = getStaticsIndexById(idx, stid);
+ int endidx = getStaticsIndexById(idx, staticsIndex);
+ int subidx = startidx + endidx * _items[idx]->statics.size();
+
+ if (!_items[idx]->subItems[subidx]->movement) {
+ clearMovements2(idx);
+ recalcOffsets(idx, startidx, endidx, 0, 1);
+ }
+
+ if (!_items[idx]->subItems[subidx]->movement)
+ return 0;
+
+ MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
+ Common::Point point;
+ ExCommand *ex;
+
+ int i = 0;
+ do {
+ subidx = startidx + endidx * _items[idx]->statics.size();
+
+ _items[idx]->subItems[subidx]->movement->calcSomeXY(point, 0, -1);
+
+ if (pointArr) {
+ int sz;
+
+ if (_items[idx]->subItems[subidx]->movement->_currMovement)
+ sz = _items[idx]->subItems[subidx]->movement->_currMovement->_dynamicPhases.size();
+ else
+ sz = _items[idx]->subItems[subidx]->movement->_dynamicPhases.size();
+
+ ex = new ExCommand2(20, ani->_id, &pointArr[i], sz);
+
+ ex->_messageNum = _items[idx]->subItems[subidx]->movement->_id;
+ } else {
+ ex = new ExCommand(ani->_id, 1, _items[idx]->subItems[subidx]->movement->_id, 0, 0, 0, 1, 0, 0, 0);
+ }
+
+ ex->_keyCode = ani->_okeyCode;
+ ex->_field_3C = 1;
+ ex->_field_24 = 1;
+
+ mq->addExCommandToEnd(ex);
+
+ if (resStatId)
+ *resStatId = _items[idx]->subItems[subidx]->movement->_id;
+
+ startidx = _items[idx]->subItems[subidx]->staticsIndex;
+
+ uint step;
+
+ if (_items[idx]->subItems[subidx]->movement->_currMovement)
+ step = _items[idx]->subItems[subidx]->movement->_currMovement->_dynamicPhases.size();
+ else
+ step = _items[idx]->subItems[subidx]->movement->_dynamicPhases.size();
+
+ i += step;
+ } while (startidx != endidx);
+
+ return mq;
+}
+
+MGMItem::MGMItem() {
+ objId = 0;
+}
+
+MGMSubItem::MGMSubItem() {
+ movement = 0;
+ staticsIndex = 0;
+ field_8 = 0;
+ field_C = 0;
+ x = 0;
+ y = 0;
+}
+
+void MGM::addItem(int objId) {
+ if (getItemIndexById(objId) == -1) {
+ MGMItem *item = new MGMItem();
+
+ item->objId = objId;
+ _items.push_back(item);
+ }
+ rebuildTables(objId);
+}
+
+void MGM::rebuildTables(int objId) {
+ int idx = getItemIndexById(objId);
+
+ if (idx == -1)
+ return;
+
+ _items[idx]->subItems.clear();
+ _items[idx]->statics.clear();
+ _items[idx]->movements1.clear();
+ _items[idx]->movements2.clear();
+
+ StaticANIObject *obj = g_fp->_currentScene->getStaticANIObject1ById(objId, -1);
+
+ if (!obj)
+ return;
+
+ for (uint i = 0; i < obj->_staticsList.size(); i++)
+ _items[idx]->statics.push_back((Statics *)obj->_staticsList[i]);
+
+ for (uint i = 0; i < obj->_movements.size(); i++)
+ _items[idx]->movements1.push_back((Movement *)obj->_movements[i]);
+
+ _items[idx]->subItems.clear();
+}
+
+int MGM::getItemIndexById(int objId) {
+ for (uint i = 0; i < _items.size(); i++)
+ if (_items[i]->objId == objId)
+ return i;
+
+ return -1;
+}
+
+MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
+ if (!mgminfo->ani)
+ return 0;
+
+ Movement *mov = mgminfo->ani->_movement;
+
+ if (!mov && !mgminfo->ani->_statics)
+ return 0;
+
+ if (!(mgminfo->flags & 1)) {
+ if (mov)
+ mgminfo->staticsId1 = mov->_staticsObj2->_staticsId;
+ else
+ mgminfo->staticsId1 = mgminfo->ani->_statics->_staticsId;
+ }
+
+ Common::Point point;
+
+ if (!(mgminfo->flags & 0x10) || !(mgminfo->flags & 0x20)) {
+ int nx = mgminfo->ani->_ox;
+ int ny = mgminfo->ani->_oy;
+
+ if (mgminfo->ani->_movement) {
+ mgminfo->ani->calcNextStep(&point);
+
+ nx += point.x;
+ ny += point.y;
+ }
+
+ if (!(mgminfo->flags & 0x10))
+ mgminfo->x2 = nx;
+
+ if (!(mgminfo->flags & 0x20))
+ mgminfo->y2 = ny;
+ }
+
+ mov = mgminfo->ani->getMovementById(mgminfo->movementId);
+
+ if (!mov)
+ return 0;
+
+ int itemIdx = getItemIndexById(mgminfo->ani->_id);
+ int subIdx = getStaticsIndexById(itemIdx, mgminfo->staticsId1);
+ int st2idx = getStaticsIndexById(itemIdx, mov->_staticsObj1->_staticsId);
+ int st1idx = getStaticsIndexById(itemIdx, mov->_staticsObj2->_staticsId);
+ int subOffset = getStaticsIndexById(itemIdx, mgminfo->staticsId2);
+
+ clearMovements2(itemIdx);
+ recalcOffsets(itemIdx, subIdx, st2idx, 0, 1);
+ clearMovements2(itemIdx);
+ recalcOffsets(itemIdx, st1idx, subOffset, 0, 1);
+
+ MGMSubItem *sub1 = _items[itemIdx]->subItems[subIdx + st2idx * _items[itemIdx]->statics.size()];
+ MGMSubItem *sub2 = _items[itemIdx]->subItems[st1idx + subOffset * _items[itemIdx]->statics.size()];
+
+ if (subIdx != st2idx && !sub1->movement)
+ return 0;
+
+ if (st1idx != subOffset && !sub2->movement)
+ return 0;
+
+ int n1x = mgminfo->x1 - mgminfo->x2 - sub1->x - sub2->x;
+ int n1y = mgminfo->y1 - mgminfo->y2 - sub1->y - sub2->y;
+
+ Common::Point point1;
+
+ mov->calcSomeXY(point1, 0, -1);
+
+ int n2x = point1.x;
+ int n2y = point1.y;
+ int mult;
+ int len = -1;
+
+ if (mgminfo->flags & 0x40) {
+ mult = mgminfo->field_10;
+ len = -1;
+ n2x *= mult;
+ n2y *= mult;
+ } else {
+ calcLength(&point, mov, n1x, n1y, &mult, &len, 1);
+ n2x = point.x;
+ n2y = point.y;
+ }
+
+ if (!(mgminfo->flags & 2)) {
+ len = -1;
+ n2x = mult * point1.x;
+ n1x = mult * point1.x;
+ mgminfo->x1 = mgminfo->x2 + mult * point1.x + sub1->x + sub2->x;
+ }
+
+ if (!(mgminfo->flags & 4)) {
+ n2y = mult * point1.y;
+ n1y = mult * point1.y;
+ len = -1;
+ mgminfo->y1 = mgminfo->y2 + mult * point1.y + sub1->y + sub2->y;
+ }
+
+ int px = 0;
+ int py = 0;
+
+ if (sub1->movement) {
+ px = countPhases(itemIdx, subIdx, st2idx, 1);
+ py = countPhases(itemIdx, subIdx, st2idx, 2);
+ }
+
+ if (mult > 1) {
+ px += (mult - 1) * mov->countPhasesWithFlag(-1, 1);
+ py += (mult - 1) * mov->countPhasesWithFlag(-1, 2);
+ }
+
+ if (mult > 0) {
+ px += mov->countPhasesWithFlag(len, 1);
+ py += mov->countPhasesWithFlag(len, 2);
+ }
+
+ if (sub2->movement) {
+ px += countPhases(itemIdx, st1idx, subOffset, 1);
+ py += countPhases(itemIdx, st1idx, subOffset, 2);
+ }
+
+ int dx1 = n1x - n2x;
+ int dy1 = n1y - n2y;
+ int x1, y1;
+
+ if (px) {
+ x1 = (int)((double)dx1 / (double)px);
+ } else {
+ x1 = 0;
+ }
+
+ if (py) {
+ y1 = (int)((double)dy1 / (double)py);
+ } else {
+ y1 = 0;
+ }
+
+ Common::Point x2, y2;
+
+ y2.x = dx1 - px * x1;
+ y2.y = dy1 - py * y1;
+
+ if (n1x - n2x == px * x1)
+ x2.x = 0;
+ else
+ x2.x = (dx1 - px * x1) / abs(dx1 - px * x1);
+
+ if (dy1 == py * y1)
+ x2.y = 0;
+ else
+ x2.y = (dy1 - py * y1) / abs(dy1 - py * y1);
+
+ MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
+ ExCommand2 *ex2;
+
+ for (int i = subIdx; i != st2idx;) {
+ MGMSubItem *s = _items[itemIdx]->subItems[i + subOffset * _items[itemIdx]->statics.size()];
+
+ ex2 = buildExCommand2(s->movement, mgminfo->ani->_id, x1, y1, &x2, &y2, -1);
+ ex2->_parId = mq->_id;
+ ex2->_keyCode = mgminfo->ani->_okeyCode;
+
+ mq->addExCommandToEnd(ex2);
+
+ i = s->staticsIndex;
+ }
+
+ for (int i = 0; i < mult; ++i) {
+ int plen;
+
+ if (i == mult - 1)
+ plen = len;
+ else
+ plen = -1;
+
+ ex2 = buildExCommand2(mov, mgminfo->ani->_id, x1, y1, &x2, &y2, plen);
+ ex2->_parId = mq->_id;
+ ex2->_keyCode = mgminfo->ani->_okeyCode;
+
+ mq->addExCommandToEnd(ex2);
+ }
+
+ for (int j = st1idx; j != subOffset;) {
+ MGMSubItem *s = _items[itemIdx]->subItems[j + subOffset * _items[itemIdx]->statics.size()];
+
+ ex2 = buildExCommand2(s->movement, mgminfo->ani->_id, x1, y1, &x2, &y2, -1);
+ ex2->_parId = mq->_id;
+ ex2->_keyCode = mgminfo->ani->_okeyCode;
+
+ mq->addExCommandToEnd(ex2);
+
+ j = s->staticsIndex;
+ }
+
+ ExCommand *ex = new ExCommand(mgminfo->ani->_id, 5, -1, mgminfo->x1, mgminfo->y1, 0, 1, 0, 0, 0);
+
+ ex->_field_14 = mgminfo->field_1C;
+ ex->_keyCode = mgminfo->ani->_okeyCode;
+ ex->_field_24 = 0;
+ ex->_excFlags |= 3;
+
+ mq->addExCommandToEnd(ex);
+
+ return mq;
+}
+
+int MGM::countPhases(int idx, int subIdx, int endIdx, int flag) {
+ int res = 0;
+
+ if (endIdx < 0)
+ return 0;
+
+ while (subIdx != endIdx) {
+ if (subIdx < 0)
+ break;
+
+ res += _items[idx]->subItems[subIdx + endIdx * _items[idx]->statics.size()]->movement->countPhasesWithFlag(-1, flag);
+
+ subIdx = _items[idx]->subItems[subIdx + 6 * endIdx * _items[idx]->statics.size()]->staticsIndex;
+ }
+
+ return res;
+}
+void MGM::updateAnimStatics(StaticANIObject *ani, int staticsId) {
+ if (getItemIndexById(ani->_id) == -1)
+ return;
+
+ if (ani->_movement) {
+ ani->queueMessageQueue(0);
+ ani->_movement->gotoLastFrame();
+ ani->_statics = ani->_movement->_staticsObj2;
+
+ int x = ani->_movement->_ox;
+ int y = ani->_movement->_oy;
+
+ ani->_movement = 0;
+
+ ani->setOXY(x, y);
+ }
+
+ if (ani->_statics) {
+ Common::Point point;
+
+ getPoint(&point, ani->_id, ani->_statics->_staticsId, staticsId);
+
+ ani->setOXY(ani->_ox + point.x, ani->_oy + point.y);
+
+ ani->_statics = ani->getStaticsById(staticsId);
+ }
+}
+
+Common::Point *MGM::getPoint(Common::Point *point, int objectId, int staticsId1, int staticsId2) {
+ int idx = getItemIndexById(objectId);
+
+ if (idx == -1) {
+ point->x = -1;
+ point->y = -1;
+ } else {
+ int st1idx = getStaticsIndexById(idx, staticsId1);
+ int st2idx = getStaticsIndexById(idx, staticsId2);
+
+ if (st1idx == st2idx) {
+ point->x = 0;
+ point->y = 0;
+ } else {
+ int subidx = st1idx + st2idx * _items[idx]->statics.size();
+
+ if (!_items[idx]->subItems[subidx]->movement) {
+ clearMovements2(idx);
+ recalcOffsets(idx, st1idx, st2idx, false, true);
+
+ if (!_items[idx]->subItems[subidx]->movement) {
+ clearMovements2(idx);
+ recalcOffsets(idx, st1idx, st2idx, true, false);
+ }
+ }
+
+ MGMSubItem *sub = _items[idx]->subItems[subidx];
+
+ if (sub->movement) {
+ point->x = sub->x;
+ point->y = sub->y;
+ } else {
+ point->x = 0;
+ point->y = 0;
+ }
+ }
+ }
+
+ return point;
+}
+
+int MGM::getStaticsIndexById(int idx, int16 id) {
+ if (!_items[idx]->statics.size())
+ return -1;
+
+ for (uint i = 0; i < _items[idx]->statics.size(); i++) {
+ if (_items[idx]->statics[i]->_staticsId == id)
+ return i;
+ }
+
+ return 0;
+}
+
+int MGM::getStaticsIndex(int idx, Statics *st) {
+ if (!_items[idx]->statics.size())
+ return -1;
+
+ for (uint i = 0; i < _items[idx]->statics.size(); i++) {
+ if (_items[idx]->statics[i] == st)
+ return i;
+ }
+
+ return 0;
+}
+
+void MGM::clearMovements2(int idx) {
+ _items[idx]->movements2.clear();
+}
+
+int MGM::recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop) {
+ MGMItem *item = _items[idx];
+ int subIdx = st1idx + st2idx * item->statics.size();
+
+ if (st1idx == st2idx) {
+ memset(&item->subItems[subIdx], 0, sizeof(item->subItems[subIdx]));
+ return 0;
+ }
+
+ if (item->subItems[subIdx])
+ return item->subItems[subIdx]->field_8;
+
+ Common::Point point;
+
+ for (uint i = 0; i < item->movements1.size(); i++) {
+ Movement *mov = item->movements1[i];
+
+ if (mov->_staticsObj1 == item->statics[st1idx]) {
+ if (!item->movements2[i] && (!flop || mov->_field_50)) {
+ item->movements2[i] = 1;
+
+ int stidx = getStaticsIndex(idx, item->movements1[i]->_staticsObj2);
+ int recalc = recalcOffsets(idx, stidx, st2idx, flip, flop);
+ int sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
+ int newsz = sz + item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->field_C;
+
+ if (recalc >= 0) {
+ if (!item->subItems[subIdx]->movement || item->subItems[subIdx]->field_8 > recalc + 1 ||
+ (item->subItems[subIdx]->field_8 == recalc + 1 && item->subItems[subIdx]->field_C > newsz)) {
+ item->subItems[subIdx]->movement = mov;
+ item->subItems[subIdx]->staticsIndex = stidx;
+ item->subItems[subIdx]->field_8 = recalc + 1;
+ item->subItems[subIdx]->field_C = newsz;
+
+ mov->calcSomeXY(point, 0, -1);
+
+ item->subItems[subIdx]->x = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->x + point.x;
+ item->subItems[subIdx]->y = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->y + point.y;
+ }
+ }
+ }
+ } else if (flip) {
+ if (mov->_staticsObj2 == item->statics[st1idx]) {
+ if (!item->movements2[i] && (!flop || mov->_field_50)) {
+ item->movements2[i] = 1;
+
+ int stidx = getStaticsIndex(idx, mov->_staticsObj1);
+ int recalc = recalcOffsets(idx, stidx, st2idx, flip, flop);
+
+ if (recalc >= 0) {
+ if (!item->subItems[subIdx]->movement || item->subItems[subIdx]->field_8 > recalc + 1) {
+ item->subItems[subIdx]->movement = mov;
+ item->subItems[subIdx]->staticsIndex = stidx;
+ item->subItems[subIdx]->field_8 = recalc + 1;
+
+ int sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
+
+ item->subItems[subIdx]->field_C = sz + item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->field_C;
+
+ mov->calcSomeXY(point, 0, -1);
+
+ item->subItems[subIdx]->x = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->x - point.x;
+ item->subItems[subIdx]->y = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->y - point.y;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (item->subItems[subIdx]->movement)
+ return item->subItems[subIdx]->field_8;
+
+ return -1;
+}
+
+int MGM::refreshOffsets(int objectId, int idx1, int idx2) {
+ int idx = getItemIndexById(objectId);
+
+ if (idx != -1) {
+ int from = getStaticsIndexById(idx, idx1);
+ int to = getStaticsIndexById(idx, idx2);
+
+ MGMSubItem *sub = _items[idx]->subItems[from + to * _items[idx]->statics.size()];
+
+ if (sub->movement) {
+ idx = sub->field_8;
+ } else {
+ clearMovements2(idx);
+ idx = recalcOffsets(idx, from, to, 0, 1);
+ }
+ }
+
+ return idx;
+}
+
+Common::Point *MGM::calcLength(Common::Point *pRes, Movement *mov, int x, int y, int *mult, int *len, int flag) {
+ Common::Point point;
+
+ mov->calcSomeXY(point, 0, -1);
+ int p1x = point.x;
+ int p1y = point.y;
+
+ int newmult = 0;
+ int oldlen = *len;
+
+ if (abs(p1y) > abs(p1x)) {
+ if (mov->calcSomeXY(point, 0, -1)->y)
+ newmult = (int)((double)y / mov->calcSomeXY(point, 0, -1)->y);
+ } else if (mov->calcSomeXY(point, 0, -1)->x) {
+ newmult = (int)((double)x / mov->calcSomeXY(point, 0, -1)->x);
+ }
+
+ if (newmult < 0)
+ newmult = 0;
+
+ *mult = newmult;
+
+ int phase = 1;
+ int sz;
+
+ if (flag) {
+ if (abs(p1y) > abs(p1x)) {
+ while (abs(p1y * newmult + mov->calcSomeXY(point, 0, phase)->y) < abs(y)) {
+ sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
+
+ if (phase > sz)
+ break;
+
+ phase++;
+ }
+ } else {
+ while (abs(p1x * newmult + mov->calcSomeXY(point, 0, phase)->x) < abs(x)) {
+ sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
+
+ if (phase >= sz)
+ break;
+
+ phase++;
+ }
+ }
+
+ *len = phase - 1;
+ } else {
+ *len = -1;
+ }
+
+ int p2x = 0;
+ int p2y = 0;
+
+ if (!oldlen)
+ oldlen = -1;
+
+ if (oldlen > 0) {
+ ++*mult;
+
+ mov->calcSomeXY(point, 0, oldlen);
+ p2x = point.x;
+ p2y = point.y;
+
+ if (abs(p1y) > abs(p1x))
+ p2x = p1x;
+ else
+ p2y = p1y;
+ }
+
+ pRes->x = p2x + p1x * newmult;
+ pRes->y = p2y + p1y * newmult;
+
+ return pRes;
+}
+
+ExCommand2 *MGM::buildExCommand2(Movement *mov, int objId, int x1, int y1, Common::Point *x2, Common::Point *y2, int len) {
+ uint cnt;
+
+ if (mov->_currMovement)
+ cnt = mov->_currMovement->_dynamicPhases.size();
+ else
+ cnt = mov->_dynamicPhases.size();
+
+ if (len > 0 && cnt > (uint)len)
+ cnt = len;
+
+ Common::Point **points = (Common::Point **)malloc(sizeof(Common::Point *) * cnt);
+
+ for (uint i = 0; i < cnt; i++) {
+ int flags = mov->getDynamicPhaseByIndex(i)->getDynFlags();
+
+ points[i] = new Common::Point;
+
+ if (flags & 1) {
+ points[i]->x = x1 + x2->x;
+
+ y2->x -= x2->x;
+
+ if (!y2->x)
+ x2->x = 0;
+ }
+
+ if (flags & 2) {
+ points[i]->y = y1 + x2->y;
+
+ y2->y -= x2->y;
+
+ if (!y2->y)
+ x2->y = 0;
+ }
+ }
+
+ ExCommand2 *ex = new ExCommand2(20, objId, points, cnt);
+ ex->_excFlags = 2;
+ ex->_messageNum = mov->_id;
+ ex->_field_14 = len;
+ ex->_field_24 = 1;
+ ex->_keyCode = -1;
+
+ for (uint i = 0; i < cnt; i++)
+ delete points[i];
+
+ free(points);
+
+ return ex;
+}
+
+} // End of namespace Fullpipe
diff --git a/engines/fullpipe/mgm.h b/engines/fullpipe/mgm.h
new file mode 100644
index 0000000000..13195891da
--- /dev/null
+++ b/engines/fullpipe/mgm.h
@@ -0,0 +1,95 @@
+/* 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 FULLPIPE_MGM_H
+#define FULLPIPE_MGM_H
+
+namespace Fullpipe {
+
+class ExCommand2;
+class Movement;
+class Statics;
+
+struct MGMSubItem {
+ Movement *movement;
+ int staticsIndex;
+ int field_8;
+ int field_C;
+ int x;
+ int y;
+
+ MGMSubItem();
+};
+
+struct MGMItem {
+ int16 objId;
+ Common::Array<MGMSubItem *> subItems;
+ Common::Array<Statics *> statics;
+ Common::Array<Movement *> movements1;
+ Common::Array<int> movements2;
+
+ MGMItem();
+};
+
+struct MGMInfo {
+ StaticANIObject *ani;
+ int staticsId1;
+ int staticsId2;
+ int movementId;
+ int field_10;
+ int x1;
+ int y1;
+ int field_1C;
+ int x2;
+ int y2;
+ int flags;
+
+ MGMInfo() { memset(this, 0, sizeof(MGMInfo)); }
+};
+
+class MGM : public CObject {
+public:
+ Common::Array<MGMItem *> _items;
+
+public:
+ void clear();
+ void addItem(int objId);
+ void rebuildTables(int objId);
+ int getItemIndexById(int objId);
+
+ MessageQueue *genMovement(MGMInfo *mgminfo);
+ void updateAnimStatics(StaticANIObject *ani, int staticsId);
+ Common::Point *getPoint(Common::Point *point, int aniId, int staticsId1, int staticsId2);
+ int getStaticsIndexById(int idx, int16 id);
+ int getStaticsIndex(int idx, Statics *st);
+ void clearMovements2(int idx);
+ int recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop);
+ Common::Point *calcLength(Common::Point *point, Movement *mov, int x, int y, int *mult, int *len, int flag);
+ ExCommand2 *buildExCommand2(Movement *mov, int objId, int x1, int y1, Common::Point *x2, Common::Point *y2, int len);
+ MessageQueue *genMQ(StaticANIObject *ani, int staticsIndex, int staticsId, int *resStatId, Common::Point **pointArr);
+ int countPhases(int idx, int subIdx, int subOffset, int flag);
+ int refreshOffsets(int objectId, int idx1, int idx2);
+};
+
+} // End of namespace Fullpipe
+
+#endif /* FULLPIPE_MGM_H */
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 3dbbeb78c4..2fd7ef0c21 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -198,11 +198,9 @@ bool ModalIntro::init(int counterdiff) {
}
void ModalIntro::update() {
- warning("STUB: ModalIntro::update()");
-
if (g_fp->_currentScene) {
if (_introFlags & 1) {
- //sceneFade(virt, g_currentScene, 1);
+ g_fp->sceneFade(g_fp->_currentScene, true);
_stillRunning = 255;
_introFlags &= 0xfe;
@@ -210,12 +208,12 @@ void ModalIntro::update() {
g_fp->playSound(SND_INTR_019, 0);
} else if (_introFlags & 2) {
if (g_vars->sceneIntro_needBlackout) {
- //vrtRectangle(*(_DWORD *)virt, 0, 0, 0, 800, 600);
+ g_fp->drawAlphaRectangle(0, 0, 800, 600, 0);
g_vars->sceneIntro_needBlackout = 0;
_stillRunning = 0;
_introFlags &= 0xfd;
} else {
- //sceneFade(virt, g_currentScene, 0);
+ g_fp->sceneFade(g_fp->_currentScene, false);
_stillRunning = 0;
_introFlags &= 0xfd;
}
@@ -728,8 +726,6 @@ bool ModalCredits::init(int counterdiff) {
}
void ModalCredits::update() {
- warning("STUB: ModalCredits::update()");
-
if (_fadeOut) {
if (_fadeIn) {
_sceneTitles->draw();
@@ -737,14 +733,14 @@ void ModalCredits::update() {
return;
}
} else if (_fadeIn) {
- //sceneFade(virt, this->_sceneTitles, 1); // TODO
+ g_fp->sceneFade(_sceneTitles, true);
_fadeOut = 1;
return;
}
if (_fadeOut) {
- //sceneFade(virt, this->_sceneTitles, 0); // TODO
+ g_fp->sceneFade(_sceneTitles, false);
_fadeOut = 0;
return;
}
@@ -922,7 +918,7 @@ bool ModalMainMenu::init(int counterdiff) {
g_fp->_modalObject = mq;
mq->_parentObj = this;
- mq->create(_scene, (PictureObject *)_scene->_picObjList[0], PIC_MEX_BGR);
+ mq->create(_scene, _scene, PIC_MEX_BGR);
_hoverAreaId = 0;
@@ -1322,7 +1318,7 @@ void ModalHelp::launch() {
}
ModalQuery::ModalQuery() {
- _picObjList = 0;
+ _bgScene = 0;
_bg = 0;
_okBtn = 0;
_cancelBtn = 0;
@@ -1335,7 +1331,7 @@ ModalQuery::~ModalQuery() {
_okBtn->_flags &= 0xFFFB;
}
-bool ModalQuery::create(Scene *sc, PictureObject *picObjList, int id) {
+bool ModalQuery::create(Scene *sc, Scene *bgScene, int id) {
if (id == PIC_MEX_BGR) {
_bg = sc->getPictureObjectById(PIC_MEX_BGR, 0);
@@ -1372,14 +1368,14 @@ bool ModalQuery::create(Scene *sc, PictureObject *picObjList, int id) {
}
_queryResult = -1;
- _picObjList = picObjList;
+ _bgScene = bgScene;
return true;
}
void ModalQuery::update() {
- if (_picObjList)
- _picObjList->draw();
+ if (_bgScene)
+ _bgScene->draw();
_bg->draw();
@@ -1430,9 +1426,12 @@ bool ModalQuery::init(int counterdiff) {
_okBtn->_flags &= 0xFFFB;
if (_queryResult == 1) {
+ if (_bgScene)
+ g_fp->sceneFade(_bgScene, false);
+
warning("STUB: ModalQuery::init()");
- //sceneFade(g_vrtDrawHandle, (Scene *)this->_picObjList, 0);
+ // Quit game
//if (inputArFlag) {
// g_needRestart = 1;
// return 0;
@@ -1596,7 +1595,7 @@ void ModalSaveGame::setup(Scene *sc, int mode) {
fileinfo = new FileInfo;
memset(fileinfo, 0, sizeof(FileInfo));
- strncpy(fileinfo->filename, getSavegameFile(i), 160);
+ Common::strlcpy(fileinfo->filename, getSavegameFile(i), 160);
if (!getFileInfo(i, fileinfo)) {
fileinfo->empty = true;
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 01d8e6b0ee..a08cb3bce2 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -235,12 +235,12 @@ public:
virtual void update();
virtual void saveload() {}
- bool create(Scene *sc, PictureObject *picObjList, int picId);
+ bool create(Scene *sc, Scene *bgScene, int picId);
int getQueryResult() { return _queryResult; }
private:
- PictureObject *_picObjList;
+ Scene *_bgScene;
PictureObject *_bg;
PictureObject *_okBtn;
PictureObject *_cancelBtn;
diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk
index 3962fe64ba..96bd91fd39 100644
--- a/engines/fullpipe/module.mk
+++ b/engines/fullpipe/module.mk
@@ -15,6 +15,7 @@ MODULE_OBJS = \
lift.o \
messagehandlers.o \
messages.o \
+ mgm.o \
modal.o \
motion.o \
ngiarchive.o \
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 321df7fd22..49cf88434e 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -22,15 +22,10 @@
#include "fullpipe/fullpipe.h"
-#include "common/file.h"
-#include "common/array.h"
-#include "common/list.h"
-
-#include "fullpipe/objects.h"
+#include "fullpipe/utils.h"
#include "fullpipe/statics.h"
#include "fullpipe/gameloader.h"
#include "fullpipe/motion.h"
-#include "fullpipe/messages.h"
namespace Fullpipe {
@@ -1470,12 +1465,12 @@ Common::Array<MovArr *> *MovGraph::genMovArr(int x, int y, int *arrSize, int fla
return arr;
}
-void MovGraph::shuffleTree(MovGraphLink *lnk, MovGraphLink *lnk2, Common::Array<MovGraphLink *> &tempObList1, Common::Array<MovGraphLink *> &tempObList2) {
+void MovGraph::findAllPaths(MovGraphLink *lnk, MovGraphLink *lnk2, Common::Array<MovGraphLink *> &tempObList1, Common::Array<MovGraphLink *> &allPaths) {
if (lnk == lnk2) {
for (uint i = 0; i < tempObList1.size(); i++)
- tempObList2.push_back(tempObList1[i]);
+ allPaths.push_back(tempObList1[i]);
- tempObList2.push_back(lnk);
+ allPaths.push_back(lnk);
} else {
lnk->_flags |= 0x80000000;
@@ -1492,39 +1487,42 @@ void MovGraph::shuffleTree(MovGraphLink *lnk, MovGraphLink *lnk2, Common::Array<
}
if (!(l->_flags & 0xA0000000))
- shuffleTree(l, lnk2, tempObList1, tempObList2);
+ findAllPaths(l, lnk2, tempObList1, allPaths);
}
lnk->_flags &= 0x7FFFFFFF;
}
}
-Common::Array<MovItem *> *MovGraph::calcMovItems(MovArr *movarr1, MovArr *movarr2, int *listCount) {
+// Returns a list of possible paths two points in graph space
+Common::Array<MovItem *> *MovGraph::calcMovItems(MovArr *currPos, MovArr *destPos, int *pathCount) {
Common::Array<MovGraphLink *> tempObList1;
- Common::Array<MovGraphLink *> tempObList2;
+ Common::Array<MovGraphLink *> allPaths;
- shuffleTree(movarr1->_link, movarr2->_link, tempObList1, tempObList2);
+ // Get all paths between two edges of the graph
+ findAllPaths(currPos->_link, destPos->_link, tempObList1, allPaths);
- *listCount = 0;
+ *pathCount = 0;
- if (!tempObList2.size())
+ if (!allPaths.size())
return 0;
- *listCount = tempObList2.size();
+ *pathCount = allPaths.size();
Common::Array<MovItem *> *res = new Common::Array<MovItem *>;
- for (int i = 0; i < *listCount; i++) {
+ for (int i = 0; i < *pathCount; i++) {
MovItem *r = new MovItem;
- genMovItem(r, tempObList2[i], movarr1, movarr2);
+ genMovItem(r, allPaths[i], currPos, destPos);
res->push_back(r);
- delete tempObList2[i];
+ delete allPaths[i];
}
- movarr2->_link = movarr1->_link;
+ // Start the resulting path from current position
+ destPos->_link = currPos->_link;
return res;
}
@@ -2430,7 +2428,7 @@ MessageQueue *MovGraph2::genMovement(MovInfo1 *info) {
int y = info->pt2.y - info->pt1.y - my2 - my1;
int x = info->pt2.x - info->pt1.x - mx2 - mx1;
- int a2;
+ int a2 = 0;
int mgmLen;
_mgm.calcLength(&point, _items2[info->index]->_subItems[info->subIndex]._walk[1]._mov, x, y, &mgmLen, &a2, info->flags & 1);
@@ -2776,693 +2774,6 @@ MovGraphNode *MovGraph::calcOffset(int ox, int oy) {
return res;
}
-void MGM::clear() {
- _items.clear();
-}
-
-MessageQueue *MGM::genMQ(StaticANIObject *ani, int staticsIndex, int staticsId, int *resStatId, Common::Point **pointArr) {
- int idx = getItemIndexById(ani->_id);
-
- if (idx == -1)
- return 0;
-
- int stid = staticsId;
-
- if (!staticsId) {
- if (ani->_movement) {
- stid = ani->_movement->_staticsObj2->_staticsId;
- } else {
- if (!ani->_statics)
- return 0;
-
- stid = ani->_statics->_staticsId;
- }
- }
-
- if (stid == staticsIndex)
- return new MessageQueue(g_fp->_globalMessageQueueList->compact());
-
- int startidx = getStaticsIndexById(idx, stid);
- int endidx = getStaticsIndexById(idx, staticsIndex);
- int subidx = startidx + endidx * _items[idx]->statics.size();
-
- if (!_items[idx]->subItems[subidx]->movement) {
- clearMovements2(idx);
- recalcOffsets(idx, startidx, endidx, 0, 1);
- }
-
- if (!_items[idx]->subItems[subidx]->movement)
- return 0;
-
- MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
- Common::Point point;
- ExCommand *ex;
-
- int i = 0;
- do {
- subidx = startidx + endidx * _items[idx]->statics.size();
-
- _items[idx]->subItems[subidx]->movement->calcSomeXY(point, 0, -1);
-
- if (pointArr) {
- int sz;
-
- if (_items[idx]->subItems[subidx]->movement->_currMovement)
- sz = _items[idx]->subItems[subidx]->movement->_currMovement->_dynamicPhases.size();
- else
- sz = _items[idx]->subItems[subidx]->movement->_dynamicPhases.size();
-
- ex = new ExCommand2(20, ani->_id, &pointArr[i], sz);
-
- ex->_messageNum = _items[idx]->subItems[subidx]->movement->_id;
- } else {
- ex = new ExCommand(ani->_id, 1, _items[idx]->subItems[subidx]->movement->_id, 0, 0, 0, 1, 0, 0, 0);
- }
-
- ex->_keyCode = ani->_okeyCode;
- ex->_field_3C = 1;
- ex->_field_24 = 1;
-
- mq->addExCommandToEnd(ex);
-
- if (resStatId)
- *resStatId = _items[idx]->subItems[subidx]->movement->_id;
-
- startidx = _items[idx]->subItems[subidx]->staticsIndex;
-
- uint step;
-
- if (_items[idx]->subItems[subidx]->movement->_currMovement)
- step = _items[idx]->subItems[subidx]->movement->_currMovement->_dynamicPhases.size();
- else
- step = _items[idx]->subItems[subidx]->movement->_dynamicPhases.size();
-
- i += step;
- } while (startidx != endidx);
-
- return mq;
-}
-
-MGMItem::MGMItem() {
- objId = 0;
-}
-
-MGMSubItem::MGMSubItem() {
- movement = 0;
- staticsIndex = 0;
- field_8 = 0;
- field_C = 0;
- x = 0;
- y = 0;
-}
-
-void MGM::addItem(int objId) {
- if (getItemIndexById(objId) == -1) {
- MGMItem *item = new MGMItem();
-
- item->objId = objId;
- _items.push_back(item);
- }
- rebuildTables(objId);
-}
-
-void MGM::rebuildTables(int objId) {
- int idx = getItemIndexById(objId);
-
- if (idx == -1)
- return;
-
- _items[idx]->subItems.clear();
- _items[idx]->statics.clear();
- _items[idx]->movements1.clear();
- _items[idx]->movements2.clear();
-
- StaticANIObject *obj = g_fp->_currentScene->getStaticANIObject1ById(objId, -1);
-
- if (!obj)
- return;
-
- for (uint i = 0; i < obj->_staticsList.size(); i++)
- _items[idx]->statics.push_back((Statics *)obj->_staticsList[i]);
-
- for (uint i = 0; i < obj->_movements.size(); i++)
- _items[idx]->movements1.push_back((Movement *)obj->_movements[i]);
-
- _items[idx]->subItems.clear();
-}
-
-int MGM::getItemIndexById(int objId) {
- for (uint i = 0; i < _items.size(); i++)
- if (_items[i]->objId == objId)
- return i;
-
- return -1;
-}
-
-MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
- if (!mgminfo->ani)
- return 0;
-
- Movement *mov = mgminfo->ani->_movement;
-
- if (!mov && !mgminfo->ani->_statics)
- return 0;
-
- if (!(mgminfo->flags & 1)) {
- if (mov)
- mgminfo->staticsId1 = mov->_staticsObj2->_staticsId;
- else
- mgminfo->staticsId1 = mgminfo->ani->_statics->_staticsId;
- }
-
- Common::Point point;
-
- if (!(mgminfo->flags & 0x10) || !(mgminfo->flags & 0x20)) {
- int nx = mgminfo->ani->_ox;
- int ny = mgminfo->ani->_oy;
-
- if (mgminfo->ani->_movement) {
- mgminfo->ani->calcNextStep(&point);
-
- nx += point.x;
- ny += point.y;
- }
-
- if (!(mgminfo->flags & 0x10))
- mgminfo->x2 = nx;
-
- if (!(mgminfo->flags & 0x20))
- mgminfo->y2 = ny;
- }
-
- mov = mgminfo->ani->getMovementById(mgminfo->movementId);
-
- if (!mov)
- return 0;
-
- int itemIdx = getItemIndexById(mgminfo->ani->_id);
- int subIdx = getStaticsIndexById(itemIdx, mgminfo->staticsId1);
- int st2idx = getStaticsIndexById(itemIdx, mov->_staticsObj1->_staticsId);
- int st1idx = getStaticsIndexById(itemIdx, mov->_staticsObj2->_staticsId);
- int subOffset = getStaticsIndexById(itemIdx, mgminfo->staticsId2);
-
- clearMovements2(itemIdx);
- recalcOffsets(itemIdx, subIdx, st2idx, 0, 1);
- clearMovements2(itemIdx);
- recalcOffsets(itemIdx, st1idx, subOffset, 0, 1);
-
- MGMSubItem *sub1 = _items[itemIdx]->subItems[subIdx + st2idx * _items[itemIdx]->statics.size()];
- MGMSubItem *sub2 = _items[itemIdx]->subItems[st1idx + subOffset * _items[itemIdx]->statics.size()];
-
- if (subIdx != st2idx && !sub1->movement)
- return 0;
-
- if (st1idx != subOffset && !sub2->movement)
- return 0;
-
- int n1x = mgminfo->x1 - mgminfo->x2 - sub1->x - sub2->x;
- int n1y = mgminfo->y1 - mgminfo->y2 - sub1->y - sub2->y;
-
- Common::Point point1;
-
- mov->calcSomeXY(point1, 0, -1);
-
- int n2x = point1.x;
- int n2y = point1.y;
- int mult;
- int len = -1;
-
- if (mgminfo->flags & 0x40) {
- mult = mgminfo->field_10;
- len = -1;
- n2x *= mult;
- n2y *= mult;
- } else {
- calcLength(&point, mov, n1x, n1y, &mult, &len, 1);
- n2x = point.x;
- n2y = point.y;
- }
-
- if (!(mgminfo->flags & 2)) {
- len = -1;
- n2x = mult * point1.x;
- n1x = mult * point1.x;
- mgminfo->x1 = mgminfo->x2 + mult * point1.x + sub1->x + sub2->x;
- }
-
- if (!(mgminfo->flags & 4)) {
- n2y = mult * point1.y;
- n1y = mult * point1.y;
- len = -1;
- mgminfo->y1 = mgminfo->y2 + mult * point1.y + sub1->y + sub2->y;
- }
-
- int px = 0;
- int py = 0;
-
- if (sub1->movement) {
- px = countPhases(itemIdx, subIdx, st2idx, 1);
- py = countPhases(itemIdx, subIdx, st2idx, 2);
- }
-
- if (mult > 1) {
- px += (mult - 1) * mov->countPhasesWithFlag(-1, 1);
- py += (mult - 1) * mov->countPhasesWithFlag(-1, 2);
- }
-
- if (mult > 0) {
- px += mov->countPhasesWithFlag(len, 1);
- py += mov->countPhasesWithFlag(len, 2);
- }
-
- if (sub2->movement) {
- px += countPhases(itemIdx, st1idx, subOffset, 1);
- py += countPhases(itemIdx, st1idx, subOffset, 2);
- }
-
- int dx1 = n1x - n2x;
- int dy1 = n1y - n2y;
- int x1, y1;
-
- if (px) {
- x1 = (int)((double)dx1 / (double)px);
- } else {
- x1 = 0;
- }
-
- if (py) {
- y1 = (int)((double)dy1 / (double)py);
- } else {
- y1 = 0;
- }
-
- Common::Point x2, y2;
-
- y2.x = dx1 - px * x1;
- y2.y = dy1 - py * y1;
-
- if (n1x - n2x == px * x1)
- x2.x = 0;
- else
- x2.x = (dx1 - px * x1) / abs(dx1 - px * x1);
-
- if (dy1 == py * y1)
- x2.y = 0;
- else
- x2.y = (dy1 - py * y1) / abs(dy1 - py * y1);
-
- MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
- ExCommand2 *ex2;
-
- for (int i = subIdx; i != st2idx;) {
- MGMSubItem *s = _items[itemIdx]->subItems[i + subOffset * _items[itemIdx]->statics.size()];
-
- ex2 = buildExCommand2(s->movement, mgminfo->ani->_id, x1, y1, &x2, &y2, -1);
- ex2->_parId = mq->_id;
- ex2->_keyCode = mgminfo->ani->_okeyCode;
-
- mq->addExCommandToEnd(ex2);
-
- i = s->staticsIndex;
- }
-
- for (int i = 0; i < mult; ++i) {
- int plen;
-
- if (i == mult - 1)
- plen = len;
- else
- plen = -1;
-
- ex2 = buildExCommand2(mov, mgminfo->ani->_id, x1, y1, &x2, &y2, plen);
- ex2->_parId = mq->_id;
- ex2->_keyCode = mgminfo->ani->_okeyCode;
-
- mq->addExCommandToEnd(ex2);
- }
-
- for (int j = st1idx; j != subOffset;) {
- MGMSubItem *s = _items[itemIdx]->subItems[j + subOffset * _items[itemIdx]->statics.size()];
-
- ex2 = buildExCommand2(s->movement, mgminfo->ani->_id, x1, y1, &x2, &y2, -1);
- ex2->_parId = mq->_id;
- ex2->_keyCode = mgminfo->ani->_okeyCode;
-
- mq->addExCommandToEnd(ex2);
-
- j = s->staticsIndex;
- }
-
- ExCommand *ex = new ExCommand(mgminfo->ani->_id, 5, -1, mgminfo->x1, mgminfo->y1, 0, 1, 0, 0, 0);
-
- ex->_field_14 = mgminfo->field_1C;
- ex->_keyCode = mgminfo->ani->_okeyCode;
- ex->_field_24 = 0;
- ex->_excFlags |= 3;
-
- mq->addExCommandToEnd(ex);
-
- return mq;
-}
-
-int MGM::countPhases(int idx, int subIdx, int endIdx, int flag) {
- int res = 0;
-
- if (endIdx < 0)
- return 0;
-
- while (subIdx != endIdx) {
- if (subIdx < 0)
- break;
-
- res += _items[idx]->subItems[subIdx + endIdx * _items[idx]->statics.size()]->movement->countPhasesWithFlag(-1, flag);
-
- subIdx = _items[idx]->subItems[subIdx + 6 * endIdx * _items[idx]->statics.size()]->staticsIndex;
- }
-
- return res;
-}
-void MGM::updateAnimStatics(StaticANIObject *ani, int staticsId) {
- if (getItemIndexById(ani->_id) == -1)
- return;
-
- if (ani->_movement) {
- ani->queueMessageQueue(0);
- ani->_movement->gotoLastFrame();
- ani->_statics = ani->_movement->_staticsObj2;
-
- int x = ani->_movement->_ox;
- int y = ani->_movement->_oy;
-
- ani->_movement = 0;
-
- ani->setOXY(x, y);
- }
-
- if (ani->_statics) {
- Common::Point point;
-
- getPoint(&point, ani->_id, ani->_statics->_staticsId, staticsId);
-
- ani->setOXY(ani->_ox + point.x, ani->_oy + point.y);
-
- ani->_statics = ani->getStaticsById(staticsId);
- }
-}
-
-Common::Point *MGM::getPoint(Common::Point *point, int objectId, int staticsId1, int staticsId2) {
- int idx = getItemIndexById(objectId);
-
- if (idx == -1) {
- point->x = -1;
- point->y = -1;
- } else {
- int st1idx = getStaticsIndexById(idx, staticsId1);
- int st2idx = getStaticsIndexById(idx, staticsId2);
-
- if (st1idx == st2idx) {
- point->x = 0;
- point->y = 0;
- } else {
- int subidx = st1idx + st2idx * _items[idx]->statics.size();
-
- if (!_items[idx]->subItems[subidx]->movement) {
- clearMovements2(idx);
- recalcOffsets(idx, st1idx, st2idx, false, true);
-
- if (!_items[idx]->subItems[subidx]->movement) {
- clearMovements2(idx);
- recalcOffsets(idx, st1idx, st2idx, true, false);
- }
- }
-
- MGMSubItem *sub = _items[idx]->subItems[subidx];
-
- if (sub->movement) {
- point->x = sub->x;
- point->y = sub->y;
- } else {
- point->x = 0;
- point->y = 0;
- }
- }
- }
-
- return point;
-}
-
-int MGM::getStaticsIndexById(int idx, int16 id) {
- if (!_items[idx]->statics.size())
- return -1;
-
- for (uint i = 0; i < _items[idx]->statics.size(); i++) {
- if (_items[idx]->statics[i]->_staticsId == id)
- return i;
- }
-
- return 0;
-}
-
-int MGM::getStaticsIndex(int idx, Statics *st) {
- if (!_items[idx]->statics.size())
- return -1;
-
- for (uint i = 0; i < _items[idx]->statics.size(); i++) {
- if (_items[idx]->statics[i] == st)
- return i;
- }
-
- return 0;
-}
-
-void MGM::clearMovements2(int idx) {
- _items[idx]->movements2.clear();
-}
-
-int MGM::recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop) {
- MGMItem *item = _items[idx];
- int subIdx = st1idx + st2idx * item->statics.size();
-
- if (st1idx == st2idx) {
- memset(&item->subItems[subIdx], 0, sizeof(item->subItems[subIdx]));
- return 0;
- }
-
- if (item->subItems[subIdx])
- return item->subItems[subIdx]->field_8;
-
- Common::Point point;
-
- for (uint i = 0; i < item->movements1.size(); i++) {
- Movement *mov = item->movements1[i];
-
- if (mov->_staticsObj1 == item->statics[st1idx]) {
- if (!item->movements2[i] && (!flop || mov->_field_50)) {
- item->movements2[i] = 1;
-
- int stidx = getStaticsIndex(idx, item->movements1[i]->_staticsObj2);
- int recalc = recalcOffsets(idx, stidx, st2idx, flip, flop);
- int sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
- int newsz = sz + item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->field_C;
-
- if (recalc >= 0) {
- if (!item->subItems[subIdx]->movement || item->subItems[subIdx]->field_8 > recalc + 1 ||
- (item->subItems[subIdx]->field_8 == recalc + 1 && item->subItems[subIdx]->field_C > newsz)) {
- item->subItems[subIdx]->movement = mov;
- item->subItems[subIdx]->staticsIndex = stidx;
- item->subItems[subIdx]->field_8 = recalc + 1;
- item->subItems[subIdx]->field_C = newsz;
-
- mov->calcSomeXY(point, 0, -1);
-
- item->subItems[subIdx]->x = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->x + point.x;
- item->subItems[subIdx]->y = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->y + point.y;
- }
- }
- }
- } else if (flip) {
- if (mov->_staticsObj2 == item->statics[st1idx]) {
- if (!item->movements2[i] && (!flop || mov->_field_50)) {
- item->movements2[i] = 1;
-
- int stidx = getStaticsIndex(idx, mov->_staticsObj1);
- int recalc = recalcOffsets(idx, stidx, st2idx, flip, flop);
-
- if (recalc >= 0) {
- if (!item->subItems[subIdx]->movement || item->subItems[subIdx]->field_8 > recalc + 1) {
- item->subItems[subIdx]->movement = mov;
- item->subItems[subIdx]->staticsIndex = stidx;
- item->subItems[subIdx]->field_8 = recalc + 1;
-
- int sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
-
- item->subItems[subIdx]->field_C = sz + item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->field_C;
-
- mov->calcSomeXY(point, 0, -1);
-
- item->subItems[subIdx]->x = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->x - point.x;
- item->subItems[subIdx]->y = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->y - point.y;
- }
- }
- }
- }
- }
- }
-
- if (item->subItems[subIdx]->movement)
- return item->subItems[subIdx]->field_8;
-
- return -1;
-}
-
-int MGM::refreshOffsets(int objectId, int idx1, int idx2) {
- int idx = getItemIndexById(objectId);
-
- if (idx != -1) {
- int from = getStaticsIndexById(idx, idx1);
- int to = getStaticsIndexById(idx, idx2);
-
- MGMSubItem *sub = _items[idx]->subItems[from + to * _items[idx]->statics.size()];
-
- if (sub->movement) {
- idx = sub->field_8;
- } else {
- clearMovements2(idx);
- idx = recalcOffsets(idx, from, to, 0, 1);
- }
- }
-
- return idx;
-}
-
-Common::Point *MGM::calcLength(Common::Point *pRes, Movement *mov, int x, int y, int *mult, int *len, int flag) {
- Common::Point point;
-
- mov->calcSomeXY(point, 0, -1);
- int p1x = point.x;
- int p1y = point.y;
-
- int newmult = 0;
- int oldlen = *len;
-
- if (abs(p1y) > abs(p1x)) {
- if (mov->calcSomeXY(point, 0, -1)->y)
- newmult = (int)((double)y / mov->calcSomeXY(point, 0, -1)->y);
- } else if (mov->calcSomeXY(point, 0, -1)->x) {
- newmult = (int)((double)x / mov->calcSomeXY(point, 0, -1)->x);
- }
-
- if (newmult < 0)
- newmult = 0;
-
- *mult = newmult;
-
- int phase = 1;
- int sz;
-
- if (flag) {
- if (abs(p1y) > abs(p1x)) {
- while (abs(p1y * newmult + mov->calcSomeXY(point, 0, phase)->y) < abs(y)) {
- sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
-
- if (phase > sz)
- break;
-
- phase++;
- }
- } else {
- while (abs(p1x * newmult + mov->calcSomeXY(point, 0, phase)->x) < abs(x)) {
- sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
-
- if (phase >= sz)
- break;
-
- phase++;
- }
- }
-
- *len = phase - 1;
- } else {
- *len = -1;
- }
-
- int p2x = 0;
- int p2y = 0;
-
- if (!oldlen)
- oldlen = -1;
-
- if (oldlen > 0) {
- ++*mult;
-
- mov->calcSomeXY(point, 0, oldlen);
- p2x = point.x;
- p2y = point.y;
-
- if (abs(p1y) > abs(p1x))
- p2x = p1x;
- else
- p2y = p1y;
- }
-
- pRes->x = p2x + p1x * newmult;
- pRes->y = p2y + p1y * newmult;
-
- return pRes;
-}
-
-ExCommand2 *MGM::buildExCommand2(Movement *mov, int objId, int x1, int y1, Common::Point *x2, Common::Point *y2, int len) {
- uint cnt;
-
- if (mov->_currMovement)
- cnt = mov->_currMovement->_dynamicPhases.size();
- else
- cnt = mov->_dynamicPhases.size();
-
- if (len > 0 && cnt > (uint)len)
- cnt = len;
-
- Common::Point **points = (Common::Point **)malloc(sizeof(Common::Point *) * cnt);
-
- for (uint i = 0; i < cnt; i++) {
- int flags = mov->getDynamicPhaseByIndex(i)->getDynFlags();
-
- points[i] = new Common::Point;
-
- if (flags & 1) {
- points[i]->x = x1 + x2->x;
-
- y2->x -= x2->x;
-
- if (!y2->x)
- x2->x = 0;
- }
-
- if (flags & 2) {
- points[i]->y = y1 + x2->y;
-
- y2->y -= x2->y;
-
- if (!y2->y)
- x2->y = 0;
- }
- }
-
- ExCommand2 *ex = new ExCommand2(20, objId, points, cnt);
- ex->_excFlags = 2;
- ex->_messageNum = mov->_id;
- ex->_field_14 = len;
- ex->_field_24 = 1;
- ex->_keyCode = -1;
-
- for (uint i = 0; i < cnt; i++)
- delete points[i];
-
- free(points);
-
- return ex;
-}
-
MovGraphLink::MovGraphLink() {
_distance = 0;
_angle = 0;
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 2cbf999f86..c488039e22 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -23,14 +23,13 @@
#ifndef FULLPIPE_MOTION_H
#define FULLPIPE_MOTION_H
+#include "fullpipe/mgm.h"
+
namespace Fullpipe {
-class Statics;
-class Movement;
class MctlConnectionPoint;
class MovGraphLink;
class MessageQueue;
-class ExCommand2;
struct MovArr;
struct MovItem;
@@ -124,67 +123,6 @@ public:
MotionController *getMotionController(int num) { return _motionControllers[num]->_motionControllerObj; }
};
-struct MGMSubItem {
- Movement *movement;
- int staticsIndex;
- int field_8;
- int field_C;
- int x;
- int y;
-
- MGMSubItem();
-};
-
-struct MGMItem {
- int16 objId;
- Common::Array<MGMSubItem *> subItems;
- Common::Array<Statics *> statics;
- Common::Array<Movement *> movements1;
- Common::Array<int> movements2;
-
- MGMItem();
-};
-
-struct MGMInfo {
- StaticANIObject *ani;
- int staticsId1;
- int staticsId2;
- int movementId;
- int field_10;
- int x1;
- int y1;
- int field_1C;
- int x2;
- int y2;
- int flags;
-
- MGMInfo() { memset(this, 0, sizeof(MGMInfo)); }
-};
-
-class MGM : public CObject {
-public:
- Common::Array<MGMItem *> _items;
-
-public:
- void clear();
- void addItem(int objId);
- void rebuildTables(int objId);
- int getItemIndexById(int objId);
-
- MessageQueue *genMovement(MGMInfo *mgminfo);
- void updateAnimStatics(StaticANIObject *ani, int staticsId);
- Common::Point *getPoint(Common::Point *point, int aniId, int staticsId1, int staticsId2);
- int getStaticsIndexById(int idx, int16 id);
- int getStaticsIndex(int idx, Statics *st);
- void clearMovements2(int idx);
- int recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop);
- Common::Point *calcLength(Common::Point *point, Movement *mov, int x, int y, int *mult, int *len, int flag);
- ExCommand2 *buildExCommand2(Movement *mov, int objId, int x1, int y1, Common::Point *x2, Common::Point *y2, int len);
- MessageQueue *genMQ(StaticANIObject *ani, int staticsIndex, int staticsId, int *resStatId, Common::Point **pointArr);
- int countPhases(int idx, int subIdx, int subOffset, int flag);
- int refreshOffsets(int objectId, int idx1, int idx2);
-};
-
struct MctlLadderMovementVars {
int varUpGo;
int varDownGo;
@@ -370,7 +308,7 @@ public:
MovGraphNode *calcOffset(int ox, int oy);
int getItemIndexByStaticAni(StaticANIObject *ani);
Common::Array<MovArr *> *genMovArr(int x, int y, int *arrSize, int flag1, int flag2);
- void shuffleTree(MovGraphLink *lnk, MovGraphLink *lnk2, Common::Array<MovGraphLink *> &tempObList1, Common::Array<MovGraphLink *> &tempObList2);
+ void findAllPaths(MovGraphLink *lnk, MovGraphLink *lnk2, Common::Array<MovGraphLink *> &tempObList1, Common::Array<MovGraphLink *> &tempObList2);
Common::Array<MovItem *> *calcMovItems(MovArr *movarr1, MovArr *movarr2, int *listCount);
void genMovItem(MovItem *movitem, MovGraphLink *grlink, MovArr *movarr1, MovArr *movarr2);
bool calcChunk(int idx, int x, int y, MovArr *arr, int a6);
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index 1247d9380e..8463b3ab40 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -654,7 +654,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
g_fp->_globalPalette = _palette->_data;
}
- debug(8, "Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg);
+ debug(1, "Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg);
if (_picObjList.size() > 2) { // We need to z-sort them
objectList_sortByPriority(_picObjList, true);
@@ -666,11 +666,17 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
if (maxPri == -1)
maxPri = 60000;
- debug(8, "-> Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg);
+ debug(1, "-> Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg);
Common::Point point;
- debug(8, "_bigPict: %d objlist: %d", _bigPictureArray1Count, _picObjList.size());
+ debug(1, "_bigPict: %d objlist: %d", _bigPictureArray1Count, _picObjList.size());
+
+ for (uint i = 0; i < _picObjList.size(); i++) {
+ debug(1, "%d: %d", i, ((PictureObject *)_picObjList[i])->_priority);
+ }
+
+
if (drawBg && _bigPictureArray1Count && _picObjList.size()) {
_bigPictureArray[0][0]->getDimensions(&point);
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index 0a69335bea..fd1ececdf2 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -633,6 +633,7 @@ MessageQueue *sceneHandler04_kozFly5(StaticANIObject *ani, double phase) {
mq1->addExCommandToEnd(mq2->getExCommandByIndex(0)->createClone());
delete mq2;
+ mq2 = 0;
ExCommand *ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_STANDUP, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 2;
@@ -662,6 +663,9 @@ MessageQueue *sceneHandler04_kozFly5(StaticANIObject *ani, double phase) {
mq1->addExCommandToEnd(ex);
}
+ if (mq2)
+ delete mq2;
+
return mq1;
}
diff --git a/engines/fullpipe/scenes/scene29.cpp b/engines/fullpipe/scenes/scene29.cpp
index 2d5127137d..8f82e99ad1 100644
--- a/engines/fullpipe/scenes/scene29.cpp
+++ b/engines/fullpipe/scenes/scene29.cpp
@@ -972,7 +972,7 @@ int sceneHandler29(ExCommand *cmd) {
break;
case MSG_SC29_SHOWLASTRED:
- if (g_vars->scene29_balls.numBalls) {
+ if (g_vars->scene29_redBalls.numBalls) { // original uses scene29_balls which looks like a copy/paste error
g_vars->scene29_redBalls.field_8->ani->show1(-1, -1, -1, 0);
g_vars->scene29_redBalls.field_8->ani->startAnim(MV_SHR_HITASS, 0, -1);
}
diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index 65c9bf84ca..a4ca06f489 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -268,7 +268,7 @@ void FullpipeEngine::setSceneMusicParameters(GameVar *gvar) {
while (sub) {
if (_musicAllowed & sub->_value.intValue) {
- strcpy(_sceneTracks[_numSceneTracks], sub->_varName);
+ Common::strlcpy(_sceneTracks[_numSceneTracks], sub->_varName, 260);
_numSceneTracks++;
}
@@ -286,7 +286,7 @@ void FullpipeEngine::setSceneMusicParameters(GameVar *gvar) {
if (seq) {
_sceneTrackHasSequence = true;
- strcpy(_trackName, seq->_value.stringValue);
+ Common::strlcpy(_trackName, seq->_value.stringValue, 2600);
}
if (_musicLocal)
@@ -432,7 +432,7 @@ void FullpipeEngine::playTrack(GameVar *sceneVar, const char *name, bool delayed
while (sub) {
if (_musicAllowed & sub->_value.intValue) {
- strcpy(_sceneTracks[_numSceneTracks], sub->_varName);
+ Common::strlcpy(_sceneTracks[_numSceneTracks], sub->_varName, 260);
_numSceneTracks++;
}
@@ -450,7 +450,7 @@ void FullpipeEngine::playTrack(GameVar *sceneVar, const char *name, bool delayed
if (seq) {
_sceneTrackHasSequence = true;
- strcpy(_trackName, seq->_value.stringValue);
+ Common::strlcpy(_trackName, seq->_value.stringValue, 2600);
}
if (delayed) {
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index 41641457d3..141196c7d7 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -162,7 +162,43 @@ GameVar::GameVar() {
}
GameVar::~GameVar() {
- warning("STUB: GameVar::~GameVar()");
+ if (_varType == 2)
+ free(_value.stringValue);
+
+ if (_parentVarObj && !_prevVarObj ) {
+ if (_parentVarObj->_subVars == this) {
+ _parentVarObj->_subVars = _nextVarObj;
+ } else if (_parentVarObj->_field_14 == this) {
+ _parentVarObj->_field_14 = _nextVarObj;
+ } else {
+ _parentVarObj = 0;
+ }
+ }
+
+ if (_prevVarObj)
+ _prevVarObj->_nextVarObj = _nextVarObj;
+
+ if (_nextVarObj)
+ _nextVarObj->_prevVarObj = _prevVarObj;
+
+ _prevVarObj = 0;
+ _nextVarObj = 0;
+
+ GameVar *s = _subVars;
+
+ while (s) {
+ delete s;
+ s = _subVars;
+ }
+
+ s = _field_14;
+
+ while (s) {
+ delete s;
+ s = _field_14;
+ }
+
+ free(_varName);
}
bool GameVar::load(MfcArchive &file) {
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 292ef08914..717de84925 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -528,15 +528,15 @@ void Movement::draw(bool flipFlag, int angle) {
if (_currMovement) {
bmp = _currDynamicPhase->getPixelData()->reverseImage();
} else {
- bmp = _currDynamicPhase->getPixelData();
+ bmp = _currDynamicPhase->getPixelData()->reverseImage(false);
}
if (flipFlag) {
- bmp->flipVertical()->drawShaded(1, x, y + 30 + _currDynamicPhase->_rect->bottom, _currDynamicPhase->_paletteData);
+ bmp->flipVertical()->drawShaded(1, x, y + 30 + _currDynamicPhase->_rect->bottom, _currDynamicPhase->_paletteData, _currDynamicPhase->_alpha);
} if (angle) {
- bmp->drawRotated(x, y, angle, _currDynamicPhase->_paletteData);
+ bmp->drawRotated(x, y, angle, _currDynamicPhase->_paletteData, _currDynamicPhase->_alpha);
} else {
- bmp->putDib(x, y, (int32 *)_currDynamicPhase->_paletteData);
+ bmp->putDib(x, y, (int32 *)_currDynamicPhase->_paletteData, _currDynamicPhase->_alpha);
}
if (_currDynamicPhase->_rect->top) {
@@ -549,11 +549,11 @@ void Movement::draw(bool flipFlag, int angle) {
if (_currDynamicPhase->_convertedBitmap) {
if (_currMovement) {
//vrtSetAlphaBlendMode(g_vrtDrawHandle, 1, LOBYTE(_currDynamicPhase->rect.top));
- _currDynamicPhase->_convertedBitmap->reverseImage()->putDib(x, y, (int32 *)_currDynamicPhase->_paletteData);
+ _currDynamicPhase->_convertedBitmap->reverseImage()->putDib(x, y, (int32 *)_currDynamicPhase->_paletteData, _currDynamicPhase->_alpha);
//vrtSetAlphaBlendMode(g_vrtDrawHandle, 0, 255);
} else {
//vrtSetAlphaBlendMode(g_vrtDrawHandle, 1, LOBYTE(_currDynamicPhase->rect.top));
- _currDynamicPhase->_convertedBitmap->putDib(x, y, (int32 *)_currDynamicPhase->_paletteData);
+ _currDynamicPhase->_convertedBitmap->reverseImage(false)->putDib(x, y, (int32 *)_currDynamicPhase->_paletteData, _currDynamicPhase->_alpha);
//vrtSetAlphaBlendMode(g_vrtDrawHandle, 0, 255);
}
}
@@ -1454,14 +1454,8 @@ bool Statics::load(MfcArchive &file) {
void Statics::init() {
Picture::init();
- if (_staticsId & 0x4000) {
- Bitmap *bmp = _bitmap->reverseImage();
-
- freePixelData();
-
- _bitmap = bmp;
- _data = bmp->_pixels;
- }
+ if (_staticsId & 0x4000)
+ _bitmap->reverseImage();
}
Common::Point *Statics::getSomeXY(Common::Point &p) {
@@ -2212,9 +2206,12 @@ DynamicPhase::DynamicPhase(DynamicPhase *src, bool reverse) {
_libHandle = src->_libHandle;
_bitmap = src->_bitmap;
- if (_bitmap)
+ if (_bitmap) {
_field_54 = 1;
+ _bitmap = src->_bitmap->reverseImage(false);
+ }
+
_someX = src->_someX;
_someY = src->_someY;
}
diff --git a/engines/gob/detection/tables_ween.h b/engines/gob/detection/tables_ween.h
index 66a83aff0f..bf65685d46 100644
--- a/engines/gob/detection/tables_ween.h
+++ b/engines/gob/detection/tables_ween.h
@@ -228,93 +228,6 @@
0, 0, 0
},
-// -- DOS VGA Floppy --
-
-{
- {
- "ween",
- "",
- AD_ENTRY1("intro.stk", "2bb8878a8042244dd2b96ff682381baa"),
- EN_GRB,
- kPlatformDOS,
- ADGF_NO_FLAGS,
- GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
- },
- kGameTypeWeen,
- kFeaturesAdLib,
- 0, 0, 0
-},
-{
- {
- "ween",
- "",
- AD_ENTRY1s("intro.stk", "de92e5c6a8c163007ffceebef6e67f7d", 7117568),
- EN_USA,
- kPlatformDOS,
- ADGF_NO_FLAGS,
- GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
- },
- kGameTypeWeen,
- kFeaturesAdLib,
- 0, 0, 0
-},
-{ // Supplied by cybot_tmin in bug report #1667743
- {
- "ween",
- "",
- AD_ENTRY1s("intro.stk", "6d60f9205ecfbd8735da2ee7823a70dc", 7014426),
- ES_ESP,
- kPlatformDOS,
- ADGF_NO_FLAGS,
- GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
- },
- kGameTypeWeen,
- kFeaturesAdLib,
- 0, 0, 0
-},
-{
- {
- "ween",
- "",
- AD_ENTRY1("intro.stk", "4b10525a3782aa7ecd9d833b5c1d308b"),
- FR_FRA,
- kPlatformDOS,
- ADGF_NO_FLAGS,
- GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
- },
- kGameTypeWeen,
- kFeaturesAdLib,
- 0, 0, 0
-},
-{ // Supplied by cartman_ on #scummvm
- {
- "ween",
- "",
- AD_ENTRY1("intro.stk", "63170e71f04faba88673b3f510f9c4c8"),
- DE_DEU,
- kPlatformDOS,
- ADGF_NO_FLAGS,
- GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
- },
- kGameTypeWeen,
- kFeaturesAdLib,
- 0, 0, 0
-},
-{ // Supplied by glorfindel in bugreport #1722142
- {
- "ween",
- "",
- AD_ENTRY1s("intro.stk", "8b57cd510da8a3bbd99e3a0297a8ebd1", 7018771),
- IT_ITA,
- kPlatformDOS,
- ADGF_NO_FLAGS,
- GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
- },
- kGameTypeWeen,
- kFeaturesAdLib,
- 0, 0, 0
-},
-
// -- Demos --
{
diff --git a/engines/kyra/items_lol.cpp b/engines/kyra/items_lol.cpp
index f2a9637dfe..e1f864ddd2 100644
--- a/engines/kyra/items_lol.cpp
+++ b/engines/kyra/items_lol.cpp
@@ -265,7 +265,7 @@ bool LoLEngine::addItemToInventory(Item itemIndex) {
gui_drawInventory();
}
- assert(pos > 0 && pos < 48);
+ assert(pos >= 0 && pos < 48);
_inventory[pos] = itemIndex;
gui_drawInventory();
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index f950f9d5aa..89ee41e859 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -61,7 +61,7 @@ public:
~AdLibDriver();
void initDriver();
- void setSoundData(uint8 *data);
+ void setSoundData(uint8 *data, uint32 size);
void queueTrack(int track, int volume);
bool isChannelPlaying(int channel) const;
void stopAllChannels();
@@ -130,13 +130,13 @@ private:
struct Channel {
bool lock; // New to ScummVM
uint8 opExtraLevel2;
- uint8 *dataptr;
+ const uint8 *dataptr;
uint8 duration;
uint8 repeatCounter;
int8 baseOctave;
uint8 priority;
uint8 dataptrStackPos;
- uint8 *dataptrStack[4];
+ const uint8 *dataptrStack[4];
int8 baseNote;
uint8 unk29;
uint8 unk31;
@@ -194,7 +194,7 @@ private:
void setupDuration(uint8 duration, Channel &channel);
void setupNote(uint8 rawNote, Channel &channel, bool flag = false);
- void setupInstrument(uint8 regOffset, uint8 *dataptr, Channel &channel);
+ void setupInstrument(uint8 regOffset, const uint8 *dataptr, Channel &channel);
void noteOn(Channel &channel);
void adjustVolume(Channel &channel);
@@ -216,14 +216,24 @@ private:
// * One for instruments, starting at offset 500.
uint8 *getProgram(int progId) {
- uint16 offset = READ_LE_UINT16(_soundData + 2 * progId);
- //TODO: Check in LoL CD AdLib driver
- if (offset == 0xFFFF)
- return 0;
- return _soundData + READ_LE_UINT16(_soundData + 2 * progId);
+ const uint16 offset = READ_LE_UINT16(_soundData + 2 * progId);
+
+ // In case an invalid offset is specified we return nullptr to
+ // indicate an error. 0xFFFF seems to indicate "this is not a valid
+ // program/instrument". However, 0 is also invalid because it points
+ // inside the offset table itself. We also ignore any offsets outside
+ // of the actual data size.
+ // The original does not contain any safety checks and will simply
+ // read outside of the valid sound data in case an invalid offset is
+ // encountered.
+ if (offset == 0 || offset >= _soundDataSize) {
+ return nullptr;
+ } else {
+ return _soundData + offset;
+ }
}
- uint8 *getInstrument(int instrumentId) {
+ const uint8 *getInstrument(int instrumentId) {
return getProgram(_numPrograms + instrumentId);
}
@@ -231,7 +241,7 @@ private:
void executePrograms();
struct ParserOpcode {
- typedef int (AdLibDriver::*POpcode)(uint8 *&dataptr, Channel &channel, uint8 value);
+ typedef int (AdLibDriver::*POpcode)(const uint8 *&dataptr, Channel &channel, uint8 value);
POpcode function;
const char *name;
};
@@ -240,61 +250,61 @@ private:
const ParserOpcode *_parserOpcodeTable;
int _parserOpcodeTableSize;
- int update_setRepeat(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_checkRepeat(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setupProgram(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setNoteSpacing(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_jump(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_jumpToSubroutine(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_returnFromSubroutine(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setBaseOctave(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_stopChannel(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_playRest(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_writeAdLib(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setupNoteAndDuration(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setBaseNote(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setupSecondaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_stopOtherChannel(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_waitForEndOfProgram(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setupInstrument(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setupPrimaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_removePrimaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setBaseFreq(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setupPrimaryEffect2(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setPriority(uint8 *&dataptr, Channel &channel, uint8 value);
- int updateCallback23(uint8 *&dataptr, Channel &channel, uint8 value);
- int updateCallback24(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setExtraLevel1(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setupDuration(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_playNote(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setFractionalNoteSpacing(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setTempo(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_removeSecondaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setChannelTempo(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setExtraLevel3(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setExtraLevel2(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_changeExtraLevel2(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setAMDepth(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setVibratoDepth(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_changeExtraLevel1(uint8 *&dataptr, Channel &channel, uint8 value);
- int updateCallback38(uint8 *&dataptr, Channel &channel, uint8 value);
- int updateCallback39(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_removePrimaryEffect2(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_pitchBend(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_resetToGlobalTempo(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_nop(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setDurationRandomness(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_changeChannelTempo(uint8 *&dataptr, Channel &channel, uint8 value);
- int updateCallback46(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setupRhythmSection(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_playRhythmSection(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_removeRhythmSection(uint8 *&dataptr, Channel &channel, uint8 value);
- int updateCallback51(uint8 *&dataptr, Channel &channel, uint8 value);
- int updateCallback52(uint8 *&dataptr, Channel &channel, uint8 value);
- int updateCallback53(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setSoundTrigger(uint8 *&dataptr, Channel &channel, uint8 value);
- int update_setTempoReset(uint8 *&dataptr, Channel &channel, uint8 value);
- int updateCallback56(uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setRepeat(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_checkRepeat(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setupProgram(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setNoteSpacing(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_jump(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_jumpToSubroutine(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_returnFromSubroutine(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setBaseOctave(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_stopChannel(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_playRest(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_writeAdLib(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setupNoteAndDuration(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setBaseNote(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setupSecondaryEffect1(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_stopOtherChannel(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_waitForEndOfProgram(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setupInstrument(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setupPrimaryEffect1(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_removePrimaryEffect1(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setBaseFreq(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setupPrimaryEffect2(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setPriority(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int updateCallback23(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int updateCallback24(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setExtraLevel1(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setupDuration(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_playNote(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setFractionalNoteSpacing(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setTempo(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_removeSecondaryEffect1(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setChannelTempo(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setExtraLevel3(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setExtraLevel2(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_changeExtraLevel2(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setAMDepth(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setVibratoDepth(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_changeExtraLevel1(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int updateCallback38(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int updateCallback39(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_removePrimaryEffect2(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_pitchBend(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_resetToGlobalTempo(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_nop(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setDurationRandomness(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_changeChannelTempo(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int updateCallback46(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setupRhythmSection(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_playRhythmSection(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_removeRhythmSection(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int updateCallback51(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int updateCallback52(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int updateCallback53(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setSoundTrigger(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int update_setTempoReset(const uint8 *&dataptr, Channel &channel, uint8 value);
+ int updateCallback56(const uint8 *&dataptr, Channel &channel, uint8 value);
private:
// These variables have not yet been named, but some of them are partly
// known nevertheless:
@@ -358,6 +368,7 @@ private:
FM_OPL *_adlib;
uint8 *_soundData;
+ uint32 _soundDataSize;
struct QueueEntry {
QueueEntry() : data(0), id(0), volume(0) {}
@@ -421,6 +432,7 @@ AdLibDriver::AdLibDriver(Audio::Mixer *mixer, int version) {
memset(_channels, 0, sizeof(_channels));
_soundData = 0;
+ _soundDataSize = 0;
_vibratoAndAMDepthBits = _curRegOffset = 0;
@@ -522,7 +534,7 @@ void AdLibDriver::initDriver() {
resetAdLibState();
}
-void AdLibDriver::setSoundData(uint8 *data) {
+void AdLibDriver::setSoundData(uint8 *data, uint32 size) {
Common::StackLock lock(_mutex);
// Drop all tracks that are still queued. These would point to the old
@@ -536,6 +548,7 @@ void AdLibDriver::setSoundData(uint8 *data) {
}
_soundData = data;
+ _soundDataSize = size;
}
void AdLibDriver::queueTrack(int track, int volume) {
@@ -791,7 +804,7 @@ void AdLibDriver::executePrograms() {
// This fixes a subtle music bug where the
// wrong music would play when getting the
// quill in Kyra 1.
- uint8 *dataptr = channel.dataptr;
+ const uint8 *dataptr = channel.dataptr;
while (dataptr) {
uint8 opcode = *dataptr++;
uint8 param = *dataptr++;
@@ -1030,7 +1043,7 @@ void AdLibDriver::setupNote(uint8 rawNote, Channel &channel, bool flag) {
writeOPL(0xB0 + _curChannel, channel.regBx);
}
-void AdLibDriver::setupInstrument(uint8 regOffset, uint8 *dataptr, Channel &channel) {
+void AdLibDriver::setupInstrument(uint8 regOffset, const uint8 *dataptr, Channel &channel) {
debugC(9, kDebugLevelSound, "setupInstrument(%d, %p, %lu)", regOffset, (const void *)dataptr, (long)(&channel - _channels));
if (_curChannel >= 9)
@@ -1340,12 +1353,12 @@ uint8 AdLibDriver::calculateOpLevel2(Channel &channel) {
// parser opcodes
-int AdLibDriver::update_setRepeat(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setRepeat(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.repeatCounter = value;
return 0;
}
-int AdLibDriver::update_checkRepeat(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_checkRepeat(const uint8 *&dataptr, Channel &channel, uint8 value) {
++dataptr;
if (--channel.repeatCounter) {
int16 add = READ_LE_UINT16(dataptr - 2);
@@ -1354,14 +1367,23 @@ int AdLibDriver::update_checkRepeat(uint8 *&dataptr, Channel &channel, uint8 val
return 0;
}
-int AdLibDriver::update_setupProgram(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setupProgram(const uint8 *&dataptr, Channel &channel, uint8 value) {
if (value == 0xFF)
return 0;
- uint8 *ptr = getProgram(value);
- //TODO: Check in LoL CD AdLib driver
- if (!ptr)
+ const uint8 *ptr = getProgram(value);
+
+ // In case we encounter an invalid program we simply ignore it and do
+ // nothing instead. The original did not care about invalid programs and
+ // simply tried to play them anyway... But to avoid crashes due we ingore
+ // them.
+ // This, for example, happens in the Lands of Lore intro when Scotia gets
+ // the ring in the intro.
+ if (!ptr) {
+ debugC(3, kDebugLevelSound, "AdLibDriver::update_setupProgram: Invalid program %d specified", value);
return 0;
+ }
+
uint8 chan = *ptr++;
uint8 priority = *ptr++;
@@ -1390,12 +1412,12 @@ int AdLibDriver::update_setupProgram(uint8 *&dataptr, Channel &channel, uint8 va
return 0;
}
-int AdLibDriver::update_setNoteSpacing(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setNoteSpacing(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.spacing1 = value;
return 0;
}
-int AdLibDriver::update_jump(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_jump(const uint8 *&dataptr, Channel &channel, uint8 value) {
--dataptr;
int16 add = READ_LE_UINT16(dataptr); dataptr += 2;
if (_version == 1)
@@ -1407,7 +1429,7 @@ int AdLibDriver::update_jump(uint8 *&dataptr, Channel &channel, uint8 value) {
return 0;
}
-int AdLibDriver::update_jumpToSubroutine(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_jumpToSubroutine(const uint8 *&dataptr, Channel &channel, uint8 value) {
--dataptr;
int16 add = READ_LE_UINT16(dataptr); dataptr += 2;
channel.dataptrStack[channel.dataptrStackPos++] = dataptr;
@@ -1418,17 +1440,17 @@ int AdLibDriver::update_jumpToSubroutine(uint8 *&dataptr, Channel &channel, uint
return 0;
}
-int AdLibDriver::update_returnFromSubroutine(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_returnFromSubroutine(const uint8 *&dataptr, Channel &channel, uint8 value) {
dataptr = channel.dataptrStack[--channel.dataptrStackPos];
return 0;
}
-int AdLibDriver::update_setBaseOctave(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setBaseOctave(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.baseOctave = value;
return 0;
}
-int AdLibDriver::update_stopChannel(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_stopChannel(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.priority = 0;
if (_curChannel != 9)
noteOff(channel);
@@ -1436,30 +1458,30 @@ int AdLibDriver::update_stopChannel(uint8 *&dataptr, Channel &channel, uint8 val
return 2;
}
-int AdLibDriver::update_playRest(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_playRest(const uint8 *&dataptr, Channel &channel, uint8 value) {
setupDuration(value, channel);
noteOff(channel);
return (value != 0);
}
-int AdLibDriver::update_writeAdLib(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_writeAdLib(const uint8 *&dataptr, Channel &channel, uint8 value) {
writeOPL(value, *dataptr++);
return 0;
}
-int AdLibDriver::update_setupNoteAndDuration(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setupNoteAndDuration(const uint8 *&dataptr, Channel &channel, uint8 value) {
setupNote(value, channel);
value = *dataptr++;
setupDuration(value, channel);
return (value != 0);
}
-int AdLibDriver::update_setBaseNote(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setBaseNote(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.baseNote = value;
return 0;
}
-int AdLibDriver::update_setupSecondaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setupSecondaryEffect1(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.unk18 = value;
channel.unk19 = value;
channel.unk20 = channel.unk21 = *dataptr++;
@@ -1483,7 +1505,7 @@ int AdLibDriver::update_setupSecondaryEffect1(uint8 *&dataptr, Channel &channel,
return 0;
}
-int AdLibDriver::update_stopOtherChannel(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_stopOtherChannel(const uint8 *&dataptr, Channel &channel, uint8 value) {
Channel &channel2 = _channels[value];
channel2.duration = 0;
channel2.priority = 0;
@@ -1491,8 +1513,16 @@ int AdLibDriver::update_stopOtherChannel(uint8 *&dataptr, Channel &channel, uint
return 0;
}
-int AdLibDriver::update_waitForEndOfProgram(uint8 *&dataptr, Channel &channel, uint8 value) {
- uint8 *ptr = getProgram(value);
+int AdLibDriver::update_waitForEndOfProgram(const uint8 *&dataptr, Channel &channel, uint8 value) {
+ const uint8 *ptr = getProgram(value);
+
+ // Safety check in case an invalid program is specified. This would make
+ // getProgram return a nullptr and thus cause invalid memory reads.
+ if (!ptr) {
+ debugC(3, kDebugLevelSound, "AdLibDriver::update_waitForEndOfProgram: Invalid program %d specified", value);
+ return 0;
+ }
+
uint8 chan = *ptr;
if (!_channels[chan].dataptr)
@@ -1502,12 +1532,25 @@ int AdLibDriver::update_waitForEndOfProgram(uint8 *&dataptr, Channel &channel, u
return 2;
}
-int AdLibDriver::update_setupInstrument(uint8 *&dataptr, Channel &channel, uint8 value) {
- setupInstrument(_curRegOffset, getInstrument(value), channel);
+int AdLibDriver::update_setupInstrument(const uint8 *&dataptr, Channel &channel, uint8 value) {
+ const uint8 *instrument = getInstrument(value);
+
+ // We add a safety check to avoid setting up invalid instruments. This is
+ // not done in the original. However, to avoid crashes due to invalid
+ // memory reads we simply ignore the request.
+ // This happens, for example, in Hand of Fate when using the swampsnake
+ // potion on Zanthia to scare off the rat in the cave in the first chapter
+ // of the game.
+ if (!instrument) {
+ debugC(3, kDebugLevelSound, "AdLibDriver::update_setupInstrument: Invalid instrument %d specified", value);
+ return 0;
+ }
+
+ setupInstrument(_curRegOffset, instrument, channel);
return 0;
}
-int AdLibDriver::update_setupPrimaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setupPrimaryEffect1(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.unk29 = value;
channel.unk30 = READ_BE_UINT16(dataptr);
dataptr += 2;
@@ -1516,19 +1559,19 @@ int AdLibDriver::update_setupPrimaryEffect1(uint8 *&dataptr, Channel &channel, u
return 0;
}
-int AdLibDriver::update_removePrimaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_removePrimaryEffect1(const uint8 *&dataptr, Channel &channel, uint8 value) {
--dataptr;
channel.primaryEffect = 0;
channel.unk30 = 0;
return 0;
}
-int AdLibDriver::update_setBaseFreq(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setBaseFreq(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.baseFreq = value;
return 0;
}
-int AdLibDriver::update_setupPrimaryEffect2(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setupPrimaryEffect2(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.unk32 = value;
channel.unk33 = *dataptr++;
uint8 temp = *dataptr++;
@@ -1539,12 +1582,12 @@ int AdLibDriver::update_setupPrimaryEffect2(uint8 *&dataptr, Channel &channel, u
return 0;
}
-int AdLibDriver::update_setPriority(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setPriority(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.priority = value;
return 0;
}
-int AdLibDriver::updateCallback23(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::updateCallback23(const uint8 *&dataptr, Channel &channel, uint8 value) {
value >>= 1;
_unkValue1 = _unkValue2 = value;
_callbackTimer = 0xFF;
@@ -1552,7 +1595,7 @@ int AdLibDriver::updateCallback23(uint8 *&dataptr, Channel &channel, uint8 value
return 0;
}
-int AdLibDriver::updateCallback24(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::updateCallback24(const uint8 *&dataptr, Channel &channel, uint8 value) {
if (_unkValue5) {
if (_unkValue4 & value) {
_unkValue5 = 0;
@@ -1568,50 +1611,50 @@ int AdLibDriver::updateCallback24(uint8 *&dataptr, Channel &channel, uint8 value
return 2;
}
-int AdLibDriver::update_setExtraLevel1(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setExtraLevel1(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.opExtraLevel1 = value;
adjustVolume(channel);
return 0;
}
-int AdLibDriver::update_setupDuration(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setupDuration(const uint8 *&dataptr, Channel &channel, uint8 value) {
setupDuration(value, channel);
return (value != 0);
}
-int AdLibDriver::update_playNote(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_playNote(const uint8 *&dataptr, Channel &channel, uint8 value) {
setupDuration(value, channel);
noteOn(channel);
return (value != 0);
}
-int AdLibDriver::update_setFractionalNoteSpacing(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setFractionalNoteSpacing(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.fractionalSpacing = value & 7;
return 0;
}
-int AdLibDriver::update_setTempo(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setTempo(const uint8 *&dataptr, Channel &channel, uint8 value) {
_tempo = value;
return 0;
}
-int AdLibDriver::update_removeSecondaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_removeSecondaryEffect1(const uint8 *&dataptr, Channel &channel, uint8 value) {
--dataptr;
channel.secondaryEffect = 0;
return 0;
}
-int AdLibDriver::update_setChannelTempo(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setChannelTempo(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.tempo = value;
return 0;
}
-int AdLibDriver::update_setExtraLevel3(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setExtraLevel3(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.opExtraLevel3 = value;
return 0;
}
-int AdLibDriver::update_setExtraLevel2(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setExtraLevel2(const uint8 *&dataptr, Channel &channel, uint8 value) {
int channelBackUp = _curChannel;
_curChannel = value;
@@ -1623,7 +1666,7 @@ int AdLibDriver::update_setExtraLevel2(uint8 *&dataptr, Channel &channel, uint8
return 0;
}
-int AdLibDriver::update_changeExtraLevel2(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_changeExtraLevel2(const uint8 *&dataptr, Channel &channel, uint8 value) {
int channelBackUp = _curChannel;
_curChannel = value;
@@ -1638,7 +1681,7 @@ int AdLibDriver::update_changeExtraLevel2(uint8 *&dataptr, Channel &channel, uin
// Apart from initializing to zero, these two functions are the only ones that
// modify _vibratoAndAMDepthBits.
-int AdLibDriver::update_setAMDepth(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setAMDepth(const uint8 *&dataptr, Channel &channel, uint8 value) {
if (value & 1)
_vibratoAndAMDepthBits |= 0x80;
else
@@ -1648,7 +1691,7 @@ int AdLibDriver::update_setAMDepth(uint8 *&dataptr, Channel &channel, uint8 valu
return 0;
}
-int AdLibDriver::update_setVibratoDepth(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setVibratoDepth(const uint8 *&dataptr, Channel &channel, uint8 value) {
if (value & 1)
_vibratoAndAMDepthBits |= 0x40;
else
@@ -1658,13 +1701,13 @@ int AdLibDriver::update_setVibratoDepth(uint8 *&dataptr, Channel &channel, uint8
return 0;
}
-int AdLibDriver::update_changeExtraLevel1(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_changeExtraLevel1(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.opExtraLevel1 += value;
adjustVolume(channel);
return 0;
}
-int AdLibDriver::updateCallback38(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::updateCallback38(const uint8 *&dataptr, Channel &channel, uint8 value) {
int channelBackUp = _curChannel;
_curChannel = value;
@@ -1693,7 +1736,7 @@ int AdLibDriver::updateCallback38(uint8 *&dataptr, Channel &channel, uint8 value
return 0;
}
-int AdLibDriver::updateCallback39(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::updateCallback39(const uint8 *&dataptr, Channel &channel, uint8 value) {
if (_curChannel >= 9)
return 0;
@@ -1714,35 +1757,35 @@ int AdLibDriver::updateCallback39(uint8 *&dataptr, Channel &channel, uint8 value
return 0;
}
-int AdLibDriver::update_removePrimaryEffect2(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_removePrimaryEffect2(const uint8 *&dataptr, Channel &channel, uint8 value) {
--dataptr;
channel.primaryEffect = 0;
return 0;
}
-int AdLibDriver::update_pitchBend(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_pitchBend(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.pitchBend = value;
setupNote(channel.rawNote, channel, true);
return 0;
}
-int AdLibDriver::update_resetToGlobalTempo(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_resetToGlobalTempo(const uint8 *&dataptr, Channel &channel, uint8 value) {
--dataptr;
channel.tempo = _tempo;
return 0;
}
-int AdLibDriver::update_nop(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_nop(const uint8 *&dataptr, Channel &channel, uint8 value) {
--dataptr;
return 0;
}
-int AdLibDriver::update_setDurationRandomness(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setDurationRandomness(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.durationRandomness = value;
return 0;
}
-int AdLibDriver::update_changeChannelTempo(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_changeChannelTempo(const uint8 *&dataptr, Channel &channel, uint8 value) {
int tempo = channel.tempo + (int8)value;
if (tempo <= 0)
@@ -1754,7 +1797,7 @@ int AdLibDriver::update_changeChannelTempo(uint8 *&dataptr, Channel &channel, ui
return 0;
}
-int AdLibDriver::updateCallback46(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::updateCallback46(const uint8 *&dataptr, Channel &channel, uint8 value) {
uint8 entry = *dataptr++;
_tablePtr1 = _unkTable2[entry++];
_tablePtr2 = _unkTable2[entry];
@@ -1765,27 +1808,43 @@ int AdLibDriver::updateCallback46(uint8 *&dataptr, Channel &channel, uint8 value
return 0;
}
-int AdLibDriver::update_setupRhythmSection(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setupRhythmSection(const uint8 *&dataptr, Channel &channel, uint8 value) {
int channelBackUp = _curChannel;
int regOffsetBackUp = _curRegOffset;
_curChannel = 6;
_curRegOffset = _regOffset[6];
- setupInstrument(_curRegOffset, getInstrument(value), channel);
+ const uint8 *instrument;
+ instrument = getInstrument(value);
+ if (instrument) {
+ setupInstrument(_curRegOffset, instrument, channel);
+ } else {
+ debugC(3, kDebugLevelSound, "AdLibDriver::update_setupRhythmSection: Invalid instrument %d for channel 6 specified", value);
+ }
_unkValue6 = channel.opLevel2;
_curChannel = 7;
_curRegOffset = _regOffset[7];
- setupInstrument(_curRegOffset, getInstrument(*dataptr++), channel);
+ instrument = getInstrument(*dataptr++);
+ if (instrument) {
+ setupInstrument(_curRegOffset, instrument, channel);
+ } else {
+ debugC(3, kDebugLevelSound, "AdLibDriver::update_setupRhythmSection: Invalid instrument %d for channel 7 specified", value);
+ }
_unkValue7 = channel.opLevel1;
_unkValue8 = channel.opLevel2;
_curChannel = 8;
_curRegOffset = _regOffset[8];
- setupInstrument(_curRegOffset, getInstrument(*dataptr++), channel);
+ instrument = getInstrument(*dataptr++);
+ if (instrument) {
+ setupInstrument(_curRegOffset, instrument, channel);
+ } else {
+ debugC(3, kDebugLevelSound, "AdLibDriver::update_setupRhythmSection: Invalid instrument %d for channel 8 specified", value);
+ }
_unkValue9 = channel.opLevel1;
_unkValue10 = channel.opLevel2;
@@ -1810,7 +1869,7 @@ int AdLibDriver::update_setupRhythmSection(uint8 *&dataptr, Channel &channel, ui
return 0;
}
-int AdLibDriver::update_playRhythmSection(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_playRhythmSection(const uint8 *&dataptr, Channel &channel, uint8 value) {
// Any instrument that we want to play, and which was already playing,
// is temporarily keyed off. Instruments that were off already, or
// which we don't want to play, retain their old on/off status. This is
@@ -1830,7 +1889,7 @@ int AdLibDriver::update_playRhythmSection(uint8 *&dataptr, Channel &channel, uin
return 0;
}
-int AdLibDriver::update_removeRhythmSection(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_removeRhythmSection(const uint8 *&dataptr, Channel &channel, uint8 value) {
--dataptr;
_rhythmSectionBits = 0;
@@ -1841,7 +1900,7 @@ int AdLibDriver::update_removeRhythmSection(uint8 *&dataptr, Channel &channel, u
return 0;
}
-int AdLibDriver::updateCallback51(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::updateCallback51(const uint8 *&dataptr, Channel &channel, uint8 value) {
uint8 value2 = *dataptr++;
if (value & 1) {
@@ -1882,7 +1941,7 @@ int AdLibDriver::updateCallback51(uint8 *&dataptr, Channel &channel, uint8 value
return 0;
}
-int AdLibDriver::updateCallback52(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::updateCallback52(const uint8 *&dataptr, Channel &channel, uint8 value) {
uint8 value2 = *dataptr++;
if (value & 1) {
@@ -1923,7 +1982,7 @@ int AdLibDriver::updateCallback52(uint8 *&dataptr, Channel &channel, uint8 value
return 0;
}
-int AdLibDriver::updateCallback53(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::updateCallback53(const uint8 *&dataptr, Channel &channel, uint8 value) {
uint8 value2 = *dataptr++;
if (value & 1) {
@@ -1964,17 +2023,17 @@ int AdLibDriver::updateCallback53(uint8 *&dataptr, Channel &channel, uint8 value
return 0;
}
-int AdLibDriver::update_setSoundTrigger(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setSoundTrigger(const uint8 *&dataptr, Channel &channel, uint8 value) {
_soundTrigger = value;
return 0;
}
-int AdLibDriver::update_setTempoReset(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::update_setTempoReset(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.tempoReset = value;
return 0;
}
-int AdLibDriver::updateCallback56(uint8 *&dataptr, Channel &channel, uint8 value) {
+int AdLibDriver::updateCallback56(const uint8 *&dataptr, Channel &channel, uint8 value) {
channel.unk39 = value;
channel.unk40 = *dataptr++;
return 0;
@@ -2487,13 +2546,13 @@ void SoundAdLibPC::internalLoadFile(Common::String file) {
_soundDataPtr = new uint8[soundDataSize];
assert(_soundDataPtr);
- memcpy(_soundDataPtr, p, soundDataSize*sizeof(uint8));
+ memcpy(_soundDataPtr, p, soundDataSize);
delete[] fileData;
fileData = p = 0;
fileSize = 0;
- _driver->setSoundData(_soundDataPtr);
+ _driver->setSoundData(_soundDataPtr, soundDataSize);
_soundFileLoaded = file;
}
diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp
index 57943f9a8d..a6cecc7408 100644
--- a/engines/lastexpress/debug.cpp
+++ b/engines/lastexpress/debug.cpp
@@ -653,7 +653,6 @@ bool Debugger::cmdPlayNis(int argc, const char **argv) {
// Make sure we are not called in a loop
_numParams = 0;
-
// Check if we got a nis filename or an animation index
if (name.contains('.')) {
Animation animation;
@@ -796,7 +795,10 @@ bool Debugger::cmdFight(int argc, const char **argv) {
break;
}
- loadArchive(index);
+ if (!loadArchive(index)) {
+ debugPrintf("Error: failed to load archive %d\n", index);
+ return true;
+ }
// Store command
if (!hasCommand()) {
@@ -854,7 +856,10 @@ error:
bool Debugger::cmdBeetle(int argc, const char **argv) {
if (argc == 1) {
// Load proper data file (beetle game in in Cd2)
- loadArchive(kArchiveCd2);
+ if (!loadArchive(kArchiveCd2)) {
+ debugPrintf("Error: failed to load archive 2");
+ return true;
+ }
// Store command
if (!hasCommand()) {
@@ -924,7 +929,6 @@ bool Debugger::cmdBeetle(int argc, const char **argv) {
break;
}
-
case Common::EVENT_LBUTTONUP:
case Common::EVENT_RBUTTONUP:
// Update coordinates
diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp
index 5393410add..1581916e07 100644
--- a/engines/lastexpress/entities/abbot.cpp
+++ b/engines/lastexpress/entities/abbot.cpp
@@ -415,7 +415,7 @@ IMPLEMENT_FUNCTION(22, Abbot, haveLunch)
break;
case kActionNone:
- Entity::timeCheckSavepoint(kTime1971000, params->param1, kEntityAbbot, kEntityServers0, kAction218586752);
+ Entity::timeCheckSavepoint(kTime1971000, params->param1, kEntityAbbot, kEntityWaiter1, kAction218586752);
if (getState()->time > kTime1989000 && getEntities()->isSomebodyInsideRestaurantOrSalon()) {
getData()->inventoryItem = kItemNone;
@@ -476,7 +476,7 @@ IMPLEMENT_FUNCTION(23, Abbot, leaveLunch)
case 1:
getEntities()->updatePositionExit(kEntityAbbot, kCarRestaurant, 67);
- getSavePoints()->push(kEntityAbbot, kEntityServers0, kAction270068760);
+ getSavePoints()->push(kEntityAbbot, kEntityWaiter1, kAction270068760);
getSavePoints()->push(kEntityAbbot, kEntityAnna, kAction238936000);
getEntities()->drawSequenceRight(kEntityAbbot, "804DS");
@@ -1324,7 +1324,7 @@ IMPLEMENT_FUNCTION(41, Abbot, chapter4Handler)
break;
case kActionNone:
- Entity::timeCheckSavepoint(kTime2358000, params->param1, kEntityAbbot, kEntityServers0, kAction218128129);
+ Entity::timeCheckSavepoint(kTime2358000, params->param1, kEntityAbbot, kEntityWaiter1, kAction218128129);
if (getState()->time > kTime2389500 && getEntities()->isSomebodyInsideRestaurantOrSalon())
setup_leaveDinner();
@@ -1368,7 +1368,7 @@ IMPLEMENT_FUNCTION(42, Abbot, leaveDinner)
case 1:
getEntities()->updatePositionExit(kEntityAbbot, kCarRestaurant, 67);
- getSavePoints()->push(kEntityAbbot, kEntityServers0, kAction270068760);
+ getSavePoints()->push(kEntityAbbot, kEntityWaiter1, kAction270068760);
getEntities()->drawSequenceRight(kEntityAbbot, "804DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
@@ -1779,7 +1779,7 @@ IMPLEMENT_FUNCTION(49, Abbot, catchCath)
getData()->location = kLocationInsideCompartment;
getSavePoints()->call(kEntityAbbot, kEntityTables4, kActionDrawTablesWithChairs, "029G");
- getSavePoints()->push(kEntityAbbot, kEntityServers0, kAction270068760);
+ getSavePoints()->push(kEntityAbbot, kEntityWaiter1, kAction270068760);
getSavePoints()->push(kEntityAbbot, kEntityBoutarel, kAction125039808);
getObjects()->update(kObjectCompartment2, kEntityAbbot, kObjectLocation1, kCursorHandKnock, kCursorHand);
getObjects()->update(kObjectHandleInsideBathroom, kEntityAbbot, kObjectLocation1, kCursorHandKnock, kCursorHand);
diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp
index 9b56fca39f..5ea3ff4898 100644
--- a/engines/lastexpress/entities/alexei.cpp
+++ b/engines/lastexpress/entities/alexei.cpp
@@ -607,7 +607,7 @@ IMPLEMENT_FUNCTION(19, Alexei, returnCompartment)
case 7:
getEntities()->updatePositionExit(kEntityAlexei, kCarRestaurant, 63);
- getSavePoints()->push(kEntityAlexei, kEntityServers1, kAction302996448);
+ getSavePoints()->push(kEntityAlexei, kEntityWaiter2, kAction302996448);
setCallback(8);
setup_draw("934");
diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp
index ff65be9772..3354964af2 100644
--- a/engines/lastexpress/entities/anna.cpp
+++ b/engines/lastexpress/entities/anna.cpp
@@ -907,7 +907,7 @@ IMPLEMENT_FUNCTION(23, Anna, waitingDinner)
case kActionDefault:
getEntities()->drawSequenceLeft(kEntityAnna, "001D");
- getSavePoints()->push(kEntityAnna, kEntityServers0, kAction270410280);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter1, kAction270410280);
getSavePoints()->push(kEntityAnna, kEntityTables0, kAction136455232);
setCallback(1);
@@ -931,7 +931,7 @@ IMPLEMENT_FUNCTION(23, Anna, waitingDinner)
break;
case 3:
- getSavePoints()->push(kEntityAnna, kEntityServers0, kAction203859488);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter1, kAction203859488);
setup_waitingDinner2();
break;
}
@@ -964,7 +964,7 @@ IMPLEMENT_FUNCTION(24, Anna, waitingDinner2)
break;
case 2:
- getSavePoints()->push(kEntityAnna, kEntityServers0, kAction136702400);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter1, kAction136702400);
setup_eatingDinner();
break;
}
@@ -1034,7 +1034,7 @@ IMPLEMENT_FUNCTION(26, Anna, leaveDinner)
case 1:
getEntities()->updatePositionExit(kEntityAnna, kCarRestaurant, 62);
- getSavePoints()->push(kEntityAnna, kEntityServers0, kAction237485916);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter1, kAction237485916);
getEntities()->drawSequenceRight(kEntityAnna, "801DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
@@ -2145,7 +2145,7 @@ label_callback_4:
break;
case 2:
- getSavePoints()->push(kEntityAnna, kEntityServers0, kAction218983616);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter1, kAction218983616);
break;
case 3:
@@ -2285,7 +2285,7 @@ IMPLEMENT_FUNCTION(51, Anna, afterLunch)
getData()->location = kLocationInsideCompartment;
getEntities()->drawSequenceLeft(kEntityAnna, "112B");
getEntities()->updatePositionExit(kEntityAnna, kCarRestaurant, 57);
- getSavePoints()->push(kEntityAnna, kEntityServers1, kAction219377792);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter2, kAction219377792);
break;
case 2:
@@ -3473,7 +3473,7 @@ IMPLEMENT_FUNCTION(69, Anna, goSalon4)
case 3:
getData()->location = kLocationInsideCompartment;
getEntities()->drawSequenceLeft(kEntityAnna, "127B");
- getSavePoints()->push(kEntityAnna, kEntityServers1, kAction258136010);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter2, kAction258136010);
break;
case 4:
diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp
index c5029537ad..14dcf200f0 100644
--- a/engines/lastexpress/entities/august.cpp
+++ b/engines/lastexpress/entities/august.cpp
@@ -452,11 +452,17 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool)
}
if (params->param1) {
- strcpy((char *)&parameters->seq2, Common::String::format("%s%s", (char *)&parameters->seq1, "Gc").c_str());
+ Common::String sequence = Common::String::format("%s%s", (char *)&parameters->seq1, "Gc");
+ assert(sequence.size() <= 13);
+
+ strcpy((char *)&parameters->seq2, sequence.c_str());
getObjects()->update(kObjectCompartment3, kEntityPlayer, kObjectLocation1, kCursorKeepValue, kCursorKeepValue);
} else {
- strcpy((char *)&parameters->seq2, Common::String::format("%s%s", (char *)&parameters->seq1, "Ec").c_str());
+ Common::String sequence = Common::String::format("%s%s", (char *)&parameters->seq1, "Ec");
+ assert(sequence.size() <= 13);
+
+ strcpy((char *)&parameters->seq2, sequence.c_str());
}
setCallback(1);
@@ -484,15 +490,22 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool)
setCallback(2);
setup_playSound("AUG2094");
}
+
}
break;
case 2:
- case 3:
+ case 3: {
getSavePoints()->push(kEntityAugust, kEntityMertens, kAction269436673);
- strcpy((char *)&parameters->seq2, Common::String::format("%s%s", (char *)&parameters->seq1, "Qc").c_str());
+
+ Common::String sequence = Common::String::format("%s%s", (char *)&parameters->seq1, "Qc");
+ assert(sequence.size() <= 13);
+
+ strcpy((char *)&parameters->seq2, sequence.c_str());
getEntities()->drawSequenceLeft(kEntityAugust, (char *)&parameters->seq2);
+
+ }
break;
}
break;
@@ -1162,7 +1175,7 @@ IMPLEMENT_FUNCTION(25, August, chapter1Handler)
break;
case 1:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction204704037);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction204704037);
getEntities()->drawSequenceRight(kEntityAugust, "803DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
getEntities()->updateFrame(kEntityAugust);
@@ -1195,7 +1208,7 @@ IMPLEMENT_FUNCTION(25, August, chapter1Handler)
break;
case 5:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction204704037);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction204704037);
getEntities()->drawSequenceRight(kEntityAugust, "803DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
getEntities()->updateFrame(kEntityAugust);
@@ -1366,7 +1379,7 @@ IMPLEMENT_FUNCTION(28, August, function28)
params->param1 = kItemInvalid;
getEntities()->drawSequenceLeft(kEntityAugust, "010B");
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction304061224);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction304061224);
getData()->inventoryItem = (InventoryItem)params->param1;
break;
@@ -1376,13 +1389,13 @@ IMPLEMENT_FUNCTION(28, August, function28)
break;
case 1:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction203859488);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction203859488);
getData()->inventoryItem = (InventoryItem)params->param1;
getEntities()->drawSequenceLeft(kEntityAugust, "010B");
break;
case 2:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction136702400);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction136702400);
getEntities()->drawSequenceLeft(kEntityAugust, "010B");
setup_function29();
break;
@@ -1399,7 +1412,7 @@ IMPLEMENT_FUNCTION(28, August, function28)
case kAction170016384:
getData()->inventoryItem = kItemNone;
- getEntities()->drawSequenceLeft(kEntityServers0, "BLANK");
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "BLANK");
getEntities()->drawSequenceLeft(kEntityAugust, "010G");
setCallback(2);
@@ -1551,7 +1564,7 @@ IMPLEMENT_FUNCTION(30, August, restaurant)
break;
case 3:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction292758554);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction292758554);
getSavePoints()->push(kEntityAugust, kEntityAnna, kAction122358304);
getEntities()->drawSequenceLeft(kEntityAugust, "001K");
getSound()->playSound(kEntityAugust, "AUG1003");
@@ -1815,7 +1828,7 @@ IMPLEMENT_FUNCTION(36, August, chapter2Handler)
break;
case kActionNone:
- Entity::timeCheckSavepoint(kTime1755000, params->param2, kEntityAugust, kEntityServers0, kAction252568704);
+ Entity::timeCheckSavepoint(kTime1755000, params->param2, kEntityAugust, kEntityWaiter1, kAction252568704);
if (getState()->time > kTime1773000 && params->param1 && getEntities()->isSomebodyInsideRestaurantOrSalon()) {
getData()->inventoryItem = kItemNone;
@@ -1863,7 +1876,7 @@ IMPLEMENT_FUNCTION(36, August, chapter2Handler)
break;
case 3:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction286534136);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction286534136);
setCallback(4);
setup_updateEntity(kCarGreenSleeping, kPosition_6470);
@@ -1882,7 +1895,7 @@ IMPLEMENT_FUNCTION(36, August, chapter2Handler)
if (!getEvent(kEventAugustGoodMorning))
getData()->inventoryItem = kItemInvalid;
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction219522616);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction219522616);
getEntities()->drawSequenceLeft(kEntityAugust, "016B");
params->param1 = 1;
break;
@@ -3044,7 +3057,7 @@ IMPLEMENT_FUNCTION(60, August, function60)
}
if (pushSavepoint)
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction207330561);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction207330561);
if (!params->param1)
break;
@@ -3074,7 +3087,7 @@ IMPLEMENT_FUNCTION(60, August, function60)
break;
case 2:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction286403504);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction286403504);
setup_function61();
break;
}
@@ -3199,7 +3212,7 @@ IMPLEMENT_FUNCTION(62, August, function62)
case 5:
getEntities()->drawSequenceLeft(kEntityAugust, "122B");
- getSavePoints()->push(kEntityAugust, kEntityServers1, kAction291721418);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter2, kAction291721418);
break;
}
break;
diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp
index 979381afb0..32507b0d63 100644
--- a/engines/lastexpress/entities/boutarel.cpp
+++ b/engines/lastexpress/entities/boutarel.cpp
@@ -310,7 +310,7 @@ IMPLEMENT_FUNCTION_I(14, Boutarel, function14, bool)
break;
case 2:
- getSavePoints()->push(kEntityBoutarel, kEntityServers1, kAction326144276);
+ getSavePoints()->push(kEntityBoutarel, kEntityWaiter2, kAction326144276);
getEntities()->drawSequenceRight(kEntityBoutarel, "812DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
getEntities()->updateFrame(kEntityBoutarel);
@@ -674,7 +674,7 @@ IMPLEMENT_FUNCTION(20, Boutarel, function20)
break;
case 2:
- getSavePoints()->push(kEntityBoutarel, kEntityServers1, kAction256200848);
+ getSavePoints()->push(kEntityBoutarel, kEntityWaiter2, kAction256200848);
break;
case 3:
@@ -937,7 +937,7 @@ IMPLEMENT_FUNCTION(29, Boutarel, function29)
case kActionNone:
if (Entity::updateParameter(params->param2, getState()->time, 450)) {
- getSavePoints()->push(kEntityBoutarel, kEntityServers1, kAction256200848);
+ getSavePoints()->push(kEntityBoutarel, kEntityWaiter2, kAction256200848);
}
if (!params->param1)
@@ -1086,7 +1086,7 @@ IMPLEMENT_FUNCTION(33, Boutarel, function33)
break;
case 2:
- getSavePoints()->push(kEntityBoutarel, kEntityServers1, kAction256200848);
+ getSavePoints()->push(kEntityBoutarel, kEntityWaiter2, kAction256200848);
break;
case 3:
diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp
index fe977a577f..f1a7d02384 100644
--- a/engines/lastexpress/entities/chapters.cpp
+++ b/engines/lastexpress/entities/chapters.cpp
@@ -44,13 +44,13 @@
#include "lastexpress/entities/pascale.h"
#include "lastexpress/entities/rebecca.h"
#include "lastexpress/entities/salko.h"
-#include "lastexpress/entities/servers0.h"
-#include "lastexpress/entities/servers1.h"
#include "lastexpress/entities/sophie.h"
#include "lastexpress/entities/tatiana.h"
#include "lastexpress/entities/vassili.h"
#include "lastexpress/entities/verges.h"
#include "lastexpress/entities/vesna.h"
+#include "lastexpress/entities/waiter1.h"
+#include "lastexpress/entities/waiter2.h"
#include "lastexpress/entities/yasmin.h"
#include "lastexpress/game/action.h"
@@ -77,7 +77,7 @@ Chapters::Chapters(LastExpressEngine *engine) : Entity(engine, kEntityChapters)
ADD_CALLBACK_FUNCTION(Chapters, exitStation);
ADD_CALLBACK_FUNCTION(Chapters, chapter1);
ADD_CALLBACK_FUNCTION(Chapters, resetMainEntities);
- ADD_CALLBACK_FUNCTION(Chapters, chapter1End);
+ ADD_CALLBACK_FUNCTION(Chapters, firstDream);
ADD_CALLBACK_FUNCTION(Chapters, chapter1Init);
ADD_CALLBACK_FUNCTION(Chapters, chapter1Handler);
ADD_CALLBACK_FUNCTION(Chapters, chapter1Next);
@@ -154,7 +154,8 @@ IMPLEMENT_FUNCTION(5, Chapters, resetMainEntities)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(6, Chapters, chapter1End)
+IMPLEMENT_FUNCTION(6, Chapters, firstDream)
+ // Chapter 1 end
switch (savepoint.action) {
default:
break;
@@ -207,9 +208,9 @@ IMPLEMENT_FUNCTION(6, Chapters, chapter1End)
case kActionDefault:
RESET_ENTITY_STATE(kEntityPascale, Pascale, setup_function19);
- RESET_ENTITY_STATE(kEntityServers0, Servers0, setup_function22);
- RESET_ENTITY_STATE(kEntityServers1, Servers1, setup_function16);
- RESET_ENTITY_STATE(kEntityCooks, Cooks, setup_function7);
+ RESET_ENTITY_STATE(kEntityWaiter1, Waiter1, setup_function22);
+ RESET_ENTITY_STATE(kEntityWaiter2, Waiter2, setup_function16);
+ RESET_ENTITY_STATE(kEntityCooks, Cooks, setup_lockUp);
RESET_ENTITY_STATE(kEntityMertens, Mertens, setup_function42);
RESET_ENTITY_STATE(kEntityCoudert, Coudert, setup_chapter1Handler);
@@ -220,7 +221,7 @@ IMPLEMENT_FUNCTION(6, Chapters, chapter1End)
getSavePoints()->push(kEntityChapters, kEntityVerges, kAction201431954);
RESET_ENTITY_STATE(kEntityKronos, Kronos, setup_function10);
- RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_function13);
+ RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_cathDone);
RESET_ENTITY_STATE(kEntityAnna, Anna, setup_asleep);
RESET_ENTITY_STATE(kEntityAugust, August, setup_function34);
RESET_ENTITY_STATE(kEntityTatiana, Tatiana, setup_function24);
@@ -270,7 +271,6 @@ IMPLEMENT_FUNCTION(6, Chapters, chapter1End)
if (getSoundQueue()->isBuffered("ZFX1007B"))
getSoundQueue()->processEntry("ZFX1007B");
-
getSound()->playSound(kEntityPlayer, "MUS008", kFlagDefault);
getInventory()->unselectItem();
@@ -385,6 +385,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(8, Chapters, chapter1Handler)
+ // Moving at night
switch (savepoint.action) {
default:
break;
@@ -705,7 +706,7 @@ label_chapter1_next:
setup_chapter1Next();
} else {
setCallback(23);
- setup_chapter1End();
+ setup_firstDream();
}
break;
}
@@ -918,6 +919,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(15, Chapters, chapter3Handler)
+ // Moving during the afternoon
switch (savepoint.action) {
default:
break;
@@ -1078,6 +1080,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(16, Chapters, viennaEvents)
+ // End in Vienna
switch (savepoint.action) {
default:
break;
@@ -1225,6 +1228,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(19, Chapters, chapter4Handler)
+ // Moving during the second night
switch (savepoint.action) {
default:
break;
@@ -1518,8 +1522,8 @@ label_callback_4:
RESET_ENTITY_STATE(kEntityAugust, August, setup_function65);
RESET_ENTITY_STATE(kEntityMertens, Mertens, setup_function48);
RESET_ENTITY_STATE(kEntityCoudert, Coudert, setup_function53);
- RESET_ENTITY_STATE(kEntityServers0, Servers0, setup_chapter4Handler);
- RESET_ENTITY_STATE(kEntityServers1, Servers1, setup_chapter4Handler);
+ RESET_ENTITY_STATE(kEntityWaiter1, Waiter1, setup_serving4);
+ RESET_ENTITY_STATE(kEntityWaiter2, Waiter2, setup_serving4);
RESET_ENTITY_STATE(kEntityPascale, Pascale, setup_chapter4Handler);
RESET_ENTITY_STATE(kEntityVerges, Verges, setup_chapter4Handler);
RESET_ENTITY_STATE(kEntityTatiana, Tatiana, setup_function49);
@@ -1535,12 +1539,12 @@ label_callback_4:
RESET_ENTITY_STATE(kEntityYasmin, Yasmin, setup_function17);
RESET_ENTITY_STATE(kEntityHadija, Hadija, setup_function19);
RESET_ENTITY_STATE(kEntityAlouan, Alouan, setup_function19);
- RESET_ENTITY_STATE(kEntityMax, Max, setup_chapter4Handler);
+ RESET_ENTITY_STATE(kEntityMax, Max, setup_inCageFriendly);
getSavePoints()->push(kEntityChapters, kEntityAnna, kAction201431954);
getSavePoints()->push(kEntityChapters, kEntityMertens, kAction201431954);
getSavePoints()->push(kEntityChapters, kEntityCoudert, kAction201431954);
- getSavePoints()->push(kEntityChapters, kEntityServers0, kAction201431954);
- getSavePoints()->push(kEntityChapters, kEntityServers1, kAction201431954);
+ getSavePoints()->push(kEntityChapters, kEntityWaiter1, kAction201431954);
+ getSavePoints()->push(kEntityChapters, kEntityWaiter2, kAction201431954);
getSavePoints()->push(kEntityChapters, kEntityPascale, kAction201431954);
getSavePoints()->push(kEntityChapters, kEntityVerges, kAction201431954);
@@ -1754,7 +1758,6 @@ IMPLEMENT_FUNCTION(22, Chapters, chapter5Handler)
}
IMPLEMENT_FUNCTION_END
-
//////////////////////////////////////////////////////////////////////////
// Private functions
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/lastexpress/entities/chapters.h b/engines/lastexpress/entities/chapters.h
index 39739aa92e..abc464845f 100644
--- a/engines/lastexpress/entities/chapters.h
+++ b/engines/lastexpress/entities/chapters.h
@@ -70,7 +70,7 @@ public:
/**
* Handle end of Chapter 1 events
*/
- DECLARE_FUNCTION(chapter1End)
+ DECLARE_FUNCTION(firstDream)
/**
* Init Chapter 1 data
diff --git a/engines/lastexpress/entities/cooks.cpp b/engines/lastexpress/entities/cooks.cpp
index e24180e58d..749e93999b 100644
--- a/engines/lastexpress/entities/cooks.cpp
+++ b/engines/lastexpress/entities/cooks.cpp
@@ -37,17 +37,17 @@ namespace LastExpress {
Cooks::Cooks(LastExpressEngine *engine) : Entity(engine, kEntityCooks) {
ADD_CALLBACK_FUNCTION(Cooks, draw);
ADD_CALLBACK_FUNCTION(Cooks, playSound);
- ADD_CALLBACK_FUNCTION(Cooks, function3);
- ADD_CALLBACK_FUNCTION(Cooks, function4);
+ ADD_CALLBACK_FUNCTION(Cooks, uptrainVersion);
+ ADD_CALLBACK_FUNCTION(Cooks, downtrainVersion);
ADD_CALLBACK_FUNCTION(Cooks, chapter1);
- ADD_CALLBACK_FUNCTION(Cooks, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Cooks, function7);
+ ADD_CALLBACK_FUNCTION(Cooks, inKitchenDinner);
+ ADD_CALLBACK_FUNCTION(Cooks, lockUp);
ADD_CALLBACK_FUNCTION(Cooks, chapter2);
- ADD_CALLBACK_FUNCTION(Cooks, chapter2Handler);
+ ADD_CALLBACK_FUNCTION(Cooks, inKitchenBreakfast);
ADD_CALLBACK_FUNCTION(Cooks, chapter3);
- ADD_CALLBACK_FUNCTION(Cooks, chapter3Handler);
+ ADD_CALLBACK_FUNCTION(Cooks, inKitchenLunch);
ADD_CALLBACK_FUNCTION(Cooks, chapter4);
- ADD_CALLBACK_FUNCTION(Cooks, chapter4Handler);
+ ADD_CALLBACK_FUNCTION(Cooks, inKitchenDinner2);
ADD_CALLBACK_FUNCTION(Cooks, chapter5);
}
@@ -62,7 +62,7 @@ IMPLEMENT_FUNCTION_S(2, Cooks, playSound)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(3, Cooks, function3)
+IMPLEMENT_FUNCTION(3, Cooks, uptrainVersion)
switch (savepoint.action) {
default:
break;
@@ -147,7 +147,7 @@ IMPLEMENT_FUNCTION(3, Cooks, function3)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(4, Cooks, function4)
+IMPLEMENT_FUNCTION(4, Cooks, downtrainVersion)
switch (savepoint.action) {
default:
break;
@@ -239,7 +239,7 @@ IMPLEMENT_FUNCTION(5, Cooks, chapter1)
break;
case kActionNone:
- Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Cooks, setup_chapter1Handler));
+ Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Cooks, setup_inKitchenDinner));
break;
case kActionDefault:
@@ -254,7 +254,7 @@ IMPLEMENT_FUNCTION(5, Cooks, chapter1)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(6, Cooks, chapter1Handler)
+IMPLEMENT_FUNCTION(6, Cooks, inKitchenDinner)
switch (savepoint.action) {
default:
break;
@@ -281,7 +281,7 @@ IMPLEMENT_FUNCTION(6, Cooks, chapter1Handler)
if (params->param1) {
if (getEntities()->isPlayerPosition(kCarRestaurant, 73)) {
setCallback(1);
- setup_function3();
+ setup_uptrainVersion();
}
} else {
if (params->param3) {
@@ -311,7 +311,7 @@ IMPLEMENT_FUNCTION(6, Cooks, chapter1Handler)
break;
case kAction101632192:
- setup_function7();
+ setup_lockUp();
break;
case kAction224849280:
@@ -322,7 +322,7 @@ IMPLEMENT_FUNCTION(6, Cooks, chapter1Handler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(7, Cooks, function7)
+IMPLEMENT_FUNCTION(7, Cooks, lockUp)
switch (savepoint.action) {
default:
break;
@@ -350,7 +350,7 @@ IMPLEMENT_FUNCTION(8, Cooks, chapter2)
break;
case kActionNone:
- setup_chapter2Handler();
+ setup_inKitchenBreakfast();
break;
case kActionDefault:
@@ -368,7 +368,7 @@ IMPLEMENT_FUNCTION(8, Cooks, chapter2)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(9, Cooks, chapter2Handler)
+IMPLEMENT_FUNCTION(9, Cooks, inKitchenBreakfast)
switch (savepoint.action) {
default:
break;
@@ -411,7 +411,7 @@ IMPLEMENT_FUNCTION(10, Cooks, chapter3)
break;
case kActionNone:
- setup_chapter3Handler();
+ setup_inKitchenLunch();
break;
case kActionDefault:
@@ -428,7 +428,7 @@ IMPLEMENT_FUNCTION(10, Cooks, chapter3)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(11, Cooks, chapter3Handler)
+IMPLEMENT_FUNCTION(11, Cooks, inKitchenLunch)
switch (savepoint.action) {
default:
break;
@@ -459,7 +459,7 @@ IMPLEMENT_FUNCTION(11, Cooks, chapter3Handler)
if (params->param1) {
if (getEntities()->isPlayerPosition(kCarRestaurant, 80)) {
setCallback(1);
- setup_function4();
+ setup_downtrainVersion();
}
} else {
if (params->param3) {
@@ -502,7 +502,7 @@ IMPLEMENT_FUNCTION(12, Cooks, chapter4)
break;
case kActionNone:
- setup_chapter4Handler();
+ setup_inKitchenDinner2();
break;
case kActionDefault:
@@ -520,7 +520,7 @@ IMPLEMENT_FUNCTION(12, Cooks, chapter4)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(13, Cooks, chapter4Handler)
+IMPLEMENT_FUNCTION(13, Cooks, inKitchenDinner2)
switch (savepoint.action) {
default:
break;
@@ -553,7 +553,6 @@ IMPLEMENT_FUNCTION(13, Cooks, chapter4Handler)
}
break;
-
case kActionCallback:
// Play the next part of background sound
if (getCallback() == 1 || getCallback() == 2) {
diff --git a/engines/lastexpress/entities/cooks.h b/engines/lastexpress/entities/cooks.h
index 79addb0a02..6a65a25801 100644
--- a/engines/lastexpress/entities/cooks.h
+++ b/engines/lastexpress/entities/cooks.h
@@ -48,9 +48,9 @@ public:
*/
DECLARE_FUNCTION_1(playSound, const char *filename)
- DECLARE_FUNCTION(function3)
+ DECLARE_FUNCTION(uptrainVersion)
- DECLARE_FUNCTION(function4)
+ DECLARE_FUNCTION(downtrainVersion)
/**
* Setup Chapter 1
@@ -58,21 +58,21 @@ public:
DECLARE_FUNCTION(chapter1)
/**
- * Handle Chapter 1 events
+ * Chapter 1: Prepare dinner in kitchen
*/
- DECLARE_FUNCTION(chapter1Handler)
+ DECLARE_FUNCTION(inKitchenDinner)
- DECLARE_FUNCTION(function7)
+ DECLARE_FUNCTION(lockUp)
/**
* Setup Chapter 2
*/
DECLARE_FUNCTION(chapter2)
- /**
- * Handle Chapter 2 events
+ /*
+ * Chapter 2: Prepare breakfast in kitchen
*/
- DECLARE_FUNCTION(chapter2Handler)
+ DECLARE_FUNCTION(inKitchenBreakfast)
/**
* Setup Chapter 3
@@ -80,9 +80,9 @@ public:
DECLARE_FUNCTION(chapter3)
/**
- * Handle Chapter 3 events
+ * Chapter 3: Prepare lunch in kitchen
*/
- DECLARE_FUNCTION(chapter3Handler)
+ DECLARE_FUNCTION(inKitchenLunch)
/**
* Setup Chapter 4
@@ -90,9 +90,9 @@ public:
DECLARE_FUNCTION(chapter4)
/**
- * Handle Chapter 4 events
+ * Chapter 4: Prepare second dinner in kitchen
*/
- DECLARE_FUNCTION(chapter4Handler)
+ DECLARE_FUNCTION(inKitchenDinner2)
/**
* Setup Chapter 5
diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp
index 07e82d296e..170248de52 100644
--- a/engines/lastexpress/entities/entity.cpp
+++ b/engines/lastexpress/entities/entity.cpp
@@ -51,6 +51,9 @@ EntityData::EntityCallData::~EntityCallData() {
}
void EntityData::EntityCallData::syncString(Common::Serializer &s, Common::String &string, uint length) const {
+ assert(length <= 13);
+ assert(string.size() <= 13);
+
char seqName[13];
memset(&seqName, 0, length);
@@ -972,5 +975,4 @@ bool Entity::timeCheckPlaySoundUpdatePosition(TimeValue timeValue, uint &paramet
return false;
}
-
} // End of namespace LastExpress
diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp
index 7b31c592cd..b628b8dfe7 100644
--- a/engines/lastexpress/entities/gendarmes.cpp
+++ b/engines/lastexpress/entities/gendarmes.cpp
@@ -37,16 +37,16 @@ namespace LastExpress {
Gendarmes::Gendarmes(LastExpressEngine *engine) : Entity(engine, kEntityGendarmes) {
ADD_CALLBACK_FUNCTION(Gendarmes, reset);
ADD_CALLBACK_FUNCTION(Gendarmes, chapter1);
- ADD_CALLBACK_FUNCTION(Gendarmes, arrestDraw);
- ADD_CALLBACK_FUNCTION(Gendarmes, arrestPlaysound);
- ADD_CALLBACK_FUNCTION(Gendarmes, arrestPlaysound16);
- ADD_CALLBACK_FUNCTION(Gendarmes, arrestCallback);
+ ADD_CALLBACK_FUNCTION(Gendarmes, doDraw);
+ ADD_CALLBACK_FUNCTION(Gendarmes, doDialog);
+ ADD_CALLBACK_FUNCTION(Gendarmes, doDialogFullVolume);
+ ADD_CALLBACK_FUNCTION(Gendarmes, doWait);
ADD_CALLBACK_FUNCTION(Gendarmes, savegame);
- ADD_CALLBACK_FUNCTION(Gendarmes, arrestUpdateEntity);
- ADD_CALLBACK_FUNCTION(Gendarmes, function9);
- ADD_CALLBACK_FUNCTION(Gendarmes, function10);
+ ADD_CALLBACK_FUNCTION(Gendarmes, doWalk);
+ ADD_CALLBACK_FUNCTION(Gendarmes, doCompartment);
+ ADD_CALLBACK_FUNCTION(Gendarmes, trappedCath);
ADD_CALLBACK_FUNCTION(Gendarmes, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Gendarmes, function12);
+ ADD_CALLBACK_FUNCTION(Gendarmes, searchTrain);
ADD_CALLBACK_FUNCTION(Gendarmes, function13);
ADD_CALLBACK_FUNCTION(Gendarmes, chapter2);
ADD_CALLBACK_FUNCTION(Gendarmes, chapter3);
@@ -76,23 +76,23 @@ IMPLEMENT_FUNCTION(2, Gendarmes, chapter1)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(3, Gendarmes, arrestDraw)
- arrest(savepoint);
+IMPLEMENT_FUNCTION_S(3, Gendarmes, doDraw)
+ handleAction(savepoint);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(4, Gendarmes, arrestPlaysound)
- arrest(savepoint, true);
+IMPLEMENT_FUNCTION_S(4, Gendarmes, doDialog)
+ handleAction(savepoint, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(5, Gendarmes, arrestPlaysound16)
- arrest(savepoint, true, kFlagDefault);
+IMPLEMENT_FUNCTION_S(5, Gendarmes, doDialogFullVolume)
+ handleAction(savepoint, true, kFlagDefault);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_I(6, Gendarmes, arrestCallback, uint32)
- arrest(savepoint, true, kFlagInvalid, true);
+IMPLEMENT_FUNCTION_I(6, Gendarmes, doWait, uint32)
+ handleAction(savepoint, true, kFlagInvalid, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
@@ -101,12 +101,12 @@ IMPLEMENT_FUNCTION_II(7, Gendarmes, savegame, SavegameType, uint32)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_II(8, Gendarmes, arrestUpdateEntity, CarIndex, EntityPosition)
- arrest(savepoint, true, kFlagInvalid, false, true);
+IMPLEMENT_FUNCTION_II(8, Gendarmes, doWalk, CarIndex, EntityPosition)
+ handleAction(savepoint, true, kFlagInvalid, false, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition)
+IMPLEMENT_FUNCTION_IISS(9, Gendarmes, doCompartment, CarIndex, EntityPosition)
EntityData::EntityParametersSSS *parameters1 = (EntityData::EntityParametersSSS*)_data->getCurrentParameters(1);
EntityData::EntityParametersISII *parameters2 = (EntityData::EntityParametersISII*)_data->getCurrentParameters(2);
@@ -169,6 +169,9 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition)
strcpy((char *)&parameters1->seq3, "632F");
}
+ // The sequence 3 string needs to be a maximum of 9 characters, leaving 5 characters after the initial setup
+ assert(Common::String(params->seq1).size() <= 5);
+
strcat((char *)&parameters1->seq1, (char *)&params->seq1);
strcat((char *)&parameters1->seq2, (char *)&params->seq1);
strcat((char *)&parameters1->seq3, (char *)&params->seq1);
@@ -178,13 +181,13 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition)
|| (params->param1 == kCarGreenSleeping && params->param2 == kPosition_8200 && getEntities()->isOutsideAlexeiWindow()))
&& !getEntities()->isInsideCompartment(kEntityPlayer, kCarRedSleeping, kPosition_7850)) {
setCallback(1);
- setup_function10((CarIndex)params->param1, (EntityPosition)params->param2, (ObjectIndex)parameters2->param5);
+ setup_trappedCath((CarIndex)params->param1, (EntityPosition)params->param2, (ObjectIndex)parameters2->param5);
} else {
getEntities()->drawSequenceLeft(kEntityGendarmes, (char *)&parameters1->seq1);
getEntities()->enterCompartment(kEntityGendarmes, (ObjectIndex)CURRENT_PARAM(2, 5));
setCallback(parameters2->param6 ? 2 : 3);
- setup_arrestPlaysound(parameters2->param6 ? "POL1044A" : "POL1044B");
+ setup_doDialog(parameters2->param6 ? "POL1044A" : "POL1044B");
}
break;
@@ -202,14 +205,14 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition)
getEntities()->drawSequenceLeft(kEntityGendarmes, (char *)&parameters1->seq2);
if (getEntities()->isNobodyInCompartment((CarIndex)params->param1, (EntityPosition)params->param2) || !strcmp(params->seq2, "NODIALOG")) {
setCallback(4);
- setup_arrestCallback(150);
+ setup_doWait(150);
} else {
char *arrestSound = (char *)&parameters2->seq;
strcpy(arrestSound, "POL1045");
strcat(arrestSound, (char *)&params->seq2);
setCallback(5);
- setup_arrestPlaysound(arrestSound);
+ setup_doDialog(arrestSound);
}
break;
@@ -226,7 +229,7 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition)
getData()->location = kLocationInsideCompartment;
setCallback(6);
- setup_arrestDraw((char *)&parameters1->seq3);
+ setup_doDraw((char *)&parameters1->seq3);
break;
case 6:
@@ -240,7 +243,7 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, ObjectIndex)
+IMPLEMENT_FUNCTION_III(10, Gendarmes, trappedCath, CarIndex, EntityPosition, ObjectIndex)
switch (savepoint.action) {
default:
break;
@@ -287,7 +290,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje
getObjects()->update((ObjectIndex)params->param3, kEntityGendarmes, getObjects()->get((ObjectIndex)params->param3).status, kCursorNormal, kCursorNormal);
setCallback(5);
- setup_arrestPlaysound16("POL1046B");
+ setup_doDialogFullVolume("POL1046B");
break;
case kActionOpenDoor:
@@ -299,7 +302,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje
getObjects()->update((ObjectIndex)params->param3, kEntityGendarmes, getObjects()->get((ObjectIndex)params->param3).status, kCursorNormal, kCursorNormal);
setCallback(1);
- setup_arrestPlaysound16("POL1046");
+ setup_doDialogFullVolume("POL1046");
break;
case kActionCallback:
@@ -351,12 +354,12 @@ IMPLEMENT_FUNCTION_END
IMPLEMENT_FUNCTION(11, Gendarmes, chapter1Handler)
if (savepoint.action == kAction169499649) {
getSavePoints()->push(kEntityGendarmes, kEntityMertens, kAction190082817);
- setup_function12();
+ setup_searchTrain();
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(12, Gendarmes, function12)
+IMPLEMENT_FUNCTION(12, Gendarmes, searchTrain)
switch (savepoint.action) {
default:
break;
@@ -369,7 +372,7 @@ IMPLEMENT_FUNCTION(12, Gendarmes, function12)
getProgress().field_14 = 29;
setCallback(1);
- setup_arrestUpdateEntity(kCarGreenSleeping, kPosition_5540);
+ setup_doWalk(kCarGreenSleeping, kPosition_5540);
break;
case kActionCallback:
@@ -379,42 +382,42 @@ IMPLEMENT_FUNCTION(12, Gendarmes, function12)
case 1:
setCallback(2);
- setup_function9(kCarGreenSleeping, kPosition_5790, "d", "A");
+ setup_doCompartment(kCarGreenSleeping, kPosition_5790, "d", "A");
break;
case 2:
setCallback(3);
- setup_arrestUpdateEntity(kCarGreenSleeping, kPosition_6220);
+ setup_doWalk(kCarGreenSleeping, kPosition_6220);
break;
case 3:
setCallback(4);
- setup_function9(kCarGreenSleeping, kPosition_6470, "c", "B");
+ setup_doCompartment(kCarGreenSleeping, kPosition_6470, "c", "B");
break;
case 4:
setCallback(5);
- setup_arrestUpdateEntity(kCarGreenSleeping, kPosition_7250);
+ setup_doWalk(kCarGreenSleeping, kPosition_7250);
break;
case 5:
setCallback(6);
- setup_function9(kCarGreenSleeping, kPosition_7500, "b", "C");
+ setup_doCompartment(kCarGreenSleeping, kPosition_7500, "b", "C");
break;
case 6:
setCallback(7);
- setup_arrestUpdateEntity(kCarGreenSleeping, kPosition_7950);
+ setup_doWalk(kCarGreenSleeping, kPosition_7950);
break;
case 7:
setCallback(8);
- setup_function9(kCarGreenSleeping, kPosition_8200, "a", "NODIALOG");
+ setup_doCompartment(kCarGreenSleeping, kPosition_8200, "a", "NODIALOG");
break;
case 8:
setCallback(9);
- setup_arrestUpdateEntity(kCarGreenSleeping, kPosition_9460);
+ setup_doWalk(kCarGreenSleeping, kPosition_9460);
break;
case 9:
@@ -427,77 +430,77 @@ IMPLEMENT_FUNCTION(12, Gendarmes, function12)
}
setCallback(10);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_2490);
+ setup_doWalk(kCarRedSleeping, kPosition_2490);
break;
case 10:
setCallback(11);
- setup_function9(kCarRedSleeping, kPosition_2740, "h", "NODIALOG");
+ setup_doCompartment(kCarRedSleeping, kPosition_2740, "h", "NODIALOG");
break;
case 11:
setCallback(12);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_3820);
+ setup_doWalk(kCarRedSleeping, kPosition_3820);
break;
case 12:
setCallback(13);
- setup_function9(kCarRedSleeping, kPosition_4070, "f", "E");
+ setup_doCompartment(kCarRedSleeping, kPosition_4070, "f", "E");
break;
case 13:
setCallback(14);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_4590);
+ setup_doWalk(kCarRedSleeping, kPosition_4590);
break;
case 14:
setCallback(15);
- setup_function9(kCarRedSleeping, kPosition_4840, "e", "F");
+ setup_doCompartment(kCarRedSleeping, kPosition_4840, "e", "F");
break;
case 15:
setCallback(16);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_5540);
+ setup_doWalk(kCarRedSleeping, kPosition_5540);
break;
case 16:
setCallback(17);
- setup_function9(kCarRedSleeping, kPosition_5790, "d", "G");
+ setup_doCompartment(kCarRedSleeping, kPosition_5790, "d", "G");
break;
case 17:
setCallback(18);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_6220);
+ setup_doWalk(kCarRedSleeping, kPosition_6220);
break;
case 18:
setCallback(19);
- setup_function9(kCarRedSleeping, kPosition_6470, "c", "H");
+ setup_doCompartment(kCarRedSleeping, kPosition_6470, "c", "H");
break;
case 19:
setCallback(20);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_7250);
+ setup_doWalk(kCarRedSleeping, kPosition_7250);
break;
case 20:
setCallback(21);
- setup_function9(kCarRedSleeping, kPosition_7500, "b", "J");
+ setup_doCompartment(kCarRedSleeping, kPosition_7500, "b", "J");
break;
case 21:
setCallback(22);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_7950);
+ setup_doWalk(kCarRedSleeping, kPosition_7950);
break;
case 22:
setCallback(23);
- setup_function9(kCarRedSleeping, kPosition_8200, "a", "NODIALOG");
+ setup_doCompartment(kCarRedSleeping, kPosition_8200, "a", "NODIALOG");
break;
case 23:
setCallback(24);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_9460);
+ setup_doWalk(kCarRedSleeping, kPosition_9460);
break;
case 24:
@@ -544,7 +547,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
// Private functions
//////////////////////////////////////////////////////////////////////////
-void Gendarmes::arrest(const SavePoint &savepoint, bool shouldPlaySound, SoundFlag flag, bool checkCallback, bool shouldUpdateEntity) {
+void Gendarmes::handleAction(const SavePoint &savepoint, bool shouldPlaySound, SoundFlag flag, bool checkCallback, bool shouldUpdateEntity) {
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/gendarmes.h b/engines/lastexpress/entities/gendarmes.h
index 8475c50799..1cde626a22 100644
--- a/engines/lastexpress/entities/gendarmes.h
+++ b/engines/lastexpress/entities/gendarmes.h
@@ -46,10 +46,10 @@ public:
*/
DECLARE_FUNCTION(chapter1)
- DECLARE_FUNCTION_1(arrestDraw, const char *sequence)
- DECLARE_FUNCTION_1(arrestPlaysound, const char *soundName)
- DECLARE_FUNCTION_1(arrestPlaysound16, const char *soundName)
- DECLARE_FUNCTION_1(arrestCallback, uint32 timeValue)
+ DECLARE_FUNCTION_1(doDraw, const char *sequence)
+ DECLARE_FUNCTION_1(doDialog, const char *soundName)
+ DECLARE_FUNCTION_1(doDialogFullVolume, const char *soundName)
+ DECLARE_FUNCTION_1(doWait, uint32 timeValue)
/**
* Saves the game
@@ -59,11 +59,11 @@ public:
*/
DECLARE_FUNCTION_2(savegame, SavegameType savegameType, uint32 param)
- DECLARE_FUNCTION_2(arrestUpdateEntity, CarIndex car, EntityPosition entityPosition)
- DECLARE_FUNCTION_4(function9, CarIndex car, EntityPosition entityPosition, const char *sequence1, const char *sequence2)
- DECLARE_FUNCTION_3(function10, CarIndex car, EntityPosition entityPosition, ObjectIndex object)
+ DECLARE_FUNCTION_2(doWalk, CarIndex car, EntityPosition entityPosition)
+ DECLARE_FUNCTION_4(doCompartment, CarIndex car, EntityPosition entityPosition, const char *sequence1, const char *sequence2)
+ DECLARE_FUNCTION_3(trappedCath, CarIndex car, EntityPosition entityPosition, ObjectIndex object)
DECLARE_FUNCTION(chapter1Handler)
- DECLARE_FUNCTION(function12)
+ DECLARE_FUNCTION(searchTrain)
DECLARE_FUNCTION(function13)
/**
@@ -87,7 +87,7 @@ public:
DECLARE_FUNCTION(chapter5)
private:
- void arrest(const SavePoint &savepoint, bool playSound = false, SoundFlag flag = kFlagInvalid, bool checkCallback = false, bool shouldUpdateEntity = false);
+ void handleAction(const SavePoint &savepoint, bool playSound = false, SoundFlag flag = kFlagInvalid, bool checkCallback = false, bool shouldUpdateEntity = false);
};
} // End of namespace LastExpress
diff --git a/engines/lastexpress/entities/hadija.cpp b/engines/lastexpress/entities/hadija.cpp
index 14d5b714ca..eb255d77f8 100644
--- a/engines/lastexpress/entities/hadija.cpp
+++ b/engines/lastexpress/entities/hadija.cpp
@@ -38,10 +38,10 @@ Hadija::Hadija(LastExpressEngine *engine) : Entity(engine, kEntityHadija) {
ADD_CALLBACK_FUNCTION(Hadija, playSound);
ADD_CALLBACK_FUNCTION(Hadija, updateFromTime);
ADD_CALLBACK_FUNCTION(Hadija, updateEntity);
- ADD_CALLBACK_FUNCTION(Hadija, compartment6);
- ADD_CALLBACK_FUNCTION(Hadija, compartment8);
- ADD_CALLBACK_FUNCTION(Hadija, compartment6to8);
- ADD_CALLBACK_FUNCTION(Hadija, compartment8to6);
+ ADD_CALLBACK_FUNCTION(Hadija, peekF);
+ ADD_CALLBACK_FUNCTION(Hadija, peekH);
+ ADD_CALLBACK_FUNCTION(Hadija, goFtoH);
+ ADD_CALLBACK_FUNCTION(Hadija, goHtoF);
ADD_CALLBACK_FUNCTION(Hadija, chapter1);
ADD_CALLBACK_FUNCTION(Hadija, chapter1Handler);
ADD_CALLBACK_FUNCTION(Hadija, function12);
@@ -55,7 +55,7 @@ Hadija::Hadija(LastExpressEngine *engine) : Entity(engine, kEntityHadija) {
ADD_CALLBACK_FUNCTION(Hadija, chapter5);
ADD_CALLBACK_FUNCTION(Hadija, chapter5Handler);
ADD_CALLBACK_FUNCTION(Hadija, function22);
- ADD_CALLBACK_FUNCTION(Hadija, function23);
+ ADD_CALLBACK_FUNCTION(Hadija, hiding);
ADD_NULL_FUNCTION();
}
@@ -85,22 +85,22 @@ IMPLEMENT_FUNCTION_II(5, Hadija, updateEntity, CarIndex, EntityPosition)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(6, Hadija, compartment6)
+IMPLEMENT_FUNCTION(6, Hadija, peekF)
Entity::goToCompartment(savepoint, kObjectCompartment6, kPosition_4070, "619Cf", "619Df");
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(7, Hadija, compartment8)
+IMPLEMENT_FUNCTION(7, Hadija, peekH)
Entity::goToCompartment(savepoint, kObjectCompartment8, kPosition_2740, "619Ch", "619Dh");
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(8, Hadija, compartment6to8)
+IMPLEMENT_FUNCTION(8, Hadija, goFtoH)
Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment6, kPosition_4070, "619Bf", kObjectCompartment8, kPosition_2740, "619Ah");
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(9, Hadija, compartment8to6)
+IMPLEMENT_FUNCTION(9, Hadija, goHtoF)
Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment8, kPosition_2740, "619Bh", kObjectCompartment6, kPosition_4070, "619Af");
IMPLEMENT_FUNCTION_END
@@ -134,7 +134,7 @@ IMPLEMENT_FUNCTION(11, Hadija, chapter1Handler)
break;
label_callback1:
- if (Entity::timeCheckCallback(kTime1084500, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6to8)))
+ if (Entity::timeCheckCallback(kTime1084500, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_goFtoH)))
break;
label_callback2:
@@ -147,7 +147,7 @@ label_callback2:
if (!params->param3) {
setCallback(3);
- setup_compartment8();
+ setup_peekH();
return;
}
}
@@ -159,11 +159,11 @@ label_callback2:
params->param3 = kTimeInvalid;
setCallback(3);
- setup_compartment8();
+ setup_peekH();
}
label_callback3:
- if (Entity::timeCheckCallback(kTime1156500, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6)))
+ if (Entity::timeCheckCallback(kTime1156500, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF)))
break;
label_callback4:
@@ -175,7 +175,7 @@ label_callback4:
if (!params->param5) {
setCallback(5);
- setup_compartment6();
+ setup_peekF();
return;
}
}
@@ -187,7 +187,7 @@ label_callback4:
params->param5 = kTimeInvalid;
setCallback(5);
- setup_compartment6();
+ setup_peekF();
}
break;
@@ -254,7 +254,7 @@ IMPLEMENT_FUNCTION(14, Hadija, chapter2Handler)
}
if (params->param2 == kTimeInvalid || getState()->time <= kTime1786500) {
- Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6));
+ Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF));
break;
}
@@ -264,7 +264,7 @@ IMPLEMENT_FUNCTION(14, Hadija, chapter2Handler)
params->param2 = (uint)getState()->time + 75;
if (params->param2 >= getState()->time) {
- Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6));
+ Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF));
break;
}
}
@@ -272,7 +272,7 @@ IMPLEMENT_FUNCTION(14, Hadija, chapter2Handler)
params->param2 = kTimeInvalid;
setCallback(1);
- setup_compartment8();
+ setup_peekH();
break;
case kActionCallback:
@@ -281,7 +281,7 @@ IMPLEMENT_FUNCTION(14, Hadija, chapter2Handler)
break;
case 1:
- Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6));
+ Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF));
break;
case 2:
@@ -321,24 +321,24 @@ IMPLEMENT_FUNCTION(16, Hadija, chapter3Handler)
break;
case kActionNone:
- if (Entity::timeCheckCallback(kTime1998000, params->param1, 1, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6to8)))
+ if (Entity::timeCheckCallback(kTime1998000, params->param1, 1, WRAP_SETUP_FUNCTION(Hadija, setup_goFtoH)))
break;
label_callback1:
- if (Entity::timeCheckCallback(kTime2020500, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6)))
+ if (Entity::timeCheckCallback(kTime2020500, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF)))
break;
label_callback2:
- if (Entity::timeCheckCallback(kTime2079000, params->param3, 3, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6to8)))
+ if (Entity::timeCheckCallback(kTime2079000, params->param3, 3, WRAP_SETUP_FUNCTION(Hadija, setup_goFtoH)))
break;
label_callback3:
- if (Entity::timeCheckCallback(kTime2187000, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6)))
+ if (Entity::timeCheckCallback(kTime2187000, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF)))
break;
label_callback4:
if (params->param5 != kTimeInvalid && getState()->time > kTime2196000) {
- if (Entity::timeCheckCar(kTime2254500, params->param5, 5, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6)))
+ if (Entity::timeCheckCar(kTime2254500, params->param5, 5, WRAP_SETUP_FUNCTION(Hadija, setup_peekF)))
break;
}
break;
@@ -394,21 +394,21 @@ IMPLEMENT_FUNCTION(18, Hadija, chapter4Handler)
case kActionNone:
if (params->param1 != kTimeInvalid) {
- if (Entity::timeCheckCar(kTime1714500, params->param1, 1, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6)))
+ if (Entity::timeCheckCar(kTime1714500, params->param1, 1, WRAP_SETUP_FUNCTION(Hadija, setup_peekF)))
break;
}
label_callback1:
- if (Entity::timeCheckCallback(kTime2367000, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6to8)))
+ if (Entity::timeCheckCallback(kTime2367000, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_goFtoH)))
break;
label_callback2:
- if (Entity::timeCheckCallback(kTime2421000, params->param3, 3, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6)))
+ if (Entity::timeCheckCallback(kTime2421000, params->param3, 3, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF)))
break;
label_callback3:
if (params->param4 != kTimeInvalid && getState()->time > kTime2425500) {
- if (Entity::timeCheckCar(kTime2484000, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6)))
+ if (Entity::timeCheckCar(kTime2484000, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_peekF)))
break;
}
break;
@@ -483,7 +483,7 @@ IMPLEMENT_FUNCTION(22, Hadija, function22)
if (!Entity::updateParameter(params->param1, getState()->time, 2700))
break;
- setup_function23();
+ setup_hiding();
break;
case kActionDefault:
@@ -494,14 +494,14 @@ IMPLEMENT_FUNCTION(22, Hadija, function22)
case kActionDrawScene:
if (getEntities()->isInsideTrainCar(kEntityPlayer, kCarGreenSleeping)) {
- setup_function23();
+ setup_hiding();
}
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(23, Hadija, function23)
+IMPLEMENT_FUNCTION(23, Hadija, hiding)
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/hadija.h b/engines/lastexpress/entities/hadija.h
index 8e92dc6891..a66aa33628 100644
--- a/engines/lastexpress/entities/hadija.h
+++ b/engines/lastexpress/entities/hadija.h
@@ -70,10 +70,10 @@ public:
*/
DECLARE_FUNCTION_2(updateEntity, CarIndex car, EntityPosition entityPosition)
- DECLARE_FUNCTION(compartment6)
- DECLARE_FUNCTION(compartment8)
- DECLARE_FUNCTION(compartment6to8)
- DECLARE_FUNCTION(compartment8to6)
+ DECLARE_FUNCTION(peekF)
+ DECLARE_FUNCTION(peekH)
+ DECLARE_FUNCTION(goFtoH)
+ DECLARE_FUNCTION(goHtoF)
/**
* Setup Chapter 1
@@ -130,7 +130,7 @@ public:
DECLARE_FUNCTION(chapter5Handler)
DECLARE_FUNCTION(function22)
- DECLARE_FUNCTION(function23)
+ DECLARE_FUNCTION(hiding)
DECLARE_NULL_FUNCTION()
};
diff --git a/engines/lastexpress/entities/ivo.cpp b/engines/lastexpress/entities/ivo.cpp
index b7697d0c52..12a23e7d37 100644
--- a/engines/lastexpress/entities/ivo.cpp
+++ b/engines/lastexpress/entities/ivo.cpp
@@ -47,29 +47,29 @@ Ivo::Ivo(LastExpressEngine *engine) : Entity(engine, kEntityIvo) {
ADD_CALLBACK_FUNCTION(Ivo, playSound);
ADD_CALLBACK_FUNCTION(Ivo, callbackActionRestaurantOrSalon);
ADD_CALLBACK_FUNCTION(Ivo, savegame);
- ADD_CALLBACK_FUNCTION(Ivo, function11);
+ ADD_CALLBACK_FUNCTION(Ivo, goCompartment);
ADD_CALLBACK_FUNCTION(Ivo, sitAtTableWithSalko);
ADD_CALLBACK_FUNCTION(Ivo, leaveTableWithSalko);
ADD_CALLBACK_FUNCTION(Ivo, chapter1);
ADD_CALLBACK_FUNCTION(Ivo, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Ivo, function16);
+ ADD_CALLBACK_FUNCTION(Ivo, inCompartment);
ADD_CALLBACK_FUNCTION(Ivo, function17);
ADD_CALLBACK_FUNCTION(Ivo, chapter2);
- ADD_CALLBACK_FUNCTION(Ivo, function19);
- ADD_CALLBACK_FUNCTION(Ivo, function20);
+ ADD_CALLBACK_FUNCTION(Ivo, goBreakfast);
+ ADD_CALLBACK_FUNCTION(Ivo, atBreakfast);
ADD_CALLBACK_FUNCTION(Ivo, function21);
ADD_CALLBACK_FUNCTION(Ivo, chapter3);
ADD_CALLBACK_FUNCTION(Ivo, chapter3Handler);
ADD_CALLBACK_FUNCTION(Ivo, chapter4);
ADD_CALLBACK_FUNCTION(Ivo, chapter4Handler);
- ADD_CALLBACK_FUNCTION(Ivo, function26);
- ADD_CALLBACK_FUNCTION(Ivo, function27);
- ADD_CALLBACK_FUNCTION(Ivo, function28);
+ ADD_CALLBACK_FUNCTION(Ivo, returnCompartment4);
+ ADD_CALLBACK_FUNCTION(Ivo, inCompartment4);
+ ADD_CALLBACK_FUNCTION(Ivo, hiding);
ADD_CALLBACK_FUNCTION(Ivo, function29);
ADD_CALLBACK_FUNCTION(Ivo, chapter5);
ADD_CALLBACK_FUNCTION(Ivo, chapter5Handler);
- ADD_CALLBACK_FUNCTION(Ivo, fight);
- ADD_CALLBACK_FUNCTION(Ivo, function33);
+ ADD_CALLBACK_FUNCTION(Ivo, fightCath);
+ ADD_CALLBACK_FUNCTION(Ivo, knockedOut);
ADD_CALLBACK_FUNCTION(Ivo, function34);
}
@@ -129,7 +129,7 @@ IMPLEMENT_FUNCTION_II(10, Ivo, savegame, SavegameType, uint32)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(11, Ivo, function11)
+IMPLEMENT_FUNCTION(11, Ivo, goCompartment)
switch (savepoint.action) {
default:
break;
@@ -279,12 +279,12 @@ IMPLEMENT_FUNCTION(15, Ivo, chapter1Handler)
case 1:
setCallback(2);
- setup_function11();
+ setup_goCompartment();
break;
case 2:
getSavePoints()->push(kEntityIvo, kEntityMilos, kAction135024800);
- setup_function16();
+ setup_inCompartment();
break;
}
break;
@@ -297,7 +297,7 @@ IMPLEMENT_FUNCTION(15, Ivo, chapter1Handler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(16, Ivo, function16)
+IMPLEMENT_FUNCTION(16, Ivo, inCompartment)
switch (savepoint.action) {
default:
break;
@@ -371,7 +371,7 @@ IMPLEMENT_FUNCTION(18, Ivo, chapter2)
break;
case kActionNone:
- Entity::timeCheck(kTime1777500, params->param1, WRAP_SETUP_FUNCTION(Ivo, setup_function19));
+ Entity::timeCheck(kTime1777500, params->param1, WRAP_SETUP_FUNCTION(Ivo, setup_goBreakfast));
break;
case kActionDefault:
@@ -391,7 +391,7 @@ IMPLEMENT_FUNCTION(18, Ivo, chapter2)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(19, Ivo, function19)
+IMPLEMENT_FUNCTION(19, Ivo, goBreakfast)
switch (savepoint.action) {
default:
break;
@@ -434,7 +434,7 @@ IMPLEMENT_FUNCTION(19, Ivo, function19)
case 5:
getData()->location = kLocationInsideCompartment;
- setup_function20();
+ setup_atBreakfast();
break;
}
break;
@@ -447,7 +447,7 @@ IMPLEMENT_FUNCTION(19, Ivo, function19)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(20, Ivo, function20)
+IMPLEMENT_FUNCTION(20, Ivo, atBreakfast)
switch (savepoint.action) {
default:
break;
@@ -464,7 +464,7 @@ IMPLEMENT_FUNCTION(20, Ivo, function20)
break;
case kActionDefault:
- getSavePoints()->push(kEntityIvo, kEntityServers1, kAction189688608);
+ getSavePoints()->push(kEntityIvo, kEntityWaiter2, kAction189688608);
getEntities()->drawSequenceLeft(kEntityIvo, "023B");
break;
@@ -474,18 +474,18 @@ IMPLEMENT_FUNCTION(20, Ivo, function20)
break;
case 1:
- getSavePoints()->push(kEntityIvo, kEntityServers1, kAction101106391);
+ getSavePoints()->push(kEntityIvo, kEntityWaiter2, kAction101106391);
getEntities()->drawSequenceLeft(kEntityIvo, "023B");
params->param1 = 1;
break;
case 2:
setCallback(3);
- setup_function11();
+ setup_goCompartment();
break;
case 3:
- getSavePoints()->push(kEntityIvo, kEntityServers1, kAction236237423);
+ getSavePoints()->push(kEntityIvo, kEntityWaiter2, kAction236237423);
setup_function21();
break;
}
@@ -567,7 +567,7 @@ IMPLEMENT_FUNCTION(25, Ivo, chapter4Handler)
case kActionNone:
if (getState()->time > kTime2361600 && getEntities()->isSomebodyInsideRestaurantOrSalon()) {
getData()->location = kLocationOutsideCompartment;
- setup_function26();
+ setup_returnCompartment4();
}
break;
@@ -579,7 +579,7 @@ IMPLEMENT_FUNCTION(25, Ivo, chapter4Handler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(26, Ivo, function26)
+IMPLEMENT_FUNCTION(26, Ivo, returnCompartment4)
switch (savepoint.action) {
default:
break;
@@ -596,11 +596,11 @@ IMPLEMENT_FUNCTION(26, Ivo, function26)
case 1:
setCallback(2);
- setup_function11();
+ setup_goCompartment();
break;
case 2:
- setup_function27();
+ setup_inCompartment4();
break;
}
break;
@@ -608,7 +608,7 @@ IMPLEMENT_FUNCTION(26, Ivo, function26)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(27, Ivo, function27)
+IMPLEMENT_FUNCTION(27, Ivo, inCompartment4)
switch (savepoint.action) {
default:
break;
@@ -634,7 +634,7 @@ IMPLEMENT_FUNCTION(27, Ivo, function27)
case 2:
getEntities()->clearSequences(kEntityIvo);
- setup_function28();
+ setup_hiding();
break;
case 3:
@@ -676,7 +676,7 @@ IMPLEMENT_FUNCTION(27, Ivo, function27)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(28, Ivo, function28)
+IMPLEMENT_FUNCTION(28, Ivo, hiding)
switch (savepoint.action) {
default:
break;
@@ -745,11 +745,11 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(31, Ivo, chapter5Handler)
if (savepoint.action == kActionProceedChapter5)
- setup_fight();
+ setup_fightCath();
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(32, Ivo, fight)
+IMPLEMENT_FUNCTION(32, Ivo, fightCath)
switch (savepoint.action) {
default:
break;
@@ -783,7 +783,7 @@ IMPLEMENT_FUNCTION(32, Ivo, fight)
getLogic()->gameOver(kSavegameTypeIndex, 0, kSceneNone, true);
} else {
getScenes()->loadSceneFromPosition(kCarBaggageRear, 96);
- setup_function33();
+ setup_knockedOut();
}
break;
}
@@ -792,7 +792,7 @@ IMPLEMENT_FUNCTION(32, Ivo, fight)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(33, Ivo, function33)
+IMPLEMENT_FUNCTION(33, Ivo, knockedOut)
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/ivo.h b/engines/lastexpress/entities/ivo.h
index a23d06cd3f..3646bc19f2 100644
--- a/engines/lastexpress/entities/ivo.h
+++ b/engines/lastexpress/entities/ivo.h
@@ -102,7 +102,7 @@ public:
*/
DECLARE_FUNCTION_2(savegame, SavegameType savegameType, uint32 param)
- DECLARE_FUNCTION(function11)
+ DECLARE_FUNCTION(goCompartment)
DECLARE_FUNCTION(sitAtTableWithSalko)
DECLARE_FUNCTION(leaveTableWithSalko)
@@ -116,7 +116,7 @@ public:
*/
DECLARE_FUNCTION(chapter1Handler)
- DECLARE_FUNCTION(function16)
+ DECLARE_FUNCTION(inCompartment)
DECLARE_FUNCTION(function17)
/**
@@ -124,8 +124,8 @@ public:
*/
DECLARE_FUNCTION(chapter2)
- DECLARE_FUNCTION(function19)
- DECLARE_FUNCTION(function20)
+ DECLARE_FUNCTION(goBreakfast)
+ DECLARE_FUNCTION(atBreakfast)
DECLARE_FUNCTION(function21)
/**
@@ -148,9 +148,9 @@ public:
*/
DECLARE_FUNCTION(chapter4Handler)
- DECLARE_FUNCTION(function26)
- DECLARE_FUNCTION(function27)
- DECLARE_FUNCTION(function28)
+ DECLARE_FUNCTION(returnCompartment4)
+ DECLARE_FUNCTION(inCompartment4)
+ DECLARE_FUNCTION(hiding)
DECLARE_FUNCTION(function29)
/**
@@ -163,8 +163,8 @@ public:
*/
DECLARE_FUNCTION(chapter5Handler)
- DECLARE_FUNCTION(fight)
- DECLARE_FUNCTION(function33)
+ DECLARE_FUNCTION(fightCath)
+ DECLARE_FUNCTION(knockedOut)
DECLARE_FUNCTION(function34)
};
diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp
index b7af87751f..bbb2853721 100644
--- a/engines/lastexpress/entities/kahina.cpp
+++ b/engines/lastexpress/entities/kahina.cpp
@@ -43,28 +43,28 @@ Kahina::Kahina(LastExpressEngine *engine) : Entity(engine, kEntityKahina) {
ADD_CALLBACK_FUNCTION(Kahina, savegame);
ADD_CALLBACK_FUNCTION(Kahina, updateFromTime);
ADD_CALLBACK_FUNCTION(Kahina, updateFromTicks);
- ADD_CALLBACK_FUNCTION(Kahina, function6);
+ ADD_CALLBACK_FUNCTION(Kahina, lookingForCath);
ADD_CALLBACK_FUNCTION(Kahina, updateEntity2);
ADD_CALLBACK_FUNCTION(Kahina, updateEntity);
ADD_CALLBACK_FUNCTION(Kahina, enterExitCompartment);
ADD_CALLBACK_FUNCTION(Kahina, chapter1);
ADD_CALLBACK_FUNCTION(Kahina, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Kahina, function12);
- ADD_CALLBACK_FUNCTION(Kahina, function13);
+ ADD_CALLBACK_FUNCTION(Kahina, awaitingCath);
+ ADD_CALLBACK_FUNCTION(Kahina, cathDone);
ADD_CALLBACK_FUNCTION(Kahina, function14);
- ADD_CALLBACK_FUNCTION(Kahina, function15);
+ ADD_CALLBACK_FUNCTION(Kahina, searchTrain);
ADD_CALLBACK_FUNCTION(Kahina, chapter2);
- ADD_CALLBACK_FUNCTION(Kahina, chapter2Handler);
+ ADD_CALLBACK_FUNCTION(Kahina, inSeclusionPart2);
ADD_CALLBACK_FUNCTION(Kahina, chapter3);
ADD_CALLBACK_FUNCTION(Kahina, function19);
- ADD_CALLBACK_FUNCTION(Kahina, chapter3Handler);
- ADD_CALLBACK_FUNCTION(Kahina, function21);
- ADD_CALLBACK_FUNCTION(Kahina, function22);
- ADD_CALLBACK_FUNCTION(Kahina, function23);
- ADD_CALLBACK_FUNCTION(Kahina, function24);
- ADD_CALLBACK_FUNCTION(Kahina, function25);
- ADD_CALLBACK_FUNCTION(Kahina, function26);
- ADD_CALLBACK_FUNCTION(Kahina, function27);
+ ADD_CALLBACK_FUNCTION(Kahina, beforeConcert);
+ ADD_CALLBACK_FUNCTION(Kahina, concert);
+ ADD_CALLBACK_FUNCTION(Kahina, finished);
+ ADD_CALLBACK_FUNCTION(Kahina, findFirebird);
+ ADD_CALLBACK_FUNCTION(Kahina, seekCath);
+ ADD_CALLBACK_FUNCTION(Kahina, searchCath);
+ ADD_CALLBACK_FUNCTION(Kahina, searchTatiana);
+ ADD_CALLBACK_FUNCTION(Kahina, killCathAnywhere);
ADD_CALLBACK_FUNCTION(Kahina, chapter4);
ADD_CALLBACK_FUNCTION(Kahina, chapter5);
}
@@ -100,7 +100,7 @@ IMPLEMENT_FUNCTION_NOSETUP(5, Kahina, updateFromTicks)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_I(6, Kahina, function6, TimeValue)
+IMPLEMENT_FUNCTION_I(6, Kahina, lookingForCath, TimeValue)
switch (savepoint.action) {
default:
break;
@@ -270,17 +270,17 @@ IMPLEMENT_FUNCTION(11, Kahina, chapter1Handler)
Entity::timeCheckSavepoint(kTime1107000, params->param1, kEntityKahina, kEntityMertens, kAction238732837);
if (getProgress().eventMertensKronosInvitation)
- setup_function12();
+ setup_awaitingCath();
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(12, Kahina, function12)
+IMPLEMENT_FUNCTION(12, Kahina, awaitingCath)
switch (savepoint.action) {
default:
break;
case kActionNone:
- Entity::timeCheck(kTime1485000, params->param2, WRAP_SETUP_FUNCTION(Kahina, setup_function13));
+ Entity::timeCheck(kTime1485000, params->param2, WRAP_SETUP_FUNCTION(Kahina, setup_cathDone));
break;
case kActionKnock:
@@ -316,13 +316,13 @@ IMPLEMENT_FUNCTION(12, Kahina, function12)
break;
case kAction137685712:
- setup_function13();
+ setup_cathDone();
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(13, Kahina, function13)
+IMPLEMENT_FUNCTION(13, Kahina, cathDone)
switch (savepoint.action) {
default:
break;
@@ -347,7 +347,7 @@ IMPLEMENT_FUNCTION(13, Kahina, function13)
label_callback:
setCallback(1);
- setup_function15();
+ setup_searchTrain();
break;
case kActionDefault:
@@ -387,7 +387,7 @@ IMPLEMENT_FUNCTION(14, Kahina, function14)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(15, Kahina, function15)
+IMPLEMENT_FUNCTION(15, Kahina, searchTrain)
switch (savepoint.action) {
default:
break;
@@ -554,7 +554,7 @@ IMPLEMENT_FUNCTION(16, Kahina, chapter2)
break;
case kActionNone:
- setup_chapter2Handler();
+ setup_inSeclusionPart2();
break;
case kActionDefault:
@@ -573,7 +573,7 @@ IMPLEMENT_FUNCTION(16, Kahina, chapter2)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(17, Kahina, chapter2Handler)
+IMPLEMENT_FUNCTION(17, Kahina, inSeclusionPart2)
switch (savepoint.action) {
default:
break;
@@ -700,7 +700,7 @@ IMPLEMENT_FUNCTION(18, Kahina, chapter3)
break;
case kActionNone:
- setup_chapter3Handler();
+ setup_beforeConcert();
break;
case kActionDefault:
@@ -724,7 +724,7 @@ IMPLEMENT_FUNCTION_II(19, Kahina, function19, CarIndex, EntityPosition)
case kActionNone:
if (getEvent(kEventAnnaBaggageArgument)) {
- RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_function22);
+ RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_finished);
}
if (getEntities()->updateEntity(kEntityKahina, (CarIndex)params->param1, (EntityPosition)params->param2))
@@ -750,7 +750,7 @@ IMPLEMENT_FUNCTION_II(19, Kahina, function19, CarIndex, EntityPosition)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(20, Kahina, chapter3Handler)
+IMPLEMENT_FUNCTION(20, Kahina, beforeConcert)
switch (savepoint.action) {
default:
break;
@@ -781,7 +781,7 @@ label_callback_2:
if (getEntities()->isInKronosSalon(kEntityPlayer))
getScenes()->loadSceneFromPosition(kCarKronos, 87);
- setup_function21();
+ setup_concert();
break;
}
@@ -917,7 +917,7 @@ label_callback_2:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(21, Kahina, function21)
+IMPLEMENT_FUNCTION(21, Kahina, concert)
switch (savepoint.action) {
default:
break;
@@ -930,7 +930,7 @@ IMPLEMENT_FUNCTION(21, Kahina, function21)
if (params->param6 != kTimeInvalid) {
if (Entity::updateParameterTime((TimeValue)params->param3, (getEntities()->isPlayerPosition(kCarKronos, 80) || getEntities()->isPlayerPosition(kCarKronos, 88)), params->param5, 0)) {
setCallback(2);
- setup_function23();
+ setup_findFirebird();
break;
}
}
@@ -961,10 +961,10 @@ label_callback_2:
if (location == kObjectLocation3 || location == kObjectLocation7) {
setCallback(3);
- setup_function25();
+ setup_searchCath();
} else if (location == kObjectLocation1 || location == kObjectLocation2) {
setCallback(4);
- setup_function26();
+ setup_searchTatiana();
}
}
break;
@@ -997,17 +997,17 @@ label_callback_2:
case kAction92186062:
if (params->param1) {
setCallback(1);
- setup_function23();
+ setup_findFirebird();
}
break;
case kAction134611040:
if (getEvent(kEventConcertLeaveWithBriefcase))
- setup_function24();
+ setup_seekCath();
break;
case kAction137503360:
- setup_function22();
+ setup_finished();
break;
case kAction237555748:
@@ -1017,7 +1017,7 @@ label_callback_2:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(22, Kahina, function22)
+IMPLEMENT_FUNCTION(22, Kahina, finished)
switch (savepoint.action) {
default:
break;
@@ -1028,10 +1028,10 @@ IMPLEMENT_FUNCTION(22, Kahina, function22)
if (ENTITY_PARAM(0, 3) || location == kObjectLocation3 || location == kObjectLocation7) {
setCallback(1);
- setup_function25();
+ setup_searchCath();
} else if (location == kObjectLocation2 || location == kObjectLocation1) {
setCallback(2);
- setup_function26();
+ setup_searchTatiana();
}
}
break;
@@ -1050,7 +1050,7 @@ IMPLEMENT_FUNCTION(22, Kahina, function22)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(23, Kahina, function23)
+IMPLEMENT_FUNCTION(23, Kahina, findFirebird)
switch (savepoint.action) {
default:
break;
@@ -1133,7 +1133,7 @@ IMPLEMENT_FUNCTION(23, Kahina, function23)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(24, Kahina, function24)
+IMPLEMENT_FUNCTION(24, Kahina, seekCath)
switch (savepoint.action) {
default:
break;
@@ -1149,12 +1149,12 @@ IMPLEMENT_FUNCTION(24, Kahina, function24)
if (getEntities()->isInsideTrainCar(kEntityPlayer, kCarKronos))
getSavePoints()->push(kEntityKahina, kEntityKronos, kActionOpenDoor);
else
- setup_function27();
+ setup_killCathAnywhere();
break;
case kActionDefault:
setCallback(1);
- setup_function6(kTime2241000);
+ setup_lookingForCath(kTime2241000);
break;
case kActionCallback:
@@ -1170,12 +1170,12 @@ IMPLEMENT_FUNCTION(24, Kahina, function24)
getProgress().field_44 = 0;
- setup_function22();
+ setup_finished();
} else if (ENTITY_PARAM(0, 1)) {
setCallback(2);
setup_savegame(kSavegameTypeEvent, kEventKahinaGunYellow);
} else {
- setup_function27();
+ setup_killCathAnywhere();
}
break;
@@ -1205,13 +1205,13 @@ IMPLEMENT_FUNCTION(24, Kahina, function24)
getProgress().field_44 = 0;
- setup_function22();
+ setup_finished();
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(25, Kahina, function25)
+IMPLEMENT_FUNCTION(25, Kahina, searchCath)
switch (savepoint.action) {
default:
break;
@@ -1369,7 +1369,7 @@ IMPLEMENT_FUNCTION(25, Kahina, function25)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(26, Kahina, function26)
+IMPLEMENT_FUNCTION(26, Kahina, searchTatiana)
switch (savepoint.action) {
default:
break;
@@ -1470,7 +1470,7 @@ IMPLEMENT_FUNCTION(26, Kahina, function26)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(27, Kahina, function27)
+IMPLEMENT_FUNCTION(27, Kahina, killCathAnywhere)
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/kahina.h b/engines/lastexpress/entities/kahina.h
index ee9ccf5c81..15c446c53d 100644
--- a/engines/lastexpress/entities/kahina.h
+++ b/engines/lastexpress/entities/kahina.h
@@ -69,7 +69,7 @@ public:
*/
DECLARE_FUNCTION_NOSETUP(updateFromTicks)
- DECLARE_FUNCTION_1(function6, TimeValue timeValue)
+ DECLARE_FUNCTION_1(lookingForCath, TimeValue timeValue)
/**
* Updates the entity
@@ -105,20 +105,16 @@ public:
*/
DECLARE_FUNCTION(chapter1Handler)
- DECLARE_FUNCTION(function12)
- DECLARE_FUNCTION(function13)
+ DECLARE_FUNCTION(awaitingCath)
+ DECLARE_FUNCTION(cathDone)
DECLARE_FUNCTION(function14)
- DECLARE_FUNCTION(function15)
+ DECLARE_FUNCTION(searchTrain)
/**
* Setup Chapter 2
*/
DECLARE_FUNCTION(chapter2)
-
- /**
- * Handle Chapter 2 events
- */
- DECLARE_FUNCTION(chapter2Handler)
+ DECLARE_FUNCTION(inSeclusionPart2)
/**
* Setup Chapter 3
@@ -133,18 +129,14 @@ public:
*/
DECLARE_FUNCTION_2(function19, CarIndex car, EntityPosition entityPosition)
- /**
- * Handle Chapter 3 events
- */
- DECLARE_FUNCTION(chapter3Handler)
-
- DECLARE_FUNCTION(function21)
- DECLARE_FUNCTION(function22)
- DECLARE_FUNCTION(function23)
- DECLARE_FUNCTION(function24)
- DECLARE_FUNCTION(function25)
- DECLARE_FUNCTION(function26)
- DECLARE_FUNCTION(function27)
+ DECLARE_FUNCTION(beforeConcert)
+ DECLARE_FUNCTION(concert)
+ DECLARE_FUNCTION(finished)
+ DECLARE_FUNCTION(findFirebird)
+ DECLARE_FUNCTION(seekCath)
+ DECLARE_FUNCTION(searchCath)
+ DECLARE_FUNCTION(searchTatiana)
+ DECLARE_FUNCTION(killCathAnywhere)
/**
* Setup Chapter 4
diff --git a/engines/lastexpress/entities/kronos.cpp b/engines/lastexpress/entities/kronos.cpp
index 8bf158943b..1fe478fea9 100644
--- a/engines/lastexpress/entities/kronos.cpp
+++ b/engines/lastexpress/entities/kronos.cpp
@@ -70,21 +70,21 @@ Kronos::Kronos(LastExpressEngine *engine) : Entity(engine, kEntityKronos) {
ADD_CALLBACK_FUNCTION(Kronos, updateFromTicks);
ADD_CALLBACK_FUNCTION(Kronos, chapter1);
ADD_CALLBACK_FUNCTION(Kronos, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Kronos, function9);
+ ADD_CALLBACK_FUNCTION(Kronos, greetCath);
ADD_CALLBACK_FUNCTION(Kronos, function10);
ADD_CALLBACK_FUNCTION(Kronos, function11);
ADD_CALLBACK_FUNCTION(Kronos, chapter2);
ADD_CALLBACK_FUNCTION(Kronos, chapter3);
ADD_CALLBACK_FUNCTION(Kronos, chapter3Handler);
ADD_CALLBACK_FUNCTION(Kronos, function15);
- ADD_CALLBACK_FUNCTION(Kronos, function16);
- ADD_CALLBACK_FUNCTION(Kronos, function17);
- ADD_CALLBACK_FUNCTION(Kronos, function18);
- ADD_CALLBACK_FUNCTION(Kronos, function19);
- ADD_CALLBACK_FUNCTION(Kronos, function20);
- ADD_CALLBACK_FUNCTION(Kronos, function21);
- ADD_CALLBACK_FUNCTION(Kronos, function22);
- ADD_CALLBACK_FUNCTION(Kronos, function23);
+ ADD_CALLBACK_FUNCTION(Kronos, visitSalon);
+ ADD_CALLBACK_FUNCTION(Kronos, returnCompartment);
+ ADD_CALLBACK_FUNCTION(Kronos, preConcert);
+ ADD_CALLBACK_FUNCTION(Kronos, startConcert);
+ ADD_CALLBACK_FUNCTION(Kronos, duringConcert);
+ ADD_CALLBACK_FUNCTION(Kronos, afterConcert);
+ ADD_CALLBACK_FUNCTION(Kronos, awaitingCath);
+ ADD_CALLBACK_FUNCTION(Kronos, finished);
ADD_CALLBACK_FUNCTION(Kronos, chapter4);
ADD_CALLBACK_FUNCTION(Kronos, chapter5);
}
@@ -155,13 +155,13 @@ IMPLEMENT_FUNCTION(8, Kronos, chapter1Handler)
break;
case kAction202621266:
- setup_function9();
+ setup_greetCath();
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(9, Kronos, function9)
+IMPLEMENT_FUNCTION(9, Kronos, greetCath)
switch (savepoint.action) {
default:
break;
@@ -294,7 +294,7 @@ IMPLEMENT_FUNCTION(15, Kronos, function15)
case kActionNone:
if (params->param1 && !getEntities()->isInSalon(kEntityBoutarel)) {
if (Entity::updateParameter(params->param2, getState()->timeTicks, 75)) {
- setup_function16();
+ setup_visitSalon();
break;
}
}
@@ -311,13 +311,13 @@ IMPLEMENT_FUNCTION(15, Kronos, function15)
params->param3 = kTimeInvalid;
if (getEntities()->isInSalon(kEntityPlayer)) {
- setup_function16();
+ setup_visitSalon();
} else {
getSavePoints()->push(kEntityKronos, kEntityAnna, kAction101169422);
getSavePoints()->push(kEntityKronos, kEntityTatiana, kAction101169422);
getSavePoints()->push(kEntityKronos, kEntityAbbot, kAction101169422);
- setup_function18();
+ setup_preConcert();
}
}
break;
@@ -333,7 +333,7 @@ IMPLEMENT_FUNCTION(15, Kronos, function15)
case kActionDrawScene:
if (params->param1 && getEntities()->isPlayerPosition(kCarRestaurant, 51) && !getEntities()->isInSalon(kEntityBoutarel))
- setup_function16();
+ setup_visitSalon();
else
params->param1 = getEntities()->isPlayerPosition(kCarRestaurant, 60)
|| getEntities()->isPlayerPosition(kCarRestaurant, 59)
@@ -345,7 +345,7 @@ IMPLEMENT_FUNCTION(15, Kronos, function15)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(16, Kronos, function16)
+IMPLEMENT_FUNCTION(16, Kronos, visitSalon)
switch (savepoint.action) {
default:
break;
@@ -363,14 +363,14 @@ IMPLEMENT_FUNCTION(16, Kronos, function16)
getSavePoints()->push(kEntityKronos, kEntityAbbot, kAction101169422);
getScenes()->loadSceneFromPosition(kCarRestaurant, 60);
- setup_function17();
+ setup_returnCompartment();
}
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(17, Kronos, function17)
+IMPLEMENT_FUNCTION(17, Kronos, returnCompartment)
switch (savepoint.action) {
default:
break;
@@ -386,13 +386,13 @@ IMPLEMENT_FUNCTION(17, Kronos, function17)
case kActionCallback:
if (getCallback() == 1)
- setup_function18();
+ setup_preConcert();
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(18, Kronos, function18)
+IMPLEMENT_FUNCTION(18, Kronos, preConcert)
switch (savepoint.action) {
default:
break;
@@ -405,7 +405,7 @@ IMPLEMENT_FUNCTION(18, Kronos, function18)
params->param2 = 1;
}
- if (!Entity::timeCheck(kTime2106000, params->param3, WRAP_SETUP_FUNCTION(Kronos, setup_function19))) {
+ if (!Entity::timeCheck(kTime2106000, params->param3, WRAP_SETUP_FUNCTION(Kronos, setup_startConcert))) {
if (params->param1 && getEntities()->isInKronosSanctum(kEntityPlayer)) {
setCallback(1);
setup_savegame(kSavegameTypeEvent, kEventKahinaPunchSuite4);
@@ -429,7 +429,7 @@ IMPLEMENT_FUNCTION(18, Kronos, function18)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(19, Kronos, function19)
+IMPLEMENT_FUNCTION(19, Kronos, startConcert)
switch (savepoint.action) {
default:
break;
@@ -465,7 +465,7 @@ IMPLEMENT_FUNCTION(19, Kronos, function19)
RESET_ENTITY_STATE(kEntityAnna, Anna, setup_concert);
RESET_ENTITY_STATE(kEntityTatiana, Tatiana, setup_function35);
- setup_function20();
+ setup_duringConcert();
break;
}
break;
@@ -473,7 +473,7 @@ IMPLEMENT_FUNCTION(19, Kronos, function19)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(20, Kronos, function20)
+IMPLEMENT_FUNCTION(20, Kronos, duringConcert)
switch (savepoint.action) {
default:
break;
@@ -585,7 +585,7 @@ IMPLEMENT_FUNCTION(20, Kronos, function20)
getSound()->playSound(kEntityPlayer, "BUMP");
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 26);
- setup_function21();
+ setup_afterConcert();
break;
}
@@ -602,7 +602,7 @@ IMPLEMENT_FUNCTION(20, Kronos, function20)
break;
}
- setup_function21();
+ setup_afterConcert();
break;
case kActionOpenDoor:
@@ -668,7 +668,7 @@ IMPLEMENT_FUNCTION(20, Kronos, function20)
getData()->entityPosition = kPosition_6000;
getAction()->playAnimation(kEventConcertLeaveWithBriefcase);
- RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_function21);
+ RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_concert);
getScenes()->loadSceneFromPosition(kCarKronos, 87);
break;
@@ -678,7 +678,7 @@ IMPLEMENT_FUNCTION(20, Kronos, function20)
getSound()->playSound(kEntityPlayer, "BUMP");
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 26);
- setup_function21();
+ setup_afterConcert();
break;
}
break;
@@ -686,7 +686,7 @@ IMPLEMENT_FUNCTION(20, Kronos, function20)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(21, Kronos, function21)
+IMPLEMENT_FUNCTION(21, Kronos, afterConcert)
switch (savepoint.action) {
default:
break;
@@ -703,7 +703,7 @@ IMPLEMENT_FUNCTION(21, Kronos, function21)
getObjects()->update(kObjectCompartmentKronos, kEntityPlayer, kObjectLocation3, kCursorNormal, kCursorNormal);
getSavePoints()->push(kEntityKronos, kEntityRebecca, kAction191668032);
if (!getEvent(kEventConcertLeaveWithBriefcase))
- setup_function22();
+ setup_awaitingCath();
break;
case kActionCallback:
@@ -722,13 +722,13 @@ IMPLEMENT_FUNCTION(21, Kronos, function21)
break;
case kAction235599361:
- setup_function22();
+ setup_awaitingCath();
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(22, Kronos, function22)
+IMPLEMENT_FUNCTION(22, Kronos, awaitingCath)
switch (savepoint.action) {
default:
break;
@@ -791,7 +791,7 @@ IMPLEMENT_FUNCTION(22, Kronos, function22)
getInventory()->removeItem(kItemFirebird);
getInventory()->removeItem(kItemScarf);
- setup_function23();
+ setup_finished();
break;
case 2:
@@ -800,7 +800,7 @@ IMPLEMENT_FUNCTION(22, Kronos, function22)
getInventory()->removeItem(kItemFirebird);
getInventory()->get(kItemFirebird)->location = kObjectLocation5;
- setup_function23();
+ setup_finished();
break;
case 3:
@@ -809,7 +809,7 @@ IMPLEMENT_FUNCTION(22, Kronos, function22)
getAction()->playAnimation(kEventKronosBringEgg);
getScenes()->loadSceneFromPosition(kCarKronos, 87);
getInventory()->addItem(kItemBriefcase);
- setup_function23();
+ setup_finished();
break;
case 4:
@@ -835,12 +835,12 @@ IMPLEMENT_FUNCTION(22, Kronos, function22)
break;
case kAction138085344:
- setup_function23();
+ setup_finished();
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(23, Kronos, function23)
+IMPLEMENT_FUNCTION(23, Kronos, finished)
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/kronos.h b/engines/lastexpress/entities/kronos.h
index 48da419a6e..00564b8ce5 100644
--- a/engines/lastexpress/entities/kronos.h
+++ b/engines/lastexpress/entities/kronos.h
@@ -89,7 +89,7 @@ public:
*/
DECLARE_FUNCTION(chapter1Handler)
- DECLARE_FUNCTION(function9)
+ DECLARE_FUNCTION(greetCath)
DECLARE_FUNCTION(function10)
DECLARE_FUNCTION(function11)
@@ -109,14 +109,14 @@ public:
DECLARE_FUNCTION(chapter3Handler)
DECLARE_FUNCTION(function15)
- DECLARE_FUNCTION(function16)
- DECLARE_FUNCTION(function17)
- DECLARE_FUNCTION(function18)
- DECLARE_FUNCTION(function19)
- DECLARE_FUNCTION(function20)
- DECLARE_FUNCTION(function21)
- DECLARE_FUNCTION(function22)
- DECLARE_FUNCTION(function23)
+ DECLARE_FUNCTION(visitSalon)
+ DECLARE_FUNCTION(returnCompartment)
+ DECLARE_FUNCTION(preConcert)
+ DECLARE_FUNCTION(startConcert)
+ DECLARE_FUNCTION(duringConcert)
+ DECLARE_FUNCTION(afterConcert)
+ DECLARE_FUNCTION(awaitingCath)
+ DECLARE_FUNCTION(finished)
/**
* Setup Chapter 4
diff --git a/engines/lastexpress/entities/max.cpp b/engines/lastexpress/entities/max.cpp
index 1056e7fd7a..d75b6af7f5 100644
--- a/engines/lastexpress/entities/max.cpp
+++ b/engines/lastexpress/entities/max.cpp
@@ -42,16 +42,16 @@ Max::Max(LastExpressEngine *engine) : Entity(engine, kEntityMax) {
ADD_CALLBACK_FUNCTION(Max, draw);
ADD_CALLBACK_FUNCTION(Max, enterExitCompartment);
ADD_CALLBACK_FUNCTION(Max, savegame);
- ADD_CALLBACK_FUNCTION(Max, chapter12_handler);
- ADD_CALLBACK_FUNCTION(Max, function7);
- ADD_CALLBACK_FUNCTION(Max, chapter4Handler);
+ ADD_CALLBACK_FUNCTION(Max, withAnna);
+ ADD_CALLBACK_FUNCTION(Max, guardingCompartment);
+ ADD_CALLBACK_FUNCTION(Max, inCageFriendly);
ADD_CALLBACK_FUNCTION(Max, function9);
ADD_CALLBACK_FUNCTION(Max, chapter1);
ADD_CALLBACK_FUNCTION(Max, chapter2);
ADD_CALLBACK_FUNCTION(Max, chapter3);
ADD_CALLBACK_FUNCTION(Max, chapter3Handler);
- ADD_CALLBACK_FUNCTION(Max, freeFromCage);
- ADD_CALLBACK_FUNCTION(Max, function15);
+ ADD_CALLBACK_FUNCTION(Max, inCageMad);
+ ADD_CALLBACK_FUNCTION(Max, letMeIn);
ADD_CALLBACK_FUNCTION(Max, chapter4);
ADD_CALLBACK_FUNCTION(Max, function17);
ADD_CALLBACK_FUNCTION(Max, chapter5);
@@ -83,7 +83,7 @@ IMPLEMENT_FUNCTION_II(5, Max, savegame, SavegameType, uint32)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(6, Max, chapter12_handler)
+IMPLEMENT_FUNCTION(6, Max, withAnna)
switch (savepoint.action) {
default:
break;
@@ -105,7 +105,7 @@ IMPLEMENT_FUNCTION(6, Max, chapter12_handler)
case kAction71277948:
setCallback(1);
- setup_function7();
+ setup_guardingCompartment();
break;
case kAction158007856:
@@ -118,7 +118,7 @@ IMPLEMENT_FUNCTION(6, Max, chapter12_handler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(7, Max, function7)
+IMPLEMENT_FUNCTION(7, Max, guardingCompartment)
switch (savepoint.action) {
default:
break;
@@ -208,7 +208,7 @@ IMPLEMENT_FUNCTION(7, Max, function7)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(8, Max, chapter4Handler)
+IMPLEMENT_FUNCTION(8, Max, inCageFriendly)
switch (savepoint.action) {
default:
break;
@@ -296,7 +296,7 @@ IMPLEMENT_FUNCTION(9, Max, function9)
setup_functions:
if (getProgress().chapter == kChapter3)
- setup_function15();
+ setup_letMeIn();
if (getProgress().chapter == kChapter4)
setup_function17();
@@ -324,7 +324,7 @@ IMPLEMENT_FUNCTION(10, Max, chapter1)
break;
case kActionNone:
- Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Max, setup_chapter12_handler));
+ Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Max, setup_withAnna));
break;
case kActionDefault:
@@ -343,7 +343,7 @@ IMPLEMENT_FUNCTION(11, Max, chapter2)
break;
case kActionNone:
- setup_chapter12_handler();
+ setup_withAnna();
break;
case kActionDefault:
@@ -413,7 +413,7 @@ IMPLEMENT_FUNCTION(13, Max, chapter3Handler)
case kAction71277948:
setCallback(1);
- setup_function7();
+ setup_guardingCompartment();
break;
case kAction122358304:
@@ -421,7 +421,7 @@ IMPLEMENT_FUNCTION(13, Max, chapter3Handler)
break;
case kActionMaxFreeFromCage:
- setup_freeFromCage();
+ setup_inCageMad();
break;
case kAction158007856:
@@ -437,7 +437,7 @@ IMPLEMENT_FUNCTION(13, Max, chapter3Handler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(14, Max, freeFromCage)
+IMPLEMENT_FUNCTION(14, Max, inCageMad)
switch (savepoint.action) {
default:
break;
@@ -504,7 +504,7 @@ IMPLEMENT_FUNCTION(14, Max, freeFromCage)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(15, Max, function15)
+IMPLEMENT_FUNCTION(15, Max, letMeIn)
switch (savepoint.action) {
default:
break;
@@ -551,7 +551,7 @@ IMPLEMENT_FUNCTION(15, Max, function15)
case kActionMaxFreeFromCage:
getEntities()->exitCompartment(kEntityMax, kObjectCompartmentF, true);
- setup_chapter4Handler();
+ setup_inCageFriendly();
break;
}
IMPLEMENT_FUNCTION_END
@@ -563,7 +563,7 @@ IMPLEMENT_FUNCTION(16, Max, chapter4)
break;
case kActionNone:
- setup_chapter4Handler();
+ setup_inCageFriendly();
break;
case kActionDefault:
@@ -606,7 +606,7 @@ IMPLEMENT_FUNCTION(17, Max, function17)
case kActionMaxFreeFromCage:
getEntities()->exitCompartment(kEntityMax, kObjectCompartmentF, true);
- setup_chapter4Handler();
+ setup_inCageFriendly();
break;
}
IMPLEMENT_FUNCTION_END
diff --git a/engines/lastexpress/entities/max.h b/engines/lastexpress/entities/max.h
index 7b7780742b..e12b4b6dad 100644
--- a/engines/lastexpress/entities/max.h
+++ b/engines/lastexpress/entities/max.h
@@ -70,18 +70,9 @@ public:
*/
DECLARE_FUNCTION_2(savegame, SavegameType savegameType, uint32 param)
- /**
- * Handle Chapter 1 & 2 events
- */
- DECLARE_FUNCTION(chapter12_handler)
-
- DECLARE_FUNCTION(function7)
-
- /**
- * Handle Chapter 4 events
- */
- DECLARE_FUNCTION(chapter4Handler)
-
+ DECLARE_FUNCTION(withAnna)
+ DECLARE_FUNCTION(guardingCompartment)
+ DECLARE_FUNCTION(inCageFriendly)
DECLARE_FUNCTION(function9)
/**
@@ -104,8 +95,8 @@ public:
*/
DECLARE_FUNCTION(chapter3Handler)
- DECLARE_FUNCTION(freeFromCage)
- DECLARE_FUNCTION(function15)
+ DECLARE_FUNCTION(inCageMad)
+ DECLARE_FUNCTION(letMeIn)
/**
* Setup Chapter 4
diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp
index 601187b672..90a397c7cb 100644
--- a/engines/lastexpress/entities/milos.cpp
+++ b/engines/lastexpress/entities/milos.cpp
@@ -722,7 +722,7 @@ IMPLEMENT_FUNCTION(15, Milos, chapter1Handler)
break;
case kActionNone:
- Entity::timeCheckSavepoint(kTime1071000, params->param3, kEntityMilos, kEntityServers1, kAction223002560);
+ Entity::timeCheckSavepoint(kTime1071000, params->param3, kEntityMilos, kEntityWaiter2, kAction223002560);
if (getState()->time > kTime1089000 && getEntities()->isSomebodyInsideRestaurantOrSalon()) {
setup_function16();
@@ -801,7 +801,7 @@ IMPLEMENT_FUNCTION(16, Milos, function16)
break;
case 1:
- getSavePoints()->push(kEntityMilos, kEntityServers1, kAction269485588);
+ getSavePoints()->push(kEntityMilos, kEntityWaiter2, kAction269485588);
getSavePoints()->push(kEntityMilos, kEntityIvo, kAction125242096);
getEntities()->drawSequenceRight(kEntityMilos, "807DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
diff --git a/engines/lastexpress/entities/pascale.cpp b/engines/lastexpress/entities/pascale.cpp
index b6356a0acb..24b7f0409b 100644
--- a/engines/lastexpress/entities/pascale.cpp
+++ b/engines/lastexpress/entities/pascale.cpp
@@ -46,29 +46,29 @@ Pascale::Pascale(LastExpressEngine *engine) : Entity(engine, kEntityPascale) {
ADD_CALLBACK_FUNCTION(Pascale, welcomeSophieAndRebecca);
ADD_CALLBACK_FUNCTION(Pascale, sitSophieAndRebecca);
ADD_CALLBACK_FUNCTION(Pascale, welcomeCath);
- ADD_CALLBACK_FUNCTION(Pascale, function11);
+ ADD_CALLBACK_FUNCTION(Pascale, seatCath);
ADD_CALLBACK_FUNCTION(Pascale, chapter1);
- ADD_CALLBACK_FUNCTION(Pascale, getMessageFromAugustToTyler);
- ADD_CALLBACK_FUNCTION(Pascale, sitAnna);
- ADD_CALLBACK_FUNCTION(Pascale, welcomeAnna);
- ADD_CALLBACK_FUNCTION(Pascale, serveTatianaVassili);
- ADD_CALLBACK_FUNCTION(Pascale, chapter1Handler);
+ ADD_CALLBACK_FUNCTION(Pascale, greetAugust);
+ ADD_CALLBACK_FUNCTION(Pascale, seatAnna);
+ ADD_CALLBACK_FUNCTION(Pascale, greetAnna);
+ ADD_CALLBACK_FUNCTION(Pascale, greetTatiana);
+ ADD_CALLBACK_FUNCTION(Pascale, servingDinner);
ADD_CALLBACK_FUNCTION(Pascale, function18);
ADD_CALLBACK_FUNCTION(Pascale, function19);
ADD_CALLBACK_FUNCTION(Pascale, chapter2);
ADD_CALLBACK_FUNCTION(Pascale, chapter3);
ADD_CALLBACK_FUNCTION(Pascale, chapter3Handler);
- ADD_CALLBACK_FUNCTION(Pascale, function23);
+ ADD_CALLBACK_FUNCTION(Pascale, abbotSeatMe3);
ADD_CALLBACK_FUNCTION(Pascale, welcomeAbbot);
ADD_CALLBACK_FUNCTION(Pascale, chapter4);
ADD_CALLBACK_FUNCTION(Pascale, chapter4Handler);
- ADD_CALLBACK_FUNCTION(Pascale, function27);
- ADD_CALLBACK_FUNCTION(Pascale, messageFromAnna);
- ADD_CALLBACK_FUNCTION(Pascale, function29);
- ADD_CALLBACK_FUNCTION(Pascale, function30);
+ ADD_CALLBACK_FUNCTION(Pascale, meetCoudert);
+ ADD_CALLBACK_FUNCTION(Pascale, tellAugust);
+ ADD_CALLBACK_FUNCTION(Pascale, walkDownTrain);
+ ADD_CALLBACK_FUNCTION(Pascale, walkUpTrain);
ADD_CALLBACK_FUNCTION(Pascale, chapter5);
ADD_CALLBACK_FUNCTION(Pascale, chapter5Handler);
- ADD_CALLBACK_FUNCTION(Pascale, function33);
+ ADD_CALLBACK_FUNCTION(Pascale, hiding);
ADD_NULL_FUNCTION();
}
@@ -118,6 +118,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(8, Pascale, welcomeSophieAndRebecca)
+ // Welcomes Sophie And Rebecca
switch (savepoint.action) {
default:
break;
@@ -244,7 +245,7 @@ IMPLEMENT_FUNCTION(10, Pascale, welcomeCath)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(11, Pascale, function11)
+IMPLEMENT_FUNCTION(11, Pascale, seatCath)
switch (savepoint.action) {
default:
break;
@@ -295,7 +296,7 @@ IMPLEMENT_FUNCTION(12, Pascale, chapter1)
break;
case kActionNone:
- setup_chapter1Handler();
+ setup_servingDinner();
break;
case kActionDefault:
@@ -319,7 +320,7 @@ IMPLEMENT_FUNCTION(12, Pascale, chapter1)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(13, Pascale, getMessageFromAugustToTyler)
+IMPLEMENT_FUNCTION(13, Pascale, greetAugust)
switch (savepoint.action) {
default:
break;
@@ -372,7 +373,7 @@ IMPLEMENT_FUNCTION(13, Pascale, getMessageFromAugustToTyler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(14, Pascale, sitAnna)
+IMPLEMENT_FUNCTION(14, Pascale, seatAnna)
switch (savepoint.action) {
default:
break;
@@ -394,7 +395,7 @@ IMPLEMENT_FUNCTION(14, Pascale, sitAnna)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(15, Pascale, welcomeAnna)
+IMPLEMENT_FUNCTION(15, Pascale, greetAnna)
switch (savepoint.action) {
default:
break;
@@ -416,7 +417,7 @@ IMPLEMENT_FUNCTION(15, Pascale, welcomeAnna)
getSound()->playSound(kEntityPascale, "ANN1047");
setCallback(2);
- setup_sitAnna();
+ setup_seatAnna();
break;
case 2:
@@ -439,7 +440,7 @@ IMPLEMENT_FUNCTION(15, Pascale, welcomeAnna)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(16, Pascale, serveTatianaVassili)
+IMPLEMENT_FUNCTION(16, Pascale, greetTatiana)
switch (savepoint.action) {
default:
break;
@@ -492,7 +493,7 @@ IMPLEMENT_FUNCTION(16, Pascale, serveTatianaVassili)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(17, Pascale, chapter1Handler)
+IMPLEMENT_FUNCTION(17, Pascale, servingDinner)
switch (savepoint.action) {
default:
break;
@@ -521,28 +522,28 @@ switch (savepoint.action) {
if (params->param1 && !params->param2 && getEntities()->isPlayerPosition(kCarRestaurant, 61)) {
setCallback(1);
- setup_function11();
+ setup_seatCath();
break;
}
label_callback1:
if (ENTITY_PARAM(0, 1) && !ENTITY_PARAM(1, 3)) {
setCallback(2);
- setup_getMessageFromAugustToTyler();
+ setup_greetAugust();
break;
}
label_callback2:
if (ENTITY_PARAM(0, 3)) {
setCallback(3);
- setup_serveTatianaVassili();
+ setup_greetTatiana();
break;
}
label_callback3:
if (ENTITY_PARAM(0, 2)) {
setCallback(4);
- setup_welcomeAnna();
+ setup_greetAnna();
break;
}
@@ -584,8 +585,8 @@ IMPLEMENT_FUNCTION(18, Pascale, function18)
if (getState()->time > kTime1242000 && !params->param1) {
params->param1 = 1;
- getSavePoints()->push(kEntityPascale, kEntityServers0, kAction101632192);
- getSavePoints()->push(kEntityPascale, kEntityServers1, kAction101632192);
+ getSavePoints()->push(kEntityPascale, kEntityWaiter1, kAction101632192);
+ getSavePoints()->push(kEntityPascale, kEntityWaiter2, kAction101632192);
getSavePoints()->push(kEntityPascale, kEntityCooks, kAction101632192);
getSavePoints()->push(kEntityPascale, kEntityVerges, kAction101632192);
@@ -674,7 +675,7 @@ IMPLEMENT_FUNCTION(22, Pascale, chapter3Handler)
if (ENTITY_PARAM(0, 7)) {
setCallback(1);
- setup_function23();
+ setup_abbotSeatMe3();
break;
}
@@ -693,7 +694,7 @@ label_callback:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(23, Pascale, function23)
+IMPLEMENT_FUNCTION(23, Pascale, abbotSeatMe3)
switch (savepoint.action) {
default:
break;
@@ -806,7 +807,7 @@ IMPLEMENT_FUNCTION(26, Pascale, chapter4Handler)
if (getEntities()->isSomebodyInsideRestaurantOrSalon()) {
if (ENTITY_PARAM(0, 8)) {
setCallback(1);
- setup_function27();
+ setup_meetCoudert();
break;
}
@@ -820,7 +821,7 @@ label_callback1:
if (params->param3 < getState()->time) {
params->param5 = kTimeInvalid;
setCallback(2);
- setup_messageFromAnna();
+ setup_tellAugust();
break;
}
@@ -830,7 +831,7 @@ label_callback1:
if (params->param5 < getState()->time) {
params->param5 = kTimeInvalid;
setCallback(2);
- setup_messageFromAnna();
+ setup_tellAugust();
break;
}
}
@@ -839,7 +840,7 @@ label_callback1:
label_callback2:
if (params->param1 && !params->param2 && getEntities()->isPlayerPosition(kCarRestaurant, 61)) {
setCallback(3);
- setup_function11();
+ setup_seatCath();
break;
}
}
@@ -906,7 +907,7 @@ label_callback3:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(27, Pascale, function27)
+IMPLEMENT_FUNCTION(27, Pascale, meetCoudert)
switch (savepoint.action) {
default:
break;
@@ -920,7 +921,7 @@ IMPLEMENT_FUNCTION(27, Pascale, function27)
case kActionDefault:
setCallback(1);
- setup_function29();
+ setup_walkDownTrain();
break;
case kActionCallback:
@@ -941,7 +942,7 @@ IMPLEMENT_FUNCTION(27, Pascale, function27)
case 3:
setCallback(4);
- setup_function30();
+ setup_walkUpTrain();
break;
case 4:
@@ -959,7 +960,8 @@ IMPLEMENT_FUNCTION(27, Pascale, function27)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(28, Pascale, messageFromAnna)
+IMPLEMENT_FUNCTION(28, Pascale, tellAugust)
+ // Tell August the message from Anna
switch (savepoint.action) {
default:
break;
@@ -1005,7 +1007,7 @@ IMPLEMENT_FUNCTION(28, Pascale, messageFromAnna)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(29, Pascale, function29)
+IMPLEMENT_FUNCTION(29, Pascale, walkDownTrain)
switch (savepoint.action) {
default:
break;
@@ -1043,7 +1045,7 @@ IMPLEMENT_FUNCTION(29, Pascale, function29)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(30, Pascale, function30)
+IMPLEMENT_FUNCTION(30, Pascale, walkUpTrain)
switch (savepoint.action) {
default:
break;
@@ -1104,11 +1106,11 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(32, Pascale, chapter5Handler)
if (savepoint.action == kActionProceedChapter5)
- setup_function33();
+ setup_hiding();
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(33, Pascale, function33)
+IMPLEMENT_FUNCTION(33, Pascale, hiding)
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/pascale.h b/engines/lastexpress/entities/pascale.h
index 1b7777dec9..c8df7587ae 100644
--- a/engines/lastexpress/entities/pascale.h
+++ b/engines/lastexpress/entities/pascale.h
@@ -88,22 +88,22 @@ public:
DECLARE_FUNCTION(welcomeSophieAndRebecca)
DECLARE_FUNCTION(sitSophieAndRebecca)
DECLARE_FUNCTION(welcomeCath)
- DECLARE_FUNCTION(function11)
+ DECLARE_FUNCTION(seatCath)
/**
* Setup Chapter 1
*/
DECLARE_FUNCTION(chapter1)
- DECLARE_FUNCTION(getMessageFromAugustToTyler)
- DECLARE_FUNCTION(sitAnna)
- DECLARE_FUNCTION(welcomeAnna)
- DECLARE_FUNCTION(serveTatianaVassili)
+ DECLARE_FUNCTION(greetAugust)
+ DECLARE_FUNCTION(seatAnna)
+ DECLARE_FUNCTION(greetAnna)
+ DECLARE_FUNCTION(greetTatiana)
/**
* Handle Chapter 1 events
*/
- DECLARE_FUNCTION(chapter1Handler)
+ DECLARE_FUNCTION(servingDinner)
DECLARE_FUNCTION(function18)
DECLARE_FUNCTION(function19)
@@ -123,7 +123,7 @@ public:
*/
DECLARE_FUNCTION(chapter3Handler)
- DECLARE_FUNCTION(function23)
+ DECLARE_FUNCTION(abbotSeatMe3)
DECLARE_FUNCTION(welcomeAbbot)
/**
@@ -136,10 +136,10 @@ public:
*/
DECLARE_FUNCTION(chapter4Handler)
- DECLARE_FUNCTION(function27)
- DECLARE_FUNCTION(messageFromAnna)
- DECLARE_FUNCTION(function29)
- DECLARE_FUNCTION(function30)
+ DECLARE_FUNCTION(meetCoudert)
+ DECLARE_FUNCTION(tellAugust)
+ DECLARE_FUNCTION(walkDownTrain)
+ DECLARE_FUNCTION(walkUpTrain)
/**
* Setup Chapter 5
@@ -151,7 +151,7 @@ public:
*/
DECLARE_FUNCTION(chapter5Handler)
- DECLARE_FUNCTION(function33)
+ DECLARE_FUNCTION(hiding)
DECLARE_NULL_FUNCTION()
};
diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp
index 05211663bd..40175ad8c4 100644
--- a/engines/lastexpress/entities/rebecca.cpp
+++ b/engines/lastexpress/entities/rebecca.cpp
@@ -437,7 +437,7 @@ IMPLEMENT_FUNCTION(19, Rebecca, function19)
break;
case 2:
- getSavePoints()->push(kEntityRebecca, kEntityServers0, kAction337548856);
+ getSavePoints()->push(kEntityRebecca, kEntityWaiter1, kAction337548856);
getEntities()->drawSequenceRight(kEntityRebecca, "810DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
getEntities()->updateFrame(kEntityRebecca);
@@ -850,7 +850,7 @@ IMPLEMENT_FUNCTION(24, Rebecca, function24)
break;
case kActionNone:
- Entity::timeCheckSavepoint(kTime1134000, params->param2, kEntityRebecca, kEntityServers0, kAction223712416);
+ Entity::timeCheckSavepoint(kTime1134000, params->param2, kEntityRebecca, kEntityWaiter1, kAction223712416);
if (!params->param1)
break;
@@ -920,7 +920,7 @@ IMPLEMENT_FUNCTION(24, Rebecca, function24)
break;
case 8:
- getSavePoints()->push(kEntityRebecca, kEntityServers0, kAction136702400);
+ getSavePoints()->push(kEntityRebecca, kEntityWaiter1, kAction136702400);
getEntities()->drawSequenceLeft(kEntityRebecca, "012G");
params->param1 = 1;
break;
@@ -928,7 +928,7 @@ IMPLEMENT_FUNCTION(24, Rebecca, function24)
break;
case kAction123712592:
- getEntities()->drawSequenceLeft(kEntityServers0, "BLANK");
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "BLANK");
getEntities()->drawSequenceLeft(kEntityRebecca, "012E");
setCallback(8);
@@ -1244,7 +1244,7 @@ IMPLEMENT_FUNCTION(34, Rebecca, function34)
params->param2 = kTimeInvalid;
- getSavePoints()->push(kEntityRebecca, kEntityServers0, kAction223712416);
+ getSavePoints()->push(kEntityRebecca, kEntityWaiter1, kAction223712416);
}
Entity::timeCheckCallback(kTime2052000, params->param3, 1, WRAP_SETUP_FUNCTION(Rebecca, setup_function19));
@@ -1280,7 +1280,7 @@ IMPLEMENT_FUNCTION(34, Rebecca, function34)
break;
case 4:
- getSavePoints()->push(kEntityRebecca, kEntityServers0, kAction136702400);
+ getSavePoints()->push(kEntityRebecca, kEntityWaiter1, kAction136702400);
getEntities()->drawSequenceLeft(kEntityRebecca, "012G");
params->param1 = 1;
break;
@@ -1288,7 +1288,7 @@ IMPLEMENT_FUNCTION(34, Rebecca, function34)
break;
case kAction123712592:
- getEntities()->drawSequenceLeft(kEntityServers0, "BLANK");
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "BLANK");
getSound()->playSound(kEntityRebecca, "Reb3003");
setCallback(4);
@@ -1624,7 +1624,7 @@ IMPLEMENT_FUNCTION(44, Rebecca, function44)
params->param3 = kTimeInvalid;
- getSavePoints()->push(kEntityRebecca, kEntityServers0, kAction223712416);
+ getSavePoints()->push(kEntityRebecca, kEntityWaiter1, kAction223712416);
}
label_next:
@@ -1684,7 +1684,7 @@ label_callback_2:
break;
case 4:
- getSavePoints()->push(kEntityRebecca, kEntityServers0, kAction136702400);
+ getSavePoints()->push(kEntityRebecca, kEntityWaiter1, kAction136702400);
getEntities()->drawSequenceLeft(kEntityRebecca, "012G");
params->param2 = 1;
break;
diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp
index c6788fd4b2..951e89d595 100644
--- a/engines/lastexpress/entities/tatiana.cpp
+++ b/engines/lastexpress/entities/tatiana.cpp
@@ -507,7 +507,7 @@ IMPLEMENT_FUNCTION(20, Tatiana, function20)
case 2:
getEntities()->updatePositionExit(kEntityTatiana, kCarRestaurant, 67);
- getSavePoints()->push(kEntityTatiana, kEntityServers0, kAction188893625);
+ getSavePoints()->push(kEntityTatiana, kEntityWaiter1, kAction188893625);
setCallback(3);
setup_function18();
@@ -917,7 +917,7 @@ IMPLEMENT_FUNCTION(29, Tatiana, function29)
case 2:
getEntities()->updatePositionExit(kEntityTatiana, kCarRestaurant, 63);
- getSavePoints()->push(kEntityTatiana, kEntityServers1, kAction302203328);
+ getSavePoints()->push(kEntityTatiana, kEntityWaiter2, kAction302203328);
getEntities()->drawSequenceRight(kEntityTatiana, "805DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
diff --git a/engines/lastexpress/entities/servers0.cpp b/engines/lastexpress/entities/waiter1.cpp
index 590efa7157..80ec471f1b 100644
--- a/engines/lastexpress/entities/servers0.cpp
+++ b/engines/lastexpress/entities/waiter1.cpp
@@ -20,7 +20,7 @@
*
*/
-#include "lastexpress/entities/servers0.h"
+#include "lastexpress/entities/waiter1.h"
#include "lastexpress/game/entities.h"
#include "lastexpress/game/logic.h"
@@ -39,69 +39,69 @@ namespace LastExpress {
break; \
}
-Servers0::Servers0(LastExpressEngine *engine) : Entity(engine, kEntityServers0) {
- ADD_CALLBACK_FUNCTION(Servers0, callSavepoint);
- ADD_CALLBACK_FUNCTION(Servers0, updateFromTime);
- ADD_CALLBACK_FUNCTION(Servers0, draw);
- ADD_CALLBACK_FUNCTION(Servers0, updatePosition);
- ADD_CALLBACK_FUNCTION(Servers0, callbackActionOnDirection);
- ADD_CALLBACK_FUNCTION(Servers0, playSound);
- ADD_CALLBACK_FUNCTION(Servers0, function7);
- ADD_CALLBACK_FUNCTION(Servers0, function8);
- ADD_CALLBACK_FUNCTION(Servers0, function9);
- ADD_CALLBACK_FUNCTION(Servers0, function10);
- ADD_CALLBACK_FUNCTION(Servers0, chapter1);
- ADD_CALLBACK_FUNCTION(Servers0, function12);
- ADD_CALLBACK_FUNCTION(Servers0, function13);
- ADD_CALLBACK_FUNCTION(Servers0, function14);
- ADD_CALLBACK_FUNCTION(Servers0, function15);
- ADD_CALLBACK_FUNCTION(Servers0, function16);
- ADD_CALLBACK_FUNCTION(Servers0, function17);
- ADD_CALLBACK_FUNCTION(Servers0, function18);
- ADD_CALLBACK_FUNCTION(Servers0, function19);
- ADD_CALLBACK_FUNCTION(Servers0, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Servers0, function21);
- ADD_CALLBACK_FUNCTION(Servers0, function22);
- ADD_CALLBACK_FUNCTION(Servers0, chapter2);
- ADD_CALLBACK_FUNCTION(Servers0, chapter2Handler);
- ADD_CALLBACK_FUNCTION(Servers0, function25);
- ADD_CALLBACK_FUNCTION(Servers0, function26);
- ADD_CALLBACK_FUNCTION(Servers0, chapter3);
- ADD_CALLBACK_FUNCTION(Servers0, chapter3Handler);
- ADD_CALLBACK_FUNCTION(Servers0, augustAnnaDateOrder);
- ADD_CALLBACK_FUNCTION(Servers0, function30);
- ADD_CALLBACK_FUNCTION(Servers0, chapter4);
- ADD_CALLBACK_FUNCTION(Servers0, chapter4Handler);
- ADD_CALLBACK_FUNCTION(Servers0, augustOrderSteak);
- ADD_CALLBACK_FUNCTION(Servers0, augustServeDuck);
- ADD_CALLBACK_FUNCTION(Servers0, function35);
- ADD_CALLBACK_FUNCTION(Servers0, chapter5);
- ADD_CALLBACK_FUNCTION(Servers0, chapter5Handler);
+Waiter1::Waiter1(LastExpressEngine *engine) : Entity(engine, kEntityWaiter1) {
+ ADD_CALLBACK_FUNCTION(Waiter1, callSavepoint);
+ ADD_CALLBACK_FUNCTION(Waiter1, updateFromTime);
+ ADD_CALLBACK_FUNCTION(Waiter1, draw);
+ ADD_CALLBACK_FUNCTION(Waiter1, updatePosition);
+ ADD_CALLBACK_FUNCTION(Waiter1, callbackActionOnDirection);
+ ADD_CALLBACK_FUNCTION(Waiter1, playSound);
+ ADD_CALLBACK_FUNCTION(Waiter1, rebeccaFeedUs);
+ ADD_CALLBACK_FUNCTION(Waiter1, rebeccaClearOurTable);
+ ADD_CALLBACK_FUNCTION(Waiter1, abbotCheckMe);
+ ADD_CALLBACK_FUNCTION(Waiter1, abbotClearTable);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter1);
+ ADD_CALLBACK_FUNCTION(Waiter1, annaOrder);
+ ADD_CALLBACK_FUNCTION(Waiter1, augustOrder);
+ ADD_CALLBACK_FUNCTION(Waiter1, serveAnna);
+ ADD_CALLBACK_FUNCTION(Waiter1, serveAugust);
+ ADD_CALLBACK_FUNCTION(Waiter1, clearAnna);
+ ADD_CALLBACK_FUNCTION(Waiter1, clearTatiana);
+ ADD_CALLBACK_FUNCTION(Waiter1, clearAugust1);
+ ADD_CALLBACK_FUNCTION(Waiter1, clearAugust2);
+ ADD_CALLBACK_FUNCTION(Waiter1, servingDinner);
+ ADD_CALLBACK_FUNCTION(Waiter1, function21);
+ ADD_CALLBACK_FUNCTION(Waiter1, function22);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter2);
+ ADD_CALLBACK_FUNCTION(Waiter1, inKitchen);
+ ADD_CALLBACK_FUNCTION(Waiter1, augustComeHere2);
+ ADD_CALLBACK_FUNCTION(Waiter1, augustClearTable2);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter3);
+ ADD_CALLBACK_FUNCTION(Waiter1, serving3);
+ ADD_CALLBACK_FUNCTION(Waiter1, annaComeHere3);
+ ADD_CALLBACK_FUNCTION(Waiter1, abbotServeLunch3);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter4);
+ ADD_CALLBACK_FUNCTION(Waiter1, serving4);
+ ADD_CALLBACK_FUNCTION(Waiter1, augustOrder4);
+ ADD_CALLBACK_FUNCTION(Waiter1, serveAugust4);
+ ADD_CALLBACK_FUNCTION(Waiter1, augustClearTable);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter5);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter5Handler);
ADD_NULL_FUNCTION();
}
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_SIIS(1, Servers0, callSavepoint, EntityIndex, ActionIndex)
+IMPLEMENT_FUNCTION_SIIS(1, Waiter1, callSavepoint, EntityIndex, ActionIndex)
Entity::callSavepoint(savepoint, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_NOSETUP(2, Servers0, updateFromTime)
+IMPLEMENT_FUNCTION_NOSETUP(2, Waiter1, updateFromTime)
Entity::updateFromTime(savepoint);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(3, Servers0, draw)
+IMPLEMENT_FUNCTION_S(3, Waiter1, draw)
Entity::draw(savepoint, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_NOSETUP(4, Servers0, updatePosition)
+IMPLEMENT_FUNCTION_NOSETUP(4, Waiter1, updatePosition)
Entity::updatePosition(savepoint, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_NOSETUP(5, Servers0, callbackActionOnDirection)
+IMPLEMENT_FUNCTION_NOSETUP(5, Waiter1, callbackActionOnDirection)
EXPOSE_PARAMS(EntityData::EntityParametersIIII);
switch (savepoint.action) {
@@ -119,7 +119,7 @@ IMPLEMENT_FUNCTION_NOSETUP(5, Servers0, callbackActionOnDirection)
case kActionExcuseMeCath:
if (!params->param1) {
- getSound()->excuseMe(kEntityServers0);
+ getSound()->excuseMe(kEntityWaiter1);
params->param1 = 1;
}
break;
@@ -127,12 +127,12 @@ IMPLEMENT_FUNCTION_NOSETUP(5, Servers0, callbackActionOnDirection)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(6, Servers0, playSound)
+IMPLEMENT_FUNCTION_S(6, Waiter1, playSound)
Entity::playSound(savepoint);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(7, Servers0, function7)
+IMPLEMENT_FUNCTION(7, Waiter1, rebeccaFeedUs)
switch (savepoint.action) {
default:
break;
@@ -153,12 +153,12 @@ IMPLEMENT_FUNCTION(7, Servers0, function7)
break;
case 1:
- getEntities()->clearSequences(kEntityServers0);
- getSavePoints()->push(kEntityServers0, kEntityRebecca, kAction123712592);
+ getEntities()->clearSequences(kEntityWaiter1);
+ getSavePoints()->push(kEntityWaiter1, kEntityRebecca, kAction123712592);
break;
case 2:
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
getData()->entityPosition = kPosition_5900;
callbackAction();
break;
@@ -173,12 +173,12 @@ IMPLEMENT_FUNCTION(7, Servers0, function7)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(8, Servers0, function8)
+IMPLEMENT_FUNCTION(8, Waiter1, rebeccaClearOurTable)
serveTable(savepoint, "911", kEntityTables3, "010L", "010M", "913", &ENTITY_PARAM(1, 2));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(9, Servers0, function9)
+IMPLEMENT_FUNCTION(9, Waiter1, abbotCheckMe)
switch (savepoint.action) {
default:
break;
@@ -197,15 +197,15 @@ IMPLEMENT_FUNCTION(9, Servers0, function9)
break;
case 1:
- getSavePoints()->push(kEntityServers0, kEntityAbbot, kAction122358304);
- getEntities()->drawSequenceLeft(kEntityServers0, "029D");
+ getSavePoints()->push(kEntityWaiter1, kEntityAbbot, kAction122358304);
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "029D");
setCallback(2);
setup_playSound(getProgress().chapter == kChapter3 ? "Abb3016" : "Abb4001");
break;
case 2:
- getSavePoints()->push(kEntityServers0, kEntityAbbot, kAction122288808);
+ getSavePoints()->push(kEntityWaiter1, kEntityAbbot, kAction122288808);
setCallback(3);
setup_draw("917");
@@ -213,7 +213,7 @@ IMPLEMENT_FUNCTION(9, Servers0, function9)
case 3:
getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
ENTITY_PARAM(2, 2) = 0;
ENTITY_PARAM(1, 6) = 0;
@@ -225,37 +225,37 @@ IMPLEMENT_FUNCTION(9, Servers0, function9)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(10, Servers0, function10)
+IMPLEMENT_FUNCTION(10, Waiter1, abbotClearTable)
serveTable(savepoint, "916", kEntityTables4, "014E", "014F", "918", &ENTITY_PARAM(2, 3), false);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(11, Servers0, chapter1)
+IMPLEMENT_FUNCTION(11, Waiter1, chapter1)
switch (savepoint.action) {
default:
break;
case kActionNone:
- setup_chapter1Handler();
+ setup_servingDinner();
break;
case kActionDefault:
- getSavePoints()->addData(kEntityServers0, kAction270410280, 0);
- getSavePoints()->addData(kEntityServers0, kAction304061224, 1);
- getSavePoints()->addData(kEntityServers0, kAction252568704, 10);
- getSavePoints()->addData(kEntityServers0, kAction286534136, 11);
- getSavePoints()->addData(kEntityServers0, kAction218983616, 12);
- getSavePoints()->addData(kEntityServers0, kAction218586752, 13);
- getSavePoints()->addData(kEntityServers0, kAction207330561, 14);
- getSavePoints()->addData(kEntityServers0, kAction286403504, 16);
- getSavePoints()->addData(kEntityServers0, kAction218128129, 17);
- getSavePoints()->addData(kEntityServers0, kAction270068760, 18);
- getSavePoints()->addData(kEntityServers0, kAction223712416, 2);
- getSavePoints()->addData(kEntityServers0, kAction237485916, 5);
- getSavePoints()->addData(kEntityServers0, kAction188893625, 8);
- getSavePoints()->addData(kEntityServers0, kAction204704037, 6);
- getSavePoints()->addData(kEntityServers0, kAction292758554, 7);
- getSavePoints()->addData(kEntityServers0, kAction337548856, 9);
+ getSavePoints()->addData(kEntityWaiter1, kAction270410280, 0);
+ getSavePoints()->addData(kEntityWaiter1, kAction304061224, 1);
+ getSavePoints()->addData(kEntityWaiter1, kAction252568704, 10);
+ getSavePoints()->addData(kEntityWaiter1, kAction286534136, 11);
+ getSavePoints()->addData(kEntityWaiter1, kAction218983616, 12);
+ getSavePoints()->addData(kEntityWaiter1, kAction218586752, 13);
+ getSavePoints()->addData(kEntityWaiter1, kAction207330561, 14);
+ getSavePoints()->addData(kEntityWaiter1, kAction286403504, 16);
+ getSavePoints()->addData(kEntityWaiter1, kAction218128129, 17);
+ getSavePoints()->addData(kEntityWaiter1, kAction270068760, 18);
+ getSavePoints()->addData(kEntityWaiter1, kAction223712416, 2);
+ getSavePoints()->addData(kEntityWaiter1, kAction237485916, 5);
+ getSavePoints()->addData(kEntityWaiter1, kAction188893625, 8);
+ getSavePoints()->addData(kEntityWaiter1, kAction204704037, 6);
+ getSavePoints()->addData(kEntityWaiter1, kAction292758554, 7);
+ getSavePoints()->addData(kEntityWaiter1, kAction337548856, 9);
getData()->entityPosition = kPosition_5900;
getData()->location = kLocationOutsideCompartment;
@@ -265,47 +265,47 @@ IMPLEMENT_FUNCTION(11, Servers0, chapter1)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(12, Servers0, function12)
+IMPLEMENT_FUNCTION(12, Waiter1, annaOrder)
handleServer(savepoint, "907", kEntityAnna, kAction268773672, &ENTITY_PARAM(0, 1));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(13, Servers0, function13)
+IMPLEMENT_FUNCTION(13, Waiter1, augustOrder)
handleServer(savepoint, "911", kEntityAugust, kAction268773672, &ENTITY_PARAM(0, 2), "010F");
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(14, Servers0, function14)
+IMPLEMENT_FUNCTION(14, Waiter1, serveAnna)
handleServer(savepoint, "908", kEntityAnna, kAction170016384, &ENTITY_PARAM(0, 4));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(15, Servers0, function15)
+IMPLEMENT_FUNCTION(15, Waiter1, serveAugust)
handleServer(savepoint, "912", kEntityAugust, kAction170016384, &ENTITY_PARAM(0, 5));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(16, Servers0, function16)
+IMPLEMENT_FUNCTION(16, Waiter1, clearAnna)
serveTable(savepoint, "907", kEntityTables0, "001N", "001P", "909", &ENTITY_PARAM(0, 6));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(17, Servers0, function17)
+IMPLEMENT_FUNCTION(17, Waiter1, clearTatiana)
serveTable(savepoint, "915", kEntityTables4, "014E", "014F", "917", &ENTITY_PARAM(1, 1), true, false, 67);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(18, Servers0, function18)
+IMPLEMENT_FUNCTION(18, Waiter1, clearAugust1)
serveTable(savepoint, "911", kEntityTables3, "010L", "010H", "913", &ENTITY_PARAM(0, 7));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(19, Servers0, function19)
+IMPLEMENT_FUNCTION(19, Waiter1, clearAugust2)
serveTable(savepoint, "911", kEntityTables3, "010L", "010M", "913", &ENTITY_PARAM(0, 8), true, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(20, Servers0, chapter1Handler)
+IMPLEMENT_FUNCTION(20, Waiter1, servingDinner)
switch (savepoint.action) {
default:
break;
@@ -325,19 +325,19 @@ IMPLEMENT_FUNCTION(20, Servers0, chapter1Handler)
}
}
- if (!getEntities()->isInKitchen(kEntityServers0) && !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ if (!getEntities()->isInKitchen(kEntityWaiter1) && !getEntities()->isSomebodyInsideRestaurantOrSalon())
break;
- HANDLE_TABLE(0, 1, 1, setup_function12);
- HANDLE_TABLE(0, 2, 2, setup_function13);
- HANDLE_TABLE(0, 3, 3, setup_function7);
- HANDLE_TABLE(0, 4, 4, setup_function14);
- HANDLE_TABLE(0, 5, 5, setup_function15);
- HANDLE_TABLE(0, 6, 6, setup_function16);
- HANDLE_TABLE(1, 1, 7, setup_function17);
- HANDLE_TABLE(0, 7, 8, setup_function18);
- HANDLE_TABLE(0, 8, 9, setup_function19);
- HANDLE_TABLE(1, 2, 10, setup_function8);
+ HANDLE_TABLE(0, 1, 1, setup_annaOrder);
+ HANDLE_TABLE(0, 2, 2, setup_augustOrder);
+ HANDLE_TABLE(0, 3, 3, setup_rebeccaFeedUs);
+ HANDLE_TABLE(0, 4, 4, setup_serveAnna);
+ HANDLE_TABLE(0, 5, 5, setup_serveAugust);
+ HANDLE_TABLE(0, 6, 6, setup_clearAnna);
+ HANDLE_TABLE(1, 1, 7, setup_clearTatiana);
+ HANDLE_TABLE(0, 7, 8, setup_clearAugust1);
+ HANDLE_TABLE(0, 8, 9, setup_clearAugust2);
+ HANDLE_TABLE(1, 2, 10, setup_rebeccaClearOurTable);
break;
case kActionCallback:
@@ -346,13 +346,13 @@ IMPLEMENT_FUNCTION(20, Servers0, chapter1Handler)
break;
case 10:
- getSavePoints()->push(kEntityServers0, kEntityPascale, kAction352703104);
+ getSavePoints()->push(kEntityWaiter1, kEntityPascale, kAction352703104);
setup_function21();
break;
case 11:
case 12:
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
getData()->entityPosition = kPosition_5900;
if (getCallback() == 11)
@@ -363,7 +363,7 @@ IMPLEMENT_FUNCTION(20, Servers0, chapter1Handler)
case 13:
case 14:
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
getData()->entityPosition = kPosition_5900;
break;
}
@@ -382,7 +382,7 @@ IMPLEMENT_FUNCTION(20, Servers0, chapter1Handler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(21, Servers0, function21)
+IMPLEMENT_FUNCTION(21, Waiter1, function21)
switch (savepoint.action) {
default:
break;
@@ -398,28 +398,28 @@ IMPLEMENT_FUNCTION(21, Servers0, function21)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(22, Servers0, function22)
+IMPLEMENT_FUNCTION(22, Waiter1, function22)
if (savepoint.action == kActionDefault) {
getData()->entityPosition = kPosition_5900;
getData()->location = kLocationOutsideCompartment;
getData()->car = kCarRestaurant;
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(23, Servers0, chapter2)
+IMPLEMENT_FUNCTION(23, Waiter1, chapter2)
switch (savepoint.action) {
default:
break;
case kActionNone:
- setup_chapter2Handler();
+ setup_inKitchen();
break;
case kActionDefault:
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
getData()->entityPosition = kPosition_5900;
getData()->location = kLocationOutsideCompartment;
@@ -434,28 +434,28 @@ IMPLEMENT_FUNCTION(23, Servers0, chapter2)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(24, Servers0, chapter2Handler)
+IMPLEMENT_FUNCTION(24, Waiter1, inKitchen)
switch (savepoint.action) {
default:
break;
case kActionNone:
- if (!getEntities()->isInKitchen(kEntityServers0) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ if (!getEntities()->isInKitchen(kEntityWaiter1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
break;
- HANDLE_TABLE(1, 3, 1, setup_function25);
- HANDLE_TABLE(1, 4, 2, setup_function26);
+ HANDLE_TABLE(1, 3, 1, setup_augustComeHere2);
+ HANDLE_TABLE(1, 4, 2, setup_augustClearTable2);
break;
case kActionCallback:
if (getCallback() == 1)
- HANDLE_TABLE(1, 4, 2, setup_function26);
+ HANDLE_TABLE(1, 4, 2, setup_augustClearTable2);
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(25, Servers0, function25)
+IMPLEMENT_FUNCTION(25, Waiter1, augustComeHere2)
switch (savepoint.action) {
default:
break;
@@ -474,13 +474,13 @@ IMPLEMENT_FUNCTION(25, Servers0, function25)
break;
case 1:
- getSavePoints()->push(kEntityServers0, kEntityAugust, kAction123712592);
- getEntities()->drawSequenceLeft(kEntityServers0, "BLANK");
+ getSavePoints()->push(kEntityWaiter1, kEntityAugust, kAction123712592);
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "BLANK");
break;
case 2:
getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
ENTITY_PARAM(1, 3) = 0;
callbackAction();
@@ -496,22 +496,22 @@ IMPLEMENT_FUNCTION(25, Servers0, function25)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(26, Servers0, function26)
+IMPLEMENT_FUNCTION(26, Waiter1, augustClearTable2)
serveTable(savepoint, "957", kEntityTables0, "016E", "016D", "959", &ENTITY_PARAM(1, 4));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(27, Servers0, chapter3)
+IMPLEMENT_FUNCTION(27, Waiter1, chapter3)
switch (savepoint.action) {
default:
break;
case kActionNone:
- setup_chapter3Handler();
+ setup_serving3();
break;
case kActionDefault:
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
getData()->entityPosition = kPosition_5900;
getData()->location = kLocationOutsideCompartment;
@@ -530,53 +530,53 @@ IMPLEMENT_FUNCTION(27, Servers0, chapter3)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(28, Servers0, chapter3Handler)
+IMPLEMENT_FUNCTION(28, Waiter1, serving3)
switch (savepoint.action) {
default:
break;
case kActionNone:
- if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ if (!getEntities()->isInKitchen(kEntityWaiter2) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
break;
if (ENTITY_PARAM(1, 5)) {
setCallback(1);
- setup_augustAnnaDateOrder();
+ setup_annaComeHere3();
break;
}
label_callback_1:
if (ENTITY_PARAM(1, 6)) {
setCallback(2);
- setup_function9();
+ setup_abbotCheckMe();
break;
}
label_callback_2:
if (ENTITY_PARAM(2, 4)) {
setCallback(3);
- setup_function30();
+ setup_abbotServeLunch3();
break;
}
label_callback_3:
if (ENTITY_PARAM(2, 3)) {
setCallback(4);
- setup_function10();
+ setup_abbotClearTable();
break;
}
label_callback_4:
if (ENTITY_PARAM(0, 3)) {
setCallback(5);
- setup_function7();
+ setup_rebeccaFeedUs();
break;
}
label_callback_5:
if (ENTITY_PARAM(1, 2)) {
setCallback(6);
- setup_function8();
+ setup_rebeccaClearOurTable();
break;
}
break;
@@ -606,7 +606,8 @@ label_callback_5:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(29, Servers0, augustAnnaDateOrder)
+IMPLEMENT_FUNCTION(29, Waiter1, annaComeHere3)
+ // August and Anna order dinner
switch (savepoint.action) {
default:
break;
@@ -625,15 +626,15 @@ IMPLEMENT_FUNCTION(29, Servers0, augustAnnaDateOrder)
break;
case 1:
- getSavePoints()->push(kEntityServers0, kEntityAnna, kAction122358304);
- getEntities()->drawSequenceLeft(kEntityServers0, "026D");
+ getSavePoints()->push(kEntityWaiter1, kEntityAnna, kAction122358304);
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "026D");
setCallback(2);
setup_playSound("Ann3138");
break;
case 2:
- getSavePoints()->push(kEntityServers0, kEntityAnna, kAction122288808);
+ getSavePoints()->push(kEntityWaiter1, kEntityAnna, kAction122288808);
setCallback(3);
setup_draw("913");
@@ -641,7 +642,7 @@ IMPLEMENT_FUNCTION(29, Servers0, augustAnnaDateOrder)
case 3:
getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
ENTITY_PARAM(1, 5) = 0;
callbackAction();
@@ -652,7 +653,7 @@ IMPLEMENT_FUNCTION(29, Servers0, augustAnnaDateOrder)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(30, Servers0, function30)
+IMPLEMENT_FUNCTION(30, Waiter1, abbotServeLunch3)
switch (savepoint.action) {
default:
break;
@@ -671,15 +672,15 @@ IMPLEMENT_FUNCTION(30, Servers0, function30)
break;
case 1:
- getSavePoints()->push(kEntityServers0, kEntityAbbot, kAction122358304);
- getEntities()->drawSequenceLeft(kEntityServers0, "029D");
+ getSavePoints()->push(kEntityWaiter1, kEntityAbbot, kAction122358304);
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "029D");
setCallback(2);
setup_playSound("Abb3016a");
break;
case 2:
- getSavePoints()->push(kEntityServers0, kEntityAbbot, kAction122288808);
+ getSavePoints()->push(kEntityWaiter1, kEntityAbbot, kAction122288808);
setCallback(3);
setup_draw("918");
@@ -687,7 +688,7 @@ IMPLEMENT_FUNCTION(30, Servers0, function30)
case 3:
getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
ENTITY_PARAM(2, 4) = 0;
callbackAction();
@@ -698,17 +699,17 @@ IMPLEMENT_FUNCTION(30, Servers0, function30)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(31, Servers0, chapter4)
+IMPLEMENT_FUNCTION(31, Waiter1, chapter4)
switch (savepoint.action) {
default:
break;
case kActionNone:
- setup_chapter4Handler();
+ setup_serving4();
break;
case kActionDefault:
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
getData()->entityPosition = kPosition_5900;
getData()->location = kLocationOutsideCompartment;
@@ -727,7 +728,7 @@ IMPLEMENT_FUNCTION(31, Servers0, chapter4)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(32, Servers0, chapter4Handler)
+IMPLEMENT_FUNCTION(32, Waiter1, serving4)
switch (savepoint.action) {
default:
break;
@@ -738,47 +739,47 @@ IMPLEMENT_FUNCTION(32, Servers0, chapter4Handler)
params->param1 = 0;
}
- if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ if (!getEntities()->isInKitchen(kEntityWaiter2) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
break;
if (ENTITY_PARAM(1, 7)) {
setCallback(1);
- setup_augustOrderSteak();
+ setup_augustOrder4();
break;
}
label_callback_1:
if (ENTITY_PARAM(1, 8)) {
setCallback(2);
- setup_augustServeDuck();
+ setup_serveAugust4();
break;
}
label_callback_2:
if (ENTITY_PARAM(2, 1)) {
setCallback(3);
- setup_function35();
+ setup_augustClearTable();
break;
}
label_callback_3:
if (ENTITY_PARAM(2, 2)) {
setCallback(4);
- setup_function9();
+ setup_abbotCheckMe();
break;
}
label_callback_4:
if (ENTITY_PARAM(2, 3)) {
setCallback(5);
- setup_function10();
+ setup_abbotClearTable();
break;
}
label_callback_5:
if (ENTITY_PARAM(0, 3)) {
setCallback(6);
- setup_function7();
+ setup_rebeccaFeedUs();
break;
}
break;
@@ -821,7 +822,8 @@ label_callback_5:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(33, Servers0, augustOrderSteak)
+IMPLEMENT_FUNCTION(33, Waiter1, augustOrder4)
+ // August orders a steak
switch (savepoint.action) {
default:
break;
@@ -837,7 +839,7 @@ IMPLEMENT_FUNCTION(33, Servers0, augustOrderSteak)
break;
case 1:
- getEntities()->drawSequenceLeft(kEntityServers0, "010F3");
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "010F3");
getEntities()->drawSequenceLeft(kEntityAugust, "010D3");
setCallback(2);
@@ -845,7 +847,7 @@ IMPLEMENT_FUNCTION(33, Servers0, augustOrderSteak)
break;
case 2:
- getSavePoints()->push(kEntityServers0, kEntityAugust, kAction122288808);
+ getSavePoints()->push(kEntityWaiter1, kEntityAugust, kAction122288808);
setCallback(3);
setup_draw("913");
@@ -853,7 +855,7 @@ IMPLEMENT_FUNCTION(33, Servers0, augustOrderSteak)
case 3:
getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
ENTITY_PARAM(1, 7) = 0;
callbackAction();
@@ -864,7 +866,8 @@ IMPLEMENT_FUNCTION(33, Servers0, augustOrderSteak)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(34, Servers0, augustServeDuck)
+IMPLEMENT_FUNCTION(34, Waiter1, serveAugust4)
+ // August is being served
switch (savepoint.action) {
default:
break;
@@ -880,15 +883,15 @@ IMPLEMENT_FUNCTION(34, Servers0, augustServeDuck)
break;
case 1:
- getSavePoints()->push(kEntityServers0, kEntityAugust, kAction122358304);
- getSound()->playSound(kEntityServers0, "AUG1053");
+ getSavePoints()->push(kEntityWaiter1, kEntityAugust, kAction122358304);
+ getSound()->playSound(kEntityWaiter1, "AUG1053");
setCallback(2);
setup_draw("010G3");
break;
case 2:
- getSavePoints()->push(kEntityServers0, kEntityAugust, kAction201964801);
+ getSavePoints()->push(kEntityWaiter1, kEntityAugust, kAction201964801);
setCallback(3);
setup_draw("914");
@@ -896,7 +899,7 @@ IMPLEMENT_FUNCTION(34, Servers0, augustServeDuck)
case 3:
getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
ENTITY_PARAM(1, 8) = 0;
callbackAction();
@@ -907,12 +910,12 @@ IMPLEMENT_FUNCTION(34, Servers0, augustServeDuck)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(35, Servers0, function35)
+IMPLEMENT_FUNCTION(35, Waiter1, augustClearTable)
serveTable(savepoint, "911", kEntityTables3, "010L", "010M", "914", &ENTITY_PARAM(2, 1), false, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(36, Servers0, chapter5)
+IMPLEMENT_FUNCTION(36, Waiter1, chapter5)
switch (savepoint.action) {
default:
break;
@@ -922,7 +925,7 @@ IMPLEMENT_FUNCTION(36, Servers0, chapter5)
break;
case kActionDefault:
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
getData()->entityPosition = kPosition_3969;
getData()->location = kLocationInsideCompartment;
@@ -933,19 +936,19 @@ IMPLEMENT_FUNCTION(36, Servers0, chapter5)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(37, Servers0, chapter5Handler)
+IMPLEMENT_FUNCTION(37, Waiter1, chapter5Handler)
if (savepoint.action == kActionProceedChapter5)
setup_nullfunction();
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_NULL_FUNCTION(38, Servers0)
+IMPLEMENT_NULL_FUNCTION(38, Waiter1)
//////////////////////////////////////////////////////////////////////////
// Private functions
//////////////////////////////////////////////////////////////////////////
-void Servers0::handleServer(const SavePoint &savepoint, const char *name, EntityIndex entity, ActionIndex action, uint *parameter, const char *name2) {
+void Waiter1::handleServer(const SavePoint &savepoint, const char *name, EntityIndex entity, ActionIndex action, uint *parameter, const char *name2) {
switch (savepoint.action) {
default:
break;
@@ -962,11 +965,11 @@ void Servers0::handleServer(const SavePoint &savepoint, const char *name, Entity
if (getCallback() == 1) {
// Prepare or draw sequences depending of value of string
if (strcmp(name2, ""))
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
else
- getEntities()->drawSequenceLeft(kEntityServers0, name2);
+ getEntities()->drawSequenceLeft(kEntityWaiter1, name2);
- getSavePoints()->push(kEntityServers0, entity, action);
+ getSavePoints()->push(kEntityWaiter1, entity, action);
*parameter = 0;
callbackAction();
@@ -976,7 +979,7 @@ void Servers0::handleServer(const SavePoint &savepoint, const char *name, Entity
}
//////////////////////////////////////////////////////////////////////////
-void Servers0::serveTable(const SavePoint &savepoint, const char *seq1, EntityIndex entity, const char *seq2, const char *seq3, const char *seq4, uint *parameter, bool shouldUpdatePosition, bool pushSavepoint, Position position) {
+void Waiter1::serveTable(const SavePoint &savepoint, const char *seq1, EntityIndex entity, const char *seq2, const char *seq3, const char *seq4, uint *parameter, bool shouldUpdatePosition, bool pushSavepoint, Position position) {
switch (savepoint.action) {
default:
break;
@@ -998,9 +1001,9 @@ void Servers0::serveTable(const SavePoint &savepoint, const char *seq1, EntityIn
case 1:
if (position)
- getEntities()->updatePositionEnter(kEntityServers0, kCarRestaurant, position);
+ getEntities()->updatePositionEnter(kEntityWaiter1, kCarRestaurant, position);
- getSavePoints()->push(kEntityServers0, entity, kAction136455232);
+ getSavePoints()->push(kEntityWaiter1, entity, kAction136455232);
setCallback(2);
setup_callSavepoint(seq2, entity, kActionDrawTablesWithChairs, seq3);
@@ -1008,7 +1011,7 @@ void Servers0::serveTable(const SavePoint &savepoint, const char *seq1, EntityIn
case 2:
if (position)
- getEntities()->updatePositionExit(kEntityServers0, kCarRestaurant, position);
+ getEntities()->updatePositionExit(kEntityWaiter1, kCarRestaurant, position);
setCallback(3);
setup_draw(seq4);
@@ -1019,9 +1022,9 @@ void Servers0::serveTable(const SavePoint &savepoint, const char *seq1, EntityIn
// Special case for functions 19 & 35
if (pushSavepoint)
- getSavePoints()->push(kEntityServers0, kEntityRebecca, kAction224253538);
+ getSavePoints()->push(kEntityWaiter1, kEntityRebecca, kAction224253538);
- getEntities()->clearSequences(kEntityServers0);
+ getEntities()->clearSequences(kEntityWaiter1);
*parameter = 0;
callbackAction();
diff --git a/engines/lastexpress/entities/servers0.h b/engines/lastexpress/entities/waiter1.h
index 70f06596b0..64c66550af 100644
--- a/engines/lastexpress/entities/servers0.h
+++ b/engines/lastexpress/entities/waiter1.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef LASTEXPRESS_SERVERS0_H
-#define LASTEXPRESS_SERVERS0_H
+#ifndef LASTEXPRESS_WAITER1_H
+#define LASTEXPRESS_WAITER1_H
#include "lastexpress/entities/entity.h"
@@ -29,10 +29,10 @@ namespace LastExpress {
class LastExpressEngine;
-class Servers0 : public Entity {
+class Waiter1 : public Entity {
public:
- Servers0(LastExpressEngine *engine);
- ~Servers0() {}
+ Waiter1(LastExpressEngine *engine);
+ ~Waiter1() {}
/**
* Call a savepoint (or draw sequence in default case)
@@ -80,29 +80,24 @@ public:
*/
DECLARE_FUNCTION_1(playSound, const char *filename)
- DECLARE_FUNCTION(function7)
- DECLARE_FUNCTION(function8)
- DECLARE_FUNCTION(function9)
- DECLARE_FUNCTION(function10)
+ DECLARE_FUNCTION(rebeccaFeedUs)
+ DECLARE_FUNCTION(rebeccaClearOurTable)
+ DECLARE_FUNCTION(abbotCheckMe)
+ DECLARE_FUNCTION(abbotClearTable)
/**
* Setup Chapter 1
*/
DECLARE_FUNCTION(chapter1)
- DECLARE_FUNCTION(function12)
- DECLARE_FUNCTION(function13)
- DECLARE_FUNCTION(function14)
- DECLARE_FUNCTION(function15)
- DECLARE_FUNCTION(function16)
- DECLARE_FUNCTION(function17)
- DECLARE_FUNCTION(function18)
- DECLARE_FUNCTION(function19)
-
- /**
- * Handle Chapter 1 events
- */
- DECLARE_FUNCTION(chapter1Handler)
-
+ DECLARE_FUNCTION(annaOrder)
+ DECLARE_FUNCTION(augustOrder)
+ DECLARE_FUNCTION(serveAnna)
+ DECLARE_FUNCTION(serveAugust)
+ DECLARE_FUNCTION(clearAnna)
+ DECLARE_FUNCTION(clearTatiana)
+ DECLARE_FUNCTION(clearAugust1)
+ DECLARE_FUNCTION(clearAugust2)
+ DECLARE_FUNCTION(servingDinner)
DECLARE_FUNCTION(function21)
DECLARE_FUNCTION(function22)
@@ -110,41 +105,26 @@ public:
* Setup Chapter 2
*/
DECLARE_FUNCTION(chapter2)
-
- /**
- * Handle Chapter 2 events
- */
- DECLARE_FUNCTION(chapter2Handler)
-
- DECLARE_FUNCTION(function25)
- DECLARE_FUNCTION(function26)
+ DECLARE_FUNCTION(inKitchen)
+ DECLARE_FUNCTION(augustComeHere2)
+ DECLARE_FUNCTION(augustClearTable2)
/**
* Setup Chapter 3
*/
DECLARE_FUNCTION(chapter3)
-
- /**
- * Handle Chapter 3 events
- */
- DECLARE_FUNCTION(chapter3Handler)
-
- DECLARE_FUNCTION(augustAnnaDateOrder)
- DECLARE_FUNCTION(function30)
+ DECLARE_FUNCTION(serving3)
+ DECLARE_FUNCTION(annaComeHere3)
+ DECLARE_FUNCTION(abbotServeLunch3)
/**
* Setup Chapter 4
*/
DECLARE_FUNCTION(chapter4)
-
- /**
- * Handle Chapter 4 events
- */
- DECLARE_FUNCTION(chapter4Handler)
-
- DECLARE_FUNCTION(augustOrderSteak)
- DECLARE_FUNCTION(augustServeDuck)
- DECLARE_FUNCTION(function35)
+ DECLARE_FUNCTION(serving4)
+ DECLARE_FUNCTION(augustOrder4)
+ DECLARE_FUNCTION(serveAugust4)
+ DECLARE_FUNCTION(augustClearTable)
/**
* Setup Chapter 5
@@ -165,4 +145,4 @@ private:
} // End of namespace LastExpress
-#endif // LASTEXPRESS_SERVERS0_H
+#endif // LASTEXPRESS_WAITER1_H
diff --git a/engines/lastexpress/entities/servers1.cpp b/engines/lastexpress/entities/waiter2.cpp
index 153c2b66da..52a48a77d5 100644
--- a/engines/lastexpress/entities/servers1.cpp
+++ b/engines/lastexpress/entities/waiter2.cpp
@@ -20,7 +20,7 @@
*
*/
-#include "lastexpress/entities/servers1.h"
+#include "lastexpress/entities/waiter2.h"
#include "lastexpress/game/entities.h"
#include "lastexpress/game/logic.h"
@@ -32,61 +32,61 @@
namespace LastExpress {
-Servers1::Servers1(LastExpressEngine *engine) : Entity(engine, kEntityServers1) {
- ADD_CALLBACK_FUNCTION(Servers1, updateFromTime);
- ADD_CALLBACK_FUNCTION(Servers1, draw);
- ADD_CALLBACK_FUNCTION(Servers1, updatePosition);
- ADD_CALLBACK_FUNCTION(Servers1, callbackActionOnDirection);
- ADD_CALLBACK_FUNCTION(Servers1, callSavepoint);
- ADD_CALLBACK_FUNCTION(Servers1, playSound);
- ADD_CALLBACK_FUNCTION(Servers1, function7);
- ADD_CALLBACK_FUNCTION(Servers1, chapter1);
- ADD_CALLBACK_FUNCTION(Servers1, function9);
- ADD_CALLBACK_FUNCTION(Servers1, function10);
- ADD_CALLBACK_FUNCTION(Servers1, function11);
- ADD_CALLBACK_FUNCTION(Servers1, function12);
- ADD_CALLBACK_FUNCTION(Servers1, function13);
- ADD_CALLBACK_FUNCTION(Servers1, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Servers1, function15);
- ADD_CALLBACK_FUNCTION(Servers1, function16);
- ADD_CALLBACK_FUNCTION(Servers1, chapter2);
- ADD_CALLBACK_FUNCTION(Servers1, chapter2Handler);
- ADD_CALLBACK_FUNCTION(Servers1, function19);
- ADD_CALLBACK_FUNCTION(Servers1, function20);
- ADD_CALLBACK_FUNCTION(Servers1, function21);
- ADD_CALLBACK_FUNCTION(Servers1, chapter3);
- ADD_CALLBACK_FUNCTION(Servers1, chapter3Handler);
- ADD_CALLBACK_FUNCTION(Servers1, function24);
- ADD_CALLBACK_FUNCTION(Servers1, chapter4);
- ADD_CALLBACK_FUNCTION(Servers1, chapter4Handler);
- ADD_CALLBACK_FUNCTION(Servers1, function27);
- ADD_CALLBACK_FUNCTION(Servers1, function28);
- ADD_CALLBACK_FUNCTION(Servers1, function29);
- ADD_CALLBACK_FUNCTION(Servers1, chapter5);
- ADD_CALLBACK_FUNCTION(Servers1, chapter5Handler);
+Waiter2::Waiter2(LastExpressEngine *engine) : Entity(engine, kEntityWaiter2) {
+ ADD_CALLBACK_FUNCTION(Waiter2, updateFromTime);
+ ADD_CALLBACK_FUNCTION(Waiter2, draw);
+ ADD_CALLBACK_FUNCTION(Waiter2, updatePosition);
+ ADD_CALLBACK_FUNCTION(Waiter2, callbackActionOnDirection);
+ ADD_CALLBACK_FUNCTION(Waiter2, callSavepoint);
+ ADD_CALLBACK_FUNCTION(Waiter2, playSound);
+ ADD_CALLBACK_FUNCTION(Waiter2, monsieurServeUs);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter1);
+ ADD_CALLBACK_FUNCTION(Waiter2, milosOrder);
+ ADD_CALLBACK_FUNCTION(Waiter2, monsieurOrder);
+ ADD_CALLBACK_FUNCTION(Waiter2, clearAlexei);
+ ADD_CALLBACK_FUNCTION(Waiter2, clearMilos);
+ ADD_CALLBACK_FUNCTION(Waiter2, clearMonsieur);
+ ADD_CALLBACK_FUNCTION(Waiter2, servingDinner);
+ ADD_CALLBACK_FUNCTION(Waiter2, function15);
+ ADD_CALLBACK_FUNCTION(Waiter2, function16);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter2);
+ ADD_CALLBACK_FUNCTION(Waiter2, inKitchen);
+ ADD_CALLBACK_FUNCTION(Waiter2, tatianaClearTableB);
+ ADD_CALLBACK_FUNCTION(Waiter2, ivoComeHere);
+ ADD_CALLBACK_FUNCTION(Waiter2, ivoClearTableC);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter3);
+ ADD_CALLBACK_FUNCTION(Waiter2, serving3);
+ ADD_CALLBACK_FUNCTION(Waiter2, annaBringTea3);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter4);
+ ADD_CALLBACK_FUNCTION(Waiter2, serving4);
+ ADD_CALLBACK_FUNCTION(Waiter2, augustNeedsADrink);
+ ADD_CALLBACK_FUNCTION(Waiter2, serveAugustADrink);
+ ADD_CALLBACK_FUNCTION(Waiter2, annaNeedsADrink);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter5);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter5Handler);
ADD_NULL_FUNCTION()
}
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_NOSETUP(1, Servers1, updateFromTime)
+IMPLEMENT_FUNCTION_NOSETUP(1, Waiter2, updateFromTime)
Entity::updateFromTime(savepoint);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(2, Servers1, draw)
+IMPLEMENT_FUNCTION_S(2, Waiter2, draw)
Entity::draw(savepoint, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_SII(3, Servers1, updatePosition, CarIndex, Position)
+IMPLEMENT_FUNCTION_SII(3, Waiter2, updatePosition, CarIndex, Position)
Entity::updatePosition(savepoint, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(4, Servers1, callbackActionOnDirection)
+IMPLEMENT_FUNCTION(4, Waiter2, callbackActionOnDirection)
if (savepoint.action == kActionExcuseMeCath) {
if (!params->param1) {
- getSound()->excuseMe(kEntityServers1);
+ getSound()->excuseMe(kEntityWaiter2);
params->param1 = 1;
}
}
@@ -95,17 +95,17 @@ IMPLEMENT_FUNCTION(4, Servers1, callbackActionOnDirection)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_SIIS(5, Servers1, callSavepoint, EntityIndex, ActionIndex)
+IMPLEMENT_FUNCTION_SIIS(5, Waiter2, callSavepoint, EntityIndex, ActionIndex)
Entity::callSavepoint(savepoint, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(6, Servers1, playSound)
+IMPLEMENT_FUNCTION_S(6, Waiter2, playSound)
Entity::playSound(savepoint);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(7, Servers1, function7)
+IMPLEMENT_FUNCTION(7, Waiter2, monsieurServeUs)
switch (savepoint.action) {
default:
break;
@@ -124,19 +124,19 @@ IMPLEMENT_FUNCTION(7, Servers1, function7)
break;
case 1:
- getSavePoints()->push(kEntityServers1, kEntityBoutarel, kAction122358304);
+ getSavePoints()->push(kEntityWaiter2, kEntityBoutarel, kAction122358304);
setCallback(2);
setup_draw("008C");
break;
case 2:
- getSavePoints()->push(kEntityServers1, kEntityBoutarel, kAction122288808);
+ getSavePoints()->push(kEntityWaiter2, kEntityBoutarel, kAction122288808);
setCallback(2);
setup_draw("926");
break;
case 3:
- getEntities()->clearSequences(kEntityServers1);
+ getEntities()->clearSequences(kEntityWaiter2);
getData()->entityPosition = kPosition_5900;
ENTITY_PARAM(1, 2) = 0;
@@ -148,27 +148,27 @@ IMPLEMENT_FUNCTION(7, Servers1, function7)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(8, Servers1, chapter1)
+IMPLEMENT_FUNCTION(8, Waiter2, chapter1)
switch (savepoint.action) {
default:
break;
case kActionNone:
- setup_chapter1Handler();
+ setup_servingDinner();
break;
case kActionDefault:
- getSavePoints()->addData(kEntityServers1, kAction223002560, 0);
- getSavePoints()->addData(kEntityServers1, kAction302996448, 2);
- getSavePoints()->addData(kEntityServers1, kAction269485588, 3);
- getSavePoints()->addData(kEntityServers1, kAction326144276, 4);
- getSavePoints()->addData(kEntityServers1, kAction302203328, 5);
- getSavePoints()->addData(kEntityServers1, kAction189688608, 6);
- getSavePoints()->addData(kEntityServers1, kAction236237423, 7);
- getSavePoints()->addData(kEntityServers1, kAction219377792, 8);
- getSavePoints()->addData(kEntityServers1, kAction256200848, 9);
- getSavePoints()->addData(kEntityServers1, kAction291721418, 10);
- getSavePoints()->addData(kEntityServers1, kAction258136010, 11);
+ getSavePoints()->addData(kEntityWaiter2, kAction223002560, 0);
+ getSavePoints()->addData(kEntityWaiter2, kAction302996448, 2);
+ getSavePoints()->addData(kEntityWaiter2, kAction269485588, 3);
+ getSavePoints()->addData(kEntityWaiter2, kAction326144276, 4);
+ getSavePoints()->addData(kEntityWaiter2, kAction302203328, 5);
+ getSavePoints()->addData(kEntityWaiter2, kAction189688608, 6);
+ getSavePoints()->addData(kEntityWaiter2, kAction236237423, 7);
+ getSavePoints()->addData(kEntityWaiter2, kAction219377792, 8);
+ getSavePoints()->addData(kEntityWaiter2, kAction256200848, 9);
+ getSavePoints()->addData(kEntityWaiter2, kAction291721418, 10);
+ getSavePoints()->addData(kEntityWaiter2, kAction258136010, 11);
getData()->entityPosition = kPosition_5900;
getData()->location = kLocationOutsideCompartment;
@@ -178,7 +178,7 @@ IMPLEMENT_FUNCTION(8, Servers1, chapter1)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(9, Servers1, function9)
+IMPLEMENT_FUNCTION(9, Waiter2, milosOrder)
switch (savepoint.action) {
default:
break;
@@ -198,7 +198,7 @@ IMPLEMENT_FUNCTION(9, Servers1, function9)
case 1:
getEntities()->drawSequenceLeft(kEntityMilos, "BLANK");
- getEntities()->drawSequenceLeft(kEntityServers1, "009B");
+ getEntities()->drawSequenceLeft(kEntityWaiter2, "009B");
setCallback(2);
setup_playSound("WAT1001");
@@ -212,7 +212,7 @@ IMPLEMENT_FUNCTION(9, Servers1, function9)
break;
case 3:
- getEntities()->clearSequences(kEntityServers1);
+ getEntities()->clearSequences(kEntityWaiter2);
getData()->entityPosition = kPosition_5900;
ENTITY_PARAM(0, 1) = 0;
@@ -224,7 +224,7 @@ IMPLEMENT_FUNCTION(9, Servers1, function9)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(10, Servers1, function10)
+IMPLEMENT_FUNCTION(10, Waiter2, monsieurOrder)
switch (savepoint.action) {
default:
break;
@@ -244,21 +244,21 @@ IMPLEMENT_FUNCTION(10, Servers1, function10)
case 1:
getEntities()->drawSequenceLeft(kEntityBoutarel, "BLANK");
- getEntities()->drawSequenceLeft(kEntityServers1, "008C");
+ getEntities()->drawSequenceLeft(kEntityWaiter2, "008C");
setCallback(2);
setup_playSound("MRB1077");
break;
case 2:
- getSavePoints()->push(kEntityServers1, kEntityBoutarel, kAction168717392);
+ getSavePoints()->push(kEntityWaiter2, kEntityBoutarel, kAction168717392);
setCallback(3);
setup_draw("926");
break;
case 3:
- getEntities()->clearSequences(kEntityServers1);
+ getEntities()->clearSequences(kEntityWaiter2);
getData()->entityPosition = kPosition_5900;
ENTITY_PARAM(0, 2) = 0;
@@ -270,63 +270,63 @@ IMPLEMENT_FUNCTION(10, Servers1, function10)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(11, Servers1, function11)
+IMPLEMENT_FUNCTION(11, Waiter2, clearAlexei)
serveTable(savepoint, "919", kEntityTables1, "005H", "005J", "921", &ENTITY_PARAM(0, 3), 63);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(12, Servers1, function12)
+IMPLEMENT_FUNCTION(12, Waiter2, clearMilos)
serveTable(savepoint, "923", kEntityTables2, "009F", "009G", "926", &ENTITY_PARAM(0, 4));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(13, Servers1, function13)
+IMPLEMENT_FUNCTION(13, Waiter2, clearMonsieur)
serveTable(savepoint, "923", kEntityTables2, "009F", "009G", "926", &ENTITY_PARAM(0, 5));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(14, Servers1, chapter1Handler)
+IMPLEMENT_FUNCTION(14, Waiter2, servingDinner)
switch (savepoint.action) {
default:
break;
case kActionDefault:
- if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ if (!getEntities()->isInKitchen(kEntityWaiter2) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
break;
if (ENTITY_PARAM(0, 1)) {
setCallback(1);
- setup_function9();
+ setup_milosOrder();
break;
}
if (ENTITY_PARAM(1, 2)) {
setCallback(2);
- setup_function10();
+ setup_monsieurOrder();
break;
}
if (ENTITY_PARAM(0, 3)) {
setCallback(3);
- setup_function11();
+ setup_clearAlexei();
break;
}
if (ENTITY_PARAM(0, 4)) {
setCallback(4);
- setup_function12();
+ setup_clearMilos();
break;
}
if (ENTITY_PARAM(0, 5)) {
setCallback(5);
- setup_function13();
+ setup_clearMonsieur();
}
break;
case kActionCallback:
if (getCallback() == 5) {
- getSavePoints()->push(kEntityServers1, kEntityPascale, kAction352768896);
+ getSavePoints()->push(kEntityWaiter2, kEntityPascale, kAction352768896);
setup_function15();
}
break;
@@ -334,7 +334,7 @@ switch (savepoint.action) {
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(15, Servers1, function15)
+IMPLEMENT_FUNCTION(15, Waiter2, function15)
switch (savepoint.action) {
default:
break;
@@ -350,28 +350,28 @@ IMPLEMENT_FUNCTION(15, Servers1, function15)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(16, Servers1, function16)
+IMPLEMENT_FUNCTION(16, Waiter2, function16)
if (savepoint.action == kActionDefault) {
getData()->entityPosition = kPosition_5900;
getData()->location = kLocationOutsideCompartment;
getData()->car = kCarRestaurant;
- getEntities()->clearSequences(kEntityServers1);
+ getEntities()->clearSequences(kEntityWaiter2);
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(17, Servers1, chapter2)
+IMPLEMENT_FUNCTION(17, Waiter2, chapter2)
switch (savepoint.action) {
default:
break;
case kActionNone:
- setup_chapter2Handler();
+ setup_inKitchen();
break;
case kActionDefault:
- getEntities()->clearSequences(kEntityServers1);
+ getEntities()->clearSequences(kEntityWaiter2);
getData()->entityPosition = kPosition_5900;
getData()->location = kLocationOutsideCompartment;
@@ -387,32 +387,32 @@ IMPLEMENT_FUNCTION(17, Servers1, chapter2)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(18, Servers1, chapter2Handler)
+IMPLEMENT_FUNCTION(18, Waiter2, inKitchen)
switch (savepoint.action) {
default:
break;
case kActionNone:
- if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ if (!getEntities()->isInKitchen(kEntityWaiter2) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
break;
if (ENTITY_PARAM(0, 6)) {
setCallback(1);
- setup_function19();
+ setup_tatianaClearTableB();
break;
}
label_callback_1:
if (ENTITY_PARAM(0, 7)) {
setCallback(2);
- setup_function20();
+ setup_ivoComeHere();
break;
}
label_callback_2:
if (ENTITY_PARAM(0, 8) || ENTITY_PARAM(0, 5)) {
setCallback(3);
- setup_function21();
+ setup_ivoClearTableC();
}
break;
@@ -428,7 +428,7 @@ label_callback_2:
goto label_callback_2;
case 4:
- getEntities()->clearSequences(kEntityServers1);
+ getEntities()->clearSequences(kEntityWaiter2);
getData()->entityPosition = kPosition_5900;
break;
}
@@ -442,12 +442,12 @@ label_callback_2:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(19, Servers1, function19)
+IMPLEMENT_FUNCTION(19, Waiter2, tatianaClearTableB)
serveTable(savepoint, "969", kEntityTables1, "005H2", "018A", "971", &ENTITY_PARAM(0, 6), 63);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(20, Servers1, function20)
+IMPLEMENT_FUNCTION(20, Waiter2, ivoComeHere)
switch (savepoint.action) {
default:
break;
@@ -462,8 +462,8 @@ IMPLEMENT_FUNCTION(20, Servers1, function20)
case kActionCallback:
if (getCallback() == 1) {
- getSavePoints()->push(kEntityServers1, kEntityIvo, kAction123712592);
- getEntities()->drawSequenceLeft(kEntityServers1, "BLANK");
+ getSavePoints()->push(kEntityWaiter2, kEntityIvo, kAction123712592);
+ getEntities()->drawSequenceLeft(kEntityWaiter2, "BLANK");
ENTITY_PARAM(0, 7) = 0;
callbackAction();
@@ -473,22 +473,22 @@ IMPLEMENT_FUNCTION(20, Servers1, function20)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(21, Servers1, function21)
+IMPLEMENT_FUNCTION(21, Waiter2, ivoClearTableC)
serveTable(savepoint, "974", kEntityTables2, "009F2", "009G", "976", &ENTITY_PARAM(0, 8), 0, true, &ENTITY_PARAM(0, 5));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(22, Servers1, chapter3)
+IMPLEMENT_FUNCTION(22, Waiter2, chapter3)
switch (savepoint.action) {
default:
break;
case kActionNone:
- setup_chapter3Handler();
+ setup_serving3();
break;
case kActionDefault:
- getEntities()->clearSequences(kEntityServers1);
+ getEntities()->clearSequences(kEntityWaiter2);
getData()->entityPosition = kPosition_5900;
getData()->location = kLocationOutsideCompartment;
@@ -503,49 +503,49 @@ IMPLEMENT_FUNCTION(22, Servers1, chapter3)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(23, Servers1, chapter3Handler)
+IMPLEMENT_FUNCTION(23, Waiter2, serving3)
if (savepoint.action != kActionNone)
return;
- if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ if (!getEntities()->isInKitchen(kEntityWaiter2) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
return;
if (ENTITY_PARAM(1, 1)) {
setCallback(1);
- setup_function24();
+ setup_annaBringTea3();
return;
}
if (ENTITY_PARAM(1, 2)) {
setCallback(2);
- setup_function7();
+ setup_monsieurServeUs();
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(24, Servers1, function24)
+IMPLEMENT_FUNCTION(24, Waiter2, annaBringTea3)
serveSalon(savepoint, "927", "Ann3143A", kEntityAnna, "Ann31444", "112C", kAction122288808, "928", &ENTITY_PARAM(1, 1));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(25, Servers1, chapter4)
+IMPLEMENT_FUNCTION(25, Waiter2, chapter4)
switch (savepoint.action) {
default:
break;
case kActionNone:
- setup_chapter4Handler();
+ setup_serving4();
break;
case kActionDefault:
- getEntities()->clearSequences(kEntityServers1);
+ getEntities()->clearSequences(kEntityWaiter2);
getData()->entityPosition = kPosition_5900;
getData()->location = kLocationOutsideCompartment;
getData()->car = kCarRestaurant;
getData()->inventoryItem = kItemNone;
- getEntities()->clearSequences(kEntityServers1);
+ getEntities()->clearSequences(kEntityWaiter2);
ENTITY_PARAM(1, 2) = 0;
ENTITY_PARAM(1, 3) = 0;
@@ -556,7 +556,7 @@ IMPLEMENT_FUNCTION(25, Servers1, chapter4)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(26, Servers1, chapter4Handler)
+IMPLEMENT_FUNCTION(26, Waiter2, serving4)
switch (savepoint.action) {
default:
break;
@@ -569,24 +569,30 @@ IMPLEMENT_FUNCTION(26, Servers1, chapter4Handler)
}
}
- if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ if (!getEntities()->isInKitchen(kEntityWaiter2) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
break;
+ if (ENTITY_PARAM(1, 3)) {
+ setCallback(1);
+ setup_augustNeedsADrink();
+ break;
+ }
+
if (ENTITY_PARAM(1, 5)) {
setCallback(2);
- setup_function28();
+ setup_serveAugustADrink();
break;
}
if (ENTITY_PARAM(1, 4)) {
setCallback(3);
- setup_function29();
+ setup_annaNeedsADrink();
break;
}
if (ENTITY_PARAM(1, 2)) {
setCallback(4);
- setup_function7();
+ setup_monsieurServeUs();
}
break;
@@ -608,22 +614,22 @@ IMPLEMENT_FUNCTION(26, Servers1, chapter4Handler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(27, Servers1, function27)
+IMPLEMENT_FUNCTION(27, Waiter2, augustNeedsADrink)
serveSalon(savepoint, "929", "", kEntityAugust, "Aug4003", "122D", kAction134486752, "930", &ENTITY_PARAM(1, 3));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(28, Servers1, function28)
+IMPLEMENT_FUNCTION(28, Waiter2, serveAugustADrink)
serveSalon(savepoint, "931", "", kEntityAugust, "Aug4004", "122E", kAction125826561, "930", &ENTITY_PARAM(1, 5));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(29, Servers1, function29)
+IMPLEMENT_FUNCTION(29, Waiter2, annaNeedsADrink)
serveSalon(savepoint, "932", "", kEntityAnna, "Ann4151", "127D", kAction122288808, "930", &ENTITY_PARAM(1, 4));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(30, Servers1, chapter5)
+IMPLEMENT_FUNCTION(30, Waiter2, chapter5)
switch (savepoint.action) {
default:
break;
@@ -633,7 +639,7 @@ IMPLEMENT_FUNCTION(30, Servers1, chapter5)
break;
case kActionDefault:
- getEntities()->clearSequences(kEntityServers1);
+ getEntities()->clearSequences(kEntityWaiter2);
getData()->entityPosition = kPosition_3969;
getData()->location = kLocationInsideCompartment;
@@ -644,19 +650,19 @@ IMPLEMENT_FUNCTION(30, Servers1, chapter5)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(31, Servers1, chapter5Handler)
+IMPLEMENT_FUNCTION(31, Waiter2, chapter5Handler)
if (savepoint.action == kActionProceedChapter5)
setup_nullfunction();
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_NULL_FUNCTION(32, Servers1)
+IMPLEMENT_NULL_FUNCTION(32, Waiter2)
//////////////////////////////////////////////////////////////////////////
// Private functions
//////////////////////////////////////////////////////////////////////////
-void Servers1::serveTable(const SavePoint &savepoint, const char *seq1, EntityIndex entity, const char *seq2, const char *seq3, const char *seq4, uint *parameter, Position position, bool shouldUpdatePosition, uint *parameter2) {
+void Waiter2::serveTable(const SavePoint &savepoint, const char *seq1, EntityIndex entity, const char *seq2, const char *seq3, const char *seq4, uint *parameter, Position position, bool shouldUpdatePosition, uint *parameter2) {
switch (savepoint.action) {
default:
break;
@@ -678,9 +684,9 @@ void Servers1::serveTable(const SavePoint &savepoint, const char *seq1, EntityIn
case 1:
if (position)
- getEntities()->updatePositionEnter(kEntityServers1, kCarRestaurant, position);
+ getEntities()->updatePositionEnter(kEntityWaiter2, kCarRestaurant, position);
- getSavePoints()->push(kEntityServers1, entity, kAction136455232);
+ getSavePoints()->push(kEntityWaiter2, entity, kAction136455232);
setCallback(2);
setup_callSavepoint(seq2, entity, kActionDrawTablesWithChairs, seq3);
@@ -688,7 +694,7 @@ void Servers1::serveTable(const SavePoint &savepoint, const char *seq1, EntityIn
case 2:
if (position)
- getEntities()->updatePositionExit(kEntityServers1, kCarRestaurant, position);
+ getEntities()->updatePositionExit(kEntityWaiter2, kCarRestaurant, position);
setCallback(3);
setup_draw(seq4);
@@ -696,7 +702,7 @@ void Servers1::serveTable(const SavePoint &savepoint, const char *seq1, EntityIn
case 3:
getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers1);
+ getEntities()->clearSequences(kEntityWaiter2);
*parameter = 0;
if (parameter2 != NULL)
@@ -710,7 +716,7 @@ void Servers1::serveTable(const SavePoint &savepoint, const char *seq1, EntityIn
}
//////////////////////////////////////////////////////////////////////////
-void Servers1::serveSalon(const SavePoint &savepoint, const char *seq1, const char *snd1, EntityIndex entity, const char *snd2, const char *seq2, ActionIndex action, const char *seq3, uint *parameter) {
+void Waiter2::serveSalon(const SavePoint &savepoint, const char *seq1, const char *snd1, EntityIndex entity, const char *snd2, const char *seq2, ActionIndex action, const char *seq3, uint *parameter) {
switch (savepoint.action) {
default:
break;
@@ -729,46 +735,46 @@ void Servers1::serveSalon(const SavePoint &savepoint, const char *seq1, const ch
break;
case 1:
- getEntities()->drawSequenceRight(kEntityServers1, seq1);
+ getEntities()->drawSequenceRight(kEntityWaiter2, seq1);
if (getEntities()->isInRestaurant(kEntityPlayer))
- getEntities()->updateFrame(kEntityServers1);
+ getEntities()->updateFrame(kEntityWaiter2);
if (!strcmp(snd1, ""))
- getSound()->playSound(kEntityServers1, snd1);
+ getSound()->playSound(kEntityWaiter2, snd1);
setCallback(2);
setup_callbackActionOnDirection();
break;
case 2:
- getSavePoints()->push(kEntityServers1, entity, kAction122358304);
+ getSavePoints()->push(kEntityWaiter2, entity, kAction122358304);
- getSound()->playSound(kEntityServers1, snd2);
+ getSound()->playSound(kEntityWaiter2, snd2);
setCallback(3);
setup_updatePosition(seq2, kCarRestaurant, 57);
break;
case 3:
- getSavePoints()->push(kEntityServers1, entity, action);
+ getSavePoints()->push(kEntityWaiter2, entity, action);
setCallback(4);
setup_draw(seq3);
break;
case 4:
- getEntities()->drawSequenceRight(kEntityServers1, "816UD");
+ getEntities()->drawSequenceRight(kEntityWaiter2, "816UD");
if (getEntities()->isInSalon(kEntityPlayer))
- getEntities()->updateFrame(kEntityServers1);
+ getEntities()->updateFrame(kEntityWaiter2);
setCallback(5);
setup_callbackActionOnDirection();
break;
case 5:
- getEntities()->clearSequences(kEntityServers1);
+ getEntities()->clearSequences(kEntityWaiter2);
getData()->entityPosition = kPosition_5900;
*parameter = 0;
diff --git a/engines/lastexpress/entities/servers1.h b/engines/lastexpress/entities/waiter2.h
index 58566cd4d3..e8dc8f48e0 100644
--- a/engines/lastexpress/entities/servers1.h
+++ b/engines/lastexpress/entities/waiter2.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef LASTEXPRESS_SERVERS1_H
-#define LASTEXPRESS_SERVERS1_H
+#ifndef LASTEXPRESS_WAITER2_H
+#define LASTEXPRESS_WAITER2_H
#include "lastexpress/entities/entity.h"
@@ -29,10 +29,10 @@ namespace LastExpress {
class LastExpressEngine;
-class Servers1 : public Entity {
+class Waiter2 : public Entity {
public:
- Servers1(LastExpressEngine *engine);
- ~Servers1() {}
+ Waiter2(LastExpressEngine *engine);
+ ~Waiter2() {}
/**
* Updates parameter 2 using time value
@@ -80,24 +80,19 @@ public:
*/
DECLARE_FUNCTION_1(playSound, const char *filename)
- DECLARE_FUNCTION(function7)
+ DECLARE_FUNCTION(monsieurServeUs)
/**
* Setup Chapter 1
*/
DECLARE_FUNCTION(chapter1)
- DECLARE_FUNCTION(function9)
- DECLARE_FUNCTION(function10)
- DECLARE_FUNCTION(function11)
- DECLARE_FUNCTION(function12)
- DECLARE_FUNCTION(function13)
-
- /**
- * Handle Chapter 1 events
- */
- DECLARE_FUNCTION(chapter1Handler)
-
+ DECLARE_FUNCTION(milosOrder)
+ DECLARE_FUNCTION(monsieurOrder)
+ DECLARE_FUNCTION(clearAlexei)
+ DECLARE_FUNCTION(clearMilos)
+ DECLARE_FUNCTION(clearMonsieur)
+ DECLARE_FUNCTION(servingDinner)
DECLARE_FUNCTION(function15)
DECLARE_FUNCTION(function16)
@@ -105,41 +100,26 @@ public:
* Setup Chapter 2
*/
DECLARE_FUNCTION(chapter2)
-
- /**
- * Handle Chapter 2 events
- */
- DECLARE_FUNCTION(chapter2Handler)
-
- DECLARE_FUNCTION(function19)
- DECLARE_FUNCTION(function20)
- DECLARE_FUNCTION(function21)
+ DECLARE_FUNCTION(inKitchen)
+ DECLARE_FUNCTION(tatianaClearTableB)
+ DECLARE_FUNCTION(ivoComeHere)
+ DECLARE_FUNCTION(ivoClearTableC)
/**
* Setup Chapter 3
*/
DECLARE_FUNCTION(chapter3)
-
- /**
- * Handle Chapter 3 events
- */
- DECLARE_FUNCTION(chapter3Handler)
-
- DECLARE_FUNCTION(function24)
+ DECLARE_FUNCTION(serving3)
+ DECLARE_FUNCTION(annaBringTea3)
/**
* Setup Chapter 4
*/
DECLARE_FUNCTION(chapter4)
-
- /**
- * Handle Chapter 4 events
- */
- DECLARE_FUNCTION(chapter4Handler)
-
- DECLARE_FUNCTION(function27)
- DECLARE_FUNCTION(function28)
- DECLARE_FUNCTION(function29)
+ DECLARE_FUNCTION(serving4)
+ DECLARE_FUNCTION(augustNeedsADrink)
+ DECLARE_FUNCTION(serveAugustADrink)
+ DECLARE_FUNCTION(annaNeedsADrink)
/**
* Setup Chapter 5
@@ -160,4 +140,4 @@ private:
} // End of namespace LastExpress
-#endif // LASTEXPRESS_SERVERS1_H
+#endif // LASTEXPRESS_WAITER2_H
diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp
index 986c56cb1b..96b97db939 100644
--- a/engines/lastexpress/game/action.cpp
+++ b/engines/lastexpress/game/action.cpp
@@ -1456,7 +1456,7 @@ IMPLEMENT_ACTION(playMusicChapterSetupTrain)
if (!getSoundQueue()->isBuffered(filename) && hotspot.param3 & id) {
getSound()->playSound(kEntityPlayer, filename, kFlagDefault);
- getSavePoints()->call(kEntityPlayer, kEntityTrain, kAction203863200, filename.c_str());
+ getSavePoints()->call(kEntityPlayer, kEntityTrain, kAction203863200, filename);
getSavePoints()->push(kEntityPlayer, kEntityTrain, kAction222746496, hotspot.param2);
}
diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp
index b4b5527f8d..b881d34ebe 100644
--- a/engines/lastexpress/game/entities.cpp
+++ b/engines/lastexpress/game/entities.cpp
@@ -51,8 +51,6 @@
#include "lastexpress/entities/pascale.h"
#include "lastexpress/entities/rebecca.h"
#include "lastexpress/entities/salko.h"
-#include "lastexpress/entities/servers0.h"
-#include "lastexpress/entities/servers1.h"
#include "lastexpress/entities/sophie.h"
#include "lastexpress/entities/tables.h"
#include "lastexpress/entities/tatiana.h"
@@ -60,6 +58,8 @@
#include "lastexpress/entities/vassili.h"
#include "lastexpress/entities/verges.h"
#include "lastexpress/entities/vesna.h"
+#include "lastexpress/entities/waiter1.h"
+#include "lastexpress/entities/waiter2.h"
#include "lastexpress/entities/yasmin.h"
// Game
@@ -134,8 +134,8 @@ Entities::Entities(LastExpressEngine *engine) : _engine(engine) {
ADD_ENTITY(Mertens);
ADD_ENTITY(Coudert);
ADD_ENTITY(Pascale);
- ADD_ENTITY(Servers0);
- ADD_ENTITY(Servers1);
+ ADD_ENTITY(Waiter1);
+ ADD_ENTITY(Waiter2);
ADD_ENTITY(Cooks);
ADD_ENTITY(Verges);
ADD_ENTITY(Tatiana);
@@ -389,7 +389,6 @@ void Entities::resetState(EntityIndex entityIndex) {
getLogic()->updateCursor();
}
-
void Entities::updateFields() const {
if (!getFlags()->isGameRunning)
return;
@@ -897,7 +896,6 @@ void Entities::computeCurrentFrame(EntityIndex entityIndex) const {
}
break;
-
case kDirectionLeft:
if (data->currentFrame == -1 || data->currentFrame >= (int32)data->sequence->count()) {
data->currentFrame = 0;
@@ -1772,8 +1770,7 @@ void Entities::enterCompartment(EntityIndex entity, ObjectIndex compartment, boo
// Update compartments
int index = (compartment < 32 ? compartment - 1 : compartment - 24);
- if (index >= 16)
- error("[Entities::enterCompartment] Invalid compartment index");
+ assert(index < 16);
if (useCompartment1)
_compartments1[index] |= STORE_VALUE(entity);
@@ -1858,8 +1855,7 @@ void Entities::exitCompartment(EntityIndex entity, ObjectIndex compartment, bool
// Update compartments
int index = (compartment < 32 ? compartment - 1 : compartment - 24);
- if (index >= 16)
- error("[Entities::exitCompartment] Invalid compartment index");
+ assert(index < 16);
if (useCompartment1)
_compartments1[index] &= ~STORE_VALUE(entity);
diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp
index 9e02b3bc1d..622d547542 100644
--- a/engines/lastexpress/game/inventory.cpp
+++ b/engines/lastexpress/game/inventory.cpp
@@ -40,7 +40,6 @@
#include "lastexpress/lastexpress.h"
#include "lastexpress/resource.h"
-
namespace LastExpress {
Inventory::Inventory(LastExpressEngine *engine) : _engine(engine), _selectedItem(kItemNone), _highlightedItemIndex(0), _itemsShown(0),
@@ -534,18 +533,18 @@ Common::String Inventory::toString() {
// Private methods
//////////////////////////////////////////////////////////////////////////
InventoryItem Inventory::getFirstExaminableItem() const {
-
int index = 0;
- InventoryEntry entry = _entries[index];
- while (!entry.inPocket || !entry.cursor || entry.floating) {
- index++;
- entry = _entries[index];
+ do {
+ InventoryEntry entry = _entries[index];
- if (index >= kPortraitOriginal)
- return kItemNone;
- }
+ // Check if it is an examinable item
+ if (entry.inPocket && entry.cursor && !entry.floating)
+ return (InventoryItem)index;
+
+ index++;
+ } while (index < kPortraitOriginal);
- return (InventoryItem)index;
+ return kItemNone;
}
bool Inventory::isItemSceneParameter(InventoryItem item) const {
diff --git a/engines/lastexpress/game/savepoint.cpp b/engines/lastexpress/game/savepoint.cpp
index b0186a4ccc..a8483e6d5c 100644
--- a/engines/lastexpress/game/savepoint.cpp
+++ b/engines/lastexpress/game/savepoint.cpp
@@ -28,7 +28,6 @@
#include "lastexpress/lastexpress.h"
-
namespace LastExpress {
SavePoints::SavePoints(LastExpressEngine *engine) : _engine(engine) {
@@ -57,7 +56,7 @@ void SavePoints::push(EntityIndex entity2, EntityIndex entity1, ActionIndex acti
_savepoints.push_back(point);
}
-void SavePoints::push(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const char *param) {
+void SavePoints::push(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const Common::String param) {
if (_savepoints.size() >= _savePointsMaxSize)
return;
@@ -65,7 +64,9 @@ void SavePoints::push(EntityIndex entity2, EntityIndex entity1, ActionIndex acti
point.entity1 = entity1;
point.action = action;
point.entity2 = entity2;
- strcpy((char *)&point.param.charValue, param);
+
+ assert(param.size() <= 5);
+ strncpy((char *)&point.param.charValue, param.c_str(), 5);
_savepoints.push_back(point);
}
@@ -76,7 +77,6 @@ SavePoint SavePoints::pop() {
return point;
}
-
void SavePoints::pushAll(EntityIndex entity, ActionIndex action, uint32 param) {
for (uint32 index = 1; index < 40; index++) {
if ((EntityIndex)index != entity)
@@ -156,16 +156,18 @@ void SavePoints::call(EntityIndex entity2, EntityIndex entity1, ActionIndex acti
}
}
-void SavePoints::call(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const char *param) const {
+void SavePoints::call(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const Common::String param) const {
SavePoint point;
point.entity1 = entity1;
point.action = action;
point.entity2 = entity2;
- strcpy((char *)&point.param.charValue, param);
+
+ assert(param.size() <= 5);
+ strncpy((char *)&point.param.charValue, param.c_str(), 5);
Callback *callback = getCallback(entity1);
if (callback != NULL && callback->isValid()) {
- debugC(8, kLastExpressDebugLogic, "Savepoint: entity1=%s, action=%s, entity2=%s, param=%s", ENTITY_NAME(entity1), ACTION_NAME(action), ENTITY_NAME(entity2), param);
+ debugC(8, kLastExpressDebugLogic, "Savepoint: entity1=%s, action=%s, entity2=%s, param=%s", ENTITY_NAME(entity1), ACTION_NAME(action), ENTITY_NAME(entity2), param.c_str());
(*callback)(point);
}
}
diff --git a/engines/lastexpress/game/savepoint.h b/engines/lastexpress/game/savepoint.h
index 068c54eb0f..ab6490796b 100644
--- a/engines/lastexpress/game/savepoint.h
+++ b/engines/lastexpress/game/savepoint.h
@@ -101,7 +101,7 @@ public:
// Savepoints
void push(EntityIndex entity2, EntityIndex entity1, ActionIndex action, uint32 param = 0);
- void push(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const char *param);
+ void push(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const Common::String param);
void pushAll(EntityIndex entity, ActionIndex action, uint32 param = 0);
void process();
void reset();
@@ -113,7 +113,7 @@ public:
void setCallback(EntityIndex index, Callback *callback);
Callback *getCallback(EntityIndex entity) const;
void call(EntityIndex entity2, EntityIndex entity1, ActionIndex action, uint32 param = 0) const;
- void call(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const char *param) const;
+ void call(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const Common::String param) const;
void callAndProcess();
// Serializable
diff --git a/engines/lastexpress/lastexpress.cpp b/engines/lastexpress/lastexpress.cpp
index 293c3ab725..90b684ab0b 100644
--- a/engines/lastexpress/lastexpress.cpp
+++ b/engines/lastexpress/lastexpress.cpp
@@ -48,7 +48,7 @@
const char *g_actionNames[] = {"None", "Action1", "Action2", "ExitCompartment", "Action4", "ExcuseMeCath", "ExcuseMe", "INVALID", "Knock", "OpenDoor", "Action10", "Action11", "Default", "INVALID", "INVALID", "INVALID", "Action16", "DrawScene", "Callback"};
const char *g_directionNames[] = { "None", "Up", "Down", "Left", "Right", "Switch"};
-const char *g_entityNames[] = { "Player", "Anna", "August", "Mertens", "Coudert", "Pascale", "Servers0", "Servers1", "Cooks", "Verges", "Tatiana", "Vassili", "Alexei", "Abbot", "Milos", "Vesna", "Ivo", "Salko", "Kronos", "Kahina", "Francois", "MmeBoutarel", "Boutarel", "Rebecca", "Sophie", "Mahmud", "Yasmin", "Hadija", "Alouan", "Gendarmes", "Max", "Chapters", "Train", "Tables0", "Tables1", "Tables2", "Tables3", "Tables4", "Tables5", "Entity39"};
+const char *g_entityNames[] = { "Player", "Anna", "August", "Mertens", "Coudert", "Pascale", "Waiter1", "Waiter2", "Cooks", "Verges", "Tatiana", "Vassili", "Alexei", "Abbot", "Milos", "Vesna", "Ivo", "Salko", "Kronos", "Kahina", "Francois", "MmeBoutarel", "Boutarel", "Rebecca", "Sophie", "Mahmud", "Yasmin", "Hadija", "Alouan", "Gendarmes", "Max", "Chapters", "Train", "Tables0", "Tables1", "Tables2", "Tables3", "Tables4", "Tables5", "Entity39"};
namespace LastExpress {
diff --git a/engines/lastexpress/module.mk b/engines/lastexpress/module.mk
index 8b3287d5d7..afce0b0749 100644
--- a/engines/lastexpress/module.mk
+++ b/engines/lastexpress/module.mk
@@ -35,8 +35,6 @@ MODULE_OBJS := \
entities/pascale.o \
entities/rebecca.o \
entities/salko.o \
- entities/servers0.o \
- entities/servers1.o \
entities/sophie.o \
entities/tables.o \
entities/tatiana.o \
@@ -44,6 +42,8 @@ MODULE_OBJS := \
entities/vassili.o \
entities/verges.o \
entities/vesna.o \
+ entities/waiter1.o \
+ entities/waiter2.o \
entities/yasmin.o \
fight/fight.o \
fight/fighter.o \
diff --git a/engines/lastexpress/shared.h b/engines/lastexpress/shared.h
index c0099db7ac..724c4b3fb4 100644
--- a/engines/lastexpress/shared.h
+++ b/engines/lastexpress/shared.h
@@ -1006,8 +1006,8 @@ enum EntityIndex {
kEntityMertens,
kEntityCoudert,
kEntityPascale, // 5
- kEntityServers0,
- kEntityServers1,
+ kEntityWaiter1,
+ kEntityWaiter2,
kEntityCooks,
kEntityVerges,
kEntityTatiana, // 10
@@ -1409,7 +1409,7 @@ enum ActionIndex {
kAction169032608 = 169032608,
kAction189426612 = 189426612,
kAction203859488 = 203859488,
- kAction219522616 = 219522616, // Servers0
+ kAction219522616 = 219522616, // Waiter1
kAction225182640 = 225182640,
kAction235257824 = 235257824,
@@ -1520,7 +1520,7 @@ enum ActionIndex {
kAction71277948 = 71277948,
kAction158007856 = 158007856,
kAction101687594 = 101687594,
- kAction122358304 = 122358304, // also Servers1/Boutarel?
+ kAction122358304 = 122358304, // also Waiter2/Boutarel?
kActionMaxFreeFromCage = 135204609,
kAction156622016 = 156622016,
diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp
index 6bf1ebc9de..697e6e1269 100644
--- a/engines/lastexpress/sound/entry.cpp
+++ b/engines/lastexpress/sound/entry.cpp
@@ -33,7 +33,6 @@
#include "lastexpress/lastexpress.h"
#include "lastexpress/resource.h"
-
namespace LastExpress {
#define SOUNDCACHE_ENTRY_SIZE 92160
@@ -267,6 +266,8 @@ void SoundEntry::update(uint val) {
}
bool SoundEntry::updateSound() {
+ assert(_name2.size() <= 16);
+
bool result;
char sub[16];
@@ -279,6 +280,7 @@ bool SoundEntry::updateSound() {
_status.status &= ~0x8000;
strcpy(sub, _name2.c_str());
+ // FIXME: Rewrite and document expected behavior
int l = strlen(sub) + 1;
if (l - 1 > 4)
sub[l - (1 + 4)] = 0;
@@ -361,7 +363,10 @@ void SoundEntry::showSubtitle(Common::String filename) {
}
void SoundEntry::saveLoadWithSerializer(Common::Serializer &s) {
- if (_name2.matchString("NISSND?") && (_status.status & kFlagType7) != kFlag3) {
+ assert(_name1.size() <= 16);
+ assert(_name2.size() <= 16);
+
+ if (_name2.matchString("NISSND?") && (_status.status & kFlagType9) != kFlag3) {
s.syncAsUint32LE(_status.status);
s.syncAsUint32LE(_type);
s.syncAsUint32LE(_blockCount); // field_8;
diff --git a/engines/lastexpress/sound/sound.cpp b/engines/lastexpress/sound/sound.cpp
index 5f55f4e74e..3a2d0c075c 100644
--- a/engines/lastexpress/sound/sound.cpp
+++ b/engines/lastexpress/sound/sound.cpp
@@ -984,22 +984,22 @@ void SoundManager::excuseMe(EntityIndex entity, EntityIndex entity2, SoundFlag f
playSound(kEntityPlayer, (rnd(2) ? "HDE1002" : "HED1002A"), flag);
break;
- case kEntityServers0:
- case kEntityServers1:
+ case kEntityWaiter1:
+ case kEntityWaiter2:
switch(rnd(3)) {
default:
break;
case 0:
- playSound(kEntityPlayer, (entity == kEntityServers0) ? "WAT1002" : "WAT1003", flag);
+ playSound(kEntityPlayer, (entity == kEntityWaiter1) ? "WAT1002" : "WAT1003", flag);
break;
case 1:
- playSound(kEntityPlayer, (entity == kEntityServers0) ? "WAT1002A" : "WAT1003A", flag);
+ playSound(kEntityPlayer, (entity == kEntityWaiter1) ? "WAT1002A" : "WAT1003A", flag);
break;
case 2:
- playSound(kEntityPlayer, (entity == kEntityServers0) ? "WAT1002B" : "WAT1003B", flag);
+ playSound(kEntityPlayer, (entity == kEntityWaiter1) ? "WAT1002B" : "WAT1003B", flag);
break;
}
break;
diff --git a/engines/made/database.cpp b/engines/made/database.cpp
index 85a8a5ca4a..a9855ba1fe 100644
--- a/engines/made/database.cpp
+++ b/engines/made/database.cpp
@@ -456,7 +456,7 @@ void GameDatabaseV2::load(Common::SeekableReadStream &sourceS) {
for (int section = 0; section < 2; section++) {
while (!sourceS.eos()) {
int16 objIndex = sourceS.readUint16LE();
- debug("objIndex = %04X; section = %d", objIndex, section);
+ debug(1, "objIndex = %04X; section = %d", objIndex, section);
if (objIndex == 0)
break;
Object *obj = new ObjectV1();
diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp
index 1bb328c7a2..2c75965976 100644
--- a/engines/made/resource.cpp
+++ b/engines/made/resource.cpp
@@ -441,7 +441,8 @@ void ResourceReader::openResourceBlocks() {
}
void ResourceReader::openResourceBlock(const char *filename, Common::File *blockFile, uint32 resType) {
- blockFile->open(filename);
+ if (!blockFile->open(filename))
+ error("Failed to open '%s'", filename);
blockFile->readUint16LE(); // Skip unused
uint16 count = blockFile->readUint16LE();
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp
index c27b781dda..edccb68953 100644
--- a/engines/made/screen.cpp
+++ b/engines/made/screen.cpp
@@ -368,6 +368,9 @@ uint16 Screen::drawFlex(uint16 flexIndex, int16 x, int16 y, int16 flipX, int16 f
return 0;
PictureResource *flex = _vm->_res->getPicture(flexIndex);
+ if (!flex)
+ error("Failed to find picture %d", flexIndex);
+
Graphics::Surface *sourceSurface = flex->getPicture();
drawSurface(sourceSurface, x, y, flipX, flipY, mask, clipInfo);
diff --git a/engines/mads/debugger.cpp b/engines/mads/debugger.cpp
index 1ff42c5e2b..6bc6cf572d 100644
--- a/engines/mads/debugger.cpp
+++ b/engines/mads/debugger.cpp
@@ -21,6 +21,7 @@
*/
#include "common/file.h"
+#include "mads/compression.h"
#include "mads/mads.h"
#include "mads/debugger.h"
@@ -169,8 +170,10 @@ bool Debugger::Cmd_ShowCodes(int argc, const char **argv) {
}
bool Debugger::Cmd_DumpFile(int argc, const char **argv) {
- if (argc != 2) {
- debugPrintf("Usage: %s <resource>\n", argv[0]);
+ if (argc < 2) {
+ debugPrintf("Usage: %s <resource> <unpack>\n", argv[0]);
+ debugPrintf(" resource: the resource name\n");
+ debugPrintf(" unpack: optional, when specified, the FAB/MADSPACK compressed resource is unpacked\n");
} else {
Common::DumpFile outFile;
Common::File inFile;
@@ -179,10 +182,32 @@ bool Debugger::Cmd_DumpFile(int argc, const char **argv) {
debugPrintf("Specified resource does not exist\n");
} else {
outFile.open(argv[1]);
- byte *data = new byte[inFile.size()];
-
- inFile.read(data, inFile.size());
- outFile.write(data, inFile.size());
+ bool unpack = ((argc >= 3) && !scumm_stricmp(argv[2], "unpack"));
+
+ byte *data;
+ int totalSize = 0;
+
+ if (!unpack) {
+ totalSize = inFile.size();
+ data = new byte[totalSize];
+ inFile.read(data, totalSize);
+ } else {
+ MadsPack dataPack(&inFile);
+ int count = dataPack.getCount();
+ for (int i = 0; i < count; i++) {
+ totalSize += dataPack.getItem(i)._size;
+ }
+ data = new byte[totalSize];
+ byte *ptr = data;
+
+ for (int i = 0; i < count; i++) {
+ Common::SeekableReadStream *readStream = dataPack.getItemStream(i);
+ readStream->read(ptr, readStream->size());
+ ptr += readStream->size();
+ }
+ }
+
+ outFile.write(data, totalSize);
outFile.flush();
delete[] data;
diff --git a/engines/mads/dialogs.h b/engines/mads/dialogs.h
index aad29f6551..c586a6f1fe 100644
--- a/engines/mads/dialogs.h
+++ b/engines/mads/dialogs.h
@@ -201,7 +201,9 @@ public:
enum DialogId {
DIALOG_NONE = 0, DIALOG_GAME_MENU = 1, DIALOG_SAVE = 2, DIALOG_RESTORE = 3,
- DIALOG_OPTIONS = 4, DIALOG_DIFFICULTY = 5, DIALOG_ERROR = 6
+ DIALOG_OPTIONS = 4, DIALOG_DIFFICULTY = 5, DIALOG_ERROR = 6,
+ DIALOG_MAIN_MENU = 7, DIALOG_TEXTVIEW = 8, DIALOG_ANIMVIEW = 9,
+ DIALOG_ADVERT = 10
};
class Dialogs {
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.cpp b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
index 59d7914378..f32d17d9c9 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
@@ -201,9 +201,10 @@ Common::String DragonsphereScene::formAnimName(char sepChar, int suffixNum) {
/*------------------------------------------------------------------------*/
void SceneInfoDragonsphere::loadCodes(MSurface &depthSurface, int variant) {
- File f(Resources::formatName(RESPREFIX_RM, _sceneId, ".DAT"));
+ Common::String ext = Common::String::format(".WW%d", variant);
+ File f(Resources::formatName(RESPREFIX_RM, _sceneId, ext));
MadsPack codesPack(&f);
- Common::SeekableReadStream *stream = codesPack.getItemStream(variant + 1);
+ Common::SeekableReadStream *stream = codesPack.getItemStream(0);
loadCodes(depthSurface, stream);
@@ -213,22 +214,20 @@ void SceneInfoDragonsphere::loadCodes(MSurface &depthSurface, int variant) {
void SceneInfoDragonsphere::loadCodes(MSurface &depthSurface, Common::SeekableReadStream *stream) {
byte *destP = depthSurface.getData();
- byte *endP = depthSurface.getBasePtr(0, depthSurface.h);
-
- byte runLength = stream->readByte();
- while (destP < endP && runLength > 0) {
- byte runValue = stream->readByte();
-
- // Write out the run length
- Common::fill(destP, destP + runLength, runValue);
- destP += runLength;
-
- // Get the next run length
- runLength = stream->readByte();
+ byte *walkMap = new byte[stream->size()];
+ stream->read(walkMap, stream->size());
+
+ for (int y = 0; y < 156; ++y) {
+ for (int x = 0; x < 320; ++x) {
+ int offset = x + (y * 320);
+ if ((walkMap[offset / 8] << (offset % 8)) & 0x80)
+ *destP++ = 1; // walkable
+ else
+ *destP++ = 0;
+ }
}
- if (destP < endP)
- Common::fill(destP, endP, 0);
+ delete[] walkMap;
}
} // End of namespace Dragonsphere
diff --git a/engines/mads/dragonsphere/game_dragonsphere.cpp b/engines/mads/dragonsphere/game_dragonsphere.cpp
index 9d9b48dd66..3836adb6d2 100644
--- a/engines/mads/dragonsphere/game_dragonsphere.cpp
+++ b/engines/mads/dragonsphere/game_dragonsphere.cpp
@@ -42,6 +42,10 @@ GameDragonsphere::GameDragonsphere(MADSEngine *vm)
}
void GameDragonsphere::startGame() {
+ _scene._priorSceneId = 0;
+ _scene._currentSceneId = -1;
+ _scene._nextSceneId = 101;
+
initializeGlobals();
}
diff --git a/engines/mads/events.cpp b/engines/mads/events.cpp
index c3e6d5c122..de4dc3c070 100644
--- a/engines/mads/events.cpp
+++ b/engines/mads/events.cpp
@@ -46,6 +46,7 @@ EventsManager::EventsManager(MADSEngine *vm) {
_mouseMoved = false;
_vD8 = 0;
_rightMousePressed = false;
+ _eventTarget = nullptr;
}
EventsManager::~EventsManager() {
@@ -138,6 +139,12 @@ void EventsManager::pollEvents() {
Common::Event event;
while (g_system->getEventManager()->pollEvent(event)) {
+ // If an event target is specified, pass the event to it
+ if (_eventTarget) {
+ _eventTarget->onEvent(event);
+ continue;
+ }
+
// Handle keypress
switch (event.type) {
case Common::EVENT_QUIT:
@@ -191,7 +198,7 @@ void EventsManager::pollEvents() {
}
}
-void EventsManager::checkForNextFrameCounter() {
+bool EventsManager::checkForNextFrameCounter() {
// Check for next game frame
uint32 milli = g_system->getMillis();
if ((milli - _priorFrameTime) >= GAME_FRAME_TIME) {
@@ -209,7 +216,11 @@ void EventsManager::checkForNextFrameCounter() {
// Signal the ScummVM debugger
_vm->_debugger->onFrame();
+
+ return true;
}
+
+ return false;
}
void EventsManager::delay(int cycles) {
diff --git a/engines/mads/events.h b/engines/mads/events.h
index 3d7504c0bd..54df337efd 100644
--- a/engines/mads/events.h
+++ b/engines/mads/events.h
@@ -39,6 +39,12 @@ enum CursorType { CURSOR_NONE = 0, CURSOR_ARROW = 1, CURSOR_WAIT = 2, CURSOR_GO_
class MADSEngine;
+class EventTarget {
+public:
+ virtual ~EventTarget() {}
+ virtual bool onEvent(Common::Event &event) { return false; }
+};
+
class EventsManager {
private:
MADSEngine *_vm;
@@ -46,16 +52,12 @@ private:
uint32 _priorFrameTime;
Common::Point _mousePos;
Common::Point _currentPos;
+ EventTarget *_eventTarget;
/**
* Updates the cursor image when the current cursor changes
*/
void changeCursor();
-
- /**
- * Checks for whether the next game frame number has been reached.
- */
- void checkForNextFrameCounter();
public:
SpriteAsset *_cursorSprites;
CursorType _cursorId;
@@ -127,6 +129,11 @@ public:
void pollEvents();
/**
+ * Sets an event handler other than the events manager
+ */
+ void setEventTarget(EventTarget *target) { _eventTarget = target; }
+
+ /**
* Return the current mouse position
*/
Common::Point mousePos() const { return _mousePos; }
@@ -147,6 +154,11 @@ public:
void waitForNextFrame();
/**
+ * Checks for whether the next game frame number has been reached.
+ */
+ bool checkForNextFrameCounter();
+
+ /**
* Gets the current frame counter
*/
uint32 getFrameCounter() const { return _frameCounter; }
diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp
index 8639f59418..b544eff2db 100644
--- a/engines/mads/game.cpp
+++ b/engines/mads/game.cpp
@@ -64,6 +64,7 @@ Game::Game(MADSEngine *vm)
_loadGameSlot = -1;
_lastSave = -1;
_saveFile = nullptr;
+ _saveThumb = nullptr;
_statusFlag = 0;
_sectionHandler = nullptr;
_sectionNumber = 1;
@@ -93,6 +94,11 @@ Game::Game(MADSEngine *vm)
}
Game::~Game() {
+ if (_saveThumb) {
+ _saveThumb->free();
+ delete _saveThumb;
+ }
+
delete _saveFile;
delete _surface;
delete _sectionHandler;
@@ -548,16 +554,14 @@ void Game::writeSavegameHeader(Common::OutSaveFile *out, MADSSavegameHeader &hea
out->write(header._saveName.c_str(), header._saveName.size());
out->writeByte('\0');
- // Get the active palette
- uint8 thumbPalette[256 * 3];
- g_system->getPaletteManager()->grabPalette(thumbPalette, 0, 256);
-
- // Create a thumbnail and save it
- Graphics::Surface *thumb = new Graphics::Surface();
- ::createThumbnail(thumb, _vm->_screen.getData(), MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT, thumbPalette);
- Graphics::saveThumbnail(*out, *thumb);
- thumb->free();
- delete thumb;
+ // Handle the thumbnail. If there's already one set by the game, create one
+ if (!_saveThumb)
+ createThumbnail();
+ Graphics::saveThumbnail(*out, *_saveThumb);
+
+ _saveThumb->free();
+ delete _saveThumb;
+ _saveThumb = nullptr;
// Write out the save date/time
TimeDate td;
@@ -570,4 +574,16 @@ void Game::writeSavegameHeader(Common::OutSaveFile *out, MADSSavegameHeader &hea
out->writeUint32LE(_vm->_events->getFrameCounter());
}
+void Game::createThumbnail() {
+ if (_saveThumb) {
+ _saveThumb->free();
+ delete _saveThumb;
+ }
+
+ uint8 thumbPalette[PALETTE_SIZE];
+ _vm->_palette->grabPalette(thumbPalette, 0, PALETTE_COUNT);
+ _saveThumb = new Graphics::Surface();
+ ::createThumbnail(_saveThumb, _vm->_screen.getData(), MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT, thumbPalette);
+}
+
} // End of namespace MADS
diff --git a/engines/mads/game.h b/engines/mads/game.h
index 08cd7e7843..1a61fc8ac8 100644
--- a/engines/mads/game.h
+++ b/engines/mads/game.h
@@ -82,6 +82,7 @@ protected:
int _lastSave;
Common::String _saveName;
Common::InSaveFile *_saveFile;
+ Graphics::Surface *_saveThumb;
/**
* Constructor
@@ -226,6 +227,11 @@ public:
* Read in a savegame header
*/
static bool readSavegameHeader(Common::InSaveFile *in, MADSSavegameHeader &header);
+
+ /**
+ * Creates a temporary thumbnail for use in saving games
+ */
+ void createThumbnail();
};
} // End of namespace MADS
diff --git a/engines/mads/mads.cpp b/engines/mads/mads.cpp
index 59eec40bcc..d56994ab8e 100644
--- a/engines/mads/mads.cpp
+++ b/engines/mads/mads.cpp
@@ -55,6 +55,7 @@ MADSEngine::MADSEngine(OSystem *syst, const MADSGameDescription *gameDesc) :
_resources = nullptr;
_sound = nullptr;
_audio = nullptr;
+ _opl = nullptr;
}
MADSEngine::~MADSEngine() {
@@ -68,6 +69,9 @@ MADSEngine::~MADSEngine() {
delete _resources;
delete _sound;
delete _audio;
+
+ _mixer->stopAll();
+ delete _opl;
}
void MADSEngine::initialize() {
@@ -76,6 +80,9 @@ void MADSEngine::initialize() {
DebugMan.addDebugChannel(kDebugScripts, "scripts", "Game scripts");
DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics handling");
+ _opl = OPL::Config::create();
+ _opl->init(11025);
+
// Initial sub-system engine references
MSurface::setVm(this);
MSprite::setVm(this);
@@ -89,7 +96,7 @@ void MADSEngine::initialize() {
Font::init(this);
_font = new Font();
_screen.init();
- _sound = new SoundManager(this, _mixer);
+ _sound = new SoundManager(this, _mixer, _opl);
_audio = new AudioPlayer(_mixer, getGameID());
_game = Game::init(this);
@@ -103,9 +110,6 @@ Common::Error MADSEngine::run() {
// Run the game
_game->run();
- // Dummy loop to keep application active
- _events->delay(9999);
-
return Common::kNoError;
}
diff --git a/engines/mads/mads.h b/engines/mads/mads.h
index 9a8f2152a1..8fc2788c28 100644
--- a/engines/mads/mads.h
+++ b/engines/mads/mads.h
@@ -99,6 +99,7 @@ public:
ScreenSurface _screen;
SoundManager *_sound;
AudioPlayer *_audio;
+ FM_OPL *_opl;
bool _easyMouse;
bool _invObjectsAnimated;
bool _textWindowStill;
diff --git a/engines/mads/messages.cpp b/engines/mads/messages.cpp
index 9b2d6f3114..e83b69d210 100644
--- a/engines/mads/messages.cpp
+++ b/engines/mads/messages.cpp
@@ -546,10 +546,9 @@ void TextDisplayList::draw(MSurface *s) {
for (uint idx = 0; idx < size(); ++idx) {
TextDisplay &td = (*this)[idx];
if (td._active && (td._expire >= 0)) {
+ Common::Point destPos(td._bounds.left, td._bounds.top);
td._font->setColors(0xFF, td._color1, td._color2, 0);
- td._font->writeString(s, td._msg,
- Common::Point(td._bounds.left, td._bounds.top),
- td._spacing, td._bounds.width());
+ td._font->writeString(s, td._msg, destPos, td._spacing, td._bounds.width());
}
}
}
diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index 61e810e215..96353e9ae5 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -8,6 +8,7 @@ MODULE_OBJS := \
nebular/dialogs_nebular.o \
nebular/game_nebular.o \
nebular/globals_nebular.o \
+ nebular/menu_nebular.o \
nebular/sound_nebular.o \
nebular/nebular_scenes.o \
nebular/nebular_scenes1.o \
diff --git a/engines/mads/msurface.cpp b/engines/mads/msurface.cpp
index 18a9a4f547..349f4a5f23 100644
--- a/engines/mads/msurface.cpp
+++ b/engines/mads/msurface.cpp
@@ -527,7 +527,7 @@ MSurface *MSurface::flipHorizontal() const {
/*------------------------------------------------------------------------*/
int DepthSurface::getDepth(const Common::Point &pt) {
- if (_vm->_game->_scene._sceneInfo->_depthStyle == 2) {
+ if (_depthStyle == 2) {
int bits = (3 - (pt.x % 4)) * 2;
byte v = *getBasePtr(pt.x >> 2, pt.y);
return v >> bits;
@@ -540,7 +540,7 @@ int DepthSurface::getDepth(const Common::Point &pt) {
}
int DepthSurface::getDepthHighBit(const Common::Point &pt) {
- if (_vm->_game->_scene._sceneInfo->_depthStyle == 2) {
+ if (_depthStyle == 2) {
int bits = (3 - (pt.x % 4)) * 2;
byte v = *getBasePtr(pt.x >> 2, pt.y);
return (v >> bits) & 2;
@@ -552,5 +552,4 @@ int DepthSurface::getDepthHighBit(const Common::Point &pt) {
}
}
-
} // End of namespace MADS
diff --git a/engines/mads/msurface.h b/engines/mads/msurface.h
index ef2bbd6784..3a5bf22eed 100644
--- a/engines/mads/msurface.h
+++ b/engines/mads/msurface.h
@@ -51,10 +51,9 @@ struct SpriteInfo {
* MADS graphics surface
*/
class MSurface : public Graphics::Surface {
-private:
- bool _freeFlag;
protected:
static MADSEngine *_vm;
+ bool _freeFlag;
public:
/**
* Sets the engine refrence used all surfaces
@@ -223,9 +222,14 @@ private:
MADSEngine *_vm;
public:
/**
+ * Depth style
+ */
+ int _depthStyle;
+
+ /**
* Constructor
*/
- DepthSurface(MADSEngine *vm) : _vm(vm) {}
+ DepthSurface(MADSEngine *vm) : _vm(vm), _depthStyle(0) {}
/**
* Returns the depth at a given position
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index 99fa01c34f..35a7d3bdc6 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -23,12 +23,17 @@
#include "common/scummsys.h"
#include "common/config-manager.h"
#include "common/util.h"
+#include "common/translation.h"
+
+#include "gui/saveload.h"
+
#include "mads/mads.h"
#include "mads/screen.h"
#include "mads/msurface.h"
#include "mads/staticres.h"
#include "mads/nebular/dialogs_nebular.h"
#include "mads/nebular/game_nebular.h"
+#include "mads/nebular/menu_nebular.h"
namespace MADS {
@@ -265,20 +270,99 @@ bool DialogsNebular::commandCheck(const char *idStr, Common::String &valStr,
}
void DialogsNebular::showDialog() {
- switch (_pendingDialog) {
- case DIALOG_GAME_MENU:
- //GameMenuDialog::show();
- break;
- case DIALOG_DIFFICULTY: {
-/*
- DifficultyDialog *dlg = new DifficultyDialog(_vm);
- dlg->show();
- delete dlg;
-*/
- break;
+ while (_pendingDialog != DIALOG_NONE && !_vm->shouldQuit()) {
+ DialogId dialogId = _pendingDialog;
+ _pendingDialog = DIALOG_NONE;
+
+ switch (dialogId) {
+ case DIALOG_MAIN_MENU: {
+ MainMenu *menu = new MainMenu(_vm);
+ menu->show();
+ delete menu;
+ break;
+ }
+ case DIALOG_DIFFICULTY: {
+ DifficultyDialog *dlg = new DifficultyDialog(_vm);
+ dlg->show();
+ delete dlg;
+ break;
+ }
+ case DIALOG_GAME_MENU: {
+ GameMenuDialog *dlg = new GameMenuDialog(_vm);
+ dlg->show();
+ delete dlg;
+ break;
+ }
+ case DIALOG_SAVE: {
+ showScummVMSaveDialog();
+ break;
+ }
+ case DIALOG_RESTORE: {
+ showScummVMRestoreDialog();
+ break;
+ }
+ case DIALOG_OPTIONS: {
+ OptionsDialog *dlg = new OptionsDialog(_vm);
+ dlg->show();
+ delete dlg;
+ break;
+ }
+ case DIALOG_ADVERT: {
+ AdvertView *dlg = new AdvertView(_vm);
+ dlg->show();
+ delete dlg;
+ break;
+ }
+ case DIALOG_TEXTVIEW: {
+ TextView *dlg = new TextView(_vm);
+ dlg->show();
+ delete dlg;
+ break;
+ }
+ case DIALOG_ANIMVIEW: {
+ AnimationView *dlg = new AnimationView(_vm);
+ dlg->show();
+ delete dlg;
+ break;
+ }
+ default:
+ break;
+ }
}
- default:
- break;
+}
+
+void DialogsNebular::showScummVMSaveDialog() {
+ Nebular::GameNebular &game = *(Nebular::GameNebular *)_vm->_game;
+ Scene *scene = &(game._scene);
+ GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
+
+ int slot = dialog->runModalWithCurrentTarget();
+ if (slot >= 0) {
+ Common::String desc = dialog->getResultString();
+
+ if (desc.empty()) {
+ // create our own description for the saved game, the user didn't enter it
+ desc = dialog->createDefaultSaveDescription(slot);
+ }
+
+ scene->_spriteSlots.reset();
+ scene->loadScene(scene->_currentSceneId, game._aaName, true);
+ scene->_userInterface.noInventoryAnim();
+ game._scene.drawElements(kTransitionFadeIn, false);
+
+ game.saveGame(slot, desc);
+ }
+}
+
+void DialogsNebular::showScummVMRestoreDialog() {
+ Nebular::GameNebular &game = *(Nebular::GameNebular *)_vm->_game;
+ GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
+
+ int slot = dialog->runModalWithCurrentTarget();
+ if (slot >= 0) {
+ game._loadGameSlot = slot;
+ game._scene._currentSceneId = -1;
+ game._currentSectionNumber = -1;
}
}
@@ -469,15 +553,78 @@ void PictureDialog::restore() {
/*------------------------------------------------------------------------*/
-ScreenDialog::DialogLine::DialogLine() {
+FullScreenDialog::FullScreenDialog(MADSEngine *vm) : _vm(vm) {
+ _screenId = 990;
+ _palFlag = true;
+}
+
+FullScreenDialog::~FullScreenDialog() {
+ _vm->_screen.resetClipBounds();
+ _vm->_game->_scene.restrictScene();
+}
+
+void FullScreenDialog::display() {
+ Game &game = *_vm->_game;
+ Scene &scene = game._scene;
+
+ int nextSceneId = scene._nextSceneId;
+ int currentSceneId = scene._currentSceneId;
+ int priorSceneId = scene._priorSceneId;
+
+ if (_screenId > 0) {
+ SceneInfo *sceneInfo = SceneInfo::init(_vm);
+ sceneInfo->load(_screenId, 0, "", 0, scene._depthSurface, scene._backgroundSurface);
+ }
+
+ scene._priorSceneId = priorSceneId;
+ scene._currentSceneId = currentSceneId;
+ scene._nextSceneId = nextSceneId;
+
+ _vm->_events->initVars();
+ game._kernelMode = KERNEL_ROOM_INIT;
+
+ byte pal[768];
+ if (_vm->_screenFade) {
+ Common::fill(&pal[0], &pal[PALETTE_SIZE], 0);
+ _vm->_palette->setFullPalette(pal);
+ } else {
+ _vm->_palette->getFullPalette(pal);
+ _vm->_palette->fadeOut(pal, nullptr, 0, PALETTE_COUNT, 0, 1, 1, 16);
+ }
+
+ // Set Fx state and palette entries
+ game._fx = _vm->_screenFade == SCREEN_FADE_SMOOTH ? kTransitionFadeIn : kCenterVertTransition;
+ game._trigger = 0;
+
+ // Clear the screen and draw the upper and lower horizontal lines
+ _vm->_screen.empty();
+ _vm->_palette->setLowRange();
+ _vm->_screen.hLine(0, 20, MADS_SCREEN_WIDTH, 2);
+ _vm->_screen.hLine(0, 179, MADS_SCREEN_WIDTH, 2);
+ _vm->_screen.copyRectToScreen(Common::Rect(0, 0, MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT));
+
+ // Restrict the screen to the area between the two lines
+ _vm->_screen.setClipBounds(Common::Rect(0, DIALOG_TOP, MADS_SCREEN_WIDTH,
+ DIALOG_TOP + MADS_SCENE_HEIGHT));
+ _vm->_game->_scene.restrictScene();
+
+ if (_screenId > 0)
+ scene._spriteSlots.fullRefresh();
+}
+
+/*------------------------------------------------------------------------*/
+
+GameDialog::DialogLine::DialogLine() {
_active = true;
_state = DLGSTATE_UNSELECTED;
_textDisplayIndex = -1;
_font = nullptr;
_widthAdjust = 0;
+ _msg = "";
}
-ScreenDialog::DialogLine::DialogLine(const Common::String &s) {
+GameDialog::DialogLine::DialogLine(const Common::String &s) {
+ _active = true;
_state = DLGSTATE_UNSELECTED;
_textDisplayIndex = -1;
_font = nullptr;
@@ -487,16 +634,17 @@ ScreenDialog::DialogLine::DialogLine(const Common::String &s) {
/*------------------------------------------------------------------------*/
-ScreenDialog::ScreenDialog(MADSEngine *vm) : _vm(vm) {
+GameDialog::GameDialog(MADSEngine *vm) : FullScreenDialog(vm) {
Game &game = *_vm->_game;
Scene &scene = game._scene;
- _v1 = 0;
- _v2 = 0;
- _v3 = false;
- _selectedLine = 0;
+ _tempLine = 0;
+ _movedFlag = false;
+ _redrawFlag = false;
+ _selectedLine = -1;
_dirFlag = false;
_textLineCount = 0;
+ _lineIndex = -1;
_screenId = 920;
chooseBackground();
@@ -508,64 +656,42 @@ ScreenDialog::ScreenDialog(MADSEngine *vm) : _vm(vm) {
scene.clearVocab();
scene._dynamicHotspots.clear();
_vm->_dialogs->_defaultPosition = Common::Point(-1, -1);
+ _menuSpritesIndex = 0;
+}
- bool palFlag = false;
- int nextSceneId = scene._nextSceneId;
- int currentSceneId = scene._currentSceneId;
- int priorSceneId = scene._priorSceneId;
-
- if (_vm->_dialogs->_pendingDialog == DIALOG_DIFFICULTY) {
- palFlag = true;
- } else {
- _vm->_palette->initPalette();
- }
- scene.loadScene(_screenId, game._aaName, palFlag);
+void GameDialog::display() {
+ FullScreenDialog::display();
- scene._priorSceneId = priorSceneId;
- scene._currentSceneId = currentSceneId;
- scene._nextSceneId = nextSceneId;
- scene._posAdjust.y = 22;
- _vm->_sound->pauseNewCommands();
- _vm->_events->initVars();
- game._kernelMode = KERNEL_ROOM_INIT;
+ Palette &palette = *_vm->_palette;
+ palette.setEntry(10, 0, 63, 0);
+ palette.setEntry(11, 0, 45, 0);
+ palette.setEntry(12, 63, 63, 0);
+ palette.setEntry(13, 45, 45, 0);
+ palette.setEntry(14, 63, 63, 63);
+ palette.setEntry(15, 45, 45, 45);
+ Scene &scene = _vm->_game->_scene;
SpriteAsset *menuSprites = new SpriteAsset(_vm, "*MENU", 0);
_menuSpritesIndex = scene._sprites.add(menuSprites);
- byte pal[768];
- if (_vm->_screenFade) {
- Common::fill(&pal[0], &pal[PALETTE_SIZE], 0);
- _vm->_palette->setFullPalette(pal);
- } else {
- _vm->_palette->getFullPalette(pal);
- _vm->_palette->fadeOut(pal, nullptr, 0, PALETTE_COUNT, 0, 1, 1, 16);
- }
-
- _vm->_screen.empty();
- _vm->_screen.hLine(0, 0, MADS_SCREEN_WIDTH, 2);
+ _lineIndex = -1;
+ setClickableLines();
- game._fx = _vm->_screenFade == SCREEN_FADE_SMOOTH ? kTransitionFadeIn : kCenterVertTransition;
- game._trigger = 0;
_vm->_events->setCursor(CURSOR_ARROW);
+}
- _vm->_palette->setEntry(10, 0, 63, 0);
- _vm->_palette->setEntry(11, 0, 45, 0);
- _vm->_palette->setEntry(12, 63, 63, 0);
- _vm->_palette->setEntry(13, 45, 45, 0);
- _vm->_palette->setEntry(14, 63, 63, 63);
- _vm->_palette->setEntry(15, 45, 45, 45);
-
- _lineIndex = -1;
+GameDialog::~GameDialog() {
+ _vm->_screen.resetClipBounds();
}
-void ScreenDialog::clearLines() {
+void GameDialog::clearLines() {
Scene &scene = _vm->_game->_scene;
- _v2 = 0;
+ _movedFlag = false;
_lines.clear();
scene._spriteSlots.fullRefresh(true);
}
-void ScreenDialog::setClickableLines() {
+void GameDialog::setClickableLines() {
ScreenObjects &screenObjects = _vm->_game->_screenObjects;
for (uint idx = 0; idx < _lines.size(); ++idx) {
@@ -586,19 +712,17 @@ void ScreenDialog::setClickableLines() {
}
}
-void ScreenDialog::addQuote(int id1, int id2, DialogTextAlign align,
+void GameDialog::addQuote(int id1, int id2, DialogTextAlign align,
const Common::Point &pt, Font *font) {
- Common::String msg = _vm->_game->getQuote(id1);
+ Common::String msg = _vm->_game->getQuote(id1).c_str(); // c_str() because we need a copy
- if (id2 > 0) {
- msg += " ";
+ if (id2 > 0)
msg += _vm->_game->getQuote(id2);
- }
addLine(msg, align, pt, font);
}
-void ScreenDialog::addLine(const Common::String &msg, DialogTextAlign align,
+void GameDialog::addLine(const Common::String &msg, DialogTextAlign align,
const Common::Point &pt, Font *font) {
Scene &scene = _vm->_game->_scene;
DialogLine *line;
@@ -641,6 +765,10 @@ void ScreenDialog::addLine(const Common::String &msg, DialogTextAlign align,
int xOffset;
switch (align) {
+ case ALIGN_NONE:
+ // No adjustment
+ break;
+
case ALIGN_CENTER:
xOffset = (MADS_SCREEN_WIDTH / 2) - font->getWidth(msg, -1) / 2;
line->_pos.x += xOffset;
@@ -653,6 +781,10 @@ void ScreenDialog::addLine(const Common::String &msg, DialogTextAlign align,
xOffset = (MADS_SCREEN_WIDTH / 2) - font->getWidth(
Common::String(msgP, ch), line->_widthAdjust);
line->_pos.x += xOffset;
+
+ Common::String newMsg = msg.c_str();
+ newMsg.deleteChar(ch - msgP);
+ line->_msg = newMsg;
}
break;
}
@@ -669,14 +801,14 @@ void ScreenDialog::addLine(const Common::String &msg, DialogTextAlign align,
++_lineIndex;
}
-void ScreenDialog::initVars() {
- _v1 = -1;
+void GameDialog::initVars() {
+ _tempLine = -1;
_selectedLine = -1;
_lineIndex = 0;
_textLineCount = 0;
}
-void ScreenDialog::chooseBackground() {
+void GameDialog::chooseBackground() {
switch (_vm->_game->_currentSectionNumber) {
case 1:
case 2:
@@ -700,27 +832,35 @@ void ScreenDialog::chooseBackground() {
}
}
-void ScreenDialog::setFrame(int frameNumber, int depth) {
+void GameDialog::setFrame(int frameNumber, int depth) {
Scene &scene = _vm->_game->_scene;
+ SpriteAsset *menuSprites = scene._sprites[_menuSpritesIndex];
+ MSprite *frame = menuSprites->getFrame(frameNumber - 1);
+
SpriteSlot &spriteSlot = scene._spriteSlots[scene._spriteSlots.add()];
spriteSlot._flags = IMG_UPDATE;
spriteSlot._seqIndex = 1;
spriteSlot._spritesIndex = _menuSpritesIndex;
spriteSlot._frameNumber = frameNumber;
+ spriteSlot._position = frame->_offset;
+ spriteSlot._depth = depth;
+ spriteSlot._scale = 100;
}
-void ScreenDialog::show() {
+void GameDialog::show() {
+ display();
+
Scene &scene = _vm->_game->_scene;
while (_selectedLine < 1 && !_vm->shouldQuit()) {
handleEvents();
- if (_v3) {
- if (!_v1)
- _v1 = -1;
+ if (_redrawFlag) {
+ if (!_tempLine)
+ _tempLine = -1;
refreshText();
scene.drawElements(_vm->_game->_fx, _vm->_game->_fx);
- _v3 = false;
+ _redrawFlag = false;
}
_vm->_events->waitForNextFrame();
@@ -728,11 +868,11 @@ void ScreenDialog::show() {
}
}
-void ScreenDialog::handleEvents() {
+void GameDialog::handleEvents() {
ScreenObjects &screenObjects = _vm->_game->_screenObjects;
EventsManager &events = *_vm->_events;
Nebular::DialogsNebular &dialogs = *(Nebular::DialogsNebular *)_vm->_dialogs;
- int v1 = _v1;
+ int tempLine = _tempLine;
// Mark all the lines as initially unselected
for (uint i = 0; i < _lines.size(); ++i)
@@ -742,10 +882,11 @@ void ScreenDialog::handleEvents() {
_vm->_events->pollEvents();
// Scan for objects in the dialog
- int objIndex = screenObjects.scan(events.currentPos() - _vm->_screen._offset, LAYER_GUI);
+ Common::Point mousePos = events.currentPos() - Common::Point(0, DIALOG_TOP);
+ int objIndex = screenObjects.scan(mousePos, LAYER_GUI);
- if (_v2) {
- int yp = events.currentPos().y - _vm->_screen._offset.y;
+ if (_movedFlag) {
+ int yp = mousePos.y;
if (yp < screenObjects[1]._bounds.top) {
if (!events._mouseReleased)
_lines[1]._state = DLGSTATE_SELECTED;
@@ -760,7 +901,7 @@ void ScreenDialog::handleEvents() {
}
int line = -1;
- if (objIndex > 0 || events._mouseButtons) {
+ if (objIndex > 0 && (events._mouseStatus || events._mouseReleased)) {
line = screenObjects[objIndex]._descId;
if (dialogs._pendingDialog == DIALOG_SAVE || dialogs._pendingDialog == DIALOG_RESTORE) {
if (line > 7 && line <= 14) {
@@ -768,9 +909,9 @@ void ScreenDialog::handleEvents() {
line -= 7;
}
- int v2 = (line > 0 && line < 8) ? 1 : 0;
+ bool movedFlag = line > 0 && line < 8;
if (events._mouseMoved)
- _v2 = v2;
+ _movedFlag = movedFlag;
}
if (screenObjects[objIndex]._category == CAT_COMMAND) {
@@ -784,17 +925,17 @@ void ScreenDialog::handleEvents() {
line = -1;
if (events._mouseReleased) {
- if (!_v2 || line <= 18)
+ if (!_movedFlag || line <= 18)
_selectedLine = line;
- _v3 = true;
+ _redrawFlag = true;
}
- _v1 = line;
- if (v1 == line || _selectedLine >= 0)
- _v3 = true;
+ _tempLine = line;
+ if (tempLine != line || _selectedLine >= 0)
+ _redrawFlag = true;
}
-void ScreenDialog::refreshText() {
+void GameDialog::refreshText() {
Scene &scene = _vm->_game->_scene;
for (uint i = 0; i < _lines.size(); ++i) {
@@ -834,10 +975,9 @@ void ScreenDialog::refreshText() {
/*------------------------------------------------------------------------*/
-DifficultyDialog::DifficultyDialog(MADSEngine *vm) : ScreenDialog(vm) {
- setFrame(8, 2);
+DifficultyDialog::DifficultyDialog(MADSEngine *vm) : GameDialog(vm) {
setLines();
- setClickableLines();
+ _vm->_palette->resetGamePalette(18, 10);
}
void DifficultyDialog::setLines() {
@@ -853,19 +993,24 @@ void DifficultyDialog::setLines() {
}
}
+void DifficultyDialog::display() {
+ GameDialog::display();
+ setFrame(8, 2);
+}
+
void DifficultyDialog::show() {
- ScreenDialog::show();
+ GameDialog::show();
Nebular::GameNebular &game = *(Nebular::GameNebular *)_vm->_game;
switch (_selectedLine) {
case 1:
- game._difficulty = Nebular::DIFFICULTY_HARD;
+ game._difficulty = Nebular::DIFFICULTY_EASY;
break;
case 2:
game._difficulty = Nebular::DIFFICULTY_MEDIUM;
break;
case 3:
- game._difficulty = Nebular::DIFFICULTY_EASY;
+ game._difficulty = Nebular::DIFFICULTY_HARD;
break;
default:
_vm->quitGame();
@@ -874,16 +1019,161 @@ void DifficultyDialog::show() {
/*------------------------------------------------------------------------*/
-GameMenuDialog::GameMenuDialog(MADSEngine *vm) : ScreenDialog(vm) {
+GameMenuDialog::GameMenuDialog(MADSEngine *vm) : GameDialog(vm) {
+ setLines();
+}
+
+void GameMenuDialog::setLines() {
+ Font *font = _vm->_font->getFont(FONT_CONVERSATION);
+
+ int yp = 64 - ((font->getHeight() + 1) * 4 + 6) / 2;
+
+ addQuote(10, 0, ALIGN_CENTER, Common::Point(0, yp), font);
+ yp += 6;
+
+ for (int id = 11; id <= 15; ++id) {
+ yp += font->getHeight();
+ addQuote(id, 0, ALIGN_CENTER, Common::Point(0, yp));
+ }
+}
+
+void GameMenuDialog::display() {
+ GameDialog::display();
setFrame(1, 2);
}
-void GameMenuDialog::addLines() {
- initVars();
+void GameMenuDialog::show() {
+ GameDialog::show();
+
+ switch (_selectedLine) {
+ case 1:
+ _vm->_dialogs->_pendingDialog = DIALOG_SAVE;
+ _vm->_dialogs->showDialog();
+ break;
+ case 2:
+ _vm->_dialogs->_pendingDialog = DIALOG_RESTORE;
+ _vm->_dialogs->showDialog();
+ break;
+ case 3:
+ _vm->_dialogs->_pendingDialog = DIALOG_OPTIONS;
+ _vm->_dialogs->showDialog();
+ break;
+ case 4:
+ // Resume game
+ break;
+ case 5:
+ default:
+ _vm->quitGame();
+ }
+}
+
+/*------------------------------------------------------------------------*/
+
+OptionsDialog::OptionsDialog(MADSEngine *vm) : GameDialog(vm) {
+ setLines();
+}
+
+int OptionsDialog::getOptionQuote(int option) {
+ Nebular::GameNebular &game = *(Nebular::GameNebular *)_vm->_game;
+
+ // TODO: Hook the rest of the options to the current config
+ switch (option) {
+ case 17: // Music
+ return 24; // 24: ON, 25: OFF
+ case 18: // Sound
+ return 26; // 26: ON, 27: OFF
+ case 19: // Interface
+ return !_vm->_easyMouse ? 28 : 29; // 28: Standard, 29: Easy
+ case 20: // Inventory
+ return _vm->_invObjectsAnimated ? 30 : 31; // 30: Spinning, 31: Still
+ case 21: // Text window
+ return !_vm->_textWindowStill ? 32 : 33; // 32: Animated, 33: Still
+ case 22: // Screen fade
+ return 34 + _vm->_screenFade; // 34: Smooth, 35: Medium, 36: Fast
+ case 23: // Storyline
+ return (game._storyMode == STORYMODE_NAUGHTY) ? 37 : 38; // 37: Naughty, 38: Nice
+ default:
+ error("getOptionQuote: Unknown option");
+ }
+}
+
+void OptionsDialog::setLines() {
Font *font = _vm->_font->getFont(FONT_CONVERSATION);
- int top = 78 - (font->getHeight() + 2) * 12;
- addQuote(10, 0, ALIGN_CENTER, Common::Point(0, top), font);
- // TODO
+
+ int yp = 40 - ((font->getHeight() + 1) * 4 + 6) / 2;
+
+ addQuote(16, 0, ALIGN_CENTER, Common::Point(0, yp), font);
+ yp += 6;
+
+ for (int id = 17; id <= 23; ++id) {
+ yp += font->getHeight();
+ addQuote(id, getOptionQuote(id), ALIGN_AT_CENTER, Common::Point(0, yp));
+ }
+
+ yp += 28;
+ addQuote(1, 0, ALIGN_NONE, Common::Point(90, yp));
+ addQuote(2, 0, ALIGN_NONE, Common::Point(190, yp));
+}
+
+void OptionsDialog::display() {
+ GameDialog::display();
+ setFrame(2, 2);
+}
+
+void OptionsDialog::show() {
+ Nebular::GameNebular &game = *(Nebular::GameNebular *)_vm->_game;
+ do {
+ _selectedLine = 0;
+ GameDialog::show();
+
+ switch (_selectedLine) {
+ case 1: // Music
+ warning("STUB: Music toggle");
+ break;
+ case 2: // Sound
+ warning("STUB: Sound toggle");
+ break;
+ case 3: // Interface
+ _vm->_easyMouse = !_vm->_easyMouse;
+ break;
+ case 4: // Inventory
+ _vm->_invObjectsAnimated = !_vm->_invObjectsAnimated;
+ break;
+ case 5: // Text window
+ _vm->_textWindowStill = !_vm->_textWindowStill;
+ break;
+ case 6: // Screen fade
+ if (_vm->_screenFade == SCREEN_FADE_FAST)
+ _vm->_screenFade = SCREEN_FADE_MEDIUM;
+ else if (_vm->_screenFade == SCREEN_FADE_MEDIUM)
+ _vm->_screenFade = SCREEN_FADE_SMOOTH;
+ else
+ _vm->_screenFade = SCREEN_FADE_FAST;
+ break;
+ case 7: // Storyline
+ game._storyMode = (game._storyMode == STORYMODE_NAUGHTY) ? STORYMODE_NICE : STORYMODE_NAUGHTY;
+ break;
+ default:
+ break;
+ }
+
+ // Reload menu
+ _lineIndex = -1;
+ clearLines();
+ setLines();
+ setClickableLines();
+ } while (_selectedLine <= 7);
+
+ switch (_selectedLine) {
+ case 8: // Done
+ // TODO: Copy from temporary config
+ break;
+ case 9: // Cancel
+ // TODO: Ignore all changes to temporary config
+ break;
+ default:
+ break;
+ }
}
} // End of namespace Nebular
diff --git a/engines/mads/nebular/dialogs_nebular.h b/engines/mads/nebular/dialogs_nebular.h
index a144ee9d83..f64f992611 100644
--- a/engines/mads/nebular/dialogs_nebular.h
+++ b/engines/mads/nebular/dialogs_nebular.h
@@ -31,6 +31,8 @@ namespace MADS {
namespace Nebular {
+#define DIALOG_TOP 22
+
enum CapitalizationMode { kUppercase = 0, kLowercase = 1, kUpperAndLower = 2 };
class DialogsNebular : public Dialogs {
@@ -46,6 +48,10 @@ private:
bool textNoun(Common::String &dest, int nounId, const Common::String &source);
bool commandCheck(const char *idStr, Common::String &valStr, const Common::String &command);
+
+ void showScummVMSaveDialog();
+ void showScummVMRestoreDialog();
+
public:
virtual void showDialog();
@@ -99,11 +105,41 @@ public:
virtual ~PictureDialog();
};
-enum DialogTextAlign { ALIGN_CENTER = -1, ALIGN_AT_CENTER = -2, ALIGN_RIGHT = -3 };
+enum DialogTextAlign { ALIGN_NONE = 0, ALIGN_CENTER = -1, ALIGN_AT_CENTER = -2, ALIGN_RIGHT = -3 };
enum DialogState { DLGSTATE_UNSELECTED = 0, DLGSTATE_SELECTED = 1, DLGSTATE_FOCUSED = 2 };
-class ScreenDialog {
+class FullScreenDialog: public EventTarget {
+protected:
+ /**
+ * Engine reference
+ */
+ MADSEngine *_vm;
+
+ /**
+ * Screen/scene to show background from
+ */
+ int _screenId;
+
+ /**
+ * Flag for palette initialization
+ */
+ bool _palFlag;
+
+ /**
+ * Handles displaying the screen background and dialog
+ */
+ virtual void display();
+public:
+ /**
+ * Constructor
+ */
+ FullScreenDialog(MADSEngine *vm);
+
+ virtual ~FullScreenDialog();
+};
+
+class GameDialog: public FullScreenDialog {
struct DialogLine {
bool _active;
DialogState _state;
@@ -112,22 +148,25 @@ class ScreenDialog {
Common::String _msg;
Font *_font;
int _widthAdjust;
-
+
DialogLine();
DialogLine(const Common::String &s);
};
protected:
- MADSEngine *_vm;
Common::Array<DialogLine> _lines;
- int _v1;
- int _v2;
- bool _v3;
+ int _tempLine;
+ bool _movedFlag;
+ bool _redrawFlag;
int _selectedLine;
bool _dirFlag;
- int _screenId;
int _menuSpritesIndex;
int _lineIndex;
int _textLineCount;
+
+ /**
+ * Display the dialog
+ */
+ virtual void display();
/**
* Reset the lines list for the dialog
@@ -177,12 +216,12 @@ public:
/**
* Constructor
*/
- ScreenDialog(MADSEngine *vm);
+ GameDialog(MADSEngine *vm);
/**
* Destructor
*/
- virtual ~ScreenDialog() {}
+ virtual ~GameDialog();
/**
* Show the dialog
@@ -190,30 +229,69 @@ public:
virtual void show();
};
-class DifficultyDialog : public ScreenDialog {
+class DifficultyDialog : public GameDialog {
private:
/**
- * Set the lines for the dialog
+ * Set the lines for the dialog
*/
void setLines();
public:
DifficultyDialog(MADSEngine *vm);
/**
+ * Display the dialog
+ */
+ virtual void display();
+
+ /**
* Show the dialog
*/
virtual void show();
};
-class GameMenuDialog : public ScreenDialog {
+class GameMenuDialog : public GameDialog {
private:
/**
- * Add the lines for the Game Menu dialog
+ * Set the lines for the dialog
*/
- void addLines();
+ void setLines();
public:
GameMenuDialog(MADSEngine *vm);
+ /**
+ * Display the dialog
+ */
+ virtual void display();
+
+ /**
+ * Show the dialog
+ */
+ virtual void show();
+};
+
+class OptionsDialog : public GameDialog {
+private:
+ /**
+ * Set the lines for the dialog
+ */
+ void setLines();
+
+ /**
+ * Gets the quote to be shown for an option
+ */
+ int getOptionQuote(int option);
+public:
+ OptionsDialog(MADSEngine *vm);
+
+ /**
+ * Display the dialog
+ */
+ virtual void display();
+
+ /**
+ * Show the dialog
+ */
+ virtual void show();
};
} // End of namespace Nebular
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index d6d7a07e52..902f42507a 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -22,6 +22,7 @@
#include "common/scummsys.h"
#include "common/config-manager.h"
+#include "graphics/scaler.h"
#include "mads/mads.h"
#include "mads/game.h"
#include "mads/screen.h"
@@ -59,9 +60,7 @@ ProtectionResult GameNebular::checkCopyProtection() {
}
void GameNebular::startGame() {
- // Show the main menu
- // TODO: Show the main menu here
-
+ /*
// Check copy protection
ProtectionResult protectionResult = checkCopyProtection();
switch (protectionResult) {
@@ -79,11 +78,13 @@ void GameNebular::startGame() {
// Copy protection check succeeded
break;
}
+ */
initSection(_sectionNumber);
_statusFlag = true;
- _vm->_dialogs->_pendingDialog = DIALOG_DIFFICULTY;
+ // Show the main menu
+ _vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
_vm->_dialogs->showDialog();
_vm->_dialogs->_pendingDialog = DIALOG_NONE;
@@ -310,6 +311,11 @@ void GameNebular::setSectionHandler() {
void GameNebular::checkShowDialog() {
if (_vm->_dialogs->_pendingDialog && _player._stepEnabled && !_globals[kCopyProtectFailed]) {
_player.releasePlayerSprites();
+
+ // Make a thumbnail in case it's needed for making a savegame
+ _vm->_game->createThumbnail();
+
+ // Show the dialog
_vm->_dialogs->showDialog();
_vm->_dialogs->_pendingDialog = DIALOG_NONE;
}
diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
new file mode 100644
index 0000000000..4d3beb3382
--- /dev/null
+++ b/engines/mads/nebular/menu_nebular.cpp
@@ -0,0 +1,986 @@
+/* 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/scummsys.h"
+#include "mads/game.h"
+#include "mads/mads.h"
+#include "mads/resources.h"
+#include "mads/scene.h"
+#include "mads/screen.h"
+#include "mads/nebular/menu_nebular.h"
+
+namespace MADS {
+
+namespace Nebular {
+
+#define NEBULAR_MENUSCREEN 990
+#define MADS_MENU_Y ((MADS_SCREEN_HEIGHT - MADS_SCENE_HEIGHT) / 2)
+#define MADS_MENU_ANIM_DELAY 70
+
+MenuView::MenuView(MADSEngine *vm) : FullScreenDialog(vm) {
+ _breakFlag = false;
+ _redrawFlag = true;
+ _palFlag = false;
+}
+
+void MenuView::show() {
+ Scene &scene = _vm->_game->_scene;
+ EventsManager &events = *_vm->_events;
+ _vm->_screenFade = SCREEN_FADE_FAST;
+
+ scene._spriteSlots.reset(true);
+ display();
+
+ events.setEventTarget(this);
+ events.hideCursor();
+
+ while (!_breakFlag && !_vm->shouldQuit()) {
+ if (_redrawFlag) {
+ _vm->_game->_scene.drawElements(_vm->_game->_fx, _vm->_game->_fx);
+ _redrawFlag = false;
+ }
+
+ _vm->_events->waitForNextFrame();
+ _vm->_game->_fx = kTransitionNone;
+ doFrame();
+ }
+
+ events.setEventTarget(nullptr);
+ _vm->_sound->stop();
+}
+
+void MenuView::display() {
+ _vm->_palette->resetGamePalette(4, 8);
+
+ FullScreenDialog::display();
+}
+
+bool MenuView::onEvent(Common::Event &event) {
+ if (event.type == Common::EVENT_KEYDOWN || event.type == Common::EVENT_LBUTTONDOWN) {
+ _breakFlag = true;
+ _vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
+ return true;
+ }
+
+ return false;
+}
+
+/*------------------------------------------------------------------------*/
+
+MainMenu::MainMenu(MADSEngine *vm): MenuView(vm) {
+ Common::fill(&_menuItems[0], &_menuItems[7], (SpriteAsset *)nullptr);
+ Common::fill(&_menuItemIndexes[0], &_menuItemIndexes[7], -1);
+ _delayTimeout = 0;
+ _menuItemIndex = -1;
+ _frameIndex = 0;
+ _skipFlag = false;
+ _highlightedIndex = -1;
+ _selectedIndex = -1;
+ _buttonDown = false;
+
+ for (int i = 0; i < 7; ++i)
+ _menuItems[i] = nullptr;
+}
+
+MainMenu::~MainMenu() {
+ Scene &scene = _vm->_game->_scene;
+ for (int i = 0; i < 7; ++i) {
+ if (_menuItemIndexes[i] != -1)
+ scene._sprites.remove(_menuItemIndexes[i]);
+ }
+
+ scene._spriteSlots.reset();
+}
+
+void MainMenu::display() {
+ MenuView::display();
+ Scene &scene = _vm->_game->_scene;
+ ScreenObjects &screenObjects = _vm->_game->_screenObjects;
+ screenObjects.clear();
+
+ // Load each of the menu item assets and add to the scene sprites list
+ for (int i = 0; i < 7; ++i) {
+ Common::String spritesName = Resources::formatName(NEBULAR_MENUSCREEN,
+ 'A', i + 1, EXT_SS, "");
+ _menuItems[i] = new SpriteAsset(_vm, spritesName, 0);
+ _menuItemIndexes[i] = scene._sprites.add(_menuItems[i]);
+
+ // Register the menu item area in the screen objects
+ MSprite *frame0 = _menuItems[i]->getFrame(0);
+ Common::Point pt(frame0->_offset.x - (frame0->w / 2),
+ frame0->_offset.y - frame0->h);
+ screenObjects.add(
+ Common::Rect(pt.x, pt.y + DIALOG_TOP, pt.x + frame0->w,
+ pt.y + frame0->h + DIALOG_TOP), LAYER_GUI, CAT_COMMAND, i);
+ }
+
+ // Set the cursor for when it's shown
+ _vm->_events->setCursor(CURSOR_ARROW);
+}
+
+void MainMenu::doFrame() {
+ // Delay between animation frames on the menu
+ uint32 currTime = g_system->getMillis();
+ if (currTime < _delayTimeout)
+ return;
+ _delayTimeout = currTime + MADS_MENU_ANIM_DELAY;
+
+ // If an item has already been selected, handle rotating out the other menu items
+ if (_selectedIndex != -1) {
+ if (_frameIndex == _menuItems[0]->getCount()) {
+ handleAction((MADSGameAction)_selectedIndex);
+ } else {
+ for (_menuItemIndex = 0; _menuItemIndex < 6; ++_menuItemIndex) {
+ if (_menuItemIndex != _selectedIndex) {
+ addSpriteSlot();
+ }
+ }
+
+ // Move the menu items to the next frame
+ ++_frameIndex;
+ }
+ return;
+ }
+
+ // If we've alerady reached the end of the menuitem animation, exit immediately
+ if (_menuItemIndex == 6)
+ return;
+
+ // If the user has chosen to skip the animation, show the full menu immediately
+ if (_skipFlag && _menuItemIndex >= 0) {
+ // Quickly loop through all the menu items to display each's final frame
+ for (; _menuItemIndex < 6; ++_menuItemIndex) {
+ // Draw the final frame of the menuitem
+ _frameIndex = 0;
+ addSpriteSlot();
+ }
+
+ _vm->_events->showCursor();
+ } else {
+ if ((_menuItemIndex == -1) || (_frameIndex == 0)) {
+ if (++_menuItemIndex == 6) {
+ // Reached end of display animation
+ _vm->_events->showCursor();
+ return;
+ }
+
+ _frameIndex = _menuItems[_menuItemIndex]->getCount() - 1;
+ } else {
+ --_frameIndex;
+ }
+
+ // Move to the next menuitem frame
+ addSpriteSlot();
+ }
+}
+
+void MainMenu::addSpriteSlot() {
+ Scene &scene = _vm->_game->_scene;
+ SpriteSlots &spriteSlots = scene._spriteSlots;
+
+ int seqIndex = (_menuItemIndex < 6) ? _menuItemIndex : _frameIndex;
+ spriteSlots.deleteTimer(seqIndex);
+
+ SpriteAsset *menuItem = _menuItems[_menuItemIndex];
+ MSprite *spr = menuItem->getFrame(_frameIndex);
+
+ SpriteSlot &slot = spriteSlots[spriteSlots.add()];
+ slot._flags = IMG_UPDATE;
+ slot._seqIndex = seqIndex;
+ slot._spritesIndex = _menuItemIndexes[_menuItemIndex];
+ slot._frameNumber = _frameIndex + 1;
+ slot._position = spr->_offset;
+ slot._depth = 1;
+ slot._scale = 100;
+
+ _redrawFlag = true;
+}
+
+bool MainMenu::onEvent(Common::Event &event) {
+ Scene &scene = _vm->_game->_scene;
+ if (_selectedIndex != -1)
+ return false;
+
+ // Handle keypresses - these can be done at any time, even when the menu items are being drawn
+ if (event.type == Common::EVENT_KEYDOWN) {
+ switch (event.kbd.keycode) {
+ case Common::KEYCODE_ESCAPE:
+ case Common::KEYCODE_F6:
+ handleAction(EXIT);
+ break;
+
+ case Common::KEYCODE_F1:
+ handleAction(START_GAME);
+ break;
+
+ case Common::KEYCODE_F2:
+ handleAction(RESUME_GAME);
+ break;
+
+ case Common::KEYCODE_F3:
+ handleAction(SHOW_INTRO);
+ break;
+
+ case Common::KEYCODE_F4:
+ handleAction(CREDITS);
+ break;
+
+ case Common::KEYCODE_F5:
+ handleAction(QUOTES);
+ break;
+
+ case Common::KEYCODE_s: {
+ // Goodness knows why, but Rex has a key to restart the menuitem animations
+ // Restart the animation
+ _menuItemIndex = -1;
+ for (int i = 0; i < 6; ++i)
+ scene._spriteSlots.deleteTimer(i);
+
+ _skipFlag = false;
+ _vm->_events->hideCursor();
+ break;
+ }
+
+ default:
+ // Any other key skips the menu animation
+ _skipFlag = true;
+ return false;
+ }
+
+ return true;
+ }
+
+ switch (event.type) {
+ case Common::EVENT_LBUTTONDOWN:
+ if (_vm->_events->isCursorVisible()) {
+ _buttonDown = true;
+ int menuIndex = getHighlightedItem(event.mouse);
+
+ if (menuIndex != _highlightedIndex) {
+ scene._spriteSlots.deleteTimer(menuIndex);
+
+ _highlightedIndex = menuIndex;
+ if (_highlightedIndex != -1) {
+ _frameIndex = _highlightedIndex;
+ addSpriteSlot();
+ }
+ }
+ } else {
+ // Skip the menu animation
+ _skipFlag = true;
+ }
+ return true;
+
+ case Common::EVENT_MOUSEMOVE:
+ if (_buttonDown) {
+ int menuIndex = getHighlightedItem(event.mouse);
+ if (menuIndex != _highlightedIndex) {
+ if (_highlightedIndex != -1) {
+ // Revert to the unselected menu item
+ unhighlightItem();
+ }
+
+ if (menuIndex != -1) {
+ // Highlight new item
+ _highlightedIndex = menuIndex;
+ _frameIndex = _highlightedIndex;
+ addSpriteSlot();
+ }
+ }
+ }
+ break;
+
+ case Common::EVENT_LBUTTONUP:
+ _buttonDown = false;
+ if (_highlightedIndex != -1) {
+ _selectedIndex = _highlightedIndex;
+ unhighlightItem();
+ _frameIndex = 0;
+ }
+
+ return true;
+
+ default:
+ break;
+ }
+
+ return false;
+}
+
+int MainMenu::getHighlightedItem(const Common::Point &pt) {
+ return _vm->_game->_screenObjects.scan(pt, LAYER_GUI) - 1;
+}
+
+void MainMenu::unhighlightItem() {
+ // Revert to the unselected menu item
+ _vm->_game->_scene._spriteSlots.deleteTimer(_highlightedIndex);
+ _menuItemIndex = _highlightedIndex;
+ _frameIndex = 0;
+ addSpriteSlot();
+
+ _menuItemIndex = 6;
+ _highlightedIndex = -1;
+}
+
+void MainMenu::handleAction(MADSGameAction action) {
+ _vm->_events->hideCursor();
+ _breakFlag = true;
+
+ switch (action) {
+ case START_GAME:
+ // Show the difficulty dialog
+ _vm->_dialogs->_pendingDialog = DIALOG_DIFFICULTY;
+ break;
+
+ case RESUME_GAME:
+ // The original resumed the most recently saved game. Instead,
+ // just show the load game scren
+ _vm->_dialogs->_pendingDialog = DIALOG_RESTORE;
+ return;
+
+ case SHOW_INTRO:
+ AnimationView::execute(_vm, "rexopen");
+ break;
+
+ case CREDITS:
+ TextView::execute(_vm, "credits");
+ return;
+
+ case QUOTES:
+ TextView::execute(_vm, "quotes");
+ return;
+
+ case EXIT:
+ _vm->_dialogs->_pendingDialog = DIALOG_ADVERT;
+ break;
+ default:
+ break;
+ }
+}
+
+/*------------------------------------------------------------------------*/
+
+AdvertView::AdvertView(MADSEngine *vm): EventTarget(), _vm(vm) {
+ _breakFlag = false;
+}
+
+void AdvertView::show() {
+ bool altAdvert = _vm->getRandomNumber(1000) >= 500;
+ int screenId = altAdvert ? 995 : 996;
+ uint32 expiryTime = g_system->getMillis() + 10 * 1000;
+
+ _vm->_palette->resetGamePalette(4, 8);
+
+ // Load the advert background onto the screen
+ SceneInfo *sceneInfo = SceneInfo::init(_vm);
+ sceneInfo->load(screenId, 0, Common::String(), 0, _vm->_game->_scene._depthSurface,
+ _vm->_screen);
+ _vm->_screen.copyRectToScreen(_vm->_screen.getBounds());
+ _vm->_palette->setFullPalette(_vm->_palette->_mainPalette);
+
+ delete sceneInfo;
+
+ EventsManager &events = *_vm->_events;
+ events.setEventTarget(this);
+ events.hideCursor();
+
+ while (!_breakFlag && !_vm->shouldQuit()) {
+ _vm->_events->waitForNextFrame();
+ _vm->_game->_fx = kTransitionNone;
+
+ _breakFlag |= g_system->getMillis() >= expiryTime;
+ }
+
+ events.setEventTarget(nullptr);
+ _vm->quitGame();
+ events.pollEvents();
+}
+
+bool AdvertView::onEvent(Common::Event &event) {
+ if (event.type == Common::EVENT_KEYDOWN || event.type == Common::EVENT_LBUTTONDOWN) {
+ _breakFlag = true;
+ return true;
+ }
+
+ return false;
+}
+
+/*------------------------------------------------------------------------*/
+
+char TextView::_resourceName[100];
+#define TEXTVIEW_LINE_SPACING 2
+#define TEXT_ANIMATION_DELAY 100
+#define TV_NUM_FADE_STEPS 40
+#define TV_FADE_DELAY_MILLI 50
+
+void TextView::execute(MADSEngine *vm, const Common::String &resName) {
+ assert(resName.size() < 100);
+ strncpy(_resourceName, resName.c_str(), sizeof(_resourceName));
+ vm->_dialogs->_pendingDialog = DIALOG_TEXTVIEW;
+}
+
+TextView::TextView(MADSEngine *vm) : MenuView(vm) {
+ _animating = false;
+ _panSpeed = 0;
+ _spareScreen = nullptr;
+ _scrollCount = 0;
+ _lineY = -1;
+ _scrollTimeout = 0;
+ _panCountdown = 0;
+ _translationX = 0;
+ _screenId = -1;
+
+ _font = _vm->_font->getFont(FONT_CONVERSATION);
+ _vm->_palette->resetGamePalette(4, 0);
+ load();
+}
+
+TextView::~TextView() {
+}
+
+void TextView::load() {
+ Common::String scriptName(_resourceName);
+ scriptName += ".txr";
+
+ if (!_script.open(scriptName))
+ error("Could not open resource %s", _resourceName);
+
+ processLines();
+}
+
+void TextView::processLines() {
+ if (_script.eos())
+ error("Attempted to read past end of response file");
+
+ while (!_script.eos()) {
+ // Read in the next line
+ _script.readLine(_currentLine, 79);
+ char *p = _currentLine + strlen(_currentLine) - 1;
+ if (*p == '\n')
+ *p = '\0';
+
+ // Commented out line, so go loop for another
+ if (_currentLine[0] == '#')
+ continue;
+
+ // Process the line
+ char *cStart = strchr(_currentLine, '[');
+ if (cStart) {
+ while (cStart) {
+ // Loop for possible multiple commands on one line
+ char *cEnd = strchr(_currentLine, ']');
+ if (!cEnd)
+ error("Unterminated command '%s' in response file", _currentLine);
+
+ *cEnd = '\0';
+ processCommand();
+
+ // Copy rest of line (if any) to start of buffer
+ strncpy(_currentLine, cEnd + 1, sizeof(_currentLine));
+
+ cStart = strchr(_currentLine, '[');
+ }
+
+ if (_currentLine[0]) {
+ processText();
+ break;
+ }
+
+ } else {
+ processText();
+ break;
+ }
+ }
+}
+
+void TextView::processCommand() {
+ Scene &scene = _vm->_game->_scene;
+ Common::String scriptLine(_currentLine + 1);
+ scriptLine.toUppercase();
+ const char *paramP;
+ const char *commandStr = scriptLine.c_str();
+
+ if (!strncmp(commandStr, "BACKGROUND", 10)) {
+ // Set the background
+ paramP = commandStr + 10;
+ resetPalette();
+ int screenId = getParameter(&paramP);
+
+ SceneInfo *sceneInfo = SceneInfo::init(_vm);
+ sceneInfo->load(screenId, 0, "", 0, scene._depthSurface, scene._backgroundSurface);
+ scene._spriteSlots.fullRefresh();
+ _redrawFlag = true;
+
+ } else if (!strncmp(commandStr, "GO", 2)) {
+ _animating = true;
+
+ } else if (!strncmp(commandStr, "PAN", 3)) {
+ // Set panning values
+ paramP = commandStr + 3;
+ int panX = getParameter(&paramP);
+ int panY = getParameter(&paramP);
+ int panSpeed = getParameter(&paramP);
+
+ if ((panX != 0) || (panY != 0)) {
+ _pan = Common::Point(panX, panY);
+ _panSpeed = panSpeed;
+ }
+
+ } else if (!strncmp(commandStr, "DRIVER", 6)) {
+ // Set the driver to use
+ paramP = commandStr + 7;
+
+ if (!strncmp(paramP, "#SOUND.00", 9)) {
+ int driverNum = paramP[9] - '0';
+ _vm->_sound->init(driverNum);
+ }
+ } else if (!strncmp(commandStr, "SOUND", 5)) {
+ // Set sound number
+ paramP = commandStr + 5;
+ int soundId = getParameter(&paramP);
+ _vm->_sound->command(soundId);
+
+ } else if (!strncmp(commandStr, "COLOR", 5) && ((commandStr[5] == '0') ||
+ (commandStr[5] == '1'))) {
+ // Set the text colors
+ int index = commandStr[5] - '0';
+ paramP = commandStr + 6;
+
+ byte r = getParameter(&paramP);
+ byte g = getParameter(&paramP);
+ byte b = getParameter(&paramP);
+
+ _vm->_palette->setEntry(5 + index, r, g, b);
+
+ } else if (!strncmp(commandStr, "SPARE", 5)) {
+ // Sets a secondary background number that can be later switched in with a PAGE command
+ paramP = commandStr + 6;
+ int spareIndex = commandStr[5] - '0';
+ assert(spareIndex < 4);
+ int screenId = getParameter(&paramP);
+
+ // Load the spare background
+ SceneInfo *sceneInfo = SceneInfo::init(_vm);
+ sceneInfo->_width = MADS_SCREEN_WIDTH;
+ sceneInfo->_height = MADS_SCENE_HEIGHT;
+ _spareScreens[spareIndex].setSize(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
+ sceneInfo->loadMadsV1Background(screenId, "", SCENEFLAG_TRANSLATE,
+ _spareScreens[spareIndex]);
+ delete sceneInfo;
+
+ } else if (!strncmp(commandStr, "PAGE", 4)) {
+ // Signals to change to a previous specified secondary background
+ paramP = commandStr + 4;
+ int spareIndex = getParameter(&paramP);
+
+ // Only allow background switches if one isn't currently in progress
+ if (!_spareScreen && _spareScreens[spareIndex].getPixels() != nullptr) {
+ _spareScreen = &_spareScreens[spareIndex];
+ _translationX = 0;
+ }
+
+ } else {
+ error("Unknown response command: '%s'", commandStr);
+ }
+}
+
+int TextView::getParameter(const char **paramP) {
+ if ((**paramP != '=') && (**paramP != ','))
+ return 0;
+
+ int result = 0;
+ ++*paramP;
+ while ((**paramP >= '0') && (**paramP <= '9')) {
+ result = result * 10 + (**paramP - '0');
+ ++*paramP;
+ }
+
+ return result;
+}
+
+void TextView::processText() {
+ int lineWidth, xStart;
+
+ if (!strcmp(_currentLine, "***")) {
+ // Special signifier for end of script
+ _scrollCount = _font->getHeight() * 13;
+ _lineY = -1;
+ return;
+ }
+
+ _lineY = 0;
+
+ // Lines are always centered, except if line contains a '@', in which case the
+ // '@' marks the position that must be horizontally centered
+ char *centerP = strchr(_currentLine, '@');
+ if (centerP) {
+ *centerP = '\0';
+ xStart = (MADS_SCREEN_WIDTH / 2) - _font->getWidth(_currentLine);
+
+ // Delete the @ character and shift back the remainder of the string
+ char *p = centerP + 1;
+ if (*p == ' ') ++p;
+ strcpy(centerP, p);
+
+ } else {
+ lineWidth = _font->getWidth(_currentLine);
+ xStart = (MADS_SCREEN_WIDTH - lineWidth) / 2;
+ }
+
+ // Add the new line to the list of pending lines
+ TextLine tl;
+ tl._pos = Common::Point(xStart, MADS_SCENE_HEIGHT);
+ tl._line = _currentLine;
+ tl._textDisplayIndex = -1;
+ _textLines.push_back(tl);
+}
+
+void TextView::display() {
+ FullScreenDialog::display();
+ _sceneChanged = true;
+}
+
+void TextView::resetPalette() {
+ _vm->_palette->resetGamePalette(8, 8);
+ _vm->_palette->setEntry(5, 0, 63, 63);
+ _vm->_palette->setEntry(6, 0, 45, 45);
+}
+
+void TextView::doFrame() {
+ Scene &scene = _vm->_game->_scene;
+ if (!_animating)
+ return;
+
+ // Only update state if wait period has expired
+ uint32 currTime = g_system->getMillis();
+
+ // If a screen transition is in progress and it's time for another column, handle it
+ if (_spareScreen) {
+ byte *srcP = _spareScreen->getBasePtr(_translationX, 0);
+ byte *bgP = scene._backgroundSurface.getBasePtr(_translationX, 0);
+ byte *screenP = (byte *)_vm->_screen.getBasePtr(_translationX, 0);
+
+ for (int y = 0; y < MADS_SCENE_HEIGHT; ++y, srcP += MADS_SCREEN_WIDTH,
+ bgP += MADS_SCREEN_WIDTH, screenP += MADS_SCREEN_WIDTH) {
+ *bgP = *srcP;
+ *screenP = *srcP;
+ }
+
+ // Flag the column of the screen is modified
+ _vm->_screen.copyRectToScreen(Common::Rect(_translationX, 0,
+ _translationX + 1, MADS_SCENE_HEIGHT));
+
+ // Keep moving the column to copy to the right
+ if (++_translationX == MADS_SCREEN_WIDTH) {
+ // Surface transition is complete
+ _spareScreen = nullptr;
+ }
+ }
+
+ // Make sure it's time for an update
+ if (currTime < _scrollTimeout)
+ return;
+ _scrollTimeout = g_system->getMillis() + TEXT_ANIMATION_DELAY;
+ _redrawFlag = true;
+
+ // If any panning values are set, pan the background surface
+ if ((_pan.x != 0) || (_pan.y != 0)) {
+ if (_panCountdown > 0) {
+ --_panCountdown;
+ return;
+ }
+
+ // Handle horizontal panning
+ if (_pan.x != 0) {
+ byte *lineTemp = new byte[_pan.x];
+ for (int y = 0; y < MADS_SCENE_HEIGHT; ++y) {
+ byte *pixelsP = (byte *)scene._backgroundSurface.getBasePtr(0, y);
+
+ // Copy the first X pixels into temp buffer, move the rest of the line
+ // to the start of the line, and then move temp buffer pixels to end of line
+ Common::copy(pixelsP, pixelsP + _pan.x, lineTemp);
+ Common::copy(pixelsP + _pan.x, pixelsP + MADS_SCREEN_WIDTH, pixelsP);
+ Common::copy(lineTemp, lineTemp + _pan.x, pixelsP + MADS_SCREEN_WIDTH - _pan.x);
+ }
+
+ delete[] lineTemp;
+ }
+
+ // Handle vertical panning
+ if (_pan.y != 0) {
+ // Store the bottom Y lines into a temp buffer, move the rest of the lines down,
+ // and then copy the stored lines back to the top of the screen
+ byte *linesTemp = new byte[_pan.y * MADS_SCREEN_WIDTH];
+ byte *pixelsP = (byte *)scene._backgroundSurface.getBasePtr(0, MADS_SCENE_HEIGHT - _pan.y);
+ Common::copy(pixelsP, pixelsP + MADS_SCREEN_WIDTH * _pan.y, linesTemp);
+
+ for (int y = MADS_SCENE_HEIGHT - 1; y >= _pan.y; --y) {
+ byte *destP = (byte *)scene._backgroundSurface.getBasePtr(0, y);
+ byte *srcP = (byte *)scene._backgroundSurface.getBasePtr(0, y - _pan.y);
+ Common::copy(srcP, srcP + MADS_SCREEN_WIDTH, destP);
+ }
+
+ Common::copy(linesTemp, linesTemp + _pan.y * MADS_SCREEN_WIDTH,
+ (byte *)scene._backgroundSurface.getPixels());
+ delete[] linesTemp;
+ }
+
+ // Flag for a full screen refresh
+ scene._spriteSlots.fullRefresh();
+ }
+
+ // Scroll all active text lines up
+ for (int i = _textLines.size() - 1; i >= 0; --i) {
+ TextLine &tl = _textLines[i];
+ if (tl._textDisplayIndex != -1)
+ // Expire the text line that's already on-screen
+ scene._textDisplay.expire(tl._textDisplayIndex);
+
+ tl._pos.y--;
+ if (tl._pos.y < 0) {
+ _textLines.remove_at(i);
+ } else {
+ tl._textDisplayIndex = scene._textDisplay.add(tl._pos.x, tl._pos.y,
+ 0x605, -1, tl._line, _font);
+ }
+ }
+
+ if (_scrollCount > 0) {
+ // Handling final scrolling of text off of screen
+ if (--_scrollCount == 0) {
+ scriptDone();
+ return;
+ }
+ } else {
+ // Handling a text row
+ if (++_lineY == (_font->getHeight() + TEXTVIEW_LINE_SPACING))
+ processLines();
+ }
+}
+
+void TextView::scriptDone() {
+ _breakFlag = true;
+ _vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
+}
+
+/*------------------------------------------------------------------------*/
+
+char AnimationView::_resourceName[100];
+
+void AnimationView::execute(MADSEngine *vm, const Common::String &resName) {
+ assert(resName.size() < 100);
+ strncpy(_resourceName, resName.c_str(), sizeof(_resourceName));
+ vm->_dialogs->_pendingDialog = DIALOG_ANIMVIEW;
+}
+
+AnimationView::AnimationView(MADSEngine *vm) : MenuView(vm) {
+ _soundDriverLoaded = false;
+ _previousUpdate = 0;
+ _screenId = -1;
+ _showWhiteBars = true;
+ _resetPalette = false;
+ _resyncMode = NEVER;
+
+ load();
+}
+
+void AnimationView::load() {
+ Common::String resName(_resourceName);
+ if (!resName.hasSuffix("."))
+ resName += ".res";
+
+ if (!_script.open(resName))
+ error("Could not open resource %s", resName.c_str());
+
+ processLines();
+}
+
+bool AnimationView::onEvent(Common::Event &event) {
+ // Wait for the Escape key or a mouse press
+ if (((event.type == Common::EVENT_KEYDOWN) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) ||
+ (event.type == Common::EVENT_RBUTTONUP)) {
+ scriptDone();
+ return true;
+ }
+
+ return false;
+}
+
+void AnimationView::doFrame() {
+ Scene &scene = _vm->_game->_scene;
+ int bgNumber = 0;
+
+ // Only update state if wait period has expired
+ if (_previousUpdate > 0) {
+ if (g_system->getMillis() - _previousUpdate < 3000) {
+ return;
+ } else {
+ // time for an update
+ _previousUpdate = g_system->getMillis();
+ }
+ } else {
+ _previousUpdate = g_system->getMillis();
+ return;
+ }
+ /*
+ char bgFile[10];
+ strncpy(bgFile, _currentFile, 5);
+ bgFile[0] = bgFile[2];
+ bgFile[1] = bgFile[3];
+ bgFile[2] = bgFile[4];
+ bgFile[3] = '\0';
+ bgNumber = atoi(bgFile);
+ sprintf(bgFile, "rm%i.art", bgNumber);
+
+ // Not all scenes have a background. If there is one, refresh it
+ if (Common::File::exists(bgFile)) {
+ _vm->_palette->resetGamePalette(4, 8);
+ SceneInfo *sceneInfo = SceneInfo::init(_vm);
+ sceneInfo->load(bgNumber, 0, Common::String(), 0, scene._depthSurface,
+ scene._backgroundSurface);
+ }
+ */
+}
+
+void AnimationView::scriptDone() {
+ _breakFlag = true;
+ _vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
+}
+
+void AnimationView::processLines() {
+ if (_script.eos()) {
+ // end of script, end animation
+ scriptDone();
+ return;
+ }
+
+ char c;
+ while (!_script.eos()) {
+ // Get in next line
+ _currentLine.empty();
+ while (!_script.eos() && (c = _script.readByte()) != '\n') {
+ if (c != '\r')
+ _currentLine += c;
+ }
+
+ // Process the line
+ while (!_currentLine.empty()) {
+ if (_currentLine.hasPrefix("-")) {
+ _currentLine.deleteChar(0);
+
+ processCommand();
+ } else {
+ // Get resource name
+ Common::String resName;
+ while (!_currentLine.empty() && (c = _currentLine[0]) != ' ') {
+ _currentLine.deleteChar(0);
+ resName += c;
+ }
+
+ _resources.push_back(ResourceEntry(resName, _sfx));
+ _sfx = 0;
+ }
+
+ // Skip any spaces
+ while (_currentLine.hasPrefix(" "))
+ _currentLine.deleteChar(0);
+ }
+ }
+}
+
+void AnimationView::processCommand() {
+ // Get the command character
+ char commandChar = toupper(_currentLine[0]);
+ _currentLine.deleteChar(0);
+
+ // Handle the command
+ switch (commandChar) {
+ case 'H':
+ // -h[:ex] Disable EMS / XMS high memory support
+ if (_currentLine.hasPrefix(":"))
+ _currentLine.deleteChar(0);
+ while (_currentLine.hasPrefix("e") || _currentLine.hasPrefix("x"))
+ _currentLine.deleteChar(0);
+ break;
+ case 'O':
+ // -o:xxx Specify opening special effect
+ assert(_currentLine[0] == ':');
+ _currentLine.deleteChar(0);
+ _sfx = getParameter();
+ break;
+ case 'P':
+ // Switch to CONCAT mode, which is ignored anyway
+ break;
+ case 'R': {
+ // Resynch timer (always, beginning, never)
+ assert(_currentLine[0] == ':');
+ _currentLine.deleteChar(0);
+
+ char v = toupper(_currentLine[0]);
+ _currentLine.deleteChar(0);
+ if (v == 'N')
+ _resyncMode = NEVER;
+ else if (v == 'A')
+ _resyncMode = ALWAYS;
+ else if (v == 'B')
+ _resyncMode = BEGINNING;
+ else
+ error("Unknown parameter");
+ break;
+ }
+ case 'W':
+ // Switch white bars being visible
+ _showWhiteBars = !_showWhiteBars;
+ break;
+ case 'X':
+ // Exit after animation finishes. Ignore
+ break;
+ case 'Y':
+ // Reset palette on startup
+ _resetPalette = true;
+ break;
+ default:
+ error("Unknown command char: '%c'", commandChar);
+ }
+}
+
+int AnimationView::getParameter() {
+ int result = 0;
+
+ while (!_currentLine.empty()) {
+ char c = _currentLine[0];
+
+ if (c >= '0' && c <= '9') {
+ _currentLine.deleteChar(0);
+ result = result * 10 + (c - '0');
+ } else {
+ break;
+ }
+ }
+
+ return result;
+}
+
+
+} // End of namespace Nebular
+
+} // End of namespace MADS
diff --git a/engines/mads/nebular/menu_nebular.h b/engines/mads/nebular/menu_nebular.h
new file mode 100644
index 0000000000..7abe3c8892
--- /dev/null
+++ b/engines/mads/nebular/menu_nebular.h
@@ -0,0 +1,287 @@
+/* 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 MADS_MENU_NEBULAR_H
+#define MADS_MENU_NEBULAR_H
+
+#include "common/scummsys.h"
+#include "mads/game.h"
+#include "mads/msurface.h"
+#include "mads/nebular/dialogs_nebular.h"
+
+namespace MADS {
+
+class MADSEngine;
+
+namespace Nebular {
+
+enum MADSGameAction { START_GAME, RESUME_GAME, SHOW_INTRO, CREDITS, QUOTES, EXIT };
+
+class MenuView: public FullScreenDialog {
+protected:
+ bool _breakFlag;
+ bool _redrawFlag;
+
+ virtual void doFrame() = 0;
+
+ virtual void display();
+
+ /**
+ * Event handler
+ */
+ virtual bool onEvent(Common::Event &event);
+public:
+ MenuView(MADSEngine *vm);
+
+ virtual ~MenuView() {}
+
+ virtual void show();
+};
+
+class MainMenu: public MenuView {
+private:
+ SpriteAsset *_menuItems[7];
+ int _menuItemIndexes[7];
+ int _menuItemIndex;
+ int _frameIndex;
+ uint32 _delayTimeout;
+ bool _skipFlag;
+
+ /**
+ * Currently highlighted menu item
+ */
+ int _highlightedIndex;
+
+ /**
+ * Flag for mouse button being pressed
+ */
+ bool _buttonDown;
+
+ /**
+ * Stores menu item selection
+ */
+ int _selectedIndex;
+
+ /**
+ * Get the highlighted menu item under the cursor
+ */
+ int getHighlightedItem(const Common::Point &pt);
+
+ /**
+ * Un-highlight a currently highlighted item
+ */
+ void unhighlightItem();
+
+ /**
+ * Execute a given menuitem
+ */
+ void handleAction(MADSGameAction action);
+
+ /**
+ * Add a sprite slot for the current menuitem frame
+ */
+ void addSpriteSlot();
+protected:
+ /**
+ * Display the menu
+ */
+ virtual void display();
+
+ /**
+ * Handle the menu item animations
+ */
+ virtual void doFrame();
+
+ /**
+ * Event handler
+ */
+ virtual bool onEvent(Common::Event &event);
+public:
+ MainMenu(MADSEngine *vm);
+
+ virtual ~MainMenu();
+};
+
+class AdvertView : public EventTarget {
+private:
+ /**
+ * Engine reference
+ */
+ MADSEngine *_vm;
+
+ /**
+ * Signals when to close the dialog
+ */
+ bool _breakFlag;
+protected:
+ /**
+ * Event handler
+ */
+ virtual bool onEvent(Common::Event &event);
+public:
+ AdvertView(MADSEngine *vm);
+
+ virtual ~AdvertView() {}
+
+ /**
+ * Show the dialog
+ */
+ void show();
+};
+
+struct TextLine {
+ Common::Point _pos;
+ Common::String _line;
+ int _textDisplayIndex;
+};
+
+/**
+ * Scrolling text view
+ */
+class TextView : public MenuView {
+private:
+ static char _resourceName[100];
+
+ bool _animating;
+ bool _sceneChanged;
+ Common::Array<TextLine> _textLines;
+ Common::Point _pan;
+ int _panSpeed;
+ MSurface _spareScreens[4];
+ int _scrollCount;
+ int _lineY;
+ uint32 _scrollTimeout;
+ int _panCountdown;
+ int _translationX;
+ Common::File _script;
+ char _currentLine[80];
+ MSurface *_spareScreen;
+ Font *_font;
+private:
+ /**
+ * Load the text resource
+ */
+ void load();
+
+ /**
+ * Process the lines
+ */
+ void processLines();
+
+ /**
+ * Process a command from the script file
+ */
+ void processCommand();
+
+ /**
+ * Process text from the script file
+ */
+ void processText();
+
+ /**
+ * Get a parameter from line
+ */
+ int getParameter(const char **paramP);
+
+ /**
+ * Called when the script is finished
+ */
+ void scriptDone();
+
+ /**
+ * Reset the game palette
+ */
+ void resetPalette();
+protected:
+ virtual void display();
+
+ virtual void doFrame();
+public:
+ /**
+ * Queue the given text resource for display
+ */
+ static void execute(MADSEngine *vm, const Common::String &resName);
+
+ TextView(MADSEngine *vm);
+
+ virtual ~TextView();
+};
+
+enum ResyncMode { NEVER, ALWAYS, BEGINNING };
+
+struct ResourceEntry {
+ Common::String _resourceName;
+ int _sfx;
+
+ ResourceEntry() {}
+ ResourceEntry(const Common::String &resName, int sfx) {
+ _resourceName = resName;
+ _sfx = sfx;
+ }
+};
+
+/**
+* Animation cutscene view
+*/
+class AnimationView : public MenuView {
+private:
+ static char _resourceName[100];
+
+ Common::File _script;
+ uint32 _previousUpdate;
+ Common::String _currentLine;
+ bool _soundDriverLoaded;
+ bool _showWhiteBars;
+ bool _resetPalette;
+ ResyncMode _resyncMode;
+ int _sfx;
+ Common::Array<ResourceEntry> _resources;
+private:
+ void load();
+
+ void processLines();
+
+ void processCommand();
+
+ int getParameter();
+
+ void scriptDone();
+protected:
+ virtual void doFrame();
+
+ virtual bool onEvent(Common::Event &event);
+public:
+ /**
+ * Queue the given text resource for display
+ */
+ static void execute(MADSEngine *vm, const Common::String &resName);
+
+ AnimationView(MADSEngine *vm);
+
+ virtual ~AnimationView() {}
+};
+
+} // End of namespace Nebular
+
+} // End of namespace MADS
+
+#endif /* MADS_MENU_NEBULAR_H */
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp
index c71512ed4c..b5e2491624 100644
--- a/engines/mads/nebular/nebular_scenes.cpp
+++ b/engines/mads/nebular/nebular_scenes.cpp
@@ -331,7 +331,7 @@ void SceneInfoNebular::loadCodes(MSurface &depthSurface, Common::SeekableReadStr
byte runValue = stream->readByte();
// Write out the run length
- Common::fill(destP, destP + runLength, runValue);
+ Common::fill(destP, MIN(endP, destP + runLength), runValue);
destP += runLength;
// Get the next run length
diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp
index a81f11b8a5..ab072c1d3c 100644
--- a/engines/mads/nebular/nebular_scenes1.cpp
+++ b/engines/mads/nebular/nebular_scenes1.cpp
@@ -1033,7 +1033,7 @@ void Scene102::actions() {
_action._inProgress = false;
return;
}
- } else if (_action.isAction(VERB_LOOK) || (_game._difficulty != DIFFICULTY_EASY)) {
+ } else if (_action.isAction(VERB_LOOK) || (_game._difficulty != DIFFICULTY_HARD)) {
_vm->_dialogs->show(10222);
_action._inProgress = false;
return;
diff --git a/engines/mads/nebular/nebular_scenes8.cpp b/engines/mads/nebular/nebular_scenes8.cpp
index 6039135794..14f36756de 100644
--- a/engines/mads/nebular/nebular_scenes8.cpp
+++ b/engines/mads/nebular/nebular_scenes8.cpp
@@ -1121,8 +1121,6 @@ void Scene804::actions() {
} else {
_action._inProgress = false;
- //saveGame("REX000.SAV");
-
_vm->_dialogs->show(80424);
_pullThrottleReally = true;
_scene->_kernelMessages.add(Common::Point(78, 75), 0x1110, 0, 0,
diff --git a/engines/mads/nebular/sound_nebular.cpp b/engines/mads/nebular/sound_nebular.cpp
index fc2755db2f..5ce362e053 100644
--- a/engines/mads/nebular/sound_nebular.cpp
+++ b/engines/mads/nebular/sound_nebular.cpp
@@ -149,7 +149,7 @@ AdlibSample::AdlibSample(Common::SeekableReadStream &s) {
/*-----------------------------------------------------------------------*/
-ASound::ASound(Audio::Mixer *mixer, const Common::String &filename, int dataOffset) {
+ASound::ASound(Audio::Mixer *mixer, FM_OPL *opl, const Common::String &filename, int dataOffset) {
// Open up the appropriate sound file
if (!_soundFile.open(filename))
error("Could not open file - %s", filename.c_str());
@@ -197,8 +197,7 @@ ASound::ASound(Audio::Mixer *mixer, const Common::String &filename, int dataOffs
// Store passed parameters, and setup OPL
_dataOffset = dataOffset;
_mixer = mixer;
- _opl = OPL::Config::create();
- assert(_opl);
+ _opl = opl;
_opl->init(getRate());
_mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1,
@@ -217,7 +216,6 @@ ASound::~ASound() {
delete[] (*i)._data;
_mixer->stopHandle(_soundHandle);
- delete _opl;
}
void ASound::adlibInit() {
@@ -941,8 +939,8 @@ const ASound1::CommandPtr ASound1::_commandList[42] = {
&ASound1::command40, &ASound1::command41
};
-ASound1::ASound1(Audio::Mixer *mixer)
- : ASound(mixer, "asound.001", 0x1520) {
+ASound1::ASound1(Audio::Mixer *mixer, FM_OPL *opl)
+ : ASound(mixer, opl, "asound.001", 0x1520) {
_cmd23Toggle = false;
// Load sound samples
@@ -1242,7 +1240,7 @@ const ASound2::CommandPtr ASound2::_commandList[44] = {
&ASound2::command40, &ASound2::command41, &ASound2::command42, &ASound2::command43
};
-ASound2::ASound2(Audio::Mixer *mixer) : ASound(mixer, "asound.002", 0x15E0) {
+ASound2::ASound2(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.002", 0x15E0) {
_command12Param = 0xFD;
// Load sound samples
@@ -1613,7 +1611,7 @@ const ASound3::CommandPtr ASound3::_commandList[61] = {
&ASound3::command60
};
-ASound3::ASound3(Audio::Mixer *mixer) : ASound(mixer, "asound.003", 0x15B0) {
+ASound3::ASound3(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.003", 0x15B0) {
_command39Flag = false;
// Load sound samples
@@ -2017,7 +2015,7 @@ const ASound4::CommandPtr ASound4::_commandList[61] = {
&ASound4::command60
};
-ASound4::ASound4(Audio::Mixer *mixer) : ASound(mixer, "asound.004", 0x14F0) {
+ASound4::ASound4(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.004", 0x14F0) {
// Load sound samples
_soundFile.seek(_dataOffset + 0x122);
for (int i = 0; i < 210; ++i)
@@ -2273,7 +2271,7 @@ const ASound5::CommandPtr ASound5::_commandList[42] = {
&ASound5::command40, &ASound5::command41
};
-ASound5::ASound5(Audio::Mixer *mixer) : ASound(mixer, "asound.002", 0x15E0) {
+ASound5::ASound5(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.002", 0x15E0) {
// Load sound samples
_soundFile.seek(_dataOffset + 0x144);
for (int i = 0; i < 164; ++i)
@@ -2514,7 +2512,7 @@ const ASound6::CommandPtr ASound6::_commandList[30] = {
&ASound6::nullCommand, &ASound6::command29
};
-ASound6::ASound6(Audio::Mixer *mixer) : ASound(mixer, "asound.006", 0x1390) {
+ASound6::ASound6(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.006", 0x1390) {
// Load sound samples
_soundFile.seek(_dataOffset + 0x122);
for (int i = 0; i < 200; ++i)
@@ -2670,7 +2668,7 @@ const ASound7::CommandPtr ASound7::_commandList[38] = {
&ASound7::command36, &ASound7::command37
};
-ASound7::ASound7(Audio::Mixer *mixer) : ASound(mixer, "asound.007", 0x1460) {
+ASound7::ASound7(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.007", 0x1460) {
// Load sound samples
_soundFile.seek(_dataOffset + 0x122);
for (int i = 0; i < 214; ++i)
@@ -2876,7 +2874,7 @@ const ASound8::CommandPtr ASound8::_commandList[38] = {
&ASound8::command36, &ASound8::command37
};
-ASound8::ASound8(Audio::Mixer *mixer) : ASound(mixer, "asound.008", 0x1490) {
+ASound8::ASound8(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.008", 0x1490) {
// Load sound samples
_soundFile.seek(_dataOffset + 0x122);
for (int i = 0; i < 174; ++i)
@@ -3114,6 +3112,313 @@ int ASound8::command37() {
return 0;
}
+/*-----------------------------------------------------------------------*/
+
+const ASound9::CommandPtr ASound9::_commandList[52] = {
+ &ASound9::command0, &ASound9::command1, &ASound9::command2, &ASound9::command3,
+ &ASound9::command4, &ASound9::command5, &ASound9::command6, &ASound9::command7,
+ &ASound9::command8, &ASound9::command9, &ASound9::command10, &ASound9::command11,
+ &ASound9::command12, &ASound9::command13, &ASound9::command14, &ASound9::command15,
+ &ASound9::command16, &ASound9::command17, &ASound9::command18, &ASound9::command19,
+ &ASound9::command20, &ASound9::command21, &ASound9::command22, &ASound9::command23,
+ &ASound9::command24, &ASound9::command25, &ASound9::command26, &ASound9::command27,
+ &ASound9::command28, &ASound9::command29, &ASound9::command30, &ASound9::command31,
+ &ASound9::command32, &ASound9::command33, &ASound9::command34, &ASound9::command35,
+ &ASound9::command36, &ASound9::command37, &ASound9::command38, &ASound9::command39,
+ &ASound9::command40, &ASound9::command41, &ASound9::command42, &ASound9::command43,
+ &ASound9::command44_46, &ASound9::command45, &ASound9::command44_46, &ASound9::command47,
+ &ASound9::command48, &ASound9::command49, &ASound9::command50, &ASound9::command51
+};
+
+ASound9::ASound9(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.009", 0x16F0) {
+ _v1 = _v2 = 0;
+ _soundPtr = nullptr;
+
+ // Load sound samples
+ _soundFile.seek(_dataOffset + 0x50);
+ for (int i = 0; i < 94; ++i)
+ _samples.push_back(AdlibSample(_soundFile));
+}
+
+int ASound9::command(int commandId, int param) {
+ if (commandId > 60)
+ return 0;
+
+ _commandParam = param;
+ _frameCounter = 0;
+ return (this->*_commandList[commandId])();
+}
+
+int ASound9::command9() {
+ _v1 = 1848;
+ _v2 = 84;
+ _channels[0].load(loadData(0xAA4, 470));
+ _channels[1].load(loadData(0xE4C, 450));
+ _channels[2].load(loadData(0x1466, 702));
+ _channels[3].load(loadData(0x137E, 232));
+ _channels[4].load(loadData(0x1014, 65));
+ _channels[5].load(loadData(0x11C4, 44));
+ _channels[6].load(loadData(0XC7A, 466));
+ return 0;
+}
+
+int ASound9::command10() {
+ _channels[0].load(loadData(0x1724, 24));
+ _channels[1].load(loadData(0x173C, 24));
+ _channels[2].load(loadData(0x1754, 20));
+ _channels[3].load(loadData(0x1768, 20));
+ _channels[4].load(loadData(0x177C, 20));
+ _channels[5].load(loadData(0x1790, 20));
+ return 0;
+}
+
+int ASound9::command11() {
+ playSound(0x8232, 168);
+ playSound(0x82DA, 170);
+ return 0;
+}
+
+int ASound9::command12() {
+ playSound(0x80DA, 12);
+ playSound(0x80E6, 12);
+ return 0;
+}
+
+int ASound9::command13() {
+ playSound(0x80F2, 38);
+ playSound(0x8118, 42);
+ return 0;
+}
+
+int ASound9::command14() {
+ playSound(0x81F6, 22);
+ return 0;
+}
+
+int ASound9::command15() {
+ playSound(0x818A, 32);
+ playSound(0x81AA, 32);
+ return 0;
+}
+
+int ASound9::command16() {
+ playSound(0x8022, 36);
+ playSound(0x8046, 42);
+ return 0;
+}
+
+int ASound9::command17() {
+ command29();
+ playSound(0x858C, 11);
+ return 0;
+}
+
+int ASound9::command18() {
+ playSound(0x80C2, 24);
+ return 0;
+}
+
+int ASound9::command19() {
+ playSound(0x80A0, 34);
+ return 0;
+}
+
+int ASound9::command20() {
+ int v = (getRandomNumber() & 0x10) | 0x4D;
+ byte *pData = loadData(0x8142, 8);
+ pData[4] = v & 0x7F;
+ playSoundData(pData);
+ return 0;
+}
+
+int ASound9::command21() {
+ playSound(0x815A, 16);
+ return 0;
+}
+
+int ASound9::command22() {
+ playSound(0x816A, 16);
+ return 0;
+}
+
+int ASound9::command23() {
+ playSound(0x814A, 16);
+ return 0;
+}
+
+int ASound9::command24() {
+ playSound(0x7FE2, 34);
+ return 0;
+}
+
+int ASound9::command25() {
+ playSound(0x8004, 30);
+ return 0;
+}
+
+int ASound9::command26() {
+ _channels[6].load(loadData(0x8384, 156));
+ _channels[7].load(loadData(0x8420, 160));
+ return 0;
+}
+
+int ASound9::command27() {
+ playSound(0x84C0, 140);
+ return 0;
+}
+
+int ASound9::command28() {
+ playSound(0x81CA, 10);
+ return 0;
+}
+
+int ASound9::command29() {
+ playSound(0x81D4, 10);
+ return 0;
+}
+
+int ASound9::command30() {
+ playSound(0x817A, 16);
+ return 0;
+}
+
+int ASound9::command31() {
+ playSound(0x820C, 14);
+ playSound(0x821A, 24);
+ return 0;
+}
+
+int ASound9::command32() {
+ playSound(0x8070, 8);
+ return 0;
+}
+
+int ASound9::command33() {
+ playSound(0x8078, 16);
+ playSound(0x8088, 16);
+ return 0;
+}
+
+int ASound9::command34() {
+ // Skipped stuff in original
+ _channels[0].load(loadData(0x17A4, 24));
+ _channels[1].load(loadData(0x1CDE, 62));
+ _channels[2].load(loadData(0x2672, 980));
+ _channels[3].load(loadData(0x3336, 1000));
+ _channels[4].load(loadData(0x469E, 176));
+ _channels[5].load(loadData(0x57F2, 138));
+
+ return 0;
+}
+
+int ASound9::command35() {
+ playSound(0x854C, 64);
+ return 0;
+}
+
+int ASound9::command36() {
+ playSound(0x81DE, 10);
+ playSound(0x81E8, 14);
+ return 0;
+}
+
+int ASound9::command37() {
+ byte *pData = loadData(0x8098, 8);
+ int v = getRandomNumber();
+ if ((v &= 0x40) != 0)
+ v |= 8;
+ else
+ v += 0x4A;
+
+ pData[6] = v;
+ playSoundData(pData);
+ return 0;
+}
+
+int ASound9::command38() {
+ playSound(0x100E, 6);
+ return 0;
+}
+
+int ASound9::command39() {
+ _soundPtr = loadData(0x1055, 128);
+ return 0;
+}
+
+int ASound9::command40() {
+ _soundPtr = loadData(0x118C, 50);
+ return 0;
+}
+
+int ASound9::command41() {
+ _soundPtr = loadData(0x11BE, 6);
+ return 0;
+}
+
+int ASound9::command42() {
+ _soundPtr = loadData(0x11F0, 50);
+ return 0;
+}
+
+int ASound9::command43() {
+ _v1 = _v2 = 80;
+ _channels[0].load(loadData(0x626A, 90));
+ _channels[1].load(loadData(0x67F2, 92));
+ _channels[2].load(loadData(0x6CFE, 232));
+ _channels[3].load(loadData(0x7146, 236));
+
+ return 0;
+}
+
+int ASound9::command44_46() {
+ _soundPtr = loadData(0x10D5, 38);
+ return 0;
+}
+
+int ASound9::command45() {
+ _soundPtr = loadData(0x10FB, 38);
+ return 0;
+}
+
+int ASound9::command47() {
+ _soundPtr = loadData(0x1121, 107);
+ return 0;
+}
+
+int ASound9::command48() {
+ playSound(0x7FD0, 8);
+ playSound(0x7FD8, 10);
+ return 0;
+}
+
+int ASound9::command49() {
+ _channels[0].load(loadData(0x7AD6, 92));
+ _channels[1].load(loadData(0x7B32, 90));
+ _channels[2].load(loadData(0x7B8C, 738));
+ _channels[3].load(loadData(0x7E6E, 28));
+ _channels[4].load(loadData(0x7E8A, 30));
+ _channels[5].load(loadData(0x7EA8, 30));
+ _channels[6].load(loadData(0x7EC6, 195));
+ return 0;
+}
+
+int ASound9::command50() {
+ _soundPtr = loadData(0x1222, 348);
+ return 0;
+}
+
+int ASound9::command51() {
+ // Skipped stuff in original
+ _channels[0].load(loadData(0x17BC, 1282));
+ _channels[1].load(loadData(0x1CFC, 2422));
+ _channels[2].load(loadData(0x2A46, 2288));
+ _channels[3].load(loadData(0x371E, 3964));
+ _channels[4].load(loadData(0x474E, 1863));
+ _channels[5].load(loadData(0x587C, 2538));
+ return 0;
+}
+
+
} // End of namespace Nebular
} // End of namespace MADS
diff --git a/engines/mads/nebular/sound_nebular.h b/engines/mads/nebular/sound_nebular.h
index c485bd7955..abb6516030 100644
--- a/engines/mads/nebular/sound_nebular.h
+++ b/engines/mads/nebular/sound_nebular.h
@@ -305,10 +305,12 @@ public:
public:
/**
* Constructor
+ * @param mixer Mixer
+ * @param opl OPL
* @param filename Specifies the adlib sound player file to use
* @param dataOffset Offset in the file of the data segment
*/
- ASound(Audio::Mixer *mixer, const Common::String &filename, int dataOffset);
+ ASound(Audio::Mixer *mixer, FM_OPL *opl, const Common::String &filename, int dataOffset);
/**
* Destructor
@@ -408,7 +410,7 @@ private:
void command111213();
int command2627293032();
public:
- ASound1(Audio::Mixer *mixer);
+ ASound1(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -460,7 +462,7 @@ private:
void command9Randomize();
void command9Apply(byte *data, int val, int incr);
public:
- ASound2(Audio::Mixer *mixer);
+ ASound2(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -520,7 +522,7 @@ private:
void command9Randomize();
void command9Apply(byte *data, int val, int incr);
public:
- ASound3(Audio::Mixer *mixer);
+ ASound3(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -558,7 +560,7 @@ private:
void method1();
public:
- ASound4(Audio::Mixer *mixer);
+ ASound4(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -604,7 +606,7 @@ private:
int command42();
int command43();
public:
- ASound5(Audio::Mixer *mixer);
+ ASound5(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -633,7 +635,7 @@ private:
int command25();
int command29();
public:
- ASound6(Audio::Mixer *mixer);
+ ASound6(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -665,7 +667,7 @@ private:
int command36();
int command37();
public:
- ASound7(Audio::Mixer *mixer);
+ ASound7(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -708,7 +710,66 @@ private:
void method1(byte *pData);
void adjustRange(byte *pData, byte v, int incr);
public:
- ASound8(Audio::Mixer *mixer);
+ ASound8(Audio::Mixer *mixer, FM_OPL *opl);
+
+ virtual int command(int commandId, int param);
+};
+
+class ASound9 : public ASound {
+private:
+ int _v1, _v2;
+ byte *_soundPtr;
+
+ typedef int (ASound9::*CommandPtr)();
+ static const CommandPtr _commandList[52];
+
+ int command9();
+ int command10();
+ int command11();
+ int command12();
+ int command13();
+ int command14();
+ int command15();
+ int command16();
+ int command17();
+ int command18();
+ int command19();
+ int command20();
+ int command21();
+ int command22();
+ int command23();
+ int command24();
+ int command25();
+ int command26();
+ int command27();
+ int command28();
+ int command29();
+ int command30();
+ int command31();
+ int command32();
+ int command33();
+ int command34();
+ int command35();
+ int command36();
+ int command37();
+ int command38();
+ int command39();
+ int command40();
+ int command41();
+ int command42();
+ int command43();
+ int command44_46();
+ int command45();
+ int command47();
+ int command48();
+ int command49();
+ int command50();
+ int command51();
+ int command57();
+ int command59();
+ int command60();
+public:
+ ASound9(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
diff --git a/engines/mads/palette.h b/engines/mads/palette.h
index 975167a458..9b8b7146db 100644
--- a/engines/mads/palette.h
+++ b/engines/mads/palette.h
@@ -297,7 +297,7 @@ public:
/**
* Resets the game palette
*/
- void resetGamePalette(int v1, int v2);
+ void resetGamePalette(int lowRange, int highRange);
/**
* Initializes the main palette
diff --git a/engines/mads/phantom/game_phantom.cpp b/engines/mads/phantom/game_phantom.cpp
index b0b1bf7836..ba2179fcbf 100644
--- a/engines/mads/phantom/game_phantom.cpp
+++ b/engines/mads/phantom/game_phantom.cpp
@@ -42,6 +42,10 @@ GamePhantom::GamePhantom(MADSEngine *vm)
}
void GamePhantom::startGame() {
+ _scene._priorSceneId = 0;
+ _scene._currentSceneId = -1;
+ _scene._nextSceneId = 101;
+
initializeGlobals();
}
diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index dbce014525..7fd7ce642d 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -169,9 +169,10 @@ Common::String PhantomScene::formAnimName(char sepChar, int suffixNum) {
/*------------------------------------------------------------------------*/
void SceneInfoPhantom::loadCodes(MSurface &depthSurface, int variant) {
- File f(Resources::formatName(RESPREFIX_RM, _sceneId, ".DAT"));
+ Common::String ext = Common::String::format(".WW%d", variant);
+ File f(Resources::formatName(RESPREFIX_RM, _sceneId, ext));
MadsPack codesPack(&f);
- Common::SeekableReadStream *stream = codesPack.getItemStream(variant + 1);
+ Common::SeekableReadStream *stream = codesPack.getItemStream(0);
loadCodes(depthSurface, stream);
@@ -181,22 +182,20 @@ void SceneInfoPhantom::loadCodes(MSurface &depthSurface, int variant) {
void SceneInfoPhantom::loadCodes(MSurface &depthSurface, Common::SeekableReadStream *stream) {
byte *destP = depthSurface.getData();
- byte *endP = depthSurface.getBasePtr(0, depthSurface.h);
-
- byte runLength = stream->readByte();
- while (destP < endP && runLength > 0) {
- byte runValue = stream->readByte();
-
- // Write out the run length
- Common::fill(destP, destP + runLength, runValue);
- destP += runLength;
-
- // Get the next run length
- runLength = stream->readByte();
+ byte *walkMap = new byte[stream->size()];
+ stream->read(walkMap, stream->size());
+
+ for (int y = 0; y < 156; ++y) {
+ for (int x = 0; x < 320; ++x) {
+ int offset = x + (y * 320);
+ if ((walkMap[offset / 8] << (offset % 8)) & 0x80)
+ *destP++ = 1; // walkable
+ else
+ *destP++ = 0;
+ }
}
- if (destP < endP)
- Common::fill(destP, endP, 0);
+ delete[] walkMap;
}
} // End of namespace Phantom
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index ffeed6cda8..ad24dd4f60 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -63,8 +63,7 @@ Scene::Scene(MADSEngine *vm)
_paletteUsageF.push_back(PaletteUsage::UsageEntry(0xF));
// Set up a scene surface that maps to our physical screen drawing surface
- _sceneSurface.init(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT, MADS_SCREEN_WIDTH,
- _vm->_screen.getPixels(), Graphics::PixelFormat::createFormatCLUT8());
+ restrictScene();
// Set up the verb list
_verbList.push_back(VerbInit(VERB_LOOK, VERB_THAT, PREP_NONE));
@@ -82,6 +81,12 @@ Scene::Scene(MADSEngine *vm)
Scene::~Scene() {
delete _sceneLogic;
delete _sceneInfo;
+ delete _animationData;
+}
+
+void Scene::restrictScene() {
+ _sceneSurface.init(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT, MADS_SCREEN_WIDTH,
+ _vm->_screen.getPixels(), Graphics::PixelFormat::createFormatCLUT8());
}
void Scene::clearVocab() {
@@ -196,21 +201,24 @@ void Scene::loadScene(int sceneId, const Common::String &prefix, bool palFlag) {
}
void Scene::loadHotspots() {
- File f(Resources::formatName(RESPREFIX_RM, _currentSceneId, ".HH"));
- MadsPack madsPack(&f);
- bool isV2 = (_vm->getGameID() != GType_RexNebular);
+ _hotspots.clear();
- Common::SeekableReadStream *stream = madsPack.getItemStream(0);
- int count = stream->readUint16LE();
- delete stream;
+ Common::File f;
+ if (f.open(Resources::formatName(RESPREFIX_RM, _currentSceneId, ".HH"))) {
+ MadsPack madsPack(&f);
+ bool isV2 = (_vm->getGameID() != GType_RexNebular);
- stream = madsPack.getItemStream(1);
- _hotspots.clear();
- for (int i = 0; i < count; ++i)
- _hotspots.push_back(Hotspot(*stream, isV2));
+ Common::SeekableReadStream *stream = madsPack.getItemStream(0);
+ int count = stream->readUint16LE();
+ delete stream;
- delete stream;
- f.close();
+ stream = madsPack.getItemStream(1);
+ for (int i = 0; i < count; ++i)
+ _hotspots.push_back(Hotspot(*stream, isV2));
+
+ delete stream;
+ f.close();
+ }
}
void Scene::loadVocab() {
@@ -346,7 +354,7 @@ void Scene::loop() {
// Handle drawing a game frame
doFrame();
- // TODO: Verify correctness of frame wait
+ // Wait for the next frame
_vm->_events->waitForNextFrame();
if (_vm->_dialogs->_pendingDialog != DIALOG_NONE && !_vm->_game->_trigger
@@ -507,7 +515,7 @@ void Scene::drawElements(ScreenTransition transitionType, bool surfaceFlag) {
_vm->_sound->startQueuedCommands();
} else {
// Copy dirty areas to the screen
- _dirtyAreas.copyToScreen(_vm->_screen._offset);
+ _dirtyAreas.copyToScreen();
}
_spriteSlots.cleanUp();
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index 407d70dc85..ee7864cfee 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -142,6 +142,8 @@ public:
*/
~Scene();
+ void restrictScene();
+
/**
* Clear the vocabulary list
*/
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index 1494f62d7a..174579a624 100644
--- a/engines/mads/scene_data.cpp
+++ b/engines/mads/scene_data.cpp
@@ -151,30 +151,34 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName,
_sceneId = sceneId;
}
- // TODO: The following isn't quite right for V2 games (it's all 0)
- _artFileNum = infoStream->readUint16LE();
- _depthStyle = infoStream->readUint16LE();
- _width = infoStream->readUint16LE();
- _height = infoStream->readUint16LE();
-
- // HACK for V2 games (for now)
- if (_vm->getGameID() != GType_RexNebular) {
+ int nodeCount = 20;
+
+ if (_vm->getGameID() == GType_RexNebular) {
+ _artFileNum = infoStream->readUint16LE();
+ _depthStyle = infoStream->readUint16LE();
+ _width = infoStream->readUint16LE();
+ _height = infoStream->readUint16LE();
+
+ infoStream->skip(24);
+
+ nodeCount = infoStream->readUint16LE();
+ _yBandsEnd = infoStream->readUint16LE();
+ _yBandsStart = infoStream->readUint16LE();
+ _maxScale = infoStream->readUint16LE();
+ _minScale = infoStream->readUint16LE();
+ for (int i = 0; i < DEPTH_BANDS_SIZE; ++i)
+ _depthList[i] = infoStream->readUint16LE();
+ _field4A = infoStream->readUint16LE();
+ } else {
+ _artFileNum = sceneId;
+ _depthStyle = 0;
_width = 320;
_height = 156;
- }
- infoStream->skip(24);
-
- int nodeCount = infoStream->readUint16LE();
- _yBandsEnd = infoStream->readUint16LE();
- _yBandsStart = infoStream->readUint16LE();
- _maxScale = infoStream->readUint16LE();
- _minScale = infoStream->readUint16LE();
- for (int i = 0; i < DEPTH_BANDS_SIZE; ++i)
- _depthList[i] = infoStream->readUint16LE();
- _field4A = infoStream->readUint16LE();
+ infoStream->skip(140);
+ }
- // Load the set of objects that are associated with the scene
+ // Load the scene's walk nodes
for (int i = 0; i < 20; ++i) {
WalkNode node;
node.load(infoStream);
@@ -223,21 +227,16 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName,
depthSurface.setSize(width, height);
}
- if (_vm->getGameID() == GType_RexNebular) {
- // Load the depth surface with the scene codes
- Common::SeekableReadStream *depthStream = infoPack.getItemStream(variant + 1);
- loadCodes(depthSurface, depthStream);
- delete depthStream;
- }
-
+ loadCodes(depthSurface, variant);
+ depthSurface._depthStyle = _depthStyle;
infoFile.close();
if (_vm->getGameID() == GType_RexNebular) {
- loadMadsV1Background(sceneId, resName, flags, bgSurface);
- loadPalette(sceneId, _artFileNum, resName, flags, bgSurface);
+ loadMadsV1Background(_sceneId, resName, flags, bgSurface);
+ loadPalette(_sceneId, _artFileNum, resName, flags, bgSurface);
} else {
- loadMadsV2Background(sceneId, resName, flags, bgSurface);
- loadPalette(sceneId, sceneId, resName, flags, bgSurface);
+ loadMadsV2Background(_sceneId, resName, flags, bgSurface);
+ loadPalette(_sceneId, _sceneId, resName, flags, bgSurface);
}
Common::Array<SpriteAsset *> spriteSets;
@@ -334,7 +333,7 @@ void SceneInfo::loadMadsV1Background(int sceneId, const Common::String &resName,
// Get the ART resource
if (sceneFlag) {
- resourceName = Resources::formatName(RESPREFIX_RM, _artFileNum, ".ART");
+ resourceName = Resources::formatName(RESPREFIX_RM, sceneId, ".ART");
} else {
resourceName = "*" + Resources::formatResource(resName, resName);
}
@@ -347,9 +346,27 @@ void SceneInfo::loadMadsV1Background(int sceneId, const Common::String &resName,
assert(_width == bgSurface.w && _height == bgSurface.h);
stream = artResource.getItemStream(1);
stream->read(bgSurface.getPixels(), bgSurface.w * bgSurface.h);
+ delete stream;
+
+ if (flags & SCENEFLAG_TRANSLATE) {
+ // Load in the palette and translate it
+ Common::SeekableReadStream *palStream = artResource.getItemStream(0);
+ Common::Array<RGB6> palette;
+
+ palStream->skip(4); // Skip width and height
+ int numColors = palStream->readUint16LE();
+ assert(numColors <= 252);
+ palette.resize(numColors);
+ for (int i = 0; i < numColors; ++i)
+ palette[i].load(palStream);
+ delete palStream;
+
+ // Translate the surface
+ _vm->_palette->_paletteUsage.process(palette, 0);
+ bgSurface.translate(palette);
+ }
// Close the ART file
- delete stream;
artFile.close();
}
diff --git a/engines/mads/scene_data.h b/engines/mads/scene_data.h
index 783a9ab8a9..41e094b8f5 100644
--- a/engines/mads/scene_data.h
+++ b/engines/mads/scene_data.h
@@ -55,7 +55,8 @@ class SpriteSlot;
enum {
SCENEFLAG_DITHER = 0x01, // Dither to 16 colors
- SCENEFLAG_LOAD_SHADOW = 0x10 // Load hard shadows
+ SCENEFLAG_LOAD_SHADOW = 0x10, // Load hard shadows
+ SCENEFLAG_TRANSLATE = 0x10000 // Translate palette of loaded background
};
class VerbInit {
diff --git a/engines/mads/screen.cpp b/engines/mads/screen.cpp
index 7e8710db56..590e63ac9e 100644
--- a/engines/mads/screen.cpp
+++ b/engines/mads/screen.cpp
@@ -212,24 +212,22 @@ void DirtyAreas::copy(MSurface *srcSurface, MSurface *destSurface, const Common:
Common::Rect bounds(srcBounds.left + posAdjust.x, srcBounds.top + posAdjust.y,
srcBounds.right + posAdjust.x, srcBounds.bottom + posAdjust.y);
+ Common::Point destPos(bounds.left, bounds.top);
if ((*this)[i]._active && bounds.isValidRect()) {
- srcSurface->copyTo(destSurface, bounds, Common::Point(bounds.left, bounds.top));
+ srcSurface->copyTo(destSurface, bounds, destPos);
}
}
}
-void DirtyAreas::copyToScreen(const Common::Point &posAdjust) {
+void DirtyAreas::copyToScreen() {
for (uint i = 0; i < size(); ++i) {
- const Common::Rect &srcBounds = (*this)[i]._bounds;
+ const Common::Rect &bounds = (*this)[i]._bounds;
// Check if this is a sane rectangle before attempting to create it
- if (srcBounds.left >= srcBounds.right || srcBounds.top >= srcBounds.bottom)
+ if (bounds.left >= bounds.right || bounds.top >= bounds.bottom)
continue;
- Common::Rect bounds(srcBounds.left + posAdjust.x, srcBounds.top + posAdjust.y,
- srcBounds.right + posAdjust.x, srcBounds.bottom + posAdjust.y);
-
if ((*this)[i]._active && (*this)[i]._bounds.isValidRect()) {
_vm->_screen.copyRectToScreen(bounds);
}
@@ -559,23 +557,32 @@ void ScreenObjects::synchronize(Common::Serializer &s) {
ScreenSurface::ScreenSurface() {
_shakeCountdown = -1;
_random = 0x4D2;
+ _surfacePixels = nullptr;
}
void ScreenSurface::init() {
- setSize(g_system->getWidth(), g_system->getHeight());
-}
+ // Set the size for the screen
+ setSize(MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT);
-void ScreenSurface::copyRectToScreen(const Common::Point &destPos,
- const Common::Rect &bounds) {
- const byte *buf = getBasePtr(destPos.x, destPos.y);
+ // Store a copy of the raw pixels pointer for the screen, since the surface
+ // itself may be later changed to only a subset of the screen
+ _surfacePixels = (byte *)getPixels();
+ _freeFlag = false;
+}
- if (bounds.width() != 0 && bounds.height() != 0)
- g_system->copyRectToScreen(buf, this->pitch, bounds.left, bounds.top,
- bounds.width(), bounds.height());
+ScreenSurface::~ScreenSurface() {
+ delete[] _surfacePixels;
}
void ScreenSurface::copyRectToScreen(const Common::Rect &bounds) {
- copyRectToScreen(Common::Point(bounds.left, bounds.top), bounds);
+ const byte *buf = getBasePtr(bounds.left, bounds.top);
+
+ Common::Rect destBounds = bounds;
+ destBounds.translate(_clipBounds.left, _clipBounds.top);
+
+ if (bounds.width() != 0 && bounds.height() != 0)
+ g_system->copyRectToScreen(buf, this->pitch, destBounds.left, destBounds.top,
+ destBounds.width(), destBounds.height());
}
void ScreenSurface::updateScreen() {
@@ -628,21 +635,28 @@ void ScreenSurface::transition(ScreenTransition transitionType, bool surfaceFlag
case kTransitionBoxInBottomRight:
case kTransitionBoxInTopLeft:
case kTransitionBoxInTopRight:
- error("TODO: transition");
+ warning("TODO: box transition");
+ transition(kTransitionFadeIn, surfaceFlag);
break;
case kTransitionPanLeftToRight:
case kTransitionPanRightToLeft:
- error("TODO: transition");
+ warning("TODO: pan transition");
+ transition(kTransitionFadeIn, surfaceFlag);
+ break;
case kTransitionCircleIn1:
case kTransitionCircleIn2:
case kTransitionCircleIn3:
case kTransitionCircleIn4:
- error("TODO circle transition");
+ warning("TODO circle transition");
+ transition(kTransitionFadeIn, surfaceFlag);
+ break;
case kCenterVertTransition:
- error("TODO: center vert transition");
+ warning("TODO: center vert transition");
+ transition(kTransitionFadeIn, surfaceFlag);
+ break;
default:
// Quick transitions
@@ -650,4 +664,15 @@ void ScreenSurface::transition(ScreenTransition transitionType, bool surfaceFlag
}
}
+void ScreenSurface::setClipBounds(const Common::Rect &r) {
+ _clipBounds = r;
+ setPixels(_surfacePixels + pitch * r.top + r.left, r.width(), r.height());
+ this->pitch = MADS_SCREEN_WIDTH;
+}
+
+void ScreenSurface::resetClipBounds() {
+ setClipBounds(Common::Rect(0, 0, MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT));
+}
+
+
} // End of namespace MADS
diff --git a/engines/mads/screen.h b/engines/mads/screen.h
index 7937e15456..9d01ca82e3 100644
--- a/engines/mads/screen.h
+++ b/engines/mads/screen.h
@@ -117,8 +117,8 @@ public:
/**
* Use the lsit of dirty areas to copy areas of the screen surface to
* the physical screen
- * @param posAdjust Position adjustment */
- void copyToScreen(const Common::Point &posAdjust);
+ */
+ void copyToScreen();
void reset();
};
@@ -205,8 +205,9 @@ public:
class ScreenSurface : public MSurface {
private:
uint16 _random;
+ byte *_surfacePixels;
+ Common::Rect _clipBounds;
public:
- Common::Point _offset;
int _shakeCountdown;
public:
/**
@@ -215,17 +216,14 @@ public:
ScreenSurface();
/**
- * Initialize the surface
+ * Destructor
*/
- void init();
+ ~ScreenSurface();
/**
- * Copys an area of the screen surface to a given destination position on
- * the ScummVM physical screen buffer
- * @param destPos Destination position
- * @param bounds Area of screen surface to copy
+ * Initialize the surface
*/
- void copyRectToScreen(const Common::Point &destPos, const Common::Rect &bounds);
+ void init();
/**
* Copys an area of the screen surface to the ScmmVM physical screen buffer
@@ -239,6 +237,12 @@ public:
void updateScreen();
void transition(ScreenTransition transitionType, bool surfaceFlag);
+
+ void setClipBounds(const Common::Rect &r);
+
+ void resetClipBounds();
+
+ const Common::Rect &getClipBounds() { return _clipBounds; }
};
} // End of namespace MADS
diff --git a/engines/mads/sound.cpp b/engines/mads/sound.cpp
index bd99aed2f4..12109895b5 100644
--- a/engines/mads/sound.cpp
+++ b/engines/mads/sound.cpp
@@ -29,9 +29,10 @@
namespace MADS {
-SoundManager::SoundManager(MADSEngine *vm, Audio::Mixer *mixer) {
+SoundManager::SoundManager(MADSEngine *vm, Audio::Mixer *mixer, FM_OPL *opl) {
_vm = vm;
_mixer = mixer;
+ _opl = opl;
_driver = nullptr;
_pollSoundEnabled = false;
_soundPollFlag = false;
@@ -49,31 +50,32 @@ void SoundManager::init(int sectionNumber) {
case GType_RexNebular:
switch (sectionNumber) {
case 1:
- _driver = new Nebular::ASound1(_mixer);
+ _driver = new Nebular::ASound1(_mixer, _opl);
break;
case 2:
- _driver = new Nebular::ASound2(_mixer);
+ _driver = new Nebular::ASound2(_mixer, _opl);
break;
case 3:
- _driver = new Nebular::ASound3(_mixer);
+ _driver = new Nebular::ASound3(_mixer, _opl);
break;
case 4:
- _driver = new Nebular::ASound4(_mixer);
+ _driver = new Nebular::ASound4(_mixer, _opl);
break;
case 5:
- _driver = new Nebular::ASound5(_mixer);
+ _driver = new Nebular::ASound5(_mixer, _opl);
break;
case 6:
- _driver = new Nebular::ASound6(_mixer);
+ _driver = new Nebular::ASound6(_mixer, _opl);
break;
case 7:
- _driver = new Nebular::ASound7(_mixer);
+ _driver = new Nebular::ASound7(_mixer, _opl);
break;
case 8:
- _driver = new Nebular::ASound8(_mixer);
+ _driver = new Nebular::ASound8(_mixer, _opl);
break;
case 9:
- error("Sound driver 9 not implemented");
+ _driver = new Nebular::ASound9(_mixer, _opl);
+ break;
default:
_driver = nullptr;
break;
diff --git a/engines/mads/sound.h b/engines/mads/sound.h
index 9a251f9dd0..b2af7e2346 100644
--- a/engines/mads/sound.h
+++ b/engines/mads/sound.h
@@ -37,13 +37,14 @@ class SoundManager {
private:
MADSEngine *_vm;
Audio::Mixer *_mixer;
+ FM_OPL *_opl;
Nebular::ASound *_driver;
bool _pollSoundEnabled;
bool _soundPollFlag;
bool _newSoundsPaused;
Common::Queue<int> _queuedCommands;
public:
- SoundManager(MADSEngine *vm, Audio::Mixer *mixer);
+ SoundManager(MADSEngine *vm, Audio::Mixer *mixer, FM_OPL *opl);
~SoundManager();
/**
diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h
index 8a9c0f70fa..7632cde294 100644
--- a/engines/mohawk/detection_tables.h
+++ b/engines/mohawk/detection_tables.h
@@ -294,7 +294,7 @@ static const MohawkGameDescription gameDescriptions[] = {
},
// Riven: The Sequel to Myst
- // Version 1.? (5CD)
+ // Version 1.? (5CD) - Spanish
// From jvprat
{
{
@@ -312,6 +312,24 @@ static const MohawkGameDescription gameDescriptions[] = {
},
// Riven: The Sequel to Myst
+ // Version 1.0 (5CD) - Italian
+ // From dodomorandi on bug #6629
+ {
+ {
+ "riven",
+ "",
+ AD_ENTRY1("a_Data.MHK", "0e21e89df7788f32056b6521abf2e81a"),
+ Common::IT_ITA,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO1(GUIO_NOASPECT)
+ },
+ GType_RIVEN,
+ 0,
+ 0,
+ },
+
+ // Riven: The Sequel to Myst
// Version 1.? (DVD, From "Myst 10th Anniversary Edition")
// From Clone2727
{
diff --git a/engines/mohawk/myst_stacks/stoneship.cpp b/engines/mohawk/myst_stacks/stoneship.cpp
index 710c36ac8d..d8dbeef641 100644
--- a/engines/mohawk/myst_stacks/stoneship.cpp
+++ b/engines/mohawk/myst_stacks/stoneship.cpp
@@ -42,6 +42,7 @@ Stoneship::Stoneship(MohawkEngine_Myst *vm) :
_tunnelRunning = false;
+ _state.lightState = 0;
_state.generatorDepletionTime = 0;
_state.generatorDuration = 0;
_cabinMystBookPresent = 0;
diff --git a/engines/mohawk/myst_state.cpp b/engines/mohawk/myst_state.cpp
index d07aa9d5ec..3e54017df8 100644
--- a/engines/mohawk/myst_state.cpp
+++ b/engines/mohawk/myst_state.cpp
@@ -100,6 +100,9 @@ bool MystGameState::load(const Common::String &filename) {
syncGameState(s, size == 664);
delete loadFile;
+ // Set Channelwood elevator state to down, because we start on the lower level
+ _channelwood.elevatorState = 0;
+
// Switch us back to the intro stack, to the linking book
_vm->changeToStack(kIntroStack, 5, 0, 0);
diff --git a/engines/mortevielle/detection_tables.h b/engines/mortevielle/detection_tables.h
index 3e1e5aaefe..0aa27b89eb 100644
--- a/engines/mortevielle/detection_tables.h
+++ b/engines/mortevielle/detection_tables.h
@@ -57,21 +57,21 @@ static const MortevielleGameDescription MortevielleGameDescriptions[] = {
},
// German, improved translation
- {
- {
- "mortevielle",
- "Improved Translation",
- {
- {"menual.mor", 0, "792aea282b07a1d74c4a4abeabc90c19", 144},
- {"dxx.mor", 0, "949e68e829ecd5ad29e36a00347a9e7e", 207744},
- AD_LISTEND
- },
- Common::DE_DEU,
- Common::kPlatformDOS,
- ADGF_NO_FLAGS,
- GUIO0()
- }, Common::DE_DEU, kUseEngineDataFile
- },
+// {
+// {
+// "mortevielle",
+// "Improved Translation",
+// {
+// {"menual.mor", 0, "792aea282b07a1d74c4a4abeabc90c19", 144},
+// {"dxx.mor", 0, "949e68e829ecd5ad29e36a00347a9e7e", 207744},
+// AD_LISTEND
+// },
+// Common::DE_DEU,
+// Common::kPlatformDOS,
+// ADGF_NO_FLAGS,
+// GUIO0()
+// }, Common::DE_DEU, kUseEngineDataFile
+// },
// DOS English version doesn't exist. Technically, they are French or German versions,
// using English strings stored mort.dat
diff --git a/engines/neverhood/graphics.cpp b/engines/neverhood/graphics.cpp
index 939428ed19..89792d2659 100644
--- a/engines/neverhood/graphics.cpp
+++ b/engines/neverhood/graphics.cpp
@@ -114,7 +114,15 @@ void BaseSurface::drawMouseCursorResource(MouseCursorResource &mouseCursorResour
}
void BaseSurface::copyFrom(Graphics::Surface *sourceSurface, int16 x, int16 y, NDrawRect &sourceRect) {
- // Copy a rectangle from sourceSurface, no clipping is performed, 0 is the transparent color
+ // Copy a rectangle from sourceSurface, 0 is the transparent color
+ // Clipping is performed against the right/bottom border since x, y will always be >= 0
+
+ if (x + sourceRect.width > _surface->w)
+ sourceRect.width = _surface->w - x - 1;
+
+ if (y + sourceRect.height > _surface->h)
+ sourceRect.height = _surface->h - y - 1;
+
byte *source = (byte*)sourceSurface->getBasePtr(sourceRect.x, sourceRect.y);
byte *dest = (byte*)_surface->getBasePtr(x, y);
int height = sourceRect.height;
diff --git a/engines/neverhood/modules/module1400.cpp b/engines/neverhood/modules/module1400.cpp
index 551b6874ff..465ad5909a 100644
--- a/engines/neverhood/modules/module1400.cpp
+++ b/engines/neverhood/modules/module1400.cpp
@@ -709,13 +709,14 @@ Scene1405::Scene1405(NeverhoodEngine *vm, Module *parentModule)
void Scene1405::update() {
Scene::update();
+ // Check if the player chose a wrong tile, in which case the whole grid gets reset
if (_countdown != 0 && (--_countdown == 0)) {
_tilesLeft = 48;
- _tiles[_firstTileIndex]->hide();
- _tiles[_secondTileIndex]->hide();
+ _tiles[_firstTileIndex]->hide(true);
+ _tiles[_secondTileIndex]->hide(false);
for (uint32 i = 0; i < 48; i++) {
if (getSubVar(VA_IS_TILE_MATCH, i)) {
- _tiles[i]->hide();
+ _tiles[i]->hide(false);
setSubVar(VA_IS_TILE_MATCH, i, 0);
}
}
diff --git a/engines/neverhood/modules/module1400_sprites.cpp b/engines/neverhood/modules/module1400_sprites.cpp
index 30a5c340c9..99a2a314a7 100644
--- a/engines/neverhood/modules/module1400_sprites.cpp
+++ b/engines/neverhood/modules/module1400_sprites.cpp
@@ -873,10 +873,11 @@ void AsScene1405Tile::show() {
}
}
-void AsScene1405Tile::hide() {
+void AsScene1405Tile::hide(bool playClickSound) {
if (_isShowing) {
_isShowing = false;
- playSound(0);
+ if (playClickSound)
+ playSound(0);
setVisible(false);
}
}
diff --git a/engines/neverhood/modules/module1400_sprites.h b/engines/neverhood/modules/module1400_sprites.h
index fe0db66d27..e709193aab 100644
--- a/engines/neverhood/modules/module1400_sprites.h
+++ b/engines/neverhood/modules/module1400_sprites.h
@@ -155,7 +155,7 @@ class AsScene1405Tile : public AnimatedSprite {
public:
AsScene1405Tile(NeverhoodEngine *vm, Scene1405 *parentScene, uint32 tileIndex);
void show();
- void hide();
+ void hide(bool playClickSound);
protected:
Scene1405 *_parentScene;
bool _isShowing;
diff --git a/engines/neverhood/modules/module1600_sprites.cpp b/engines/neverhood/modules/module1600_sprites.cpp
index 09e3d0afe1..6a4de86517 100644
--- a/engines/neverhood/modules/module1600_sprites.cpp
+++ b/engines/neverhood/modules/module1600_sprites.cpp
@@ -30,6 +30,8 @@ AsCommonCar::AsCommonCar(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16
createSurface(200, 556, 328);
_x = x;
_y = y;
+ _destX = x;
+ _destY = y;
_inMainArea = false;
_exitDirection = 0;
@@ -48,6 +50,7 @@ AsCommonCar::AsCommonCar(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16
_soundCounter = 0;
_pathPoints = NULL;
_currMoveDirection = 0;
+ _newMoveDirection = 0;
startAnimation(0xD4220027, 0, -1);
setDoDeltaX(getGlobalVar(V_CAR_DELTA_X));
diff --git a/engines/neverhood/sprite.cpp b/engines/neverhood/sprite.cpp
index a566b8ee3b..3611ce1ba2 100644
--- a/engines/neverhood/sprite.cpp
+++ b/engines/neverhood/sprite.cpp
@@ -31,8 +31,20 @@ Sprite::Sprite(NeverhoodEngine *vm, int objectPriority)
: Entity(vm, objectPriority), _x(0), _y(0), _spriteUpdateCb(NULL), _filterXCb(NULL), _filterYCb(NULL),
_dataResource(vm), _doDeltaX(false), _doDeltaY(false), _needRefresh(false), _flags(0), _surface(NULL) {
- SetMessageHandler(&Sprite::handleMessage);
+ _drawOffset.x = 0;
+ _drawOffset.y = 0;
+ _drawOffset.width = 0;
+ _drawOffset.height = 0;
+ _collisionBounds.x1 = 0;
+ _collisionBounds.y1 = 0;
+ _collisionBounds.x2 = 0;
+ _collisionBounds.y2 = 0;
+ _collisionBoundsOffset.x = 0;
+ _collisionBoundsOffset.y = 0;
+ _collisionBoundsOffset.width = 0;
+ _collisionBoundsOffset.height = 0;
+ SetMessageHandler(&Sprite::handleMessage);
}
Sprite::~Sprite() {
diff --git a/engines/pegasus/energymonitor.cpp b/engines/pegasus/energymonitor.cpp
index 40e54afb89..d3cc208e41 100644
--- a/engines/pegasus/energymonitor.cpp
+++ b/engines/pegasus/energymonitor.cpp
@@ -68,7 +68,9 @@ void Blinker::timeChanged(const TimeValue time) {
}
}
-static const NotificationFlags kEnergyExpiredFlag = 1;
+enum {
+ kEnergyExpiredFlag = 1
+};
EnergyMonitor *g_energyMonitor = 0;
diff --git a/engines/pegasus/interaction.cpp b/engines/pegasus/interaction.cpp
new file mode 100644
index 0000000000..143bdebaba
--- /dev/null
+++ b/engines/pegasus/interaction.cpp
@@ -0,0 +1,38 @@
+/* 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.
+ *
+ * Additional copyright for this file:
+ * Copyright (C) 1995-1997 Presto Studios, Inc.
+ *
+ * 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 "pegasus/interaction.h"
+#include "pegasus/neighborhood/neighborhood.h"
+
+namespace Pegasus {
+
+GameInteraction::GameInteraction(const InteractionID id, Neighborhood *nextHandler) : IDObject(id), InputHandler(nextHandler) {
+ _isInteracting = false;
+ _savedHandler = 0;
+ _owner = nextHandler;
+}
+
+} // End of namespace Pegasus
+
diff --git a/engines/pegasus/interaction.h b/engines/pegasus/interaction.h
index 293ee6be83..ca168b4cb7 100644
--- a/engines/pegasus/interaction.h
+++ b/engines/pegasus/interaction.h
@@ -37,11 +37,7 @@ class Neighborhood;
class GameInteraction : public IDObject, public InputHandler {
public:
- GameInteraction(const InteractionID id, Neighborhood *nextHandler) : IDObject(id), InputHandler((InputHandler *)nextHandler) {
- _isInteracting = false;
- _savedHandler = 0;
- _owner = nextHandler;
- }
+ GameInteraction(const InteractionID id, Neighborhood *nextHandler);
// If the interaction is open (_isInteracting == true), it's too late to do anything
// about it here.
diff --git a/engines/pegasus/module.mk b/engines/pegasus/module.mk
index cb44a04171..6d69d6ea58 100644
--- a/engines/pegasus/module.mk
+++ b/engines/pegasus/module.mk
@@ -12,6 +12,7 @@ MODULE_OBJS = \
graphics.o \
hotspot.o \
input.o \
+ interaction.o \
interface.o \
menu.o \
movie.o \
diff --git a/engines/pegasus/neighborhood/caldoria/caldoria.cpp b/engines/pegasus/neighborhood/caldoria/caldoria.cpp
index 9d2d6723a9..ed52851338 100644
--- a/engines/pegasus/neighborhood/caldoria/caldoria.cpp
+++ b/engines/pegasus/neighborhood/caldoria/caldoria.cpp
@@ -42,109 +42,119 @@
namespace Pegasus {
-static const int16 kVidPhoneAngle = 30;
-static const int16 kReplicatorAngle = 50;
-static const int16 kDrawersAngle = -30;
-static const int16 kCaldoria53Angle = 45;
-static const int16 kCaldoria55Angle = -45;
+enum {
+ kVidPhoneAngle = 30,
+ kReplicatorAngle = 50,
+ kDrawersAngle = -30,
+ kCaldoria53Angle = 45,
+ kCaldoria55Angle = -45
+};
-static const TimeValue kSinclairInterruptionTime1 = 2955;
-static const TimeValue kSinclairInterruptionTime2 = 6835;
-static const TimeValue kSinclairInterruptionTime3 = 9835;
-static const TimeValue kSinclairInterruptionTime4 = 12555;
+enum {
+ kSinclairInterruptionTime1 = 2955,
+ kSinclairInterruptionTime2 = 6835,
+ kSinclairInterruptionTime3 = 9835,
+ kSinclairInterruptionTime4 = 12555
+};
-static const InputBits kPullbackInterruptFilter = kFilterAllInput;
-static const InputBits kRecalibrationInterruptFilter = kFilterAllInput;
+enum {
+ kPullbackInterruptFilter = kFilterAllInput,
+ kRecalibrationInterruptFilter = kFilterAllInput
+};
-static const TimeValue kCaldoriaReplicatorIntroIn = 4933;
-static const TimeValue kCaldoriaReplicatorIntroOut = 6557;
+enum {
+ kCaldoriaReplicatorIntroIn = 4933,
+ kCaldoriaReplicatorIntroOut = 6557,
-static const TimeValue kCaldoriaReplicatorWrongChoiceIn = 6557;
-static const TimeValue kCaldoriaReplicatorWrongChoiceOut = 8586;
+ kCaldoriaReplicatorWrongChoiceIn = 6557,
+ kCaldoriaReplicatorWrongChoiceOut = 8586,
-static const TimeValue kCaldoriaReplicatorOJChoiceIn = 8586;
-static const TimeValue kCaldoriaReplicatorOJChoiceOut = 11687;
+ kCaldoriaReplicatorOJChoiceIn = 8586,
+ kCaldoriaReplicatorOJChoiceOut = 11687,
-static const TimeValue kCaldoriaMessagesIntroIn = 11687;
-static const TimeValue kCaldoriaMessagesIntroOut = 13641;
+ kCaldoriaMessagesIntroIn = 11687,
+ kCaldoriaMessagesIntroOut = 13641,
-static const TimeValue kCaldoriaFirstMessageIn = 13641;
-static const TimeValue kCaldoriaFirstMessageOut = 14203;
+ kCaldoriaFirstMessageIn = 13641,
+ kCaldoriaFirstMessageOut = 14203,
-static const TimeValue kCaldoriaSecondMessageIn = 14203;
-static const TimeValue kCaldoriaSecondMessageOut = 14750;
+ kCaldoriaSecondMessageIn = 14203,
+ kCaldoriaSecondMessageOut = 14750,
-static const TimeValue kCaldoriaDoorCloseIn = 14750;
-static const TimeValue kCaldoriaDoorCloseOut = 15472;
+ kCaldoriaDoorCloseIn = 14750,
+ kCaldoriaDoorCloseOut = 15472,
-static const TimeValue kCaldoriaElevatorCloseIn = 15472;
-static const TimeValue kCaldoriaElevatorCloseOut = 16336;
+ kCaldoriaElevatorCloseIn = 15472,
+ kCaldoriaElevatorCloseOut = 16336,
-static const TimeValue kCaldoriaShowerCloseIn = 16336;
-static const TimeValue kCaldoriaShowerCloseOut = 17101;
+ kCaldoriaShowerCloseIn = 16336,
+ kCaldoriaShowerCloseOut = 17101,
-static const TimeValue kCaldoriaGTDoorCloseIn = 17101;
-static const TimeValue kCaldoriaGTDoorCloseOut = 18523;
+ kCaldoriaGTDoorCloseIn = 17101,
+ kCaldoriaGTDoorCloseOut = 18523,
-static const TimeValue kCaldoriaNobodyHomeIn = 18523;
-static const TimeValue kCaldoriaNobodyHomeOut = 21469;
+ kCaldoriaNobodyHomeIn = 18523,
+ kCaldoriaNobodyHomeOut = 21469,
-static const TimeValue kCaldoriaNoOtherFloorIn = 21469;
-static const TimeValue kCaldoriaNoOtherFloorOut = 28013;
+ kCaldoriaNoOtherFloorIn = 21469,
+ kCaldoriaNoOtherFloorOut = 28013,
-static const TimeValue kCaldoria4DInstructionsIn = 28013;
-static const TimeValue kCaldoria4DInstructionsOut = 29730;
+ kCaldoria4DInstructionsIn = 28013,
+ kCaldoria4DInstructionsOut = 29730,
-static const TimeValue kCaldoriaDrinkOJIn = 33910;
-static const TimeValue kCaldoriaDrinkOJOut = 35846;
+ kCaldoriaDrinkOJIn = 33910,
+ kCaldoriaDrinkOJOut = 35846,
-static const TimeValue kCaldoriaNoOtherDestinationIn = 35846;
-static const TimeValue kCaldoriaNoOtherDestinationOut = 37877;
+ kCaldoriaNoOtherDestinationIn = 35846,
+ kCaldoriaNoOtherDestinationOut = 37877,
-static const TimeValue kCaldoriaUhghIn = 37877;
-static const TimeValue kCaldoriaUhghOut = 38025;
+ kCaldoriaUhghIn = 37877,
+ kCaldoriaUhghOut = 38025,
-static const TimeValue kCaldoriaSinclairShootsOSIn = 38025;
-static const TimeValue kCaldoriaSinclairShootsOSOut = 40649;
+ kCaldoriaSinclairShootsOSIn = 38025,
+ kCaldoriaSinclairShootsOSOut = 40649,
-static const TimeValue kCaldoriaScreamingAfterIn = 40649;
-static const TimeValue kCaldoriaScreamingAfterOut = 47661;
+ kCaldoriaScreamingAfterIn = 40649,
+ kCaldoriaScreamingAfterOut = 47661
+};
-static const TimeValue k4FloorTime = 0;
+enum {
+ k4FloorTime = 0,
-static const TimeValue k4To1Start = 40;
-static const TimeValue k4To1Stop = 7720;
+ k4To1Start = 40,
+ k4To1Stop = 7720,
-static const TimeValue k4To5Start = 7720;
-static const TimeValue k4To5Stop = 10280;
+ k4To5Start = 7720,
+ k4To5Stop = 10280,
-static const TimeValue k4To2Time = 10280;
+ k4To2Time = 10280,
-static const TimeValue k4To3Time = 10320;
+ k4To3Time = 10320,
-static const TimeValue k1FloorTime = 10360;
+ k1FloorTime = 10360,
-static const TimeValue k1To4Start = 10400;
-static const TimeValue k1To4Stop = 18080;
+ k1To4Start = 10400,
+ k1To4Stop = 18080,
-static const TimeValue k1To5Start = 18080;
-static const TimeValue k1To5Stop = 28320;
+ k1To5Start = 18080,
+ k1To5Stop = 28320,
-static const TimeValue k1To2Time = 28320;
+ k1To2Time = 28320,
-static const TimeValue k1To3Time = 28360;
+ k1To3Time = 28360,
-static const TimeValue k5FloorTime = 28400;
+ k5FloorTime = 28400,
-static const TimeValue k5To1Start = 28440;
-static const TimeValue k5To1Stop = 38680;
+ k5To1Start = 28440,
+ k5To1Stop = 38680,
-static const TimeValue k5To4Start = 38680;
-static const TimeValue k5To4Stop = 41240;
+ k5To4Start = 38680,
+ k5To4Stop = 41240,
-static const TimeValue k5To2Time = 41240;
+ k5To2Time = 41240,
-static const TimeValue k5To3Time = 41280;
+ k5To3Time = 41280
+};
// FuseFunction functions...
diff --git a/engines/pegasus/neighborhood/caldoria/caldoria4dsystem.cpp b/engines/pegasus/neighborhood/caldoria/caldoria4dsystem.cpp
index 0494753661..688fb7860d 100644
--- a/engines/pegasus/neighborhood/caldoria/caldoria4dsystem.cpp
+++ b/engines/pegasus/neighborhood/caldoria/caldoria4dsystem.cpp
@@ -30,34 +30,36 @@
namespace Pegasus {
-static const TimeValue kSwitchableSlop = 3 * kCaldoriaFrameDuration;
-// Two seconds - some slop
-static const TimeValue kSwitchableDuration = kCaldoriaMovieScale * 2 - kSwitchableSlop;
-// Twelve frames + some slop
-static const TimeValue kNonswitchableDuration = kCaldoriaFrameDuration * 12 + kSwitchableSlop;
+enum {
+ kSwitchableSlop = 3 * kCaldoriaFrameDuration,
+ // Two seconds - some slop
+ kSwitchableDuration = kCaldoriaMovieScale * 2 - kSwitchableSlop,
+ // Twelve frames + some slop
+ kNonswitchableDuration = kCaldoriaFrameDuration * 12 + kSwitchableSlop,
-static const TimeValue kSwitchable1Start = 0;
-static const TimeValue kSwitchable1Stop = kSwitchable1Start + kSwitchableDuration;
+ kSwitchable1Start = 0,
+ kSwitchable1Stop = kSwitchable1Start + kSwitchableDuration,
-static const TimeValue kSwitchable2Start = kSwitchable1Stop + kNonswitchableDuration;
-static const TimeValue kSwitchable2Stop = kSwitchable2Start + kSwitchableDuration;
+ kSwitchable2Start = kSwitchable1Stop + kNonswitchableDuration,
+ kSwitchable2Stop = kSwitchable2Start + kSwitchableDuration,
-static const TimeValue kSwitchable3Start = kSwitchable2Stop + kNonswitchableDuration;
-static const TimeValue kSwitchable3Stop = kSwitchable3Start + kSwitchableDuration;
+ kSwitchable3Start = kSwitchable2Stop + kNonswitchableDuration,
+ kSwitchable3Stop = kSwitchable3Start + kSwitchableDuration,
-static const NotificationFlags kVidPhoneDoneFlag = 1;
+ kVidPhoneDoneFlag = 1,
-static const TimeValue kRockMusicLoopIn = 0;
-static const TimeValue kRockMusicLoopOut = 2088;
+ kRockMusicLoopIn = 0,
+ kRockMusicLoopOut = 2088,
-static const TimeValue kOrchestralMusicLoopIn = 2088;
-static const TimeValue kOrchestralMusicLoopOut = 4985;
+ kOrchestralMusicLoopIn = 2088,
+ kOrchestralMusicLoopOut = 4985,
-static const TimeValue kRhythmsMusicLoopIn = 4985;
-static const TimeValue kRhythmsMusicLoopOut = 6824;
+ kRhythmsMusicLoopIn = 4985,
+ kRhythmsMusicLoopOut = 6824,
-static const TimeValue kAcousticMusicLoopIn = 6824;
-static const TimeValue kAcousticMusicLoopOut = 9387;
+ kAcousticMusicLoopIn = 6824,
+ kAcousticMusicLoopOut = 9387
+};
enum {
k4DVideoMenu,
diff --git a/engines/pegasus/neighborhood/mars/shuttlehud.cpp b/engines/pegasus/neighborhood/mars/shuttlehud.cpp
index 11e826278b..2d894f7b95 100644
--- a/engines/pegasus/neighborhood/mars/shuttlehud.cpp
+++ b/engines/pegasus/neighborhood/mars/shuttlehud.cpp
@@ -30,26 +30,28 @@
namespace Pegasus {
-static const CoordType kHUDTargetGridLeft = kShuttleWindowLeft + 16;
-static const CoordType kHUDTargetGridTop = kShuttleWindowTop + 8;
-static const CoordType kHUDTargetGridWidth = 328;
-static const CoordType kHUDTargetGridHeight = 206;
-
-static const CoordType kHUDRS232Left = kHUDTargetGridLeft + 264;
-static const CoordType kHUDRS232Top = kHUDTargetGridTop + 2;
-
-static const CoordType kHUDLockLeft = kShuttleWindowLeft + 101;
-static const CoordType kHUDLockTop = kShuttleWindowTop + 49;
-static const CoordType kHUDLockWidth = 145;
-static const CoordType kHUDLockHeight = 124;
-
-static const CoordType kTractorLockWidth = 50;
-static const CoordType kTractorLockHeight = 30;
-
-static const CoordType kTractorLockLeft = kShuttleWindowMidH - kTractorLockWidth / 2;
-static const CoordType kTractorLockTop = kShuttleWindowMidV - kTractorLockHeight / 2;
-static const CoordType kTractorLockRight = kTractorLockLeft + kTractorLockWidth;
-static const CoordType kTractorLockBottom = kTractorLockTop + kTractorLockHeight;
+enum {
+ kHUDTargetGridLeft = kShuttleWindowLeft + 16,
+ kHUDTargetGridTop = kShuttleWindowTop + 8,
+ kHUDTargetGridWidth = 328,
+ kHUDTargetGridHeight = 206,
+
+ kHUDRS232Left = kHUDTargetGridLeft + 264,
+ kHUDRS232Top = kHUDTargetGridTop + 2,
+
+ kHUDLockLeft = kShuttleWindowLeft + 101,
+ kHUDLockTop = kShuttleWindowTop + 49,
+ kHUDLockWidth = 145,
+ kHUDLockHeight = 124,
+
+ kTractorLockWidth = 50,
+ kTractorLockHeight = 30,
+
+ kTractorLockLeft = kShuttleWindowMidH - kTractorLockWidth / 2,
+ kTractorLockTop = kShuttleWindowMidV - kTractorLockHeight / 2,
+ kTractorLockRight = kTractorLockLeft + kTractorLockWidth,
+ kTractorLockBottom = kTractorLockTop + kTractorLockHeight
+};
static const uint16 s_RS232Data[] = {
0xF0E1, 0xCE70,
diff --git a/engines/pegasus/neighborhood/norad/alpha/ecrmonitor.cpp b/engines/pegasus/neighborhood/norad/alpha/ecrmonitor.cpp
index e2a0267231..1478a74744 100644
--- a/engines/pegasus/neighborhood/norad/alpha/ecrmonitor.cpp
+++ b/engines/pegasus/neighborhood/norad/alpha/ecrmonitor.cpp
@@ -45,7 +45,9 @@ static const TimeValue kSection2Start = 26;
static const TimeValue kSection2Stop = 1000;
// Seems to be a good value for a 20 second pan.
-static const CoordType kPanPixelsPerFrame = 8;
+enum {
+ kPanPixelsPerFrame = 8
+};
// Interesting times are in seconds.
static const TimeValue s_ECRInterestingTimes[] = {
diff --git a/engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp b/engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp
index 3491f161c7..e85a3e699f 100644
--- a/engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp
+++ b/engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp
@@ -65,64 +65,66 @@ static const ItemID kCO2Item = 10000;
static const ItemID kHeItem = 10001;
// Interactive points.
-static const TimeValue kFSPowerUpStartStart = 0;
-static const TimeValue kFSPowerUpStartStop = 600;
-static const TimeValue kFSSplashStart = 600;
-static const TimeValue kFSSplashStop = 7800;
-static const TimeValue kFSSplashIntakeStart = 7800;
-static const TimeValue kFSSplashIntakeStop = 18600;
-
-static const TimeValue kFSMainMenu = 18600;
-static const TimeValue kFSIntakeHiliteStart = 19200;
-static const TimeValue kFSIntakeHiliteStop = 19800;
-static const TimeValue kFSDispenseHiliteStart = 19800;
-static const TimeValue kFSDispenseHiliteStop = 20400;
-
-static const TimeValue kFSDispenseMenu = 20400;
-
-static const TimeValue kFSArHiliteStart = 21000;
-static const TimeValue kFSArHiliteStop = 21600;
-static const TimeValue kFSArAttach = 21600;
-static const TimeValue kFSArFilledStart = 22200;
-static const TimeValue kFSArFilledStop = 25200;
-static const TimeValue kFSArIncompatibleStart = 25200;
-static const TimeValue kFSArIncompatibleStop = 30000;
-
-static const TimeValue kFSCO2HiliteStart = 30000;
-static const TimeValue kFSCO2HiliteStop = 30600;
-static const TimeValue kFSCO2Attach = 30600;
-static const TimeValue kFSCO2FilledStart = 31200;
-static const TimeValue kFSCO2FilledStop = 34200;
-static const TimeValue kFSCO2IncompatibleStart = 34200;
-static const TimeValue kFSCO2IncompatibleStop = 39000;
-
-static const TimeValue kFSHeHiliteStart = 39000;
-static const TimeValue kFSHeHiliteStop = 39600;
-static const TimeValue kFSHeAttach = 39600;
-static const TimeValue kFSHeFilledStart = 40200;
-static const TimeValue kFSHeFilledStop = 43200;
-static const TimeValue kFSHeIncompatibleStart = 43200;
-static const TimeValue kFSHeIncompatibleStop = 48000;
-
-static const TimeValue kFSOHiliteStart = 48000;
-static const TimeValue kFSOHiliteStop = 48600;
-static const TimeValue kFSOAttach = 48600;
-static const TimeValue kFSOFilledStart = 49200;
-static const TimeValue kFSOFilledStop = 52200;
-static const TimeValue kFSOIncompatibleStart = 52200;
-static const TimeValue kFSOIncompatibleStop = 57000;
-
-static const TimeValue kFSNHiliteStart = 57000;
-static const TimeValue kFSNHiliteStop = 57600;
-static const TimeValue kFSNAttach = 57600;
-static const TimeValue kFSNFilledStart = 58200;
-static const TimeValue kFSNFilledStop = 61200;
-static const TimeValue kFSNIncompatibleStart = 61200;
-static const TimeValue kFSNIncompatibleStop = 66000;
-
-static const TimeValue kFSIntakeMenu = 66000;
-static const TimeValue kFSIntakeInProgressStart = 66600;
-static const TimeValue kFSIntakeInProgressStop = 69600;
+enum {
+ kFSPowerUpStartStart = 0,
+ kFSPowerUpStartStop = 600,
+ kFSSplashStart = 600,
+ kFSSplashStop = 7800,
+ kFSSplashIntakeStart = 7800,
+ kFSSplashIntakeStop = 18600,
+
+ kFSMainMenu = 18600,
+ kFSIntakeHiliteStart = 19200,
+ kFSIntakeHiliteStop = 19800,
+ kFSDispenseHiliteStart = 19800,
+ kFSDispenseHiliteStop = 20400,
+
+ kFSDispenseMenu = 20400,
+
+ kFSArHiliteStart = 21000,
+ kFSArHiliteStop = 21600,
+ kFSArAttach = 21600,
+ kFSArFilledStart = 22200,
+ kFSArFilledStop = 25200,
+ kFSArIncompatibleStart = 25200,
+ kFSArIncompatibleStop = 30000,
+
+ kFSCO2HiliteStart = 30000,
+ kFSCO2HiliteStop = 30600,
+ kFSCO2Attach = 30600,
+ kFSCO2FilledStart = 31200,
+ kFSCO2FilledStop = 34200,
+ kFSCO2IncompatibleStart = 34200,
+ kFSCO2IncompatibleStop = 39000,
+
+ kFSHeHiliteStart = 39000,
+ kFSHeHiliteStop = 39600,
+ kFSHeAttach = 39600,
+ kFSHeFilledStart = 40200,
+ kFSHeFilledStop = 43200,
+ kFSHeIncompatibleStart = 43200,
+ kFSHeIncompatibleStop = 48000,
+
+ kFSOHiliteStart = 48000,
+ kFSOHiliteStop = 48600,
+ kFSOAttach = 48600,
+ kFSOFilledStart = 49200,
+ kFSOFilledStop = 52200,
+ kFSOIncompatibleStart = 52200,
+ kFSOIncompatibleStop = 57000,
+
+ kFSNHiliteStart = 57000,
+ kFSNHiliteStop = 57600,
+ kFSNAttach = 57600,
+ kFSNFilledStart = 58200,
+ kFSNFilledStop = 61200,
+ kFSNIncompatibleStart = 61200,
+ kFSNIncompatibleStop = 66000,
+
+ kFSIntakeMenu = 66000,
+ kFSIntakeInProgressStart = 66600,
+ kFSIntakeInProgressStop = 69600
+};
NoradAlphaFillingStation::NoradAlphaFillingStation(Neighborhood *owner) : GameInteraction(kNoradFillingStationInteractionID, owner),
_rightSideMovie(kN01RightSideID), _rightSideNotification(kNoradFillingStationNotificationID, ((PegasusEngine *)g_engine)) {
diff --git a/engines/pegasus/neighborhood/norad/delta/globegame.cpp b/engines/pegasus/neighborhood/norad/delta/globegame.cpp
index 5c321a8e8a..9ea3036024 100644
--- a/engines/pegasus/neighborhood/norad/delta/globegame.cpp
+++ b/engines/pegasus/neighborhood/norad/delta/globegame.cpp
@@ -394,20 +394,22 @@ static const NotificationFlags kGlobeNotificationFlags = kGlobeSplash1Finished |
kGlobeTimerExpired |
kMaxDeactivatedFinished;
-static const int16 kSplash1End = 4;
-static const int16 kSplash2End = 5;
-static const int16 kSplash3Start = 8;
-static const int16 kSplash3Stop = 9;
-static const int16 kSplash4Start = 9;
-static const int16 kSplash4Stop = 10;
-static const int16 kNewLaunchSiloTime = 10;
-static const int16 kSiloDeactivatedTime = 11;
-static const int16 kMissileLaunchedTime = 12;
-static const int16 kMaxDeactivatedStart = 13;
-static const int16 kMaxDeactivatedStop = 23;
-
-static const int16 kGamePlaying = 1;
-static const int16 kGameOver = 2;
+enum {
+ kSplash1End = 4,
+ kSplash2End = 5,
+ kSplash3Start = 8,
+ kSplash3Stop = 9,
+ kSplash4Start = 9,
+ kSplash4Stop = 10,
+ kNewLaunchSiloTime = 10,
+ kSiloDeactivatedTime = 11,
+ kMissileLaunchedTime = 12,
+ kMaxDeactivatedStart = 13,
+ kMaxDeactivatedStop = 23,
+
+ kGamePlaying = 1,
+ kGameOver = 2
+};
enum {
kGameIntro,
diff --git a/engines/pegasus/neighborhood/norad/subcontrolroom.cpp b/engines/pegasus/neighborhood/norad/subcontrolroom.cpp
index d48481e925..1b14c529d8 100644
--- a/engines/pegasus/neighborhood/norad/subcontrolroom.cpp
+++ b/engines/pegasus/neighborhood/norad/subcontrolroom.cpp
@@ -34,110 +34,113 @@ namespace Pegasus {
// Right Monitor times
-static const TimeValue kAlphaClawSplashStart = 0;
-static const TimeValue kAlphaClawSplashStop = 4000;
-
-static const TimeValue kDeltaClawSplashStart = 4000;
-static const TimeValue kDeltaClawSplashStop = 8000;
-
-static const TimeValue kClawAtATime = 8000;
-static const TimeValue kClawAtAPinchedTime = 8600;
-static const TimeValue kClawAtATurnedTime = 9200;
-static const TimeValue kClawAtAWithRobotPinchedTime = 9800;
-
-static const TimeValue kClawAtBTime = 10400;
-static const TimeValue kClawAtBPinchedTime = 11000;
-static const TimeValue kClawAtBTurnedTime = 11600;
-static const TimeValue kClawAtBWithRobotTime = 12200;
-static const TimeValue kClawAtBWithRobotPinchedTime = 12800;
-
-static const TimeValue kClawAtCTime = 13400;
-static const TimeValue kClawAtCPinchedTime = 14000;
-static const TimeValue kClawAtCTurnedTime = 14600;
-
-static const TimeValue kClawAtDTime = 15200;
-static const TimeValue kClawAtDPinchedTime = 15800;
-static const TimeValue kClawAtDTurnedTime = 16400;
-
-static const TimeValue kAToBStart = 17000;
-static const TimeValue kAToBStop = 18680;
-static const TimeValue kAPinchStart = 18680;
-static const TimeValue kAPinchStop = 20200;
-static const TimeValue kACCWStart = 20200;
-static const TimeValue kACCWStop = 21600;
-static const TimeValue kACWStart = 21600;
-static const TimeValue kACWStop = 23000;
-
-static const TimeValue kBToAStart = 23000;
-static const TimeValue kBToAStop = 24680;
-static const TimeValue kBToCStart = 24680;
-static const TimeValue kBToCStop = 26520;
-static const TimeValue kBToDStart = 26520;
-static const TimeValue kBToDStop = 28320;
-static const TimeValue kBPinchStart = 28320;
-static const TimeValue kBPinchStop = 29680;
-static const TimeValue kBCCWStart = 29680;
-static const TimeValue kBCCWStop = 31200;
-static const TimeValue kBCWStart = 31200;
-static const TimeValue kBCWStop = 32720;
-
-static const TimeValue kCToBStart = 32720;
-static const TimeValue kCToBStop = 34560;
-static const TimeValue kCPinchStart = 34560;
-static const TimeValue kCPinchStop = 36400;
-static const TimeValue kCCCWStart = 36400;
-static const TimeValue kCCCWStop = 37840;
-static const TimeValue kCCWStart = 37840;
-static const TimeValue kCCWStop = 39280;
-
-static const TimeValue kDToBStart = 39280;
-static const TimeValue kDToBStop = 41080;
-static const TimeValue kDPinchStart = 41080;
-static const TimeValue kDPinchStop = 42600;
-static const TimeValue kDCCWStart = 42600;
-static const TimeValue kDCCWStop = 44000;
-static const TimeValue kDCWStart = 44000;
-static const TimeValue kDCWStop = 45400;
-
-static const TimeValue kRobotApproachStart = 45400;
-static const TimeValue kRobotApproachStop = 56800;
-
-static const TimeValue kCToBWithRobotStart = 56800;
-static const TimeValue kCToBWithRobotStop = 58600;
-
-static const TimeValue kBPinchWithRobotStart = 58600;
-static const TimeValue kBPinchWithRobotStop = 60400;
-static const TimeValue kBToAWithRobotStart = 60400;
-static const TimeValue kBToAWithRobotStop = 62240;
+enum {
+ kAlphaClawSplashStart = 0,
+ kAlphaClawSplashStop = 4000,
+
+ kDeltaClawSplashStart = 4000,
+ kDeltaClawSplashStop = 8000,
+
+ kClawAtATime = 8000,
+ kClawAtAPinchedTime = 8600,
+ kClawAtATurnedTime = 9200,
+ kClawAtAWithRobotPinchedTime = 9800,
+
+ kClawAtBTime = 10400,
+ kClawAtBPinchedTime = 11000,
+ kClawAtBTurnedTime = 11600,
+ kClawAtBWithRobotTime = 12200,
+ kClawAtBWithRobotPinchedTime = 12800,
+
+ kClawAtCTime = 13400,
+ kClawAtCPinchedTime = 14000,
+ kClawAtCTurnedTime = 14600,
+
+ kClawAtDTime = 15200,
+ kClawAtDPinchedTime = 15800,
+ kClawAtDTurnedTime = 16400,
+
+ kAToBStart = 17000,
+ kAToBStop = 18680,
+ kAPinchStart = 18680,
+ kAPinchStop = 20200,
+ kACCWStart = 20200,
+ kACCWStop = 21600,
+ kACWStart = 21600,
+ kACWStop = 23000,
+
+ kBToAStart = 23000,
+ kBToAStop = 24680,
+ kBToCStart = 24680,
+ kBToCStop = 26520,
+ kBToDStart = 26520,
+ kBToDStop = 28320,
+ kBPinchStart = 28320,
+ kBPinchStop = 29680,
+ kBCCWStart = 29680,
+ kBCCWStop = 31200,
+ kBCWStart = 31200,
+ kBCWStop = 32720,
+
+ kCToBStart = 32720,
+ kCToBStop = 34560,
+ kCPinchStart = 34560,
+ kCPinchStop = 36400,
+ kCCCWStart = 36400,
+ kCCCWStop = 37840,
+ kCCWStart = 37840,
+ kCCWStop = 39280,
+
+ kDToBStart = 39280,
+ kDToBStop = 41080,
+ kDPinchStart = 41080,
+ kDPinchStop = 42600,
+ kDCCWStart = 42600,
+ kDCCWStop = 44000,
+ kDCWStart = 44000,
+ kDCWStop = 45400,
+
+ kRobotApproachStart = 45400,
+ kRobotApproachStop = 56800,
+
+ kCToBWithRobotStart = 56800,
+ kCToBWithRobotStop = 58600,
+
+ kBPinchWithRobotStart = 58600,
+ kBPinchWithRobotStop = 60400,
+ kBToAWithRobotStart = 60400,
+ kBToAWithRobotStop = 62240
+};
// As usual, times here are in seconds.
// Left monitor times.
+enum {
+ kAlphaSplashStart = 0,
+ kAlphaSplashStop = 2,
-static const TimeValue kAlphaSplashStart = 0;
-static const TimeValue kAlphaSplashStop = 2;
-
-static const TimeValue kMainMenuTime = 2;
-static const TimeValue kLaunchPrepRolloverTime = 3;
-static const TimeValue kLaunchPrepHighlightStart = 4;
-static const TimeValue kLaunchPrepHighlightStop = 5;
-static const TimeValue kClawControlRolloverTime = 5;
-static const TimeValue kClawControlHighlightStart = 6;
-static const TimeValue kClawControlHighlightStop = 7;
+ kMainMenuTime = 2,
+ kLaunchPrepRolloverTime = 3,
+ kLaunchPrepHighlightStart = 4,
+ kLaunchPrepHighlightStop = 5,
+ kClawControlRolloverTime = 5,
+ kClawControlHighlightStart = 6,
+ kClawControlHighlightStop = 7,
-static const TimeValue kAlphaLaunchPrepStart = 7;
-static const TimeValue kAlphaLaunchPrepStop = 17;
+ kAlphaLaunchPrepStart = 7,
+ kAlphaLaunchPrepStop = 17,
-static const TimeValue kClawMenuStart = 17;
-static const TimeValue kClawMenuStop = 18;
+ kClawMenuStart = 17,
+ kClawMenuStop = 18,
-static const TimeValue kClawMenuTime = 18;
+ kClawMenuTime = 18,
-static const TimeValue kDeltaSplashStart = 19;
-static const TimeValue kDeltaSplashStop = 21;
+ kDeltaSplashStart = 19,
+ kDeltaSplashStop = 21,
-static const TimeValue kDeltaLaunchPrepStart = 21;
-static const TimeValue kDeltaLaunchPrepStop = 30;
+ kDeltaLaunchPrepStart = 21,
+ kDeltaLaunchPrepStop = 30
+};
// Right monitor times.
diff --git a/engines/pegasus/neighborhood/tsa/fulltsa.cpp b/engines/pegasus/neighborhood/tsa/fulltsa.cpp
index 92b79c038e..f7996fabf5 100644
--- a/engines/pegasus/neighborhood/tsa/fulltsa.cpp
+++ b/engines/pegasus/neighborhood/tsa/fulltsa.cpp
@@ -41,41 +41,45 @@ namespace Pegasus {
// TSA PICTs:
-static const ResIDType kTBPCloseBoxPICTID = 800;
-static const ResIDType kTBPRewindPICTID = 801;
-static const ResIDType kUnresolvedPICTID = 802;
-static const ResIDType kResolvedPICTID = 803;
-static const ResIDType kJumpMenuPICTID = 804;
-static const ResIDType kJumpMenuHilitedPICTID = 805;
-static const ResIDType kExitPICTID = 806;
-static const ResIDType kExitHilitedPICTID = 807;
-static const ResIDType kLeftRipPICTID = 808;
-static const ResIDType kComparisonCloseBoxPICTID = 809;
-static const ResIDType kComparisonLeftRewindPICTID = 810;
-static const ResIDType kComparisonRightRewindPICTID = 811;
-static const ResIDType kComparisonHiliteNoradPICTID = 812;
-static const ResIDType kComparisonHiliteMarsPICTID = 813;
-static const ResIDType kComparisonHiliteCaldoriaPICTID = 814;
-static const ResIDType kComparisonHiliteWSCPICTID = 815;
-static const ResIDType kComparisonChancesNoradPICTID = 816;
-static const ResIDType kComparisonChancesMarsPICTID = 817;
-static const ResIDType kComparisonChancesCaldoriaPICTID = 818;
-static const ResIDType kComparisonChancesWSCPICTID = 819;
-static const ResIDType kRedirectionCCRolloverPICTID = 820;
-static const ResIDType kRedirectionRRRolloverPICTID = 821;
-static const ResIDType kRedirectionFDRolloverPICTID = 822;
-static const ResIDType kRedirectionCCDoorPICTID = 823;
-static const ResIDType kRedirectionRRDoorPICTID = 824;
-static const ResIDType kRedirectionFDDoorPICTID = 825;
-static const ResIDType kRedirectionSecuredPICTID = 826;
-static const ResIDType kRedirectionNewTargetPICTID = 827;
-static const ResIDType kRedirectionClosePICTID = 828;
+enum {
+ kTBPCloseBoxPICTID = 800,
+ kTBPRewindPICTID = 801,
+ kUnresolvedPICTID = 802,
+ kResolvedPICTID = 803,
+ kJumpMenuPICTID = 804,
+ kJumpMenuHilitedPICTID = 805,
+ kExitPICTID = 806,
+ kExitHilitedPICTID = 807,
+ kLeftRipPICTID = 808,
+ kComparisonCloseBoxPICTID = 809,
+ kComparisonLeftRewindPICTID = 810,
+ kComparisonRightRewindPICTID = 811,
+ kComparisonHiliteNoradPICTID = 812,
+ kComparisonHiliteMarsPICTID = 813,
+ kComparisonHiliteCaldoriaPICTID = 814,
+ kComparisonHiliteWSCPICTID = 815,
+ kComparisonChancesNoradPICTID = 816,
+ kComparisonChancesMarsPICTID = 817,
+ kComparisonChancesCaldoriaPICTID = 818,
+ kComparisonChancesWSCPICTID = 819,
+ kRedirectionCCRolloverPICTID = 820,
+ kRedirectionRRRolloverPICTID = 821,
+ kRedirectionFDRolloverPICTID = 822,
+ kRedirectionCCDoorPICTID = 823,
+ kRedirectionRRDoorPICTID = 824,
+ kRedirectionFDDoorPICTID = 825,
+ kRedirectionSecuredPICTID = 826,
+ kRedirectionNewTargetPICTID = 827,
+ kRedirectionClosePICTID = 828
+};
static const int16 kCompassShift = 15;
-static const TimeScale kFullTSAMovieScale = 600;
-static const TimeScale kFullTSAFramesPerSecond = 15;
-static const TimeScale kFullTSAFrameDuration = 40;
+enum {
+ kFullTSAMovieScale = 600,
+ kFullTSAFramesPerSecond = 15,
+ kFullTSAFrameDuration = 40
+};
// Alternate IDs.
static const AlternateID kAltTSANormal = 0;
@@ -84,416 +88,425 @@ static const AlternateID kAltTSARobotsAtFrontDoor = 2;
static const AlternateID kAltTSARedAlert = 3;
// Room IDs.
-static const RoomID kTSA01 = 1;
-static const RoomID kTSA02 = 2;
-static const RoomID kTSA03 = 3;
-static const RoomID kTSA04 = 4;
-static const RoomID kTSA05 = 5;
-static const RoomID kTSA0A = 6;
-static const RoomID kTSA06 = 7;
-static const RoomID kTSA07 = 8;
-static const RoomID kTSA08 = 9;
-static const RoomID kTSA09 = 10;
-static const RoomID kTSA10 = 11;
-static const RoomID kTSA11 = 12;
-static const RoomID kTSA12 = 13;
-static const RoomID kTSA13 = 14;
-static const RoomID kTSA14 = 15;
-static const RoomID kTSA15 = 16;
-static const RoomID kTSA16 = 17;
-static const RoomID kTSA17 = 18;
-static const RoomID kTSA18 = 19;
-static const RoomID kTSA19 = 20;
-static const RoomID kTSA0B = 21;
-static const RoomID kTSA21Cyan = 22;
-static const RoomID kTSA22Cyan = 23;
-static const RoomID kTSA23Cyan = 24;
-static const RoomID kTSA24Cyan = 25;
-static const RoomID kTSA25Cyan = 26;
-static const RoomID kTSA21Red = 27;
-static const RoomID kTSA23Red = 29;
-static const RoomID kTSA24Red = 30;
-static const RoomID kTSA25Red = 31;
-static const RoomID kTSA26 = 32;
-static const RoomID kTSA27 = 33;
-static const RoomID kTSA28 = 34;
-static const RoomID kTSA29 = 35;
-static const RoomID kTSA30 = 36;
-static const RoomID kTSA31 = 37;
-static const RoomID kTSA32 = 38;
-static const RoomID kTSA33 = 39;
-static const RoomID kTSA34 = 40;
-static const RoomID kTSA35 = 41;
-static const RoomID kTSADeathRoom = 43;
+enum {
+ kTSA01 = 1,
+ kTSA02 = 2,
+ kTSA03 = 3,
+ kTSA04 = 4,
+ kTSA05 = 5,
+ kTSA0A = 6,
+ kTSA06 = 7,
+ kTSA07 = 8,
+ kTSA08 = 9,
+ kTSA09 = 10,
+ kTSA10 = 11,
+ kTSA11 = 12,
+ kTSA12 = 13,
+ kTSA13 = 14,
+ kTSA14 = 15,
+ kTSA15 = 16,
+ kTSA16 = 17,
+ kTSA17 = 18,
+ kTSA18 = 19,
+ kTSA19 = 20,
+ kTSA0B = 21,
+ kTSA21Cyan = 22,
+ kTSA22Cyan = 23,
+ kTSA23Cyan = 24,
+ kTSA24Cyan = 25,
+ kTSA25Cyan = 26,
+ kTSA21Red = 27,
+ kTSA23Red = 29,
+ kTSA24Red = 30,
+ kTSA25Red = 31,
+ kTSA26 = 32,
+ kTSA27 = 33,
+ kTSA28 = 34,
+ kTSA29 = 35,
+ kTSA30 = 36,
+ kTSA31 = 37,
+ kTSA32 = 38,
+ kTSA33 = 39,
+ kTSA34 = 40,
+ kTSA35 = 41,
+ kTSADeathRoom = 43
+};
// Hot Spot Activation IDs.
-static const HotSpotActivationID kActivateTSAReadyForCard = 1;
-static const HotSpotActivationID kActivateTSAReadyToTransport = 2;
-static const HotSpotActivationID kActivateTSARobotsAwake = 3;
-static const HotSpotActivationID kActivateTSA0BZoomedOut = 4;
-static const HotSpotActivationID kActivateTSA0BZoomedIn = 5;
-static const HotSpotActivationID kActivateTSA0BComparisonVideo = 6;
-static const HotSpotActivationID kActivationLogReaderOpen = 7;
-static const HotSpotActivationID kActivateTSA0BTBPVideo = 8;
-static const HotSpotActivationID kActivationDoesntHaveKey = 9;
-static const HotSpotActivationID kActivationKeyVaultOpen = 10;
-static const HotSpotActivationID kActivationDoesntHaveChips = 11;
-static const HotSpotActivationID kActivationChipVaultOpen = 12;
-static const HotSpotActivationID kActivationJumpToPrehistoric = 13;
-static const HotSpotActivationID kActivationJumpToNorad = 14;
-static const HotSpotActivationID kActivationJumpToMars = 15;
-static const HotSpotActivationID kActivationJumpToWSC = 16;
-static const HotSpotActivationID kActivationReadyToExit = 17;
-static const HotSpotActivationID kActivationReadyForJumpMenu = 18;
-static const HotSpotActivationID kActivationMainJumpMenu = 19;
+enum {
+ kActivateTSAReadyForCard = 1,
+ kActivateTSAReadyToTransport = 2,
+ kActivateTSARobotsAwake = 3,
+ kActivateTSA0BZoomedOut = 4,
+ kActivateTSA0BZoomedIn = 5,
+ kActivateTSA0BComparisonVideo = 6,
+ kActivationLogReaderOpen = 7,
+ kActivateTSA0BTBPVideo = 8,
+ kActivationDoesntHaveKey = 9,
+ kActivationKeyVaultOpen = 10,
+ kActivationDoesntHaveChips = 11,
+ kActivationChipVaultOpen = 12,
+ kActivationJumpToPrehistoric = 13,
+ kActivationJumpToNorad = 14,
+ kActivationJumpToMars = 15,
+ kActivationJumpToWSC = 16,
+ kActivationReadyToExit = 17,
+ kActivationReadyForJumpMenu = 18,
+ kActivationMainJumpMenu = 19
+};
// Hot Spot IDs.
-static const HotSpotID kTSAGTCardDropSpotID = 5000;
-static const HotSpotID kTSAGTTokyoSpotID = 5001;
-static const HotSpotID kTSAGTCaldoriaSpotID = 5002;
-static const HotSpotID kTSAGTBeachSpotID = 5003;
-static const HotSpotID kTSAGTOtherSpotID = 5004;
-static const HotSpotID kTSA02DoorSpotID = 5005;
-static const HotSpotID kTSA03EastJimenezSpotID = 5006;
-static const HotSpotID kTSA03WestCrenshawSpotID = 5007;
-static const HotSpotID kTSA04EastMatsumotoSpotID = 5008;
-static const HotSpotID kTSA04WestCastilleSpotID = 5009;
-static const HotSpotID kTSA05EastSinclairSpotID = 5010;
-static const HotSpotID kTSA05WestWhiteSpotID = 5011;
-static const HotSpotID kTSA0AEastSpotID = 5012;
-static const HotSpotID kTSA0AWastSpotID = 5013;
-static const HotSpotID kTSA0BEastMonitorSpotID = 5014;
-static const HotSpotID kTSA0BEastMonitorOutSpotID = 5015;
-static const HotSpotID kTSA0BEastCompareNoradSpotID = 5016;
-static const HotSpotID kTSA0BEastCompareMarsSpotID = 5017;
-static const HotSpotID kTSA0BEastCompareCaldoriaSpotID = 5018;
-static const HotSpotID kTSA0BEastCompareWSCSpotID = 5019;
-static const HotSpotID kTSA0BEastLeftRewindSpotID = 5020;
-static const HotSpotID kTSA0BEastLeftPlaySpotID = 5021;
-static const HotSpotID kTSA0BEastRightRewindSpotID = 5022;
-static const HotSpotID kTSA0BEastRightPlaySpotID = 5023;
-static const HotSpotID kTSA0BEastCloseVideoSpotID = 5024;
-static const HotSpotID kTSA0BNorthMonitorSpotID = 5025;
-static const HotSpotID kTSA0BNorthMonitorOutSpotID = 5026;
-static const HotSpotID kTSA0BNorthHistLogSpotID = 5027;
-static const HotSpotID kTSA0BNorthRobotsToCommandCenterSpotID = 5028;
-static const HotSpotID kTSA0BNorthRobotsToReadyRoomSpotID = 5029;
-static const HotSpotID kTSA0BNorthRobotsToFrontDoorSpotID = 5030;
-static const HotSpotID kTSA0BWestMonitorSpotID = 5031;
-static const HotSpotID kTSA0BWestMonitorOutSpotID = 5032;
-static const HotSpotID kTSA0BWestTheorySpotID = 5033;
-static const HotSpotID kTSA0BWestBackgroundSpotID = 5034;
-static const HotSpotID kTSA0BWestProcedureSpotID = 5035;
-static const HotSpotID kTSA0BWestCloseVideoSpotID = 5036;
-static const HotSpotID kTSA0BWestPlayVideoSpotID = 5037;
-static const HotSpotID kTSA0BWestRewindVideoSpotID = 5038;
-static const HotSpotID kTSA22EastMonitorSpotID = 5039;
-static const HotSpotID kTSA22EastKeySpotID = 5040;
-static const HotSpotID kTSA23WestMonitorSpotID = 5041;
-static const HotSpotID kTSA23WestChipsSpotID = 5042;
-static const HotSpotID kTSA34NorthDoorSpotID = 5043;
-static const HotSpotID kTSA37NorthJumpToPrehistoricSpotID = 5044;
-static const HotSpotID kTSA37NorthJumpToNoradSpotID = 5045;
-static const HotSpotID kTSA37NorthCancelNoradSpotID = 5046;
-static const HotSpotID kTSA37NorthJumpToMarsSpotID = 5047;
-static const HotSpotID kTSA37NorthCancelMarsSpotID = 5048;
-static const HotSpotID kTSA37NorthJumpToWSCSpotID = 5049;
-static const HotSpotID kTSA37NorthCancelWSCSpotID = 5050;
-static const HotSpotID kTSA37NorthExitSpotID = 5051;
-static const HotSpotID kTSA37NorthJumpMenuSpotID = 5052;
-static const HotSpotID kTSA37NorthNoradMenuSpotID = 5053;
-static const HotSpotID kTSA37NorthMarsMenuSpotID = 5054;
-static const HotSpotID kTSA37NorthWSCMenuSpotID = 5055;
+enum {
+ kTSAGTCardDropSpotID = 5000,
+ kTSAGTTokyoSpotID = 5001,
+ kTSAGTCaldoriaSpotID = 5002,
+ kTSAGTBeachSpotID = 5003,
+ kTSAGTOtherSpotID = 5004,
+ kTSA02DoorSpotID = 5005,
+ kTSA03EastJimenezSpotID = 5006,
+ kTSA03WestCrenshawSpotID = 5007,
+ kTSA04EastMatsumotoSpotID = 5008,
+ kTSA04WestCastilleSpotID = 5009,
+ kTSA05EastSinclairSpotID = 5010,
+ kTSA05WestWhiteSpotID = 5011,
+ kTSA0AEastSpotID = 5012,
+ kTSA0AWastSpotID = 5013,
+ kTSA0BEastMonitorSpotID = 5014,
+ kTSA0BEastMonitorOutSpotID = 5015,
+ kTSA0BEastCompareNoradSpotID = 5016,
+ kTSA0BEastCompareMarsSpotID = 5017,
+ kTSA0BEastCompareCaldoriaSpotID = 5018,
+ kTSA0BEastCompareWSCSpotID = 5019,
+ kTSA0BEastLeftRewindSpotID = 5020,
+ kTSA0BEastLeftPlaySpotID = 5021,
+ kTSA0BEastRightRewindSpotID = 5022,
+ kTSA0BEastRightPlaySpotID = 5023,
+ kTSA0BEastCloseVideoSpotID = 5024,
+ kTSA0BNorthMonitorSpotID = 5025,
+ kTSA0BNorthMonitorOutSpotID = 5026,
+ kTSA0BNorthHistLogSpotID = 5027,
+ kTSA0BNorthRobotsToCommandCenterSpotID = 5028,
+ kTSA0BNorthRobotsToReadyRoomSpotID = 5029,
+ kTSA0BNorthRobotsToFrontDoorSpotID = 5030,
+ kTSA0BWestMonitorSpotID = 5031,
+ kTSA0BWestMonitorOutSpotID = 5032,
+ kTSA0BWestTheorySpotID = 5033,
+ kTSA0BWestBackgroundSpotID = 5034,
+ kTSA0BWestProcedureSpotID = 5035,
+ kTSA0BWestCloseVideoSpotID = 5036,
+ kTSA0BWestPlayVideoSpotID = 5037,
+ kTSA0BWestRewindVideoSpotID = 5038,
+ kTSA22EastMonitorSpotID = 5039,
+ kTSA22EastKeySpotID = 5040,
+ kTSA23WestMonitorSpotID = 5041,
+ kTSA23WestChipsSpotID = 5042,
+ kTSA34NorthDoorSpotID = 5043,
+ kTSA37NorthJumpToPrehistoricSpotID = 5044,
+ kTSA37NorthJumpToNoradSpotID = 5045,
+ kTSA37NorthCancelNoradSpotID = 5046,
+ kTSA37NorthJumpToMarsSpotID = 5047,
+ kTSA37NorthCancelMarsSpotID = 5048,
+ kTSA37NorthJumpToWSCSpotID = 5049,
+ kTSA37NorthCancelWSCSpotID = 5050,
+ kTSA37NorthExitSpotID = 5051,
+ kTSA37NorthJumpMenuSpotID = 5052,
+ kTSA37NorthNoradMenuSpotID = 5053,
+ kTSA37NorthMarsMenuSpotID = 5054,
+ kTSA37NorthWSCMenuSpotID = 5055
+};
// Extra sequence IDs.
-static const ExtraID kTSATransporterArrowLoop = 0;
-static const ExtraID kTSAArriveFromCaldoria = 1;
-static const ExtraID kTSAGTOtherChoice = 2;
-static const ExtraID kTSAGTCardSwipe = 3;
-static const ExtraID kTSAGTSelectCaldoria = 4;
-static const ExtraID kTSAGTGoToCaldoria = 5;
-static const ExtraID kTSAGTSelectBeach = 6;
-static const ExtraID kTSAGTGoToBeach = 7;
-static const ExtraID kTSAGTArriveAtBeach = 8;
-static const ExtraID kTSAGTSelectTokyo = 9;
-static const ExtraID kTSAGTGoToTokyo = 10;
-static const ExtraID kTSAGTArriveAtTokyo = 11;
-static const ExtraID kTSA02NorthZoomIn = 12;
-static const ExtraID kTSA02NorthTenSecondDoor = 13;
-static const ExtraID kTSA02NorthZoomOut = 14;
-static const ExtraID kTSA02NorthDoorWithAgent3 = 15;
-static const ExtraID kTSA03JimenezZoomIn = 16;
-static const ExtraID kTSA03JimenezSpeech = 17;
-static const ExtraID kTSA03JimenezZoomOut = 18;
-static const ExtraID kTSA03CrenshawZoomIn = 19;
-static const ExtraID kTSA03CrenshawSpeech = 20;
-static const ExtraID kTSA03CrenshawZoomOut = 21;
-static const ExtraID kTSA03SouthRobotDeath = 22;
-static const ExtraID kTSA04NorthRobotGreeting = 23;
-static const ExtraID kTSA04MatsumotoZoomIn = 24;
-static const ExtraID kTSA04MatsumotoSpeech = 25;
-static const ExtraID kTSA04MatsumotoZoomOut = 26;
-static const ExtraID kTSA04CastilleZoomIn = 27;
-static const ExtraID kTSA04CastilleSpeech = 28;
-static const ExtraID kTSA04CastilleZoomOut = 29;
-static const ExtraID kTSA05SinclairZoomIn = 30;
-static const ExtraID kTSA05SinclairSpeech = 31;
-static const ExtraID kTSA05SinclairZoomOut = 32;
-static const ExtraID kTSA05WhiteZoomIn = 33;
-static const ExtraID kTSA05WhiteSpeech = 34;
-static const ExtraID kTSA05WhiteZoomOut = 35;
-static const ExtraID kTSA0AEastRobot = 36;
-static const ExtraID kTSA0AWestRobot = 37;
-static const ExtraID kTSA16NorthRobotDeath = 38;
-static const ExtraID kTSA0BEastZoomIn = 39;
-static const ExtraID kTSA0BEastZoomedView = 40;
-static const ExtraID kTSA0BEastZoomOut = 41;
-static const ExtraID kTSA0BEastTurnLeft = 42;
-static const ExtraID kTSA0BComparisonStartup = 43;
-static const ExtraID kTSA0BComparisonView0000 = 44;
-static const ExtraID kTSA0BComparisonView0002 = 45;
-static const ExtraID kTSA0BComparisonView0020 = 46;
-static const ExtraID kTSA0BComparisonView0022 = 47;
-static const ExtraID kTSA0BComparisonView0200 = 48;
-static const ExtraID kTSA0BComparisonView0202 = 49;
-static const ExtraID kTSA0BComparisonView0220 = 50;
-static const ExtraID kTSA0BComparisonView0222 = 51;
-static const ExtraID kTSA0BComparisonView2000 = 52;
-static const ExtraID kTSA0BComparisonView2002 = 53;
-static const ExtraID kTSA0BComparisonView2020 = 54;
-static const ExtraID kTSA0BComparisonView2022 = 55;
-static const ExtraID kTSA0BComparisonView2200 = 56;
-static const ExtraID kTSA0BComparisonView2202 = 57;
-static const ExtraID kTSA0BComparisonView2220 = 58;
-static const ExtraID kTSA0BComparisonView2222 = 59;
-static const ExtraID kTSA0BNoradComparisonView = 60;
-static const ExtraID kTSA0BNoradUnaltered = 61;
-static const ExtraID kTSA0BNoradAltered = 62;
-static const ExtraID kTSA0BMarsComparisonView = 63;
-static const ExtraID kTSA0BMarsUnaltered = 64;
-static const ExtraID kTSA0BMarsAltered = 65;
-static const ExtraID kTSA0BWSCComparisonView = 66;
-static const ExtraID kTSA0BWSCUnaltered = 67;
-static const ExtraID kTSA0BWSCAltered = 68;
-static const ExtraID kTSA0BCaldoriaComparisonView = 69;
-static const ExtraID kTSA0BCaldoriaUnaltered = 70;
-static const ExtraID kTSA0BCaldoriaAltered = 71;
-static const ExtraID kTSA0BNorthZoomIn = 72;
-static const ExtraID kTSA0BNorthZoomedView = 73;
-static const ExtraID kTSA0BNorthZoomOut = 74;
-static const ExtraID kTSA0BNorthTurnLeft = 75;
-static const ExtraID kTSA0BNorthTurnRight = 76;
-static const ExtraID kTSA0BNorthHistLogOpen = 77;
-static const ExtraID kTSA0BNorthHistLogClose = 78;
-static const ExtraID kTSA0BNorthHistLogCloseWithLog = 79;
-static const ExtraID kTSA0BNorthCantChangeHistory = 80;
-static const ExtraID kTSA0BNorthYoureBusted = 81;
-static const ExtraID kTSA0BNorthFinallyHappened = 82;
-static const ExtraID kTSA0BShowRip1 = 83;
-static const ExtraID kTSA0BNorthRipView1 = 84;
-static const ExtraID kTSA0BShowRip2 = 85;
-static const ExtraID kTSA0BShowGuardRobots = 86;
-static const ExtraID kTSA0BAIInterruption = 87;
-static const ExtraID kTSA0BRobotsToCommandCenter = 88;
-static const ExtraID kTSA0BNorthRobotsAtCCView = 89;
-static const ExtraID kTSA0BNorthRobotsAtRRView = 90;
-static const ExtraID kTSA0BNorthRobotsAtFDView = 91;
-static const ExtraID kTSA0BRobotsFromCommandCenterToReadyRoom = 92;
-static const ExtraID kTSA0BRobotsFromReadyRoomToCommandCenter = 93;
-static const ExtraID kTSA0BRobotsFromCommandCenterToFrontDoor = 94;
-static const ExtraID kTSA0BRobotsFromFrontDoorToCommandCenter = 95;
-static const ExtraID kTSA0BRobotsFromFrontDoorToReadyRoom = 96;
-static const ExtraID kTSA0BRobotsFromReadyRoomToFrontDoor = 97;
-static const ExtraID kTSA0BWestZoomIn = 98;
-static const ExtraID kTSA0BWestZoomedView = 99;
-static const ExtraID kTSA0BWestZoomOut = 100;
-static const ExtraID kTSA0BWestTurnRight = 101;
-static const ExtraID kTSA0BTBPTheoryHighlight = 102;
-static const ExtraID kTSA0BTBPBackgroundHighlight = 103;
-static const ExtraID kTSA0BTBPProcedureHighlight = 104;
-static const ExtraID kTSA0BTBPTheory = 105;
-static const ExtraID kTSA0BTBPBackground = 106;
-static const ExtraID kTSA0BTBPProcedure = 107;
-static const ExtraID kTSA0BRipAlarmScreen = 108;
-static const ExtraID kTSA22RedEastZoomInSequence = 109;
-static const ExtraID kTSA22RedEastVaultViewWithKey = 110;
-static const ExtraID kTSA22RedEastVaultViewNoKey = 111;
-static const ExtraID kTSA23RedWestVaultZoomInSequence = 112;
-static const ExtraID kTSA23RedWestVaultViewWithChips = 113;
-static const ExtraID kTSA23RedWestVaultViewNoChips = 114;
-static const ExtraID kTSA25NorthDeniedNoKey = 115;
-static const ExtraID kTSA25NorthDeniedNoChip = 116;
-static const ExtraID kTSA25NorthPutOnSuit = 117;
-static const ExtraID kTSA25NorthAlreadyHaveSuit = 118;
-static const ExtraID kTSA25NorthDescending1 = 119;
-static const ExtraID kTSA25NorthDescending2 = 120;
-static const ExtraID kTSA37HorseToAI1 = 121;
-static const ExtraID kTSA37PegasusAI1 = 122;
-static const ExtraID kTSA37AI1ToCommissioner1 = 123;
-static const ExtraID kTSA37Commissioner1 = 124;
-static const ExtraID kTSA37Commissioner1ToZoom = 125;
-static const ExtraID kTSA37ZoomToPrehistoric = 126;
-static const ExtraID kTSA37PrehistoricToAI2 = 127;
-static const ExtraID kTSA37PegasusAI2 = 128;
-static const ExtraID kTSA37AI2ToPrehistoric = 129;
-static const ExtraID kTSA37PrehistoricToDepart = 130;
-static const ExtraID kTSA37PegasusDepart = 131;
-static const ExtraID kTSA37TimeJumpToPegasus = 132;
-static const ExtraID kTSA37RecallToDownload = 133;
-static const ExtraID kTSA37DownloadToColonel1 = 134;
-static const ExtraID kTSA37Colonel1 = 135;
-static const ExtraID kTSA37Colonel1ToReviewRequired = 136;
-static const ExtraID kTSA37ReviewRequiredToExit = 137;
-static const ExtraID kTSA37ExitHilited = 138;
-static const ExtraID kTSA37ExitToHorse = 139;
-static const ExtraID kTSA37HorseToColonel2 = 140;
-static const ExtraID kTSA37Colonel2 = 141;
-static const ExtraID kTSA37PegasusAI3 = 142;
-static const ExtraID kTSA37AI3ToHorse = 143;
-static const ExtraID kTSA37HorseToZoom = 144;
-static const ExtraID kTSA37ZoomToMainMenu = 145;
-static const ExtraID kTSA37MainMenuToAI4 = 146;
-static const ExtraID kTSA37PegasusAI4 = 147;
-static const ExtraID kTSA37AI4ToMainMenu = 148;
-static const ExtraID kTSA37JumpMenu000 = 149;
-static const ExtraID kTSA37JumpMenu001 = 150;
-static const ExtraID kTSA37JumpMenu010 = 151;
-static const ExtraID kTSA37JumpMenu011 = 152;
-static const ExtraID kTSA37JumpMenu100 = 153;
-static const ExtraID kTSA37JumpMenu101 = 154;
-static const ExtraID kTSA37JumpMenu110 = 155;
-static const ExtraID kTSA37JumpMenu111 = 156;
-static const ExtraID kTSA37JumpToWSCMenu = 157;
-static const ExtraID kTSA37CancelWSC = 158;
-static const ExtraID kTSA37JumpToWSC = 159;
-static const ExtraID kTSA37WSCToAI5 = 160;
-static const ExtraID kTSA37PegasusAI5 = 161;
-static const ExtraID kTSA37AI5ToWSC = 162;
-static const ExtraID kTSA37WSCToDepart = 163;
-static const ExtraID kTSA37JumpToMarsMenu = 164;
-static const ExtraID kTSA37CancelMars = 165;
-static const ExtraID kTSA37JumpToMars = 166;
-static const ExtraID kTSA37MarsToAI6 = 167;
-static const ExtraID kTSA37PegasusAI6 = 168;
-static const ExtraID kTSA37AI6ToMars = 169;
-static const ExtraID kTSA37MarsToDepart = 170;
-static const ExtraID kTSA37JumpToNoradMenu = 171;
-static const ExtraID kTSA37CancelNorad = 172;
-static const ExtraID kTSA37JumpToNorad = 173;
-static const ExtraID kTSA37NoradToAI7 = 174;
-static const ExtraID kTSA37PegasusAI7 = 175;
-static const ExtraID kTSA37AI7ToNorad = 176;
-static const ExtraID kTSA37NoradToDepart = 177;
-static const ExtraID kTSA37EnvironmentalScan = 178;
-static const ExtraID kTSA37DownloadToMainMenu = 179;
-static const ExtraID kTSA37DownloadToOpMemReview = 180;
-static const ExtraID kTSA37OpMemReviewToMainMenu = 181;
-static const ExtraID kTSA37OpMemReviewToAllClear = 182;
-static const ExtraID kTSA37AllClearToCongratulations = 183;
-static const ExtraID kTSA37Congratulations = 184;
-static const ExtraID kTSA37CongratulationsToExit = 185;
+enum {
+ kTSATransporterArrowLoop = 0,
+ kTSAArriveFromCaldoria = 1,
+ kTSAGTOtherChoice = 2,
+ kTSAGTCardSwipe = 3,
+ kTSAGTSelectCaldoria = 4,
+ kTSAGTGoToCaldoria = 5,
+ kTSAGTSelectBeach = 6,
+ kTSAGTGoToBeach = 7,
+ kTSAGTArriveAtBeach = 8,
+ kTSAGTSelectTokyo = 9,
+ kTSAGTGoToTokyo = 10,
+ kTSAGTArriveAtTokyo = 11,
+ kTSA02NorthZoomIn = 12,
+ kTSA02NorthTenSecondDoor = 13,
+ kTSA02NorthZoomOut = 14,
+ kTSA02NorthDoorWithAgent3 = 15,
+ kTSA03JimenezZoomIn = 16,
+ kTSA03JimenezSpeech = 17,
+ kTSA03JimenezZoomOut = 18,
+ kTSA03CrenshawZoomIn = 19,
+ kTSA03CrenshawSpeech = 20,
+ kTSA03CrenshawZoomOut = 21,
+ kTSA03SouthRobotDeath = 22,
+ kTSA04NorthRobotGreeting = 23,
+ kTSA04MatsumotoZoomIn = 24,
+ kTSA04MatsumotoSpeech = 25,
+ kTSA04MatsumotoZoomOut = 26,
+ kTSA04CastilleZoomIn = 27,
+ kTSA04CastilleSpeech = 28,
+ kTSA04CastilleZoomOut = 29,
+ kTSA05SinclairZoomIn = 30,
+ kTSA05SinclairSpeech = 31,
+ kTSA05SinclairZoomOut = 32,
+ kTSA05WhiteZoomIn = 33,
+ kTSA05WhiteSpeech = 34,
+ kTSA05WhiteZoomOut = 35,
+ kTSA0AEastRobot = 36,
+ kTSA0AWestRobot = 37,
+ kTSA16NorthRobotDeath = 38,
+ kTSA0BEastZoomIn = 39,
+ kTSA0BEastZoomedView = 40,
+ kTSA0BEastZoomOut = 41,
+ kTSA0BEastTurnLeft = 42,
+ kTSA0BComparisonStartup = 43,
+ kTSA0BComparisonView0000 = 44,
+ kTSA0BComparisonView0002 = 45,
+ kTSA0BComparisonView0020 = 46,
+ kTSA0BComparisonView0022 = 47,
+ kTSA0BComparisonView0200 = 48,
+ kTSA0BComparisonView0202 = 49,
+ kTSA0BComparisonView0220 = 50,
+ kTSA0BComparisonView0222 = 51,
+ kTSA0BComparisonView2000 = 52,
+ kTSA0BComparisonView2002 = 53,
+ kTSA0BComparisonView2020 = 54,
+ kTSA0BComparisonView2022 = 55,
+ kTSA0BComparisonView2200 = 56,
+ kTSA0BComparisonView2202 = 57,
+ kTSA0BComparisonView2220 = 58,
+ kTSA0BComparisonView2222 = 59,
+ kTSA0BNoradComparisonView = 60,
+ kTSA0BNoradUnaltered = 61,
+ kTSA0BNoradAltered = 62,
+ kTSA0BMarsComparisonView = 63,
+ kTSA0BMarsUnaltered = 64,
+ kTSA0BMarsAltered = 65,
+ kTSA0BWSCComparisonView = 66,
+ kTSA0BWSCUnaltered = 67,
+ kTSA0BWSCAltered = 68,
+ kTSA0BCaldoriaComparisonView = 69,
+ kTSA0BCaldoriaUnaltered = 70,
+ kTSA0BCaldoriaAltered = 71,
+ kTSA0BNorthZoomIn = 72,
+ kTSA0BNorthZoomedView = 73,
+ kTSA0BNorthZoomOut = 74,
+ kTSA0BNorthTurnLeft = 75,
+ kTSA0BNorthTurnRight = 76,
+ kTSA0BNorthHistLogOpen = 77,
+ kTSA0BNorthHistLogClose = 78,
+ kTSA0BNorthHistLogCloseWithLog = 79,
+ kTSA0BNorthCantChangeHistory = 80,
+ kTSA0BNorthYoureBusted = 81,
+ kTSA0BNorthFinallyHappened = 82,
+ kTSA0BShowRip1 = 83,
+ kTSA0BNorthRipView1 = 84,
+ kTSA0BShowRip2 = 85,
+ kTSA0BShowGuardRobots = 86,
+ kTSA0BAIInterruption = 87,
+ kTSA0BRobotsToCommandCenter = 88,
+ kTSA0BNorthRobotsAtCCView = 89,
+ kTSA0BNorthRobotsAtRRView = 90,
+ kTSA0BNorthRobotsAtFDView = 91,
+ kTSA0BRobotsFromCommandCenterToReadyRoom = 92,
+ kTSA0BRobotsFromReadyRoomToCommandCenter = 93,
+ kTSA0BRobotsFromCommandCenterToFrontDoor = 94,
+ kTSA0BRobotsFromFrontDoorToCommandCenter = 95,
+ kTSA0BRobotsFromFrontDoorToReadyRoom = 96,
+ kTSA0BRobotsFromReadyRoomToFrontDoor = 97,
+ kTSA0BWestZoomIn = 98,
+ kTSA0BWestZoomedView = 99,
+ kTSA0BWestZoomOut = 100,
+ kTSA0BWestTurnRight = 101,
+ kTSA0BTBPTheoryHighlight = 102,
+ kTSA0BTBPBackgroundHighlight = 103,
+ kTSA0BTBPProcedureHighlight = 104,
+ kTSA0BTBPTheory = 105,
+ kTSA0BTBPBackground = 106,
+ kTSA0BTBPProcedure = 107,
+ kTSA0BRipAlarmScreen = 108,
+ kTSA22RedEastZoomInSequence = 109,
+ kTSA22RedEastVaultViewWithKey = 110,
+ kTSA22RedEastVaultViewNoKey = 111,
+ kTSA23RedWestVaultZoomInSequence = 112,
+ kTSA23RedWestVaultViewWithChips = 113,
+ kTSA23RedWestVaultViewNoChips = 114,
+ kTSA25NorthDeniedNoKey = 115,
+ kTSA25NorthDeniedNoChip = 116,
+ kTSA25NorthPutOnSuit = 117,
+ kTSA25NorthAlreadyHaveSuit = 118,
+ kTSA25NorthDescending1 = 119,
+ kTSA25NorthDescending2 = 120,
+ kTSA37HorseToAI1 = 121,
+ kTSA37PegasusAI1 = 122,
+ kTSA37AI1ToCommissioner1 = 123,
+ kTSA37Commissioner1 = 124,
+ kTSA37Commissioner1ToZoom = 125,
+ kTSA37ZoomToPrehistoric = 126,
+ kTSA37PrehistoricToAI2 = 127,
+ kTSA37PegasusAI2 = 128,
+ kTSA37AI2ToPrehistoric = 129,
+ kTSA37PrehistoricToDepart = 130,
+ kTSA37PegasusDepart = 131,
+ kTSA37TimeJumpToPegasus = 132,
+ kTSA37RecallToDownload = 133,
+ kTSA37DownloadToColonel1 = 134,
+ kTSA37Colonel1 = 135,
+ kTSA37Colonel1ToReviewRequired = 136,
+ kTSA37ReviewRequiredToExit = 137,
+ kTSA37ExitHilited = 138,
+ kTSA37ExitToHorse = 139,
+ kTSA37HorseToColonel2 = 140,
+ kTSA37Colonel2 = 141,
+ kTSA37PegasusAI3 = 142,
+ kTSA37AI3ToHorse = 143,
+ kTSA37HorseToZoom = 144,
+ kTSA37ZoomToMainMenu = 145,
+ kTSA37MainMenuToAI4 = 146,
+ kTSA37PegasusAI4 = 147,
+ kTSA37AI4ToMainMenu = 148,
+ kTSA37JumpMenu000 = 149,
+ kTSA37JumpMenu001 = 150,
+ kTSA37JumpMenu010 = 151,
+ kTSA37JumpMenu011 = 152,
+ kTSA37JumpMenu100 = 153,
+ kTSA37JumpMenu101 = 154,
+ kTSA37JumpMenu110 = 155,
+ kTSA37JumpMenu111 = 156,
+ kTSA37JumpToWSCMenu = 157,
+ kTSA37CancelWSC = 158,
+ kTSA37JumpToWSC = 159,
+ kTSA37WSCToAI5 = 160,
+ kTSA37PegasusAI5 = 161,
+ kTSA37AI5ToWSC = 162,
+ kTSA37WSCToDepart = 163,
+ kTSA37JumpToMarsMenu = 164,
+ kTSA37CancelMars = 165,
+ kTSA37JumpToMars = 166,
+ kTSA37MarsToAI6 = 167,
+ kTSA37PegasusAI6 = 168,
+ kTSA37AI6ToMars = 169,
+ kTSA37MarsToDepart = 170,
+ kTSA37JumpToNoradMenu = 171,
+ kTSA37CancelNorad = 172,
+ kTSA37JumpToNorad = 173,
+ kTSA37NoradToAI7 = 174,
+ kTSA37PegasusAI7 = 175,
+ kTSA37AI7ToNorad = 176,
+ kTSA37NoradToDepart = 177,
+ kTSA37EnvironmentalScan = 178,
+ kTSA37DownloadToMainMenu = 179,
+ kTSA37DownloadToOpMemReview = 180,
+ kTSA37OpMemReviewToMainMenu = 181,
+ kTSA37OpMemReviewToAllClear = 182,
+ kTSA37AllClearToCongratulations = 183,
+ kTSA37Congratulations = 184,
+ kTSA37CongratulationsToExit = 185
+};
const DisplayOrder kRipTimerOrder = kMonitorLayer;
+enum {
+ kUnresolvedLeft = kNavAreaLeft + 14,
+ kUnresolvedTop = kNavAreaTop + 236,
-const CoordType kUnresolvedLeft = kNavAreaLeft + 14;
-const CoordType kUnresolvedTop = kNavAreaTop + 236;
-
-const CoordType kResolvedLeft = kNavAreaLeft + 36;
-const CoordType kResolvedTop = kNavAreaTop + 236;
+ kResolvedLeft = kNavAreaLeft + 36,
+ kResolvedTop = kNavAreaTop + 236,
-const CoordType kJumpMenuLeft = kNavAreaLeft + 360;
-const CoordType kJumpMenuTop = kNavAreaTop + 202;
+ kJumpMenuLeft = kNavAreaLeft + 360,
+ kJumpMenuTop = kNavAreaTop + 202,
-const CoordType kJumpMenuHilitedLeft = kNavAreaLeft + 354;
-const CoordType kJumpMenuHilitedTop = kNavAreaTop + 196;
+ kJumpMenuHilitedLeft = kNavAreaLeft + 354,
+ kJumpMenuHilitedTop = kNavAreaTop + 196,
-const CoordType kExitLeft = kNavAreaLeft + 360;
-const CoordType kExitTop = kNavAreaTop + 216;
+ kExitLeft = kNavAreaLeft + 360,
+ kExitTop = kNavAreaTop + 216,
-const CoordType kExitHilitedLeft = kNavAreaLeft + 354;
-const CoordType kExitHilitedTop = kNavAreaTop + 210;
+ kExitHilitedLeft = kNavAreaLeft + 354,
+ kExitHilitedTop = kNavAreaTop + 210,
-const CoordType kRipTimerLeft = kNavAreaLeft + 95;
-const CoordType kRipTimerTop = kNavAreaTop + 87;
+ kRipTimerLeft = kNavAreaLeft + 95,
+ kRipTimerTop = kNavAreaTop + 87,
-const CoordType kTBPCloseLeft = kNavAreaLeft + 30;
-const CoordType kTBPCloseTop = kNavAreaTop + 16;
+ kTBPCloseLeft = kNavAreaLeft + 30,
+ kTBPCloseTop = kNavAreaTop + 16,
-const CoordType kTBPRewindLeft = kNavAreaLeft + 86;
-const CoordType kTBPRewindTop = kNavAreaTop + 218;
+ kTBPRewindLeft = kNavAreaLeft + 86,
+ kTBPRewindTop = kNavAreaTop + 218,
-const CoordType kComparisonCloseLeft = kNavAreaLeft + 50;
-const CoordType kComparisonCloseTop = kNavAreaTop + 14;
+ kComparisonCloseLeft = kNavAreaLeft + 50,
+ kComparisonCloseTop = kNavAreaTop + 14,
-const CoordType kComparisonLeftRewindLeft = kNavAreaLeft + 96;
-const CoordType kComparisonLeftRewindTop = kNavAreaTop + 190;
+ kComparisonLeftRewindLeft = kNavAreaLeft + 96,
+ kComparisonLeftRewindTop = kNavAreaTop + 190,
-const CoordType kComparisonRightRewindLeft = kNavAreaLeft + 282;
-const CoordType kComparisonRightRewindTop = kNavAreaTop + 190;
+ kComparisonRightRewindLeft = kNavAreaLeft + 282,
+ kComparisonRightRewindTop = kNavAreaTop + 190,
-const CoordType kComparisonHiliteSpriteLeft = kNavAreaLeft + 45;
-const CoordType kComparisonHiliteSpriteTop = kNavAreaTop + 65;
+ kComparisonHiliteSpriteLeft = kNavAreaLeft + 45,
+ kComparisonHiliteSpriteTop = kNavAreaTop + 65,
-const CoordType kComparisonHiliteNoradLeft = kNavAreaLeft + 45;
-const CoordType kComparisonHiliteNoradTop = kNavAreaTop + 65;
+ kComparisonHiliteNoradLeft = kNavAreaLeft + 45,
+ kComparisonHiliteNoradTop = kNavAreaTop + 65,
-const CoordType kComparisonHiliteMarsLeft = kNavAreaLeft + 45 + 4;
-const CoordType kComparisonHiliteMarsTop = kNavAreaTop + 65 + 23;
+ kComparisonHiliteMarsLeft = kNavAreaLeft + 45 + 4,
+ kComparisonHiliteMarsTop = kNavAreaTop + 65 + 23,
-const CoordType kComparisonHiliteCaldoriaLeft = kNavAreaLeft + 45 + 7;
-const CoordType kComparisonHiliteCaldoriaTop = kNavAreaTop + 65 + 46;
+ kComparisonHiliteCaldoriaLeft = kNavAreaLeft + 45 + 7,
+ kComparisonHiliteCaldoriaTop = kNavAreaTop + 65 + 46,
-const CoordType kComparisonHiliteWSCLeft = kNavAreaLeft + 45 + 11;
-const CoordType kComparisonHiliteWSCTop = kNavAreaTop + 65 + 68;
+ kComparisonHiliteWSCLeft = kNavAreaLeft + 45 + 11,
+ kComparisonHiliteWSCTop = kNavAreaTop + 65 + 68,
-const CoordType kComparisonChancesSpriteLeft = kNavAreaLeft + 148;
-const CoordType kComparisonChancesSpriteTop = kNavAreaTop + 162;
+ kComparisonChancesSpriteLeft = kNavAreaLeft + 148,
+ kComparisonChancesSpriteTop = kNavAreaTop + 162,
-const CoordType kComparisonChancesNoradLeft = kNavAreaLeft + 148;
-const CoordType kComparisonChancesNoradTop = kNavAreaTop + 162;
+ kComparisonChancesNoradLeft = kNavAreaLeft + 148,
+ kComparisonChancesNoradTop = kNavAreaTop + 162,
-const CoordType kComparisonChancesMarsLeft = kNavAreaLeft + 148;
-const CoordType kComparisonChancesMarsTop = kNavAreaTop + 162;
+ kComparisonChancesMarsLeft = kNavAreaLeft + 148,
+ kComparisonChancesMarsTop = kNavAreaTop + 162,
-const CoordType kComparisonChancesCaldoriaLeft = kNavAreaLeft + 148;
-const CoordType kComparisonChancesCaldoriaTop = kNavAreaTop + 162 + 1;
+ kComparisonChancesCaldoriaLeft = kNavAreaLeft + 148,
+ kComparisonChancesCaldoriaTop = kNavAreaTop + 162 + 1,
-const CoordType kComparisonChancesWSCLeft = kNavAreaLeft + 148;
-const CoordType kComparisonChancesWSCTop = kNavAreaTop + 162;
+ kComparisonChancesWSCLeft = kNavAreaLeft + 148,
+ kComparisonChancesWSCTop = kNavAreaTop + 162,
-const CoordType kRedirectionSprite1Left = kNavAreaLeft + 58;
-const CoordType kRedirectionSprite1Top = kNavAreaTop + 16;
+ kRedirectionSprite1Left = kNavAreaLeft + 58,
+ kRedirectionSprite1Top = kNavAreaTop + 16,
-const CoordType kRedirectionSprite2Left = kNavAreaLeft + 36;
-const CoordType kRedirectionSprite2Top = kNavAreaTop + 166;
+ kRedirectionSprite2Left = kNavAreaLeft + 36,
+ kRedirectionSprite2Top = kNavAreaTop + 166,
-const CoordType kRedirectionCCRolloverLeft = kNavAreaLeft + 58;
-const CoordType kRedirectionCCRolloverTop = kNavAreaTop + 16;
+ kRedirectionCCRolloverLeft = kNavAreaLeft + 58,
+ kRedirectionCCRolloverTop = kNavAreaTop + 16,
-const CoordType kRedirectionRRRolloverLeft = kNavAreaLeft + 430;
-const CoordType kRedirectionRRRolloverTop = kNavAreaTop + 30;
+ kRedirectionRRRolloverLeft = kNavAreaLeft + 430,
+ kRedirectionRRRolloverTop = kNavAreaTop + 30,
-const CoordType kRedirectionFDRolloverLeft = kNavAreaLeft + 278;
-const CoordType kRedirectionFDRolloverTop = kNavAreaTop + 160;
+ kRedirectionFDRolloverLeft = kNavAreaLeft + 278,
+ kRedirectionFDRolloverTop = kNavAreaTop + 160,
-const CoordType kRedirectionCCDoorLeft = kNavAreaLeft + 174;
-const CoordType kRedirectionCCDoorTop = kNavAreaTop + 36;
+ kRedirectionCCDoorLeft = kNavAreaLeft + 174,
+ kRedirectionCCDoorTop = kNavAreaTop + 36,
-const CoordType kRedirectionRRDoorLeft = kNavAreaLeft + 418;
-const CoordType kRedirectionRRDoorTop = kNavAreaTop + 32;
+ kRedirectionRRDoorLeft = kNavAreaLeft + 418,
+ kRedirectionRRDoorTop = kNavAreaTop + 32,
-const CoordType kRedirectionFDDoorLeft = kNavAreaLeft + 298;
-const CoordType kRedirectionFDDoorTop = kNavAreaTop + 240;
+ kRedirectionFDDoorLeft = kNavAreaLeft + 298,
+ kRedirectionFDDoorTop = kNavAreaTop + 240,
-const CoordType kRedirectionSecuredLeft = kNavAreaLeft + 36;
-const CoordType kRedirectionSecuredTop = kNavAreaTop + 166;
+ kRedirectionSecuredLeft = kNavAreaLeft + 36,
+ kRedirectionSecuredTop = kNavAreaTop + 166,
-const CoordType kRedirectionNewTargetLeft = kNavAreaLeft + 36;
-const CoordType kRedirectionNewTargetTop = kNavAreaTop + 166;
+ kRedirectionNewTargetLeft = kNavAreaLeft + 36,
+ kRedirectionNewTargetTop = kNavAreaTop + 166,
-const CoordType kRedirectionCloseLeft = kNavAreaLeft + 56;
-const CoordType kRedirectionCloseTop = kNavAreaTop + 220;
+ kRedirectionCloseLeft = kNavAreaLeft + 56,
+ kRedirectionCloseTop = kNavAreaTop + 220
+};
static const TimeValue kTSABumpIntoWallIn = 0;
static const TimeValue kTSABumpIntoWallOut = 148;
@@ -516,10 +529,12 @@ static const TimeValue kTSAVaultCloseOut = 5388;
static const TimeValue kTSAPegasusDoorCloseIn = 5388;
static const TimeValue kTSAPegasusDoorCloseOut = 6457;
-static const bool kPegasusUnresolved = false;
-static const bool kPegasusResolved = true;
-static const bool kPegasusCantExit = false;
-static const bool kPegasusCanExit = true;
+enum {
+ kPegasusUnresolved = false,
+ kPegasusResolved = true,
+ kPegasusCantExit = false,
+ kPegasusCanExit = true
+};
// Monitor modes
enum {
@@ -582,15 +597,17 @@ static const ExtraID s_historicalLogViews[16] = {
kTSA0BComparisonView2222
};
-static const int kRedirectionCCRolloverSprite = 0;
-static const int kRedirectionRRRolloverSprite = 1;
-static const int kRedirectionFDRolloverSprite = 2;
-static const int kRedirectionCCDoorSprite = 3;
-static const int kRedirectionRRDoorSprite = 4;
-static const int kRedirectionFDDoorSprite = 5;
-static const int kRedirectionCloseSprite = 6;
-static const int kRedirectionSecuredSprite = 0;
-static const int kRedirectionNewTargetSprite = 1;
+enum {
+ kRedirectionCCRolloverSprite = 0,
+ kRedirectionRRRolloverSprite = 1,
+ kRedirectionFDRolloverSprite = 2,
+ kRedirectionCCDoorSprite = 3,
+ kRedirectionRRDoorSprite = 4,
+ kRedirectionFDDoorSprite = 5,
+ kRedirectionCloseSprite = 6,
+ kRedirectionSecuredSprite = 0,
+ kRedirectionNewTargetSprite = 1
+};
void RipTimer::initImage() {
_middle = -1;
diff --git a/engines/pegasus/neighborhood/tsa/tinytsa.cpp b/engines/pegasus/neighborhood/tsa/tinytsa.cpp
index c808325b0f..0c29e06f41 100644
--- a/engines/pegasus/neighborhood/tsa/tinytsa.cpp
+++ b/engines/pegasus/neighborhood/tsa/tinytsa.cpp
@@ -38,71 +38,81 @@ namespace Pegasus {
static const int16 kCompassShift = 30;
-static const TimeScale kTinyTSAMovieScale = 600;
-static const TimeScale kTinyTSAFramesPerSecond = 15;
-static const TimeScale kTinyTSAFrameDuration = 40;
+enum {
+ kTinyTSAMovieScale = 600,
+ kTinyTSAFramesPerSecond = 15,
+ kTinyTSAFrameDuration = 40
+};
// Alternate IDs.
-static const AlternateID kAltTinyTSANormal = 0;
+enum {
+ kAltTinyTSANormal = 0
+};
// Hot Spot Activation IDs.
-static const HotSpotActivationID kActivationTinyTSAJumpToNorad = 1;
-static const HotSpotActivationID kActivationTinyTSAJumpToMars = 2;
-static const HotSpotActivationID kActivationTinyTSAJumpToWSC = 3;
-static const HotSpotActivationID kActivationTinyTSAReadyForJumpMenu = 4;
-static const HotSpotActivationID kActivationTinyTSAMainJumpMenu = 5;
+enum {
+ kActivationTinyTSAJumpToNorad = 1,
+ kActivationTinyTSAJumpToMars = 2,
+ kActivationTinyTSAJumpToWSC = 3,
+ kActivationTinyTSAReadyForJumpMenu = 4,
+ kActivationTinyTSAMainJumpMenu = 5
+};
// Hot Spot IDs.
-static const HotSpotID kTinyTSA37NorthJumpToNoradSpotID = 5000;
-static const HotSpotID kTinyTSA37NorthCancelNoradSpotID = 5001;
-static const HotSpotID kTinyTSA37NorthJumpToMarsSpotID = 5002;
-static const HotSpotID kTinyTSA37NorthCancelMarsSpotID = 5003;
-static const HotSpotID kTinyTSA37NorthJumpToWSCSpotID = 5004;
-static const HotSpotID kTinyTSA37NorthCancelWSCSpotID = 5005;
-static const HotSpotID kTinyTSA37NorthJumpMenuSpotID = 5006;
-static const HotSpotID kTinyTSA37NorthNoradMenuSpotID = 5007;
-static const HotSpotID kTinyTSA37NorthMarsMenuSpotID = 5008;
-static const HotSpotID kTinyTSA37NorthWSCMenuSpotID = 5009;
+enum {
+ kTinyTSA37NorthJumpToNoradSpotID = 5000,
+ kTinyTSA37NorthCancelNoradSpotID = 5001,
+ kTinyTSA37NorthJumpToMarsSpotID = 5002,
+ kTinyTSA37NorthCancelMarsSpotID = 5003,
+ kTinyTSA37NorthJumpToWSCSpotID = 5004,
+ kTinyTSA37NorthCancelWSCSpotID = 5005,
+ kTinyTSA37NorthJumpMenuSpotID = 5006,
+ kTinyTSA37NorthNoradMenuSpotID = 5007,
+ kTinyTSA37NorthMarsMenuSpotID = 5008,
+ kTinyTSA37NorthWSCMenuSpotID = 5009
+};
// Extra sequence IDs.
-static const ExtraID kTinyTSA37PegasusDepart = 0;
-static const ExtraID kTinyTSA37TimeJumpToPegasus = 1;
-static const ExtraID kTinyTSA37RecallToDownload = 2;
-static const ExtraID kTinyTSA37ExitHilited = 3;
-static const ExtraID kTinyTSA37ExitToHorse = 4;
-static const ExtraID kTinyTSA37JumpMenu000 = 5;
-static const ExtraID kTinyTSA37JumpMenu001 = 6;
-static const ExtraID kTinyTSA37JumpMenu010 = 7;
-static const ExtraID kTinyTSA37JumpMenu011 = 8;
-static const ExtraID kTinyTSA37JumpMenu100 = 9;
-static const ExtraID kTinyTSA37JumpMenu101 = 10;
-static const ExtraID kTinyTSA37JumpMenu110 = 11;
-static const ExtraID kTinyTSA37JumpMenu111 = 12;
-static const ExtraID kTinyTSA37JumpToWSCMenu = 13;
-static const ExtraID kTinyTSA37CancelWSC = 14;
-static const ExtraID kTinyTSA37JumpToWSC = 15;
-static const ExtraID kTinyTSA37WSCToAI5 = 16;
-static const ExtraID kTinyTSA37PegasusAI5 = 17;
-static const ExtraID kTinyTSA37AI5ToWSC = 18;
-static const ExtraID kTinyTSA37WSCToDepart = 19;
-static const ExtraID kTinyTSA37JumpToMarsMenu = 20;
-static const ExtraID kTinyTSA37CancelMars = 21;
-static const ExtraID kTinyTSA37JumpToMars = 22;
-static const ExtraID kTinyTSA37MarsToAI6 = 23;
-static const ExtraID kTinyTSA37PegasusAI6 = 24;
-static const ExtraID kTinyTSA37AI6ToMars = 25;
-static const ExtraID kTinyTSA37MarsToDepart = 26;
-static const ExtraID kTinyTSA37JumpToNoradMenu = 27;
-static const ExtraID kTinyTSA37CancelNorad = 28;
-static const ExtraID kTinyTSA37JumpToNorad = 29;
-static const ExtraID kTinyTSA37NoradToAI7 = 30;
-static const ExtraID kTinyTSA37PegasusAI7 = 31;
-static const ExtraID kTinyTSA37AI7ToNorad = 32;
-static const ExtraID kTinyTSA37NoradToDepart = 33;
-static const ExtraID kTinyTSA37EnvironmentalScan = 34;
-static const ExtraID kTinyTSA37DownloadToMainMenu = 35;
-static const ExtraID kTinyTSA37DownloadToOpMemReview = 36;
-static const ExtraID kTinyTSA37OpMemReviewToMainMenu = 37;
+enum {
+ kTinyTSA37PegasusDepart = 0,
+ kTinyTSA37TimeJumpToPegasus = 1,
+ kTinyTSA37RecallToDownload = 2,
+ kTinyTSA37ExitHilited = 3,
+ kTinyTSA37ExitToHorse = 4,
+ kTinyTSA37JumpMenu000 = 5,
+ kTinyTSA37JumpMenu001 = 6,
+ kTinyTSA37JumpMenu010 = 7,
+ kTinyTSA37JumpMenu011 = 8,
+ kTinyTSA37JumpMenu100 = 9,
+ kTinyTSA37JumpMenu101 = 10,
+ kTinyTSA37JumpMenu110 = 11,
+ kTinyTSA37JumpMenu111 = 12,
+ kTinyTSA37JumpToWSCMenu = 13,
+ kTinyTSA37CancelWSC = 14,
+ kTinyTSA37JumpToWSC = 15,
+ kTinyTSA37WSCToAI5 = 16,
+ kTinyTSA37PegasusAI5 = 17,
+ kTinyTSA37AI5ToWSC = 18,
+ kTinyTSA37WSCToDepart = 19,
+ kTinyTSA37JumpToMarsMenu = 20,
+ kTinyTSA37CancelMars = 21,
+ kTinyTSA37JumpToMars = 22,
+ kTinyTSA37MarsToAI6 = 23,
+ kTinyTSA37PegasusAI6 = 24,
+ kTinyTSA37AI6ToMars = 25,
+ kTinyTSA37MarsToDepart = 26,
+ kTinyTSA37JumpToNoradMenu = 27,
+ kTinyTSA37CancelNorad = 28,
+ kTinyTSA37JumpToNorad = 29,
+ kTinyTSA37NoradToAI7 = 30,
+ kTinyTSA37PegasusAI7 = 31,
+ kTinyTSA37AI7ToNorad = 32,
+ kTinyTSA37NoradToDepart = 33,
+ kTinyTSA37EnvironmentalScan = 34,
+ kTinyTSA37DownloadToMainMenu = 35,
+ kTinyTSA37DownloadToOpMemReview = 36,
+ kTinyTSA37OpMemReviewToMainMenu = 37
+};
TinyTSA::TinyTSA(InputHandler *nextHandler, PegasusEngine *owner) : Neighborhood(nextHandler, owner, "Tiny TSA", kTinyTSAID) {
}
diff --git a/engines/pegasus/neighborhood/wsc/wsc.cpp b/engines/pegasus/neighborhood/wsc/wsc.cpp
index f009b35cdc..5e35d8ccc1 100644
--- a/engines/pegasus/neighborhood/wsc/wsc.cpp
+++ b/engines/pegasus/neighborhood/wsc/wsc.cpp
@@ -87,81 +87,85 @@ static const int kTimerEventPlasmaHit = 0;
static const int kTimerEventPlayerGawkingAtRobot = 1;
static const int kTimerEventPlayerGawkingAtRobot2 = 2;
-static const TimeValue kWSCMolecule1In = 0;
-static const TimeValue kWSCMolecule1Out = 937;
+enum {
+ kWSCMolecule1In = 0,
+ kWSCMolecule1Out = 937,
-static const TimeValue kWSCMolecule2In = 937;
-static const TimeValue kWSCMolecule2Out = 1864;
+ kWSCMolecule2In = 937,
+ kWSCMolecule2Out = 1864,
-static const TimeValue kWSCMolecule3In = 1864;
-static const TimeValue kWSCMolecule3Out = 2790;
+ kWSCMolecule3In = 1864,
+ kWSCMolecule3Out = 2790,
-static const TimeValue kWSCClick1In = 2790;
-static const TimeValue kWSCClick1Out = 2890;
+ kWSCClick1In = 2790,
+ kWSCClick1Out = 2890,
-static const TimeValue kWSCClick2In = 2890;
-static const TimeValue kWSCClick2Out = 3059;
+ kWSCClick2In = 2890,
+ kWSCClick2Out = 3059,
-static const TimeValue kWSCClick3In = 3059;
-static const TimeValue kWSCClick3Out = 3156;
+ kWSCClick3In = 3059,
+ kWSCClick3Out = 3156,
-static const TimeValue kWSCFlashlightClickIn = 3156;
-static const TimeValue kWSCFlashlightClickOut = 3211;
+ kWSCFlashlightClickIn = 3156,
+ kWSCFlashlightClickOut = 3211,
-static const TimeValue kWSCBumpIntoWallIn = 3211;
-static const TimeValue kWSCBumpIntoWallOut = 3514;
+ kWSCBumpIntoWallIn = 3211,
+ kWSCBumpIntoWallOut = 3514,
-static const TimeValue kWSCCantTransportIn = 3514;
-static const TimeValue kWSCCantTransportOut = 7791;
+ kWSCCantTransportIn = 3514,
+ kWSCCantTransportOut = 7791,
-static const TimeValue kHernandezNotHomeIn = 7791;
-static const TimeValue kHernandezNotHomeOut = 10199;
+ kHernandezNotHomeIn = 7791,
+ kHernandezNotHomeOut = 10199,
-static const TimeValue kWashingtonNotHomeIn = 10199;
-static const TimeValue kWashingtonNotHomeOut = 12649;
+ kWashingtonNotHomeIn = 10199,
+ kWashingtonNotHomeOut = 12649,
-static const TimeValue kSullivanNotHomeIn = 12649;
-static const TimeValue kSullivanNotHomeOut = 15031;
+ kSullivanNotHomeIn = 12649,
+ kSullivanNotHomeOut = 15031,
-static const TimeValue kNakamuraNotHomeIn = 15031;
-static const TimeValue kNakamuraNotHomeOut = 17545;
+ kNakamuraNotHomeIn = 15031,
+ kNakamuraNotHomeOut = 17545,
-static const TimeValue kGrailisNotHomeIn = 17545;
-static const TimeValue kGrailisNotHomeOut = 19937;
+ kGrailisNotHomeIn = 17545,
+ kGrailisNotHomeOut = 19937,
-static const TimeValue kTheriaultNotHomeIn = 19937;
-static const TimeValue kTheriaultNotHomeOut = 22395;
+ kTheriaultNotHomeIn = 19937,
+ kTheriaultNotHomeOut = 22395,
-static const TimeValue kGlennerNotHomeIn = 22395;
-static const TimeValue kGlennerNotHomeOut = 24770;
+ kGlennerNotHomeIn = 22395,
+ kGlennerNotHomeOut = 24770,
-static const TimeValue kSinclairNotHomeIn = 24770;
-static const TimeValue kSinclairNotHomeOut = 27328;
+ kSinclairNotHomeIn = 24770,
+ kSinclairNotHomeOut = 27328,
-static const TimeValue kWSCLabClosedIn = 27328;
-static const TimeValue kWSCLabClosedOut = 28904;
+ kWSCLabClosedIn = 27328,
+ kWSCLabClosedOut = 28904,
-static const TimeValue kSlidingDoorCloseIn = 28904;
-static const TimeValue kSlidingDoorCloseOut = 29295;
+ kSlidingDoorCloseIn = 28904,
+ kSlidingDoorCloseOut = 29295,
-static const TimeValue kSlimyDoorCloseIn = 29295;
-static const TimeValue kSlimyDoorCloseOut = 29788;
+ kSlimyDoorCloseIn = 29295,
+ kSlimyDoorCloseOut = 29788,
-static const TimeValue kPaging1In = 29788;
-static const TimeValue kPaging1Out = 32501;
+ kPaging1In = 29788,
+ kPaging1Out = 32501,
-static const TimeValue kPaging2In = 32501;
-static const TimeValue kPaging2Out = 34892;
+ kPaging2In = 32501,
+ kPaging2Out = 34892,
-static const TimeValue kCheckInIn = 34892;
-static const TimeValue kCheckInOut = 37789;
+ kCheckInIn = 34892,
+ kCheckInOut = 37789,
-static const TimeValue kDrinkAntidoteIn = 37789;
-static const TimeValue kDrinkAntidoteOut = 39725;
+ kDrinkAntidoteIn = 37789,
+ kDrinkAntidoteOut = 39725
+};
-static const TimeScale kWSCMovieScale = 600;
-static const TimeScale kWSCFramesPerSecond = 15;
-static const TimeScale kWSCFrameDuration = 40;
+enum {
+ kWSCMovieScale = 600,
+ kWSCFramesPerSecond = 15,
+ kWSCFrameDuration = 40
+};
// Alternate IDs.
static const AlternateID kAltWSCNormal = 0;
@@ -170,304 +174,312 @@ static const AlternateID kAltWSCW0ZDoorOpen = 2;
static const AlternateID kAltWSCPeopleAtW19North = 3;
// Room IDs.
-static const RoomID kWSC02 = 1;
-static const RoomID kWSC03 = 4;
-static const RoomID kWSC04 = 5;
-static const RoomID kWSC06 = 6;
-static const RoomID kWSC07 = 7;
-static const RoomID kWSC08 = 8;
-static const RoomID kWSC09 = 9;
-static const RoomID kWSC10 = 10;
-static const RoomID kWSC11 = 11;
-static const RoomID kWSC13 = 12;
-static const RoomID kWSC14 = 13;
-static const RoomID kWSC15 = 14;
-static const RoomID kWSC16 = 15;
-static const RoomID kWSC17 = 16;
-static const RoomID kWSC18 = 17;
-static const RoomID kWSC19 = 18;
-static const RoomID kWSC20 = 19;
-static const RoomID kWSC21 = 20;
-static const RoomID kWSC22 = 21;
-static const RoomID kWSC23 = 22;
-static const RoomID kWSC24 = 23;
-static const RoomID kWSC25 = 24;
-static const RoomID kWSC26 = 25;
-static const RoomID kWSC27 = 26;
-static const RoomID kWSC28 = 27;
-static const RoomID kWSC29 = 28;
-static const RoomID kWSC31 = 29;
-static const RoomID kWSC32 = 30;
-static const RoomID kWSC33 = 31;
-static const RoomID kWSC34 = 32;
-static const RoomID kWSC35 = 33;
-static const RoomID kWSC36 = 34;
-static const RoomID kWSC37 = 35;
-static const RoomID kWSC38 = 36;
-static const RoomID kWSC39 = 37;
-static const RoomID kWSC40 = 38;
-static const RoomID kWSC41 = 39;
-static const RoomID kWSC42 = 40;
-static const RoomID kWSC43 = 41;
-static const RoomID kWSC44 = 42;
-static const RoomID kWSC45 = 43;
-static const RoomID kWSC46 = 44;
-static const RoomID kWSC47 = 45;
-static const RoomID kWSC48 = 46;
-static const RoomID kWSC49 = 47;
-static const RoomID kWSC50 = 48;
-static const RoomID kWSC52 = 49;
-static const RoomID kWSC53 = 50;
-static const RoomID kWSC54 = 51;
-static const RoomID kWSC55 = 52;
-static const RoomID kWSC56 = 53;
-static const RoomID kWSC57 = 54;
-static const RoomID kWSC58 = 55;
-static const RoomID kWSC60 = 56;
-static const RoomID kWSC60East = 57;
-static const RoomID kWSC60North = 58;
-static const RoomID kWSC61 = 59;
-static const RoomID kWSC61South = 60;
-static const RoomID kWSC61West = 61;
-static const RoomID kWSC63 = 63;
-static const RoomID kWSC64 = 64;
-static const RoomID kWSC65 = 65;
-static const RoomID kWSC65Screen = 66;
-static const RoomID kWSC66 = 67;
-static const RoomID kWSC67 = 68;
-static const RoomID kWSC68 = 69;
-static const RoomID kWSC69 = 70;
-static const RoomID kWSC70 = 71;
-static const RoomID kWSC71 = 72;
-static const RoomID kWSC72 = 73;
-static const RoomID kWSC73 = 74;
-static const RoomID kWSC74 = 75;
-static const RoomID kWSC75 = 76;
-static const RoomID kWSC0Z = 77;
-static const RoomID kWSC76 = 78;
-static const RoomID kWSC77 = 79;
-static const RoomID kWSC78 = 80;
-static const RoomID kWSC79 = 81;
-static const RoomID kWSC80 = 82;
-static const RoomID kWSC81 = 83;
-static const RoomID kWSC82 = 84;
-static const RoomID kWSC83 = 85;
-static const RoomID kWSC84 = 86;
-static const RoomID kWSC85 = 87;
-static const RoomID kWSC86 = 88;
-static const RoomID kWSC87 = 89;
-static const RoomID kWSC88 = 90;
-static const RoomID kWSC89 = 91;
-static const RoomID kWSC90 = 92;
-static const RoomID kWSC91 = 93;
-static const RoomID kWSC92 = 94;
-static const RoomID kWSC93 = 95;
-static const RoomID kWSC94 = 96;
-static const RoomID kWSC95 = 97;
-static const RoomID kWSC96 = 98;
-static const RoomID kWSC97 = 99;
-static const RoomID kWSC98 = 100;
-static const RoomID kWSCDeathRoom = 101;
+enum {
+ kWSC02 = 1,
+ kWSC03 = 4,
+ kWSC04 = 5,
+ kWSC06 = 6,
+ kWSC07 = 7,
+ kWSC08 = 8,
+ kWSC09 = 9,
+ kWSC10 = 10,
+ kWSC11 = 11,
+ kWSC13 = 12,
+ kWSC14 = 13,
+ kWSC15 = 14,
+ kWSC16 = 15,
+ kWSC17 = 16,
+ kWSC18 = 17,
+ kWSC19 = 18,
+ kWSC20 = 19,
+ kWSC21 = 20,
+ kWSC22 = 21,
+ kWSC23 = 22,
+ kWSC24 = 23,
+ kWSC25 = 24,
+ kWSC26 = 25,
+ kWSC27 = 26,
+ kWSC28 = 27,
+ kWSC29 = 28,
+ kWSC31 = 29,
+ kWSC32 = 30,
+ kWSC33 = 31,
+ kWSC34 = 32,
+ kWSC35 = 33,
+ kWSC36 = 34,
+ kWSC37 = 35,
+ kWSC38 = 36,
+ kWSC39 = 37,
+ kWSC40 = 38,
+ kWSC41 = 39,
+ kWSC42 = 40,
+ kWSC43 = 41,
+ kWSC44 = 42,
+ kWSC45 = 43,
+ kWSC46 = 44,
+ kWSC47 = 45,
+ kWSC48 = 46,
+ kWSC49 = 47,
+ kWSC50 = 48,
+ kWSC52 = 49,
+ kWSC53 = 50,
+ kWSC54 = 51,
+ kWSC55 = 52,
+ kWSC56 = 53,
+ kWSC57 = 54,
+ kWSC58 = 55,
+ kWSC60 = 56,
+ kWSC60East = 57,
+ kWSC60North = 58,
+ kWSC61 = 59,
+ kWSC61South = 60,
+ kWSC61West = 61,
+ kWSC63 = 63,
+ kWSC64 = 64,
+ kWSC65 = 65,
+ kWSC65Screen = 66,
+ kWSC66 = 67,
+ kWSC67 = 68,
+ kWSC68 = 69,
+ kWSC69 = 70,
+ kWSC70 = 71,
+ kWSC71 = 72,
+ kWSC72 = 73,
+ kWSC73 = 74,
+ kWSC74 = 75,
+ kWSC75 = 76,
+ kWSC0Z = 77,
+ kWSC76 = 78,
+ kWSC77 = 79,
+ kWSC78 = 80,
+ kWSC79 = 81,
+ kWSC80 = 82,
+ kWSC81 = 83,
+ kWSC82 = 84,
+ kWSC83 = 85,
+ kWSC84 = 86,
+ kWSC85 = 87,
+ kWSC86 = 88,
+ kWSC87 = 89,
+ kWSC88 = 90,
+ kWSC89 = 91,
+ kWSC90 = 92,
+ kWSC91 = 93,
+ kWSC92 = 94,
+ kWSC93 = 95,
+ kWSC94 = 96,
+ kWSC95 = 97,
+ kWSC96 = 98,
+ kWSC97 = 99,
+ kWSC98 = 100,
+ kWSCDeathRoom = 101
+};
// Hot Spot Activation IDs.
-static const HotSpotActivationID kActivationZoomedInToAnalyzer = 1;
-static const HotSpotActivationID kActivationShotByRobot = 2;
-static const HotSpotActivationID kActivationWarnedAboutPoison = 3;
-static const HotSpotActivationID kActivationMorphScreenOff = 4;
-static const HotSpotActivationID kActivationReadyForMorph = 5;
-static const HotSpotActivationID kActivationMorphLooping = 6;
-static const HotSpotActivationID kActivationMorphInterrupted = 7;
-static const HotSpotActivationID kActivationW03NorthOff = 8;
-static const HotSpotActivationID kActivationW03NorthReadyForInstructions = 9;
-static const HotSpotActivationID kActivationW03NorthSawInstructions = 10;
-static const HotSpotActivationID kActivationW03NorthInGame = 11;
-static const HotSpotActivationID kActivationReadyForSynthesis = 12;
-static const HotSpotActivationID kActivationSynthesizerLooping = 13;
-static const HotSpotActivationID kActivationReadyForMap = 14;
-static const HotSpotActivationID kActivationSinclairOfficeLocked = 15;
-static const HotSpotActivationID kActivationW58SouthDoorLocked = 16;
-static const HotSpotActivationID kActivationW61SouthOff = 17;
-static const HotSpotActivationID kActivationW61SouthOn = 18;
-static const HotSpotActivationID kActivationW61MessagesOff = 19;
-static const HotSpotActivationID kActivationW61MessagesOn = 20;
-static const HotSpotActivationID kActivationWSCRobotHeadOpen = 21;
-static const HotSpotActivationID kActivationRobotTurning = 22;
-static const HotSpotActivationID kActivationRobotDead = 23;
-static const HotSpotActivationID kActivationRobotGone = 24;
+enum {
+ kActivationZoomedInToAnalyzer = 1,
+ kActivationShotByRobot = 2,
+ kActivationWarnedAboutPoison = 3,
+ kActivationMorphScreenOff = 4,
+ kActivationReadyForMorph = 5,
+ kActivationMorphLooping = 6,
+ kActivationMorphInterrupted = 7,
+ kActivationW03NorthOff = 8,
+ kActivationW03NorthReadyForInstructions = 9,
+ kActivationW03NorthSawInstructions = 10,
+ kActivationW03NorthInGame = 11,
+ kActivationReadyForSynthesis = 12,
+ kActivationSynthesizerLooping = 13,
+ kActivationReadyForMap = 14,
+ kActivationSinclairOfficeLocked = 15,
+ kActivationW58SouthDoorLocked = 16,
+ kActivationW61SouthOff = 17,
+ kActivationW61SouthOn = 18,
+ kActivationW61MessagesOff = 19,
+ kActivationW61MessagesOn = 20,
+ kActivationWSCRobotHeadOpen = 21,
+ kActivationRobotTurning = 22,
+ kActivationRobotDead = 23,
+ kActivationRobotGone = 24
+};
// Hot Spot IDs.
-static const HotSpotID kWSCDropDartSpotID = 5000;
-static const HotSpotID kWSCTurnOnAnalyzerSpotID = 5001;
-static const HotSpotID kWSCAnalyzerScreenSpotID = 5002;
-static const HotSpotID kWSCSpinRobotSpotID = 5003;
-static const HotSpotID kWSC01YesSpotID = 5004;
-static const HotSpotID kWSC01NoSpotID = 5005;
-static const HotSpotID kWSC01AcknowledgeWarningSpotID = 5006;
-static const HotSpotID kWSC02SouthMorphSpotID = 5007;
-static const HotSpotID kWSC02SouthMessagesSpotID = 5008;
-static const HotSpotID kWSC02SouthMorphOutSpotID = 5009;
-static const HotSpotID kWSC02ActivateMorphScreenSpotID = 5010;
-static const HotSpotID kWSC02SouthStartMorphSpotID = 5011;
-static const HotSpotID kWSC02SouthInterruptMorphSpotID = 5012;
-static const HotSpotID kWSC02SouthMorphFinishedSpotID = 5013;
-static const HotSpotID kWSC02SouthTakeArgonSpotID = 5014;
-static const HotSpotID kWSC02SouthMessagesOutSpotID = 5015;
-static const HotSpotID kWSC02SouthTakeNitrogenSpotID = 5016;
-static const HotSpotID kWSC02SouthPlayMessagesSpotID = 5017;
-static const HotSpotID kWSC03NorthActivateScreenSpotID = 5018;
-static const HotSpotID kWSC03NorthBuildMoleculeSpotID = 5019;
-static const HotSpotID kWSC03NorthProceedSpotID = 5020;
-static const HotSpotID kWSC03NorthMolecule1SpotID = 5021;
-static const HotSpotID kWSC03NorthMolecule2SpotID = 5022;
-static const HotSpotID kWSC03NorthMolecule3SpotID = 5023;
-static const HotSpotID kWSC03NorthMolecule4SpotID = 5024;
-static const HotSpotID kWSC03NorthMolecule5SpotID = 5025;
-static const HotSpotID kWSC03NorthMolecule6SpotID = 5026;
-static const HotSpotID kWSC03SouthActivateSynthesizerSpotID = 5027;
-static const HotSpotID kWSC03SouthPickUpAntidoteSpotID = 5028;
-static const HotSpotID kWSC07SouthMapSpotID = 5029;
-static const HotSpotID kW42EastUnlockDoorSpotID = 5030;
-static const HotSpotID kW56NorthMapSpotID = 5031;
-static const HotSpotID kW58SouthPryDoorSpotID = 5032;
-static const HotSpotID kWSC60EastSpotID = 5033;
-static const HotSpotID kWSC60NorthSpotID = 5034;
-static const HotSpotID kWSC60EastOutSpotID = 5035;
-static const HotSpotID kWSC60NorthOutSpotID = 5036;
-static const HotSpotID kWSC61EastSpotID = 5037;
-static const HotSpotID kWSC61SouthSpotID = 5038;
-static const HotSpotID kW61SouthMachineGunSpotID = 5039;
-static const HotSpotID kW61SouthDropMachineGunSpotID = 5040;
-static const HotSpotID kWSC61WestSpotID = 5041;
-static const HotSpotID kWSC61SouthOutSpotID = 5042;
-static const HotSpotID kW61SouthActivateSpotID = 5043;
-static const HotSpotID kW61SmartAlloysSpotID = 5044;
-static const HotSpotID kW61MorphingSpotID = 5045;
-static const HotSpotID kW61TimeBendingSpotID = 5046;
-static const HotSpotID kWSC61WestOutSpotID = 5047;
-static const HotSpotID kW61TurnOnMessagesSpotID = 5048;
-static const HotSpotID kW61WhiteMessageSpotID = 5049;
-static const HotSpotID kW61WalchekMessageSpotID = 5050;
-static const HotSpotID kWSC65SouthScreenSpotID = 5051;
-static const HotSpotID kWSC65SouthScreenOutSpotID = 5052;
-static const HotSpotID kW98RetinalChipSpotID = 5053;
-static const HotSpotID kW98MapChipSpotID = 5054;
-static const HotSpotID kW98OpticalChipSpotID = 5055;
-static const HotSpotID kW98DropArgonSpotID = 5056;
-static const HotSpotID kW98GrabCableSpotID = 5057;
-static const HotSpotID kW98OpenRobotSpotID = 5058;
-static const HotSpotID kW98StunGunSpotID = 5059;
+enum {
+ kWSCDropDartSpotID = 5000,
+ kWSCTurnOnAnalyzerSpotID = 5001,
+ kWSCAnalyzerScreenSpotID = 5002,
+ kWSCSpinRobotSpotID = 5003,
+ kWSC01YesSpotID = 5004,
+ kWSC01NoSpotID = 5005,
+ kWSC01AcknowledgeWarningSpotID = 5006,
+ kWSC02SouthMorphSpotID = 5007,
+ kWSC02SouthMessagesSpotID = 5008,
+ kWSC02SouthMorphOutSpotID = 5009,
+ kWSC02ActivateMorphScreenSpotID = 5010,
+ kWSC02SouthStartMorphSpotID = 5011,
+ kWSC02SouthInterruptMorphSpotID = 5012,
+ kWSC02SouthMorphFinishedSpotID = 5013,
+ kWSC02SouthTakeArgonSpotID = 5014,
+ kWSC02SouthMessagesOutSpotID = 5015,
+ kWSC02SouthTakeNitrogenSpotID = 5016,
+ kWSC02SouthPlayMessagesSpotID = 5017,
+ kWSC03NorthActivateScreenSpotID = 5018,
+ kWSC03NorthBuildMoleculeSpotID = 5019,
+ kWSC03NorthProceedSpotID = 5020,
+ kWSC03NorthMolecule1SpotID = 5021,
+ kWSC03NorthMolecule2SpotID = 5022,
+ kWSC03NorthMolecule3SpotID = 5023,
+ kWSC03NorthMolecule4SpotID = 5024,
+ kWSC03NorthMolecule5SpotID = 5025,
+ kWSC03NorthMolecule6SpotID = 5026,
+ kWSC03SouthActivateSynthesizerSpotID = 5027,
+ kWSC03SouthPickUpAntidoteSpotID = 5028,
+ kWSC07SouthMapSpotID = 5029,
+ kW42EastUnlockDoorSpotID = 5030,
+ kW56NorthMapSpotID = 5031,
+ kW58SouthPryDoorSpotID = 5032,
+ kWSC60EastSpotID = 5033,
+ kWSC60NorthSpotID = 5034,
+ kWSC60EastOutSpotID = 5035,
+ kWSC60NorthOutSpotID = 5036,
+ kWSC61EastSpotID = 5037,
+ kWSC61SouthSpotID = 5038,
+ kW61SouthMachineGunSpotID = 5039,
+ kW61SouthDropMachineGunSpotID = 5040,
+ kWSC61WestSpotID = 5041,
+ kWSC61SouthOutSpotID = 5042,
+ kW61SouthActivateSpotID = 5043,
+ kW61SmartAlloysSpotID = 5044,
+ kW61MorphingSpotID = 5045,
+ kW61TimeBendingSpotID = 5046,
+ kWSC61WestOutSpotID = 5047,
+ kW61TurnOnMessagesSpotID = 5048,
+ kW61WhiteMessageSpotID = 5049,
+ kW61WalchekMessageSpotID = 5050,
+ kWSC65SouthScreenSpotID = 5051,
+ kWSC65SouthScreenOutSpotID = 5052,
+ kW98RetinalChipSpotID = 5053,
+ kW98MapChipSpotID = 5054,
+ kW98OpticalChipSpotID = 5055,
+ kW98DropArgonSpotID = 5056,
+ kW98GrabCableSpotID = 5057,
+ kW98OpenRobotSpotID = 5058,
+ kW98StunGunSpotID = 5059
+};
// Extra sequence IDs.
-static const ExtraID kWSCArrivalFromTSA = 0;
-static const ExtraID kWSCShotByRobot = 1;
-static const ExtraID kWSCDartScan1 = 2;
-static const ExtraID kWSCDartScan2 = 3;
-static const ExtraID kWSCDartScanNo = 4;
-static const ExtraID kWSCDartScan3 = 5;
-static const ExtraID kWSCAnalyzerPowerUp = 6;
-static const ExtraID kWSCAnalyzerPowerUpWithDart = 7;
-static const ExtraID kWSCDropDartIntoAnalyzer = 8;
-static const ExtraID kWSCAnalyzeDart = 9;
-static const ExtraID kWSCZoomOutFromAnalyzer = 10;
-static const ExtraID kWSCSpinRobot = 11;
-static const ExtraID kWSC02MorphZoomNoArgon = 12;
-static const ExtraID kWSC02MessagesZoomNoNitrogen = 13;
-static const ExtraID kWSC02ZoomOutNoArgon = 14;
-static const ExtraID kWSC02TurnOnMorphScreen = 15;
-static const ExtraID kWSC02DropToMorphExperiment = 16;
-static const ExtraID kWSC02MorphLoop = 17;
-static const ExtraID kWSC02MorphInterruption = 18;
-static const ExtraID kWSC02MorphFinished = 19;
-static const ExtraID kWSC02TurnOffMorphScreen = 20;
-static const ExtraID kWSC02SouthViewNoArgon = 21;
-static const ExtraID kMessagesMovedToOffice = 22;
-static const ExtraID kMessagesOff = 23;
-static const ExtraID kMessagesZoomOutNoNitrogen = 24;
-static const ExtraID kMessagesMovedToOfficeNoNitrogen = 25;
-static const ExtraID kMessagesOffNoNitrogen = 26;
-static const ExtraID kMessagesViewNoNitrogen = 27;
-static const ExtraID kMessagesViewMachineOnNoNitrogen = 28;
-static const ExtraID kW03NorthActivate = 29;
-static const ExtraID kW03NorthGetData = 30;
-static const ExtraID kW03NorthInstructions = 31;
-static const ExtraID kW03NorthPrepMolecule1 = 32;
-static const ExtraID kW03NorthPrepMolecule2 = 33;
-static const ExtraID kW03NorthPrepMolecule3 = 34;
-static const ExtraID kW03NorthFinishSynthesis = 35;
-static const ExtraID kW03SouthCreateAntidote = 36;
-static const ExtraID kW03SouthAntidoteLoop = 37;
-static const ExtraID kW03SouthDeactivate = 38;
-static const ExtraID kW03SouthViewNoAntidote = 39;
-static const ExtraID kWSC07SouthMap = 40;
-static const ExtraID kW17WestPeopleCrossing = 41;
-static const ExtraID kW17WestPeopleCrossingView = 42;
-static const ExtraID kW21SouthPeopleCrossing = 43;
-static const ExtraID kW24SouthPeopleCrossing = 44;
-static const ExtraID kW34EastPeopleCrossing = 45;
-static const ExtraID kW36WestPeopleCrossing = 46;
-static const ExtraID kW38NorthPeopleCrossing = 47;
-static const ExtraID kW46SouthPeopleCrossing = 48;
-static const ExtraID kW49NorthPeopleCrossing = 49;
-static const ExtraID kW49NorthPeopleCrossingView = 50;
-static const ExtraID kWSC56SouthMap = 51;
-static const ExtraID kNerdAtTheDoor1 = 52;
-static const ExtraID kNerdAtTheDoor2 = 53;
-static const ExtraID kW61SouthZoomInNoGun = 54;
-static const ExtraID kW61Brochure = 55;
-static const ExtraID kW61SouthScreenOnWithGun = 56;
-static const ExtraID kW61SouthScreenOffWithGun = 57;
-static const ExtraID kW61SouthSmartAlloysWithGun = 58;
-static const ExtraID kW61SouthMorphingWithGun = 59;
-static const ExtraID kW61SouthTimeBendingWithGun = 60;
-static const ExtraID kW61SouthZoomOutNoGun = 61;
-static const ExtraID kW61SouthScreenOnNoGun = 62;
-static const ExtraID kW61SouthScreenOffNoGun = 63;
-static const ExtraID kW61SouthSmartAlloysNoGun = 64;
-static const ExtraID kW61SouthMorphingNoGun = 65;
-static const ExtraID kW61SouthTimeBendingNoGun = 66;
-static const ExtraID kW61MessagesOn = 67;
-static const ExtraID kW61MessagesOff = 68;
-static const ExtraID kW61WhiteMessage = 69;
-static const ExtraID kW61WalchekMessage = 70;
-static const ExtraID kW61WalchekEasterEgg1 = 71;
-static const ExtraID kW62SouthPlasmaRobotAppears = 72;
-static const ExtraID kW62ZoomToRobot = 73;
-static const ExtraID kW62ZoomOutFromRobot = 74;
-static const ExtraID kW62PlasmaDodgeSurvive = 75;
-static const ExtraID kW62PlasmaDodgeDie = 76;
-static const ExtraID kW65SouthSinclairLecture = 77;
-static const ExtraID kW73WestPeopleCrossing = 78;
-static const ExtraID kW73WestPeopleCrossingView = 79;
-static const ExtraID kW0ZSpottedByWomen = 80;
-static const ExtraID kW95RobotShoots = 81;
-static const ExtraID kW98MorphsToRobot = 82;
-static const ExtraID kW98RobotShoots = 83;
-static const ExtraID kW98RobotShocked = 84;
-static const ExtraID kW98RobotGassed = 85;
-static const ExtraID kW98RobotHeadOpensDark = 86;
-static const ExtraID kW98RobotHead000Dark = 87;
-static const ExtraID kW98RobotHead001Dark = 88;
-static const ExtraID kW98RobotHead010Dark = 89;
-static const ExtraID kW98RobotHead011Dark = 90;
-static const ExtraID kW98RobotHead100Dark = 91;
-static const ExtraID kW98RobotHead101Dark = 92;
-static const ExtraID kW98RobotHead110Dark = 93;
-static const ExtraID kW98RobotHead111Dark = 94;
-static const ExtraID kW98RobotHeadClosesDark = 95;
-static const ExtraID kW98WestViewWithGunDark = 96;
-static const ExtraID kW98WestViewNoGunDark = 97;
-static const ExtraID kW98RobotHeadOpensLight = 98;
-static const ExtraID kW98RobotHead000Light = 99;
-static const ExtraID kW98RobotHead001Light = 100;
-static const ExtraID kW98RobotHead010Light = 101;
-static const ExtraID kW98RobotHead011Light = 102;
-static const ExtraID kW98RobotHead100Light = 103;
-static const ExtraID kW98RobotHead101Light = 104;
-static const ExtraID kW98RobotHead110Light = 105;
-static const ExtraID kW98RobotHead111Light = 106;
-static const ExtraID kW98RobotHeadClosesLight = 107;
-static const ExtraID kW98WestViewWithGunLight = 108;
-static const ExtraID kW98WestViewNoGunLight = 109;
+enum {
+ kWSCArrivalFromTSA = 0,
+ kWSCShotByRobot = 1,
+ kWSCDartScan1 = 2,
+ kWSCDartScan2 = 3,
+ kWSCDartScanNo = 4,
+ kWSCDartScan3 = 5,
+ kWSCAnalyzerPowerUp = 6,
+ kWSCAnalyzerPowerUpWithDart = 7,
+ kWSCDropDartIntoAnalyzer = 8,
+ kWSCAnalyzeDart = 9,
+ kWSCZoomOutFromAnalyzer = 10,
+ kWSCSpinRobot = 11,
+ kWSC02MorphZoomNoArgon = 12,
+ kWSC02MessagesZoomNoNitrogen = 13,
+ kWSC02ZoomOutNoArgon = 14,
+ kWSC02TurnOnMorphScreen = 15,
+ kWSC02DropToMorphExperiment = 16,
+ kWSC02MorphLoop = 17,
+ kWSC02MorphInterruption = 18,
+ kWSC02MorphFinished = 19,
+ kWSC02TurnOffMorphScreen = 20,
+ kWSC02SouthViewNoArgon = 21,
+ kMessagesMovedToOffice = 22,
+ kMessagesOff = 23,
+ kMessagesZoomOutNoNitrogen = 24,
+ kMessagesMovedToOfficeNoNitrogen = 25,
+ kMessagesOffNoNitrogen = 26,
+ kMessagesViewNoNitrogen = 27,
+ kMessagesViewMachineOnNoNitrogen = 28,
+ kW03NorthActivate = 29,
+ kW03NorthGetData = 30,
+ kW03NorthInstructions = 31,
+ kW03NorthPrepMolecule1 = 32,
+ kW03NorthPrepMolecule2 = 33,
+ kW03NorthPrepMolecule3 = 34,
+ kW03NorthFinishSynthesis = 35,
+ kW03SouthCreateAntidote = 36,
+ kW03SouthAntidoteLoop = 37,
+ kW03SouthDeactivate = 38,
+ kW03SouthViewNoAntidote = 39,
+ kWSC07SouthMap = 40,
+ kW17WestPeopleCrossing = 41,
+ kW17WestPeopleCrossingView = 42,
+ kW21SouthPeopleCrossing = 43,
+ kW24SouthPeopleCrossing = 44,
+ kW34EastPeopleCrossing = 45,
+ kW36WestPeopleCrossing = 46,
+ kW38NorthPeopleCrossing = 47,
+ kW46SouthPeopleCrossing = 48,
+ kW49NorthPeopleCrossing = 49,
+ kW49NorthPeopleCrossingView = 50,
+ kWSC56SouthMap = 51,
+ kNerdAtTheDoor1 = 52,
+ kNerdAtTheDoor2 = 53,
+ kW61SouthZoomInNoGun = 54,
+ kW61Brochure = 55,
+ kW61SouthScreenOnWithGun = 56,
+ kW61SouthScreenOffWithGun = 57,
+ kW61SouthSmartAlloysWithGun = 58,
+ kW61SouthMorphingWithGun = 59,
+ kW61SouthTimeBendingWithGun = 60,
+ kW61SouthZoomOutNoGun = 61,
+ kW61SouthScreenOnNoGun = 62,
+ kW61SouthScreenOffNoGun = 63,
+ kW61SouthSmartAlloysNoGun = 64,
+ kW61SouthMorphingNoGun = 65,
+ kW61SouthTimeBendingNoGun = 66,
+ kW61MessagesOn = 67,
+ kW61MessagesOff = 68,
+ kW61WhiteMessage = 69,
+ kW61WalchekMessage = 70,
+ kW61WalchekEasterEgg1 = 71,
+ kW62SouthPlasmaRobotAppears = 72,
+ kW62ZoomToRobot = 73,
+ kW62ZoomOutFromRobot = 74,
+ kW62PlasmaDodgeSurvive = 75,
+ kW62PlasmaDodgeDie = 76,
+ kW65SouthSinclairLecture = 77,
+ kW73WestPeopleCrossing = 78,
+ kW73WestPeopleCrossingView = 79,
+ kW0ZSpottedByWomen = 80,
+ kW95RobotShoots = 81,
+ kW98MorphsToRobot = 82,
+ kW98RobotShoots = 83,
+ kW98RobotShocked = 84,
+ kW98RobotGassed = 85,
+ kW98RobotHeadOpensDark = 86,
+ kW98RobotHead000Dark = 87,
+ kW98RobotHead001Dark = 88,
+ kW98RobotHead010Dark = 89,
+ kW98RobotHead011Dark = 90,
+ kW98RobotHead100Dark = 91,
+ kW98RobotHead101Dark = 92,
+ kW98RobotHead110Dark = 93,
+ kW98RobotHead111Dark = 94,
+ kW98RobotHeadClosesDark = 95,
+ kW98WestViewWithGunDark = 96,
+ kW98WestViewNoGunDark = 97,
+ kW98RobotHeadOpensLight = 98,
+ kW98RobotHead000Light = 99,
+ kW98RobotHead001Light = 100,
+ kW98RobotHead010Light = 101,
+ kW98RobotHead011Light = 102,
+ kW98RobotHead100Light = 103,
+ kW98RobotHead101Light = 104,
+ kW98RobotHead110Light = 105,
+ kW98RobotHead111Light = 106,
+ kW98RobotHeadClosesLight = 107,
+ kW98WestViewWithGunLight = 108,
+ kW98WestViewNoGunLight = 109
+};
static const CoordType kMoleculesMovieLeft = kNavAreaLeft + 112;
static const CoordType kMoleculesMovieTop = kNavAreaTop + 40;
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 0010180d8d..0c8ea2e4ee 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -2514,7 +2514,7 @@ void PegasusEngine::initKeymap() {
{ Common::KEYCODE_t, "TMA", _("Toggle Center Data Display") },
{ Common::KEYCODE_i, "TIN", _("Display/Hide Info Screen") },
{ Common::KEYCODE_ESCAPE, "PM", _("Display/Hide Pause Menu") },
- { Common::KEYCODE_e, "WTF", _("???") } // easter egg key (without being completely upfront about it)
+ { Common::KEYCODE_e, "WTF", "???" } // easter egg key (without being completely upfront about it)
};
for (uint i = 0; i < ARRAYSIZE(keyActionEntries); i++) {
diff --git a/engines/saga/console.cpp b/engines/saga/console.cpp
index 0b801eef3e..8ad7fd5aaa 100644
--- a/engines/saga/console.cpp
+++ b/engines/saga/console.cpp
@@ -25,8 +25,10 @@
#include "saga/saga.h"
#include "saga/actor.h"
#include "saga/animation.h"
+#include "saga/music.h"
#include "saga/scene.h"
#include "saga/script.h"
+#include "saga/sndres.h"
#include "saga/console.h"
@@ -45,6 +47,11 @@ Console::Console(SagaEngine *vm) : GUI::Debugger() {
registerCmd("cutaway_info", WRAP_METHOD(Console, cmdCutawayInfo));
registerCmd("play_cutaway", WRAP_METHOD(Console, cmdPlayCutaway));
+ // Sound commands
+ registerCmd("play_music", WRAP_METHOD(Console, cmdPlayMusic));
+ registerCmd("play_sound", WRAP_METHOD(Console, cmdPlaySound));
+ registerCmd("play_voice", WRAP_METHOD(Console, cmdPlayVoice));
+
// Game stuff
#if 0
@@ -117,6 +124,45 @@ bool Console::cmdPlayCutaway(int argc, const char **argv) {
return true;
}
+bool Console::cmdPlayMusic(int argc, const char **argv) {
+ if (argc != 2) {
+ debugPrintf("Usage: %s <Music number>\n", argv[0]);
+ } else {
+ if (_vm->getGameId() == GID_ITE)
+ _vm->_music->play(atoi(argv[1]) + 9);
+ else
+ _vm->_music->play(atoi(argv[1]));
+ }
+ return true;
+}
+
+bool Console::cmdPlaySound(int argc, const char **argv) {
+ if (argc != 2)
+ debugPrintf("Usage: %s <Sound number>\n", argv[0]);
+ else
+ _vm->_sndRes->playSound(atoi(argv[1]), 255, false);
+ return true;
+}
+
+bool Console::cmdPlayVoice(int argc, const char **argv) {
+ if (argc < 2) {
+ debugPrintf("Usage: %s <Voice number> <Voice bank>\n", argv[0]);
+ } else {
+ int voiceBank = 0;
+
+ if (argc == 3) {
+ voiceBank = _vm->_sndRes->getVoiceBank();
+ _vm->_sndRes->setVoiceBank(atoi(argv[2]));
+ }
+
+ _vm->_sndRes->playVoice(atoi(argv[1]));
+
+ if (argc == 3)
+ _vm->_sndRes->setVoiceBank(voiceBank);
+ }
+ return true;
+}
+
bool Console::cmdCurrentScene(int argc, const char **argv) {
debugPrintf("Current Scene is: %i, scene resource id: %i\n",
_vm->_scene->currentSceneNumber(), _vm->_scene->currentSceneResourceId());
diff --git a/engines/saga/console.h b/engines/saga/console.h
index 625e6f57ad..cec964301c 100644
--- a/engines/saga/console.h
+++ b/engines/saga/console.h
@@ -41,6 +41,10 @@ private:
bool cmdCutawayInfo(int argc, const char **argv);
bool cmdPlayCutaway(int argc, const char **argv);
+ bool cmdPlayMusic(int argc, const char **argv);
+ bool cmdPlaySound(int argc, const char **argv);
+ bool cmdPlayVoice(int argc, const char **argv);
+
bool cmdCurrentScene(int argc, const char **argv);
bool cmdCurrentChapter(int argc, const char **argv);
bool cmdSceneChange(int argc, const char **argv);
diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index 72187a1a13..2f72e7a13c 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -595,6 +595,30 @@ static const SAGAGameDescription gameDescriptions[] = {
ITEPatch_Files,
},
+ // Inherit the earth - Chinese Disk version
+ {
+ {
+ "ite",
+ "Floppy",
+ {
+ {"ite.rsc", GAME_RESOURCEFILE, "8f4315a9bb10ec839253108a032c8b54", 8901704},
+ {"scripts.rsc", GAME_SCRIPTFILE, "516f7330f8410057b834424ea719d1ef", 281071},
+ { NULL, 0, NULL, 0}
+ },
+ Common::ZH_CNA,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NOSPEECH)
+ },
+ GID_ITE,
+ GF_ITE_FLOPPY,
+ ITE_DEFAULT_SCENE,
+ &ITE_Resources,
+ ARRAYSIZE(ITE_GameFonts),
+ ITE_GameFonts,
+ ITEPatch_Files,
+ },
+
// ITE Amiga versions /////////////////////////////////////////////////////////////////////////////////////
// TODO: Add the Amiga versions here (not supported yet)
diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp
index 013b019c9f..b7c3fa4d6e 100644
--- a/engines/saga/events.cpp
+++ b/engines/saga/events.cpp
@@ -583,6 +583,18 @@ EventColumns *Events::chain(EventColumns *eventColumns, const Event &event) {
return eventColumns;
}
+EventColumns *Events::chainMusic(EventColumns *eventColumns, long musicId, bool loop, long time) {
+ Event event;
+
+ event.type = kEvTOneshot;
+ event.code = kMusicEvent;
+ event.param = musicId;
+ event.param2 = loop ? MUSIC_NORMAL : MUSIC_LOOP;
+ event.op = kEventPlay;
+ event.time = time;
+ return chain(eventColumns, event);
+}
+
void Events::initializeEvent(Event &event) {
switch (event.type) {
case kEvTOneshot:
diff --git a/engines/saga/events.h b/engines/saga/events.h
index 6c423abb8c..84a62f5a3a 100644
--- a/engines/saga/events.h
+++ b/engines/saga/events.h
@@ -172,9 +172,18 @@ class Events {
return chain(NULL, event);
}
+ // Schedules a music event in the event list; returns a pointer to the scheduled
+ // event columns suitable for chaining if desired.
+ EventColumns *queueMusic(long musicId, bool loop = false, long time = 0) {
+ return chainMusic(NULL, musicId, loop, time);
+ }
+
// Places a 'event' on the end of an event columns given by 'eventColumns'
EventColumns *chain(EventColumns *eventColumns, const Event &event);
+ // Places a music 'event' on the end of an event columns given by 'eventColumns'
+ EventColumns *chainMusic(EventColumns *eventColumns, long musicId, bool loop = false, long time = 0);
+
private:
int handleContinuous(Event *event);
int handleOneShot(Event *event);
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index 680b2274f5..44581f26fc 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -710,6 +710,11 @@ bool Interface::processAscii(Common::KeyState keystate) {
}
void Interface::setStatusText(const char *text, int statusColor) {
+ if (_vm->getGameId() == GID_FTA2 || _vm->getGameId() == GID_DINO) {
+ warning("setStatusText not implemented for SAGA2");
+ return;
+ }
+
if (_vm->getGameId() == GID_IHNM) {
// Don't show the status text for the IHNM chapter selection screens (chapter 8), or
// scene 0 (IHNM demo introduction)
diff --git a/engines/saga/introproc_ite.cpp b/engines/saga/introproc_ite.cpp
index 91b1d3db95..0c1a2ce233 100644
--- a/engines/saga/introproc_ite.cpp
+++ b/engines/saga/introproc_ite.cpp
@@ -28,6 +28,7 @@
#include "saga/animation.h"
#include "saga/events.h"
#include "saga/font.h"
+#include "saga/itedata.h"
#include "saga/sndres.h"
#include "saga/palanim.h"
#include "saga/music.h"
@@ -37,10 +38,15 @@
namespace Saga {
-using Common::UNK_LANG;
-using Common::EN_ANY;
-using Common::DE_DEU;
-using Common::IT_ITA;
+#define INTRO_FRAMETIME 90
+#define INTRO_CAPTION_Y 170
+#define INTRO_DE_CAPTION_Y 160
+#define INTRO_IT_CAPTION_Y 160
+#define INTRO_VOICE_PAD 50
+#define INTRO_VOICE_LETTERLEN 90
+
+#define DISSOLVE_DURATION 3000
+#define LOGO_DISSOLVE_DURATION 1000
// Intro scenes
#define RID_ITE_INTRO_ANIM_SCENE 1538
@@ -54,8 +60,8 @@ using Common::IT_ITA;
#define RID_ITE_FAIRETENT_SCENE 1567
// ITE intro music
-#define MUSIC_1 9
-#define MUSIC_2 10
+#define MUSIC_INTRO 9
+#define MUSIC_TITLE_THEME 10
LoadSceneParams ITE_IntroList[] = {
{RID_ITE_INTRO_ANIM_SCENE, kLoadByResourceId, Scene::SC_ITEIntroAnimProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE},
@@ -98,11 +104,11 @@ int Scene::ITEStartProc() {
return SUCCESS;
}
-EventColumns *Scene::ITEQueueDialogue(EventColumns *eventColumns, int n_dialogues, const IntroDialogue dialogue[]) {
+EventColumns *Scene::queueIntroDialogue(EventColumns *eventColumns, int n_dialogues, const IntroDialogue dialogue[]) {
TextListEntry textEntry;
TextListEntry *entry;
Event event;
- int voice_len;
+ int voiceLength;
int i;
// Queue narrator dialogue list
@@ -132,7 +138,7 @@ EventColumns *Scene::ITEQueueDialogue(EventColumns *eventColumns, int n_dialogue
event.code = kTextEvent;
event.op = kEventDisplay;
event.data = entry;
- event.time = (i == 0) ? 0 : VOICE_PAD;
+ event.time = (i == 0) ? 0 : INTRO_VOICE_PAD;
eventColumns = _vm->_events->chain(eventColumns, event);
}
@@ -146,9 +152,10 @@ EventColumns *Scene::ITEQueueDialogue(EventColumns *eventColumns, int n_dialogue
_vm->_events->chain(eventColumns, event);
}
- voice_len = _vm->_sndRes->getVoiceLength(dialogue[i].i_voice_rn);
- if (voice_len < 0) {
- voice_len = strlen(dialogue[i].i_str) * VOICE_LETTERLEN;
+ voiceLength = _vm->_sndRes->getVoiceLength(dialogue[i].i_voice_rn);
+ if (voiceLength < 0) {
+ // Set a default length if no speech file is present
+ voiceLength = strlen(dialogue[i].i_str) * INTRO_VOICE_LETTERLEN;
}
// Remove text
@@ -156,31 +163,17 @@ EventColumns *Scene::ITEQueueDialogue(EventColumns *eventColumns, int n_dialogue
event.code = kTextEvent;
event.op = kEventRemove;
event.data = entry;
- event.time = voice_len;
+ event.time = voiceLength;
_vm->_events->chain(eventColumns, event);
}
return eventColumns;
}
-enum {
- kCHeader,
- kCText
-};
-
-enum {
- kITEPC = (1 << 0),
- kITEPCCD = (1 << 1),
- kITEMac = (1 << 2),
- kITEWyrmKeep = (1 << 3),
- kITEAny = 0xffff,
- kITENotWyrmKeep = kITEAny & ~kITEWyrmKeep
-};
-
// Queue a page of credits text. The original interpreter did word-wrapping
// automatically. We currently don't.
-EventColumns *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits, const IntroCredit credits[]) {
+EventColumns *Scene::queueCredits(int delta_time, int duration, int n_credits, const IntroCredit credits[]) {
int game;
Common::Language lang;
bool hasWyrmkeepCredits = (Common::File::exists("credit3n.dlt") || // PC
@@ -192,13 +185,13 @@ EventColumns *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits
lang = _vm->getLanguage();
if (hasWyrmkeepCredits)
- game = kITEWyrmKeep;
+ game = kITECreditsWyrmKeep;
else if (_vm->getPlatform() == Common::kPlatformMacintosh)
- game = kITEMac;
+ game = kITECreditsMac;
else if (_vm->getFeatures() & GF_EXTRA_ITE_CREDITS)
- game = kITEPCCD;
+ game = kITECreditsPCCD;
else
- game = kITEPC;
+ game = kITECreditsPC;
int line_spacing = 0;
int paragraph_spacing;
@@ -209,7 +202,7 @@ EventColumns *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits
int credits_height = 0;
for (i = 0; i < n_credits; i++) {
- if (credits[i].lang != lang && credits[i].lang != UNK_LANG) {
+ if (credits[i].lang != lang && credits[i].lang != Common::UNK_LANG) {
continue;
}
@@ -218,12 +211,12 @@ EventColumns *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits
}
switch (credits[i].type) {
- case kCHeader:
+ case kITECreditsHeader:
font = kKnownFontSmall;
line_spacing = 4;
n_paragraphs++;
break;
- case kCText:
+ case kITECreditsText:
font = kKnownFontMedium;
line_spacing = 2;
break;
@@ -250,7 +243,7 @@ EventColumns *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits
textEntry.point.x = 160;
for (i = 0; i < n_credits; i++) {
- if (credits[i].lang != lang && credits[i].lang != UNK_LANG) {
+ if (credits[i].lang != lang && credits[i].lang != Common::UNK_LANG) {
continue;
}
@@ -259,12 +252,12 @@ EventColumns *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits
}
switch (credits[i].type) {
- case kCHeader:
+ case kITECreditsHeader:
font = kKnownFontSmall;
line_spacing = 4;
y += paragraph_spacing;
break;
- case kCText:
+ case kITECreditsText:
font = kKnownFontMedium;
line_spacing = 2;
break;
@@ -328,7 +321,7 @@ int Scene::ITEIntroAnimProc(int param) {
debug(3, "Intro animation procedure started.");
debug(3, "Linking animation resources...");
- _vm->_anim->setFrameTime(0, ITE_INTRO_FRAMETIME);
+ _vm->_anim->setFrameTime(0, INTRO_FRAMETIME);
// Link this scene's animation resources for continuous
// playback
@@ -355,13 +348,7 @@ int Scene::ITEIntroAnimProc(int param) {
_vm->_events->chain(eventColumns, event);
// Queue intro music playback
- event.type = kEvTOneshot;
- event.code = kMusicEvent;
- event.param = MUSIC_1;
- event.param2 = MUSIC_LOOP;
- event.op = kEventPlay;
- event.time = 0;
- _vm->_events->chain(eventColumns, event);
+ _vm->_events->chainMusic(eventColumns, MUSIC_INTRO, true);
}
break;
case SCENE_END:
@@ -374,14 +361,11 @@ int Scene::ITEIntroAnimProc(int param) {
return 0;
}
-int Scene::SC_ITEIntroCave1Proc(int param, void *refCon) {
- return ((Scene *)refCon)->ITEIntroCave1Proc(param);
-}
-
-// Handles first introductory cave painting scene
-int Scene::ITEIntroCave1Proc(int param) {
+int Scene::ITEIntroCaveCommonProc(int param, int caveScene) {
Event event;
- EventColumns *eventColumns;
+ EventColumns *eventColumns = NULL;
+ const IntroDialogue *dialogue;
+
int lang = 0;
if (_vm->getLanguage() == Common::DE_DEU)
@@ -389,202 +373,62 @@ int Scene::ITEIntroCave1Proc(int param) {
else if (_vm->getLanguage() == Common::IT_ITA)
lang = 2;
- static const IntroDialogue dialogue[][4] = {
- { { // English
- 0, // cave voice 0
- "We see the sky, we see the land, we see the water, "
- "and we wonder: Are we the only ones?"
- },
- {
- 1, // cave voice 1
- "Long before we came to exist, the humans ruled the "
- "Earth."
- },
- {
- 2, // cave voice 2
- "They made marvelous things, and moved whole "
- "mountains."
- },
- {
- 3, // cave voice 3
- "They knew the Secret of Flight, the Secret of "
- "Happiness, and other secrets beyond our imagining."
- } },
- // -----------------------------------------------------
- { { // German
- 0, // cave voice 0
- "Um uns sind der Himmel, das Land und die Seen; und "
- "wir fragen uns - sind wir die einzigen?"
- },
- {
- 1, // cave voice 1
- "Lange vor unserer Zeit herrschten die Menschen "
- "\201ber die Erde."
- },
- {
- 2, // cave voice 2
- "Sie taten wundersame Dinge und versetzten ganze "
- "Berge."
- },
- {
- 3, // cave voice 3
- "Sie kannten das Geheimnis des Fluges, das Geheimnis "
- "der Fr\224hlichkeit und andere Geheimnisse, die "
- "unsere Vorstellungskraft \201bersteigen."
- } },
- // -----------------------------------------------------
- { { // Italian fan translation
- 0, // cave voice 0
- "Guardiamo il cielo, guardiamo la terra, guardiamo "
- "l'acqua, e ci chiediamo: Siamo forse soli?"
- },
- {
- 1, // cave voice 1
- "Molto tempo prima che noi esistessimo, gli Umani "
- "dominavano la terra."
- },
- {
- 2, // cave voice 2
- "Fecero cose meravigliose, e mossero intere "
- "montagne."
- },
- {
- 3, // cave voice 3
- "Conoscevano il Segreto del Volo, il Segreto della "
- "Felicit\205, ed altri segreti oltre ogni nostra "
- "immaginazione."
- } }
- };
-
- int n_dialogues = ARRAYSIZE(dialogue[lang]);
-
- switch (param) {
- case SCENE_BEGIN:
- // Begin palette cycling animation for candles
- event.type = kEvTOneshot;
- event.code = kPalAnimEvent;
- event.op = kEventCycleStart;
- event.time = 0;
- eventColumns = _vm->_events->queue(event);
-
- // Queue narrator dialogue list
- ITEQueueDialogue(eventColumns, n_dialogues, dialogue[lang]);
-
- // End scene after last dialogue over
- event.type = kEvTOneshot;
- event.code = kSceneEvent;
- event.op = kEventEnd;
- event.time = VOICE_PAD;
- _vm->_events->chain(eventColumns, event);
-
+ int n_dialogues = 0;
+
+ switch (caveScene) {
+ case 1:
+ n_dialogues = ARRAYSIZE(introDialogueCave1[lang]);
+ dialogue = introDialogueCave1[lang];
break;
- case SCENE_END:
+ case 2:
+ n_dialogues = ARRAYSIZE(introDialogueCave2[lang]);
+ dialogue = introDialogueCave2[lang];
break;
-
- default:
- warning("Illegal scene procedure parameter");
+ case 3:
+ n_dialogues = ARRAYSIZE(introDialogueCave3[lang]);
+ dialogue = introDialogueCave3[lang];
break;
+ case 4:
+ n_dialogues = ARRAYSIZE(introDialogueCave4[lang]);
+ dialogue = introDialogueCave4[lang];
+ break;
+ default:
+ error("Invalid cave scene");
}
- return 0;
-}
-
-int Scene::SC_ITEIntroCave2Proc(int param, void *refCon) {
- return ((Scene *)refCon)->ITEIntroCave2Proc(param);
-}
-
-// Handles second introductory cave painting scene
-int Scene::ITEIntroCave2Proc(int param) {
- Event event;
- EventColumns *eventColumns;
- int lang = 0;
-
- if (_vm->getLanguage() == Common::DE_DEU)
- lang = 1;
- else if (_vm->getLanguage() == Common::IT_ITA)
- lang = 2;
-
- static const IntroDialogue dialogue[][3] = {
- { { // English
- 4, // cave voice 4
- "The humans also knew the Secret of Life, and they "
- "used it to give us the Four Great Gifts:"
- },
- {
- 5, // cave voice 5
- "Thinking minds, feeling hearts, speaking mouths, and "
- "reaching hands."
- },
- {
- 6, // cave voice 6
- "We are their children."
- } },
- // -----------------------------------------------------
- { { // German
- 4, // cave voice 4
- "Au$erdem kannten die Menschen das Geheimnis des "
- "Lebens. Und sie nutzten es, um uns die vier gro$en "
- "Geschenke zu geben -"
- },
- {
- 5, // cave voice 5
- "den denkenden Geist, das f\201hlende Herz, den "
- "sprechenden Mund und die greifende Hand."
- },
- {
- 6, // cave voice 6
- "Wir sind ihre Kinder."
- } },
- // -----------------------------------------------------
- { { // Italian fan translation
- 4, // cave voice 4
- "Gli Umani conoscevano anche il Segreto della Vita, "
- "e lo usarono per darci i Quattro Grandi Doni:"
-
- },
- {
- 5, // cave voice 5
- "Il pensiero, le emozioni, la parola e la manualit\205."
-
- },
- {
- 6, // cave voice 6
- "Siamo i loro figli."
- } }
- };
-
- int n_dialogues = ARRAYSIZE(dialogue[lang]);
-
switch (param) {
case SCENE_BEGIN:
- // Start 'dissolve' transition to new scene background
- event.type = kEvTContinuous;
- event.code = kTransitionEvent;
- event.op = kEventDissolve;
- event.time = 0;
- event.duration = DISSOLVE_DURATION;
- eventColumns = _vm->_events->queue(event);
+ if (caveScene > 1) {
+ // Start 'dissolve' transition to new scene background
+ event.type = kEvTContinuous;
+ event.code = kTransitionEvent;
+ event.op = kEventDissolve;
+ event.time = 0;
+ event.duration = DISSOLVE_DURATION;
+ eventColumns = _vm->_events->queue(event);
+ }
// Begin palette cycling animation for candles
event.type = kEvTOneshot;
event.code = kPalAnimEvent;
event.op = kEventCycleStart;
event.time = 0;
- _vm->_events->chain(eventColumns, event);
+ eventColumns = _vm->_events->chain(eventColumns, event);
// Queue narrator dialogue list
- ITEQueueDialogue(eventColumns, n_dialogues, dialogue[lang]);
+ queueIntroDialogue(eventColumns, n_dialogues, dialogue);
// End scene after last dialogue over
event.type = kEvTOneshot;
event.code = kSceneEvent;
event.op = kEventEnd;
- event.time = VOICE_PAD;
+ event.time = INTRO_VOICE_PAD;
_vm->_events->chain(eventColumns, event);
break;
case SCENE_END:
break;
+
default:
warning("Illegal scene procedure parameter");
break;
@@ -593,227 +437,24 @@ int Scene::ITEIntroCave2Proc(int param) {
return 0;
}
-int Scene::SC_ITEIntroCave3Proc(int param, void *refCon) {
- return ((Scene *)refCon)->ITEIntroCave3Proc(param);
+// Handles first introductory cave painting scene
+int Scene::SC_ITEIntroCave1Proc(int param, void *refCon) {
+ return ((Scene *)refCon)->ITEIntroCaveCommonProc(param, 1);
}
-// Handles third introductory cave painting scene
-int Scene::ITEIntroCave3Proc(int param) {
- Event event;
- EventColumns *eventColumns;
- int lang = 0;
-
- if (_vm->getLanguage() == Common::DE_DEU)
- lang = 1;
- else if (_vm->getLanguage() == Common::IT_ITA)
- lang = 2;
-
- static const IntroDialogue dialogue[][3] = {
- { { // English
- 7, // cave voice 7
- "They taught us how to use our hands, and how to "
- "speak."
- },
- {
- 8, // cave voice 8
- "They showed us the joy of using our minds."
- },
- {
- 9, // cave voice 9
- "They loved us, and when we were ready, they surely "
- "would have given us the Secret of Happiness."
- } },
- // -----------------------------------------------------
- { { // German
- 7, // cave voice 7
- "Sie lehrten uns zu sprechen und unsere H\204nde zu "
- "benutzen."
- },
- {
- 8, // cave voice 8
- "Sie zeigten uns die Freude am Denken."
- },
- {
- 9, // cave voice 9
- "Sie liebten uns, und w\204ren wir bereit gewesen, "
- "h\204tten sie uns sicherlich das Geheimnis der "
- "Fr\224hlichkeit offenbart."
- } },
- // -----------------------------------------------------
- { { // Italian fan translation
- 7, // cave voice 7
- "Ci insegnarono come usare le mani e come parlare. "
-
- },
- {
- 8, // cave voice 8
- "Ci mostrarono le gioie che l'uso della mente "
- "pu\225 dare. "
- },
- {
- 9, // cave voice 9
- "Ci amarono, ed una volta pronti, ci avrebbero "
- "sicuramente svelato il Segreto della Felicit\205."
-
- } }
- };
-
- int n_dialogues = ARRAYSIZE(dialogue[lang]);
-
- switch (param) {
- case SCENE_BEGIN:
- // Start 'dissolve' transition to new scene background
- event.type = kEvTContinuous;
- event.code = kTransitionEvent;
- event.op = kEventDissolve;
- event.time = 0;
- event.duration = DISSOLVE_DURATION;
- eventColumns = _vm->_events->queue(event);
-
- // Begin palette cycling animation for candles
- event.type = kEvTOneshot;
- event.code = kPalAnimEvent;
- event.op = kEventCycleStart;
- event.time = 0;
- _vm->_events->chain(eventColumns, event);
-
- // Queue narrator dialogue list
- ITEQueueDialogue(eventColumns, n_dialogues, dialogue[lang]);
-
- // End scene after last dialogue over
- event.type = kEvTOneshot;
- event.code = kSceneEvent;
- event.op = kEventEnd;
- event.time = VOICE_PAD;
- _vm->_events->chain(eventColumns, event);
-
- break;
- case SCENE_END:
- break;
- default:
- warning("Illegal scene procedure parameter");
- break;
- }
-
- return 0;
+// Handles second introductory cave painting scene
+int Scene::SC_ITEIntroCave2Proc(int param, void *refCon) {
+ return ((Scene *)refCon)->ITEIntroCaveCommonProc(param, 2);
}
-int Scene::SC_ITEIntroCave4Proc(int param, void *refCon) {
- return ((Scene *)refCon)->ITEIntroCave4Proc(param);
+// Handles third introductory cave painting scene
+int Scene::SC_ITEIntroCave3Proc(int param, void *refCon) {
+ return ((Scene *)refCon)->ITEIntroCaveCommonProc(param, 3);
}
// Handles fourth introductory cave painting scene
-int Scene::ITEIntroCave4Proc(int param) {
- Event event;
- EventColumns *eventColumns;
- int lang = 0;
-
- if (_vm->getLanguage() == Common::DE_DEU)
- lang = 1;
- else if (_vm->getLanguage() == Common::IT_ITA)
- lang = 2;
-
- static const IntroDialogue dialogue[][4] = {
- { { // English
- 10, // cave voice 10
- "And now we see the sky, the land, and the water that "
- "we are heirs to, and we wonder: why did they leave?"
- },
- {
- 11, // cave voice 11
- "Do they live still, in the stars? In the oceans "
- "depths? In the wind?"
- },
- {
- 12, // cave voice 12
- "We wonder, was their fate good or evil?"
- },
- {
- 13, // cave voice 13
- "And will we also share the same fate one day?"
- } },
- // -----------------------------------------------------
- { { // German
- 10, // cave voice 10
- "Und nun sehen wir den Himmel, das Land und die "
- "Seen - unser Erbe. Und wir fragen uns - warum "
- "verschwanden sie?"
- },
- {
- 11, // cave voice 11
- "Leben sie noch in den Sternen? In den Tiefen des "
- "Ozeans? Im Wind?"
- },
- {
- 12, // cave voice 12
- "Wir fragen uns - war ihr Schicksal gut oder b\224se?"
- },
- {
- 13, // cave voice 13
- "Und wird uns eines Tages das gleiche Schicksal "
- "ereilen?"
- } },
- // -----------------------------------------------------
- { { // Italian fan translation
- 10, // cave voice 10
- "Ed ora che guardiamo il cielo, la terra e l'acqua "
- "che abbiamo ereditato, pensiamo: Perch\202 partirono?"
-
- },
- {
- 11, // cave voice 11
- "Vivono ancora, nelle stelle? Nelle profondit\205 "
- "dell'oceano? Nel vento?"
- },
- {
- 12, // cave voice 12
- "Ci domandiamo, il loro destino fu felice o nefasto?"
- },
- {
- 13, // cave voice 13
- "E un giorno, condivideremo anche noi lo stesso "
- "destino?"
- } }
- };
-
- int n_dialogues = ARRAYSIZE(dialogue[lang]);
-
- switch (param) {
- case SCENE_BEGIN:
- // Start 'dissolve' transition to new scene background
- event.type = kEvTContinuous;
- event.code = kTransitionEvent;
- event.op = kEventDissolve;
- event.time = 0;
- event.duration = DISSOLVE_DURATION;
- eventColumns = _vm->_events->queue(event);
-
- // Begin palette cycling animation for candles
- event.type = kEvTOneshot;
- event.code = kPalAnimEvent;
- event.op = kEventCycleStart;
- event.time = 0;
- _vm->_events->chain(eventColumns, event);
-
- // Queue narrator dialogue list
- ITEQueueDialogue(eventColumns, n_dialogues, dialogue[lang]);
-
- // End scene after last dialogue over
- event.type = kEvTOneshot;
- event.code = kSceneEvent;
- event.op = kEventEnd;
- event.time = VOICE_PAD;
- _vm->_events->chain(eventColumns, event);
-
- break;
- case SCENE_END:
- break;
- default:
- warning("Illegal scene procedure parameter");
- break;
- }
-
- return 0;
+int Scene::SC_ITEIntroCave4Proc(int param, void *refCon) {
+ return ((Scene *)refCon)->ITEIntroCaveCommonProc(param, 4);
}
int Scene::SC_ITEIntroValleyProc(int param, void *refCon) {
@@ -825,23 +466,7 @@ int Scene::ITEIntroValleyProc(int param) {
Event event;
EventColumns *eventColumns;
- static const IntroCredit credits[] = {
- {EN_ANY, kITEAny, kCHeader, "Producer"},
- {DE_DEU, kITEAny, kCHeader, "Produzent"},
- {IT_ITA, kITEAny, kCHeader, "Produttore"},
- {UNK_LANG, kITEAny, kCText, "Walter Hochbrueckner"},
- {EN_ANY, kITEAny, kCHeader, "Executive Producer"},
- {DE_DEU, kITEAny, kCHeader, "Ausf\201hrender Produzent"},
- {IT_ITA, kITEAny, kCHeader, "Produttore Esecutivo"},
- {UNK_LANG, kITEAny, kCText, "Robert McNally"},
- {UNK_LANG, kITEWyrmKeep, kCHeader, "2nd Executive Producer"},
- {EN_ANY, kITENotWyrmKeep, kCHeader, "Publisher"},
- {DE_DEU, kITENotWyrmKeep, kCHeader, "Herausgeber"},
- {IT_ITA, kITENotWyrmKeep, kCHeader, "Editore"},
- {UNK_LANG, kITEAny, kCText, "Jon Van Caneghem"}
- };
-
- int n_credits = ARRAYSIZE(credits);
+ int n_credits = ARRAYSIZE(creditsValley);
switch (param) {
case SCENE_BEGIN:
@@ -858,13 +483,7 @@ int Scene::ITEIntroValleyProc(int param) {
// Begin ITE title theme music
_vm->_music->stop();
- event.type = kEvTOneshot;
- event.code = kMusicEvent;
- event.param = MUSIC_2;
- event.param2 = MUSIC_NORMAL;
- event.op = kEventPlay;
- event.time = 0;
- _vm->_events->chain(eventColumns, event);
+ _vm->_events->chainMusic(eventColumns, MUSIC_TITLE_THEME);
// Pause animation before logo
event.type = kEvTOneshot;
@@ -899,7 +518,7 @@ int Scene::ITEIntroValleyProc(int param) {
_vm->_events->chain(eventColumns, event);
// Queue game credits list
- eventColumns = ITEQueueCredits(9000, CREDIT_DURATION1, n_credits, credits);
+ eventColumns = queueCredits(9000, CREDIT_DURATION1, n_credits, creditsValley);
// End scene after credit display
event.type = kEvTOneshot;
@@ -928,47 +547,8 @@ int Scene::ITEIntroTreeHouseProc(int param) {
Event event;
EventColumns *eventColumns;
- static const IntroCredit credits1[] = {
- {EN_ANY, kITEAny, kCHeader, "Game Design"},
- {DE_DEU, kITEAny, kCHeader, "Spielentwurf"},
- {IT_ITA, kITEAny, kCHeader, "Progetto"},
- {UNK_LANG, kITEAny, kCText, "Talin, Joe Pearce, Robert McNally"},
- {EN_ANY, kITEAny, kCText, "and Carolly Hauksdottir"},
- {DE_DEU, kITEAny, kCText, "und Carolly Hauksdottir"},
- {IT_ITA, kITEAny, kCText, "e Carolly Hauksdottir"},
- {EN_ANY, kITEAny, kCHeader, "Screenplay and Dialog"},
- {EN_ANY, kITEAny, kCText, "Robert Leh, Len Wein, and Bill Rotsler"},
- {DE_DEU, kITEAny, kCHeader, "Geschichte und Dialoge"},
- {DE_DEU, kITEAny, kCText, "Robert Leh, Len Wein und Bill Rotsler"},
- {IT_ITA, kITEAny, kCHeader, "Sceneggiatura e Dialoghi"},
- {IT_ITA, kITEAny, kCText, "Robert Leh, Len Wein e Bill Rotsler"}
- };
-
- int n_credits1 = ARRAYSIZE(credits1);
-
- static const IntroCredit credits2[] = {
- {UNK_LANG, kITEWyrmKeep, kCHeader, "Art Direction"},
- {UNK_LANG, kITEWyrmKeep, kCText, "Allison Hershey"},
- {EN_ANY, kITEAny, kCHeader, "Art"},
- {DE_DEU, kITEAny, kCHeader, "Grafiken"},
- {IT_ITA, kITEAny, kCHeader, "Grafica"},
- {UNK_LANG, kITEWyrmKeep, kCText, "Ed Lacabanne, Glenn Price, April Lee,"},
- {UNK_LANG, kITENotWyrmKeep, kCText, "Edward Lacabanne, Glenn Price, April Lee,"},
- {UNK_LANG, kITEWyrmKeep, kCText, "Lisa Sample, Brian Dowrick, Reed Waller,"},
- {EN_ANY, kITEWyrmKeep, kCText, "Allison Hershey and Talin"},
- {DE_DEU, kITEWyrmKeep, kCText, "Allison Hershey und Talin"},
- {IT_ITA, kITEWyrmKeep, kCText, "Allison Hershey e Talin"},
- {EN_ANY, kITENotWyrmKeep, kCText, "Lisa Iennaco, Brian Dowrick, Reed"},
- {EN_ANY, kITENotWyrmKeep, kCText, "Waller, Allison Hershey and Talin"},
- {DE_DEU, kITEAny, kCText, "Waller, Allison Hershey und Talin"},
- {IT_ITA, kITEAny, kCText, "Waller, Allison Hershey e Talin"},
- {EN_ANY, kITENotWyrmKeep, kCHeader, "Art Direction"},
- {DE_DEU, kITENotWyrmKeep, kCHeader, "Grafische Leitung"},
- {IT_ITA, kITENotWyrmKeep, kCHeader, "Direzione Grafica"},
- {UNK_LANG, kITENotWyrmKeep, kCText, "Allison Hershey"}
- };
-
- int n_credits2 = ARRAYSIZE(credits2);
+ int n_credits1 = ARRAYSIZE(creditsTreeHouse1);
+ int n_credits2 = ARRAYSIZE(creditsTreeHouse2);
switch (param) {
case SCENE_BEGIN:
@@ -993,8 +573,8 @@ int Scene::ITEIntroTreeHouseProc(int param) {
}
// Queue game credits list
- ITEQueueCredits(DISSOLVE_DURATION + 2000, CREDIT_DURATION1, n_credits1, credits1);
- eventColumns = ITEQueueCredits(DISSOLVE_DURATION + 7000, CREDIT_DURATION1, n_credits2, credits2);
+ queueCredits(DISSOLVE_DURATION + 2000, CREDIT_DURATION1, n_credits1, creditsTreeHouse1);
+ eventColumns = queueCredits(DISSOLVE_DURATION + 7000, CREDIT_DURATION1, n_credits2, creditsTreeHouse2);
// End scene after credit display
event.type = kEvTOneshot;
@@ -1023,34 +603,8 @@ int Scene::ITEIntroFairePathProc(int param) {
Event event;
EventColumns *eventColumns;
- static const IntroCredit credits1[] = {
- {EN_ANY, kITEAny, kCHeader, "Programming"},
- {DE_DEU, kITEAny, kCHeader, "Programmiert von"},
- {IT_ITA, kITEAny, kCHeader, "Programmazione"},
- {UNK_LANG, kITEAny, kCText, "Talin, Walter Hochbrueckner,"},
- {EN_ANY, kITEAny, kCText, "Joe Burks and Robert Wiggins"},
- {DE_DEU, kITEAny, kCText, "Joe Burks und Robert Wiggins"},
- {IT_ITA, kITEAny, kCText, "Joe Burks e Robert Wiggins"},
- {EN_ANY, kITEPCCD | kITEWyrmKeep, kCHeader, "Additional Programming"},
- {EN_ANY, kITEPCCD | kITEWyrmKeep, kCText, "John Bolton"},
- {UNK_LANG, kITEMac, kCHeader, "Macintosh Version"},
- {UNK_LANG, kITEMac, kCText, "Michael McNally and Robert McNally"},
- {EN_ANY, kITEAny, kCHeader, "Music and Sound"},
- {DE_DEU, kITEAny, kCHeader, "Musik und Sound"},
- {IT_ITA, kITEAny, kCHeader, "Musica e Sonoro"},
- {UNK_LANG, kITEAny, kCText, "Matt Nathan"}
- };
-
- int n_credits1 = ARRAYSIZE(credits1);
-
- static const IntroCredit credits2[] = {
- {EN_ANY, kITEAny, kCHeader, "Directed by"},
- {DE_DEU, kITEAny, kCHeader, "Regie"},
- {IT_ITA, kITEAny, kCHeader, "Regia"},
- {UNK_LANG, kITEAny, kCText, "Talin"}
- };
-
- int n_credits2 = ARRAYSIZE(credits2);
+ int n_credits1 = ARRAYSIZE(creditsFairePath1);
+ int n_credits2 = ARRAYSIZE(creditsFairePath2);
switch (param) {
case SCENE_BEGIN:
@@ -1073,8 +627,8 @@ int Scene::ITEIntroFairePathProc(int param) {
_vm->_events->chain(eventColumns, event);
// Queue game credits list
- ITEQueueCredits(DISSOLVE_DURATION + 2000, CREDIT_DURATION1, n_credits1, credits1);
- eventColumns = ITEQueueCredits(DISSOLVE_DURATION + 7000, CREDIT_DURATION1, n_credits2, credits2);
+ queueCredits(DISSOLVE_DURATION + 2000, CREDIT_DURATION1, n_credits1, creditsFairePath1);
+ eventColumns = queueCredits(DISSOLVE_DURATION + 7000, CREDIT_DURATION1, n_credits2, creditsFairePath2);
// End scene after credit display
event.type = kEvTOneshot;
diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp
index 710236b0c4..0b773b03f0 100644
--- a/engines/saga/introproc_saga2.cpp
+++ b/engines/saga/introproc_saga2.cpp
@@ -43,9 +43,6 @@ int Scene::DinoStartProc() {
playMovie("testvid.smk");
- // HACK: Forcibly quit here
- _vm->quitGame();
-
return SUCCESS;
}
@@ -55,9 +52,6 @@ int Scene::FTA2StartProc() {
playMovie("trimark.smk");
playMovie("intro.smk");
- // HACK: Forcibly quit here
- _vm->quitGame();
-
return SUCCESS;
}
diff --git a/engines/saga/itedata.cpp b/engines/saga/itedata.cpp
index 87b71c2cb7..da70733f4e 100644
--- a/engines/saga/itedata.cpp
+++ b/engines/saga/itedata.cpp
@@ -444,111 +444,437 @@ const RawPoint pieceOrigins[PUZZLE_PIECES] = {
};
const char *pieceNames[][PUZZLE_PIECES] = {
- { "screwdriver", "pliers", "c-clamp", "wood clamp", "level",
- "twine", "wood plane", "claw hammer", "tape measure", "hatchet",
- "shears", "ruler", "saw", "mallet", "paint brush"
+ {
+ "screwdriver", "pliers", "c-clamp", "wood clamp", "level",
+ "twine", "wood plane", "claw hammer", "tape measure", "hatchet",
+ "shears", "ruler", "saw", "mallet", "paint brush"
},
- { "Schraubendreher", "Zange", "Schraubzwinge", "Holzzwinge", "Wasserwaage",
- "Bindfaden", "Hobel", "Schusterhammer", "Bandma$", "Beil",
- "Schere", "Winkel", "S\204ge", "Hammer", "Pinsel"
+ {
+ "Schraubendreher", "Zange", "Schraubzwinge", "Holzzwinge", "Wasserwaage",
+ "Bindfaden", "Hobel", "Schusterhammer", "Bandma$", "Beil",
+ "Schere", "Winkel", "S\204ge", "Hammer", "Pinsel"
},
- { "cacciavite", "pinze", "morsa", "morsa da legno", "livella",
- "spago", "pialla", "martello", "metro a nastro", "accetta",
- "cesoie", "righello", "sega", "mazza", "pennello"
+ {
+ "cacciavite", "pinze", "morsa", "morsa da legno", "livella",
+ "spago", "pialla", "martello", "metro a nastro", "accetta",
+ "cesoie", "righello", "sega", "mazza", "pennello"
}
};
const char *hintStr[][4] = {
- { "Check which pieces could fit in each corner first.",
- "Check which corner has the least number of pieces that can fit and start from there.",
- "Check each new corner and any new side for pieces that fit.",
- "I don't see anything out of place."
- },
- { "\232berpr\201fe zun\204chst, welche die Eckteile sein k\224nnten.",
- "Schau, in welche Ecke die wenigsten Teile passen, und fang dort an.",
- "Untersuche jede Ecke und jede Seite auf Teile, die dort passen k\224nnen.",
- "Ich sehe nichts an der falschen Stelle."
- },
- { "Controlla prima quali pezzi si inseriscono meglio in ogni angolo.",
- "Controlla quale angolo ha il minor numero di pezzi che combaciano, e parti da quello.",
- "Controlla ogni nuovo angolo e lato per ogni pezzo che combacia.",
- "Non vedo nulla fuori posto."
+ {
+ "Check which pieces could fit in each corner first.",
+ "Check which corner has the least number of pieces that can fit and start from there.",
+ "Check each new corner and any new side for pieces that fit.",
+ "I don't see anything out of place."
+ },
+ {
+ "\232berpr\201fe zun\204chst, welche die Eckteile sein k\224nnten.",
+ "Schau, in welche Ecke die wenigsten Teile passen, und fang dort an.",
+ "Untersuche jede Ecke und jede Seite auf Teile, die dort passen k\224nnen.",
+ "Ich sehe nichts an der falschen Stelle."
+ },
+ {
+ "Controlla prima quali pezzi si inseriscono meglio in ogni angolo.",
+ "Controlla quale angolo ha il minor numero di pezzi che combaciano, e parti da quello.",
+ "Controlla ogni nuovo angolo e lato per ogni pezzo che combacia.",
+ "Non vedo nulla fuori posto."
}
};
const char *solicitStr[][NUM_SOLICIT_REPLIES] = {
- { "Hey, Fox! Would you like a hint?",
- "Would you like some help?",
- "Umm...Umm...",
- "Psst! want a hint?",
- "I would have done this differently, you know."
- },
- { "Hey, Fuchs! Brauchst Du \047nen Tip?",
- "M\224chtest Du etwas Hilfe?"
- "\231hm...\216hm..."
- "Psst! \047n Tip vielleicht?"
- "Ja, wei$t Du... ich h\204tte das anders gemacht."
- },
- { "Hey, Volpe! Serve un suggerimento?",
- "Hai bisogno di aiuto?",
- "Umm...Umm...",
- "Psst! Serve un aiutino?",
- "Io, sai, l'avrei fatto diversamente."
+ {
+ "Hey, Fox! Would you like a hint?",
+ "Would you like some help?",
+ "Umm...Umm...",
+ "Psst! want a hint?",
+ "I would have done this differently, you know."
+ },
+ {
+ "Hey, Fuchs! Brauchst Du \047nen Tip?",
+ "M\224chtest Du etwas Hilfe?"
+ "\231hm...\216hm..."
+ "Psst! \047n Tip vielleicht?"
+ "Ja, wei$t Du... ich h\204tte das anders gemacht."
+ },
+ {
+ "Hey, Volpe! Serve un suggerimento?",
+ "Hai bisogno di aiuto?",
+ "Umm...Umm...",
+ "Psst! Serve un aiutino?",
+ "Io, sai, l'avrei fatto diversamente."
}
};
const char *sakkaStr[][NUM_SAKKA] = {
- { "Hey, you're not supposed to help the applicants!",
- "Guys! This is supposed to be a test!",
- "C'mon fellows, that's not in the rules!"
+ {
+ "Hey, you're not supposed to help the applicants!",
+ "Guys! This is supposed to be a test!",
+ "C'mon fellows, that's not in the rules!"
},
- { "Hey, Du darfst dem Pr\201fling nicht helfen!",
- "Hallo?! Dies soll eine Pr\201fung sein!",
- "Also, Jungs. Schummeln steht nicht in den Regeln!"
+ {
+ "Hey, Du darfst dem Pr\201fling nicht helfen!",
+ "Hallo?! Dies soll eine Pr\201fung sein!",
+ "Also, Jungs. Schummeln steht nicht in den Regeln!"
},
- { "Hey, non si dovrebbero aiutare i candidati!",
- "Ragazzi! Questo dovrebbe essere un test!",
- "Forza ragazzi, non si pu\225!"
+ {
+ "Hey, non si dovrebbero aiutare i candidati!",
+ "Ragazzi! Questo dovrebbe essere un test!",
+ "Forza ragazzi, non si pu\225!"
}
};
const char *whineStr[][NUM_WHINES] = {
- { "Aww, c'mon Sakka!",
- "One hint won't hurt, will it?",
- "Sigh...",
- "I think that clipboard has gone to your head, Sakka!",
- "Well, I don't recall any specific rule against hinting."
- },
- { "Och, sei nicht so, Sakka!"
- "EIN Tip wird schon nicht schaden, oder?",
- "Seufz..."
- "Ich glaube, Du hast ein Brett vor dem Kopf, Sakka!",
- "Hm, ich kann mich an keine Regel erinnern, die Tips verbietet."
- },
- { "Ooo, suvvia Sakka!",
- "Un indizio non guaster\205, no?",
- "Sigh...",
- "Credo che questa faccenda ti abbia dato alla testa, Sakka!",
- "Beh, non ricordo regole specifiche contro i suggerimenti."
+ {
+ "Aww, c'mon Sakka!",
+ "One hint won't hurt, will it?",
+ "Sigh...",
+ "I think that clipboard has gone to your head, Sakka!",
+ "Well, I don't recall any specific rule against hinting."
+ },
+ {
+ "Och, sei nicht so, Sakka!"
+ "EIN Tip wird schon nicht schaden, oder?",
+ "Seufz..."
+ "Ich glaube, Du hast ein Brett vor dem Kopf, Sakka!",
+ "Hm, ich kann mich an keine Regel erinnern, die Tips verbietet."
+ },
+ {
+ "Ooo, suvvia Sakka!",
+ "Un indizio non guaster\205, no?",
+ "Sigh...",
+ "Credo che questa faccenda ti abbia dato alla testa, Sakka!",
+ "Beh, non ricordo regole specifiche contro i suggerimenti."
}
};
const char *optionsStr[][4] = {
- { "\"I'll do this puzzle later.\"",
- "\"Yes, I'd like a hint please.\"",
- "\"No, thank you, I'd like to try and solve it myself.\"",
- "I think the %s is in the wrong place."
- },
- { "\"Ich l\224se das Puzzle sp\204ter.\"",
- "\"Ja, ich m\224chte einen Tip, bitte.\"",
- "\"Nein danke, ich m\224chte das alleine l\224sen.\"",
- "Pssst... %s... falsche Stelle..."
- },
- { "\"Far\225 questo puzzle pi\227 tardi.\"",
- "\"Si, grazie. Ne avrei bisogno.\"",
- "\"No, grazie, voglio provare a risolverlo da solo.\"",
- "Penso che la tessera %s sia nel posto sbagliato."
+ {
+ "\"I'll do this puzzle later.\"",
+ "\"Yes, I'd like a hint please.\"",
+ "\"No, thank you, I'd like to try and solve it myself.\"",
+ "I think the %s is in the wrong place."
+ },
+ {
+ "\"Ich l\224se das Puzzle sp\204ter.\"",
+ "\"Ja, ich m\224chte einen Tip, bitte.\"",
+ "\"Nein danke, ich m\224chte das alleine l\224sen.\"",
+ "Pssst... %s... falsche Stelle..."
+ },
+ {
+ "\"Far\225 questo puzzle pi\227 tardi.\"",
+ "\"Si, grazie. Ne avrei bisogno.\"",
+ "\"No, grazie, voglio provare a risolverlo da solo.\"",
+ "Penso che la tessera %s sia nel posto sbagliato."
}
};
+const IntroDialogue introDialogueCave1[][4] = {
+ { { // English
+ 0, // cave voice 0
+ "We see the sky, we see the land, we see the water, "
+ "and we wonder: Are we the only ones?"
+ },
+ {
+ 1, // cave voice 1
+ "Long before we came to exist, the humans ruled the "
+ "Earth."
+ },
+ {
+ 2, // cave voice 2
+ "They made marvelous things, and moved whole "
+ "mountains."
+ },
+ {
+ 3, // cave voice 3
+ "They knew the Secret of Flight, the Secret of "
+ "Happiness, and other secrets beyond our imagining."
+ } },
+ // -----------------------------------------------------
+ { { // German
+ 0, // cave voice 0
+ "Um uns sind der Himmel, das Land und die Seen; und "
+ "wir fragen uns - sind wir die einzigen?"
+ },
+ {
+ 1, // cave voice 1
+ "Lange vor unserer Zeit herrschten die Menschen "
+ "\201ber die Erde."
+ },
+ {
+ 2, // cave voice 2
+ "Sie taten wundersame Dinge und versetzten ganze "
+ "Berge."
+ },
+ {
+ 3, // cave voice 3
+ "Sie kannten das Geheimnis des Fluges, das Geheimnis "
+ "der Fr\224hlichkeit und andere Geheimnisse, die "
+ "unsere Vorstellungskraft \201bersteigen."
+ } },
+ // -----------------------------------------------------
+ { { // Italian fan translation
+ 0, // cave voice 0
+ "Guardiamo il cielo, guardiamo la terra, guardiamo "
+ "l'acqua, e ci chiediamo: Siamo forse soli?"
+ },
+ {
+ 1, // cave voice 1
+ "Molto tempo prima che noi esistessimo, gli Umani "
+ "dominavano la terra."
+ },
+ {
+ 2, // cave voice 2
+ "Fecero cose meravigliose, e mossero intere "
+ "montagne."
+ },
+ {
+ 3, // cave voice 3
+ "Conoscevano il Segreto del Volo, il Segreto della "
+ "Felicit\205, ed altri segreti oltre ogni nostra "
+ "immaginazione."
+ } }
+};
+
+const IntroDialogue introDialogueCave2[][3] = {
+ { { // English
+ 4, // cave voice 4
+ "The humans also knew the Secret of Life, and they "
+ "used it to give us the Four Great Gifts:"
+ },
+ {
+ 5, // cave voice 5
+ "Thinking minds, feeling hearts, speaking mouths, and "
+ "reaching hands."
+ },
+ {
+ 6, // cave voice 6
+ "We are their children."
+ } },
+ // -----------------------------------------------------
+ { { // German
+ 4, // cave voice 4
+ "Au$erdem kannten die Menschen das Geheimnis des "
+ "Lebens. Und sie nutzten es, um uns die vier gro$en "
+ "Geschenke zu geben -"
+ },
+ {
+ 5, // cave voice 5
+ "den denkenden Geist, das f\201hlende Herz, den "
+ "sprechenden Mund und die greifende Hand."
+ },
+ {
+ 6, // cave voice 6
+ "Wir sind ihre Kinder."
+ } },
+ // -----------------------------------------------------
+ { { // Italian fan translation
+ 4, // cave voice 4
+ "Gli Umani conoscevano anche il Segreto della Vita, "
+ "e lo usarono per darci i Quattro Grandi Doni:"
+
+ },
+ {
+ 5, // cave voice 5
+ "Il pensiero, le emozioni, la parola e la manualit\205."
+
+ },
+ {
+ 6, // cave voice 6
+ "Siamo i loro figli."
+ } }
+};
+
+const IntroDialogue introDialogueCave3[][3] = {
+ { { // English
+ 7, // cave voice 7
+ "They taught us how to use our hands, and how to "
+ "speak."
+ },
+ {
+ 8, // cave voice 8
+ "They showed us the joy of using our minds."
+ },
+ {
+ 9, // cave voice 9
+ "They loved us, and when we were ready, they surely "
+ "would have given us the Secret of Happiness."
+ } },
+ // -----------------------------------------------------
+ { { // German
+ 7, // cave voice 7
+ "Sie lehrten uns zu sprechen und unsere H\204nde zu "
+ "benutzen."
+ },
+ {
+ 8, // cave voice 8
+ "Sie zeigten uns die Freude am Denken."
+ },
+ {
+ 9, // cave voice 9
+ "Sie liebten uns, und w\204ren wir bereit gewesen, "
+ "h\204tten sie uns sicherlich das Geheimnis der "
+ "Fr\224hlichkeit offenbart."
+ } },
+ // -----------------------------------------------------
+ { { // Italian fan translation
+ 7, // cave voice 7
+ "Ci insegnarono come usare le mani e come parlare. "
+
+ },
+ {
+ 8, // cave voice 8
+ "Ci mostrarono le gioie che l'uso della mente "
+ "pu\225 dare. "
+ },
+ {
+ 9, // cave voice 9
+ "Ci amarono, ed una volta pronti, ci avrebbero "
+ "sicuramente svelato il Segreto della Felicit\205."
+
+ } }
+};
+
+const IntroDialogue introDialogueCave4[][4] = {
+ { { // English
+ 10, // cave voice 10
+ "And now we see the sky, the land, and the water that "
+ "we are heirs to, and we wonder: why did they leave?"
+ },
+ {
+ 11, // cave voice 11
+ "Do they live still, in the stars? In the oceans "
+ "depths? In the wind?"
+ },
+ {
+ 12, // cave voice 12
+ "We wonder, was their fate good or evil?"
+ },
+ {
+ 13, // cave voice 13
+ "And will we also share the same fate one day?"
+ } },
+ // -----------------------------------------------------
+ { { // German
+ 10, // cave voice 10
+ "Und nun sehen wir den Himmel, das Land und die "
+ "Seen - unser Erbe. Und wir fragen uns - warum "
+ "verschwanden sie?"
+ },
+ {
+ 11, // cave voice 11
+ "Leben sie noch in den Sternen? In den Tiefen des "
+ "Ozeans? Im Wind?"
+ },
+ {
+ 12, // cave voice 12
+ "Wir fragen uns - war ihr Schicksal gut oder b\224se?"
+ },
+ {
+ 13, // cave voice 13
+ "Und wird uns eines Tages das gleiche Schicksal "
+ "ereilen?"
+ } },
+ // -----------------------------------------------------
+ { { // Italian fan translation
+ 10, // cave voice 10
+ "Ed ora che guardiamo il cielo, la terra e l'acqua "
+ "che abbiamo ereditato, pensiamo: Perch\202 partirono?"
+
+ },
+ {
+ 11, // cave voice 11
+ "Vivono ancora, nelle stelle? Nelle profondit\205 "
+ "dell'oceano? Nel vento?"
+ },
+ {
+ 12, // cave voice 12
+ "Ci domandiamo, il loro destino fu felice o nefasto?"
+ },
+ {
+ 13, // cave voice 13
+ "E un giorno, condivideremo anche noi lo stesso "
+ "destino?"
+ } }
+};
+
+const IntroCredit creditsValley[] = {
+ {Common::EN_ANY, kITECreditsAny, kITECreditsHeader, "Producer"},
+ {Common::DE_DEU, kITECreditsAny, kITECreditsHeader, "Produzent"},
+ {Common::IT_ITA, kITECreditsAny, kITECreditsHeader, "Produttore"},
+ {Common::UNK_LANG, kITECreditsAny, kITECreditsText, "Walter Hochbrueckner"},
+ {Common::EN_ANY, kITECreditsAny, kITECreditsHeader, "Executive Producer"},
+ {Common::DE_DEU, kITECreditsAny, kITECreditsHeader, "Ausf\201hrender Produzent"},
+ {Common::IT_ITA, kITECreditsAny, kITECreditsHeader, "Produttore Esecutivo"},
+ {Common::UNK_LANG, kITECreditsAny, kITECreditsText, "Robert McNally"},
+ {Common::UNK_LANG, kITECreditsWyrmKeep, kITECreditsHeader, "2nd Executive Producer"},
+ {Common::EN_ANY, kITECreditsNotWyrmKeep, kITECreditsHeader, "Publisher"},
+ {Common::DE_DEU, kITECreditsNotWyrmKeep, kITECreditsHeader, "Herausgeber"},
+ {Common::IT_ITA, kITECreditsNotWyrmKeep, kITECreditsHeader, "Editore"},
+ {Common::UNK_LANG, kITECreditsAny, kITECreditsText, "Jon Van Caneghem"}
+};
+
+const IntroCredit creditsTreeHouse1[] = {
+ {Common::EN_ANY, kITECreditsAny, kITECreditsHeader, "Game Design"},
+ {Common::DE_DEU, kITECreditsAny, kITECreditsHeader, "Spielentwurf"},
+ {Common::IT_ITA, kITECreditsAny, kITECreditsHeader, "Progetto"},
+ {Common::UNK_LANG, kITECreditsAny, kITECreditsText, "Talin, Joe Pearce, Robert McNally"},
+ {Common::EN_ANY, kITECreditsAny, kITECreditsText, "and Carolly Hauksdottir"},
+ {Common::DE_DEU, kITECreditsAny, kITECreditsText, "und Carolly Hauksdottir"},
+ {Common::IT_ITA, kITECreditsAny, kITECreditsText, "e Carolly Hauksdottir"},
+ {Common::EN_ANY, kITECreditsAny, kITECreditsHeader, "Screenplay and Dialog"},
+ {Common::EN_ANY, kITECreditsAny, kITECreditsText, "Robert Leh, Len Wein, and Bill Rotsler"},
+ {Common::DE_DEU, kITECreditsAny, kITECreditsHeader, "Geschichte und Dialoge"},
+ {Common::DE_DEU, kITECreditsAny, kITECreditsText, "Robert Leh, Len Wein und Bill Rotsler"},
+ {Common::IT_ITA, kITECreditsAny, kITECreditsHeader, "Sceneggiatura e Dialoghi"},
+ {Common::IT_ITA, kITECreditsAny, kITECreditsText, "Robert Leh, Len Wein e Bill Rotsler"}
+};
+
+const IntroCredit creditsTreeHouse2[] = {
+ {Common::UNK_LANG, kITECreditsWyrmKeep, kITECreditsHeader, "Art Direction"},
+ {Common::UNK_LANG, kITECreditsWyrmKeep, kITECreditsText, "Allison Hershey"},
+ {Common::EN_ANY, kITECreditsAny, kITECreditsHeader, "Art"},
+ {Common::DE_DEU, kITECreditsAny, kITECreditsHeader, "Grafiken"},
+ {Common::IT_ITA, kITECreditsAny, kITECreditsHeader, "Grafica"},
+ {Common::UNK_LANG, kITECreditsWyrmKeep, kITECreditsText, "Ed Lacabanne, Glenn Price, April Lee,"},
+ {Common::UNK_LANG, kITECreditsNotWyrmKeep, kITECreditsText, "Edward Lacabanne, Glenn Price, April Lee,"},
+ {Common::UNK_LANG, kITECreditsWyrmKeep, kITECreditsText, "Lisa Sample, Brian Dowrick, Reed Waller,"},
+ {Common::EN_ANY, kITECreditsWyrmKeep, kITECreditsText, "Allison Hershey and Talin"},
+ {Common::DE_DEU, kITECreditsWyrmKeep, kITECreditsText, "Allison Hershey und Talin"},
+ {Common::IT_ITA, kITECreditsWyrmKeep, kITECreditsText, "Allison Hershey e Talin"},
+ {Common::EN_ANY, kITECreditsNotWyrmKeep, kITECreditsText, "Lisa Iennaco, Brian Dowrick, Reed"},
+ {Common::EN_ANY, kITECreditsNotWyrmKeep, kITECreditsText, "Waller, Allison Hershey and Talin"},
+ {Common::DE_DEU, kITECreditsAny, kITECreditsText, "Waller, Allison Hershey und Talin"},
+ {Common::IT_ITA, kITECreditsAny, kITECreditsText, "Waller, Allison Hershey e Talin"},
+ {Common::EN_ANY, kITECreditsNotWyrmKeep, kITECreditsHeader, "Art Direction"},
+ {Common::DE_DEU, kITECreditsNotWyrmKeep, kITECreditsHeader, "Grafische Leitung"},
+ {Common::IT_ITA, kITECreditsNotWyrmKeep, kITECreditsHeader, "Direzione Grafica"},
+ {Common::UNK_LANG, kITECreditsNotWyrmKeep, kITECreditsText, "Allison Hershey"}
+};
+
+const IntroCredit creditsFairePath1[] = {
+ {Common::EN_ANY, kITECreditsAny, kITECreditsHeader, "Programming"},
+ {Common::DE_DEU, kITECreditsAny, kITECreditsHeader, "Programmiert von"},
+ {Common::IT_ITA, kITECreditsAny, kITECreditsHeader, "Programmazione"},
+ {Common::UNK_LANG, kITECreditsAny, kITECreditsText, "Talin, Walter Hochbrueckner,"},
+ {Common::EN_ANY, kITECreditsAny, kITECreditsText, "Joe Burks and Robert Wiggins"},
+ {Common::DE_DEU, kITECreditsAny, kITECreditsText, "Joe Burks und Robert Wiggins"},
+ {Common::IT_ITA, kITECreditsAny, kITECreditsText, "Joe Burks e Robert Wiggins"},
+ {Common::EN_ANY, kITECreditsPCCD | kITECreditsWyrmKeep, kITECreditsHeader, "Additional Programming"},
+ {Common::EN_ANY, kITECreditsPCCD | kITECreditsWyrmKeep, kITECreditsText, "John Bolton"},
+ {Common::UNK_LANG, kITECreditsMac, kITECreditsHeader, "Macintosh Version"},
+ {Common::UNK_LANG, kITECreditsMac, kITECreditsText, "Michael McNally and Robert McNally"},
+ {Common::EN_ANY, kITECreditsAny, kITECreditsHeader, "Music and Sound"},
+ {Common::DE_DEU, kITECreditsAny, kITECreditsHeader, "Musik und Sound"},
+ {Common::IT_ITA, kITECreditsAny, kITECreditsHeader, "Musica e Sonoro"},
+ {Common::UNK_LANG, kITECreditsAny, kITECreditsText, "Matt Nathan"}
+};
+
+const IntroCredit creditsFairePath2[] = {
+ {Common::EN_ANY, kITECreditsAny, kITECreditsHeader, "Directed by"},
+ {Common::DE_DEU, kITECreditsAny, kITECreditsHeader, "Regie"},
+ {Common::IT_ITA, kITECreditsAny, kITECreditsHeader, "Regia"},
+ {Common::UNK_LANG, kITECreditsAny, kITECreditsText, "Talin"}
+};
+
} // End of namespace Saga
diff --git a/engines/saga/itedata.h b/engines/saga/itedata.h
index d27b84781f..f9416652bf 100644
--- a/engines/saga/itedata.h
+++ b/engines/saga/itedata.h
@@ -79,6 +79,32 @@ struct IteFxTable {
byte vol;
};
+struct IntroDialogue {
+ uint32 i_voice_rn;
+ const char *i_str;
+};
+
+struct IntroCredit {
+ Common::Language lang;
+ int game;
+ int type;
+ const char *string;
+};
+
+enum {
+ kITECreditsHeader,
+ kITECreditsText
+};
+
+enum {
+ kITECreditsPC = (1 << 0),
+ kITECreditsPCCD = (1 << 1),
+ kITECreditsMac = (1 << 2),
+ kITECreditsWyrmKeep = (1 << 3),
+ kITECreditsAny = 0xffff,
+ kITECreditsNotWyrmKeep = kITECreditsAny & ~kITECreditsWyrmKeep
+};
+
#define ITE_OBJECTCOUNT 39
#define ITE_SFXCOUNT 63
@@ -106,6 +132,17 @@ extern const char *hintStr[][4];
extern const char portraitList[];
extern const char *optionsStr[][4];
+extern const IntroDialogue introDialogueCave1[][4];
+extern const IntroDialogue introDialogueCave2[][3];
+extern const IntroDialogue introDialogueCave3[][3];
+extern const IntroDialogue introDialogueCave4[][4];
+
+extern const IntroCredit creditsValley[13];
+extern const IntroCredit creditsTreeHouse1[13];
+extern const IntroCredit creditsTreeHouse2[19];
+extern const IntroCredit creditsFairePath1[15];
+extern const IntroCredit creditsFairePath2[4];
+
} // End of namespace Saga
#endif
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index e444900967..d20882ca26 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -147,7 +147,7 @@ Music::Music(SagaEngine *vm, Audio::Mixer *mixer) : _vm(vm), _mixer(mixer) {
if (!_musicContext) {
if (_vm->getGameId() == GID_ITE) {
_musicContext = _vm->_resource->getContext(GAME_RESOURCEFILE);
- } else {
+ } else if (_vm->getGameId() == GID_IHNM) {
// I've listened to music from both the FM and the GM
// file, and I've tentatively reached the conclusion
// that they are both General MIDI. My guess is that
@@ -173,6 +173,8 @@ Music::Music(SagaEngine *vm, Audio::Mixer *mixer) : _vm(vm), _mixer(mixer) {
// Note that the IHNM demo has only got one music file
// (music.rsc). It is assumed that it contains FM music
_musicContext = _vm->_resource->getContext(GAME_MUSICFILE_FM);
+ } else if (_vm->getGameId() == GID_DINO || _vm->getGameId() == GID_FTA2) {
+ _musicContext = _vm->_resource->getContext(GAME_SOUNDFILE);
}
}
@@ -255,19 +257,18 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
_mixer->stopHandle(_musicHandle);
_player->stop();
- int realTrackNumber;
+ int realTrackNumber = 0;
if (_vm->getGameId() == GID_ITE) {
- if (flags == MUSIC_DEFAULT) {
- if (resourceId == 13 || resourceId == 19) {
- flags = MUSIC_NORMAL;
- } else {
- flags = MUSIC_LOOP;
- }
- }
+ if (flags == MUSIC_NORMAL && (resourceId == 13 || resourceId == 19))
+ flags = MUSIC_LOOP;
realTrackNumber = resourceId - 8;
- } else {
+ } else if (_vm->getGameId() == GID_IHNM) {
+ realTrackNumber = resourceId + 1;
+ } else if (_vm->getGameId() == GID_DINO || _vm->getGameId() == GID_FTA2) {
realTrackNumber = resourceId + 1;
+ uint32 musicTrackTag = MKTAG('X','M','I', (byte)(resourceId + 1));
+ resourceId = _musicContext->getEntryNum(musicTrackTag);
}
// Try to open standalone digital track
@@ -359,9 +360,6 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
return;
}
- if (flags == MUSIC_DEFAULT)
- flags = MUSIC_NORMAL;
-
// Load MIDI/XMI resource data
if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) {
// Load the external music file for Mac IHNM
diff --git a/engines/saga/music.h b/engines/saga/music.h
index ba44c3ca71..2106fb6fa6 100644
--- a/engines/saga/music.h
+++ b/engines/saga/music.h
@@ -37,8 +37,7 @@ namespace Saga {
enum MusicFlags {
MUSIC_NORMAL = 0,
- MUSIC_LOOP = 0x0001,
- MUSIC_DEFAULT = 0xffff
+ MUSIC_LOOP = 0x0001
};
class MusicDriver : public Audio::MidiPlayer {
@@ -72,7 +71,7 @@ public:
bool isPlaying();
bool hasDigitalMusic() { return _digitalMusic; }
- void play(uint32 resourceId, MusicFlags flags = MUSIC_DEFAULT);
+ void play(uint32 resourceId, MusicFlags flags = MUSIC_NORMAL);
void pause();
void resume();
void stop();
diff --git a/engines/saga/resource.cpp b/engines/saga/resource.cpp
index cdf674dc66..1fb9ac1c04 100644
--- a/engines/saga/resource.cpp
+++ b/engines/saga/resource.cpp
@@ -304,21 +304,13 @@ void Resource::clearContexts() {
}
void Resource::loadResource(ResourceContext *context, uint32 resourceId, ByteArray &resourceBuffer) {
- Common::File *file;
- uint32 resourceOffset;
- ResourceData *resourceData;
-
-
- resourceData = context->getResourceData(resourceId);
-
- file = context->getFile(resourceData);
-
- resourceOffset = resourceData->offset;
+ ResourceData *resourceData = context->getResourceData(resourceId);
+ Common::File *file = context->getFile(resourceData);
+ uint32 resourceOffset = resourceData->offset;
debug(8, "loadResource %d 0x%X:0x%X", resourceId, resourceOffset, uint(resourceData->size));
resourceBuffer.resize(resourceData->size);
-
file->seek((long)resourceOffset, SEEK_SET);
if (file->read(resourceBuffer.getBuffer(), resourceBuffer.size()) != resourceBuffer.size()) {
diff --git a/engines/saga/resource.h b/engines/saga/resource.h
index 252e92c967..2a1aaf3103 100644
--- a/engines/saga/resource.h
+++ b/engines/saga/resource.h
@@ -60,12 +60,13 @@ struct PatchData {
struct ResourceData {
uint32 id; // SAGA2
+ uint32 category; // SAGA2
size_t offset;
size_t size;
PatchData *patchData;
ResourceData() :
- id(0), offset(0), size(0), patchData(NULL) {
+ id(0), category(0), offset(0), size(0), patchData(NULL) {
}
~ResourceData() {
@@ -130,10 +131,15 @@ public:
// SAGA 2
int32 getEntryNum(uint32 id) {
int32 num = 0;
+ uint32 miloCategory = MKTAG('M', 'I', 'L', 'O');
+
for (ResourceDataArray::const_iterator i = _table.begin(); i != _table.end(); ++i) {
- if (i->id == id) {
+ //uint32 c = i->category;
+ //debug("%c%c%c%c, offset: %d, size: %d", (c >> 24), (c >> 16) & 0xFF, (c >> 8) & 0xFF, c & 0xFF, i->offset, i->size);
+ // Ignore low quality music resources (MILO)
+ if (i->id == id && i->category != miloCategory)
return num;
- }
+
num++;
}
return -1;
@@ -282,6 +288,10 @@ protected:
return loadResV2(contextSize);
}
bool loadResV2(uint32 contextSize);
+
+ void readCategory(ResourceData &element);
+ void readEntry(ResourceData &element);
+ uint32 getCategory(uint32 resourceOffset);
};
class Resource_HRS : public Resource {
diff --git a/engines/saga/resource_hrs.cpp b/engines/saga/resource_hrs.cpp
index 09da9cf0bb..ba58830269 100644
--- a/engines/saga/resource_hrs.cpp
+++ b/engines/saga/resource_hrs.cpp
@@ -39,13 +39,35 @@
namespace Saga {
-void readElement(Common::File &file, Saga::ResourceData &element) {
- element.id = file.readUint32BE();
- element.offset = file.readUint32LE();
- element.size = file.readUint32LE();
+void ResourceContext_HRS::readCategory(ResourceData &element) {
+ element.id = _file.readUint32BE();
+ element.offset = _file.readUint32LE();
+ element.size = _file.readUint32LE();
+ element.category = 0;
+ debug(3, "Category: id %u, offset %u, size %u", element.id, (uint)element.offset, (uint)element.size);
+}
+
+void ResourceContext_HRS::readEntry(ResourceData &element) {
+ element.id = _file.readUint32BE();
+ element.offset = _file.readUint32LE();
+ element.size = _file.readUint32LE();
+ element.category = getCategory(_file.pos());
debug(3, "Entry: id %u, offset %u, size %u", element.id, (uint)element.offset, (uint)element.size);
}
+uint32 ResourceContext_HRS::getCategory(uint32 resourceOffset) {
+ for (int i = _categories.size() - 1; i >= 0; --i) {
+ if (resourceOffset >= _categories[i].offset)
+ return _categories[i].id;
+ }
+
+ error("Unknown category for offset %d", resourceOffset);
+}
+
+static bool categorySortHelper(const ResourceData &r1, const ResourceData &r2) {
+ return r1.offset < r2.offset;
+}
+
bool ResourceContext_HRS::loadResV2(uint32 contextSize) {
ResourceData origin;
uint32 firstEntryOffset;
@@ -56,7 +78,7 @@ bool ResourceContext_HRS::loadResV2(uint32 contextSize) {
debug(3, "Context %s =====", _fileName);
_file.seek(0, SEEK_SET);
- readElement(_file, origin);
+ readCategory(origin);
// Check if the file is valid
if (origin.id != MKTAG('H','R','E','S')) { // header
@@ -74,18 +96,23 @@ bool ResourceContext_HRS::loadResV2(uint32 contextSize) {
// Read categories
count = origin.size / resourceSize;
- debug(3, "Categories: %d =====", count);
+ debug(3, "File: %s, categories: %d =====", _file.getName(), count);
for (i = 0; i < count; i++) {
- readElement(_file, _categories[i]);
+ readCategory(_categories[i]);
+ //uint32 id = _categories[i].id;
+ //debug("%i: %c%c%c%c, offset: %d, size: %d", i, (id >> 24), (id >> 16) & 0xFF, (id >> 8) & 0xFF, id & 0xFF, _categories[i].offset, _categories[i].size);
}
+ Common::sort(_categories.begin(), _categories.end(), categorySortHelper);
+
_file.seek(firstEntryOffset, SEEK_SET);
// Read table entries
count = tableSize / resourceSize;
- debug(3, "Entries: %d =====", count);
+ debug(3, "File: %s, entries: %d =====", _file.getName(), count);
for (i = 0; i < count; i++) {
- readElement(_file, _table[i]);
+ readEntry(_table[i]);
+ //debug("%i: offset: %d, size: %d", i, _table[i].offset, _table[i].size);
}
return true;
}
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index b15d161ba3..3d38b3ea52 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -341,7 +341,6 @@ Common::Error SagaEngine::run() {
syncSoundSettings();
} else {
_framesEsc = 0;
- //_sndRes->playVoice(0); // SAGA 2 sound test
_scene->startScene();
}
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index 04776bd5dc..f19645dd99 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -789,13 +789,7 @@ void Scene::loadScene(LoadSceneParams &loadSceneParams) {
if (_vm->getGameId() == GID_ITE) {
if (_sceneDescription.musicResourceId >= 0) {
- event.type = kEvTOneshot;
- event.code = kMusicEvent;
- event.param = _sceneDescription.musicResourceId;
- event.param2 = MUSIC_DEFAULT;
- event.op = kEventPlay;
- event.time = 0;
- _vm->_events->queue(event);
+ _vm->_events->queueMusic(_sceneDescription.musicResourceId);
} else {
event.type = kEvTOneshot;
event.code = kMusicEvent;
diff --git a/engines/saga/scene.h b/engines/saga/scene.h
index 0a3b98b33f..6a9571d282 100644
--- a/engines/saga/scene.h
+++ b/engines/saga/scene.h
@@ -182,34 +182,8 @@ typedef Common::List<LoadSceneParams> SceneQueueList;
#define IHNM_TITLE_TIME_GM 28750
#define IHNM_TITLE_TIME_FM 19500
-///// ITE-specific stuff
-#define ITE_INTRO_FRAMETIME 90
-
-#define INTRO_CAPTION_Y 170
-#define INTRO_DE_CAPTION_Y 160
-#define INTRO_IT_CAPTION_Y 160
-#define VOICE_PAD 50
-#define VOICE_LETTERLEN 90
-
-#define PALETTE_FADE_DURATION 1000
-#define DISSOLVE_DURATION 3000
-#define LOGO_DISSOLVE_DURATION 1000
-
#define CREDIT_DURATION1 4000
-struct IntroDialogue {
- uint32 i_voice_rn;
- const char *i_str;
-};
-
-struct IntroCredit {
- Common::Language lang;
- int game;
- int type;
- const char *string;
-};
-
-
class Scene {
public:
Scene(SagaEngine *vm);
@@ -431,13 +405,10 @@ class Scene {
static int SC_ITEIntroFaireTentProc(int param, void *refCon);
private:
- EventColumns *ITEQueueDialogue(EventColumns *eventColumns, int n_dialogues, const IntroDialogue dialogue[]);
- EventColumns *ITEQueueCredits(int delta_time, int duration, int n_credits, const IntroCredit credits[]);
+ EventColumns *queueIntroDialogue(EventColumns *eventColumns, int n_dialogues, const IntroDialogue dialogue[]);
+ EventColumns *queueCredits(int delta_time, int duration, int n_credits, const IntroCredit credits[]);
int ITEIntroAnimProc(int param);
- int ITEIntroCave1Proc(int param);
- int ITEIntroCave2Proc(int param);
- int ITEIntroCave3Proc(int param);
- int ITEIntroCave4Proc(int param);
+ int ITEIntroCaveCommonProc(int param, int caveScene);
int ITEIntroValleyProc(int param);
int ITEIntroTreeHouseProc(int param);
int ITEIntroFairePathProc(int param);
diff --git a/engines/saga/sfuncs_ihnm.cpp b/engines/saga/sfuncs_ihnm.cpp
index 6957360942..e3e3c1ca11 100644
--- a/engines/saga/sfuncs_ihnm.cpp
+++ b/engines/saga/sfuncs_ihnm.cpp
@@ -421,14 +421,7 @@ void Script::sfQueueMusic(SCRIPTFUNC_PARAMS) {
warning("sfQueueMusic: Wrong song number (%d > %d)", param1, _vm->_music->_songTable.size() - 1);
} else {
_vm->_music->setVolume(_vm->_musicVolume, 1);
- event.type = kEvTOneshot;
- event.code = kMusicEvent;
- event.param = _vm->_music->_songTable[param1];
- event.param2 = param2 ? MUSIC_LOOP : MUSIC_NORMAL;
- event.op = kEventPlay;
- event.time = _vm->ticksToMSec(1000);
-
- _vm->_events->queue(event);
+ _vm->_events->queueMusic(_vm->_music->_songTable[param1], param2, _vm->ticksToMSec(1000));
if (!_vm->_scene->haveChapterPointsChanged()) {
_vm->_scene->setCurrentMusicTrack(param1);
diff --git a/engines/saga/shorten.cpp b/engines/saga/shorten.cpp
index 426430c892..edb12a3dd9 100644
--- a/engines/saga/shorten.cpp
+++ b/engines/saga/shorten.cpp
@@ -29,6 +29,8 @@
// Based on etree's Shorten tool, version 3.6.1
// http://etree.org/shnutils/shorten/
+// and
+// https://github.com/soiaf/Java-Shorten-decoder
// FIXME: This doesn't work yet correctly
@@ -154,6 +156,7 @@ uint32 ShortenGolombReader::getUint32(uint32 numBits) {
byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, byte &flags) {
int32 *buffer[2], *offset[2]; // up to 2 channels
+ int32 *oldValues[2];
byte *unpackedBuffer = 0;
byte *pBuf = unpackedBuffer;
int prevSize = 0;
@@ -190,15 +193,18 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by
switch (type) {
case kTypeS8:
+ mean = 0;
break;
case kTypeU8:
flags |= Audio::FLAG_UNSIGNED;
+ mean = 0x80;
break;
case kTypeS16LH:
flags |= Audio::FLAG_LITTLE_ENDIAN;
// fallthrough
case kTypeS16HL:
flags |= Audio::FLAG_16BITS;
+ mean = 0;
break;
case kTypeU16LH:
flags |= Audio::FLAG_LITTLE_ENDIAN;
@@ -206,6 +212,7 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by
case kTypeU16HL:
flags |= Audio::FLAG_16BITS;
flags |= Audio::FLAG_UNSIGNED;
+ mean = 0x8000;
break;
case kTypeWAV:
// TODO: Perhaps implement this if we find WAV Shorten encoded files
@@ -264,8 +271,10 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by
for (i = 0; i < channels; i++) {
buffer[i] = (int32 *)malloc((blockSize + wrap) * 4);
offset[i] = (int32 *)malloc((MAX<uint32>(1, mean)) * 4);
+ oldValues[i] = (int32 *)malloc(64 * 4);
memset(buffer[i], 0, (blockSize + wrap) * 4);
memset(offset[i], 0, (MAX<uint32>(1, mean)) * 4);
+ memset(oldValues[i], 0, 64 * 4);
}
if (maxLPC > 0)
@@ -329,9 +338,6 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by
channelOffset = (channelOffset >> (bitShift - 1)) >> 1;
}
- // FIXME: The original code in this bit tries to modify memory outside of the array (negative indices)
- // in cases kCmdDiff1, kCmdDiff2 and kCmdDiff3
- // I've removed those invalid writes, since they happen all the time (even when curChannel is 0)
switch (cmd) {
case kCmdZero:
for (i = 0; i < blockSize; i++)
@@ -342,22 +348,34 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by
buffer[curChannel][i] = gReader->getSRice(energy) + channelOffset;
break;
case kCmdDiff1:
- gReader->getSRice(energy); // i = 0 (to fix invalid table/memory access)
- for (i = 1; i < blockSize; i++)
- buffer[curChannel][i] = gReader->getSRice(energy) + buffer[curChannel][i - 1];
+ for (i = 0; i < blockSize; i++) {
+ if (i == 0)
+ buffer[curChannel][i] = gReader->getSRice(energy) + oldValues[curChannel][0];
+ else
+ buffer[curChannel][i] = gReader->getSRice(energy) + buffer[curChannel][i - 1];
+ }
break;
case kCmdDiff2:
- gReader->getSRice(energy); // i = 0 (to fix invalid table/memory access)
- gReader->getSRice(energy); // i = 1 (to fix invalid table/memory access)
- for (i = 2; i < blockSize; i++)
- buffer[curChannel][i] = gReader->getSRice(energy) + 2 * buffer[curChannel][i - 1] - buffer[curChannel][i - 2];
+ for (i = 0; i < blockSize; i++) {
+ if (i == 0)
+ buffer[curChannel][i] = gReader->getSRice(energy) + 2 * oldValues[curChannel][0] - oldValues[curChannel][1];
+ else if (i == 1)
+ buffer[curChannel][i] = gReader->getSRice(energy) + 2 * buffer[curChannel][0] - oldValues[curChannel][0];
+ else
+ buffer[curChannel][i] = gReader->getSRice(energy) + 2 * buffer[curChannel][i - 1] - buffer[curChannel][i - 2];
+ }
break;
case kCmdDiff3:
- gReader->getSRice(energy); // i = 0 (to fix invalid table/memory access)
- gReader->getSRice(energy); // i = 1 (to fix invalid table/memory access)
- gReader->getSRice(energy); // i = 2 (to fix invalid table/memory access)
- for (i = 3; i < blockSize; i++)
- buffer[curChannel][i] = gReader->getSRice(energy) + 3 * (buffer[curChannel][i - 1] - buffer[curChannel][i - 2]) + buffer[curChannel][i - 3];
+ for (i = 0; i < blockSize; i++) {
+ if (i == 0)
+ buffer[curChannel][i] = gReader->getSRice(energy) + 3 * (oldValues[curChannel][0] - oldValues[curChannel][1]) + oldValues[curChannel][2];
+ else if (i == 1)
+ buffer[curChannel][i] = gReader->getSRice(energy) + 3 * (buffer[curChannel][0] - oldValues[curChannel][0]) + oldValues[curChannel][1];
+ else if (i == 2)
+ buffer[curChannel][i] = gReader->getSRice(energy) + 3 * (buffer[curChannel][1] - buffer[curChannel][0]) + oldValues[curChannel][0];
+ else
+ buffer[curChannel][i] = gReader->getSRice(energy) + 3 * (buffer[curChannel][i - 1] - buffer[curChannel][i - 2]) + buffer[curChannel][i - 3];
+ }
break;
case kCmdQLPC:
lpcNum = gReader->getURice(2);
@@ -417,10 +435,12 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by
// Do the wrap
- // FIXME: removed for now, as this corrupts the heap, because it
- // accesses negative array indices
- //for (int32 k = -wrap; k < 0; k++)
- // buffer[curChannel][k] = buffer[curChannel][k + blockSize];
+ for (i = 0; i < 64; ++i)
+ oldValues[curChannel][i] = 0;
+
+ int arrayTerminator = MIN<int>(64, blockSize);
+ for (i = 0; i < arrayTerminator; ++i)
+ oldValues[curChannel][i] = buffer[curChannel][blockSize - (i + 1)];
// Fix bitshift
if (bitShift > 0) {
@@ -495,6 +515,7 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by
for (i = 0; i < channels; i++) {
free(buffer[i]);
free(offset[i]);
+ free(oldValues[i]);
}
if (maxLPC > 0)
@@ -516,6 +537,7 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by
for (i = 0; i < channels; i++) {
free(buffer[i]);
free(offset[i]);
+ free(oldValues[i]);
}
if (maxLPC > 0)
diff --git a/engines/saga/sndres.h b/engines/saga/sndres.h
index 554eed4a27..5115873d76 100644
--- a/engines/saga/sndres.h
+++ b/engines/saga/sndres.h
@@ -45,6 +45,7 @@ public:
void playVoice(uint32 resourceId);
int getVoiceLength(uint32 resourceId);
void setVoiceBank(int serial);
+ int getVoiceBank() { return _voiceSerial; }
Common::Array<FxTable> _fxTable;
diff --git a/engines/savestate.h b/engines/savestate.h
index 970e01485d..54eff0f8cb 100644
--- a/engines/savestate.h
+++ b/engines/savestate.h
@@ -140,7 +140,7 @@ public:
* Sets the time the game was played before the save state was created.
*
* @param hours How many hours the user played the game so far.
- * @param min How many minutes the user played the game so far.
+ * @param minutes How many minutes the user played the game so far.
*/
void setPlayTime(int hours, int minutes);
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 344298ce9a..91b3c45c6e 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -2607,6 +2607,25 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ // Phantasmagoria - French DOS
+ // Supplied by Kervala in bug #6574
+ {"phantasmagoria", "", {
+ {"resmap.001", 0, "4da82dd336d4b9cd8c16f3cc11f0c615", 11524},
+ {"ressci.001", 0, "3aae6559aa1df273bc542d5ac6330d75", 69963685},
+ {"resmap.002", 0, "4f40f43f2b60bf765864433069752bb9", 12064},
+ {"ressci.002", 0, "3aae6559aa1df273bc542d5ac6330d75", 78362841},
+ {"resmap.003", 0, "6a392a86f14b6ddb4422978ee71e54ac", 12340},
+ {"ressci.003", 0, "3aae6559aa1df273bc542d5ac6330d75", 80431189},
+ {"resmap.004", 0, "df2e9462c41202de5f3843908c95a715", 12562},
+ {"ressci.004", 0, "3aae6559aa1df273bc542d5ac6330d75", 82542844},
+ {"resmap.005", 0, "43efd3fe834286c70a2c8b4cd747c1e2", 12616},
+ {"ressci.005", 0, "3aae6559aa1df273bc542d5ac6330d75", 83790486},
+ {"resmap.006", 0, "b3065e54a00190752a06dacd201b5058", 12538},
+ {"ressci.006", 0, "3aae6559aa1df273bc542d5ac6330d75", 85415107},
+ {"resmap.007", 0, "5633960bc106c39ca91d2d8fce18fd2d", 7984},
+ AD_LISTEND},
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
// Phantasmagoria - English DOS Demo
// Executable scanning reports "2.100.002"
{"phantasmagoria", "Demo", {
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp
index 31e7ca4931..be062dba64 100644
--- a/engines/sci/engine/features.cpp
+++ b/engines/sci/engine/features.cpp
@@ -344,9 +344,9 @@ bool GameFeatures::autoDetectGfxFunctionsType(int methodNum) {
if (kFuncNum == 8) { // kDrawPic (SCI0 - SCI11)
// If kDrawPic is called with 6 parameters from the overlay
// selector, the game is using old graphics functions.
- // Otherwise, if it's called with 8 parameters, it's using new
- // graphics functions.
- _gfxFunctionsType = (argc == 8) ? SCI_VERSION_0_LATE : SCI_VERSION_0_EARLY;
+ // Otherwise, if it's called with 8 parameters (e.g. SQ3) or 4 parameters
+ // (e.g. Hoyle 1/2), it's using new graphics functions.
+ _gfxFunctionsType = (argc == 6) ? SCI_VERSION_0_EARLY : SCI_VERSION_0_LATE;
return true;
}
}
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index fc46d16b8d..0c2fd4e3ea 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -468,7 +468,8 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(TimesSin), SIG_EVERYWHERE, "ii", NULL, NULL },
{ "SinMult", kTimesSin, SIG_EVERYWHERE, "ii", NULL, NULL },
{ MAP_CALL(TimesTan), SIG_EVERYWHERE, "ii", NULL, NULL },
- { MAP_CALL(UnLoad), SIG_EVERYWHERE, "i[ri]", NULL, kUnLoad_workarounds },
+ { MAP_CALL(UnLoad), SIG_EVERYWHERE, "i[ir!]", NULL, kUnLoad_workarounds },
+ // ^ We allow invalid references here (e.g. bug #6600), since they will be invalidated anyway by the call itself
{ MAP_CALL(ValidPath), SIG_EVERYWHERE, "r", NULL, NULL },
{ MAP_CALL(Wait), SIG_EVERYWHERE, "i", NULL, NULL },
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 3738fd3dcb..58c2b8d3e3 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -371,7 +371,7 @@ void SegManager::freeHunkEntry(reg_t addr) {
HunkTable *ht = (HunkTable *)getSegment(addr.getSegment(), SEG_TYPE_HUNK);
if (!ht) {
- warning("Attempt to free Hunk from address %04x:%04x: Invalid segment type", PRINT_REG(addr));
+ warning("Attempt to free Hunk from address %04x:%04x: Invalid segment type %d", PRINT_REG(addr), getSegmentType(addr.getSegment()));
return;
}
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 37e46b7a96..ea4dc2fe71 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -44,7 +44,8 @@ const SciWorkaroundEntry arithmeticWorkarounds[] = {
{ GID_MOTHERGOOSEHIRES,90, 90, 0, "newGameButton", "select", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_ge: MUMG Deluxe, when selecting "New Game" in the main menu. It tries to compare an integer with a list. Needs to return false for the game to continue.
{ GID_PHANTASMAGORIA, 902, 0, 0, "", "export 7", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_shr: when starting a chapter in Phantasmagoria
{ GID_QFG1VGA, 301, 928, 0, "Blink", "init", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_div: when entering the inn, gets called with 1 parameter, but 2nd parameter is used for div which happens to be an object
- { GID_QFG2, 200, 200, 0, "astro", "messages", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_lsi: when getting asked for your name by the astrologer bug #5152
+ { GID_QFG2, 200, 200, 0, "astro", "messages", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_lsi: when getting asked for your name by the astrologer - bug #5152
+ { GID_QFG3, 780, 999, 0, "", "export 6", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_add: trying to talk to yourself at the top of the giant tree - bug #6692
{ GID_QFG4, 710,64941, 0, "RandCycle", "doit", -1, 0, { WORKAROUND_FAKE, 1 } }, // op_gt: when the tentacle appears in the third room of the caves
SCI_WORKAROUNDENTRY_TERMINATOR
};
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index a322eb8e61..91b5b25e99 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -782,9 +782,13 @@ void GfxFrameout::kernelFrameout() {
// TODO: For some reason, the top left nsRect coordinates get
// swapped in the GK1 inventory screen, investigate why.
+ // This is also needed for GK1 rooms 710 and 720 (catacombs, inner and
+ // outer circle), for handling the tiles and talking to Wolfgang.
// HACK: Fix the coordinates by explicitly setting them here.
Common::Rect objNSRect = g_sci->_gfxCompare->getNSRect(itemEntry->object);
- if (objNSRect.top == nsRect.left && objNSRect.left == nsRect.top && nsRect.top != 0 && nsRect.left != 0) {
+ uint16 roomNumber = g_sci->getEngineState()->currentRoomNumber();
+ if (objNSRect.top == nsRect.left && objNSRect.left == nsRect.top && nsRect.top != 0 && nsRect.left != 0 ||
+ (g_sci->getGameId() == GID_GK1 && (roomNumber == 710 || roomNumber == 720))) {
g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
}
}
diff --git a/engines/sci/parser/said.cpp b/engines/sci/parser/said.cpp
index 693bbec744..27ebc58704 100644
--- a/engines/sci/parser/said.cpp
+++ b/engines/sci/parser/said.cpp
@@ -186,8 +186,7 @@ static bool parseList(ParseTreeNode* parentNode);
static bool parseListEntry(ParseTreeNode* parentNode);
static bool parseWord(ParseTreeNode* parentNode);
-static bool parseWord(ParseTreeNode* parentNode)
-{
+static bool parseWord(ParseTreeNode* parentNode) {
int token = said_tokens[said_token];
if (token & 0x8000)
return false;
@@ -201,8 +200,7 @@ static bool parseWord(ParseTreeNode* parentNode)
return true;
}
-static bool parsePart2(ParseTreeNode* parentNode, bool& nonempty)
-{
+static bool parsePart2(ParseTreeNode* parentNode, bool& nonempty) {
// Store current state for rolling back if we fail
int curToken = said_token;
int curTreePos = said_tree_pos;
@@ -259,8 +257,7 @@ static bool parsePart2(ParseTreeNode* parentNode, bool& nonempty)
return false;
}
-static bool parsePart3(ParseTreeNode* parentNode, bool& nonempty)
-{
+static bool parsePart3(ParseTreeNode* parentNode, bool& nonempty) {
// Store current state for rolling back if we fail
int curToken = said_token;
int curTreePos = said_tree_pos;
@@ -318,8 +315,7 @@ static bool parsePart3(ParseTreeNode* parentNode, bool& nonempty)
}
-static bool parseSlash(ParseTreeNode* parentNode)
-{
+static bool parseSlash(ParseTreeNode* parentNode) {
// Store current state for rolling back if we fail
int curToken = said_token;
int curTreePos = said_tree_pos;
@@ -343,8 +339,7 @@ static bool parseSlash(ParseTreeNode* parentNode)
}
-static bool parseRef(ParseTreeNode* parentNode)
-{
+static bool parseRef(ParseTreeNode* parentNode) {
// Store current state for rolling back if we fail
int curToken = said_token;
int curTreePos = said_tree_pos;
@@ -411,8 +406,7 @@ static bool parseRef(ParseTreeNode* parentNode)
return false;
}
-static bool parseComma(ParseTreeNode* parentNode)
-{
+static bool parseComma(ParseTreeNode* parentNode) {
// Store current state for rolling back if we fail
int curToken = said_token;
int curTreePos = said_tree_pos;
@@ -435,8 +429,7 @@ static bool parseComma(ParseTreeNode* parentNode)
return false;
}
-static bool parseListEntry(ParseTreeNode* parentNode)
-{
+static bool parseListEntry(ParseTreeNode* parentNode) {
// Store current state for rolling back if we fail
int curToken = said_token;
int curTreePos = said_tree_pos;
@@ -494,8 +487,7 @@ static bool parseListEntry(ParseTreeNode* parentNode)
return false;
}
-static bool parseList(ParseTreeNode* parentNode)
-{
+static bool parseList(ParseTreeNode* parentNode) {
// Store current state for rolling back if we fail
int curToken = said_token;
int curTreePos = said_tree_pos;
@@ -524,8 +516,7 @@ static bool parseList(ParseTreeNode* parentNode)
return false;
}
-static bool parseExpr(ParseTreeNode* parentNode)
-{
+static bool parseExpr(ParseTreeNode* parentNode) {
// Store current state for rolling back if we fail
int curToken = said_token;
int curTreePos = said_tree_pos;
@@ -546,7 +537,6 @@ static bool parseExpr(ParseTreeNode* parentNode)
said_attach_subtree(newParent, 0x141, 0x14F, newNode);
newParent = newParent->right;
-
}
found = parseRef(newParent);
@@ -561,8 +551,7 @@ static bool parseExpr(ParseTreeNode* parentNode)
return false;
}
-static bool parseSpec(ParseTreeNode* parentNode)
-{
+static bool parseSpec(ParseTreeNode* parentNode) {
// Store current state for rolling back if we fail
int curToken = said_token;
int curTreePos = said_tree_pos;
@@ -748,9 +737,7 @@ static void node_print_desc(ParseTreeNode *) { }
-
-static int matchTrees(ParseTreeNode* parseT, ParseTreeNode* saidT)
-{
+static int matchTrees(ParseTreeNode* parseT, ParseTreeNode* saidT) {
outputDepth++;
scidprintf("%*smatchTrees on ", outputDepth, "");
node_print_desc(parseT);
diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp
index b4a223dcff..3344b79e26 100644
--- a/engines/sci/parser/vocabulary.cpp
+++ b/engines/sci/parser/vocabulary.cpp
@@ -530,18 +530,19 @@ bool Vocabulary::tokenizeString(ResultWordListList &retval, const char *sentence
*error = NULL;
do {
-
c = sentence[pos_in_sentence++];
+
if (Common::isAlnum(c) || (c == '-' && wordLen) || (c >= 0x80)) {
currentWord[wordLen] = lowerCaseMap[c];
++wordLen;
- }
- // Continue on this word */
- // Words may contain a '-', but may not
- // start with one.
- else {
- if (wordLen) { // Finished a word?
+ } else if (c == '\'' && wordLen && (sentence[pos_in_sentence] == 's' || sentence[pos_in_sentence] == 'S')) {
+ // Skip apostrophe-s at the end of the word, if it exists
+ pos_in_sentence++; // skip the 's'
+ } else {
+ // Continue on this word. Words may contain a '-', but may not start with
+ // one.
+ if (wordLen) { // Finished a word?
ResultWordList lookup_result;
// Look it up
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index 31c9d90de8..80a72b9a6f 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -398,8 +398,7 @@ void MidiPlayer_Midi::playSwitch(bool play) {
}
}
-bool MidiPlayer_Midi::isMt32GmPatch(const byte *data, int size)
-{
+bool MidiPlayer_Midi::isMt32GmPatch(const byte *data, int size) {
if (size < 1155)
return false;
if (size > 16889)
@@ -957,7 +956,7 @@ int MidiPlayer_Midi::open(ResourceManager *resMan) {
if (getSciVersion() >= SCI_VERSION_1_EGA_ONLY)
warning("The automatic mapping for General MIDI hasn't been worked on for "
"SCI1 games. Music might sound wrong or broken. Please choose another "
- "music driver for this game (e.g. Adlib or MT-32) if you are "
+ "music driver for this game (e.g. AdLib or MT-32) if you are "
"experiencing issues with music");
// Modify velocity map to make low velocity notes a little louder
diff --git a/engines/scumm/cdda.cpp b/engines/scumm/cdda.cpp
new file mode 100644
index 0000000000..adb414ecce
--- /dev/null
+++ b/engines/scumm/cdda.cpp
@@ -0,0 +1,120 @@
+/* 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 "scumm/cdda.h"
+#include "common/stream.h"
+#include "audio/audiostream.h"
+
+namespace Scumm {
+
+
+#pragma mark -
+#pragma mark --- CDDA stream ---
+#pragma mark -
+
+#define START_OF_CDDA_DATA 800
+#define BLOCK_SIZE 1177
+
+class CDDAStream : public Audio::SeekableAudioStream {
+private:
+ Common::SeekableReadStream *_stream;
+ DisposeAfterUse::Flag _disposeAfterUse;
+ byte _shiftLeft;
+ byte _shiftRight;
+ uint32 _pos;
+ Audio::Timestamp _length;
+
+public:
+ CDDAStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse);
+ virtual ~CDDAStream();
+
+ int readBuffer(int16 *buffer, const int numSamples);
+ bool isStereo() const { return true; }
+ int getRate() const { return 44100; }
+ bool endOfData() const { return _stream->eos(); }
+ bool seek(const Audio::Timestamp &where);
+ Audio::Timestamp getLength() const { return _length; }
+};
+
+CDDAStream::CDDAStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse) :
+ _stream(stream), _disposeAfterUse(disposeAfterUse), _pos(START_OF_CDDA_DATA) {
+ _stream->seek(START_OF_CDDA_DATA, SEEK_SET);
+ // The total size of CDDA.SOU is 289,808,802 bytes or (289808802 - 800) / 1177 = 246226 blocks
+ // We also deduct the shift values to return the correct length
+ uint32 blocks = (_stream->size() - START_OF_CDDA_DATA) / BLOCK_SIZE;
+ _length = Audio::Timestamp(0, (_stream->size() - START_OF_CDDA_DATA - blocks) / (isStereo() ? 2 : 1), getRate());
+}
+
+CDDAStream::~CDDAStream() {
+ if (_disposeAfterUse == DisposeAfterUse::YES)
+ delete _stream;
+}
+
+bool CDDAStream::seek(const Audio::Timestamp &where) {
+ const uint32 seekSample = convertTimeToStreamPos(where, getRate(), isStereo()).totalNumberOfFrames();
+ uint32 blocks = seekSample / 1176;
+
+ // Before seeking, read the shift values from the beginning of that block
+ _stream->seek(START_OF_CDDA_DATA + blocks * BLOCK_SIZE, SEEK_SET);
+ byte shiftVal = _stream->readByte();
+ _shiftLeft = shiftVal >> 4;
+ _shiftRight = shiftVal & 0x0F;
+
+ _pos = START_OF_CDDA_DATA + blocks + seekSample;
+ return _stream->seek(_pos, SEEK_SET);
+}
+
+int CDDAStream::readBuffer(int16 *buffer, const int numSamples) {
+ int samples;
+
+ for (samples = 0 ; samples < numSamples && !_stream->eos() ; ) {
+ if (!((_pos - START_OF_CDDA_DATA) % BLOCK_SIZE)) {
+ byte shiftVal = _stream->readByte();
+ _shiftLeft = shiftVal >> 4;
+ _shiftRight = shiftVal & 0x0F;
+ _pos++;
+ }
+ buffer[samples++] = _stream->readSByte() << _shiftLeft;
+ buffer[samples++] = _stream->readSByte() << _shiftRight;
+ _pos += 2;
+ }
+ return samples;
+}
+
+#pragma mark -
+#pragma mark --- CDDA factory functions ---
+#pragma mark -
+
+Audio::SeekableAudioStream *makeCDDAStream(
+ Common::SeekableReadStream *stream,
+ DisposeAfterUse::Flag disposeAfterUse) {
+ Audio::SeekableAudioStream *s = new CDDAStream(stream, disposeAfterUse);
+ if (s && s->endOfData()) {
+ delete s;
+ return 0;
+ } else {
+ return s;
+ }
+ return 0;
+}
+
+} // End of namespace Scumm
diff --git a/engines/scumm/cdda.h b/engines/scumm/cdda.h
new file mode 100644
index 0000000000..c1e6e82c9e
--- /dev/null
+++ b/engines/scumm/cdda.h
@@ -0,0 +1,57 @@
+/* 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.
+ *
+ */
+
+/**
+ * @file
+ * CD audio decoder used in the Steam versions of Loom
+ */
+
+#ifndef SCUMM_CDDA_H
+#define SCUMM_CDDA_H
+
+#include "common/types.h"
+
+namespace Common {
+class SeekableReadStream;
+}
+
+namespace Audio {
+class SeekableAudioStream;
+}
+
+namespace Scumm {
+
+/**
+ * Create a new SeekableAudioStream from the CDDA data in the given stream.
+ * Allows for seeking (which is why we require a SeekableReadStream).
+ *
+ * @param stream The SeekableReadStream from which to read the CDDA data
+ * @param disposeAfterUse Whether to delete the stream after use
+ * @return a new SeekableAudioStream, or NULL, if an error occurred
+ */
+Audio::SeekableAudioStream *makeCDDAStream(
+ Common::SeekableReadStream *stream,
+ DisposeAfterUse::Flag disposeAfterUse);
+
+} // End of namespace Audio
+
+#endif // #ifndef SCUMM_CDDA_H
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 185ebbce6e..e546c805b5 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -253,7 +253,7 @@ CharsetRenderer::~CharsetRenderer() {
CharsetRendererCommon::CharsetRendererCommon(ScummEngine *vm)
: CharsetRenderer(vm), _bytesPerPixel(0), _fontHeight(0), _numChars(0) {
- _shadowMode = false;
+ _enableShadow = false;
_shadowColor = 0;
}
@@ -392,6 +392,10 @@ int CharsetRenderer::getStringWidth(int arg, const byte *text) {
} else if (chr & 0x80) {
pos++;
width += _vm->_2byteWidth;
+ // Original keeps glyph width and character dimensions separately
+ if (_vm->_language == Common::KO_KOR || _vm->_language == Common::ZH_TWN) {
+ width++;
+ }
continue;
}
}
@@ -478,6 +482,12 @@ void CharsetRenderer::addLinebreaks(int a, byte *str, int pos, int maxwidth) {
} else if (chr & 0x80) {
pos++;
curw += _vm->_2byteWidth;
+ // Original keeps glyph width and character dimensions separately
+ if (_vm->_language == Common::KO_KOR || _vm->_language == Common::ZH_TWN) {
+ curw++;
+ }
+ } else {
+ curw += getCharWidth(chr);
}
} else {
curw += getCharWidth(chr);
@@ -507,12 +517,17 @@ int CharsetRendererV3::getCharWidth(uint16 chr) {
return spacing;
}
-void CharsetRendererV3::enableShadow(bool enable) {
+void CharsetRendererPC::enableShadow(bool enable) {
_shadowColor = 0;
- _shadowMode = enable;
+ _enableShadow = enable;
+
+ if (_vm->_game.version >= 7 && _vm->_language == Common::KO_KOR)
+ _shadowType = kHorizontalShadowType;
+ else
+ _shadowType = kNormalShadowType;
}
-void CharsetRendererV3::drawBits1(Graphics::Surface &dest, int x, int y, const byte *src, int drawTop, int width, int height) {
+void CharsetRendererPC::drawBits1(Graphics::Surface &dest, int x, int y, const byte *src, int drawTop, int width, int height) {
byte *dst = (byte *)dest.getBasePtr(x, y);
byte bits = 0;
@@ -525,8 +540,12 @@ void CharsetRendererV3::drawBits1(Graphics::Surface &dest, int x, int y, const b
if ((x % 8) == 0)
bits = *src++;
if ((bits & revBitMask(x % 8)) && y + drawTop >= 0) {
- if (_shadowMode)
- dst[1] = dst2[0] = dst2[1] = _shadowColor;
+ if (_enableShadow) {
+ if (_shadowType == kNormalShadowType)
+ dst[1] = dst2[0] = dst2[1] = _shadowColor;
+ else if (_shadowType == kHorizontalShadowType)
+ dst[1] = _shadowColor;
+ }
dst[0] = col;
}
dst += dest.format.bytesPerPixel;
@@ -615,7 +634,7 @@ void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) {
if (_left + origWidth > _right + 1)
return;
- if (_shadowMode) {
+ if (_enableShadow) {
width++;
height++;
}
@@ -658,7 +677,7 @@ void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) {
if (_str.right < _left) {
_str.right = _left;
- if (_shadowMode)
+ if (_enableShadow)
_str.right++;
}
@@ -776,11 +795,15 @@ void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
printCharIntern(is2byte, _charPtr, _origWidth, _origHeight, _width, _height, vs, ignoreCharsetMask);
+ // Original keeps glyph width and character dimensions separately
+ if ((_vm->_language == Common::ZH_TWN || _vm->_language == Common::KO_KOR) && is2byte)
+ _origWidth++;
+
_left += _origWidth;
if (_str.right < _left) {
_str.right = _left;
- if (_vm->_game.platform != Common::kPlatformFMTowns && _shadowMode)
+ if (_vm->_game.platform != Common::kPlatformFMTowns && _enableShadow)
_str.right++;
}
@@ -844,7 +867,10 @@ void CharsetRendererClassic::printCharIntern(bool is2byte, const byte *charPtr,
drawTop = _top - _vm->_screenTop;
}
- drawBitsN(dstSurface, dstPtr, charPtr, *_fontPtr, drawTop, origWidth, origHeight);
+ if (is2byte && _vm->_game.platform != Common::kPlatformFMTowns)
+ drawBits1(dstSurface, _left, drawTop, charPtr, drawTop, origWidth, origHeight);
+ else
+ drawBitsN(dstSurface, dstPtr, charPtr, *_fontPtr, drawTop, origWidth, origHeight);
if (_blitAlso && vs->hasTwoBuffers) {
// FIXME: Revisiting this code, I think the _blitAlso mode is likely broken
@@ -884,6 +910,24 @@ void CharsetRendererClassic::printCharIntern(bool is2byte, const byte *charPtr,
}
bool CharsetRendererClassic::prepareDraw(uint16 chr) {
+ bool is2byte = (chr >= 256 && _vm->_useCJKMode);
+ if (is2byte) {
+ if (_vm->_language == Common::KO_KOR)
+ enableShadow(true);
+
+ _charPtr = _vm->get2byteCharPtr(chr);
+ _width = _origWidth = _vm->_2byteWidth;
+ _height = _origHeight = _vm->_2byteHeight;
+ _offsX = _offsY = 0;
+
+ if (_enableShadow) {
+ _width++;
+ _height++;
+ }
+
+ return true;
+ }
+
uint32 charOffs = READ_LE_UINT32(_fontPtr + chr * 4 + 4);
assert(charOffs < 0x14000);
if (!charOffs)
@@ -908,8 +952,14 @@ bool CharsetRendererClassic::prepareDraw(uint16 chr) {
void CharsetRendererClassic::drawChar(int chr, Graphics::Surface &s, int x, int y) {
if (!prepareDraw(chr))
return;
+
byte *dst = (byte *)s.getBasePtr(x, y);
- drawBitsN(s, dst, _charPtr, *_fontPtr, y, _width, _height);
+
+ bool is2byte = (_vm->_useCJKMode && chr >= 256);
+ if (is2byte)
+ drawBits1(s, x, y, _charPtr, y, _width, _height);
+ else
+ drawBitsN(s, dst, _charPtr, *_fontPtr, y, _width, _height);
}
void CharsetRendererClassic::drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height) {
@@ -982,7 +1032,7 @@ int CharsetRendererTownsV3::getFontHeight() {
void CharsetRendererTownsV3::enableShadow(bool enable) {
_shadowColor = 8;
- _shadowMode = enable;
+ _enableShadow = enable;
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
_shadowColor = 0x88;
@@ -1027,13 +1077,13 @@ void CharsetRendererTownsV3::drawBits1(Graphics::Surface &dest, int x, int y, co
bits = *src++;
if ((bits & revBitMask(x % 8)) && y + drawTop >= 0) {
if (dest.format.bytesPerPixel == 2) {
- if (_shadowMode) {
+ if (_enableShadow) {
WRITE_UINT16(dst + 2, _vm->_16BitPalette[_shadowColor]);
WRITE_UINT16(dst + dest.pitch, _vm->_16BitPalette[_shadowColor]);
}
WRITE_UINT16(dst, _vm->_16BitPalette[_color]);
} else {
- if (_shadowMode) {
+ if (_enableShadow) {
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
if (scale2x) {
dst[2] = dst[3] = dst2[2] = dst2[3] = _shadowColor;
@@ -1124,11 +1174,11 @@ void CharsetRendererPCE::drawBits1(Graphics::Surface &dest, int x, int y, const
bits = *src++;
if ((bits & revBitMask(bitCount % 8)) && y + drawTop >= 0) {
if (dest.format.bytesPerPixel == 2) {
- if (_shadowMode)
+ if (_enableShadow)
WRITE_UINT16(dst + dest.pitch + 2, _vm->_16BitPalette[_shadowColor]);
WRITE_UINT16(dst, _vm->_16BitPalette[_color]);
} else {
- if (_shadowMode)
+ if (_enableShadow)
*(dst + dest.pitch + 1) = _shadowColor;
*dst = _color;
}
@@ -1227,7 +1277,8 @@ void CharsetRendererNut::printChar(int chr, bool ignoreCharsetMask) {
int width = _current->getCharWidth(chr);
int height = _current->getCharHeight(chr);
- if (chr >= 256 && _vm->_useCJKMode)
+ bool is2byte = chr >= 256 && _vm->_useCJKMode;
+ if (is2byte)
width = _vm->_2byteWidth;
shadow.right = _left + width;
@@ -1259,8 +1310,8 @@ void CharsetRendererNut::printChar(int chr, bool ignoreCharsetMask) {
_str.left = _left;
// Original keeps glyph width and character dimensions separately
- if (_vm->_language == Common::ZH_TWN && width == 16)
- width = 17;
+ if ((_vm->_language == Common::ZH_TWN || _vm->_language == Common::KO_KOR) && is2byte)
+ width++;
_left += width;
@@ -1327,7 +1378,7 @@ void CharsetRendererNES::printChar(int chr, bool ignoreCharsetMask) {
if (_str.right < _left) {
_str.right = _left;
- if (_shadowMode)
+ if (_enableShadow)
_str.right++;
}
@@ -1483,7 +1534,7 @@ bool CharsetRendererTownsClassic::prepareDraw(uint16 chr) {
_origHeight = _height = _vm->_2byteHeight;
_charPtr = _vm->get2byteCharPtr(chr);
_offsX = _offsY = 0;
- if (_shadowMode) {
+ if (_enableShadow) {
_width++;
_height++;
}
@@ -1495,7 +1546,7 @@ bool CharsetRendererTownsClassic::prepareDraw(uint16 chr) {
}
void CharsetRendererTownsClassic::setupShadowMode() {
- _shadowMode = true;
+ _enableShadow = true;
_shadowColor = _vm->_townsCharsetColorMap[0];
assert(_vm->_cjkFont);
diff --git a/engines/scumm/charset.h b/engines/scumm/charset.h
index 5a9977b7d6..b4b3d88ccd 100644
--- a/engines/scumm/charset.h
+++ b/engines/scumm/charset.h
@@ -100,7 +100,7 @@ protected:
int _numChars;
byte _shadowColor;
- bool _shadowMode;
+ bool _enableShadow;
public:
CharsetRendererCommon(ScummEngine *vm);
@@ -110,7 +110,24 @@ public:
virtual int getFontHeight();
};
-class CharsetRendererClassic : public CharsetRendererCommon {
+class CharsetRendererPC : public CharsetRendererCommon {
+ enum ShadowType {
+ kNoShadowType,
+ kNormalShadowType,
+ kHorizontalShadowType
+ };
+
+ ShadowType _shadowType;
+
+protected:
+ virtual void enableShadow(bool enable);
+ virtual void drawBits1(Graphics::Surface &dest, int x, int y, const byte *src, int drawTop, int width, int height);
+
+public:
+ CharsetRendererPC(ScummEngine *vm) : CharsetRendererCommon(vm), _shadowType(kNoShadowType) { }
+};
+
+class CharsetRendererClassic : public CharsetRendererPC {
protected:
virtual void drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height);
void printCharIntern(bool is2byte, const byte *charPtr, int origWidth, int origHeight, int width, int height, VirtScreen *vs, bool ignoreCharsetMask);
@@ -124,7 +141,7 @@ protected:
VirtScreenNumber _drawScreen;
public:
- CharsetRendererClassic(ScummEngine *vm) : CharsetRendererCommon(vm) {}
+ CharsetRendererClassic(ScummEngine *vm) : CharsetRendererPC(vm) {}
void printChar(int chr, bool ignoreCharsetMask);
void drawChar(int chr, Graphics::Surface &s, int x, int y);
@@ -170,10 +187,8 @@ public:
int getCharWidth(uint16 chr) { return 8; }
};
-class CharsetRendererV3 : public CharsetRendererCommon {
+class CharsetRendererV3 : public CharsetRendererPC {
protected:
- virtual void enableShadow(bool enable);
- virtual void drawBits1(Graphics::Surface &dest, int x, int y, const byte *src, int drawTop, int width, int height);
virtual int getDrawWidthIntern(uint16 chr);
virtual int getDrawHeightIntern(uint16 chr);
virtual void setDrawCharIntern(uint16 chr) {}
@@ -181,7 +196,7 @@ protected:
const byte *_widthTable;
public:
- CharsetRendererV3(ScummEngine *vm) : CharsetRendererCommon(vm) {}
+ CharsetRendererV3(ScummEngine *vm) : CharsetRendererPC(vm) {}
void printChar(int chr, bool ignoreCharsetMask);
void drawChar(int chr, Graphics::Surface &s, int x, int y);
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index b7a25808a5..7cd50e1f4c 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -79,10 +79,12 @@ Common::String ScummEngine::generateFilename(const int room) const {
} else {
switch (_filenamePattern.genMethod) {
case kGenDiskNum:
+ case kGenDiskNumSteam:
result = Common::String::format(_filenamePattern.pattern, diskNumber);
break;
case kGenRoomNum:
+ case kGenRoomNumSteam:
result = Common::String::format(_filenamePattern.pattern, room);
break;
@@ -209,7 +211,32 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const {
return result;
}
-static Common::String generateFilenameForDetection(const char *pattern, FilenameGenMethod genMethod) {
+// The following table includes all the index files, which are embedded in the
+// main game executables in Steam versions.
+static const SteamIndexFile steamIndexFiles[] = {
+ { GID_INDY3, Common::kPlatformWindows, "%02d.LFL", "00.LFL", "Indiana Jones and the Last Crusade.exe", 162056, 6295 },
+ { GID_INDY3, Common::kPlatformMacintosh, "%02d.LFL", "00.LFL", "The Last Crusade", 150368, 6295 },
+ { GID_INDY4, Common::kPlatformWindows, "atlantis.%03d", "ATLANTIS.000", "Indiana Jones and the Fate of Atlantis.exe", 224336, 12035 },
+ { GID_INDY4, Common::kPlatformMacintosh, "atlantis.%03d", "ATLANTIS.000", "The Fate of Atlantis", 260224, 12035 },
+ { GID_LOOM, Common::kPlatformWindows, "%03d.LFL", "000.LFL", "Loom.exe", 187248, 8307 },
+ { GID_LOOM, Common::kPlatformMacintosh, "%03d.LFL", "000.LFL", "Loom", 170464, 8307 },
+#ifdef ENABLE_SCUMM_7_8
+ { GID_DIG, Common::kPlatformWindows, "dig.la%d", "DIG.LA0", "The Dig.exe", 340632, 16304 },
+ { GID_DIG, Common::kPlatformMacintosh, "dig.la%d", "DIG.LA0", "The Dig", 339744, 16304 },
+#endif
+ { 0, Common::kPlatformUnknown, nullptr, nullptr, nullptr, 0, 0 }
+};
+
+const SteamIndexFile *lookUpSteamIndexFile(Common::String pattern, Common::Platform platform) {
+ for (const SteamIndexFile *indexFile = steamIndexFiles; indexFile->len; ++indexFile) {
+ if (platform == indexFile->platform && pattern.equalsIgnoreCase(indexFile->pattern))
+ return indexFile;
+ }
+
+ return nullptr;
+}
+
+static Common::String generateFilenameForDetection(const char *pattern, FilenameGenMethod genMethod, Common::Platform platform) {
Common::String result;
switch (genMethod) {
@@ -217,6 +244,16 @@ static Common::String generateFilenameForDetection(const char *pattern, Filename
case kGenRoomNum:
result = Common::String::format(pattern, 0);
break;
+
+ case kGenDiskNumSteam:
+ case kGenRoomNumSteam: {
+ const SteamIndexFile *indexFile = lookUpSteamIndexFile(pattern, platform);
+ if (!indexFile) {
+ error("Unable to find Steam executable from detection pattern");
+ } else {
+ result = indexFile->executableName;
+ }
+ } break;
case kGenHEPC:
case kGenHEIOS:
@@ -528,7 +565,8 @@ static void detectGames(const Common::FSList &fslist, Common::List<DetectorResul
DetectorResult dr;
// Dive one level down since mac indy3/loom has its files split into directories. See Bug #1438631
- composeFileHashMap(fileMD5Map, fslist, 2, directoryGlobs);
+ // Dive two levels down for Mac Steam games
+ composeFileHashMap(fileMD5Map, fslist, 3, directoryGlobs);
// Iterate over all filename patterns.
for (const GameFilenamePattern *gfp = gameFilenamesTable; gfp->gameid; ++gfp) {
@@ -540,7 +578,7 @@ static void detectGames(const Common::FSList &fslist, Common::List<DetectorResul
// Generate the detectname corresponding to the gfp. If the file doesn't
// exist in the directory we are looking at, we can skip to the next
// one immediately.
- Common::String file(generateFilenameForDetection(gfp->pattern, gfp->genMethod));
+ Common::String file(generateFilenameForDetection(gfp->pattern, gfp->genMethod, gfp->platform));
if (!fileMD5Map.contains(file))
continue;
@@ -1025,7 +1063,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co
Common::FSNode dir(ConfMan.get("path"));
if (!dir.isDirectory())
return Common::kPathNotDirectory;
- if (!dir.getChildren(fslist, Common::FSNode::kListFilesOnly))
+ if (!dir.getChildren(fslist, Common::FSNode::kListAll))
return Common::kNoGameDataFoundError;
// Invoke the detector, but fixed to the specified gameid.
@@ -1081,7 +1119,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co
md5Warning += Common::String::format(" SCUMM gameid '%s', file '%s', MD5 '%s'\n\n",
res.game.gameid,
- generateFilenameForDetection(res.fp.pattern, res.fp.genMethod).c_str(),
+ generateFilenameForDetection(res.fp.pattern, res.fp.genMethod, Common::kPlatformUnknown).c_str(),
res.md5.c_str());
g_system->logMessage(LogMessageType::kWarning, md5Warning.c_str());
diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h
index f714812a9c..0587c3fab1 100644
--- a/engines/scumm/detection.h
+++ b/engines/scumm/detection.h
@@ -95,7 +95,9 @@ struct GameSettings {
enum FilenameGenMethod {
kGenDiskNum,
+ kGenDiskNumSteam,
kGenRoomNum,
+ kGenRoomNumSteam,
kGenHEMac,
kGenHEMacNoParens,
kGenHEPC,
diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index c876af1256..ae334c201c 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -52,6 +52,8 @@ namespace Scumm {
*/
static const char *const directoryGlobs[] = {
"rooms *", // Mac version of indy3/loom
+ "Contents", // Mac Steam versions
+ "MacOS", // Mac Steam versions
0
};
@@ -221,6 +223,7 @@ static const GameSettings gameVariantsTable[] = {
{"indy3", "EGA", "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, 0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"indy3", "No AdLib", "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"indy3", "VGA", "vga", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_OLD256 | GF_FEW_LOCALS, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+ {"indy3", "Steam", "steam", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_OLD256 | GF_FEW_LOCALS, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"indy3", "FM-TOWNS", 0, GID_INDY3, 3, 0, MDT_TOWNS, GF_OLD256 | GF_FEW_LOCALS | GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO4(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_MIDITOWNS, GUIO_NOASPECT)},
{"loom", "EGA", "ega", GID_LOOM, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO1(GUIO_NOSPEECH)},
@@ -230,6 +233,7 @@ static const GameSettings gameVariantsTable[] = {
#endif
{"loom", "FM-TOWNS", 0, GID_LOOM, 3, 0, MDT_TOWNS, GF_AUDIOTRACKS | GF_OLD256, Common::kPlatformFMTowns, GUIO4(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_MIDITOWNS, GUIO_NOASPECT)},
{"loom", "VGA", "vga", GID_LOOM, 4, 0, MDT_NONE, GF_AUDIOTRACKS, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+ {"loom", "Steam", "steam", GID_LOOM, 4, 0, MDT_NONE, GF_AUDIOTRACKS, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"pass", 0, 0, GID_PASS, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_16COLOR, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
@@ -245,6 +249,7 @@ static const GameSettings gameVariantsTable[] = {
{"monkey2", "FM-TOWNS", 0, GID_MONKEY2, 5, 0, MDT_PCSPK | MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO5(GUIO_NOSPEECH, GUIO_MIDITOWNS, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_NOASPECT)},
{"atlantis", "", 0, GID_INDY4, 5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO0()},
+ {"atlantis", "Steam", "steam", GID_INDY4, 5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO0()},
{"atlantis", "Floppy", 0, GID_INDY4, 5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO1(GUIO_NOSPEECH)},
{"atlantis", "FM-TOWNS", 0, GID_INDY4, 5, 0, MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO4(GUIO_MIDITOWNS, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_NOASPECT)},
@@ -257,7 +262,8 @@ static const GameSettings gameVariantsTable[] = {
#ifdef ENABLE_SCUMM_7_8
{"ft", 0, 0, GID_FT, 7, 0, MDT_NONE, 0, UNK, GUIO1(GUIO_NOMIDI)},
- {"dig", 0, 0, GID_DIG, 7, 0, MDT_NONE, 0, UNK, GUIO1(GUIO_NOMIDI)},
+ {"dig", "", 0, GID_DIG, 7, 0, MDT_NONE, 0, UNK, GUIO1(GUIO_NOMIDI)},
+ {"dig", "Steam", "steam", GID_DIG, 7, 0, MDT_NONE, 0, UNK, GUIO1(GUIO_NOMIDI)},
{"comi", 0, 0, GID_CMI, 8, 0, MDT_NONE, 0, Common::kPlatformWindows, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)},
#endif
@@ -383,7 +389,7 @@ static const GameSettings gameVariantsTable[] = {
{"freddicove", "HE 100", 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)},
// Restructured the Scumm engine
- {"pjgames", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)},
+ {"pjgames", 0, 0, GID_PJGAMES, 6, 100, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)},
// Added the use of bink videos
{"Soccer2004", 0, 0, GID_SOCCER2004, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)},
@@ -422,10 +428,10 @@ static const GameSettings gameVariantsTable[] = {
using Common::UNK_LANG;
// The following describes how Fingolfin thinks this table might be used one day;
-// this is work in progress, so read this with a salt of grain...
+// this is work in progress, so read this with a grain of salt...
//
// The following table maps gameids to possible filename variants for that game.
-// This information is used by the detector to determin possible "detect files".
+// This information is used by the detector to determine possible "detect files".
// It is also later used by the engine creation code to verify the game to be
// launched is present. Finally, the correct GameFilenamePattern entry is passed on
// to the engine which uses it to locate the files for the game.
@@ -451,6 +457,8 @@ static const GameFilenamePattern gameFilenamesTable[] = {
{ "zak", "zak1.d64", kGenUnchanged, UNK_LANG, Common::kPlatformC64, "V1" }, // ... and zak2.d64
{ "indy3", "%02d.LFL", kGenRoomNum, UNK_LANG, UNK, 0 },
+ { "indy3", "%02d.LFL", kGenRoomNumSteam, UNK_LANG, Common::kPlatformWindows, "Steam" },
+ { "indy3", "%02d.LFL", kGenRoomNumSteam, UNK_LANG, Common::kPlatformMacintosh, "Steam" },
{ "indyloom", "%02d.LFL", kGenRoomNum, UNK_LANG, UNK, 0 },
{ "indyzak", "%02d.LFL", kGenRoomNum, UNK_LANG, UNK, 0 },
@@ -458,6 +466,8 @@ static const GameFilenamePattern gameFilenamesTable[] = {
{ "loom", "%02d.LFL", kGenRoomNum, UNK_LANG, UNK, 0 },
{ "loom", "%03d.LFL", kGenRoomNum, UNK_LANG, UNK, "VGA" }, // Loom CD
+ { "loom", "%03d.LFL", kGenRoomNumSteam, UNK_LANG, Common::kPlatformWindows, "Steam" },
+ { "loom", "%03d.LFL", kGenRoomNumSteam, UNK_LANG, Common::kPlatformMacintosh, "Steam" },
{ "pass", "%03d.LFL", kGenRoomNum, UNK_LANG, UNK, 0 },
@@ -471,6 +481,8 @@ static const GameFilenamePattern gameFilenamesTable[] = {
{ "monkey2", "mi2demo.%03d", kGenDiskNum, UNK_LANG, UNK, 0 },
{ "atlantis", "atlantis.%03d", kGenDiskNum, UNK_LANG, UNK, 0 },
+ { "atlantis", "atlantis.%03d", kGenDiskNumSteam, UNK_LANG, Common::kPlatformWindows, "Steam" },
+ { "atlantis", "atlantis.%03d", kGenDiskNumSteam, UNK_LANG, Common::kPlatformMacintosh, "Steam" },
{ "atlantis", "fate.%03d", kGenDiskNum, UNK_LANG, UNK, 0 },
{ "atlantis", "playfate.%03d", kGenDiskNum, UNK_LANG, UNK, 0 },
{ "atlantis", "indy4.%03d", kGenDiskNum, Common::JA_JPN, Common::kPlatformFMTowns, "FM-TOWNS" },
@@ -494,6 +506,8 @@ static const GameFilenamePattern gameFilenamesTable[] = {
#ifdef ENABLE_SCUMM_7_8
{ "dig", "dig.la%d", kGenDiskNum, UNK_LANG, UNK, 0 },
+ { "dig", "dig.la%d", kGenDiskNumSteam, UNK_LANG, Common::kPlatformWindows, "Steam" },
+ { "dig", "dig.la%d", kGenDiskNumSteam, UNK_LANG, Common::kPlatformMacintosh, "Steam" },
{ "dig", "thedig.la%d", kGenDiskNum, UNK_LANG, UNK, "Demo" }, // Used by an alternate version of the demo
{ "dig", "The Dig Data", kGenUnchanged, UNK_LANG, Common::kPlatformMacintosh, 0 },
{ "dig", "The Dig Demo Data", kGenUnchanged, UNK_LANG, Common::kPlatformMacintosh, "Demo" },
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 8321daa583..52120949cc 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -428,7 +428,9 @@ const Common::String InfoDialog::queryResString(int stringno) {
if (stringno == 0)
return String();
- if (_vm->_game.version == 8)
+ if (_vm->_game.heversion >= 80)
+ return _(string_map_table_v6[stringno - 1].string);
+ else if (_vm->_game.version == 8)
result = (const byte *)string_map_table_v8[stringno - 1].string;
else if (_vm->_game.version == 7)
result = _vm->getStringAddressVar(string_map_table_v7[stringno - 1].num);
diff --git a/engines/scumm/file.cpp b/engines/scumm/file.cpp
index 9c161ff1cc..475ffa3238 100644
--- a/engines/scumm/file.cpp
+++ b/engines/scumm/file.cpp
@@ -185,6 +185,30 @@ uint32 ScummFile::read(void *dataPtr, uint32 dataSize) {
}
#pragma mark -
+#pragma mark --- ScummSteamFile ---
+#pragma mark -
+
+bool ScummSteamFile::open(const Common::String &filename) {
+ if (filename.equalsIgnoreCase(_indexFile.indexFileName)) {
+ return openWithSubRange(_indexFile.executableName, _indexFile.start, _indexFile.len);
+ } else {
+ // Regular non-bundled file
+ return ScummFile::open(filename);
+ }
+}
+
+bool ScummSteamFile::openWithSubRange(const Common::String &filename, int32 subFileStart, int32 subFileLen) {
+ if (ScummFile::open(filename)) {
+ _subFileStart = subFileStart;
+ _subFileLen = subFileLen;
+ seek(0, SEEK_SET);
+ return true;
+ } else {
+ return false;
+ }
+}
+
+#pragma mark -
#pragma mark --- ScummDiskImage ---
#pragma mark -
diff --git a/engines/scumm/file.h b/engines/scumm/file.h
index d6dbc06ddc..e7c1eb6d71 100644
--- a/engines/scumm/file.h
+++ b/engines/scumm/file.h
@@ -53,7 +53,7 @@ public:
};
class ScummFile : public BaseScummFile {
-private:
+protected:
int32 _subFileStart;
int32 _subFileLen;
bool _myEos; // Have we read past the end of the subfile?
@@ -64,7 +64,7 @@ private:
public:
ScummFile();
- bool open(const Common::String &filename);
+ virtual bool open(const Common::String &filename);
bool openSubFile(const Common::String &filename);
void clearErr() { _myEos = false; BaseScummFile::clearErr(); }
@@ -120,6 +120,29 @@ public:
uint32 read(void *dataPtr, uint32 dataSize);
};
+struct SteamIndexFile {
+ byte id;
+ Common::Platform platform;
+ const char *pattern;
+ const char *indexFileName;
+ const char *executableName;
+ int32 start;
+ int32 len;
+};
+
+const SteamIndexFile *lookUpSteamIndexFile(Common::String pattern, Common::Platform platform);
+
+class ScummSteamFile : public ScummFile {
+private:
+ const SteamIndexFile &_indexFile;
+
+ bool openWithSubRange(const Common::String &filename, int32 subFileStart, int32 subFileLen);
+public:
+ ScummSteamFile(const SteamIndexFile &indexFile) : ScummFile(), _indexFile(indexFile) {}
+
+ bool open(const Common::String &filename);
+};
+
} // End of namespace Scumm
#endif
diff --git a/engines/scumm/he/sprite_he.cpp b/engines/scumm/he/sprite_he.cpp
index 218f2ec59c..245a986531 100644
--- a/engines/scumm/he/sprite_he.cpp
+++ b/engines/scumm/he/sprite_he.cpp
@@ -264,6 +264,13 @@ int Sprite::getSpriteFlagRemapPalette(int spriteId) {
int Sprite::getSpriteFlagAutoAnim(int spriteId) {
assertRange(1, spriteId, _varNumSprites, "sprite");
+ // WORKAROUND: Two scripts (room 2 script 2070/2071) compare against
+ // a return value of one, but the original game returned the flag value
+ // (0x200000) for true. These scripts bugs caused problems (infinite loop
+ // and beans not appearing) in the Jumping Beans mini games under ScummVM.
+ if (_vm->_game.id == GID_PJGAMES)
+ return 0;
+
return ((_spriteTable[spriteId].flags & kSFAutoAnim) != 0) ? 1 : 0;
}
@@ -793,6 +800,11 @@ void Sprite::resetSprite(int spriteId) {
_spriteTable[spriteId].field_84 = 0;
_spriteTable[spriteId].imgFlags = 0;
_spriteTable[spriteId].field_90 = 0;
+
+ if (_vm->_game.heversion >= 100) {
+ _spriteTable[spriteId].flags &= ~kSFMarkDirty;
+ _spriteTable[spriteId].flags |= kSFAutoAnim | kSFBlitDirectly;
+ }
}
void Sprite::setSpriteImage(int spriteId, int imageNum) {
@@ -820,6 +832,8 @@ void Sprite::setSpriteImage(int spriteId, int imageNum) {
} else {
if (_vm->VAR(139))
_spriteTable[spriteId].flags &= ~kSFActive;
+ else if (_vm->_game.heversion >= 100 && origResId == 0)
+ _spriteTable[spriteId].flags = 0;
else if (_spriteTable[spriteId].flags & kSFImageless)
_spriteTable[spriteId].flags = 0;
else
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 5e2566dc32..824dfec144 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -435,8 +435,9 @@ void ScummEngine_v6::processKeyboard(Common::KeyState lastKeyHit) {
break;
}
- if (VAR_VOICE_MODE != 0xFF)
- VAR(VAR_VOICE_MODE) = _voiceMode;
+ // We need to sync the current sound settings here to make sure that
+ // we actually update the mute state of speech properly.
+ syncSoundSettings();
return;
}
diff --git a/engines/scumm/module.mk b/engines/scumm/module.mk
index d43db1e5f1..416a8f7ef9 100644
--- a/engines/scumm/module.mk
+++ b/engines/scumm/module.mk
@@ -7,6 +7,7 @@ MODULE_OBJS := \
bomp.o \
boxes.o \
camera.o \
+ cdda.o \
charset.o \
charset-fontdata.o \
costume.o \
diff --git a/engines/scumm/nut_renderer.cpp b/engines/scumm/nut_renderer.cpp
index 1d5761ef48..d8672c473c 100644
--- a/engines/scumm/nut_renderer.cpp
+++ b/engines/scumm/nut_renderer.cpp
@@ -395,10 +395,6 @@ void NutRenderer::drawChar(const Graphics::Surface &s, byte c, int x, int y, byt
}
void NutRenderer::draw2byte(const Graphics::Surface &s, int c, int x, int y, byte color) {
- // FIXME: This gets passed a const destination Surface. Intuitively this
- // should never get written to. But sadly it does... For now we simply
- // cast the const qualifier away.
- byte *dst = (byte *)const_cast<void *>(s.getBasePtr(x, y));
const int width = _vm->_2byteWidth;
const int height = MIN(_vm->_2byteHeight, s.h - y);
const byte *src = _vm->get2byteCharPtr(c);
@@ -408,17 +404,50 @@ void NutRenderer::draw2byte(const Graphics::Surface &s, int c, int x, int y, byt
return;
}
- for (int ty = 0; ty < height; ty++) {
- for (int tx = 0; tx < width; tx++) {
- if ((tx & 7) == 0)
- bits = *src++;
- if (x + tx < 0 || x + tx >= s.w || y + ty < 0)
- continue;
- if (bits & revBitMask(tx % 8)) {
- dst[tx] = color;
+ enum ShadowMode {
+ kNone,
+ kKoreanV8ShadowMode
+ };
+
+ ShadowMode shadowMode = kNone;
+
+ if (_vm->_language == Common::KO_KOR && _vm->_game.version == 8) {
+ shadowMode = kKoreanV8ShadowMode;
+ }
+
+ int shadowOffsetXTable[4] = {-1, 0, 1, 0};
+ int shadowOffsetYTable[4] = {0, 1, 0, 0};
+ int shadowOffsetColorTable[4] = {0, 0, 0, color};
+
+ int shadowIdx = 3;
+ if (shadowMode == kKoreanV8ShadowMode)
+ shadowIdx = 0;
+
+ const byte *origSrc = src;
+
+ for (; shadowIdx < 4; shadowIdx++) {
+ int offX = x + shadowOffsetXTable[shadowIdx];
+ int offY = y + shadowOffsetYTable[shadowIdx];
+ byte drawColor = shadowOffsetColorTable[shadowIdx];
+
+ // FIXME: This gets passed a const destination Surface. Intuitively this
+ // should never get written to. But sadly it does... For now we simply
+ // cast the const qualifier away.
+ byte *dst = (byte *)const_cast<void *>(s.getBasePtr(offX, offY));
+ src = origSrc;
+
+ for (int ty = 0; ty < height; ty++) {
+ for (int tx = 0; tx < width; tx++) {
+ if ((tx & 7) == 0)
+ bits = *src++;
+ if (offX + tx < 0 || offX + tx >= s.w || offY + ty < 0)
+ continue;
+ if (bits & revBitMask(tx % 8)) {
+ dst[tx] = drawColor;
+ }
}
+ dst += s.pitch;
}
- dst += s.pitch;
}
}
diff --git a/engines/scumm/players/player_ad.cpp b/engines/scumm/players/player_ad.cpp
index 5ed50ab65c..adcda68e10 100644
--- a/engines/scumm/players/player_ad.cpp
+++ b/engines/scumm/players/player_ad.cpp
@@ -137,6 +137,18 @@ void Player_AD::startSound(int sound) {
if (startSfx(sfx, res)) {
// Lock the new resource
_vm->_res->lock(rtSound, sound);
+ } else {
+ // When starting the sfx failed we need to reset the slot.
+ sfx->resource = -1;
+
+ for (int i = 0; i < ARRAYSIZE(sfx->channels); ++i) {
+ sfx->channels[i].state = kChannelStateOff;
+
+ if (sfx->channels[i].hardwareChannel != -1) {
+ freeHWChannel(sfx->channels[i].hardwareChannel);
+ sfx->channels[i].hardwareChannel = -1;
+ }
+ }
}
}
}
@@ -290,34 +302,43 @@ void Player_AD::setupVolume() {
}
int Player_AD::allocateHWChannel(int priority, SfxSlot *owner) {
- // First pass: Check whether there's any unallocated channel
+ // We always reaLlocate the channel with the lowest priority in case none
+ // is free.
+ int channel = -1;
+ int minPrio = priority;
+
for (int i = 0; i < _numHWChannels; ++i) {
if (!_hwChannels[i].allocated) {
- _hwChannels[i].allocated = true;
- _hwChannels[i].priority = priority;
- _hwChannels[i].sfxOwner = owner;
- return i;
+ channel = i;
+ break;
+ }
+
+ // We don't allow SFX to reallocate their own channels. Otherwise we
+ // would call stopSfx in the midst of startSfx and that can lead to
+ // horrible states...
+ // We also prevent the music from reallocating its own channels like
+ // in the original.
+ if (_hwChannels[i].priority <= minPrio && _hwChannels[i].sfxOwner != owner) {
+ minPrio = _hwChannels[i].priority;
+ channel = i;
}
}
- // Second pass: Reassign channels based on priority
- for (int i = 0; i < _numHWChannels; ++i) {
- if (_hwChannels[i].priority <= priority) {
- // In case the HW channel belongs to a SFX we will completely
- // stop playback of that SFX.
- // TODO: Maybe be more fine grained in the future and allow
- // detachment of individual channels of a SFX?
- if (_hwChannels[i].sfxOwner) {
- stopSfx(_hwChannels[i].sfxOwner);
- }
- _hwChannels[i].allocated = true;
- _hwChannels[i].priority = priority;
- _hwChannels[i].sfxOwner = owner;
- return i;
+ if (channel != -1) {
+ // In case the HW channel belongs to a SFX we will completely
+ // stop playback of that SFX.
+ // TODO: Maybe be more fine grained in the future and allow
+ // detachment of individual channels of a SFX?
+ if (_hwChannels[channel].allocated && _hwChannels[channel].sfxOwner) {
+ stopSfx(_hwChannels[channel].sfxOwner);
}
+
+ _hwChannels[channel].allocated = true;
+ _hwChannels[channel].priority = priority;
+ _hwChannels[channel].sfxOwner = owner;
}
- return -1;
+ return channel;
}
void Player_AD::freeHWChannel(int channel) {
@@ -747,23 +768,26 @@ const uint Player_AD::_rhythmChannelTable[6] = {
// SFX
Player_AD::SfxSlot *Player_AD::allocateSfxSlot(int priority) {
- // First pass: Check whether there's a unused slot
+ // We always reaLlocate the slot with the lowest priority in case none is
+ // free.
+ SfxSlot *sfx = nullptr;
+ int minPrio = priority;
+
for (int i = 0; i < ARRAYSIZE(_sfx); ++i) {
if (_sfx[i].resource == -1) {
return &_sfx[i];
+ } else if (_sfx[i].priority <= minPrio) {
+ minPrio = _sfx[i].priority;
+ sfx = &_sfx[i];
}
}
- // Second pass: Look for a slot with lower priority
- for (int i = 0; i < ARRAYSIZE(_sfx); ++i) {
- if (_sfx[i].priority <= priority) {
- // Stop the old sfx
- stopSfx(&_sfx[i]);
- return &_sfx[i];
- }
+ // In case we reallocate a slot stop the old one.
+ if (sfx) {
+ stopSfx(sfx);
}
- return nullptr;
+ return sfx;
}
bool Player_AD::startSfx(SfxSlot *sfx, const byte *resource) {
@@ -1163,7 +1187,7 @@ const uint Player_AD::_noteAdjustTable[16] = {
0, 4369, 8738, 13107,
17476, 21845, 26214, 30583,
34952, 39321, 43690, 48059,
- 52428, 46797, 61166, 65535
+ 52428, 56797, 61166, 65535
};
const bool Player_AD::_useOperatorTable[7] = {
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 0aaff4c094..7eadb042fb 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -1453,7 +1453,7 @@ void ScummEngine::saveOrLoad(Serializer *s) {
// forever, then resume playing it. This helps a lot when the audio CD
// is used to provide ambient music (see bug #788195).
if (s->isLoading() && info.playing && info.numLoops < 0)
- _system->getAudioCDManager()->play(info.track, info.numLoops, info.start, info.duration);
+ _sound->playCDTrackInternal(info.track, info.numLoops, info.start, info.duration);
}
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index 2c672ccc89..2fe5333bfc 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -972,6 +972,18 @@ void ScummEngine::runEntryScript() {
runScript(VAR(VAR_ENTRY_SCRIPT2), 0, 0, 0);
}
+void ScummEngine::runQuitScript() {
+ if (VAR_QUIT_SCRIPT != 0xFF && VAR(VAR_QUIT_SCRIPT)) {
+ int args[NUM_SCRIPT_LOCAL];
+
+ memset(args, 0, sizeof(args));
+ args[0] = 2;
+ args[1] = 1003;
+
+ runScript(VAR(VAR_QUIT_SCRIPT), 0, 0, args);
+ }
+}
+
void ScummEngine::killScriptsAndResources() {
ScriptSlot *ss;
int i;
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 2cda9898af..91afa859a9 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -544,7 +544,7 @@ void ScummEngine_v5::o5_setClass() {
} else if (cls == 0) {
// Class '0' means: clean all class data
_classData[obj] = 0;
- if ((_game.features & GF_SMALL_HEADER) && obj <= _numActors) {
+ if ((_game.features & GF_SMALL_HEADER) && objIsActor(obj)) {
Actor *a = derefActor(obj, "o5_setClass");
a->_ignoreBoxes = false;
a->_forceClip = 0;
diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h
index ae80f306af..0eeff57ff7 100644
--- a/engines/scumm/scumm-md5.h
+++ b/engines/scumm/scumm-md5.h
@@ -1,5 +1,5 @@
/*
- This file was generated by the md5table tool on Fri Sep 27 05:44:12 2013
+ This file was generated by the md5table tool on Wed Jun 25 10:34:07 2014
DO NOT EDIT MANUALLY!
*/
@@ -17,6 +17,7 @@ static const MD5Table md5table[] = {
{ "008e76ec3ae58d0add637ea7aa299a2c", "freddi3", "", "", -1, Common::FR_FRA, Common::kPlatformMacintosh },
{ "02cae0e7ff8504f73618391873d5781a", "freddi3", "HE 98.5", "", -1, Common::DE_DEU, Common::kPlatformWindows },
{ "0305e850382b812fec6e5998ef88a966", "pajama", "", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
+ { "0354ee0d14cde1264ec762261c04c14a", "loom", "Steam", "Steam", 585728, Common::EN_ANY, Common::kPlatformWindows },
{ "035deab53b47bc43abc763560d0f8d4b", "atlantis", "Floppy", "Demo", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "037385a953789190298494d92b89b3d0", "catalog", "HE 72", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "03d3b18ee3fd68114e2a687c871e38d5", "freddi4", "HE 99", "Mini Game", -1, Common::EN_USA, Common::kPlatformWindows },
@@ -194,6 +195,7 @@ static const MD5Table md5table[] = {
{ "45152f7cf2ba8f43cf8a8ea2e740ae09", "monkey", "VGA", "VGA", 8357, Common::ES_ESP, Common::kPlatformDOS },
{ "4521138d15d1fd7649c31fb981746231", "pajama2", "HE 98.5", "Demo", -1, Common::DE_DEU, Common::kPlatformUnknown },
{ "4522564b3c31aaf218b6a96826a549fd", "maze", "HE 99", "", -1, Common::EN_USA, Common::kPlatformWindows },
+ { "45adb5065e77559196dc0477e0f91fb9", "freddi3", "HE 99", "", -1, Common::EN_GRB, Common::kPlatformWindows },
{ "46b53fd430adcfbed791b48a0d4b079f", "funpack", "", "", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "470c45b636139bb40716daa1c7edaad0", "loom", "EGA", "EGA", -1, Common::DE_DEU, Common::kPlatformDOS },
{ "477dbafbd66a53c98416dc01aef019ad", "monkey", "EGA", "EGA", -1, Common::IT_ITA, Common::kPlatformDOS },
@@ -298,6 +300,7 @@ static const MD5Table md5table[] = {
{ "69ffe29185b8d71f09f6199f8b2a87cb", "lost", "HE 100", "", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "6a30a07f353a75cdc602db27d73e1b42", "puttputt", "HE 70", "", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "6a60d395b78b205c93a956100b1bf5ae", "pajama2", "HE 98.5", "", -1, Common::DE_DEU, Common::kPlatformUnknown },
+ { "6a8133b63d46f6663fbcbb49d5a2edb1", "atlantis", "Steam", "Steam", 520548, Common::EN_ANY, Common::kPlatformMacintosh },
{ "6af2419fe3db5c2fdb091ae4e5833770", "puttrace", "HE 98.5", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "6b19d0e25cbf720d05822379b8b90ed9", "PuttTime", "HE 90", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "6b257bb2827dd894b8109a50a1a18b5a", "freddicove", "HE 100", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
@@ -356,6 +359,7 @@ static const MD5Table md5table[] = {
{ "7edd665bbede7ea8b7233f8e650be6f8", "samnmax", "", "CD", -1, Common::FR_FRA, Common::kPlatformUnknown },
{ "7f45ddd6dbfbf8f80c0c0efea4c295bc", "maniac", "V1", "V1", 1972, Common::EN_ANY, Common::kPlatformDOS },
{ "7f945525abcd48015adf1632637a44a1", "pajama", "", "Demo", -1, Common::FR_FRA, Common::kPlatformUnknown },
+ { "7fbcff27c323499beaedd605e1ebd47d", "indy3", "Steam", "Steam", 561152, Common::EN_ANY, Common::kPlatformWindows },
{ "7fc6cdb46b4c9d384c52327f4bca6416", "football", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "810a9da887aefa597b0cf3c77d262897", "BluesABCTime", "", "Demo", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "822807c3cd3b43a925cab2767ca6b453", "BluesTreasureHunt", "", "Disc 1", -1, Common::EN_ANY, Common::kPlatformUnknown },
@@ -438,6 +442,7 @@ static const MD5Table md5table[] = {
{ "a095616d2d23ccf43b8e257711202cba", "football2002", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "a095e33061606d231ff37dca4c64c8ac", "pajama", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown },
{ "a0a7dea72003933b8b3f8b99b9f7ddeb", "loom", "No AdLib", "EGA", -1, Common::EN_ANY, Common::kPlatformAtariST },
+ { "a15d6e1e2c52bbd0ff7fa6b63ab7f796", "indy3", "Steam", "Steam", 680340, Common::EN_ANY, Common::kPlatformMacintosh },
{ "a194f15f51ee62badab74b9e7da97693", "baseball2001", "", "Demo", 20507, Common::EN_ANY, Common::kPlatformUnknown },
{ "a197a87ae77f3b3333f09a7a2c448fe2", "freddi", "HE 99", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "a22af0ad0e3126d19d22707b0267a37d", "balloon", "HE 80", "", -1, Common::NL_NLD, Common::kPlatformWindows },
@@ -466,6 +471,7 @@ static const MD5Table md5table[] = {
{ "aa8a0cb65f3afbbe2c14c3f9f92775a3", "monkey", "CD", "CD", 8955, Common::FR_FRA, Common::kPlatformDOS },
{ "aaa587701cde7e74692c68c1024b85eb", "puttrace", "HE 99", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "aaa7f36a253f277dd29dd1c051b0e4b9", "indy3", "No AdLib", "EGA", -1, Common::DE_DEU, Common::kPlatformAtariST },
+ { "aad201302286c1cfee92321cd406e427", "dig", "Steam", "Steam", 811008, Common::EN_ANY, Common::kPlatformWindows },
{ "ab0693e9324cfcf498fdcbb12acf8bb4", "puttcircus", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "ac1642b6edfb8521ca03760126f1c250", "tentacle", "", "Demo", -1, Common::DE_DEU, Common::kPlatformDOS },
{ "ac62d50e39492ee3738b4e83a5ac780f", "freddi2", "HE 80", "", -1, Common::NL_NLD, Common::kPlatformWindows },
@@ -479,6 +485,7 @@ static const MD5Table md5table[] = {
{ "b250d0f9cc83f80ced56fe11a4fb057c", "maniac", "V2", "V2", 1988, Common::EN_ANY, Common::kPlatformDOS },
{ "b289a2a8cbedbf45786e0b4ad2f510f1", "samnmax", "Floppy", "Floppy", -1, Common::IT_ITA, Common::kPlatformDOS },
{ "b47be81e39a9710f6f595f7b527b60f8", "puttrace", "HE 99", "", -1, Common::EN_GRB, Common::kPlatformWindows },
+ { "b4a677bf27c010a747975705108ff1e6", "loom", "Steam", "Steam", 393572, Common::EN_ANY, Common::kPlatformMacintosh },
{ "b5298a5c15ffbe8b381d51ea4e26d35c", "freddi4", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown },
{ "b597e0403cc0002f69170e6caba7edd9", "indy3", "EGA", "EGA Demo", 5361, Common::EN_ANY, Common::kPlatformDOS },
{ "b628506f7def772e40de0aa5440fb8e1", "activity", "HE 70", "", -1, Common::EN_ANY, Common::kPlatformWindows },
@@ -568,6 +575,7 @@ static const MD5Table md5table[] = {
{ "d7b247c26bf1f01f8f7daf142be84de3", "balloon", "HE 99", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "d8323015ecb8b10bf53474f6e6b0ae33", "dig", "", "", 16304, Common::UNK_LANG, Common::kPlatformUnknown },
{ "d917f311a448e3cc7239c31bddb00dd2", "samnmax", "", "CD", 9080, Common::EN_ANY, Common::kPlatformUnknown },
+ { "d93cc8be628ed5d3b3a29188fc7105d3", "dig", "Steam", "Steam", 1061296, Common::EN_ANY, Common::kPlatformMacintosh },
{ "d9d0dd93d16ab4dec55cabc2b86bbd17", "samnmax", "", "Demo", 6478, Common::EN_ANY, Common::kPlatformDOS },
{ "da09e666fc8f5b78d7b0ac65d1a3b56e", "monkey2", "FM-TOWNS", "", 11135, Common::EN_ANY, Common::kPlatformFMTowns },
{ "da6269b18fcb08189c0aa9c95533cce2", "monkey", "CD", "CD", 8955, Common::IT_ITA, Common::kPlatformDOS },
@@ -628,6 +636,7 @@ static const MD5Table md5table[] = {
{ "f237bf8a5ef9af78b2a6a4f3901da341", "pajama", "", "Demo", 18354, Common::EN_ANY, Common::kPlatformUnknown },
{ "f27b1ba0eadaf2a6617b2b58192d1dbf", "samnmax", "Floppy", "Floppy", -1, Common::DE_DEU, Common::kPlatformDOS },
{ "f2ec78e50bdc63b70044e9758be10914", "spyfox", "HE 98.5", "Demo", -1, Common::NL_NLD, Common::kPlatformMacintosh },
+ { "f3c5d9bf3f091bd1f18dc1013fba5396", "atlantis", "Steam", "Steam", 638976, Common::EN_ANY, Common::kPlatformWindows },
{ "f3d55aea441e260e9e9c7d2a187097e0", "puttzoo", "", "Demo", 14337, Common::EN_ANY, Common::kPlatformWindows },
{ "f40a7f495f59188ca57a9d1d50301bb6", "puttputt", "HE 60", "Demo", -1, Common::EN_ANY, Common::kPlatformMacintosh },
{ "f5228b0cc1c19e6ea8268ba2eeb61f60", "freddi", "HE 73", "Demo", -1, Common::FR_FRA, Common::kPlatformWindows },
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 34c231e5d4..475b146a7b 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -467,6 +467,8 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
VAR_NUM_SCRIPT_CYCLES = 0xFF;
VAR_SCRIPT_CYCLE = 0xFF;
+ VAR_QUIT_SCRIPT = 0xFF;
+
VAR_NUM_GLOBAL_OBJS = 0xFF;
// Use g_scumm from error() ONLY
@@ -1026,6 +1028,35 @@ Common::Error ScummEngine::init() {
}
#endif
+ // Extra directories needed for the Steam versions
+ if (_filenamePattern.genMethod == kGenDiskNumSteam || _filenamePattern.genMethod == kGenRoomNumSteam) {
+ if (_game.platform == Common::kPlatformWindows) {
+ switch (_game.id) {
+ case GID_INDY3 :
+ SearchMan.addSubDirectoryMatching(gameDataDir, "indy3");
+ break;
+ case GID_INDY4 :
+ SearchMan.addSubDirectoryMatching(gameDataDir, "atlantis");
+ break;
+ case GID_LOOM :
+ SearchMan.addSubDirectoryMatching(gameDataDir, "loom");
+ break;
+#ifdef ENABLE_SCUMM_7_8
+ case GID_DIG :
+ SearchMan.addSubDirectoryMatching(gameDataDir, "dig");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "dig/video");
+ break;
+#endif
+ default:
+ break;
+ }
+ } else {
+ SearchMan.addSubDirectoryMatching(gameDataDir, "Contents");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "Contents/MacOS");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "Contents/Resources");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "Contents/Resources/video");
+ }
+ }
// The kGenUnchanged method is only used for 'container files', i.e. files
// that contain the real game files bundled together in an archive format.
@@ -1126,15 +1157,30 @@ Common::Error ScummEngine::init() {
error("Couldn't find known subfile inside container file '%s'", _containerFile.c_str());
_fileHandle->close();
-
} else {
error("kGenUnchanged used with unsupported platform");
}
} else {
- // Regular access, no container file involved
- _fileHandle = new ScummFile();
+ if (_filenamePattern.genMethod == kGenDiskNumSteam || _filenamePattern.genMethod == kGenRoomNumSteam) {
+ // Steam game versions have the index file embedded in the main executable
+ const SteamIndexFile *indexFile = lookUpSteamIndexFile(_filenamePattern.pattern, _game.platform);
+ if (!indexFile || indexFile->id != _game.id) {
+ error("Couldn't find index file description for Steam version");
+ } else {
+ _fileHandle = new ScummSteamFile(*indexFile);
+ }
+ } else {
+ // Regular access, no container file involved
+ _fileHandle = new ScummFile();
+ }
}
+ // Steam Win and Mac versions share the same DOS data files. We show Windows or Mac
+ // for the platform the detector, but internally we force the platform to DOS, so that
+ // the code for handling the original DOS data files is used.
+ if (_filenamePattern.genMethod == kGenDiskNumSteam || _filenamePattern.genMethod == kGenRoomNumSteam)
+ _game.platform = Common::kPlatformDOS;
+
// Load CJK font, if present
// Load it earlier so _useCJKMode variable could be set
loadCJKFont();
@@ -1218,7 +1264,7 @@ Common::Error ScummEngine::init() {
void ScummEngine::setupScumm() {
// On some systems it's not safe to run CD audio games from the CD.
- if (_game.features & GF_AUDIOTRACKS) {
+ if (_game.features & GF_AUDIOTRACKS && !Common::File::exists("CDDA.SOU")) {
checkCD();
int cd_num = ConfMan.getInt("cdrom");
@@ -2029,6 +2075,7 @@ Common::Error ScummEngine::go() {
if (shouldQuit()) {
// TODO: Maybe perform an autosave on exit?
+ runQuitScript();
}
}
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index be5a83d8c9..af118a89a1 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -256,6 +256,7 @@ enum ScummGameId {
GID_BASEBALL2003,
GID_BASKETBALL,
GID_MOONBASE,
+ GID_PJGAMES,
GID_HECUP // CUP demos
};
@@ -670,6 +671,7 @@ protected:
virtual void checkAndRunSentenceScript();
void runExitScript();
void runEntryScript();
+ void runQuitScript();
void runAllScripts();
void freezeScripts(int scr);
void unfreezeScripts();
@@ -1360,6 +1362,8 @@ public:
byte VAR_SCRIPT_CYCLE; // Used in runScript()/runObjectScript()
byte VAR_NUM_SCRIPT_CYCLES; // Used in runAllScripts()
+
+ byte VAR_QUIT_SCRIPT; // Used in confirmExitDialog()
// Exists both in V7 and in V72HE:
byte VAR_NUM_GLOBAL_OBJS;
diff --git a/engines/scumm/smush/smush_font.cpp b/engines/scumm/smush/smush_font.cpp
index 4c04901b42..e2f75a6862 100644
--- a/engines/scumm/smush/smush_font.cpp
+++ b/engines/scumm/smush/smush_font.cpp
@@ -115,9 +115,7 @@ int SmushFont::drawChar(byte *buffer, int dst_width, int x, int y, byte chr) {
int SmushFont::draw2byte(byte *buffer, int dst_width, int x, int y, int idx) {
int w = _vm->_2byteWidth;
int h = _vm->_2byteHeight;
-
- byte *src = _vm->get2byteCharPtr(idx);
- byte *dst = buffer + dst_width * (y + (_vm->_game.id == GID_CMI ? 7 : (_vm->_game.id == GID_DIG ? 2 : 0))) + x;
+ const byte *src = _vm->get2byteCharPtr(idx);
byte bits = 0;
char color = (_color != -1) ? _color : 1;
@@ -128,18 +126,60 @@ int SmushFont::draw2byte(byte *buffer, int dst_width, int x, int y, int idx) {
if (_vm->_game.id == GID_FT)
color = 1;
- for (int j = 0; j < h; j++) {
- for (int i = 0; i < w; i++) {
- if ((i % 8) == 0)
- bits = *src++;
- if (bits & revBitMask(i % 8)) {
- dst[i + 1] = 0;
- dst[dst_width + i] = 0;
- dst[dst_width + i + 1] = 0;
- dst[i] = color;
+ enum ShadowMode {
+ kNone,
+ kNormalShadowMode,
+ kKoreanV7ShadowMode,
+ kKoreanV8ShadowMode
+ };
+
+ ShadowMode shadowMode = kNone;
+
+ if (_vm->_language == Common::KO_KOR) {
+ if (_vm->_game.version == 8)
+ shadowMode = kKoreanV8ShadowMode;
+ else
+ shadowMode = kKoreanV7ShadowMode;
+ }
+
+ int shadowOffsetXTable[4] = {-1, 0, 1, 0};
+ int shadowOffsetYTable[4] = {0, 1, 0, 0};
+ int shadowOffsetColorTable[4] = {0, 0, 0, color};
+
+ int shadowIdx = 3;
+ if (shadowMode == kKoreanV8ShadowMode)
+ shadowIdx = 0;
+ else if (shadowMode == kKoreanV7ShadowMode)
+ shadowIdx = 2;
+
+ const byte *origSrc = src;
+
+ for (; shadowIdx < 4; shadowIdx++) {
+ int offX = x + shadowOffsetXTable[shadowIdx];
+ int offY = y + shadowOffsetYTable[shadowIdx];
+ byte drawColor = shadowOffsetColorTable[shadowIdx];
+
+ src = origSrc;
+
+ byte *dst = buffer + dst_width * (offY + (_vm->_game.id == GID_CMI ? 7 : (_vm->_game.id == GID_DIG ? 2 : 0))) + offX;
+
+ for (int j = 0; j < h; j++) {
+ for (int i = 0; i < w; i++) {
+ if (offX + i < 0)
+ continue;
+ if ((i % 8) == 0)
+ bits = *src++;
+ if (bits & revBitMask(i % 8)) {
+ if (shadowMode == kNormalShadowMode) {
+ dst[i + 1] = 0;
+ dst[dst_width + i] = 0;
+ dst[dst_width + i + 1] = 0;
+ }
+ dst[i] = drawColor;
+ }
}
+ dst += dst_width;
}
- dst += dst_width;
}
return w + 1;
}
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 01bdefc7c0..cb428d1c15 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -27,6 +27,7 @@
#include "common/substream.h"
#include "scumm/actor.h"
+#include "scumm/cdda.h"
#include "scumm/file.h"
#include "scumm/imuse/imuse.h"
#include "scumm/imuse_digi/dimuse.h"
@@ -36,8 +37,6 @@
#include "scumm/sound.h"
#include "scumm/util.h"
-#include "backends/audiocd/audiocd.h"
-
#include "audio/decoders/adpcm.h"
#include "audio/decoders/flac.h"
#include "audio/mididrv.h"
@@ -89,11 +88,21 @@ Sound::Sound(ScummEngine *parent, Audio::Mixer *mixer)
memset(_mouthSyncTimes, 0, sizeof(_mouthSyncTimes));
_musicType = MDT_NONE;
+
+ _loomSteamCD.playing = false;
+ _loomSteamCD.track = 0;
+ _loomSteamCD.start = 0;
+ _loomSteamCD.duration = 0;
+ _loomSteamCD.numLoops = 0;
+ _loomSteamCD.volume = Audio::Mixer::kMaxChannelVolume;
+ _loomSteamCD.balance = 0;
+
+ _isLoomSteam = _vm->_game.id == GID_LOOM && Common::File::exists("CDDA.SOU");
}
Sound::~Sound() {
stopCDTimer();
- g_system->getAudioCDManager()->stop();
+ stopCD();
free(_offsetTable);
}
@@ -649,7 +658,11 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle
_vm->_imuseDigital->startVoice(kTalkSoundID, input);
#endif
} else {
- _mixer->playStream(Audio::Mixer::kSpeechSoundType, handle, input, id);
+ if (mode == 1) {
+ _mixer->playStream(Audio::Mixer::kSFXSoundType, handle, input, id);
+ } else {
+ _mixer->playStream(Audio::Mixer::kSpeechSoundType, handle, input, id);
+ }
}
}
}
@@ -838,9 +851,6 @@ void Sound::soundKludge(int *list, int num) {
}
void Sound::talkSound(uint32 a, uint32 b, int mode, int channel) {
- if (_vm->_game.version >= 5 && ConfMan.getBool("speech_mute"))
- return;
-
if (mode == 1) {
_talk_sound_a1 = a;
_talk_sound_b1 = b;
@@ -1033,7 +1043,7 @@ void Sound::playCDTrack(int track, int numLoops, int startFrame, int duration) {
// Play it
if (!_soundsPaused)
- g_system->getAudioCDManager()->play(track, numLoops, startFrame, duration);
+ playCDTrackInternal(track, numLoops, startFrame, duration);
// Start the timer after starting the track. Starting an MP3 track is
// almost instantaneous, but a CD player may take some time. Hopefully
@@ -1041,16 +1051,59 @@ void Sound::playCDTrack(int track, int numLoops, int startFrame, int duration) {
startCDTimer();
}
+void Sound::playCDTrackInternal(int track, int numLoops, int startFrame, int duration) {
+ _loomSteamCD.track = track;
+ _loomSteamCD.numLoops = numLoops;
+ _loomSteamCD.start = startFrame;
+ _loomSteamCD.duration = duration;
+
+ if (!_isLoomSteam) {
+ g_system->getAudioCDManager()->play(track, numLoops, startFrame, duration);
+ } else {
+ // Stop any currently playing track
+ _mixer->stopHandle(_loomSteamCDAudioHandle);
+
+ Common::File *cddaFile = new Common::File();
+ if (cddaFile->open("CDDA.SOU")) {
+ Audio::Timestamp start = Audio::Timestamp(0, startFrame, 75);
+ Audio::Timestamp end = Audio::Timestamp(0, startFrame + duration, 75);
+ Audio::SeekableAudioStream *stream = makeCDDAStream(cddaFile, DisposeAfterUse::YES);
+
+ _mixer->playStream(Audio::Mixer::kMusicSoundType, &_loomSteamCDAudioHandle,
+ Audio::makeLoopingAudioStream(stream, start, end, (numLoops < 1) ? numLoops + 1 : numLoops));
+ } else {
+ delete cddaFile;
+ }
+ }
+}
+
void Sound::stopCD() {
- g_system->getAudioCDManager()->stop();
+ if (!_isLoomSteam)
+ g_system->getAudioCDManager()->stop();
+ else
+ _mixer->stopHandle(_loomSteamCDAudioHandle);
}
int Sound::pollCD() const {
- return g_system->getAudioCDManager()->isPlaying();
+ if (!_isLoomSteam)
+ return g_system->getAudioCDManager()->isPlaying();
+ else
+ return _mixer->isSoundHandleActive(_loomSteamCDAudioHandle);
}
void Sound::updateCD() {
- g_system->getAudioCDManager()->updateCD();
+ if (!_isLoomSteam)
+ g_system->getAudioCDManager()->updateCD();
+}
+
+AudioCDManager::Status Sound::getCDStatus() {
+ if (!_isLoomSteam)
+ return g_system->getAudioCDManager()->getStatus();
+ else {
+ AudioCDManager::Status info = _loomSteamCD;
+ info.playing = _mixer->isSoundHandleActive(_loomSteamCDAudioHandle);
+ return info;
+ }
}
void Sound::saveLoadWithSerializer(Serializer *ser) {
diff --git a/engines/scumm/sound.h b/engines/scumm/sound.h
index a96d2b8ed5..a479ad5731 100644
--- a/engines/scumm/sound.h
+++ b/engines/scumm/sound.h
@@ -27,6 +27,7 @@
#include "audio/audiostream.h"
#include "audio/mididrv.h"
#include "audio/mixer.h"
+#include "backends/audiocd/audiocd.h"
#include "scumm/saveload.h"
namespace Audio {
@@ -86,6 +87,10 @@ protected:
int16 _currentCDSound;
int16 _currentMusic;
+ Audio::SoundHandle _loomSteamCDAudioHandle;
+ bool _isLoomSteam;
+ AudioCDManager::Status _loomSteamCD;
+
public:
Audio::SoundHandle _talkChannelHandle; // Handle of mixer channel actor is talking on
@@ -119,9 +124,11 @@ public:
void stopCDTimer();
void playCDTrack(int track, int numLoops, int startFrame, int duration);
+ void playCDTrackInternal(int track, int numLoops, int startFrame, int duration);
void stopCD();
int pollCD() const;
void updateCD();
+ AudioCDManager::Status getCDStatus();
int getCurrentCDSound() const { return _currentCDSound; }
// Used by the save/load system:
diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp
index 79d7ed03da..a903ac5804 100644
--- a/engines/scumm/vars.cpp
+++ b/engines/scumm/vars.cpp
@@ -320,6 +320,7 @@ void ScummEngine_v90he::setupScummVars() {
ScummEngine_v80he::setupScummVars();
VAR_TIMER = 97;
+ VAR_QUIT_SCRIPT = 102;
VAR_SCRIPT_CYCLE = 103;
VAR_NUM_SCRIPT_CYCLES = 104;
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index 0257a805ff..ac358e774b 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -542,7 +542,7 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan *
Video::VideoDecoder *dxaDecoder = new Video::DXADecoder();
return new MoviePlayer(vm, textMan, resMan, system, dxaDecoder, kVideoDecoderDXA);
#else
- GUI::MessageDialog dialog(_("DXA cutscenes found but ScummVM has been built without zlib support"), _("OK"));
+ GUI::MessageDialog dialog(_("DXA cutscenes found but ScummVM has been built without zlib"), _("OK"));
dialog.runModal();
return 0;
#endif
@@ -558,7 +558,7 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan *
Video::VideoDecoder *aviDecoder = new Video::AVIDecoder(12);
return new MoviePlayer(vm, textMan, resMan, system, aviDecoder, kVideoDecoderMP2);
#else
- GUI::MessageDialog dialog(_("MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"), _("OK"));
+ GUI::MessageDialog dialog(_("MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"), _("OK"));
dialog.runModal();
return 0;
#endif
diff --git a/engines/sword1/console.cpp b/engines/sword1/console.cpp
index 3eb3b93a19..7fabc62192 100644
--- a/engines/sword1/console.cpp
+++ b/engines/sword1/console.cpp
@@ -22,14 +22,37 @@
#include "sword1/console.h"
#include "sword1/sword1.h"
+#include "sword1/sound.h"
+#include "common/config-manager.h"
+#include "common/str.h"
namespace Sword1 {
SwordConsole::SwordConsole(SwordEngine *vm) : GUI::Debugger(), _vm(vm) {
assert(_vm);
+ if (scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1mac") == 0 || scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1macdemo") == 0)
+ registerCmd("speechEndianness", WRAP_METHOD(SwordConsole, Cmd_SpeechEndianness));
}
SwordConsole::~SwordConsole() {
}
+
+bool SwordConsole::Cmd_SpeechEndianness(int argc, const char **argv) {
+ if (argc == 1) {
+ debugPrintf("Using %s speech\n", _vm->_sound->_bigEndianSpeech ? "be" : "le");
+ return true;
+ }
+ if (argc == 2) {
+ if (scumm_stricmp(argv[1], "le") == 0) {
+ _vm->_sound->_bigEndianSpeech = false;
+ return false;
+ } else if (scumm_stricmp(argv[1], "be") == 0) {
+ _vm->_sound->_bigEndianSpeech = true;
+ return false;
+ }
+ }
+ debugPrintf("Usage: %s [le | be]\n", argv[0]);
+ return true;
+}
} // End of namespace Sword
diff --git a/engines/sword1/console.h b/engines/sword1/console.h
index a2bb51f9a4..88ee756151 100644
--- a/engines/sword1/console.h
+++ b/engines/sword1/console.h
@@ -36,6 +36,7 @@ public:
private:
SwordEngine *_vm;
+ bool Cmd_SpeechEndianness(int argc, const char **argv);
};
} // End of namespace Sword1
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index 0b4d3829d6..a6e6d3917e 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -116,7 +116,7 @@ void Sound::checkSpeechFileEndianness() {
return;
// I picked the sample to use randomly (I just made sure it is long enough so that there is
- // a fair change of the heuristic to have a stable result and work for every language).
+ // a fair chance of the heuristic to have a stable result and work for every language).
int roomNo = _currentCowFile == 1 ? 1 : 129;
int localNo = _currentCowFile == 1 ? 2 : 933;
// Get the speech data and apply the heuristic
@@ -125,31 +125,46 @@ void Sound::checkSpeechFileEndianness() {
uint32 index = _cowHeader[locIndex + (localNo * 2) - 1];
if (sampleSize) {
uint32 size;
- double be_diff_sum = 0., le_diff_sum = 0.;
+ // Compute average of difference between two consecutive samples for both BE and LE
+ // The way uncompressSpeech works we may get un incorrect number of identical consecutive samples
+ // when using the wrong endianess. To avoid biasing the result we this we skip all duplicate values.
_bigEndianSpeech = false;
int16 *data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size);
- // Compute average of difference between two consecutive samples for both BE and LE
if (data) {
- if (size > 4000)
- size = 2000;
- else
- size /= 2;
- int16 prev_be_value = (int16)SWAP_BYTES_16(*((uint16 *)(data)));
- for (uint32 i = 1; i < size; ++i) {
- le_diff_sum += fabs((double)(data[i] - data[i - 1]));
- int16 be_value = (int16)SWAP_BYTES_16(*((uint16 *)(data + i)));
- be_diff_sum += fabs((double)(be_value - prev_be_value));
- prev_be_value = be_value;
+ uint32 max_cpt = size > 2000 ? 2000 : size;
+ double le_diff_sum = 0.;
+ uint32 le_cpt = 0;
+ for (uint32 i = 1; i < size && le_cpt < max_cpt; ++i) {
+ if (data[i] != data[i-1]) {
+ le_diff_sum += fabs((double)(data[i] - data[i - 1]));
+ ++le_cpt;
+ }
}
+ le_diff_sum /= le_cpt;
delete[] data;
+ _bigEndianSpeech = true;
+ data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size);
+ if (data) {
+ double be_diff_sum = 0.;
+ uint32 be_cpt = 0;
+ for (uint32 i = 1; i < size && be_cpt < le_cpt; ++i) {
+ if (data[i] != data[i-1]) {
+ be_diff_sum += fabs((double)(data[i] - data[i - 1]));
+ ++be_cpt;
+ }
+ }
+ be_diff_sum /= be_cpt;
+ delete [] data;
+ // Set the big endian flag
+ _bigEndianSpeech = (be_diff_sum < le_diff_sum);
+ if (_bigEndianSpeech)
+ debug(6, "Mac version: using big endian speech file");
+ else
+ debug(6, "Mac version: using little endian speech file");
+ debug(8, "Speech endianness heuristic: average = %f for BE (%d samples) and %f for LE (%d samples)", be_diff_sum, be_cpt, le_diff_sum, le_cpt);
+ } else
+ _bigEndianSpeech = false;
}
- // Set the big endian flag
- _bigEndianSpeech = (be_diff_sum < le_diff_sum);
- if (_bigEndianSpeech)
- debug(6, "Mac version: using big endian speech file");
- else
- debug(6, "Mac version: using little endian speech file");
- debug(8, "Speech endianness heuristic: average = %f for BE and %f for LE, computed on %d samples)", be_diff_sum / (size - 1), le_diff_sum / (size - 1), size);
}
}
diff --git a/engines/sword1/sound.h b/engines/sword1/sound.h
index 666598dba0..54006bd8b4 100644
--- a/engines/sword1/sound.h
+++ b/engines/sword1/sound.h
@@ -79,6 +79,7 @@ enum CowMode {
};
class Sound {
+ friend class SwordConsole;
public:
Sound(Audio::Mixer *mixer, ResMan *pResMan);
~Sound();
diff --git a/engines/sword1/sword1.h b/engines/sword1/sword1.h
index c58e97e353..eb24ef70fa 100644
--- a/engines/sword1/sword1.h
+++ b/engines/sword1/sword1.h
@@ -79,6 +79,7 @@ struct SystemVars {
};
class SwordEngine : public Engine {
+ friend class SwordConsole;
public:
SwordEngine(OSystem *syst);
virtual ~SwordEngine();
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index 92fa9d0e44..e93f27f76c 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -442,7 +442,7 @@ MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, OSystem *system
Video::DXADecoder *dxaDecoder = new Video::DXADecoder();
return new MoviePlayer(vm, system, dxaDecoder, kVideoDecoderDXA);
#else
- GUI::MessageDialog dialog(_("DXA cutscenes found but ScummVM has been built without zlib support"), _("OK"));
+ GUI::MessageDialog dialog(_("DXA cutscenes found but ScummVM has been built without zlib"), _("OK"));
dialog.runModal();
return NULL;
#endif
diff --git a/engines/sword25/gfx/animation.cpp b/engines/sword25/gfx/animation.cpp
index eeb78857ea..e2662fb2b3 100644
--- a/engines/sword25/gfx/animation.cpp
+++ b/engines/sword25/gfx/animation.cpp
@@ -189,14 +189,14 @@ bool Animation::doRender(RectangleList *updateRects) {
bool result;
if (isScalingAllowed() && (_width != pBitmapResource->getWidth() || _height != pBitmapResource->getHeight())) {
result = pBitmapResource->blit(_absoluteX, _absoluteY,
- (animationDescriptionPtr->getFrame(_currentFrame).flipV ? BitmapResource::FLIP_V : 0) |
- (animationDescriptionPtr->getFrame(_currentFrame).flipH ? BitmapResource::FLIP_H : 0),
+ (animationDescriptionPtr->getFrame(_currentFrame).flipV ? Graphics::FLIP_V : 0) |
+ (animationDescriptionPtr->getFrame(_currentFrame).flipH ? Graphics::FLIP_H : 0),
0, _modulationColor, _width, _height,
updateRects);
} else {
result = pBitmapResource->blit(_absoluteX, _absoluteY,
- (animationDescriptionPtr->getFrame(_currentFrame).flipV ? BitmapResource::FLIP_V : 0) |
- (animationDescriptionPtr->getFrame(_currentFrame).flipH ? BitmapResource::FLIP_H : 0),
+ (animationDescriptionPtr->getFrame(_currentFrame).flipV ? Graphics::FLIP_V : 0) |
+ (animationDescriptionPtr->getFrame(_currentFrame).flipH ? Graphics::FLIP_H : 0),
0, _modulationColor, -1, -1,
updateRects);
}
diff --git a/engines/sword25/gfx/bitmapresource.h b/engines/sword25/gfx/bitmapresource.h
index 7a4daedd84..2ae891f5cd 100644
--- a/engines/sword25/gfx/bitmapresource.h
+++ b/engines/sword25/gfx/bitmapresource.h
@@ -40,22 +40,6 @@ namespace Sword25 {
class BitmapResource : public Resource {
public:
- /**
- @brief Die mіglichen Flippingparameter fќr die Blit-Methode.
- */
- enum FLIP_FLAGS {
- /// Das Bild wird nicht gespiegelt.
- FLIP_NONE = 0,
- /// Das Bild wird an der horizontalen Achse gespiegelt.
- FLIP_H = 1,
- /// Das Bild wird an der vertikalen Achse gespiegelt.
- FLIP_V = 2,
- /// Das Bild wird an der horizontalen und vertikalen Achse gespiegelt.
- FLIP_HV = FLIP_H | FLIP_V,
- /// Das Bild wird an der horizontalen und vertikalen Achse gespiegelt.
- FLIP_VH = FLIP_H | FLIP_V
- };
-
BitmapResource(const Common::String &filename, Image *pImage) :
_pImage(pImage), Resource(filename, Resource::TYPE_BITMAP) {}
virtual ~BitmapResource() { delete _pImage; }
@@ -120,7 +104,7 @@ public:
- IsColorModulationAllowed()
*/
bool blit(int posX = 0, int posY = 0,
- int flipping = FLIP_NONE,
+ int flipping = Graphics::FLIP_NONE,
Common::Rect *pSrcPartRect = NULL,
uint color = BS_ARGB(255, 255, 255, 255),
int width = -1, int height = -1,
diff --git a/engines/sword25/gfx/dynamicbitmap.cpp b/engines/sword25/gfx/dynamicbitmap.cpp
index ce9c056d08..a335f87fa5 100644
--- a/engines/sword25/gfx/dynamicbitmap.cpp
+++ b/engines/sword25/gfx/dynamicbitmap.cpp
@@ -86,8 +86,8 @@ bool DynamicBitmap::doRender(RectangleList *updateRects) {
// a bit slow when drawing videos, but it's not the main
// bottleneck.
result = _image->blit(_absoluteX, _absoluteY,
- (_flipV ? BitmapResource::FLIP_V : 0) |
- (_flipH ? BitmapResource::FLIP_H : 0),
+ (_flipV ? Graphics::FLIP_V : 0) |
+ (_flipH ? Graphics::FLIP_H : 0),
0, _modulationColor, -1, -1,
updateRects);
#else
@@ -105,8 +105,8 @@ bool DynamicBitmap::doRender(RectangleList *updateRects) {
return true;
} else {
result = _image->blit(_absoluteX, _absoluteY,
- (_flipV ? BitmapResource::FLIP_V : 0) |
- (_flipH ? BitmapResource::FLIP_H : 0),
+ (_flipV ? Graphics::FLIP_V : 0) |
+ (_flipH ? Graphics::FLIP_H : 0),
0, _modulationColor, _width, _height,
updateRects);
}
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index 2a870c021d..f887c3cd51 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -183,7 +183,7 @@ bool GraphicEngine::fill(const Common::Rect *fillRectPtr, uint color) {
if (rect.width() > 0 && rect.height() > 0) {
if (ca == 0xff) {
- _backSurface.fillRect(rect, color);
+ _backSurface.fillRect(rect, BS_ARGB(cr, cg, cb, ca));
} else {
byte *outo = (byte *)_backSurface.getBasePtr(rect.left, rect.top);
byte *out;
@@ -192,23 +192,23 @@ bool GraphicEngine::fill(const Common::Rect *fillRectPtr, uint color) {
out = outo;
for (int j = rect.left; j < rect.right; j++) {
#if defined(SCUMM_LITTLE_ENDIAN)
+ *out = 255;
+ out++;
*out += (byte)(((cb - *out) * ca) >> 8);
out++;
*out += (byte)(((cg - *out) * ca) >> 8);
out++;
*out += (byte)(((cr - *out) * ca) >> 8);
out++;
- *out = 255;
- out++;
#else
- *out = 255;
- out++;
*out += (byte)(((cr - *out) * ca) >> 8);
out++;
*out += (byte)(((cg - *out) * ca) >> 8);
out++;
*out += (byte)(((cb - *out) * ca) >> 8);
out++;
+ *out = 255;
+ out++;
#endif
}
diff --git a/engines/sword25/gfx/image/image.h b/engines/sword25/gfx/image/image.h
index 8fbf802501..f8cb0dfec0 100644
--- a/engines/sword25/gfx/image/image.h
+++ b/engines/sword25/gfx/image/image.h
@@ -43,6 +43,7 @@
#include "sword25/kernel/common.h"
#include "common/rect.h"
#include "sword25/gfx/graphicengine.h"
+#include "graphics/transparent_surface.h"
namespace Sword25 {
@@ -52,23 +53,6 @@ class Image {
public:
virtual ~Image() {}
- // Enums
- /**
- @brief The possible flipping parameters for the blit methode.
- */
- enum FLIP_FLAGS {
- /// The image will not be flipped.
- FLIP_NONE = 0,
- /// The image will be flipped at the horizontal axis.
- FLIP_H = 1,
- /// The image will be flipped at the vertical axis.
- FLIP_V = 2,
- /// The image will be flipped at the horizontal and vertical axis.
- FLIP_HV = FLIP_H | FLIP_V,
- /// The image will be flipped at the horizontal and vertical axis.
- FLIP_VH = FLIP_H | FLIP_V
- };
-
//@{
/** @name Accessor methods */
@@ -100,7 +84,7 @@ public:
@param PosY the position on the Y-axis in the target image in pixels where the image is supposed to be rendered.<br>
The default value is 0.
@param Flipping how the the image should be flipped.<br>
- The default value is BS_Image::FLIP_NONE (no flipping)
+ The default value is Graphics::FLIP_NONE (no flipping)
@param pSrcPartRect Pointer on Common::Rect which specifies the section to be rendered. If the whole image has to be rendered the Pointer is NULL.<br>
This referes to the unflipped and unscaled image.<br>
The default value is NULL.
@@ -128,7 +112,7 @@ public:
- IsSetContentAllowed()
*/
virtual bool blit(int posX = 0, int posY = 0,
- int flipping = FLIP_NONE,
+ int flipping = Graphics::FLIP_NONE,
Common::Rect *pPartRect = NULL,
uint color = BS_ARGB(255, 255, 255, 255),
int width = -1, int height = -1,
diff --git a/engines/sword25/gfx/image/imgloader.cpp b/engines/sword25/gfx/image/imgloader.cpp
index b4b3030de8..f299cee9d1 100644
--- a/engines/sword25/gfx/image/imgloader.cpp
+++ b/engines/sword25/gfx/image/imgloader.cpp
@@ -45,7 +45,7 @@ bool ImgLoader::decodePNGImage(const byte *fileDataPtr, uint fileSize, byte *&un
error("Error while reading PNG image");
const Graphics::Surface *sourceSurface = png.getSurface();
- Graphics::Surface *pngSurface = sourceSurface->convertTo(Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24), png.getPalette());
+ Graphics::Surface *pngSurface = sourceSurface->convertTo(Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0), png.getPalette());
width = pngSurface->w;
height = pngSurface->h;
@@ -70,7 +70,7 @@ bool ImgLoader::decodeThumbnailImage(const byte *pFileData, uint fileSize, byte
uint32 totalSize = pitch * height;
pUncompressedData = new byte[totalSize];
uint32 *dst = (uint32 *)pUncompressedData; // treat as uint32, for pixelformat output
- const Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24);
+ const Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
byte r, g, b;
for (uint32 i = 0; i < totalSize / 4; i++) {
diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp
index 107b4cd402..8c6369a790 100644
--- a/engines/sword25/gfx/image/renderedimage.cpp
+++ b/engines/sword25/gfx/image/renderedimage.cpp
@@ -100,9 +100,6 @@ static byte *readSavegameThumbnail(const Common::String &filename, uint &fileSiz
}
RenderedImage::RenderedImage(const Common::String &filename, bool &result) :
- _data(0),
- _width(0),
- _height(0),
_isTransparent(true) {
result = false;
@@ -130,10 +127,18 @@ RenderedImage::RenderedImage(const Common::String &filename, bool &result) :
// Uncompress the image
int pitch;
+ byte *dst;
+ int w, h;
if (isPNG)
- result = ImgLoader::decodePNGImage(pFileData, fileSize, _data, _width, _height, pitch);
+ result = ImgLoader::decodePNGImage(pFileData, fileSize, dst, w, h, pitch);
else
- result = ImgLoader::decodeThumbnailImage(pFileData, fileSize, _data, _width, _height, pitch);
+ result = ImgLoader::decodeThumbnailImage(pFileData, fileSize, dst, w, h, pitch);
+
+ _surface.w = w;
+ _surface.h = h;
+ _surface.pitch = w * 4;
+ _surface.setPixels(dst);
+ _surface.format = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
if (!result) {
error("Could not decode image.");
@@ -157,12 +162,9 @@ RenderedImage::RenderedImage(const Common::String &filename, bool &result) :
// -----------------------------------------------------------------------------
RenderedImage::RenderedImage(uint width, uint height, bool &result) :
- _width(width),
- _height(height),
_isTransparent(true) {
- _data = new byte[width * height * 4];
- Common::fill(_data, &_data[width * height * 4], 0);
+ _surface.create(width, height, Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0));
_backSurface = Kernel::getInstance()->getGfx()->getSurface();
@@ -172,9 +174,11 @@ RenderedImage::RenderedImage(uint width, uint height, bool &result) :
return;
}
-RenderedImage::RenderedImage() : _width(0), _height(0), _data(0), _isTransparent(true) {
+RenderedImage::RenderedImage() : _isTransparent(true) {
_backSurface = Kernel::getInstance()->getGfx()->getSurface();
+ _surface.format = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
+
_doCleanup = false;
return;
@@ -183,8 +187,6 @@ RenderedImage::RenderedImage() : _width(0), _height(0), _data(0), _isTransparent
// -----------------------------------------------------------------------------
RenderedImage::~RenderedImage() {
- if (_doCleanup)
- delete[] _data;
}
// -----------------------------------------------------------------------------
@@ -198,17 +200,17 @@ bool RenderedImage::fill(const Common::Rect *pFillRect, uint color) {
bool RenderedImage::setContent(const byte *pixeldata, uint size, uint offset, uint stride) {
// Check if PixelData contains enough pixel to create an image with image size equals width * height
- if (size < static_cast<uint>(_width * _height * 4)) {
- error("PixelData vector is too small to define a 32 bit %dx%d image.", _width, _height);
+ if (size < static_cast<uint>(_surface.w * _surface.h * 4)) {
+ error("PixelData vector is too small to define a 32 bit %dx%d image.", _surface.w, _surface.h);
return false;
}
const byte *in = &pixeldata[offset];
- byte *out = _data;
+ byte *out = (byte *)_surface.getPixels();
- for (int i = 0; i < _height; i++) {
- memcpy(out, in, _width * 4);
- out += _width * 4;
+ for (int i = 0; i < _surface.h; i++) {
+ memcpy(out, in, _surface.w * 4);
+ out += _surface.w * 4;
in += stride;
}
@@ -216,9 +218,10 @@ bool RenderedImage::setContent(const byte *pixeldata, uint size, uint offset, ui
}
void RenderedImage::replaceContent(byte *pixeldata, int width, int height) {
- _width = width;
- _height = height;
- _data = pixeldata;
+ _surface.w = width;
+ _surface.h = height;
+ _surface.pitch = width * 4;
+ _surface.setPixels(pixeldata);
}
// -----------------------------------------------------------------------------
@@ -230,251 +233,26 @@ uint RenderedImage::getPixel(int x, int y) {
// -----------------------------------------------------------------------------
bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRect, uint color, int width, int height, RectangleList *updateRects) {
- int ca = (color >> 24) & 0xff;
-
- // Check if we need to draw anything at all
- if (ca == 0)
- return true;
-
- int cr = (color >> 16) & 0xff;
- int cg = (color >> 8) & 0xff;
- int cb = (color >> 0) & 0xff;
-
- // Create an encapsulating surface for the data
- Graphics::Surface srcImage;
- // TODO: Is the data really in the screen format?
- srcImage.init(_width, _height, _width * 4, _data, g_system->getScreenFormat());
-
- if (pPartRect) {
- srcImage.setPixels(&_data[pPartRect->top * srcImage.pitch + pPartRect->left * 4]);
- srcImage.w = pPartRect->right - pPartRect->left;
- srcImage.h = pPartRect->bottom - pPartRect->top;
-
- debug(6, "Blit(%d, %d, %d, [%d, %d, %d, %d], %08x, %d, %d)", posX, posY, flipping,
- pPartRect->left, pPartRect->top, pPartRect->width(), pPartRect->height(), color, width, height);
- } else {
-
- debug(6, "Blit(%d, %d, %d, [%d, %d, %d, %d], %08x, %d, %d)", posX, posY, flipping, 0, 0,
- srcImage.w, srcImage.h, color, width, height);
- }
-
- if (width == -1)
- width = srcImage.w;
- if (height == -1)
- height = srcImage.h;
-
-#ifdef SCALING_TESTING
- // Hardcode scaling to 66% to test scaling
- width = width * 2 / 3;
- height = height * 2 / 3;
-#endif
-
- Graphics::Surface *img;
- Graphics::Surface *imgScaled = NULL;
- byte *savedPixels = NULL;
- if ((width != srcImage.w) || (height != srcImage.h)) {
- // Scale the image
- img = imgScaled = scale(srcImage, width, height);
- savedPixels = (byte *)img->getPixels();
- } else {
- img = &srcImage;
- }
-
- for (RectangleList::iterator it = updateRects->begin(); it != updateRects->end(); ++it) {
- const Common::Rect &clipRect = *it;
-
- int skipLeft = 0, skipTop = 0;
- int drawX = posX, drawY = posY;
- int drawWidth = img->w;
- int drawHeight = img->h;
-
- // Handle clipping
- if (drawX < clipRect.left) {
- skipLeft = clipRect.left - drawX;
- drawWidth -= skipLeft;
- drawX = clipRect.left;
- }
-
- if (drawY < clipRect.top) {
- skipTop = clipRect.top - drawY;
- drawHeight -= skipTop;
- drawY = clipRect.top;
- }
-
- if (drawX + drawWidth >= clipRect.right)
- drawWidth = clipRect.right - drawX;
-
- if (drawY + drawHeight >= clipRect.bottom)
- drawHeight = clipRect.bottom - drawY;
-
- if ((drawWidth > 0) && (drawHeight > 0)) {
- int xp = 0, yp = 0;
-
- int inStep = 4;
- int inoStep = img->pitch;
- if (flipping & Image::FLIP_V) {
- inStep = -inStep;
- xp = img->w - 1 - skipLeft;
- } else {
- xp = skipLeft;
- }
-
- if (flipping & Image::FLIP_H) {
- inoStep = -inoStep;
- yp = img->h - 1 - skipTop;
- } else {
- yp = skipTop;
- }
-
- byte *ino = (byte *)img->getBasePtr(xp, yp);
- byte *outo = (byte *)_backSurface->getBasePtr(drawX, drawY);
-
-#if defined(SCUMM_LITTLE_ENDIAN)
- // Simple memcpy if the source bitmap doesn't have transparent pixels and the drawing transparency is 255
- // NOTE Only possible with LE-machines at the moment, maybe it would be feasible to convert the bitmap pixels at loading time?
- if (!_isTransparent && ca == 255) {
- for (int i = 0; i < drawHeight; i++) {
- memcpy(outo, ino, drawWidth * 4);
- outo += _backSurface->pitch;
- ino += inoStep;
- }
- } else
-#endif
- {
- byte *in, *out;
- for (int i = 0; i < drawHeight; i++) {
- out = outo;
- in = ino;
- for (int j = 0; j < drawWidth; j++) {
- uint32 pix = *(uint32 *)in;
- int a = (pix >> 24) & 0xff;
- in += inStep;
-
- if (ca != 255) {
- a = a * ca >> 8;
- }
-
- if (a == 0) {
- // Full transparency
- out += 4;
- continue;
- }
-
- int b = (pix >> 0) & 0xff;
- int g = (pix >> 8) & 0xff;
- int r = (pix >> 16) & 0xff;
-
- if (a == 255) {
-#if defined(SCUMM_LITTLE_ENDIAN)
- if (cb != 255)
- b = (b * cb) >> 8;
- if (cg != 255)
- g = (g * cg) >> 8;
- if (cr != 255)
- r = (r * cr) >> 8;
- *(uint32 *)out = (255 << 24) | (r << 16) | (g << 8) | b;
- out += 4;
-#else
- *out++ = a;
- if (cr != 255)
- *out++ = (r * cr) >> 8;
- else
- *out++ = r;
- if (cg != 255)
- *out++ = (g * cg) >> 8;
- else
- *out++ = g;
- if (cb != 255)
- *out++ = (b * cb) >> 8;
- else
- *out++ = b;
-#endif
- } else {
-#if defined(SCUMM_LITTLE_ENDIAN)
- pix = *(uint32 *)out;
- int outb = ((pix >> 0) & 0xff) * (255 - a);
- int outg = ((pix >> 8) & 0xff) * (255 - a);
- int outr = ((pix >> 16) & 0xff) * (255 - a);
- if (cb == 0)
- outb = outb >> 8;
- else if (cb != 255)
- outb = ((outb << 8) + b * a * cb) >> 16;
- else
- outb = (outb + b * a) >> 8;
- if (cg == 0)
- outg = outg >> 8;
- else if (cg != 255)
- outg = ((outg << 8) + g * a * cg) >> 16;
- else
- outg = (outg + g * a) >> 8;
- if (cr == 0)
- outr = outr >> 8;
- else if (cr != 255)
- outr = ((outr << 8) + r * a * cr) >> 16;
- else
- outr = (outr + r * a) >> 8;
- *(uint32 *)out = (255 << 24) | (outr << 16) | (outg << 8) | outb;
- out += 4;
-#else
- *out = 255;
- out++;
- if (cr == 0)
- *out = (*out * (255-a)) >> 8;
- else if (cr != 255)
- *out = (((*out * (255-a)) << 8) + r * a * cr) >> 16;
- else
- *out = ((*out * (255-a)) + r * a) >> 8;
- out++;
- if (cg == 0)
- *out = (*out * (255-a)) >> 8;
- else if (cg != 255)
- *out = (((*out * (255-a)) << 8) + g * a * cg) >> 16;
- else
- *out = ((*out * (255-a)) + g * a) >> 8;
- out++;
- if (cb == 0)
- *out = (*out * (255-a)) >> 8;
- else if (cb != 255)
- *out = (((*out * (255-a)) << 8) + b * a * cb) >> 16;
- else
- *out = ((*out * (255-a)) + b * a) >> 8;
- out++;
-#endif
- }
- }
- outo += _backSurface->pitch;
- ino += inoStep;
- }
- }
-
- }
-
- }
-
- if (imgScaled) {
- imgScaled->setPixels(savedPixels);
- imgScaled->free();
- delete imgScaled;
- }
+ _surface.blit(*_backSurface, posX, posY, (((flipping & 1) ? Graphics::FLIP_V : 0) | ((flipping & 2) ? Graphics::FLIP_H : 0)), pPartRect, color, width, height);
return true;
}
void RenderedImage::copyDirectly(int posX, int posY) {
- byte *data = _data;
- int w = _width;
- int h = _height;
+ byte *data = (byte *)_surface.getPixels();
+ int w = _surface.w;
+ int h = _surface.h;
// Handle off-screen clipping
if (posY < 0) {
- h = MAX(0, (int)_height - -posY);
- data = (byte *)_data + _width * -posY;
+ h = MAX(0, (int)_surface.h - -posY);
+ data = (byte *)_surface.getPixels() + _surface.w * -posY;
posY = 0;
}
if (posX < 0) {
- w = MAX(0, (int)_width - -posX);
- data = (byte *)_data + (-posX * 4);
+ w = MAX(0, (int)_surface.h - -posX);
+ data = (byte *)_surface.getPixels() + (-posX * 4);
posX = 0;
}
@@ -487,9 +265,9 @@ void RenderedImage::copyDirectly(int posX, int posY) {
void RenderedImage::checkForTransparency() {
// Check if the source bitmap has any transparent pixels at all
_isTransparent = false;
- byte *data = _data;
- for (int i = 0; i < _height; i++) {
- for (int j = 0; j < _width; j++) {
+ byte *data = (byte *)_surface.getPixels();
+ for (int i = 0; i < _surface.h; i++) {
+ for (int j = 0; j < _surface.w; j++) {
_isTransparent = data[3] != 0xff;
if (_isTransparent)
return;
diff --git a/engines/sword25/gfx/image/renderedimage.h b/engines/sword25/gfx/image/renderedimage.h
index 3cc9725b12..5b65a27355 100644
--- a/engines/sword25/gfx/image/renderedimage.h
+++ b/engines/sword25/gfx/image/renderedimage.h
@@ -39,6 +39,7 @@
#include "sword25/kernel/common.h"
#include "sword25/gfx/image/image.h"
#include "sword25/gfx/graphicengine.h"
+#include "graphics/transparent_surface.h"
namespace Sword25 {
@@ -60,10 +61,10 @@ public:
virtual ~RenderedImage();
virtual int getWidth() const {
- return _width;
+ return _surface.w;
}
virtual int getHeight() const {
- return _height;
+ return _surface.h;
}
virtual GraphicEngine::COLOR_FORMATS getColorFormat() const {
return GraphicEngine::CF_ARGB32;
@@ -72,7 +73,7 @@ public:
void copyDirectly(int posX, int posY);
virtual bool blit(int posX = 0, int posY = 0,
- int flipping = Image::FLIP_NONE,
+ int flipping = Graphics::FLIP_NONE,
Common::Rect *pPartRect = NULL,
uint color = BS_ARGB(255, 255, 255, 255),
int width = -1, int height = -1,
@@ -108,9 +109,7 @@ public:
virtual bool isSolid() const { return !_isTransparent; }
private:
- byte *_data;
- int _width;
- int _height;
+ Graphics::TransparentSurface _surface;
bool _doCleanup;
bool _isTransparent;
diff --git a/engines/sword25/gfx/image/swimage.h b/engines/sword25/gfx/image/swimage.h
index b31c2318ec..60978eb6cc 100644
--- a/engines/sword25/gfx/image/swimage.h
+++ b/engines/sword25/gfx/image/swimage.h
@@ -55,7 +55,7 @@ public:
}
virtual bool blit(int posX = 0, int posY = 0,
- int flipping = Image::FLIP_NONE,
+ int flipping = Graphics::FLIP_NONE,
Common::Rect *pPartRect = NULL,
uint color = BS_ARGB(255, 255, 255, 255),
int width = -1, int height = -1,
diff --git a/engines/sword25/gfx/image/vectorimage.h b/engines/sword25/gfx/image/vectorimage.h
index a99d532e75..057064fc6a 100644
--- a/engines/sword25/gfx/image/vectorimage.h
+++ b/engines/sword25/gfx/image/vectorimage.h
@@ -209,7 +209,7 @@ public:
}
virtual bool setContent(const byte *pixeldata, uint size, uint offset, uint stride);
virtual bool blit(int posX = 0, int posY = 0,
- int flipping = FLIP_NONE,
+ int flipping = Graphics::FLIP_NONE,
Common::Rect *pPartRect = NULL,
uint color = BS_ARGB(255, 255, 255, 255),
int width = -1, int height = -1,
diff --git a/engines/sword25/gfx/image/vectorimagerenderer.cpp b/engines/sword25/gfx/image/vectorimagerenderer.cpp
index c7a79fd3c4..c69cb497c1 100644
--- a/engines/sword25/gfx/image/vectorimagerenderer.cpp
+++ b/engines/sword25/gfx/image/vectorimagerenderer.cpp
@@ -52,7 +52,7 @@ void art_rgb_fill_run1(byte *buf, byte r, byte g, byte b, int n) {
memset(buf, g, n + n + n + n);
} else {
uint32 *alt = (uint32 *)buf;
- uint32 color = Graphics::ARGBToColor<Graphics::ColorMasks<8888> >(0xff, r, g, b);
+ uint32 color = Graphics::ARGBToColor<Graphics::ColorMasks<8888> >(r, g, b, 0xff);
for (i = 0; i < n; i++)
*alt++ = color;
@@ -66,22 +66,22 @@ void art_rgb_run_alpha1(byte *buf, byte r, byte g, byte b, int alpha, int n) {
for (i = 0; i < n; i++) {
#if defined(SCUMM_LITTLE_ENDIAN)
v = *buf;
+ *buf++ = MIN(v + alpha, 0xff);
+ v = *buf;
*buf++ = v + (((b - v) * alpha + 0x80) >> 8);
v = *buf;
*buf++ = v + (((g - v) * alpha + 0x80) >> 8);
v = *buf;
*buf++ = v + (((r - v) * alpha + 0x80) >> 8);
- v = *buf;
- *buf++ = MIN(v + alpha, 0xff);
#else
v = *buf;
- *buf++ = MIN(v + alpha, 0xff);
- v = *buf;
*buf++ = v + (((r - v) * alpha + 0x80) >> 8);
v = *buf;
*buf++ = v + (((g - v) * alpha + 0x80) >> 8);
v = *buf;
*buf++ = v + (((b - v) * alpha + 0x80) >> 8);
+ v = *buf;
+ *buf++ = MIN(v + alpha, 0xff);
#endif
}
}
diff --git a/engines/sword25/gfx/staticbitmap.cpp b/engines/sword25/gfx/staticbitmap.cpp
index 14e2012d80..1a6c812508 100644
--- a/engines/sword25/gfx/staticbitmap.cpp
+++ b/engines/sword25/gfx/staticbitmap.cpp
@@ -98,14 +98,14 @@ bool StaticBitmap::doRender(RectangleList *updateRects) {
bool result;
if (_scaleFactorX == 1.0f && _scaleFactorY == 1.0f) {
result = bitmapResourcePtr->blit(_absoluteX, _absoluteY,
- (_flipV ? BitmapResource::FLIP_V : 0) |
- (_flipH ? BitmapResource::FLIP_H : 0),
+ (_flipV ? Graphics::FLIP_V : 0) |
+ (_flipH ? Graphics::FLIP_H : 0),
0, _modulationColor, -1, -1,
updateRects);
} else {
result = bitmapResourcePtr->blit(_absoluteX, _absoluteY,
- (_flipV ? BitmapResource::FLIP_V : 0) |
- (_flipH ? BitmapResource::FLIP_H : 0),
+ (_flipV ? Graphics::FLIP_V : 0) |
+ (_flipH ? Graphics::FLIP_H : 0),
0, _modulationColor, _width, _height,
updateRects);
}
diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp
index b0a9e4ed3f..904435fcb0 100644
--- a/engines/sword25/gfx/text.cpp
+++ b/engines/sword25/gfx/text.cpp
@@ -99,7 +99,7 @@ void Text::setText(const Common::String &text) {
}
void Text::setColor(uint32 modulationColor) {
- uint32 newModulationColor = (modulationColor & 0x00ffffff) | (_modulationColor & 0xff000000);
+ uint32 newModulationColor = (modulationColor & 0xffffff00) | (_modulationColor & 0x000000ff);
if (newModulationColor != _modulationColor) {
_modulationColor = newModulationColor;
forceRefresh();
@@ -108,7 +108,7 @@ void Text::setColor(uint32 modulationColor) {
void Text::setAlpha(int alpha) {
assert(alpha >= 0 && alpha < 256);
- uint32 newModulationColor = (_modulationColor & 0x00ffffff) | alpha << 24;
+ uint32 newModulationColor = (_modulationColor & 0xffffff00) | alpha;
if (newModulationColor != _modulationColor) {
_modulationColor = newModulationColor;
forceRefresh();
@@ -173,7 +173,7 @@ bool Text::doRender(RectangleList *updateRects) {
Common::Rect renderRect(curX, curY, curX + curRect.width(), curY + curRect.height());
renderRect.translate(curRect.left - curX, curRect.top - curY);
- result = charMapPtr->blit(curX, curY, Image::FLIP_NONE, &renderRect, _modulationColor, -1, -1, updateRects);
+ result = charMapPtr->blit(curX, curY, Graphics::FLIP_NONE, &renderRect, _modulationColor, -1, -1, updateRects);
if (!result)
break;
diff --git a/engines/sword25/sword25.cpp b/engines/sword25/sword25.cpp
index 259deb2ea8..bb0aab3ad4 100644
--- a/engines/sword25/sword25.cpp
+++ b/engines/sword25/sword25.cpp
@@ -97,7 +97,7 @@ Common::Error Sword25Engine::run() {
Common::Error Sword25Engine::appStart() {
// Initialize the graphics mode to ARGB8888
- Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24);
+ Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
initGraphics(800, 600, true, &format);
if (format != g_system->getScreenFormat())
return Common::kUnsupportedColorMode;
diff --git a/engines/testbed/sound.cpp b/engines/testbed/sound.cpp
index aebd981826..998afbf7db 100644
--- a/engines/testbed/sound.cpp
+++ b/engines/testbed/sound.cpp
@@ -235,7 +235,7 @@ TestExitStatus SoundSubsystem::sampleRates() {
Common::Point pt(0, 100);
mixer->playStream(Audio::Mixer::kPlainSoundType, &handle, s1);
- Testsuite::writeOnScreen(Common::String::format("Playing at smaple rate: %d", s1->getRate()), pt);
+ Testsuite::writeOnScreen(Common::String::format("Playing at sample rate: %d", s1->getRate()), pt);
g_system->delayMillis(1000);
mixer->stopHandle(handle);
g_system->delayMillis(1000);
diff --git a/engines/toltecs/detection.cpp b/engines/toltecs/detection.cpp
index b6c7ad3d2b..e8f08bcc61 100644
--- a/engines/toltecs/detection.cpp
+++ b/engines/toltecs/detection.cpp
@@ -86,6 +86,20 @@ static const ToltecsGameDescription gameDescriptions[] = {
},
{
+ // 3 Skulls of the Toltecs PIRATE CD-RIP version (no audio)
+ // == DO NOT RE-ADD ==
+ {
+ "toltecs",
+ 0,
+ AD_ENTRY1s("WESTERN", "56d0da91ec3db8ac869594357584e851", 104804435),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_PIRATED,
+ GUIO1(GUIO_NONE)
+ },
+ },
+
+ {
// 3 Skulls of the Toltecs Russian version
{
"toltecs",
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 14e7d104d2..2f5051c157 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -2037,23 +2037,19 @@ int32 ToonEngine::characterTalk(int32 dialogid, bool blocking) {
}
}
- int32 myId = 0;
char *myLine;
- if (dialogid < 1000) {
+ if (dialogid < 1000)
myLine = _roomTexts->getText(dialogid);
- myId = dialogid;
- } else {
+ else
myLine = _genericTexts->getText(dialogid - 1000);
- myId = dialogid - 1000;
- }
if (!myLine)
return 0;
bool oldMouseHidden = _gameState->_mouseHidden;
- if (blocking) {
+ if (blocking)
_gameState->_mouseHidden = true;
- }
+
// get what is before the string
int a = READ_LE_UINT16(myLine - 2);
@@ -2090,10 +2086,8 @@ int32 ToonEngine::characterTalk(int32 dialogid, bool blocking) {
while ((waitChar->getAnimFlag() & 0x10) == 0x10 && !_shouldQuit)
doFrame();
}
- } else {
- if (_audioManager->voiceStillPlaying())
- _audioManager->stopCurrentVoice();
- }
+ } else if (_audioManager->voiceStillPlaying())
+ _audioManager->stopCurrentVoice();
for (int32 i = 0; i < numParticipants - 1; i++) {
// listener
@@ -2133,10 +2127,10 @@ int32 ToonEngine::characterTalk(int32 dialogid, bool blocking) {
getTextPosition(talkerId, &_currentTextLineX, &_currentTextLineY);
if (dialogid < 1000) {
- myId = _roomTexts->getId(dialogid);
+ int myId = _roomTexts->getId(dialogid);
_audioManager->playVoice(myId, false);
} else {
- myId = _genericTexts->getId(dialogid - 1000);
+ int myId = _genericTexts->getId(dialogid - 1000);
_audioManager->playVoice(myId, true);
}
diff --git a/engines/tsage/ringworld/ringworld_scenes10.cpp b/engines/tsage/ringworld/ringworld_scenes10.cpp
index c4874c0f59..99c953217c 100644
--- a/engines/tsage/ringworld/ringworld_scenes10.cpp
+++ b/engines/tsage/ringworld/ringworld_scenes10.cpp
@@ -1004,7 +1004,7 @@ void Scene9450::postInit(SceneObjectList *OwnerList) {
_hotspot8.setDetails(110, 0, 199, 117, 9450, 7, 8);
_hotspot9.setDetails(101, 104, 130, 174, 9450, 9, 10);
_hotspot10.setDetails(110, 246, 149, 319, 9450, 11, 12);
- _hotspot11.setDetails(16, 34, 74, 62, 6450, 13, 14);
+ _hotspot11.setDetails(16, 34, 74, 62, 9450, 13, 14);
_hotspot12.setDetails(19, 108, 72, 134, 9450, 15, 16);
_hotspot13.setDetails(18, 215, 71, 237, 9450, 17, 18);
_hotspot14.setDetails(15, 288, 76, 314, 9450, 19, 20);
diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h
index 31d801fa55..d95f279e27 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.h
+++ b/engines/tsage/ringworld2/ringworld2_logic.h
@@ -320,7 +320,7 @@ public:
int pixelToCellXY(Common::Point &pt);
virtual Common::String getClassName() { return "MazeUI"; }
- void synchronize(Serializer &s);
+ virtual void synchronize(Serializer &s);
virtual void reposition();
virtual void draw();
};
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
index 29646d1612..e2c22bd0b4 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
@@ -1919,7 +1919,7 @@ void Scene1200::process(Event &event) {
return;
}
} else if (event.eventType == EVENT_KEYPRESS) {
- if (_field414 == 0) {
+ if (_field414) {
event.handled = false;
return;
}
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
index 3f32503fdf..9eaead630b 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
@@ -2843,8 +2843,8 @@ void Scene3400::signal() {
R2_INVENTORY.setObjectScene(R2_SAPPHIRE_BLUE, 0);
_stripManager.start(3307, this);
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
- _sceneMode = 3400;
- R2_GLOBALS._player.setAction(&_sequenceManager, this, 3400, &R2_GLOBALS._player, &_teal, &_sapphire, NULL);
+ _sceneMode = 3404;
+ R2_GLOBALS._player.setAction(&_sequenceManager, this, 3404, &R2_GLOBALS._player, &_teal, &_sapphire, NULL);
} else {
_sceneMode = 3408;
_companion1.setAction(&_sequenceManager, this, 3408, &_companion1, &_teal, &_sapphire, NULL);
@@ -3668,11 +3668,12 @@ void Scene3500::postInit(SceneObjectList *OwnerList) {
_horizontalSpeedDisplay.setPosition(Common::Point(126, 108));
_horizontalSpeedDisplay.fixPriority(200);
+ _action1._turningFl = false;
+
+ _mazeUI.postInit();
_mazeUI.setDisplayBounds(Rect(160, 89, 299, 182));
_mazeUI.load(2);
_mazeUI.setMazePosition(_mazePosition);
-
- _action1._turningFl = false;
_mazeUI.draw();
_directionChangesEnabled = true;
@@ -3876,6 +3877,11 @@ void Scene3500::dispatch() {
Rect tmpRect;
Scene::dispatch();
+ // WORKAROUND: The _mazeUI wasn't originally added to the scene in postInit.
+ // This is only needed to fix old savegames
+ if (!R2_GLOBALS._sceneObjects->contains(&_mazeUI))
+ _mazeUI.draw();
+
if (((_shuttle._frame % 2) == 0) && (!_action1._turningFl)) {
_shuttle.setFrame(_shuttle.changeFrame());
_mazeDirection = _shuttle._frame;
@@ -4215,7 +4221,6 @@ void Scene3500::dispatch() {
_rotation->_idxChange = 0;
}
- _mazeUI.draw();
if (_exitCounter != 0)
++_exitCounter;
}
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index c5c38505a7..b95b614f09 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -164,7 +164,7 @@ Common::List<SoundDriverEntry> &SoundManager::buildDriverList(bool detectFlag) {
sd._status = detectFlag ? SNDSTATUS_DETECTED : SNDSTATUS_SKIPPED;
sd._field2 = 0;
sd._field6 = 15000;
- sd._shortDescription = "Adlib or SoundBlaster";
+ sd._shortDescription = "AdLib or SoundBlaster";
sd._longDescription = "3812fm";
_availableDrivers.push_back(sd);
@@ -379,7 +379,6 @@ void SoundManager::updateSoundLoop(Sound *sound) {
}
void SoundManager::rethinkVoiceTypes() {
- Common::StackLock slock(sfManager()._serverSuspendedMutex);
sfRethinkVoiceTypes();
}
@@ -1442,8 +1441,6 @@ bool SoundManager::sfDoRemoveFromPlayList(Sound *sound) {
}
void SoundManager::sfDoUpdateVolume(Sound *sound) {
- Common::StackLock slock(sfManager()._serverSuspendedMutex);
-
for (int voiceIndex = 0; voiceIndex < SOUND_ARR_SIZE; ++voiceIndex) {
VoiceTypeStruct *vs = sfManager()._voiceTypeStructPtrs[voiceIndex];
if (!vs)
@@ -1707,8 +1704,6 @@ void Sound::pause(bool flag) {
}
void Sound::mute(bool flag) {
- Common::StackLock slock(g_globals->_soundManager._serverSuspendedMutex);
-
if (flag)
++_mutedCount;
else if (_mutedCount > 0)
diff --git a/engines/voyeur/configure.engine b/engines/voyeur/configure.engine
index 23891fccb7..c53530a9ed 100644
--- a/engines/voyeur/configure.engine
+++ b/engines/voyeur/configure.engine
@@ -1,4 +1,4 @@
# This file is included from the main "configure" script
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine voyeur "Voyeur" no
+add_engine voyeur "Voyeur" yes
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index b1960a23ac..0615c67ba0 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -1007,8 +1007,11 @@ int ThreadResource::doApt() {
if (_vm->_loadGameSlot != -1) {
// Load a savegame
- _vm->loadGame(_vm->_loadGameSlot);
+ int slot = _vm->_loadGameSlot;
_vm->_loadGameSlot = -1;
+ _vm->loadGame(slot);
+
+ _vm->_eventsManager->showCursor();
}
_vm->_eventsManager->getMouseInfo();
@@ -1596,7 +1599,9 @@ void ThreadResource::loadTheApt() {
_vm->_voy->_aptLoadMode = -1;
if (_vm->_voy->_aptLoadMode != -1) {
- doAptAnim(1);
+ if (_vm->_loadGameSlot != -1)
+ doAptAnim(1);
+
_vm->_bVoy->getBoltGroup(_vm->_playStampGroupId);
_vm->_voy->_aptLoadMode = -1;
_vm->_graphicsManager->_backgroundPage = _vm->_bVoy->boltEntry(
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index 681f431635..dad634c9bb 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -556,6 +556,7 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
PictureResource *pic = NULL;
if (videoId == 42) {
+ _bVoy->getBoltGroup(0xE00);
_eventsManager->_videoDead = 0;
pic = _bVoy->boltEntry(0xE00 + _eventsManager->_videoDead)._picResource;
}
@@ -602,6 +603,9 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
pic->_imgData = imgData;
_voy->_eventFlags &= ~EVTFLAG_8;
}
+
+ if (videoId == 42)
+ _bVoy->freeBoltGroup(0xE00);
}
void VoyeurEngine::playAudio(int audioId) {
diff --git a/engines/wintermute/base/base_file_manager.cpp b/engines/wintermute/base/base_file_manager.cpp
index 1f78303f52..58684b66a0 100644
--- a/engines/wintermute/base/base_file_manager.cpp
+++ b/engines/wintermute/base/base_file_manager.cpp
@@ -209,10 +209,15 @@ bool BaseFileManager::registerPackages() {
// than the equivalent of using equalsIgnoreCase.
Common::String fileName = fileIt->getName();
fileName.toLowercase();
+ bool searchSignature = false;
- if (!fileName.hasSuffix(".dcp")) {
+ if (!fileName.hasSuffix(".dcp") && !fileName.hasSuffix(".exe")) {
continue;
}
+ if (fileName.hasSuffix(".exe")) {
+ searchSignature = true;
+ }
+
// HACK: for Reversion1, avoid loading xlanguage_pt.dcp from the main folder:
if (_language != Common::PT_BRA && targetName.hasPrefix("reversion1")) {
if (fileName == "xlanguage_pt.dcp") {
@@ -263,7 +268,7 @@ bool BaseFileManager::registerPackages() {
}
}
debugC(kWintermuteDebugFileAccess, "Registering %s %s", fileIt->getPath().c_str(), fileIt->getName().c_str());
- registerPackage((*fileIt));
+ registerPackage((*fileIt), "", searchSignature);
}
}
diff --git a/engines/wintermute/base/base_file_manager.h b/engines/wintermute/base/base_file_manager.h
index 653721c8f5..d953e44704 100644
--- a/engines/wintermute/base/base_file_manager.h
+++ b/engines/wintermute/base/base_file_manager.h
@@ -63,7 +63,6 @@ private:
Common::SeekableReadStream *openFileRaw(const Common::String &filename);
Common::SeekableReadStream *openPkgFile(const Common::String &filename);
Common::FSList _packagePaths;
- bool findPackageSignature(Common::SeekableReadStream *f, uint32 *offset);
bool registerPackage(Common::FSNode package, const Common::String &filename = "", bool searchSignature = false);
bool _detectionMode;
Common::SearchSet _packages;
diff --git a/engines/wintermute/base/base_frame.cpp b/engines/wintermute/base/base_frame.cpp
index f2c24b8f6a..471185f2d2 100644
--- a/engines/wintermute/base/base_frame.cpp
+++ b/engines/wintermute/base/base_frame.cpp
@@ -76,7 +76,7 @@ BaseFrame::~BaseFrame() {
//////////////////////////////////////////////////////////////////////
-bool BaseFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, float zoomY, bool precise, uint32 alpha, bool allFrames, float rotate, TSpriteBlendMode blendMode) {
+bool BaseFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, float zoomY, bool precise, uint32 alpha, bool allFrames, float rotate, Graphics::TSpriteBlendMode blendMode) {
bool res;
for (uint32 i = 0; i < _subframes.size(); i++) {
diff --git a/engines/wintermute/base/base_frame.h b/engines/wintermute/base/base_frame.h
index 49a56592bb..ff9e67a166 100644
--- a/engines/wintermute/base/base_frame.h
+++ b/engines/wintermute/base/base_frame.h
@@ -31,6 +31,7 @@
#include "engines/wintermute/base/base_scriptable.h"
#include "engines/wintermute/coll_templ.h"
+#include "graphics/transform_struct.h"
namespace Wintermute {
class BaseSound;
@@ -51,7 +52,7 @@ public:
int32 _moveX;
uint32 _delay;
BaseArray<BaseSubFrame *> _subframes;
- bool draw(int x, int y, BaseObject *registerOwner = nullptr, float zoomX = 100, float zoomY = 100, bool precise = true, uint32 alpha = 0xFFFFFFFF, bool allFrames = false, float rotate = 0.0f, TSpriteBlendMode blendMode = BLEND_NORMAL);
+ bool draw(int x, int y, BaseObject *registerOwner = nullptr, float zoomX = 100, float zoomY = 100, bool precise = true, uint32 alpha = 0xFFFFFFFF, bool allFrames = false, float rotate = 0.0f, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL);
bool loadBuffer(char *buffer, int lifeTime, bool keepLoaded);
BaseFrame(BaseGame *inGame);
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index d37a22e2a6..8df39c825a 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -3110,6 +3110,10 @@ bool BaseGame::persist(BasePersistenceManager *persistMgr) {
persistMgr->transferUint32(TMEMBER(_autoSaveSlot));
persistMgr->transferBool(TMEMBER(_cursorHidden));
+ if (persistMgr->checkVersion(1, 3, 1)) {
+ _settings->persist(persistMgr);
+ }
+
if (!persistMgr->getIsSaving()) {
_quitting = false;
}
diff --git a/engines/wintermute/base/base_game_settings.cpp b/engines/wintermute/base/base_game_settings.cpp
index 3b54384cc7..61c5894be3 100644
--- a/engines/wintermute/base/base_game_settings.cpp
+++ b/engines/wintermute/base/base_game_settings.cpp
@@ -219,4 +219,8 @@ char *BaseGameSettings::getKeyFromStringTable(const char *str) const {
return _stringTable->getKey(str);
}
+bool BaseGameSettings::persist(BasePersistenceManager *persistMgr) {
+ return _stringTable->persist(persistMgr);
+}
+
} // End of namespace Wintermute
diff --git a/engines/wintermute/base/base_game_settings.h b/engines/wintermute/base/base_game_settings.h
index fe0e9907e6..2059cb075e 100644
--- a/engines/wintermute/base/base_game_settings.h
+++ b/engines/wintermute/base/base_game_settings.h
@@ -34,6 +34,7 @@
namespace Wintermute {
class BaseStringTable;
class BaseGame;
+class BasePersistenceManager;
class BaseGameSettings {
public:
const char *getGameFile() const { return (_gameFile ? _gameFile : "default.game"); }
@@ -46,6 +47,8 @@ public:
bool loadStringTable(const char *filename, bool clearOld);
void expandStringByStringTable(char **str) const;
char *getKeyFromStringTable(const char *str) const;
+
+ bool persist(BasePersistenceManager *persistMgr);
private:
char *_gameFile;
int _resWidth;
diff --git a/engines/wintermute/base/base_object.cpp b/engines/wintermute/base/base_object.cpp
index 708df8def1..cce3561f67 100644
--- a/engines/wintermute/base/base_object.cpp
+++ b/engines/wintermute/base/base_object.cpp
@@ -95,7 +95,7 @@ BaseObject::BaseObject(BaseGame *inGame) : BaseScriptHolder(inGame) {
_sFXType = SFX_NONE;
_sFXParam1 = _sFXParam2 = _sFXParam3 = _sFXParam4 = 0;
- _blendMode = BLEND_NORMAL;
+ _blendMode = Graphics::BLEND_NORMAL;
}
@@ -807,10 +807,10 @@ bool BaseObject::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "BlendMode") == 0) {
int i = value->getInt();
- if (i < BLEND_NORMAL || i >= NUM_BLEND_MODES) {
- i = BLEND_NORMAL;
+ if (i < Graphics::BLEND_NORMAL || i >= Graphics::NUM_BLEND_MODES) {
+ i = Graphics::BLEND_NORMAL;
}
- _blendMode = (TSpriteBlendMode)i;
+ _blendMode = (Graphics::TSpriteBlendMode)i;
return STATUS_OK;
}
diff --git a/engines/wintermute/base/base_object.h b/engines/wintermute/base/base_object.h
index f5036f4ec4..8ca8ffc246 100644
--- a/engines/wintermute/base/base_object.h
+++ b/engines/wintermute/base/base_object.h
@@ -33,6 +33,7 @@
#include "engines/wintermute/base/base_script_holder.h"
#include "engines/wintermute/persistent.h"
#include "common/events.h"
+#include "graphics/transform_struct.h"
namespace Wintermute {
@@ -75,7 +76,7 @@ protected:
int32 _iD;
char *_soundEvent;
public:
- TSpriteBlendMode _blendMode;
+ Graphics::TSpriteBlendMode _blendMode;
virtual bool afterMove();
float _scale;
uint32 _alphaColor;
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp
index bea55fb857..bb5e0c4091 100644
--- a/engines/wintermute/base/base_persistence_manager.cpp
+++ b/engines/wintermute/base/base_persistence_manager.cpp
@@ -36,7 +36,7 @@
#include "engines/wintermute/base/gfx/base_image.h"
#include "engines/wintermute/base/save_thumb_helper.h"
#include "engines/wintermute/base/sound/base_sound.h"
-#include "engines/wintermute/graphics/transparent_surface.h"
+#include "graphics/transparent_surface.h"
#include "engines/wintermute/wintermute.h"
#include "graphics/scaler.h"
#include "image/bmp.h"
@@ -173,7 +173,7 @@ void BasePersistenceManager::getSaveStateDesc(int slot, SaveStateDescriptor &des
Image::BitmapDecoder bmpDecoder;
if (bmpDecoder.loadStream(thumbStream)) {
const Graphics::Surface *bmpSurface = bmpDecoder.getSurface();
- TransparentSurface *scaleableSurface = new TransparentSurface(*bmpSurface, false);
+ Graphics::TransparentSurface *scaleableSurface = new Graphics::TransparentSurface(*bmpSurface, false);
Graphics::Surface *scaled = scaleableSurface->scale(kThumbnailWidth, kThumbnailHeight2);
Graphics::Surface *thumb = scaled->convertTo(g_system->getOverlayFormat());
desc.setThumbnail(thumb);
diff --git a/engines/wintermute/base/base_sprite.cpp b/engines/wintermute/base/base_sprite.cpp
index 2e00998037..04060bff32 100644
--- a/engines/wintermute/base/base_sprite.cpp
+++ b/engines/wintermute/base/base_sprite.cpp
@@ -418,7 +418,7 @@ bool BaseSprite::getCurrentFrame(float zoomX, float zoomY) {
//////////////////////////////////////////////////////////////////////
-bool BaseSprite::display(int x, int y, BaseObject *registerVal, float zoomX, float zoomY, uint32 alpha, float rotate, TSpriteBlendMode blendMode) {
+bool BaseSprite::display(int x, int y, BaseObject *registerVal, float zoomX, float zoomY, uint32 alpha, float rotate, Graphics::TSpriteBlendMode blendMode) {
if (_currentFrame < 0 || _currentFrame >= (int32)_frames.size()) {
return STATUS_OK;
}
diff --git a/engines/wintermute/base/base_sprite.h b/engines/wintermute/base/base_sprite.h
index 92287995d9..ec71512ec9 100644
--- a/engines/wintermute/base/base_sprite.h
+++ b/engines/wintermute/base/base_sprite.h
@@ -32,7 +32,7 @@
#include "engines/wintermute/coll_templ.h"
#include "engines/wintermute/base/base_script_holder.h"
-#include "engines/wintermute/graphics/transform_tools.h"
+#include "graphics/transform_tools.h"
namespace Wintermute {
class BaseFrame;
@@ -45,17 +45,17 @@ public:
void setDefaults();
DECLARE_PERSISTENT(BaseSprite, BaseScriptHolder)
- bool getBoundingRect(Rect32 *rect, int x, int y, float scaleX = kDefaultZoomX, float scaleY = kDefaultZoomY);
+ bool getBoundingRect(Rect32 *rect, int x, int y, float scaleX = Graphics::kDefaultZoomX, float scaleY = Graphics::kDefaultZoomY);
int32 _moveY;
int32 _moveX;
- bool display(int x, int y, BaseObject *registerOwner = nullptr, float zoomX = kDefaultZoomX, float zoomY = kDefaultZoomY, uint32 alpha = kDefaultRgbaMod, float rotate = kDefaultAngle, TSpriteBlendMode blendMode = BLEND_NORMAL);
- bool getCurrentFrame(float zoomX = kDefaultZoomX, float zoomY = kDefaultZoomY);
+ bool display(int x, int y, BaseObject *registerOwner = nullptr, float zoomX = Graphics::kDefaultZoomX, float zoomY = Graphics::kDefaultZoomY, uint32 alpha = Graphics::kDefaultRgbaMod, float rotate = Graphics::kDefaultAngle, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL);
+ bool getCurrentFrame(float zoomX = Graphics::kDefaultZoomX, float zoomY = Graphics::kDefaultZoomY);
void reset();
bool isChanged();
bool isFinished();
bool loadBuffer(char *buffer, bool compete = true, int lifeTime = -1, TSpriteCacheType cacheType = CACHE_ALL);
bool loadFile(const Common::String &filename, int lifeTime = -1, TSpriteCacheType cacheType = CACHE_ALL);
- bool draw(int x, int y, BaseObject *Register = nullptr, float zoomX = kDefaultZoomX, float zoomY = kDefaultZoomY, uint32 alpha = kDefaultRgbaMod);
+ bool draw(int x, int y, BaseObject *Register = nullptr, float zoomX = Graphics::kDefaultZoomX, float zoomY = Graphics::kDefaultZoomY, uint32 alpha = Graphics::kDefaultRgbaMod);
bool _looping;
int32 _currentFrame;
bool addFrame(const char *filename, uint32 delay = 0, int hotspotX = 0, int hotspotY = 0, Rect32 *rect = nullptr);
diff --git a/engines/wintermute/base/base_string_table.cpp b/engines/wintermute/base/base_string_table.cpp
index 9adbbdf7be..89407a7b0e 100644
--- a/engines/wintermute/base/base_string_table.cpp
+++ b/engines/wintermute/base/base_string_table.cpp
@@ -189,8 +189,10 @@ bool BaseStringTable::loadFile(const char *filename, bool clearOld) {
BaseEngine::LOG(0, "Loading string table...");
if (clearOld) {
+ _filenames.clear();
_strings.clear();
}
+ _filenames.push_back(Common::String(filename));
uint32 size;
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename, &size);
@@ -253,4 +255,27 @@ bool BaseStringTable::loadFile(const char *filename, bool clearOld) {
return STATUS_OK;
}
+bool BaseStringTable::persist(BasePersistenceManager *persistMgr) {
+ // Do nothing if the save game is too old.
+ if (!persistMgr->checkVersion(1, 3, 1)) {
+ return true;
+ }
+ uint32 numFiles = _filenames.size();
+ persistMgr->transferUint32("NumFiles", &numFiles);
+ if (persistMgr->getIsSaving()) {
+ for (uint i = 0; i < numFiles; i++) {
+ persistMgr->transferString("Filename", &_filenames[i]);
+ }
+ } else {
+ _strings.clear();
+ _filenames.clear();
+ for (uint i = 0; i < numFiles; i++) {
+ Common::String filename = "";
+ persistMgr->transferString("Filename", &filename);
+ loadFile(filename.c_str(), false);
+ }
+ }
+ return true;
+}
+
} // End of namespace Wintermute
diff --git a/engines/wintermute/base/base_string_table.h b/engines/wintermute/base/base_string_table.h
index 9e915a1ad9..cdcf11917d 100644
--- a/engines/wintermute/base/base_string_table.h
+++ b/engines/wintermute/base/base_string_table.h
@@ -35,6 +35,8 @@
namespace Wintermute {
+class BasePersistenceManager;
+
class BaseStringTable : public BaseClass {
public:
bool loadFile(const char *filename, bool deleteAll = true);
@@ -44,8 +46,10 @@ public:
BaseStringTable(BaseGame *inGame);
virtual ~BaseStringTable();
char *getKey(const char *str) const;
+ bool persist(BasePersistenceManager *persistMgr);
private:
Common::HashMap<Common::String, Common::String> _strings;
+ Common::Array<Common::String> _filenames;
typedef Common::HashMap<Common::String, Common::String>::const_iterator StringsIter;
};
diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp
index 3a6e28b1f2..4388942064 100644
--- a/engines/wintermute/base/base_sub_frame.cpp
+++ b/engines/wintermute/base/base_sub_frame.cpp
@@ -37,8 +37,8 @@
#include "engines/wintermute/base/gfx/base_renderer.h"
#include "engines/wintermute/base/scriptables/script_value.h"
#include "engines/wintermute/base/scriptables/script_stack.h"
-#include "engines/wintermute/graphics/transform_tools.h"
-#include "engines/wintermute/graphics/transform_struct.h"
+#include "graphics/transform_tools.h"
+#include "graphics/transform_struct.h"
namespace Wintermute {
@@ -47,9 +47,9 @@ IMPLEMENT_PERSISTENT(BaseSubFrame, false)
//////////////////////////////////////////////////////////////////////////
BaseSubFrame::BaseSubFrame(BaseGame *inGame) : BaseScriptable(inGame, true) {
_surface = nullptr;
- _hotspotX = kDefaultHotspotX;
- _hotspotY = kDefaultHotspotY;
- _alpha = kDefaultRgbaMod;
+ _hotspotX = Graphics::kDefaultHotspotX;
+ _hotspotY = Graphics::kDefaultHotspotY;
+ _alpha = Graphics::kDefaultRgbaMod;
_transparent = 0xFFFF00FF;
_wantsDefaultRect = false;
@@ -234,7 +234,7 @@ const char* BaseSubFrame::getSurfaceFilename() {
}
//////////////////////////////////////////////////////////////////////
-bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, float zoomY, bool precise, uint32 alpha, float rotate, TSpriteBlendMode blendMode) {
+bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, float zoomY, bool precise, uint32 alpha, float rotate, Graphics::TSpriteBlendMode blendMode) {
rotate = fmod(rotate, 360.0f);
if (rotate < 0) {
@@ -246,7 +246,7 @@ bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, fl
}
if (registerOwner != nullptr && !_decoration) {
- if (zoomX == kDefaultZoomX && zoomY == kDefaultZoomY) {
+ if (zoomX == Graphics::kDefaultZoomX && zoomY == Graphics::kDefaultZoomY) {
BaseEngine::getRenderer()->addRectToList(new BaseActiveRect(_gameRef, registerOwner, this, x - _hotspotX + getRect().left, y - _hotspotY + getRect().top, getRect().right - getRect().left, getRect().bottom - getRect().top, zoomX, zoomY, precise));
} else {
BaseEngine::getRenderer()->addRectToList(new BaseActiveRect(_gameRef, registerOwner, this, (int)(x - (_hotspotX + getRect().left) * (zoomX / 100)), (int)(y - (_hotspotY + getRect().top) * (zoomY / 100)), (int)((getRect().right - getRect().left) * (zoomX / 100)), (int)((getRect().bottom - getRect().top) * (zoomY / 100)), zoomX, zoomY, precise));
@@ -259,24 +259,26 @@ bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, fl
bool res;
//if (Alpha==0xFFFFFFFF) Alpha = _alpha; // TODO: better (combine owner's and self alpha)
- if (_alpha != kDefaultRgbaMod) {
+ if (_alpha != Graphics::kDefaultRgbaMod) {
alpha = _alpha;
}
- if (rotate != kDefaultAngle) {
- Point32 boxOffset, rotatedHotspot, hotspotOffset, newOrigin;
- Point32 origin(x, y);
- Rect32 oldRect = getRect();
- Point32 newHotspot;
- TransformStruct transform = TransformStruct(zoomX, zoomY, (uint32)rotate, _hotspotX, _hotspotY, blendMode, alpha, _mirrorX, _mirrorY, 0, 0);
- Rect32 newRect = TransformTools::newRect (oldRect, transform, &newHotspot);
+ if (rotate != Graphics::kDefaultAngle) {
+ Point32 boxOffset, rotatedHotspot, hotspotOffset;
+ Common::Point origin(x, y);
+ Common::Point newOrigin;
+ Rect32 oldRect1 = getRect();
+ Common::Rect oldRect(oldRect1.top, oldRect1.left, oldRect1.bottom, oldRect1.right);
+ Common::Point newHotspot;
+ Graphics::TransformStruct transform = Graphics::TransformStruct(zoomX, zoomY, (uint32)rotate, _hotspotX, _hotspotY, blendMode, alpha, _mirrorX, _mirrorY, 0, 0);
+ Rect32 newRect = Graphics::TransformTools::newRect(oldRect, transform, &newHotspot);
newOrigin = origin - newHotspot;
res = _surface->displayTransform(newOrigin.x, newOrigin.y, oldRect, newRect, transform);
} else {
- if (zoomX == kDefaultZoomX && zoomY == kDefaultZoomY) {
+ if (zoomX == Graphics::kDefaultZoomX && zoomY == Graphics::kDefaultZoomY) {
res = _surface->displayTrans(x - _hotspotX, y - _hotspotY, getRect(), alpha, blendMode, _mirrorX, _mirrorY);
} else {
- res = _surface->displayTransZoom((int)(x - _hotspotX * (zoomX / kDefaultZoomX)), (int)(y - _hotspotY * (zoomY / kDefaultZoomY)), getRect(), zoomX, zoomY, alpha, blendMode, _mirrorX, _mirrorY);
+ res = _surface->displayTransZoom((int)(x - _hotspotX * (zoomX / Graphics::kDefaultZoomX)), (int)(y - _hotspotY * (zoomY / Graphics::kDefaultZoomY)), getRect(), zoomX, zoomY, alpha, blendMode, _mirrorX, _mirrorY);
}
}
diff --git a/engines/wintermute/base/base_sub_frame.h b/engines/wintermute/base/base_sub_frame.h
index b2859fa3f3..f156c332d6 100644
--- a/engines/wintermute/base/base_sub_frame.h
+++ b/engines/wintermute/base/base_sub_frame.h
@@ -32,6 +32,7 @@
#include "engines/wintermute/base/base.h"
#include "engines/wintermute/base/base_scriptable.h"
+#include "graphics/transform_struct.h"
namespace Wintermute {
class BaseObject;
@@ -52,7 +53,7 @@ public:
BaseSubFrame(BaseGame *inGame);
virtual ~BaseSubFrame();
bool loadBuffer(char *buffer, int lifeTime, bool keepLoaded);
- bool draw(int x, int y, BaseObject *registerOwner = nullptr, float zoomX = 100, float zoomY = 100, bool precise = true, uint32 alpha = 0xFFFFFFFF, float rotate = 0.0f, TSpriteBlendMode blendMode = BLEND_NORMAL);
+ bool draw(int x, int y, BaseObject *registerOwner = nullptr, float zoomX = 100, float zoomY = 100, bool precise = true, uint32 alpha = 0xFFFFFFFF, float rotate = 0.0f, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL);
bool getBoundingRect(Rect32 *rect, int x, int y, float scaleX = 100, float scaleY = 100);
const char* getSurfaceFilename();
diff --git a/engines/wintermute/base/font/base_font_truetype.cpp b/engines/wintermute/base/font/base_font_truetype.cpp
index df9a8648db..f27b565a7f 100644
--- a/engines/wintermute/base/font/base_font_truetype.cpp
+++ b/engines/wintermute/base/font/base_font_truetype.cpp
@@ -234,7 +234,7 @@ void BaseFontTT::drawText(const byte *text, int x, int y, int width, TTextAlign
color = BYTETORGBA(RGBCOLGetR(color), RGBCOLGetG(color), RGBCOLGetB(color), RGBCOLGetA(renderer->_forceAlphaColor));
renderer->_forceAlphaColor = 0;
}
- surface->displayTransOffset(x, y - textOffset, rc, color, BLEND_NORMAL, false, false, _layers[i]->_offsetX, _layers[i]->_offsetY);
+ surface->displayTransOffset(x, y - textOffset, rc, color, Graphics::BLEND_NORMAL, false, false, _layers[i]->_offsetX, _layers[i]->_offsetY);
renderer->_forceAlphaColor = origForceAlpha;
}
diff --git a/engines/wintermute/base/gfx/base_image.cpp b/engines/wintermute/base/gfx/base_image.cpp
index e676fafdbf..a1548b83ea 100644
--- a/engines/wintermute/base/gfx/base_image.cpp
+++ b/engines/wintermute/base/gfx/base_image.cpp
@@ -28,7 +28,7 @@
#include "engines/wintermute/base/gfx/base_image.h"
#include "engines/wintermute/base/base_file_manager.h"
-#include "engines/wintermute/graphics/transparent_surface.h"
+#include "graphics/transparent_surface.h"
#include "graphics/surface.h"
#include "image/png.h"
#include "image/jpeg.h"
@@ -112,7 +112,7 @@ bool BaseImage::saveBMPFile(const Common::String &filename) const {
//////////////////////////////////////////////////////////////////////////
bool BaseImage::resize(int newWidth, int newHeight) {
// WME Lite used FILTER_BILINEAR with FreeImage_Rescale here.
- TransparentSurface temp(*_surface, true);
+ Graphics::TransparentSurface temp(*_surface, true);
if (_deletableSurface) {
_deletableSurface->free();
delete _deletableSurface;
@@ -216,7 +216,7 @@ bool BaseImage::writeBMPToStream(Common::WriteStream *stream) const {
bool BaseImage::copyFrom(BaseImage *origImage, int newWidth, int newHeight) {
// WME Lite used FILTER_BILINEAR with FreeImage_Rescale here.
- TransparentSurface temp(*origImage->_surface, false);
+ Graphics::TransparentSurface temp(*origImage->_surface, false);
if (_deletableSurface) {
_deletableSurface->free();
delete _deletableSurface;
diff --git a/engines/wintermute/base/gfx/base_renderer.h b/engines/wintermute/base/gfx/base_renderer.h
index 42ff2cb9e1..6b1a4f97f4 100644
--- a/engines/wintermute/base/gfx/base_renderer.h
+++ b/engines/wintermute/base/gfx/base_renderer.h
@@ -72,7 +72,6 @@ public:
* Fade the screen to black
*
* @param alpha amount to fade by (alpha value of black)
- * @return
*/
virtual void fade(uint16 alpha) = 0;
/**
diff --git a/engines/wintermute/base/gfx/base_surface.cpp b/engines/wintermute/base/gfx/base_surface.cpp
index ec42a63c77..f8b96b5baf 100644
--- a/engines/wintermute/base/gfx/base_surface.cpp
+++ b/engines/wintermute/base/gfx/base_surface.cpp
@@ -75,7 +75,7 @@ bool BaseSurface::displayHalfTrans(int x, int y, Rect32 rect) {
}
//////////////////////////////////////////////////////////////////////////
-bool BaseSurface::displayTransform(int x, int y, Rect32 rect, Rect32 newRect, const TransformStruct &transform) {
+bool BaseSurface::displayTransform(int x, int y, Rect32 rect, Rect32 newRect, const Graphics::TransformStruct &transform) {
return displayTransform(x, y, rect, newRect, transform);
}
diff --git a/engines/wintermute/base/gfx/base_surface.h b/engines/wintermute/base/gfx/base_surface.h
index 7bd9bcbaea..ea743bdaf2 100644
--- a/engines/wintermute/base/gfx/base_surface.h
+++ b/engines/wintermute/base/gfx/base_surface.h
@@ -32,7 +32,7 @@
#include "engines/wintermute/base/base.h"
#include "engines/wintermute/math/rect32.h"
#include "graphics/surface.h"
-#include "engines/wintermute/graphics/transform_struct.h"
+#include "graphics/transform_struct.h"
namespace Wintermute {
@@ -50,12 +50,12 @@ public:
virtual bool displayHalfTrans(int x, int y, Rect32 rect);
virtual bool isTransparentAt(int x, int y);
- virtual bool displayTransZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha = 0xFFFFFFFF, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
- virtual bool displayTrans(int x, int y, Rect32 rect, uint32 alpha = 0xFFFFFFFF, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
- virtual bool displayTransOffset(int x, int y, Rect32 rect, uint32 alpha = 0xFFFFFFFF, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false, int offsetX = 0, int offsetY = 0) = 0;
- virtual bool display(int x, int y, Rect32 rect, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
- virtual bool displayTransform(int x, int y, Rect32 rect, Rect32 newRect, const TransformStruct &transform) = 0;
- virtual bool displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha = 0xFFFFFFFF, bool transparent = false, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
+ virtual bool displayTransZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha = 0xFFFFFFFF, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
+ virtual bool displayTrans(int x, int y, Rect32 rect, uint32 alpha = 0xFFFFFFFF, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
+ virtual bool displayTransOffset(int x, int y, Rect32 rect, uint32 alpha = 0xFFFFFFFF, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false, int offsetX = 0, int offsetY = 0) = 0;
+ virtual bool display(int x, int y, Rect32 rect, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
+ virtual bool displayTransform(int x, int y, Rect32 rect, Rect32 newRect, const Graphics::TransformStruct &transform) = 0;
+ virtual bool displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha = 0xFFFFFFFF, bool transparent = false, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
virtual bool displayTiled(int x, int y, Rect32 rect, int numTimesX, int numTimesY) = 0;
virtual bool restore();
virtual bool create(const Common::String &filename, bool defaultCK, byte ckRed, byte ckGreen, byte ckBlue, int lifeTime = -1, bool keepLoaded = false) = 0;
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index 601fcc0ffa..0f6a184cb3 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -35,7 +35,7 @@
#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/base/base_sprite.h"
#include "common/system.h"
-#include "engines/wintermute/graphics/transparent_surface.h"
+#include "graphics/transparent_surface.h"
#include "common/queue.h"
#include "common/config-manager.h"
@@ -254,7 +254,7 @@ void BaseRenderOSystem::fadeToColor(byte r, byte g, byte b, byte a) {
Common::Rect sizeRect(fillRect);
sizeRect.translate(-fillRect.top, -fillRect.left);
surf.fillRect(fillRect, col);
- TransformStruct temp = TransformStruct();
+ Graphics::TransformStruct temp = Graphics::TransformStruct();
temp._alphaDisable = false;
drawSurface(nullptr, &surf, &sizeRect, &fillRect, temp);
surf.free();
@@ -268,7 +268,7 @@ Graphics::PixelFormat BaseRenderOSystem::getPixelFormat() const {
return _renderSurface->format;
}
-void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, TransformStruct &transform) {
+void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, Graphics::TransformStruct &transform) {
if (_disableDirtyRects) {
RenderTicket *ticket = new RenderTicket(owner, surf, srcRect, dstRect, transform);
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.h b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
index c9b8a52282..bc267fd656 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.h
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
@@ -33,7 +33,7 @@
#include "common/rect.h"
#include "graphics/surface.h"
#include "common/list.h"
-#include "engines/wintermute/graphics/transform_struct.h"
+#include "graphics/transform_struct.h"
namespace Wintermute {
class BaseSurfaceOSystem;
@@ -110,7 +110,7 @@ public:
virtual bool startSpriteBatch() override;
virtual bool endSpriteBatch() override;
void endSaveLoad();
- void drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, TransformStruct &transform);
+ void drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, Graphics::TransformStruct &transform);
BaseSurface *createSurface() override;
private:
/**
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
index 983f9c1296..a2a0032e26 100644
--- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
@@ -32,8 +32,8 @@
#include "engines/wintermute/base/gfx/osystem/base_render_osystem.h"
#include "engines/wintermute/base/gfx/base_image.h"
#include "engines/wintermute/platform_osystem.h"
-#include "engines/wintermute/graphics/transparent_surface.h"
-#include "engines/wintermute/graphics/transform_tools.h"
+#include "graphics/transparent_surface.h"
+#include "graphics/transform_tools.h"
#include "graphics/pixelformat.h"
#include "graphics/surface.h"
#include "common/stream.h"
@@ -45,7 +45,7 @@ namespace Wintermute {
BaseSurfaceOSystem::BaseSurfaceOSystem(BaseGame *inGame) : BaseSurface(inGame) {
_surface = new Graphics::Surface();
_alphaMask = nullptr;
- _alphaType = TransparentSurface::ALPHA_FULL;
+ _alphaType = Graphics::ALPHA_FULL;
_lockPixels = nullptr;
_lockPitch = 0;
_loaded = false;
@@ -68,10 +68,10 @@ BaseSurfaceOSystem::~BaseSurfaceOSystem() {
renderer->invalidateTicketsFromSurface(this);
}
-TransparentSurface::AlphaType hasTransparencyType(const Graphics::Surface *surf) {
+Graphics::AlphaType hasTransparencyType(const Graphics::Surface *surf) {
if (surf->format.bytesPerPixel != 4) {
warning("hasTransparencyType:: non 32 bpp surface passed as argument");
- return TransparentSurface::ALPHA_OPAQUE;
+ return Graphics::ALPHA_OPAQUE;
}
uint8 r, g, b, a;
bool seenAlpha = false;
@@ -93,11 +93,11 @@ TransparentSurface::AlphaType hasTransparencyType(const Graphics::Surface *surf)
}
}
if (seenFullAlpha) {
- return TransparentSurface::ALPHA_FULL;
+ return Graphics::ALPHA_FULL;
} else if (seenAlpha) {
- return TransparentSurface::ALPHA_BINARY;
+ return Graphics::ALPHA_BINARY;
} else {
- return TransparentSurface::ALPHA_OPAQUE;
+ return Graphics::ALPHA_OPAQUE;
}
}
@@ -175,7 +175,7 @@ bool BaseSurfaceOSystem::finishLoad() {
}
if (needsColorKey) {
- TransparentSurface trans(*_surface);
+ Graphics::TransparentSurface trans(*_surface);
trans.applyColorKey(_ckRed, _ckGreen, _ckBlue, replaceAlpha);
}
@@ -328,46 +328,46 @@ bool BaseSurfaceOSystem::endPixelOp() {
//////////////////////////////////////////////////////////////////////////
-bool BaseSurfaceOSystem::display(int x, int y, Rect32 rect, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+bool BaseSurfaceOSystem::display(int x, int y, Rect32 rect, Graphics::TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
_rotation = 0;
- return drawSprite(x, y, &rect, nullptr, TransformStruct(kDefaultZoomX, kDefaultZoomY, mirrorX, mirrorY));
+ return drawSprite(x, y, &rect, nullptr, Graphics::TransformStruct(Graphics::kDefaultZoomX, Graphics::kDefaultZoomY, mirrorX, mirrorY));
}
//////////////////////////////////////////////////////////////////////////
-bool BaseSurfaceOSystem::displayTrans(int x, int y, Rect32 rect, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+bool BaseSurfaceOSystem::displayTrans(int x, int y, Rect32 rect, uint32 alpha, Graphics::TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
_rotation = 0;
- return drawSprite(x, y, &rect, nullptr, TransformStruct(kDefaultZoomX, kDefaultZoomY, blendMode, alpha, mirrorX, mirrorY));
+ return drawSprite(x, y, &rect, nullptr, Graphics::TransformStruct(Graphics::kDefaultZoomX, Graphics::kDefaultZoomY, blendMode, alpha, mirrorX, mirrorY));
}
//////////////////////////////////////////////////////////////////////////
-bool BaseSurfaceOSystem::displayTransOffset(int x, int y, Rect32 rect, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY, int offsetX, int offsetY) {
+bool BaseSurfaceOSystem::displayTransOffset(int x, int y, Rect32 rect, uint32 alpha, Graphics::TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY, int offsetX, int offsetY) {
_rotation = 0;
- return drawSprite(x, y, &rect, nullptr, TransformStruct(kDefaultZoomX, kDefaultZoomY, kDefaultAngle, kDefaultHotspotX, kDefaultHotspotY, blendMode, alpha, mirrorX, mirrorY, offsetX, offsetY));
+ return drawSprite(x, y, &rect, nullptr, Graphics::TransformStruct(Graphics::kDefaultZoomX, Graphics::kDefaultZoomY, Graphics::kDefaultAngle, Graphics::kDefaultHotspotX, Graphics::kDefaultHotspotY, blendMode, alpha, mirrorX, mirrorY, offsetX, offsetY));
}
//////////////////////////////////////////////////////////////////////////
-bool BaseSurfaceOSystem::displayTransZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+bool BaseSurfaceOSystem::displayTransZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha, Graphics::TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
_rotation = 0;
- return drawSprite(x, y, &rect, nullptr, TransformStruct((int32)zoomX, (int32)zoomY, blendMode, alpha, mirrorX, mirrorY));
+ return drawSprite(x, y, &rect, nullptr, Graphics::TransformStruct((int32)zoomX, (int32)zoomY, blendMode, alpha, mirrorX, mirrorY));
}
//////////////////////////////////////////////////////////////////////////
-bool BaseSurfaceOSystem::displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha, bool transparent, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+bool BaseSurfaceOSystem::displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha, bool transparent, Graphics::TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
_rotation = 0;
- TransformStruct transform;
+ Graphics::TransformStruct transform;
if (transparent) {
- transform = TransformStruct((int32)zoomX, (int32)zoomY, kDefaultAngle, kDefaultHotspotX, kDefaultHotspotY, blendMode, alpha, mirrorX, mirrorY);
+ transform = Graphics::TransformStruct((int32)zoomX, (int32)zoomY, Graphics::kDefaultAngle, Graphics::kDefaultHotspotX, Graphics::kDefaultHotspotY, blendMode, alpha, mirrorX, mirrorY);
} else {
- transform = TransformStruct((int32)zoomX, (int32)zoomY, mirrorX, mirrorY);
+ transform = Graphics::TransformStruct((int32)zoomX, (int32)zoomY, mirrorX, mirrorY);
}
return drawSprite(x, y, &rect, nullptr, transform);
}
//////////////////////////////////////////////////////////////////////////
-bool BaseSurfaceOSystem::displayTransform(int x, int y, Rect32 rect, Rect32 newRect, const TransformStruct &transform) {
+bool BaseSurfaceOSystem::displayTransform(int x, int y, Rect32 rect, Rect32 newRect, const Graphics::TransformStruct &transform) {
_rotation = (uint32)transform._angle;
if (transform._angle < 0.0f) {
warning("Negative rotation: %d %d", transform._angle, _rotation);
@@ -380,13 +380,13 @@ bool BaseSurfaceOSystem::displayTransform(int x, int y, Rect32 rect, Rect32 newR
//////////////////////////////////////////////////////////////////////////
bool BaseSurfaceOSystem::displayTiled(int x, int y, Rect32 rect, int numTimesX, int numTimesY) {
assert(numTimesX > 0 && numTimesY > 0);
- TransformStruct transform(numTimesX, numTimesY);
+ Graphics::TransformStruct transform(numTimesX, numTimesY);
return drawSprite(x, y, &rect, nullptr, transform);
}
//////////////////////////////////////////////////////////////////////////
-bool BaseSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, Rect32 *newRect, TransformStruct transform) {
+bool BaseSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, Rect32 *newRect, Graphics::TransformStruct transform) {
BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
if (!_loaded) {
@@ -414,13 +414,13 @@ bool BaseSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, Rect32 *newRect,
position.setHeight(newRect->height());
} else {
- Rect32 r;
+ Common::Rect r;
r.top = 0;
r.left = 0;
r.setWidth(rect->width());
r.setHeight(rect->height());
- r = TransformTools::newRect(r, transform, 0);
+ r = Graphics::TransformTools::newRect(r, transform, 0);
position.top = r.top + y + transform._offset.y;
position.left = r.left + x + transform._offset.x;
@@ -433,7 +433,7 @@ bool BaseSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, Rect32 *newRect,
// But no checking is in place for that yet.
// Optimize by not doing alpha-blits if we lack alpha
- if (_alphaType == TransparentSurface::ALPHA_OPAQUE && !transform._alphaDisable) {
+ if (_alphaType == Graphics::ALPHA_OPAQUE && !transform._alphaDisable) {
transform._alphaDisable = true;
}
@@ -452,9 +452,9 @@ bool BaseSurfaceOSystem::putSurface(const Graphics::Surface &surface, bool hasAl
_surface->copyFrom(surface);
}
if (hasAlpha) {
- _alphaType = TransparentSurface::ALPHA_FULL;
+ _alphaType = Graphics::ALPHA_FULL;
} else {
- _alphaType = TransparentSurface::ALPHA_OPAQUE;
+ _alphaType = Graphics::ALPHA_OPAQUE;
}
BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
renderer->invalidateTicketsFromSurface(this);
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h
index 4a05b2c66c..9fbbe1d498 100644
--- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h
+++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h
@@ -30,7 +30,7 @@
#define WINTERMUTE_BASE_SURFACESDL_H
#include "graphics/surface.h"
-#include "engines/wintermute/graphics/transparent_surface.h"
+#include "graphics/transparent_surface.h"
#include "engines/wintermute/base/gfx/base_surface.h"
#include "common/list.h"
@@ -52,12 +52,12 @@ public:
bool endPixelOp() override;
- bool displayTransZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha = kDefaultRgbaMod, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) override;
- bool displayTrans(int x, int y, Rect32 rect, uint32 alpha = kDefaultRgbaMod, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) override;
- bool displayTransOffset(int x, int y, Rect32 rect, uint32 alpha = kDefaultRgbaMod, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false, int offsetX = 0, int offsetY = 0) override;
- bool display(int x, int y, Rect32 rect, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) override;
- bool displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha = kDefaultRgbaMod, bool transparent = false, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) override;
- bool displayTransform(int x, int y, Rect32 rect, Rect32 newRect, const TransformStruct &transform) override;
+ bool displayTransZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha = Graphics::kDefaultRgbaMod, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) override;
+ bool displayTrans(int x, int y, Rect32 rect, uint32 alpha = Graphics::kDefaultRgbaMod, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) override;
+ bool displayTransOffset(int x, int y, Rect32 rect, uint32 alpha = Graphics::kDefaultRgbaMod, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false, int offsetX = 0, int offsetY = 0) override;
+ bool display(int x, int y, Rect32 rect, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) override;
+ bool displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha = Graphics::kDefaultRgbaMod, bool transparent = false, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) override;
+ bool displayTransform(int x, int y, Rect32 rect, Rect32 newRect, const Graphics::TransformStruct &transform) override;
virtual bool displayTiled(int x, int y, Rect32 rect, int numTimesX, int numTimesY);
virtual bool putSurface(const Graphics::Surface &surface, bool hasAlpha = false) override;
/* static unsigned DLL_CALLCONV ReadProc(void *buffer, unsigned size, unsigned count, fi_handle handle);
@@ -82,17 +82,17 @@ public:
return _height;
}
- TransparentSurface::AlphaType getAlphaType() const { return _alphaType; }
+ Graphics::AlphaType getAlphaType() const { return _alphaType; }
private:
Graphics::Surface *_surface;
bool _loaded;
bool finishLoad();
- bool drawSprite(int x, int y, Rect32 *rect, Rect32 *newRect, TransformStruct transformStruct);
+ bool drawSprite(int x, int y, Rect32 *rect, Rect32 *newRect, Graphics::TransformStruct transformStruct);
void genAlphaMask(Graphics::Surface *surface);
uint32 getPixelAt(Graphics::Surface *surface, int x, int y);
uint32 _rotation;
- TransparentSurface::AlphaType _alphaType;
+ Graphics::AlphaType _alphaType;
void *_lockPixels;
int _lockPitch;
byte *_alphaMask;
diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.cpp b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
index f8579dfd41..afe884300a 100644
--- a/engines/wintermute/base/gfx/osystem/render_ticket.cpp
+++ b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
@@ -29,12 +29,12 @@
#include "engines/wintermute/base/gfx/osystem/render_ticket.h"
#include "engines/wintermute/base/gfx/osystem/base_surface_osystem.h"
-#include "engines/wintermute/graphics/transform_tools.h"
+#include "graphics/transform_tools.h"
#include "common/textconsole.h"
namespace Wintermute {
-RenderTicket::RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, TransformStruct transform) :
+RenderTicket::RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, Graphics::TransformStruct transform) :
_owner(owner),
_srcRect(*srcRect),
_dstRect(*dstRect),
@@ -57,8 +57,8 @@ RenderTicket::RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *s
// NB: Mirroring and rotation are probably done in the wrong order.
// (Mirroring should most likely be done before rotation. See also
// TransformTools.)
- if (_transform._angle != kDefaultAngle) {
- TransparentSurface src(*_surface, false);
+ if (_transform._angle != Graphics::kDefaultAngle) {
+ Graphics::TransparentSurface src(*_surface, false);
Graphics::Surface *temp = src.rotoscale(transform);
_surface->free();
delete _surface;
@@ -66,7 +66,7 @@ RenderTicket::RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *s
} else if ((dstRect->width() != srcRect->width() ||
dstRect->height() != srcRect->height()) &&
_transform._numTimesX * _transform._numTimesY == 1) {
- TransparentSurface src(*_surface, false);
+ Graphics::TransparentSurface src(*_surface, false);
Graphics::Surface *temp = src.scale(dstRect->width(), dstRect->height());
_surface->free();
delete _surface;
@@ -97,7 +97,7 @@ bool RenderTicket::operator==(const RenderTicket &t) const {
// Replacement for SDL2's SDL_RenderCopy
void RenderTicket::drawToSurface(Graphics::Surface *_targetSurface) const {
- TransparentSurface src(*getSurface(), false);
+ Graphics::TransparentSurface src(*getSurface(), false);
Common::Rect clipRect;
clipRect.setWidth(getSurface()->w);
@@ -105,7 +105,7 @@ void RenderTicket::drawToSurface(Graphics::Surface *_targetSurface) const {
if (_owner) {
if (_transform._alphaDisable) {
- src.setAlphaMode(TransparentSurface::ALPHA_OPAQUE);
+ src.setAlphaMode(Graphics::ALPHA_OPAQUE);
} else {
src.setAlphaMode(_owner->getAlphaType());
}
@@ -126,7 +126,7 @@ void RenderTicket::drawToSurface(Graphics::Surface *_targetSurface) const {
}
void RenderTicket::drawToSurface(Graphics::Surface *_targetSurface, Common::Rect *dstRect, Common::Rect *clipRect) const {
- TransparentSurface src(*getSurface(), false);
+ Graphics::TransparentSurface src(*getSurface(), false);
bool doDelete = false;
if (!clipRect) {
doDelete = true;
@@ -137,7 +137,7 @@ void RenderTicket::drawToSurface(Graphics::Surface *_targetSurface, Common::Rect
if (_owner) {
if (_transform._alphaDisable) {
- src.setAlphaMode(TransparentSurface::ALPHA_OPAQUE);
+ src.setAlphaMode(Graphics::ALPHA_OPAQUE);
} else {
src.setAlphaMode(_owner->getAlphaType());
}
diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.h b/engines/wintermute/base/gfx/osystem/render_ticket.h
index de95273021..3d3bd2e844 100644
--- a/engines/wintermute/base/gfx/osystem/render_ticket.h
+++ b/engines/wintermute/base/gfx/osystem/render_ticket.h
@@ -29,7 +29,7 @@
#ifndef WINTERMUTE_RENDER_TICKET_H
#define WINTERMUTE_RENDER_TICKET_H
-#include "engines/wintermute/graphics/transparent_surface.h"
+#include "graphics/transparent_surface.h"
#include "graphics/surface.h"
#include "common/rect.h"
@@ -51,8 +51,8 @@ class BaseSurfaceOSystem;
*/
class RenderTicket {
public:
- RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, TransformStruct transform);
- RenderTicket() : _isValid(true), _wantsDraw(false), _transform(TransformStruct()) {}
+ RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, Graphics::TransformStruct transform);
+ RenderTicket() : _isValid(true), _wantsDraw(false), _transform(Graphics::TransformStruct()) {}
~RenderTicket();
const Graphics::Surface *getSurface() const { return _surface; }
// Non-dirty-rects:
@@ -65,7 +65,7 @@ public:
bool _isValid;
bool _wantsDraw;
- TransformStruct _transform;
+ Graphics::TransformStruct _transform;
BaseSurfaceOSystem *_owner;
bool operator==(const RenderTicket &a) const;
diff --git a/engines/wintermute/base/sound/base_sound_manager.cpp b/engines/wintermute/base/sound/base_sound_manager.cpp
index 539dc0dd1d..41cfe5ea62 100644
--- a/engines/wintermute/base/sound/base_sound_manager.cpp
+++ b/engines/wintermute/base/sound/base_sound_manager.cpp
@@ -87,6 +87,7 @@ bool BaseSoundMgr::initialize() {
setMasterVolumePercent(volumeMasterPercent);
_soundAvailable = true;
+ g_engine->syncSoundSettings();
return STATUS_OK;
}
diff --git a/engines/wintermute/dcgf.h b/engines/wintermute/dcgf.h
index 78503b8c3b..c919180e45 100644
--- a/engines/wintermute/dcgf.h
+++ b/engines/wintermute/dcgf.h
@@ -32,8 +32,8 @@
//////////////////////////////////////////////////////////////////////////
#define DCGF_VER_MAJOR 1
-#define DCGF_VER_MINOR 2
-#define DCGF_VER_BUILD 2
+#define DCGF_VER_MINOR 3
+#define DCGF_VER_BUILD 1
#define DCGF_VER_SUFFIX "ScummVM"
#define DCGF_VER_BETA true
diff --git a/engines/wintermute/dctypes.h b/engines/wintermute/dctypes.h
index 33e1cc4018..90340f437d 100644
--- a/engines/wintermute/dctypes.h
+++ b/engines/wintermute/dctypes.h
@@ -200,14 +200,6 @@ enum TTextEncoding {
NUM_TEXT_ENCODINGS
};
-enum TSpriteBlendMode {
- BLEND_UNKNOWN = -1,
- BLEND_NORMAL = 0,
- BLEND_ADDITIVE = 1,
- BLEND_SUBTRACTIVE = 2,
- NUM_BLEND_MODES
-};
-
enum TTTSType {
TTS_CAPTION = 0,
TTS_TALK,
diff --git a/engines/wintermute/detection_tables.h b/engines/wintermute/detection_tables.h
index 6087e60ece..8206ca9643 100644
--- a/engines/wintermute/detection_tables.h
+++ b/engines/wintermute/detection_tables.h
@@ -39,41 +39,50 @@ static const PlainGameDescriptor wintermuteGames[] = {
{"carolreed8", "Carol Reed 8 - Amber's Blood"},
{"carolreed9", "Carol Reed 9 - Cold Case Summer"},
{"chivalry", "Chivalry is Not Dead"},
- {"corrosion", "Corrosion: Cold Winter Waiting"},
+ {"conspiracao", "Conspiracao Dumont"},
+ {"corrosion", "Corrosion: Cold Winter Waiting"},
{"deadcity", "Dead City"},
{"dreaming", "Des Reves Elastiques Avec Mille Insectes Nommes Georges"},
{"dirtysplit", "Dirty Split"},
{"dreamscape", "Dreamscape"},
{"escapemansion", "Escape from the Mansion"},
+ {"four", "Four"},
{"framed", "Framed"},
{"ghostsheet", "Ghost in the Sheet"},
{"hamlet", "Hamlet or the last game without MMORPS features, shaders and product placement"},
{"helga", "Helga Deep In Trouble"},
{"jamesperis", "James Peris: No License Nor Control"},
{"kulivocko", "Kulivocko"},
+ {"lifein3minutes", "Life In 3 Minutes"},
{"lonelyrobot", "Project Lonely Robot"},
{"looky", "Looky"},
{"julia", "J.U.L.I.A."},
{"mirage", "Mirage"},
+ {"nighttrain", "Night Train"},
{"oknytt", "Oknytt"},
{"paintaria", "Paintaria"},
{"pigeons", "Pigeons in the Park"},
{"projectdoom", "Project: Doom"},
+ {"projectjoe", "Project Joe"},
{"reversion1", "Reversion: The Escape"},
{"reversion2", "Reversion: The Meeting"},
- {"rhiannon", "Rhiannon: Curse of the four Branches"},
- {"ritter", "1 1/2 Ritter: Auf der Suche nach der hinreissenden Herzelinde"},
+ {"rhiannon", "Rhiannon: Curse of the four Branches"},
+ {"ritter", "1 1/2 Ritter: Auf der Suche nach der hinreissenden Herzelinde"},
{"rosemary", "Rosemary"},
+ {"satanandson", "Satan and Son"},
{"securanote", "Securanote"},
{"shaban", "Shaban"},
{"shinestar", "The Shine of a Star"},
{"spaceinvaders", "Space Invaders"},
{"spacemadness", "Space Madness"},
+ {"sofiasdebt", "Sofia's Debt"},
+ {"theancientmark1", "The Ancient Mark - Episode 1"},
{"thebox", "The Box"},
- {"thekite", "The Kite"},
+ {"thekite", "The Kite"},
{"tib", "Fairy Tales About Toshechka and Boshechka"},
{"tradestory", "The Trader of Stories"},
{"twc", "the white chamber"},
+ {"war", "War"},
{"vsevolod", "Vsevolod"},
{"wintermute", "Wintermute engine game"},
{"wtetris", "Wilma Tetris"},
@@ -275,6 +284,17 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_TESTING,
GUIO0()
},
+ // Conspiracao Dumont
+ {
+ "conspiracao",
+ "",
+ AD_ENTRY1s("ConspiracaoDumont.exe", "106f3f2c8f18bb5ffffeed634ace256c", 32908032),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE |
+ ADGF_DEMO,
+ GUIO0()
+ },
// Corrosion: Cold Winter Waiting
{
"corrosion",
@@ -466,6 +486,16 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // Four
+ {
+ "four",
+ "",
+ AD_ENTRY1s("data.dcp", "ec05cd5e37c9a524053b8859635a4234", 62599855),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
// Framed
{
"framed",
@@ -645,6 +675,16 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_DEMO,
GUIO0()
},
+ // Life In 3 Minutes
+ {
+ "lifein3minutes",
+ "",
+ AD_ENTRY1s("data.dcp", "c6368950e37a95bf098b02b4eaa5b929", 141787214),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
// Looky Demo (English)
{
"looky",
@@ -709,6 +749,17 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // Night Train Demo
+ {
+ "nighttrain",
+ "",
+ AD_ENTRY1s("data.dcp", "5a027ef84b083a730c9a4c85ec1d3a32", 131760816),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE |
+ ADGF_DEMO,
+ GUIO0()
+ },
// Paintaria
{
"paintaria",
@@ -739,6 +790,17 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // Project Joe
+ {
+ "projectjoe",
+ "",
+ AD_ENTRY1s("data.dcp", "ada3c08542901295076b5349e655e73f", 160780037),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE |
+ ADGF_DEMO,
+ GUIO0()
+ },
// Project Lonely Robot
{
"lonelyrobot",
@@ -1138,6 +1200,17 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // Satan and Son
+ {
+ "satanandson",
+ "",
+ AD_ENTRY1s("data.dcp", "16a6ba8174b697bbba9299619d1e20c4", 67539054),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE |
+ ADGF_DEMO,
+ GUIO0()
+ },
// Rosemary
{
"rosemary",
@@ -1178,6 +1251,16 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // Sofia's Debt
+ {
+ "sofiasdebt",
+ "",
+ AD_ENTRY1s("SD.exe", "e9515f9ba1a2925bb6733476a826a650", 9915047),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
// Space Invaders (Demo)
{
"spaceinvaders",
@@ -1199,6 +1282,16 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // The Ancient Mark - Episode 1
+ {
+ "theancientmark1",
+ "",
+ AD_ENTRY1s("data.dcp", "ca04c26f03b2bd307368b306b297ddd7", 364664692),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
// The Box
{
"thebox",
@@ -1301,6 +1394,16 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_DEMO,
GUIO0()
},
+ // War
+ {
+ "war",
+ "",
+ AD_ENTRY1s("data.dcp", "003e317cda6d0137bbd5e5d7f089ee4d", 32591890),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
// Wilma Tetris
{
"wtetris",
diff --git a/engines/wintermute/module.mk b/engines/wintermute/module.mk
index 19fb3d6717..1b6c52e0b7 100644
--- a/engines/wintermute/module.mk
+++ b/engines/wintermute/module.mk
@@ -89,9 +89,6 @@ MODULE_OBJS := \
base/save_thumb_helper.o \
base/timer.o \
detection.o \
- graphics/transform_struct.o \
- graphics/transform_tools.o \
- graphics/transparent_surface.o \
math/math_util.o \
math/matrix4.o \
math/vector2.o \
diff --git a/engines/wintermute/utils/utils.cpp b/engines/wintermute/utils/utils.cpp
index d592019418..dc6476d4ea 100644
--- a/engines/wintermute/utils/utils.cpp
+++ b/engines/wintermute/utils/utils.cpp
@@ -32,11 +32,6 @@
namespace Wintermute {
-//////////////////////////////////////////////////////////////////////
-static inline unsigned Sqr(int x) {
- return (x * x);
-}
-
//////////////////////////////////////////////////////////////////////////////////
// Swap - swaps two integers
//////////////////////////////////////////////////////////////////////////////////
diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp
index e854378ae4..517278e155 100644
--- a/engines/zvision/scripting/actions.cpp
+++ b/engines/zvision/scripting/actions.cpp
@@ -155,7 +155,7 @@ bool ActionEnableControl::execute(ZVision *engine) {
ActionMusic::ActionMusic(const Common::String &line) : _volume(255) {
uint type;
- char fileNameBuffer[25];
+ char fileNameBuffer[26];
uint loop;
uint volume = 255;
@@ -211,7 +211,7 @@ bool ActionMusic::execute(ZVision *engine) {
//////////////////////////////////////////////////////////////////////////////
ActionPreloadAnimation::ActionPreloadAnimation(const Common::String &line) {
- char fileName[25];
+ char fileName[26];
// The two %*u are always 0 and dont seem to have a use
sscanf(line.c_str(), "%*[^:]:%*[^:]:%u(%25s %*u %*u %u %u)", &_key, fileName, &_mask, &_framerate);
@@ -238,7 +238,7 @@ bool ActionPreloadAnimation::execute(ZVision *engine) {
//////////////////////////////////////////////////////////////////////////////
ActionPlayAnimation::ActionPlayAnimation(const Common::String &line) {
- char fileName[25];
+ char fileName[26];
// The two %*u are always 0 and dont seem to have a use
sscanf(line.c_str(),
@@ -312,7 +312,7 @@ bool ActionRandom::execute(ZVision *engine) {
//////////////////////////////////////////////////////////////////////////////
ActionSetPartialScreen::ActionSetPartialScreen(const Common::String &line) {
- char fileName[25];
+ char fileName[26];
uint color;
sscanf(line.c_str(), "%*[^(](%u %u %25s %*u %u)", &_x, &_y, fileName, &color);
@@ -342,7 +342,7 @@ bool ActionSetPartialScreen::execute(ZVision *engine) {
//////////////////////////////////////////////////////////////////////////////
ActionSetScreen::ActionSetScreen(const Common::String &line) {
- char fileName[25];
+ char fileName[26];
sscanf(line.c_str(), "%*[^(](%25[^)])", fileName);
_fileName = Common::String(fileName);
@@ -360,7 +360,7 @@ bool ActionSetScreen::execute(ZVision *engine) {
//////////////////////////////////////////////////////////////////////////////
ActionStreamVideo::ActionStreamVideo(const Common::String &line) {
- char fileName[25];
+ char fileName[26];
uint skippable;
sscanf(line.c_str(), "%*[^(](%25s %u %u %u %u %u %u)", fileName, &_x1, &_y1, &_x2, &_y2, &_flags, &skippable);
diff --git a/engines/zvision/scripting/controls/input_control.cpp b/engines/zvision/scripting/controls/input_control.cpp
index 5cf5086691..a35548d02e 100644
--- a/engines/zvision/scripting/controls/input_control.cpp
+++ b/engines/zvision/scripting/controls/input_control.cpp
@@ -75,7 +75,7 @@ InputControl::InputControl(ZVision *engine, uint32 key, Common::SeekableReadStre
} else if (line.matchString("*next_tabstop*", true)) {
sscanf(line.c_str(), "%*[^(](%u)", &_nextTabstop);
} else if (line.matchString("*cursor_animation*", true)) {
- char fileName[25];
+ char fileName[26];
sscanf(line.c_str(), "%*[^(](%25s %*u)", fileName);
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h
index 8e1c5e91e1..703da68182 100644
--- a/graphics/VectorRenderer.h
+++ b/graphics/VectorRenderer.h
@@ -182,7 +182,7 @@ public:
* @param x Horizontal (X) coordinate for the top left corner of the triangle
* @param y Vertical (Y) coordinate for the top left corner of the triangle
* @param base Width of the base of the triangle
- * @param h Height of the triangle
+ * @param height Height of the triangle
* @param orient Orientation of the triangle.
*/
virtual void drawTriangle(int x, int y, int base, int height, TriangleOrientation orient) = 0;
@@ -276,8 +276,6 @@ public:
/**
* Fills the active surface with the specified fg/bg color or the active gradient.
* Defaults to using the active Foreground color for filling.
- *
- * @param mode Fill mode (bg, fg or gradient) used to fill the surface
*/
virtual void fillSurface() = 0;
diff --git a/graphics/conversion.h b/graphics/conversion.h
index 33d57f7a4f..8ca529acc0 100644
--- a/graphics/conversion.h
+++ b/graphics/conversion.h
@@ -48,10 +48,10 @@ inline static void RGB2YUV(byte r, byte g, byte b, byte &y, byte &u, byte &v) {
/**
* Blits a rectangle from one graphical format to another.
*
- * @param dstbuf the buffer which will recieve the converted graphics data
- * @param srcbuf the buffer containing the original graphics data
- * @param dstpitch width in bytes of one full line of the dest buffer
- * @param srcpitch width in bytes of one full line of the source buffer
+ * @param dst the buffer which will recieve the converted graphics data
+ * @param src the buffer containing the original graphics data
+ * @param dstPitch width in bytes of one full line of the dest buffer
+ * @param srcPitch width in bytes of one full line of the source buffer
* @param w the width of the graphics data
* @param h the height of the graphics data
* @param dstFmt the desired pixel format
diff --git a/graphics/fontman.h b/graphics/fontman.h
index b3de92f547..515b157e6a 100644
--- a/graphics/fontman.h
+++ b/graphics/fontman.h
@@ -75,7 +75,6 @@ public:
* Associates a BDF font object with an 'usage'. This is useful for platforms
* with a screen DPI much larger than a regular desktop workstation.
*
- * @param name the name of the font
* @param font the font object
* @return true on success, false on failure
*/
diff --git a/graphics/module.mk b/graphics/module.mk
index 5918775240..2705322c79 100644
--- a/graphics/module.mk
+++ b/graphics/module.mk
@@ -17,6 +17,9 @@ MODULE_OBJS := \
scaler/thumbnail_intern.o \
sjis.o \
surface.o \
+ transform_struct.o \
+ transform_tools.o \
+ transparent_surface.o \
thumbnail.o \
VectorRenderer.o \
VectorRendererSpec.o \
diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h
index 792833a8e3..00db6702fc 100644
--- a/graphics/pixelformat.h
+++ b/graphics/pixelformat.h
@@ -27,6 +27,97 @@
namespace Graphics {
+/** Template to expand from an n-bit component to an 8-bit component */
+template<int depth>
+struct ColorComponent {
+};
+
+template<>
+struct ColorComponent<0> {
+ static inline uint expand(uint value) {
+ return 0;
+ }
+};
+
+template<>
+struct ColorComponent<1> {
+ static inline uint expand(uint value) {
+ value &= 1;
+ return value |
+ (value << 1) |
+ (value << 2) |
+ (value << 3) |
+ (value << 4) |
+ (value << 5) |
+ (value << 6) |
+ (value << 7);
+ }
+};
+
+template<>
+struct ColorComponent<2> {
+ static inline uint expand(uint value) {
+ value &= 3;
+ return value |
+ (value << 2) |
+ (value << 4) |
+ (value << 6);
+ }
+};
+
+template<>
+struct ColorComponent<3> {
+ static inline uint expand(uint value) {
+ value &= 7;
+ return (value << 5) |
+ (value << 2) |
+ (value >> 1);
+ }
+};
+
+template<>
+struct ColorComponent<4> {
+ static inline uint expand(uint value) {
+ value &= 15;
+ return value |
+ (value << 4);
+ }
+};
+
+template<>
+struct ColorComponent<5> {
+ static inline uint expand(uint value) {
+ value &= 31;
+ return (value << 3) |
+ (value >> 2);
+ }
+};
+
+template<>
+struct ColorComponent<6> {
+ static inline uint expand(uint value) {
+ value &= 63;
+ return (value << 2) |
+ (value >> 4);
+ }
+};
+
+template<>
+struct ColorComponent<7> {
+ static inline uint expand(uint value) {
+ value &= 127;
+ return (value << 1) |
+ (value >> 6);
+ }
+};
+
+template<>
+struct ColorComponent<8> {
+ static inline uint expand(uint value) {
+ return value & 255;
+ }
+};
+
/**
* A pixel format description.
*
@@ -91,16 +182,16 @@ struct PixelFormat {
}
inline void colorToRGB(uint32 color, uint8 &r, uint8 &g, uint8 &b) const {
- r = ((color >> rShift) << rLoss) & 0xFF;
- g = ((color >> gShift) << gLoss) & 0xFF;
- b = ((color >> bShift) << bLoss) & 0xFF;
+ r = expand(rBits(), color >> rShift);
+ g = expand(gBits(), color >> gShift);
+ b = expand(bBits(), color >> bShift);
}
inline void colorToARGB(uint32 color, uint8 &a, uint8 &r, uint8 &g, uint8 &b) const {
- a = (aBits() == 0) ? 0xFF : (((color >> aShift) << aLoss) & 0xFF);
- r = ((color >> rShift) << rLoss) & 0xFF;
- g = ((color >> gShift) << gLoss) & 0xFF;
- b = ((color >> bShift) << bLoss) & 0xFF;
+ a = (aBits() == 0) ? 0xFF : expand(aBits(), color >> aShift);
+ r = expand(rBits(), color >> rShift);
+ g = expand(gBits(), color >> gShift);
+ b = expand(bBits(), color >> bShift);
}
//////////////////////////////////////////////////////////////////////
@@ -142,6 +233,33 @@ struct PixelFormat {
inline uint aMax() const {
return (1 << aBits()) - 1;
}
+
+ /** Expand a given bit-depth component to a full 8-bit component */
+ static inline uint expand(uint bits, uint color) {
+ switch (bits) {
+ case 0:
+ return ColorComponent<0>::expand(color);
+ case 1:
+ return ColorComponent<1>::expand(color);
+ case 2:
+ return ColorComponent<2>::expand(color);
+ case 3:
+ return ColorComponent<3>::expand(color);
+ case 4:
+ return ColorComponent<4>::expand(color);
+ case 5:
+ return ColorComponent<5>::expand(color);
+ case 6:
+ return ColorComponent<6>::expand(color);
+ case 7:
+ return ColorComponent<7>::expand(color);
+ case 8:
+ return ColorComponent<8>::expand(color);
+ }
+
+ // Unsupported
+ return 0;
+ }
};
} // End of namespace Graphics
diff --git a/graphics/surface.h b/graphics/surface.h
index d083449854..ad15944361 100644
--- a/graphics/surface.h
+++ b/graphics/surface.h
@@ -214,7 +214,7 @@ public:
* of buffer must match the pixel format of the Surface.
*
* @param buffer The buffer containing the graphics data source
- * @param pitch The pitch of the buffer (number of bytes in a scanline)
+ * @param srcPitch The pitch of the buffer (number of bytes in a scanline)
* @param destX The x coordinate of the destination rectangle
* @param destY The y coordinate of the destination rectangle
* @param width The width of the destination rectangle
@@ -228,8 +228,7 @@ public:
* @param srcSurface The source of the bitmap data
* @param destX The x coordinate of the destination rectangle
* @param destY The y coordinate of the destination rectangle
- * @param subRect The subRect of surface to be blitted
- * @return
+ * @param subRect The subRect of surface to be blitted
*/
void copyRectToSurface(const Graphics::Surface &srcSurface, int destX, int destY, const Common::Rect subRect);
diff --git a/engines/wintermute/graphics/transform_struct.cpp b/graphics/transform_struct.cpp
index 9483975d94..a6beada17f 100644
--- a/engines/wintermute/graphics/transform_struct.cpp
+++ b/graphics/transform_struct.cpp
@@ -20,11 +20,12 @@
*
*/
-#include "engines/wintermute/graphics/transform_struct.h"
-#include "engines/wintermute/graphics/transparent_surface.h"
+#include "graphics/transform_struct.h"
+#include "graphics/transparent_surface.h"
-namespace Wintermute {
-void TransformStruct::init(Point32 zoom, uint32 angle, Point32 hotspot, bool alphaDisable, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY, Point32 offset) {
+namespace Graphics {
+
+void TransformStruct::init(Common::Point zoom, uint32 angle, Common::Point hotspot, bool alphaDisable, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY, Common::Point offset) {
_zoom = zoom;
_angle = angle;
_hotspot = hotspot;
@@ -32,88 +33,88 @@ void TransformStruct::init(Point32 zoom, uint32 angle, Point32 hotspot, bool alp
_rgbaMod = rgbaMod;
_alphaDisable = alphaDisable;
_flip = 0;
- _flip += TransparentSurface::FLIP_H * mirrorX;
- _flip += TransparentSurface::FLIP_V * mirrorY;
+ _flip += FLIP_H * mirrorX;
+ _flip += FLIP_V * mirrorY;
_offset = offset;
_numTimesX = 1;
_numTimesY = 1;
}
TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 hotspotX, int32 hotspotY, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY, int32 offsetX, int32 offsetY) {
- init(Point32(zoomX, zoomY),
+ init(Common::Point(zoomX, zoomY),
angle,
- Point32(hotspotX, hotspotY),
+ Common::Point(hotspotX, hotspotY),
false,
blendMode,
rgbaMod,
mirrorX, mirrorY,
- Point32(offsetX, offsetY));
+ Common::Point(offsetX, offsetY));
}
TransformStruct::TransformStruct(float zoomX, float zoomY, uint32 angle, int32 hotspotX, int32 hotspotY, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY, int32 offsetX, int32 offsetY) {
- init(Point32((int32)(zoomX / 100.0 * kDefaultZoomX),
- (int32)(zoomY / 100.0 * kDefaultZoomY)),
+ init(Common::Point((int)(zoomX / 100.0 * kDefaultZoomX),
+ (int)(zoomY / 100.0 * kDefaultZoomY)),
angle,
- Point32(hotspotX, hotspotY),
+ Common::Point(hotspotX, hotspotY),
false,
blendMode,
rgbaMod,
mirrorX, mirrorY,
- Point32(offsetX, offsetY));
+ Common::Point(offsetX, offsetY));
}
TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY) {
- init(Point32(zoomX, zoomY),
+ init(Common::Point(zoomX, zoomY),
kDefaultAngle,
- Point32(kDefaultHotspotX, kDefaultHotspotY),
+ Common::Point(kDefaultHotspotX, kDefaultHotspotY),
false,
blendMode,
rgbaMod,
mirrorX,
mirrorY,
- Point32(kDefaultOffsetX, kDefaultOffsetY));
+ Common::Point(kDefaultOffsetX, kDefaultOffsetY));
}
TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 hotspotX, int32 hotspotY) {
- init(Point32(zoomX, zoomY),
+ init(Common::Point(zoomX, zoomY),
angle,
- Point32(hotspotX, hotspotY),
+ Common::Point(hotspotX, hotspotY),
true,
BLEND_NORMAL,
kDefaultRgbaMod,
false, false,
- Point32(kDefaultOffsetX, kDefaultOffsetY));
+ Common::Point(kDefaultOffsetX, kDefaultOffsetY));
}
TransformStruct::TransformStruct(int32 numTimesX, int32 numTimesY) {
- init(Point32(kDefaultZoomX, kDefaultZoomY),
+ init(Common::Point(kDefaultZoomX, kDefaultZoomY),
kDefaultAngle,
- Point32(kDefaultHotspotX, kDefaultHotspotY),
+ Common::Point(kDefaultHotspotX, kDefaultHotspotY),
false,
BLEND_NORMAL,
kDefaultRgbaMod,
false, false,
- Point32(kDefaultOffsetX, kDefaultOffsetY));
+ Common::Point(kDefaultOffsetX, kDefaultOffsetY));
_numTimesX = numTimesX;
_numTimesY = numTimesY;
}
TransformStruct::TransformStruct() {
- init(Point32(kDefaultZoomX, kDefaultZoomY),
+ init(Common::Point(kDefaultZoomX, kDefaultZoomY),
kDefaultAngle,
- Point32(kDefaultHotspotX, kDefaultHotspotY),
+ Common::Point(kDefaultHotspotX, kDefaultHotspotY),
true,
BLEND_NORMAL,
kDefaultRgbaMod,
false, false,
- Point32(kDefaultOffsetX, kDefaultOffsetY));
+ Common::Point(kDefaultOffsetX, kDefaultOffsetY));
}
bool TransformStruct::getMirrorX() const {
- return (bool)(_flip & TransparentSurface::FLIP_H);
+ return (bool)(_flip & FLIP_H);
}
bool TransformStruct::getMirrorY() const {
- return (bool)(_flip & TransparentSurface::FLIP_V);
+ return (bool)(_flip & FLIP_V);
}
-} // End of namespace Wintermute
+} // End of namespace Graphics
diff --git a/engines/wintermute/graphics/transform_struct.h b/graphics/transform_struct.h
index f80b0967cb..640daf9f4c 100644
--- a/engines/wintermute/graphics/transform_struct.h
+++ b/graphics/transform_struct.h
@@ -20,13 +20,21 @@
*
*/
-#ifndef WINTERMUTE_TRANSFORM_STRUCT_H
-#define WINTERMUTE_TRANSFORM_STRUCT_H
+#ifndef GRAPHICS_TRANSFORM_STRUCT_H
+#define GRAPHICS_TRANSFORM_STRUCT_H
-#include "engines/wintermute/math/rect32.h"
-#include "engines/wintermute/dctypes.h"
+#include "common/rect.h"
+
+namespace Graphics {
+
+enum TSpriteBlendMode {
+ BLEND_UNKNOWN = -1,
+ BLEND_NORMAL = 0,
+ BLEND_ADDITIVE = 1,
+ BLEND_SUBTRACTIVE = 2,
+ NUM_BLEND_MODES
+};
-namespace Wintermute {
/**
* Contains all the required information that define a transform.
* Same source sprite + same TransformStruct = Same resulting sprite.
@@ -44,7 +52,7 @@ const int32 kDefaultAngle = 0;
struct TransformStruct {
private:
- void init(Point32 zoom, uint32 angle, Point32 hotspot, bool alphaDisable, TSpriteBlendMode blendMode, uint32 alpha, bool mirrorX, bool mirrorY, Point32 offset);
+ void init(Common::Point zoom, uint32 angle, Common::Point hotspot, bool alphaDisable, TSpriteBlendMode blendMode, uint32 alpha, bool mirrorX, bool mirrorY, Common::Point offset);
public:
TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 hotspotX, int32 hotspotY, TSpriteBlendMode blendMode, uint32 alpha, bool mirrorX = false, bool mirrorY = false, int32 offsetX = 0, int32 offsetY = 0);
@@ -54,14 +62,14 @@ public:
TransformStruct(int32 numTimesX, int32 numTimesY);
TransformStruct();
- Point32 _zoom; ///< Zoom; 100 = no zoom
- Point32 _hotspot; ///< Position of the hotspot
+ Common::Point _zoom; ///< Zoom; 100 = no zoom
+ Common::Point _hotspot; ///< Position of the hotspot
int32 _angle; ///< Rotation angle, in degrees
byte _flip; ///< Bitflag: see TransparentSurface::FLIP_XXX
bool _alphaDisable;
TSpriteBlendMode _blendMode;
uint32 _rgbaMod; ///< RGBa
- Point32 _offset;
+ Common::Point _offset;
int32 _numTimesX;
int32 _numTimesY;
@@ -85,5 +93,5 @@ public:
return !(compare == *this);
}
};
-} // End of namespace Wintermute
+} // End of namespace Graphics
#endif
diff --git a/engines/wintermute/graphics/transform_tools.cpp b/graphics/transform_tools.cpp
index 7a009c26fa..6e87b6321a 100644
--- a/engines/wintermute/graphics/transform_tools.cpp
+++ b/graphics/transform_tools.cpp
@@ -21,12 +21,12 @@
*/
-#include "engines/wintermute/graphics/transform_tools.h"
+#include "graphics/transform_tools.h"
#include <math.h>
-namespace Wintermute {
+namespace Graphics {
-FloatPoint TransformTools::transformPoint(FloatPoint point, const float rotate, const Point32 &zoom, const bool mirrorX, const bool mirrorY) {
+FloatPoint TransformTools::transformPoint(FloatPoint point, const float rotate, const Common::Point &zoom, const bool mirrorX, const bool mirrorY) {
float rotateRad = rotate * M_PI / 180.0f;
float x = point.x;
float y = point.y;
@@ -52,11 +52,11 @@ FloatPoint TransformTools::transformPoint(FloatPoint point, const float rotate,
return newPoint;
}
-Rect32 TransformTools::newRect(const Rect32 &oldRect, const TransformStruct &transform, Point32 *newHotspot) {
- Point32 nw(oldRect.left, oldRect.top);
- Point32 ne(oldRect.right, oldRect.top);
- Point32 sw(oldRect.left, oldRect.bottom);
- Point32 se(oldRect.right, oldRect.bottom);
+Common::Rect TransformTools::newRect(const Common::Rect &oldRect, const TransformStruct &transform, Common::Point *newHotspot) {
+ Common::Point nw(oldRect.left, oldRect.top);
+ Common::Point ne(oldRect.right, oldRect.top);
+ Common::Point sw(oldRect.left, oldRect.bottom);
+ Common::Point se(oldRect.right, oldRect.bottom);
FloatPoint nw1, ne1, sw1, se1;
@@ -75,7 +75,7 @@ Rect32 TransformTools::newRect(const Rect32 &oldRect, const TransformStruct &tra
newHotspot->x = (uint32)(-floor(left));
}
- Rect32 res;
+ Common::Rect res;
res.top = (int32)(floor(top)) + transform._hotspot.y;
res.bottom = (int32)(ceil(bottom)) + transform._hotspot.y;
res.left = (int32)(floor(left)) + transform._hotspot.x;
@@ -84,4 +84,4 @@ Rect32 TransformTools::newRect(const Rect32 &oldRect, const TransformStruct &tra
return res;
}
-} // End of namespace Wintermute
+} // End of namespace Graphics
diff --git a/engines/wintermute/graphics/transform_tools.h b/graphics/transform_tools.h
index e259db04e5..a51c8ee229 100644
--- a/engines/wintermute/graphics/transform_tools.h
+++ b/graphics/transform_tools.h
@@ -20,33 +20,57 @@
*
*/
-#ifndef WINTERMUTE_TRANSFORM_TOOLS_H
-#define WINTERMUTE_TRANSFORM_TOOLS_H
+#ifndef GRAPHICS_TRANSFORM_TOOLS_H
+#define GRAPHICS_TRANSFORM_TOOLS_H
-#include "engines/wintermute/math/rect32.h"
-#include "engines/wintermute/math/floatpoint.h"
-#include "engines/wintermute/graphics/transform_struct.h"
+#include "common/rect.h"
+#include "graphics/transform_struct.h"
-namespace Wintermute {
+namespace Graphics {
+
+ static const float kEpsilon = 0.00001; // arbitrarily taken number
+
+ struct FloatPoint {
+ float x;
+ float y;
+ FloatPoint() : x(0), y(0) {}
+ FloatPoint(float x1, float y1) : x(x1), y(y1) {}
+ FloatPoint(const Common::Point p) : x(p.x), y(p.y) {}
+ bool operator==(const FloatPoint &p) const { return fabs(x - p.x) < kEpsilon && fabs(y - p.y) < kEpsilon; }
+ bool operator!=(const FloatPoint &p) const { return fabs(x - p.x) > kEpsilon || fabs(y - p.y) > kEpsilon; }
+ FloatPoint operator+(const FloatPoint &delta) const { return FloatPoint (x + delta.x, y + delta.y); }
+ FloatPoint operator-(const FloatPoint &delta) const { return FloatPoint (x - delta.x, y - delta.y); }
+
+ FloatPoint& operator+=(const FloatPoint &delta) {
+ x += delta.x;
+ y += delta.y;
+ return *this;
+ }
+ FloatPoint& operator-=(const FloatPoint &delta) {
+ x -= delta.x;
+ y -= delta.y;
+ return *this;
+ }
+ };
class TransformTools {
public:
/**
* Basic transform (scale + rotate) for a single point
- */
- static FloatPoint transformPoint(FloatPoint point, const float rotate, const Point32 &zoom, const bool mirrorX = false, const bool mirrorY = false);
-
- /**
- * @param &point the point on which the transform is to be applied
+ * @param point the point on which the transform is to be applied
* @param rotate the angle in degrees
- * @param &zoom zoom x,y in percent
+ * @param zoom zoom x,y in percent
* @param mirrorX flip along the vertical axis?
* @param mirrorY flip along the horizontal axis?
+ */
+ static FloatPoint transformPoint(FloatPoint point, const float rotate, const Common::Point &zoom, const bool mirrorX = false, const bool mirrorY = false);
+
+ /**
* @return the smallest rect that can contain the transformed sprite
* and, as a side-effect, "newHotspot" will tell you where the hotspot will
* have ended up in the new rect, for centering.
*/
- static Rect32 newRect(const Rect32 &oldRect, const TransformStruct &transform, Point32 *newHotspot);
+ static Common::Rect newRect(const Common::Rect &oldRect, const TransformStruct &transform, Common::Point *newHotspot);
};
} // End of namespace Wintermute
diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/graphics/transparent_surface.cpp
index 5fe0d13766..f6e8cacb8b 100644
--- a/engines/wintermute/graphics/transparent_surface.cpp
+++ b/graphics/transparent_surface.cpp
@@ -34,259 +34,38 @@
#include "common/math.h"
#include "common/textconsole.h"
#include "graphics/primitives.h"
-#include "engines/wintermute/graphics/transparent_surface.h"
-#include "engines/wintermute/graphics/transform_tools.h"
+#include "graphics/transparent_surface.h"
+#include "graphics/transform_tools.h"
//#define ENABLE_BILINEAR
-namespace Wintermute {
+namespace Graphics {
-void doBlitOpaqueFast(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep);
-void doBlitBinaryFast(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep);
-
-// These gather together various blendPixel functions for use with templates.
-
-class BlenderAdditive {
-public:
- inline void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb);
- inline void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb, byte *ca, byte *cr, byte *cg, byte *cb);
- inline void blendPixel(byte *in, byte *out);
- inline void blendPixel(byte *in, byte *out, int colorMod);
-};
-
-class BlenderSubtractive {
-public:
- inline void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb);
- inline void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb, byte *ca, byte *cr, byte *cg, byte *cb);
- inline void blendPixel(byte *in, byte *out);
- inline void blendPixel(byte *in, byte *out, int colorMod);
-};
-
-class BlenderNormal {
-public:
- inline void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb);
- inline void blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb, byte *ca, byte *cr, byte *cg, byte *cb);
- inline void blendPixel(byte *in, byte *out);
- inline void blendPixel(byte *in, byte *out, int colorMod);
-};
-
-/**
- * Perform additive blending of a pixel, applying beforehand a given colormod.
- * @param ina, inr, ing, inb: the input pixel, split into its components.
- * @param *outa, *outr, *outg, *outb pointer to the output pixel.
- * @param *outa, *outr, *outg, *outb pointer to the colormod components.
- */
-void BlenderAdditive::blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb, byte *ca, byte *cr, byte *cg, byte *cb) {
- if (*ca != 255) {
- ina = (ina) * (*ca) >> 8;
- }
-
- if (ina == 0) {
- return;
- } else {
- if (*cb != 255) {
- *outb = MIN(*outb + ((inb * (*cb) * ina) >> 16), 255);
- } else {
- *outb = MIN(*outb + (inb * ina >> 8), 255);
- }
-
- if (*cg != 255) {
- *outg = MIN(*outg + ((ing * (*cg) * ina) >> 16), 255);
- } else {
- *outg = MIN(*outg + (ing * ina >> 8), 255);
- }
-
- if (*cr != 255) {
- *outr = MIN(*outr + ((inr * (*cr) * ina) >> 16), 255);
- } else {
- *outr = MIN(*outr + (inr * ina >> 8), 255);
- }
- }
-}
-
-/**
- * Perform subtractive blending of a pixel, applying beforehand a given colormod.
- * @param ina, inr, ing, inb: the input pixel, split into its components.
- * @param *outa, *outr, *outg, *outb pointer to the output pixel.
- * @param *outa, *outr, *outg, *outb pointer to the colormod components.
- */
-void BlenderSubtractive::blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb, byte *ca, byte *cr, byte *cg, byte *cb) {
- //if (*ca != 255) {
- // ina = ina * (*ca) >> 8;
- // }
-
- // As weird as it is, evidence suggests that alphamod is ignored when doing
- // subtractive...
-
- // TODO if ina == 255 fast version
-
- if (ina == 0) {
- return;
- } else {
- if (*cb != 255) {
- *outb = MAX(*outb - ((inb * (*cb) * (*outb) * ina) >> 24), 0);
- } else {
- *outb = MAX(*outb - (inb * (*outb) * ina >> 16), 0);
- }
-
- if (*cg != 255) {
- *outg = MAX(*outg - ((ing * (*cg) * (*outg) * ina) >> 24), 0);
- } else {
- *outg = MAX(*outg - (ing * (*outg) * ina >> 16), 0);
- }
-
- if (*cr != 255) {
- *outr = MAX(*outr - ((inr * (*cr) * (*outr) * ina) >> 24), 0);
- } else {
- *outr = MAX(*outr - (inr * (*outr) * ina >> 16), 0);
- }
- }
-}
-
-/**
- * Perform "regular" alphablending of a pixel, applying beforehand a given colormod.
- * @param ina, inr, ing, inb: the input pixel, split into its components.
- * @param *outa, *outr, *outg, *outb pointer to the output pixel.
- * @param *outa, *outr, *outg, *outb pointer to the colormod components.
- */
-
-void BlenderNormal::blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb, byte *ca, byte *cr, byte *cg, byte *cb) {
- if (*ca != 255) {
- ina = ina * (*ca) >> 8;
- }
-
- if (ina == 0) {
- return;
- } else if (ina == 255) {
- if (*cb != 255) {
- *outb = (inb * (*cb)) >> 8;
- } else {
- *outb = inb;
- }
-
- if (*cr != 255) {
- *outr = (inr * (*cr)) >> 8;
- } else {
- *outr = inr;
- }
-
- if (*cg != 255) {
- *outg = (ing * (*cg)) >> 8;
- } else {
- *outg = ing;
- }
-
- *outa = ina;
-
- return;
-
- } else {
-
- *outa = 255;
- *outb = (*outb * (255 - ina) >> 8);
- *outr = (*outr * (255 - ina) >> 8);
- *outg = (*outg * (255 - ina) >> 8);
-
- if (*cb == 0) {
- *outb = *outb;
- } else if (*cb != 255) {
- *outb = *outb + (inb * ina * (*cb) >> 16);
- } else {
- *outb = *outb + (inb * ina >> 8);
- }
-
- if (*cr == 0) {
- *outr = *outr;
- } else if (*cr != 255) {
- *outr = *outr + (inr * ina * (*cr) >> 16);
- } else {
- *outr = *outr + (inr * ina >> 8);
- }
-
- if (*cg == 0) {
- *outg = *outg;
- } else if (*cg != 255) {
- *outg = *outg + (ing * ina * (*cg) >> 16);
- } else {
- *outg = *outg + (ing * ina >> 8);
- }
-
- return;
- }
-}
-
-/**
- * Perform "regular" alphablending of a pixel.
- * @param ina, inr, ing, inb: the input pixel, split into its components.
- * @param *outa, *outr, *outg, *outb pointer to the output pixel.
- */
-
-void BlenderNormal::blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb) {
+static const int kAShift = 0;//img->format.aShift;
- if (ina == 0) {
- return;
- } else if (ina == 255) {
- *outb = inb;
- *outg = ing;
- *outr = inr;
- *outa = ina;
- return;
- } else {
- *outa = 255;
- *outb = ((inb * ina) + *outb * (255 - ina)) >> 8;
- *outg = ((ing * ina) + *outg * (255 - ina)) >> 8;
- *outr = ((inr * ina) + *outr * (255 - ina)) >> 8;
- }
-}
+static const int kBModShift = 0;//img->format.bShift;
+static const int kGModShift = 8;//img->format.gShift;
+static const int kRModShift = 16;//img->format.rShift;
+static const int kAModShift = 24;//img->format.aShift;
-/**
- * Perform subtractive blending of a pixel.
- * @param ina, inr, ing, inb: the input pixel, split into its components.
- * @param *outa, *outr, *outg, *outb pointer to the output pixel.
- */
-void BlenderSubtractive::blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb) {
-
- if (ina == 0) {
- return;
- } else if (ina == 255) {
- *outa = *outa;
- *outr = *outr - (inr * (*outr) >> 8);
- *outg = *outg - (ing * (*outg) >> 8);
- *outb = *outb - (inb * (*outb) >> 8);
- return;
- } else {
- *outa = *outa;
- *outb = MAX(*outb - ((inb * (*outb)) * ina >> 16), 0);
- *outg = MAX(*outg - ((ing * (*outg)) * ina >> 16), 0);
- *outr = MAX(*outr - ((inr * (*outr)) * ina >> 16), 0);
- return;
- }
-}
+#ifdef SCUMM_LITTLE_ENDIAN
+static const int kAIndex = 0;
+static const int kBIndex = 1;
+static const int kGIndex = 2;
+static const int kRIndex = 3;
-/**
- * Perform additive blending of a pixel.
- * @param ina, inr, ing, inb: the input pixel, split into its components.
- * @param *outa, *outr, *outg, *outb pointer to the output pixel.
- */
-void BlenderAdditive::blendPixel(byte ina, byte inr, byte ing, byte inb, byte *outa, byte *outr, byte *outg, byte *outb) {
-
- if (ina == 0) {
- return;
- } else if (ina == 255) {
- *outa = *outa;
- *outr = MIN(*outr + inr, 255);
- *outg = MIN(*outg + ing, 255);
- *outb = MIN(*outb + inb, 255);
- return;
- } else {
- *outa = *outa;
- *outb = MIN((inb * ina >> 8) + *outb, 255);
- *outg = MIN((ing * ina >> 8) + *outg, 255);
- *outr = MIN((inr * ina >> 8) + *outr, 255);
- return;
- }
-}
+#else
+static const int kAIndex = 3;
+static const int kBIndex = 2;
+static const int kGIndex = 1;
+static const int kRIndex = 0;
+#endif
+void doBlitOpaqueFast(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep);
+void doBlitBinaryFast(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep);
+void doBlitAlphaBlend(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep, uint32 color);
+void doBlitAdditiveBlend(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep, uint32 color);
+void doBlitSubtractiveBlend(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep, uint32 color);
TransparentSurface::TransparentSurface() : Surface(), _alphaMode(ALPHA_FULL) {}
@@ -318,7 +97,7 @@ void doBlitOpaqueFast(byte *ino, byte *outo, uint32 width, uint32 height, uint32
in = ino;
memcpy(out, in, width * 4);
for (uint32 j = 0; j < width; j++) {
- out[TransparentSurface::kAIndex] = 0xFF;
+ out[kAIndex] = 0xFF;
out += 4;
}
outo += pitch;
@@ -339,12 +118,11 @@ void doBlitBinaryFast(byte *ino, byte *outo, uint32 width, uint32 height, uint32
in = ino;
for (uint32 j = 0; j < width; j++) {
uint32 pix = *(uint32 *)in;
- int a = (pix >> TransparentSurface::kAShift) & 0xff;
+ int a = (pix >> kAShift) & 0xff;
- if (a == 0) { // Full transparency
- } else { // Full opacity (Any value not exactly 0 is Opaque here)
+ if (a != 0) { // Full opacity (Any value not exactly 0 is Opaque here)
*(uint32 *)out = pix;
- out[TransparentSurface::kAIndex] = 0xFF;
+ out[kAIndex] = 0xFF;
}
out += 4;
in += inStep;
@@ -355,9 +133,7 @@ void doBlitBinaryFast(byte *ino, byte *outo, uint32 width, uint32 height, uint32
}
/**
- * What we have here is a template method that calls blendPixel() from a different
- * class - the one we call it with - thus performing a different type of blending.
- *
+ * Optimized version of doBlit to be used with alpha blended blitting
* @param ino a pointer to the input surface
* @param outo a pointer to the output surface
* @param width width of the input surface
@@ -367,10 +143,65 @@ void doBlitBinaryFast(byte *ino, byte *outo, uint32 width, uint32 height, uint32
* @inoStep width in bytes of every row on the *input* surface / kind of like pitch
* @color colormod in 0xAARRGGBB format - 0xFFFFFFFF for no colormod
*/
+void doBlitAlphaBlend(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep, uint32 color) {
+ byte *in;
+ byte *out;
+
+ if (color == 0xffffffff) {
+
+ for (uint32 i = 0; i < height; i++) {
+ out = outo;
+ in = ino;
+ for (uint32 j = 0; j < width; j++) {
+
+ if (in[kAIndex] != 0) {
+ out[kAIndex] = 255;
+ out[kRIndex] = ((in[kRIndex] * in[kAIndex]) + out[kRIndex] * (255 - in[kAIndex])) >> 8;
+ out[kGIndex] = ((in[kGIndex] * in[kAIndex]) + out[kGIndex] * (255 - in[kAIndex])) >> 8;
+ out[kBIndex] = ((in[kBIndex] * in[kAIndex]) + out[kBIndex] * (255 - in[kAIndex])) >> 8;
+ }
+
+ in += inStep;
+ out += 4;
+ }
+ outo += pitch;
+ ino += inoStep;
+ }
+ } else {
+
+ byte ca = (color >> kAModShift) & 0xFF;
+ byte cr = (color >> kRModShift) & 0xFF;
+ byte cg = (color >> kGModShift) & 0xFF;
+ byte cb = (color >> kBModShift) & 0xFF;
+
+ for (uint32 i = 0; i < height; i++) {
+ out = outo;
+ in = ino;
+ for (uint32 j = 0; j < width; j++) {
+
+ uint32 ina = in[kAIndex] * ca >> 8;
+ out[kAIndex] = 255;
+ out[kBIndex] = (out[kBIndex] * (255 - ina) >> 8);
+ out[kGIndex] = (out[kGIndex] * (255 - ina) >> 8);
+ out[kRIndex] = (out[kRIndex] * (255 - ina) >> 8);
-template<class Blender>
-void doBlit(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep, uint32 color) {
- Blender b;
+ out[kBIndex] = out[kBIndex] + (in[kBIndex] * ina * cb >> 16);
+ out[kGIndex] = out[kGIndex] + (in[kGIndex] * ina * cg >> 16);
+ out[kRIndex] = out[kRIndex] + (in[kRIndex] * ina * cr >> 16);
+
+ in += inStep;
+ out += 4;
+ }
+ outo += pitch;
+ ino += inoStep;
+ }
+ }
+}
+
+/**
+ * Optimized version of doBlit to be used with additive blended blitting
+ */
+void doBlitAdditiveBlend(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep, uint32 color) {
byte *in;
byte *out;
@@ -381,16 +212,78 @@ void doBlit(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, in
in = ino;
for (uint32 j = 0; j < width; j++) {
- byte *outa = &out[TransparentSurface::kAIndex];
- byte *outr = &out[TransparentSurface::kRIndex];
- byte *outg = &out[TransparentSurface::kGIndex];
- byte *outb = &out[TransparentSurface::kBIndex];
+ if (in[kAIndex] != 0) {
+ out[kRIndex] = MIN((in[kRIndex] * in[kAIndex] >> 8) + out[kRIndex], 255);
+ out[kGIndex] = MIN((in[kGIndex] * in[kAIndex] >> 8) + out[kGIndex], 255);
+ out[kBIndex] = MIN((in[kBIndex] * in[kAIndex] >> 8) + out[kBIndex], 255);
+ }
+
+ in += inStep;
+ out += 4;
+ }
+ outo += pitch;
+ ino += inoStep;
+ }
+ } else {
+
+ byte ca = (color >> kAModShift) & 0xFF;
+ byte cr = (color >> kRModShift) & 0xFF;
+ byte cg = (color >> kGModShift) & 0xFF;
+ byte cb = (color >> kBModShift) & 0xFF;
+
+ for (uint32 i = 0; i < height; i++) {
+ out = outo;
+ in = ino;
+ for (uint32 j = 0; j < width; j++) {
+
+ uint32 ina = in[kAIndex] * ca >> 8;
+
+ if (cb != 255) {
+ out[kBIndex] = MIN<uint>(out[kBIndex] + ((in[kBIndex] * cb * ina) >> 16), 255u);
+ } else {
+ out[kBIndex] = MIN<uint>(out[kBIndex] + (in[kBIndex] * ina >> 8), 255u);
+ }
+
+ if (cg != 255) {
+ out[kGIndex] = MIN<uint>(out[kGIndex] + ((in[kGIndex] * cg * ina) >> 16), 255u);
+ } else {
+ out[kGIndex] = MIN<uint>(out[kGIndex] + (in[kGIndex] * ina >> 8), 255u);
+ }
+
+ if (cr != 255) {
+ out[kRIndex] = MIN<uint>(out[kRIndex] + ((in[kRIndex] * cr * ina) >> 16), 255u);
+ } else {
+ out[kRIndex] = MIN<uint>(out[kRIndex] + (in[kRIndex] * ina >> 8), 255u);
+ }
+
+ in += inStep;
+ out += 4;
+ }
+ outo += pitch;
+ ino += inoStep;
+ }
+ }
+}
+
+/**
+ * Optimized version of doBlit to be used with subtractive blended blitting
+ */
+void doBlitSubtractiveBlend(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep, uint32 color) {
+ byte *in;
+ byte *out;
+
+ if (color == 0xffffffff) {
- b.blendPixel(in[TransparentSurface::kAIndex],
- in[TransparentSurface::kRIndex],
- in[TransparentSurface::kGIndex],
- in[TransparentSurface::kBIndex],
- outa, outr, outg, outb);
+ for (uint32 i = 0; i < height; i++) {
+ out = outo;
+ in = ino;
+ for (uint32 j = 0; j < width; j++) {
+
+ if (in[kAIndex] != 0) {
+ out[kRIndex] = MAX(out[kRIndex] - ((in[kRIndex] * out[kRIndex]) * in[kAIndex] >> 16), 0);
+ out[kGIndex] = MAX(out[kGIndex] - ((in[kGIndex] * out[kGIndex]) * in[kAIndex] >> 16), 0);
+ out[kBIndex] = MAX(out[kBIndex] - ((in[kBIndex] * out[kBIndex]) * in[kAIndex] >> 16), 0);
+ }
in += inStep;
out += 4;
@@ -400,26 +293,34 @@ void doBlit(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, in
}
} else {
- byte ca = (color >> TransparentSurface::kAModShift) & 0xFF;
- byte cr = (color >> TransparentSurface::kRModShift) & 0xFF;
- byte cg = (color >> TransparentSurface::kGModShift) & 0xFF;
- byte cb = (color >> TransparentSurface::kBModShift) & 0xFF;
+ byte cr = (color >> kRModShift) & 0xFF;
+ byte cg = (color >> kGModShift) & 0xFF;
+ byte cb = (color >> kBModShift) & 0xFF;
for (uint32 i = 0; i < height; i++) {
out = outo;
in = ino;
for (uint32 j = 0; j < width; j++) {
- byte *outa = &out[TransparentSurface::kAIndex];
- byte *outr = &out[TransparentSurface::kRIndex];
- byte *outg = &out[TransparentSurface::kGIndex];
- byte *outb = &out[TransparentSurface::kBIndex];
+ out[kAIndex] = 255;
+ if (cb != 255) {
+ out[kBIndex] = MAX(out[kBIndex] - ((in[kBIndex] * cb * (out[kBIndex]) * in[kAIndex]) >> 24), 0);
+ } else {
+ out[kBIndex] = MAX(out[kBIndex] - (in[kBIndex] * (out[kBIndex]) * in[kAIndex] >> 16), 0);
+ }
+
+ if (cg != 255) {
+ out[kGIndex] = MAX(out[kGIndex] - ((in[kGIndex] * cg * (out[kGIndex]) * in[kAIndex]) >> 24), 0);
+ } else {
+ out[kGIndex] = MAX(out[kGIndex] - (in[kGIndex] * (out[kGIndex]) * in[kAIndex] >> 16), 0);
+ }
+
+ if (cr != 255) {
+ out[kRIndex] = MAX(out[kRIndex] - ((in[kRIndex] * cr * (out[kRIndex]) * in[kAIndex]) >> 24), 0);
+ } else {
+ out[kRIndex] = MAX(out[kRIndex] - (in[kRIndex] * (out[kRIndex]) * in[kAIndex] >> 16), 0);
+ }
- b.blendPixel(in[TransparentSurface::kAIndex],
- in[TransparentSurface::kRIndex],
- in[TransparentSurface::kGIndex],
- in[TransparentSurface::kBIndex],
- outa, outr, outg, outb, &ca, &cr, &cg, &cb);
in += inStep;
out += 4;
}
@@ -447,7 +348,7 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
TransparentSurface srcImage(*this, false);
// TODO: Is the data really in the screen format?
if (format.bytesPerPixel != 4) {
- warning("TransparentSurface can only blit 32 bpp images");
+ warning("TransparentSurface can only blit 32bpp images, but got %d", format.bytesPerPixel * 8);
return retSize;
}
@@ -521,12 +422,12 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
int inStep = 4;
int inoStep = img->pitch;
- if (flipping & TransparentSurface::FLIP_H) {
+ if (flipping & FLIP_H) {
inStep = -inStep;
xp = img->w - 1;
}
- if (flipping & TransparentSurface::FLIP_V) {
+ if (flipping & FLIP_V) {
inoStep = -inoStep;
yp = img->h - 1;
}
@@ -540,12 +441,12 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
doBlitBinaryFast(ino, outo, img->w, img->h, target.pitch, inStep, inoStep);
} else {
if (blendMode == BLEND_ADDITIVE) {
- doBlit<BlenderAdditive>(ino, outo, img->w, img->h, target.pitch, inStep, inoStep, color);
+ doBlitAdditiveBlend(ino, outo, img->w, img->h, target.pitch, inStep, inoStep, color);
} else if (blendMode == BLEND_SUBTRACTIVE) {
- doBlit<BlenderSubtractive>(ino, outo, img->w, img->h, target.pitch, inStep, inoStep, color);
+ doBlitSubtractiveBlend(ino, outo, img->w, img->h, target.pitch, inStep, inoStep, color);
} else {
assert(blendMode == BLEND_NORMAL);
- doBlit<BlenderNormal>(ino, outo, img->w, img->h, target.pitch, inStep, inoStep, color);
+ doBlitAlphaBlend(ino, outo, img->w, img->h, target.pitch, inStep, inoStep, color);
}
}
@@ -588,11 +489,11 @@ void TransparentSurface::applyColorKey(uint8 rKey, uint8 gKey, uint8 bKey, bool
}
}
-TransparentSurface::AlphaType TransparentSurface::getAlphaMode() const {
+AlphaType TransparentSurface::getAlphaMode() const {
return _alphaMode;
}
-void TransparentSurface::setAlphaMode(TransparentSurface::AlphaType mode) {
+void TransparentSurface::setAlphaMode(AlphaType mode) {
_alphaMode = mode;
}
@@ -649,9 +550,9 @@ TransparentSurface *TransparentSurface::rotoscale(const TransformStruct &transfo
assert(transform._angle != 0); // This would not be ideal; rotoscale() should never be called in conditional branches where angle = 0 anyway.
- Point32 newHotspot;
+ Common::Point newHotspot;
Common::Rect srcRect(0, 0, (int16)w, (int16)h);
- Rect32 rect = TransformTools::newRect(Rect32(srcRect), transform, &newHotspot);
+ Common::Rect rect = TransformTools::newRect(Common::Rect(srcRect), transform, &newHotspot);
Common::Rect dstRect(0, 0, (int16)(rect.right - rect.left), (int16)(rect.bottom - rect.top));
TransparentSurface *target = new TransparentSurface();
@@ -947,4 +848,4 @@ TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight)
}
-} // End of namespace Wintermute
+} // End of namespace Graphics
diff --git a/engines/wintermute/graphics/transparent_surface.h b/graphics/transparent_surface.h
index 4ad9bf07eb..efb28149a5 100644
--- a/engines/wintermute/graphics/transparent_surface.h
+++ b/graphics/transparent_surface.h
@@ -24,7 +24,7 @@
#define GRAPHICS_TRANSPARENTSURFACE_H
#include "graphics/surface.h"
-#include "engines/wintermute/graphics/transform_struct.h"
+#include "graphics/transform_struct.h"
/*
* This code is based on Broken Sword 2.5 engine
@@ -35,11 +35,38 @@
*
*/
-// TODO: Find a better solution for this.
-#define BS_RGB(R,G,B) (0xFF000000 | ((R) << 16) | ((G) << 8) | (B))
-#define BS_ARGB(A,R,G,B) (((A) << 24) | ((R) << 16) | ((G) << 8) | (B))
+#ifdef SCUMM_LITTLE_ENDIAN
+#define TS_RGB(R,G,B) ((0xff << 24) | ((R) << 16) | ((G) << 8) | (B))
+#define TS_ARGB(A,R,G,B) (((R) << 24) | ((G) << 16) | ((B) << 8) | (A))
+#else
+#define TS_RGB(R,G,B) (((R) << 24) | ((G) << 16) | (B << 8) | 0xff)
+#define TS_ARGB(A,R,G,B) (((R) << 24) | ((G) << 16) | ((B) << 8) | (A))
+#endif
+
+namespace Graphics {
+
+// Enums
+/**
+ @brief The possible flipping parameters for the blit method.
+ */
+enum FLIP_FLAGS {
+ /// The image will not be flipped.
+ FLIP_NONE = 0,
+ /// The image will be flipped at the horizontal axis.
+ FLIP_H = 1,
+ /// The image will be flipped at the vertical axis.
+ FLIP_V = 2,
+ /// The image will be flipped at the horizontal and vertical axis.
+ FLIP_HV = FLIP_H | FLIP_V,
+ /// The image will be flipped at the horizontal and vertical axis.
+ FLIP_VH = FLIP_H | FLIP_V
+};
-namespace Wintermute {
+enum AlphaType {
+ ALPHA_OPAQUE = 0,
+ ALPHA_BINARY = 1,
+ ALPHA_FULL = 2
+};
/**
* A transparent graphics surface, which implements alpha blitting.
@@ -51,53 +78,6 @@ struct TransparentSurface : public Graphics::Surface {
void setColorKey(char r, char g, char b);
void disableColorKey();
- // Enums
- /**
- @brief The possible flipping parameters for the blit methode.
- */
- enum FLIP_FLAGS {
- /// The image will not be flipped.
- FLIP_NONE = 0,
- /// The image will be flipped at the horizontal axis.
- FLIP_H = 1,
- /// The image will be flipped at the vertical axis.
- FLIP_V = 2,
- /// The image will be flipped at the horizontal and vertical axis.
- FLIP_HV = FLIP_H | FLIP_V,
- /// The image will be flipped at the horizontal and vertical axis.
- FLIP_VH = FLIP_H | FLIP_V
- };
-
- enum AlphaType {
- ALPHA_OPAQUE = 0,
- ALPHA_BINARY = 1,
- ALPHA_FULL = 2
- };
-
-#ifdef SCUMM_LITTLE_ENDIAN
- static const int kAIndex = 0;
- static const int kBIndex = 1;
- static const int kGIndex = 2;
- static const int kRIndex = 3;
-#else
- static const int kAIndex = 3;
- static const int kBIndex = 2;
- static const int kGIndex = 1;
- static const int kRIndex = 0;
-#endif
-
- static const int kBShift = 8;//img->format.bShift;
- static const int kGShift = 16;//img->format.gShift;
- static const int kRShift = 24;//img->format.rShift;
- static const int kAShift = 0;//img->format.aShift;
-
-
- static const int kBModShift = 0;//img->format.bShift;
- static const int kGModShift = 8;//img->format.gShift;
- static const int kRModShift = 16;//img->format.rShift;
- static const int kAModShift = 24;//img->format.aShift;
-
-
/**
@brief renders the surface to another surface
@param target a pointer to the target surface. In most cases this is the framebuffer.
@@ -106,15 +86,15 @@ struct TransparentSurface : public Graphics::Surface {
@param posY the position on the Y-axis in the target image in pixels where the image is supposed to be rendered.<br>
The default value is 0.
@param flipping how the the image should be flipped.<br>
- The default value is BS_Image::FLIP_NONE (no flipping)
+ The default value is Graphics::FLIP_NONE (no flipping)
@param pPartRect Pointer on Common::Rect which specifies the section to be rendered. If the whole image has to be rendered the Pointer is NULL.<br>
This referes to the unflipped and unscaled image.<br>
The default value is NULL.
@param color an ARGB color value, which determines the parameters for the color modulation und alpha blending.<br>
The alpha component of the color determines the alpha blending parameter (0 = no covering, 255 = full covering).<br>
The color components determines the color for color modulation.<br>
- The default value is BS_ARGB(255, 255, 255, 255) (full covering, no color modulation).
- The macros BS_RGB and BS_ARGB can be used for the creation of the color value.
+ The default value is TS_ARGB(255, 255, 255, 255) (full covering, no color modulation).
+ The macros TS_RGB and TS_ARGB can be used for the creation of the color value.
@param width the output width of the screen section.
The images will be scaled if the output width of the screen section differs from the image section.<br>
The value -1 determines that the image should not be scaled.<br>
@@ -128,7 +108,7 @@ struct TransparentSurface : public Graphics::Surface {
Common::Rect blit(Graphics::Surface &target, int posX = 0, int posY = 0,
int flipping = FLIP_NONE,
Common::Rect *pPartRect = nullptr,
- uint color = BS_ARGB(255, 255, 255, 255),
+ uint color = TS_ARGB(255, 255, 255, 255),
int width = -1, int height = -1,
TSpriteBlendMode blend = BLEND_NORMAL);
void applyColorKey(uint8 r, uint8 g, uint8 b, bool overwriteAlpha = false);
@@ -170,7 +150,7 @@ private:
}
};*/
-} // End of namespace Wintermute
+} // End of namespace Graphics
#endif
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 4dffb13e71..68be2e0b26 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -433,7 +433,7 @@ public:
* Interface for the ThemeParser class: Loads a font to use on the GUI from the given
* filename.
*
- * @param fextId Identifier name for the font.
+ * @param textId Identifier name for the font.
* @param file Filename of the non-scalable font version.
* @param scalableFile Filename of the scalable version. (Optional)
* @param pointsize Point size for the scalable font. (Optional)
diff --git a/gui/browser_osx.mm b/gui/browser_osx.mm
index 642718df94..0e80410032 100644
--- a/gui/browser_osx.mm
+++ b/gui/browser_osx.mm
@@ -127,6 +127,8 @@ int BrowserDialog::runModal() {
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel setCanChooseFiles:!_isDirBrowser];
[panel setCanChooseDirectories:_isDirBrowser];
+ if (_isDirBrowser)
+ [panel setTreatsFilePackagesAsDirectories:true];
[panel setTitle:(NSString *)_titleRef];
[panel setPrompt:(NSString *)_chooseRef];
diff --git a/gui/credits.h b/gui/credits.h
index d5c12515d3..e32a0705bf 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -88,6 +88,13 @@ static const char *credits[] = {
"C0""Arnaud Boutonn\351",
"C0""Paul Gilbert",
"",
+"C1""CGE2",
+"A0""Peter Bozso",
+"C0""Peter Bozs\363",
+"A0""Arnaud Boutonne",
+"C0""Arnaud Boutonn\351",
+"C0""Paul Gilbert",
+"",
"C1""Cine",
"C0""Vincent Hamm",
"C2""(retired)",
@@ -377,6 +384,7 @@ static const char *credits[] = {
"C1""SymbianOS",
"C0""Jurgen Braam",
"C0""Lars Persson",
+"C0""Fedor Strizhniou",
"",
"C1""Tizen / BADA",
"C0""Chris Warren-Smith",
@@ -487,6 +495,7 @@ static const char *credits[] = {
"",
"C1""BeOS",
"C0""Stefan Parviainen",
+"C2""(retired)",
"C0""Luc Schrijvers",
"",
"C1""Debian GNU/Linux",
@@ -497,6 +506,9 @@ static const char *credits[] = {
"C1""Fedora / RedHat",
"C0""Willem Jan Palenstijn",
"",
+"C1""Haiku",
+"C0""Luc Schrijvers",
+"",
"C1""Mac OS X",
"C0""Max Horn",
"C2""(retired)",
@@ -552,6 +564,9 @@ static const char *credits[] = {
"C1""Danish",
"C0""Steffen Nyeland",
"",
+"C1""Dutch",
+"C0""Ben Castricum",
+"",
"C1""Finnish",
"C0""Toni Saarela",
"",
diff --git a/gui/debugger.h b/gui/debugger.h
index 8c7481b61f..175eb33960 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -103,7 +103,7 @@ private:
* @param varname the identifier with which the user may access the variable
* @param variable pointer to the actual storage of the variable
* @param type the type of the variable (byte, int, bool, ...)
- * @paral arraySize for type DVAR_INTARRAY this specifies the size of the array
+ * @param arraySize for type DVAR_INTARRAY this specifies the size of the array
*/
void registerVar(const Common::String &varname, void *variable, VarType type, int arraySize);
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 80c3c2a552..9b6cf5a0b6 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -128,7 +128,7 @@ void GuiManager::initKeymap() {
act = new Action(guiMap, "REMP", _("Remap keys"));
act->addEvent(EVENT_KEYMAPPER_REMAP);
- act = new Action(guiMap, "FULS", _("Toggle FullScreen"));
+ act = new Action(guiMap, "FULS", _("Toggle fullscreen"));
act->addKeyEvent(KeyState(KEYCODE_RETURN, ASCII_RETURN, KBD_ALT));
mapper->addGlobalKeymap(guiMap);
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 9ac97a77d6..4496c11a3d 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -194,10 +194,10 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
// GUI: Label & edit widget for the game ID
if (g_system->getOverlayWidth() > 320)
- new StaticTextWidget(tab, "GameOptions_Game.Id", _("ID:"), _("Short game identifier used for referring to savegames and running the game from the command line"));
+ new StaticTextWidget(tab, "GameOptions_Game.Id", _("ID:"), _("Short game identifier used for referring to saved games and running the game from the command line"));
else
- new StaticTextWidget(tab, "GameOptions_Game.Id", _c("ID:", "lowres"), _("Short game identifier used for referring to savegames and running the game from the command line"));
- _domainWidget = new DomainEditTextWidget(tab, "GameOptions_Game.Domain", _domain, _("Short game identifier used for referring to savegames and running the game from the command line"));
+ new StaticTextWidget(tab, "GameOptions_Game.Id", _c("ID:", "lowres"), _("Short game identifier used for referring to saved games and running the game from the command line"));
+ _domainWidget = new DomainEditTextWidget(tab, "GameOptions_Game.Domain", _domain, _("Short game identifier used for referring to saved games and running the game from the command line"));
// GUI: Label & edit widget for the description
if (g_system->getOverlayWidth() > 320)
@@ -327,19 +327,19 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
// GUI: Button + Label for the additional path
if (g_system->getOverlayWidth() > 320)
- new ButtonWidget(tab, "GameOptions_Paths.Extrapath", _("Extra Path:"), _("Specifies path to additional data used the game"), kCmdExtraBrowser);
+ new ButtonWidget(tab, "GameOptions_Paths.Extrapath", _("Extra Path:"), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
else
- new ButtonWidget(tab, "GameOptions_Paths.Extrapath", _c("Extra Path:", "lowres"), _("Specifies path to additional data used the game"), kCmdExtraBrowser);
- _extraPathWidget = new StaticTextWidget(tab, "GameOptions_Paths.ExtrapathText", extraPath, _("Specifies path to additional data used the game"));
+ new ButtonWidget(tab, "GameOptions_Paths.Extrapath", _c("Extra Path:", "lowres"), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
+ _extraPathWidget = new StaticTextWidget(tab, "GameOptions_Paths.ExtrapathText", extraPath, _("Specifies path to additional data used by the game"));
_extraPathClearButton = addClearButton(tab, "GameOptions_Paths.ExtraPathClearButton", kCmdExtraPathClear);
// GUI: Button + Label for the save path
if (g_system->getOverlayWidth() > 320)
- new ButtonWidget(tab, "GameOptions_Paths.Savepath", _("Save Path:"), _("Specifies where your savegames are put"), kCmdSaveBrowser);
+ new ButtonWidget(tab, "GameOptions_Paths.Savepath", _("Save Path:"), _("Specifies where your saved games are put"), kCmdSaveBrowser);
else
- new ButtonWidget(tab, "GameOptions_Paths.Savepath", _c("Save Path:", "lowres"), _("Specifies where your savegames are put"), kCmdSaveBrowser);
- _savePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.SavepathText", savePath, _("Specifies where your savegames are put"));
+ new ButtonWidget(tab, "GameOptions_Paths.Savepath", _c("Save Path:", "lowres"), _("Specifies where your saved games are put"), kCmdSaveBrowser);
+ _savePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.SavepathText", savePath, _("Specifies where your saved games are put"));
_savePathClearButton = addClearButton(tab, "GameOptions_Paths.SavePathClearButton", kCmdSavePathClear);
@@ -630,7 +630,7 @@ LauncherDialog::LauncherDialog()
new ButtonWidget(this, "Launcher.StartButton", _("~S~tart"), _("Start selected game"), kStartCmd);
_loadButton =
- new ButtonWidget(this, "Launcher.LoadGameButton", _("~L~oad..."), _("Load savegame for selected game"), kLoadGameCmd);
+ new ButtonWidget(this, "Launcher.LoadGameButton", _("~L~oad..."), _("Load saved game for selected game"), kLoadGameCmd);
// Above the lowest button rows: two more buttons (directly below the list box)
if (g_system->getOverlayWidth() > 320) {
@@ -996,7 +996,7 @@ void LauncherDialog::loadGameButtonPressed(int item) {
#ifdef ENABLE_EVENTRECORDER
void LauncherDialog::recordGame(int item) {
RecorderDialog recorderDialog;
- MessageDialog alert(_("Do you want to load savegame?"),
+ MessageDialog alert(_("Do you want to load saved game?"),
_("Yes"), _("No"));
switch(recorderDialog.runModal(_domains[item])) {
case RecorderDialog::kRecordDialogClose:
diff --git a/gui/options.cpp b/gui/options.cpp
index 3308cdead6..726b89d437 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -84,7 +84,7 @@ enum {
static const char *savePeriodLabels[] = { _s("Never"), _s("every 5 mins"), _s("every 10 mins"), _s("every 15 mins"), _s("every 30 mins"), 0 };
static const int savePeriodValues[] = { 0, 5 * 60, 10 * 60, 15 * 60, 30 * 60, -1 };
-static const char *outputRateLabels[] = { _s("<default>"), _s("8 kHz"), _s("11kHz"), _s("22 kHz"), _s("44 kHz"), _s("48 kHz"), 0 };
+static const char *outputRateLabels[] = { _s("<default>"), _s("8 kHz"), _s("11 kHz"), _s("22 kHz"), _s("44 kHz"), _s("48 kHz"), 0 };
static const int outputRateValues[] = { 0, 8000, 11025, 22050, 44100, 48000, -1 };
OptionsDialog::OptionsDialog(const Common::String &domain, int x, int y, int w, int h)
@@ -853,10 +853,10 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
// SoundFont
if (g_system->getOverlayWidth() > 320)
- _soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", _("SoundFont:"), _("SoundFont is supported by some audio cards, Fluidsynth and Timidity"), kChooseSoundFontCmd);
+ _soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", _("SoundFont:"), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
else
- _soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", _c("SoundFont:", "lowres"), _("SoundFont is supported by some audio cards, Fluidsynth and Timidity"), kChooseSoundFontCmd);
- _soundFont = new StaticTextWidget(boss, prefix + "mcFontPath", _c("None", "soundfont"), _("SoundFont is supported by some audio cards, Fluidsynth and Timidity"));
+ _soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", _c("SoundFont:", "lowres"), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
+ _soundFont = new StaticTextWidget(boss, prefix + "mcFontPath", _c("None", "soundfont"), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"));
_soundFontClearButton = addClearButton(boss, prefix + "mcFontClearButton", kClearSoundFontCmd);
@@ -1131,10 +1131,10 @@ GlobalOptionsDialog::GlobalOptionsDialog()
// Save game path
if (g_system->getOverlayWidth() > 320)
- new ButtonWidget(tab, "GlobalOptions_Paths.SaveButton", _("Save Path:"), _("Specifies where your savegames are put"), kChooseSaveDirCmd);
+ new ButtonWidget(tab, "GlobalOptions_Paths.SaveButton", _("Save Path:"), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
else
- new ButtonWidget(tab, "GlobalOptions_Paths.SaveButton", _c("Save Path:", "lowres"), _("Specifies where your savegames are put"), kChooseSaveDirCmd);
- _savePath = new StaticTextWidget(tab, "GlobalOptions_Paths.SavePath", "/foo/bar", _("Specifies where your savegames are put"));
+ new ButtonWidget(tab, "GlobalOptions_Paths.SaveButton", _c("Save Path:", "lowres"), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
+ _savePath = new StaticTextWidget(tab, "GlobalOptions_Paths.SavePath", "/foo/bar", _("Specifies where your saved games are put"));
_savePathClearButton = addClearButton(tab, "GlobalOptions_Paths.SavePathClearButton", kSavePathClearCmd);
@@ -1376,7 +1376,7 @@ void GlobalOptionsDialog::close() {
void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
switch (cmd) {
case kChooseSaveDirCmd: {
- BrowserDialog browser(_("Select directory for savegames"), true);
+ BrowserDialog browser(_("Select directory for saved games"), true);
if (browser.runModal() > 0) {
// User made his choice...
Common::FSNode dir(browser.getResult());
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index f6eee3af50..339ec95c50 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -92,7 +92,7 @@ void SaveLoadChooserDialog::open() {
Dialog::open();
// So that quitting ScummVM will not cause the dialog result to say a
- // savegame was selected.
+ // saved game was selected.
setResult(-1);
}
@@ -272,7 +272,7 @@ void SaveLoadChooserSimple::handleCommand(CommandSender *sender, uint32 cmd, uin
break;
case kDelCmd:
if (selItem >= 0 && _delSupport) {
- MessageDialog alert(_("Do you really want to delete this savegame?"),
+ MessageDialog alert(_("Do you really want to delete this saved game?"),
_("Delete"), _("Cancel"));
if (alert.runModal() == kMessageOK) {
_metaEngine->removeSaveState(_target.c_str(), _saveList[selItem].getSaveSlot());
@@ -488,7 +488,7 @@ void SaveLoadChooserSimple::updateSaveList() {
}
}
- // Show "Untitled savestate" for empty/whitespace savegame descriptions
+ // Show "Untitled savestate" for empty/whitespace saved game descriptions
Common::String description = x->getDescription();
Common::String trimmedDescription = description;
trimmedDescription.trim();
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index e881c2d4eb..aa2a24bf00 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -1526,7 +1526,7 @@
"height='Globals.Line.Height' "
"/>"
"</layout>"
-"<layout type='horizontal' padding='0,0,0,16' spacing='16'>"
+"<layout type='horizontal' padding='0,0,0,6' spacing='16'>"
"<widget name='List' />"
"<widget name='Thumbnail' "
"width='180' "
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 7115849aa0..1b555a6c27 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 5fd2d6f835..cf8268696d 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -976,7 +976,7 @@
height = 'Globals.Line.Height'
/>
</layout>
- <layout type = 'horizontal' padding = '0, 0, 0, 16' spacing = '16'>
+ <layout type = 'horizontal' padding = '0, 0, 0, 6' spacing = '16'>
<widget name = 'List' />
<widget name = 'Thumbnail'
width = '180'
diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat
index 1a7b49852d..90eac48c84 100644
--- a/gui/themes/translations.dat
+++ b/gui/themes/translations.dat
Binary files differ
diff --git a/image/codecs/cinepak.cpp b/image/codecs/cinepak.cpp
index 8d5dbceb4a..8464aa3889 100644
--- a/image/codecs/cinepak.cpp
+++ b/image/codecs/cinepak.cpp
@@ -52,11 +52,16 @@ CinepakDecoder::CinepakDecoder(int bitsPerPixel) : Codec() {
_curFrame.strips = NULL;
_y = 0;
- if (bitsPerPixel == 8)
+ if (bitsPerPixel == 8) {
_pixelFormat = Graphics::PixelFormat::createFormatCLUT8();
- else
+ } else {
_pixelFormat = g_system->getScreenFormat();
+ // Default to a 32bpp format, if in 8bpp mode
+ if (_pixelFormat.bytesPerPixel == 1)
+ _pixelFormat = Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0);
+ }
+
// Create a lookup for the clip function
// This dramatically improves the performance of the color conversion
_clipTableBuf = new byte[1024];
diff --git a/image/tga.cpp b/image/tga.cpp
index e251f64677..f22cfcb1ad 100644
--- a/image/tga.cpp
+++ b/image/tga.cpp
@@ -159,7 +159,7 @@ bool TGADecoder::readHeader(Common::SeekableReadStream &tga, byte &imageType, by
warning("Unsupported pixel depth: %d, %d", imageType, pixelDepth);
return false;
}
- } else if (imageType == TYPE_BW || TYPE_RLE_BW) {
+ } else if (imageType == TYPE_BW || imageType == TYPE_RLE_BW) {
if (pixelDepth == 8) {
_format = Graphics::PixelFormat(4, 8, 8, 8, 0, 16, 8, 0, 0);
} else {
diff --git a/po/be_BY.po b/po/be_BY.po
index 692985edde..a0ae61c9c7 100644
--- a/po/be_BY.po
+++ b/po/be_BY.po
@@ -1,14 +1,14 @@
# Belarusian translation for ScummVM.
# Copyright (C) 2010-2014 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
-# Ivan Lukyanov <greencis@mail.ru>, 2013.
+# Ivan Lukyanov <greencis@mail.ru>, 2013-2014.
#
msgid ""
msgstr ""
-"Project-Id-Version: ScummVM 1.6.0git\n"
+"Project-Id-Version: ScummVM 1.7.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
-"PO-Revision-Date: 2013-04-28 18:53+0300\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-07-02 17:22+0300\n"
"Last-Translator: Ivan Lukyanov <greencis@mail.ru>\n"
"Language-Team: Ivan Lukyanov <greencis@mail.ru>\n"
"Language: Belarusian\n"
@@ -38,7 +38,7 @@ msgstr "Паказваць схаваныя файлы"
#: gui/browser.cpp:68
msgid "Show files marked with the hidden attribute"
-msgstr "Паказваць файлы са схаваным атрыбутам"
+msgstr "Паказваць файлы з атрыбутам \"схаваць\""
#: gui/browser.cpp:72
msgid "Go up"
@@ -89,8 +89,8 @@ msgstr "Паказаць клавіятуру"
msgid "Remap keys"
msgstr "Перапрызначыць клавішы"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Пераключэнне на ўвесь экран"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -109,7 +109,7 @@ msgstr "Прызначыць"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -151,7 +151,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Кароткі ідэнтыфікатар, выкарыстоўваны для імёнаў захаванняў гульняў і для "
@@ -184,7 +184,8 @@ msgid ""
"Language of the game. This will not turn your Spanish game version into "
"English"
msgstr ""
-"Мова гульні. Змена гэтай налады не ператворыць ангельскую гульню ў рускую"
+"Мова гульні. Змена гэтай налады не ператворыць рускую версію гульні ў "
+"беларускую"
#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87
#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210
@@ -306,7 +307,7 @@ msgid "Extra Path:"
msgstr "Дад. шлях:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Паказвае шлях да дадатковых файлаў, дадзеных для гульні"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -320,7 +321,7 @@ msgstr "Захаванні гульняў:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Паказвае шлях да захаванняў гульні"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -356,7 +357,7 @@ msgstr "Абярыце дырэкторыю з файламі гульні"
msgid "Select additional game directory"
msgstr "Абярыце дадатковую дырэкторыю гульні"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Абярыце дырэкторыю для захаванняў"
@@ -401,7 +402,7 @@ msgid "~L~oad..."
msgstr "~З~агрузіць..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Загрузіць захаванне для абранай гульні"
#: gui/launcher.cpp:638
@@ -426,7 +427,7 @@ msgstr "В~ы~даліць гульню"
#: gui/launcher.cpp:642 gui/launcher.cpp:649
msgid "Remove game from the list. The game data files stay intact"
-msgstr "Выдаліць гульню са спісу. Не выдаляе гульню з жорсткага дыска"
+msgstr "Выдаліць гульню са спісу. Не выдаляе гульню з носьбіта"
#: gui/launcher.cpp:645
msgctxt "lowres"
@@ -509,9 +510,8 @@ msgid "Do you really want to remove this game configuration?"
msgstr "Вы сапраўды жадаеце выдаліць налады для гэтай гульні?"
#: gui/launcher.cpp:999
-#, fuzzy
-msgid "Do you want to load savegame?"
-msgstr "Вы жадаеце загрузіць або захаваць гульню?"
+msgid "Do you want to load saved game?"
+msgstr "Вы жадаеце загрузіць гульню?"
#: gui/launcher.cpp:1048
msgid "This game does not support loading games from the launcher."
@@ -523,7 +523,7 @@ msgstr "ScummVM не змог знайсці рухавічок для запуску абранай гульні!"
#: gui/massadd.cpp:79 gui/massadd.cpp:82
msgid "... progress ..."
-msgstr "...шукаю..."
+msgstr "... шукаю ..."
#: gui/massadd.cpp:259
msgid "Scan complete!"
@@ -569,7 +569,7 @@ msgid "8 kHz"
msgstr "8 кГц"
#: gui/options.cpp:87
-msgid "11kHz"
+msgid "11 kHz"
msgstr "11 кГц"
#: gui/options.cpp:87
@@ -629,11 +629,11 @@ msgstr "Карэкцыя суадносін бакоў"
#: gui/options.cpp:763
msgid "Correct aspect ratio for 320x200 games"
-msgstr "Карэктаваць суадносіны бакоў для гульняў з рэзалюцыяй 320x200"
+msgstr "Карэктаваць суадносіны бакоў для гульняў з адрозненнем 320x200"
#: gui/options.cpp:771
msgid "Preferred Device:"
-msgstr "Упадабанае:"
+msgstr "Упадабаная прылада:"
#: gui/options.cpp:771
msgid "Music Device:"
@@ -650,7 +650,7 @@ msgstr "Зазначае выходную гукавую прыладу ці эмулятар гукавой карты"
#: gui/options.cpp:773
msgctxt "lowres"
msgid "Preferred Dev.:"
-msgstr "Упадабанае:"
+msgstr "Упадабаная:"
#: gui/options.cpp:773
msgctxt "lowres"
@@ -698,9 +698,9 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr ""
-"SoundFont'ы падтрымліваюцца некаторымі гукавымі картамі, Fluidsynth ды "
+"SoundFont'ы падтрымліваюцца некаторымі гукавымі картамі, FluidSynth ды "
"Timidity"
#: gui/options.cpp:858
@@ -749,18 +749,19 @@ msgstr ""
#: gui/options.cpp:888
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
-msgstr "Сапраўдны Roland MT-32 (без GM)"
+msgstr "Сапраўдны Roland MT-32 (без эмуляцыі GM)"
#: gui/options.cpp:891
-#, fuzzy
msgid "Roland GS Device (enable MT-32 mappings)"
-msgstr "Рэжым Roland GS (забараніць раскладку GM)"
+msgstr "Рэжым Roland GS (дазволіць мапінг MT-32)"
#: gui/options.cpp:891
msgid ""
"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
"GS device"
msgstr ""
+"Адзначце, калі жадаеце дазволіць мапінг для эмуляцыі MT-32 на прыладзе "
+"Rolans GS"
#: gui/options.cpp:900
msgid "Don't use Roland MT-32 music"
@@ -914,10 +915,6 @@ msgstr "Мова графічнага інтэрфейсу ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Вы павінны перазапусціць ScummVM, каб ужыць змены."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Абярыце дырэкторыю для захаванняў"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Не магу пісаць у абраную дырэкторыю. Калі ласка, азначце іншую."
@@ -967,7 +964,7 @@ msgid "Delete"
msgstr "Выдаліць"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Вы сапраўды жадаеце выдаліць гэта захаванне?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1025,23 +1022,20 @@ msgid "Disabled GFX"
msgstr "Без графікі"
#: gui/ThemeEngine.cpp:348
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Стандартны растарызатар (16bpp)"
+msgstr "Стандартны растарызатар"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Стандартны"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "Растарызатар са згладжваннем (16bpp)"
+msgstr "Растарызатар са згладжваннем"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased"
-msgstr "Растарызатар са згладжваннем (16bpp)"
+msgstr "Са згладжваннем"
#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
msgid "Clear value"
@@ -1053,7 +1047,7 @@ msgstr "Рэверберацыя"
#: gui/fluidsynth-dialog.cpp:70 gui/fluidsynth-dialog.cpp:102
msgid "Active"
-msgstr "(Актыўная)"
+msgstr "Актыўна"
#: gui/fluidsynth-dialog.cpp:72
msgid "Room:"
@@ -1061,11 +1055,11 @@ msgstr "Пакой:"
#: gui/fluidsynth-dialog.cpp:79
msgid "Damp:"
-msgstr "Дэмпфаванне:"
+msgstr "Вільготнасць:"
#: gui/fluidsynth-dialog.cpp:86
msgid "Width:"
-msgstr "Даўжыня:"
+msgstr "Шырыня:"
#: gui/fluidsynth-dialog.cpp:93 gui/fluidsynth-dialog.cpp:111
msgid "Level:"
@@ -1093,11 +1087,11 @@ msgstr "Тып:"
#: gui/fluidsynth-dialog.cpp:135
msgid "Sine"
-msgstr "Сінус"
+msgstr "Сінусоіда"
#: gui/fluidsynth-dialog.cpp:136
msgid "Triangle"
-msgstr "Трохкутнік"
+msgstr "Трохкутная"
#: gui/fluidsynth-dialog.cpp:140
msgid "Interpolation:"
@@ -1231,7 +1225,7 @@ msgstr "Невядомая памылка"
#: engines/advancedDetector.cpp:317
#, c-format
msgid "The game in '%s' seems to be unknown."
-msgstr "Здаецца, што гульня '%s' яшчэ невядома."
+msgstr "Здаецца, што гульня '%s' яшчэ невядомая."
#: engines/advancedDetector.cpp:318
msgid "Please, report the following data to the ScummVM team along with name"
@@ -1264,16 +1258,16 @@ msgstr "~Д~апамога"
#: engines/dialogs.cpp:102
msgid "~A~bout"
-msgstr "~П~ра праграму"
+msgstr "П~р~а праграму"
#: engines/dialogs.cpp:105 engines/dialogs.cpp:181
msgid "~R~eturn to Launcher"
-msgstr "~Г~алоўнае меню"
+msgstr "Г~а~лоўнае меню"
#: engines/dialogs.cpp:107 engines/dialogs.cpp:183
msgctxt "lowres"
msgid "~R~eturn to Launcher"
-msgstr "~Г~алоўнае меню"
+msgstr "Г~а~лоўнае меню"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
@@ -1300,9 +1294,9 @@ msgid ""
"the README for basic information, and for instructions on how to obtain "
"further assistance."
msgstr ""
-"Прабачце, але гэты рухавічок пакуль не падае дапамогі ў гульні. Калі ласка, "
-"звярніцеся да файла README за базавай інфармацыяй, а таксама інструкцыямі "
-"пра тое, як атрымаць далейшую дапамогу."
+"Прабачце, але гэты рухавічок пакуль не падае дапамогі ўнутры гульні. Калі "
+"ласка, звярніцеся да файла README за базавай інфармацыяй, а таксама "
+"інструкцыямі пра тое, як атрымаць далейшую дапамогу."
#: engines/dialogs.cpp:234 engines/pegasus/pegasus.cpp:393
#, c-format
@@ -1369,7 +1363,7 @@ msgstr ""
"Дыск гэтай гульні ўтрымоўвае гукавыя дарожкі. Іх\n"
"неабходна перапісаць з дыска з дапамогай\n"
"адпаведнай праграмы для капіявання\n"
-"аўдыёдыскаў, і толькі пасля гэтага ў гульні\n"
+"аўдыё дыскаў, і толькі пасля гэтага ў гульні\n"
"з'явіцца музыка. Падрабязнасці можна знайсці ў\n"
"файле README."
@@ -1513,7 +1507,7 @@ msgstr "Windows MIDI"
#: backends/platform/ds/arm9/source/dsoptions.cpp:56
#: engines/scumm/dialogs.cpp:291
msgid "~C~lose"
-msgstr "~З~акрыць"
+msgstr "~З~ачыніць"
#: backends/platform/ds/arm9/source/dsoptions.cpp:57
msgid "ScummVM Main Menu"
@@ -1521,11 +1515,11 @@ msgstr "Галоўнае меню ScummVM"
#: backends/platform/ds/arm9/source/dsoptions.cpp:63
msgid "~L~eft handed mode"
-msgstr "Леварукі рэжым"
+msgstr "~Л~еварукі рэжым"
#: backends/platform/ds/arm9/source/dsoptions.cpp:64
msgid "~I~ndy fight controls"
-msgstr "Кіраванне баямі ў Indy"
+msgstr "~К~іраванне баямі ў Indy"
#: backends/platform/ds/arm9/source/dsoptions.cpp:65
msgid "Show mouse cursor"
@@ -1645,7 +1639,7 @@ msgstr "Акно"
#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
-msgstr "Прыбраць у Dock"
+msgstr "Згарнуць"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:46
msgid "Normal (no scaling)"
@@ -1673,13 +1667,12 @@ msgid "Windowed mode"
msgstr "Аконны рэжым"
#: backends/graphics/opengl/opengl-graphics.cpp:118
-#, fuzzy
msgid "OpenGL"
-msgstr "Адкрыць"
+msgstr "OpenGL"
#: backends/graphics/opengl/opengl-graphics.cpp:119
msgid "OpenGL (No filtering)"
-msgstr ""
+msgstr "OpenGL (без фільтраў)"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -2010,37 +2003,37 @@ msgstr "Галоўнае меню"
msgid "Do you really want to quit?"
msgstr "Вы сапраўды жадаеце выйсці?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Максімальная гучнасць"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Павелічэнне гучнасці"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Мінімальная гучнасць"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Памяншэнне гучнасці"
@@ -2076,26 +2069,26 @@ msgstr "Паказаць клавіятуру"
msgid "Control Mouse"
msgstr "Кіраванне мышшу"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Пстрычкі ўключаны"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Пстрычкі выключаны"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Выкарыстоўваць арыгінальныя экраны запісу/чытанні гульні"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
-"Выкарыстоўваць арыгінальныя экраны запісу і захаванні гульні замест "
+"Выкарыстоўваць арыгінальныя экраны запісу і захавання гульні замест "
"зробленых у ScummVM"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
@@ -2110,7 +2103,7 @@ msgstr "Узнавіць гульню:"
msgid "Restore"
msgstr "Узнавіць"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2121,7 +2114,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2132,7 +2125,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2192,7 +2185,7 @@ msgstr "Хуткі рэжым відэа"
#: engines/groovie/detection.cpp:313
msgid "Play movies at an increased speed"
-msgstr "Прайграваць відэа на павялічанай хуткасці"
+msgstr "Прайгравае відэа на павялічанай хуткасці"
#: engines/groovie/script.cpp:399
msgid "Failed to save game"
@@ -2315,51 +2308,51 @@ msgstr ""
"Здаецца, вы спрабуеце выкарыстоўваць прыладу\n"
"General MIDI, але гэтая гульня падтрымлівае толькі\n"
"Roland MT32 MIDI. Мы паспрабуем падабраць General\n"
-"MIDI прылады, падобныя на Roland MT32, але\n"
+"MIDI прылады, падобныя да Roland MT32, але\n"
"можа так атрымацца, што некаторыя трэкі будуць\n"
-"сыграны няправільна."
+"сыграныя няправільна."
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
-msgstr "Рэжым хуткага пераходу актываваны"
+msgstr "~Р~эжым хуткага пераходу актываваны"
#: engines/mohawk/dialogs.cpp:93
msgid "~T~ransitions Enabled"
-msgstr "Пераходы актываваны"
+msgstr "~П~ераходы актываваны"
#. I18N: Drop book page
#: engines/mohawk/dialogs.cpp:95
msgid "~D~rop Page"
-msgstr "Выкінуць старонку"
+msgstr "~В~ыкінуць старонку"
#: engines/mohawk/dialogs.cpp:99
msgid "~S~how Map"
-msgstr "Показать карту"
+msgstr "П~а~казаць карту"
#: engines/mohawk/dialogs.cpp:105
msgid "~M~ain Menu"
-msgstr "Галоўнае меню"
+msgstr "~Г~алоўнае меню"
#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
-msgstr "Эфекты вады ўключаны"
+msgstr "~Э~фекты вады ўключаны"
#: engines/neverhood/detection.cpp:167
msgid "Skip the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Прапусціць сцэны з Галерэі Гісторыі"
#: engines/neverhood/detection.cpp:168
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Дазваляе гульцу прапусціць усе сцэны ў Галерэі Гісторыі"
#: engines/neverhood/detection.cpp:174
msgid "Scale the making of videos to full screen"
-msgstr ""
+msgstr "Расцягнуць на ўвесь экран відэа пра стварэнне гульні"
#: engines/neverhood/detection.cpp:175
msgid "Scale the making of videos, so that they use the whole screen"
-msgstr ""
+msgstr "Расцягвае відэа пра стварэнне гульні так, што яно займае ўвесь экран"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2432,24 +2425,20 @@ msgstr "Паказаць/схаваць біячып"
#: engines/pegasus/pegasus.cpp:2513
msgid "Action/Select"
-msgstr "Дзеянне/Абраць"
+msgstr "Дзеянне/Выбар"
#: engines/pegasus/pegasus.cpp:2514
msgid "Toggle Center Data Display"
-msgstr "Пераключыць"
+msgstr "Уключыць паказ дадзеных у цэнтры экрана"
#: engines/pegasus/pegasus.cpp:2515
msgid "Display/Hide Info Screen"
-msgstr "Паказаць/схаваць інфармацыю"
+msgstr "Паказаць/схаваць інфаэкран"
#: engines/pegasus/pegasus.cpp:2516
msgid "Display/Hide Pause Menu"
msgstr "Паказаць/схаваць меню паўзы"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA без растру"
@@ -2592,36 +2581,36 @@ msgstr "~П~апяр"
msgid "~N~ext"
msgstr "~Н~аст"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Толькі агучка"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Агучка і субтытры"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Толькі субтытры"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Агучка і тэкст"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Абярыце ўзровень складанасці."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "За дапамогай звярніцеся да інструкцыі Loom(TM)."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Практыкант"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Эксперт"
@@ -2679,10 +2668,6 @@ msgstr "Захаваць гульню 1-10"
msgid "Enter"
msgstr "Увод"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Пераключыць на ўвесь экран"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Гучнасць музыкі павялічыць / паменшыць"
@@ -2787,7 +2772,7 @@ msgstr "Даць"
#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:190
#: engines/scumm/help.cpp:208
msgid "Open"
-msgstr "Адкрыць"
+msgstr "Адчыніць"
#: engines/scumm/help.cpp:126
msgid "Go to"
@@ -2839,7 +2824,7 @@ msgstr "Што такое"
#: engines/scumm/help.cpp:146
msgid "Unlock"
-msgstr "Адкрыць"
+msgstr "Адчыніць"
#: engines/scumm/help.cpp:149
msgid "Put on"
@@ -3138,7 +3123,7 @@ msgstr "Ляцець направа"
msgid "Fly to lower right"
msgstr "Ляцець направа-ўніз"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3147,7 +3132,7 @@ msgstr ""
"Рэжым \"роднага\" MIDI патрабуе абнаўленне Roland Upgrade ад\n"
"LucasArts, але не хапае %s. Пераключаюся на AdLib."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3187,16 +3172,16 @@ 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 support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
"Знойдзены застаўкі ў фармаце DXA, але ScummVM быў сабраны без падтрымкі zlib"
-#: engines/sword1/animation.cpp:561
-#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#: 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 ""
-"Знойдзены застаўкі ў фармаце PSX, але ScummVM быў сабраны без падтрымкі RGB "
-"колераў"
+"Знойдзены застаўкі ў фармаце MPEG-2, але ScummVM быў сабраны без падтрымкі "
+"MPEG-2"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3248,13 +3233,6 @@ msgstr ""
"Знойдзены застаўкі ў фармаце PSX, але ScummVM быў сабраны без падтрымкі RGB "
"колераў"
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-"Знойдзены застаўкі ў фармаце DXA, але ScummVM быў сабраны без падтрымкі zlib"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr "Паказваць назвы аб'ектаў"
@@ -3277,6 +3255,11 @@ msgstr ""
"Файл teenagent.dat зжаты, але zlib не ўключана ў гэту праграму. Калі ласка, "
"распакуйце яго"
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr ""
+#~ "Знойдзены застаўкі ў фармаце MPEG-2, але ScummVM быў сабраны без "
+#~ "падтрымкі MPEG-2"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Шмат гульняў..."
diff --git a/po/ca_ES.po b/po/ca_ES.po
index 498ad386b7..c80564a6c3 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
"PO-Revision-Date: 2013-05-05 14:16+0100\n"
"Last-Translator: Jordi Vilalta Prat <jvprat@jvprat.com>\n"
"Language-Team: Catalan <scummvm-devel@lists.sf.net>\n"
@@ -86,8 +86,8 @@ msgstr "Mostra el teclat"
msgid "Remap keys"
msgstr "Assigna les tecles"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Commuta la pantalla completa"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -106,7 +106,7 @@ msgstr "Assigna"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -148,7 +148,7 @@ msgstr "Identificador:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Identificador de joc curt utilitzat per referir-se a les partides i per "
@@ -304,7 +304,7 @@ msgid "Extra Path:"
msgstr "Camэ extra:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Especifica el camэ de dades addicionals utilitzades pel joc"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -318,7 +318,7 @@ msgstr "Camэ de partides:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Especifica on es desaran les partides"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -354,7 +354,7 @@ msgstr "Seleccioneu el directori amb les dades del joc"
msgid "Select additional game directory"
msgstr "Seleccioneu el directori addicional del joc"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Seleccioneu el directori de les partides desades"
@@ -400,7 +400,7 @@ msgid "~L~oad..."
msgstr "~C~arrega..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Carrega una partida pel joc seleccionat"
#: gui/launcher.cpp:638
@@ -511,7 +511,7 @@ msgstr "Realment voleu suprimir la configuraciѓ d'aquest joc?"
#: gui/launcher.cpp:999
#, fuzzy
-msgid "Do you want to load savegame?"
+msgid "Do you want to load saved game?"
msgstr "Voleu carregar o desar el joc?"
#: gui/launcher.cpp:1048
@@ -572,8 +572,8 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
-msgstr "11kHz"
+msgid "11 kHz"
+msgstr "11 kHz"
#: gui/options.cpp:87
msgid "22 kHz"
@@ -702,8 +702,8 @@ msgid "SoundFont:"
msgstr "Fitxer SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
-msgstr "Algunes targes de so, Fluidsynth i Timidity suporten SoundFont"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
+msgstr "Algunes targes de so, FluidSynth i Timidity suporten SoundFont"
#: gui/options.cpp:858
msgctxt "lowres"
@@ -916,10 +916,6 @@ msgstr "Idioma de la interfэcie d'usuari de ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Heu de reiniciar ScummVM perquш tots els canvis tinguin efecte."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Seleccioneu el directori de les partides desades"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
@@ -971,7 +967,7 @@ msgid "Delete"
msgstr "Suprimeix"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Realment voleu suprimir aquesta partida?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1033,7 +1029,7 @@ msgstr "GFX desactivats"
msgid "Standard Renderer"
msgstr "Pintat estрndard (16bpp)"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Estрndard"
@@ -2012,37 +2008,37 @@ msgstr "Llanчador"
msgid "Do you really want to quit?"
msgstr "Estрs segur de voler sortir?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "'Mode Toc' de pantalla tрctil - Clic esquerre"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "'Mode Toc' de pantalla tрctil - Clic dret"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "'Mode Toc' de pantalla tрctil - Flotant (sense clic)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Volum mрxim"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Pujant el volum"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Volum mэnim"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Baixant el volum"
@@ -2078,23 +2074,23 @@ msgstr "Mostra el teclat numшric"
msgid "Control Mouse"
msgstr "Controla el ratolэ"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Clicat activat"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Clicat desactivat"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Utilitza les pantalles originals de desat/cрrrega"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Utilitza les pantalles originals de desat/cрrrega, en lloc de les de ScummVM"
@@ -2111,7 +2107,7 @@ msgstr "Recupera la partida:"
msgid "Restore"
msgstr "Restaura"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2122,7 +2118,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2133,7 +2129,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2448,10 +2444,6 @@ msgstr "Mostra/Oculta la pantalla d'informaciѓ"
msgid "Display/Hide Pause Menu"
msgstr "Mostra/Oculta el menњ de pausa"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Elimina el tramat d'EGA"
@@ -2594,36 +2586,36 @@ msgstr "~A~nterior"
msgid "~N~ext"
msgstr "~S~egќent"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Nomщs veus"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Veu i subtэtols"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Nomщs subtэtols"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Veus i sub."
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Seleccioneu el nivell de competшncia."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Consulteu el manual de Loom(TM) per ajuda."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Prрctica"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Expert"
@@ -2681,10 +2673,6 @@ msgstr "Desa partida 1-10"
msgid "Enter"
msgstr "Intro"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Commuta la pantalla completa"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Puja / Baixa el volum de la mњsica"
@@ -3140,7 +3128,7 @@ msgstr "Vola a la dreta"
msgid "Fly to lower right"
msgstr "Vola avall i a la dreta"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3149,7 +3137,7 @@ msgstr ""
"El suport de MIDI natiu requereix l'actualitzaciѓ Roland de LucasArts,\n"
"perђ no s'ha trobat %s. S'utilitzarр AdLib."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3190,17 +3178,18 @@ msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "L'escena '%s' de PSX no es pot reproduir en mode paleta"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
-msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
"S'han trobat escenes en DXA, perђ s'ha compilat el ScummVM sense suport de "
"zlib"
-#: engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:561 engines/sword2/animation.cpp:461
#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+msgid ""
+"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
msgstr ""
-"S'han trobat escenes de PSX, perђ s'ha compilat el ScummVM sense suport de "
-"color RGB"
+"S'han trobat escenes en DXA, perђ s'ha compilat el ScummVM sense suport de "
+"zlib"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3253,14 +3242,6 @@ msgstr ""
"S'han trobat escenes de PSX, perђ s'ha compilat el ScummVM sense suport de "
"color RGB"
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-"S'han trobat escenes en DXA, perђ s'ha compilat el ScummVM sense suport de "
-"zlib"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr "Mostra les etiquetes dels objectes"
@@ -3282,6 +3263,12 @@ msgstr ""
"El fitxer teenagent.dat estр comprimit perђ aquest executable no contщ zlib. "
"Descomprimiu-lo, si us plau."
+#, fuzzy
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr ""
+#~ "S'han trobat escenes de PSX, perђ s'ha compilat el ScummVM sense suport "
+#~ "de color RGB"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Afegeix Jocs"
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index 4c82bfdcaf..0eee65ba1c 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.7.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
"PO-Revision-Date: 2014-02-27 21:43+0100\n"
"Last-Translator: Zbynьk Schwarz <zbynek.schwarz@gmail.com>\n"
"Language-Team: \n"
@@ -90,8 +90,8 @@ msgstr "Zobrazit klсvesnici"
msgid "Remap keys"
msgstr "Pјemapovat klсvesy"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Pјepnout celou obrazovku"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -110,7 +110,7 @@ msgstr "Mapovat"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -152,7 +152,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Krсtk§ identifikсtor her, pouОэvan§ jako odkaz k uloОen§m hrсm a spuЙtьnэ "
@@ -306,7 +306,7 @@ msgid "Extra Path:"
msgstr "Dodateшnс Cesta:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Stanovэ cestu pro dodateшnс data pouОitс ve hјe"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -320,7 +320,7 @@ msgstr "Cesta pro uloОenэ:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Stanovuje, kam jsou umэstьny vaЙe uloОenщ hry"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -356,7 +356,7 @@ msgstr "Vyberte adresсј s daty hry"
msgid "Select additional game directory"
msgstr "Vyberte dodateшn§ adresсј hry"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Vyberte adresсј pro uloОenщ hry"
@@ -401,7 +401,7 @@ msgid "~L~oad..."
msgstr "~N~ahrсt..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Nahrсt uloОenou pozici pro zvolenou hru"
#: gui/launcher.cpp:638
@@ -509,7 +509,7 @@ msgid "Do you really want to remove this game configuration?"
msgstr "Opravdu chcete odstranit nastavenэ tщto hry?"
#: gui/launcher.cpp:999
-msgid "Do you want to load savegame?"
+msgid "Do you want to load saved game?"
msgstr "Chcete naшэst uloОenou pozici?"
#: gui/launcher.cpp:1048
@@ -568,8 +568,8 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
-msgstr "11kHz"
+msgid "11 kHz"
+msgstr "11 kHz"
#: gui/options.cpp:87
msgid "22 kHz"
@@ -697,9 +697,9 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr ""
-"SoundFont je podporovсn nьkter§mi zvukov§mi kartami, Fluidsynth a Timidity"
+"SoundFont je podporovсn nьkter§mi zvukov§mi kartami, FluidSynth a Timidity"
#: gui/options.cpp:858
msgctxt "lowres"
@@ -910,10 +910,6 @@ msgstr "Jazyk GUI ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Pro pouОitэ tьchto nastavenэ musэte restartovat ScummVM."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Vybrat adresсј pro uloОenщ hry"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Do zvolenщho adresсјe nelze zapisovat. Vyberte, prosэm, jin§."
@@ -963,7 +959,7 @@ msgid "Delete"
msgstr "Smazat"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Opravdu chcete tuto uloОenou hru vymazat"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1024,7 +1020,7 @@ msgstr "GFX zakсzсno"
msgid "Standard Renderer"
msgstr "Standardnэ Vykreslovaш"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standardnэ"
@@ -2002,37 +1998,37 @@ msgstr "SpouЙtьш"
msgid "Do you really want to quit?"
msgstr "Opravdu chcete skonшit?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "'ReОim Ћuknutэ' Dotykovщ Obrazovky - Levщ Kliknutэ"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "'ReОim Ћuknutэ' Dotykovщ Obrazovky - Pravщ Kliknutэ"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "'ReОim Ћuknutэ' Dotykovщ Obrazovky - Najetэ (Bez Kliknutэ)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Maximсlnэ Hlasitost"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "ZvyЙuji Hlasitost"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Minimсlnэ Hlasitost"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "SniОuji Hlasitost"
@@ -2068,23 +2064,23 @@ msgstr "Zobrazit Klсvesnici"
msgid "Control Mouse"
msgstr "Ovlсdсnэ MyЙi"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Kliknutэ Povoleno"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Kliknutэ Zakсzсno"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "PouОэt pљvodnэ obrazovky naшtenэ/uloОenэ"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "PouОэt pљvodnэ obrazovky naшtenэ/uloОenэ mэsto ze ScummVM"
@@ -2100,7 +2096,7 @@ msgstr "Obnovit hru"
msgid "Restore"
msgstr "Obnovit"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2111,7 +2107,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2122,7 +2118,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2436,10 +2432,6 @@ msgstr "Zobrazit/Skr§to obrazovku informacэ"
msgid "Display/Hide Pause Menu"
msgstr "Zobrazit/Skr§t "
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Nerozklсdсnэ EGA"
@@ -2577,36 +2569,36 @@ msgstr "~P~јedchozэ"
msgid "~N~ext"
msgstr "~D~alЙэ"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Pouze иeш"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "иeш a Titulky"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Pouze Titulky"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "иeш a Titulky"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Vyberte њroveђ odbornosti."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Pro nсpovьdu si pјeшtьte manuсl Loom(TM)."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Cviшenэ"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Pokroшil§"
@@ -2664,10 +2656,6 @@ msgstr "UloОit stav hry 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Zapnout celou obrazovku"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Hlasitost hudby nahoru / dolљ"
@@ -3123,7 +3111,7 @@ msgstr "Letьt doprava"
msgid "Fly to lower right"
msgstr "Letьt doprava dolљ"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3132,7 +3120,7 @@ msgstr ""
"Pјirozenс podpora MIDI vyОaduje Aktualizaci Roland od LucasArts,\n"
"ale %s chybэ. Mэsto toho je pouОit AdLib."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3172,12 +3160,13 @@ msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "Proud videa PSX '%s' nemљОe b§t pјehrсn v reОimu palety"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
-msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr "Videa DXA nalezena, ale ScummVM byl sestaven bez podpory zlib"
-#: engines/sword1/animation.cpp:561
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
-msgstr "Videa MPEG-2 nalezena, ale ScummVM byl sestaven bez MPEG-2"
+#: 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 "Videa MPEG-2 nalezena, ale ScummVM byl sestaven bez podpory MPEG-2"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3228,11 +3217,6 @@ msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr "Videa PSX nalezena, ale ScummVM byl sestaven bez podpory barev RGB"
-#: engines/sword2/animation.cpp:461
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr "Videa MPEG-2 nalezena, ale ScummVM byl sestaven bez podpory MPEG-2"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr "Zobrazit jmenovky objektљ"
@@ -3254,6 +3238,9 @@ msgstr ""
"Soubor teenagent.dat je komprimovсn a zlib nenэ souшсstэ spustitelnщho "
"souboru. Prosэm dekomprimujte ho"
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr "Videa MPEG-2 nalezena, ale ScummVM byl sestaven bez MPEG-2"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Hromadnщ Pјidсnэ..."
diff --git a/po/da_DA.po b/po/da_DA.po
index 8b26ebe238..65abad2f9e 100644
--- a/po/da_DA.po
+++ b/po/da_DA.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
-"PO-Revision-Date: 2013-05-17 14:24+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-07-09 17:34+0100\n"
"Last-Translator: Steffen Nyeland <steffen@nyeland.dk>\n"
"Language-Team: Steffen Nyeland <steffen@nyeland.dk>\n"
"Language: Dansk\n"
@@ -16,7 +16,7 @@ msgstr ""
"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.5.5\n"
+"X-Generator: Poedit 1.6.6\n"
#: gui/about.cpp:94
#, c-format
@@ -88,8 +88,8 @@ msgstr "Vis tastatur"
msgid "Remap keys"
msgstr "Kortlцg taster"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Skift fuldskцrm"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -108,7 +108,7 @@ msgstr "Kortlцg"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -150,7 +150,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Kort spil identifikator til brug for gemmer, og for at kјre spillet fra "
@@ -306,7 +306,7 @@ msgid "Extra Path:"
msgstr "Ekstra sti:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Angiver sti til ekstra data der bruges i spillet"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -320,7 +320,7 @@ msgstr "Gemme sti:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Angiver hvor dine gemmer bliver lagt"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -356,7 +356,7 @@ msgstr "Vцlg bibliotek med spil data"
msgid "Select additional game directory"
msgstr "Vцlg ekstra spil bibliotek"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Vцlg bibliotek til spil gemmer"
@@ -401,7 +401,7 @@ msgid "~L~oad..."
msgstr "Ind~l~цs..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Indlцs gemmer for det valgte spil"
#: gui/launcher.cpp:638
@@ -509,9 +509,8 @@ msgid "Do you really want to remove this game configuration?"
msgstr "Vil du virkelig fjerne denne spil konfiguration?"
#: gui/launcher.cpp:999
-#, fuzzy
-msgid "Do you want to load savegame?"
-msgstr "Vil du indlцse eller gemme spillet?"
+msgid "Do you want to load saved game?"
+msgstr "Vil du indlцse gemmer?"
#: gui/launcher.cpp:1048
msgid "This game does not support loading games from the launcher."
@@ -570,7 +569,7 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
+msgid "11 kHz"
msgstr "11 kHz"
#: gui/options.cpp:87
@@ -699,8 +698,8 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
-msgstr "SoundFont er understјttet af nogle lydkort, Fluidsynth og Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
+msgstr "SoundFont er understјttet af nogle lydkort, FluidSynth og Timidity"
#: gui/options.cpp:858
msgctxt "lowres"
@@ -740,7 +739,7 @@ msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
msgstr ""
-"Kontroller om du vil bruge din rigtige hardware Roland-kompatible lyd enhed "
+"Kryds af hvis du vil bruge din rigtige hardware Roland-kompatible lyd enhed "
"tilsluttet til din computer"
#: gui/options.cpp:888
@@ -749,15 +748,16 @@ msgid "True Roland MT-32 (no GM emulation)"
msgstr "Цgte Roland MT-32 (ingen GM emulering)"
#: gui/options.cpp:891
-#, fuzzy
msgid "Roland GS Device (enable MT-32 mappings)"
-msgstr "Roland GS tilstand (undlad GM emulering)"
+msgstr "Roland GS enhed (aktivщr MT-32 tilknytninger)"
#: gui/options.cpp:891
msgid ""
"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
"GS device"
msgstr ""
+"Kryds af hvis du vil aktivere patch tilknytninger, for at emulere en MT-32 "
+"pх en Roland GS enhed"
#: gui/options.cpp:900
msgid "Don't use Roland MT-32 music"
@@ -909,10 +909,6 @@ msgstr "Sprog for brugerfladen i ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Du skal genstarte ScummVM fјr dine цndringer har effekt."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Vцlg bibliotek til gemmer"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Der kan ikke skrives til det valgte bibliotek. Vцlg venligst et andet."
@@ -962,7 +958,7 @@ msgid "Delete"
msgstr "Slet"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Vil du virkelig slette denne gemmer?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1020,23 +1016,20 @@ msgid "Disabled GFX"
msgstr "Deaktiveret GFX"
#: gui/ThemeEngine.cpp:348
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Standard renderer (16bpp)"
+msgstr "Standard renderer"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standard"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "Antialias renderer (16bpp)"
+msgstr "Antialias renderer"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased"
-msgstr "Antialias (16bpp)"
+msgstr "Antialias"
#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
msgid "Clear value"
@@ -1667,13 +1660,12 @@ msgid "Windowed mode"
msgstr "Vindue tilstand"
#: backends/graphics/opengl/opengl-graphics.cpp:118
-#, fuzzy
msgid "OpenGL"
-msgstr "Хbn"
+msgstr "OpenGL"
#: backends/graphics/opengl/opengl-graphics.cpp:119
msgid "OpenGL (No filtering)"
-msgstr ""
+msgstr "OpenGL (Ingen filtrering)"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -2005,37 +1997,37 @@ msgstr "Oversigt"
msgid "Do you really want to quit?"
msgstr "Vil du virkelig afslutte?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "Touchscreen 'Tap Mode' - Venstre Klik"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "Touchscreen 'Tap Mode' - Hјjre Klik"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "Touchscreen 'Tap Mode' - Henover (Ingen Klik)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Maximal lydstyrke"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Hцver lydstyrke"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Minimal lydstyrke"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Sцnker lydstyrke"
@@ -2071,23 +2063,23 @@ msgstr "Vis tastatur"
msgid "Control Mouse"
msgstr "Kontrollщr mus"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Klik aktiveret"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Klik deaktiveret"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Brug original gem/indlцs skцrme"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Brug de originale gem/indlцs skцrme, istedet for dem fra ScummVM"
@@ -2103,7 +2095,7 @@ msgstr "Gendan spil:"
msgid "Restore"
msgstr "Gendan"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2114,7 +2106,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2125,7 +2117,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2340,19 +2332,21 @@ msgstr "~V~andeffekter aktiveret"
#: engines/neverhood/detection.cpp:167
msgid "Skip the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Spring \"Hall of Records\" storyboard scener over"
#: engines/neverhood/detection.cpp:168
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
msgstr ""
+"Giver spilleren mulighed for at springe \"Hall of Records\" storyboard "
+"scener over"
#: engines/neverhood/detection.cpp:174
msgid "Scale the making of videos to full screen"
-msgstr ""
+msgstr "Skalщr skabelsen af videoerne til fuld skцrm"
#: engines/neverhood/detection.cpp:175
msgid "Scale the making of videos, so that they use the whole screen"
-msgstr ""
+msgstr "Skalщr skabelsen af videoerne, sх de fylder hele skцrmen"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2439,10 +2433,6 @@ msgstr "Vis/Skjul Info skцrm"
msgid "Display/Hide Pause Menu"
msgstr "Vis/Skjul Pause menu"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA farveforјgelse"
@@ -2581,36 +2571,36 @@ msgstr "Fo~r~rige"
msgid "~N~ext"
msgstr "~N~цste"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Kun tale"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Tale og Undertekster"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Kun undertekster"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Tale & Tekst"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Vцlg et Fцrdighedsniveau."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Se din Loom(TM) manual for hjцlp."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Trцning"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Ekspert"
@@ -2668,10 +2658,6 @@ msgstr "Gem spil tilstand 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Skift fuldskцrm"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musik lydstyrke op / ned"
@@ -3127,7 +3113,7 @@ msgstr "Flyv til hјjre"
msgid "Fly to lower right"
msgstr "Flyv nederst til hјjre"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3136,7 +3122,7 @@ msgstr ""
"Indbygget MIDI understјttelse krцver Roland opgradering fra LucasArts,\n"
"men %s mangler. Bruger AdLib i stedet."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3176,15 +3162,15 @@ msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "PSX stream filmsekvens '%s' kan ikke afspilles i palette tilstand"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
-msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
"DXA filmsekvenser fundet, men ScummVM er bygget uden zlib understјttelse"
-#: engines/sword1/animation.cpp:561
-#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#: 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 ""
-"PSX filmsekvenser fundet, men ScummVM er bygget uden RGB farve understјttelse"
+"MPEG-2 filmsekvenser fundet, men ScummVM er bygget uden MPEG-2 understјttelse"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3236,13 +3222,6 @@ msgid ""
msgstr ""
"PSX filmsekvenser fundet, men ScummVM er bygget uden RGB farve understјttelse"
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-"DXA filmsekvenser fundet, men ScummVM er bygget uden zlib understјttelse"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr "Vis labels pх genstande"
@@ -3264,6 +3243,9 @@ msgstr ""
"Teenagent.dat filen er komprimeret og zlib er ikke blevet inkluderet i dette "
"program. Udpak den venligst"
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr "MPEG-2 filmsekvenser fundet, men ScummVM er bygget uden MPEG-2"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Tilfјj flere..."
diff --git a/po/de_DE.po b/po/de_DE.po
index 44bd5fc382..3fb083d8a2 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -1,14 +1,14 @@
# German translation for ScummVM.
# Copyright (C) 2010-2014 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
-# Simon Sawatzki <SimSaw@gmx.de>, Lothar Serra Mari, 2013.
+# Simon Sawatzki <SimSaw@gmx.de>, Lothar Serra Mari, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
-"PO-Revision-Date: 2013-04-24 22:01+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-06-14 19:34+0100\n"
"Last-Translator: Simon Sawatzki <SimSaw@gmx.de>\n"
"Language-Team: Simon Sawatzki <SimSaw@gmx.de>, Lothar Serra Mari (retired)\n"
"Language: Deutsch\n"
@@ -87,8 +87,8 @@ msgstr "Tastatur anzeigen"
msgid "Remap keys"
msgstr "Tasten neu zuweisen"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Vollbild EIN/AUS"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -107,7 +107,7 @@ msgstr "Zuweisen"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -149,7 +149,7 @@ msgstr "Kennung:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Kurzer Spielname, um die Spielstфnde zuzuordnen und das Spiel von der "
@@ -305,7 +305,7 @@ msgid "Extra Path:"
msgstr "Extrapfad:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Legt das Verzeichnis fќr zusфtzliche Spieldateien fest."
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -319,7 +319,7 @@ msgstr "Spielstфnde:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Legt fest, wo die Spielstфnde abgelegt werden."
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -355,7 +355,7 @@ msgstr "Verzeichnis mit Spieldateien auswфhlen"
msgid "Select additional game directory"
msgstr "Verzeichnis mit zusфtzlichen Dateien auswфhlen"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Verzeichnis fќr Spielstфnde auswфhlen"
@@ -400,7 +400,7 @@ msgid "~L~oad..."
msgstr "~L~aden..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Spielstand fќr ausgewфhltes Spiel laden"
#: gui/launcher.cpp:638
@@ -510,9 +510,8 @@ msgid "Do you really want to remove this game configuration?"
msgstr "Mіchten Sie wirklich diese Spielkonfiguration entfernen?"
#: gui/launcher.cpp:999
-#, fuzzy
-msgid "Do you want to load savegame?"
-msgstr "Mіchten Sie ein Spiel laden oder speichern?"
+msgid "Do you want to load saved game?"
+msgstr "Mіchten Sie einen Spielstand laden?"
#: gui/launcher.cpp:1048
msgid "This game does not support loading games from the launcher."
@@ -571,7 +570,7 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
+msgid "11 kHz"
msgstr "11 kHz"
#: gui/options.cpp:87
@@ -704,9 +703,9 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr ""
-"SoundFont wird von einigen Soundkarten, Fluidsynth und Timidity unterstќtzt."
+"SoundFont wird von einigen Soundkarten, FluidSynth und Timidity unterstќtzt."
#: gui/options.cpp:858
msgctxt "lowres"
@@ -757,15 +756,16 @@ msgid "True Roland MT-32 (no GM emulation)"
msgstr "Echte Roland-MT-32-Emulation (kein GM)"
#: gui/options.cpp:891
-#, fuzzy
msgid "Roland GS Device (enable MT-32 mappings)"
-msgstr "Roland-GS-Modus (GM-Zuweisung deaktiviert)"
+msgstr "Roland-GS-Modus (MT-32-Zuweisungen aktivieren)"
#: gui/options.cpp:891
msgid ""
"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
"GS device"
msgstr ""
+"Wфhlen Sie dies aus, wenn Sie ausbessernde Instrumentzuweisungen aktivieren "
+"mіchten, um MT-32 auf einem Roland-GS-Gerфt zu emulieren."
#: gui/options.cpp:900
msgid "Don't use Roland MT-32 music"
@@ -837,7 +837,7 @@ msgstr "Effektlautstфrke:"
#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976
msgid "Special sound effects volume"
-msgstr "Lautstфrke spezieller Soundeffekte"
+msgstr "Lautstфrke spezieller Gerфusch-Effekte"
#: gui/options.cpp:975
msgctxt "lowres"
@@ -919,10 +919,6 @@ msgstr "Sprache der ScummVM-Oberflфche"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Sie mќssen ScummVM neu starten, damit die Фnderungen wirksam werden."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Verzeichnis fќr Spielstфnde auswфhlen"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
@@ -976,7 +972,7 @@ msgid "Delete"
msgstr "Lіschen"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Diesen Spielstand wirklich lіschen?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1034,23 +1030,20 @@ msgid "Disabled GFX"
msgstr "GFX ausgeschaltet"
#: gui/ThemeEngine.cpp:348
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Standard-Renderer (16bpp)"
+msgstr "Standard-Renderer"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standard"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "Kantenglфttung (16bpp)"
+msgstr "Kantenglфttung"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased"
-msgstr "Kantenglфttung (16bpp)"
+msgstr "Kantenglфttung"
#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
msgid "Clear value"
@@ -1687,13 +1680,12 @@ msgid "Windowed mode"
msgstr "Fenstermodus"
#: backends/graphics/opengl/opengl-graphics.cpp:118
-#, fuzzy
msgid "OpenGL"
-msgstr "жffne"
+msgstr "OpenGL"
#: backends/graphics/opengl/opengl-graphics.cpp:119
msgid "OpenGL (No filtering)"
-msgstr ""
+msgstr "OpenGL (ohne Filter)"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -2026,37 +2018,37 @@ msgstr "Spieleliste"
msgid "Do you really want to quit?"
msgstr "Mіchten Sie wirklich beenden?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "Berќhrungsbildschirm-Tipp-Modus - Linksklick"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "Berќhrungsbildschirm-Tipp-Modus - Rechtsklick"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "Berќhrungsbildschirm-Tipp-Modus - schweben (kein Klick)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Hіchste Lautstфrke"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Lautstфrke hіher"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Niedrigste Lautstфrke"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Lautstфrke niedriger"
@@ -2092,23 +2084,23 @@ msgstr "Ziffernblock zeigen"
msgid "Control Mouse"
msgstr "Maus steuern"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Klicken aktiviert"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Klicken deaktiviert"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Originale Spielstand-Menќs"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Verwendet die originalen Menќs zum Speichern und Laden statt der von ScummVM."
@@ -2125,7 +2117,7 @@ msgstr "Spiel laden:"
msgid "Restore"
msgstr "Laden"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2136,7 +2128,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2147,7 +2139,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2364,19 +2356,22 @@ msgstr "~W~assereffekt aktiviert"
#: engines/neverhood/detection.cpp:167
msgid "Skip the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Szenenbuch-Sequenz in der Chronikhalle ќberspringen"
#: engines/neverhood/detection.cpp:168
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
msgstr ""
+"Ermіglicht dem Spieler, die Szenenbuch-Sequenz in der Chronikhalle zu "
+"ќberspringen."
#: engines/neverhood/detection.cpp:174
msgid "Scale the making of videos to full screen"
-msgstr ""
+msgstr "Making-Of-Videos auf Vollbild skalieren"
#: engines/neverhood/detection.cpp:175
msgid "Scale the making of videos, so that they use the whole screen"
msgstr ""
+"Skaliert die Making-Of-Videos, sodass sie den gesamten Bildschirm ausfќllen."
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2464,10 +2459,6 @@ msgstr "Info-Bildschirm anzeigen/verbergen"
msgid "Display/Hide Pause Menu"
msgstr "Pause-Menќ anzeigen/verbergen"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Antifehlerdiffusion fќr EGA"
@@ -2478,11 +2469,11 @@ msgstr "Aktiviert die Aufhebung der Fehlerdiffusion in EGA-Spielen."
#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects"
-msgstr "Digitale Sound-Effekte bevorzugen"
+msgstr "Digitale Gerфusch-Effekte bevorzugen"
#: engines/sci/detection.cpp:385
msgid "Prefer digital sound effects instead of synthesized ones"
-msgstr "Bevorzugt digitale Sound-Effekte statt synthethisierter."
+msgstr "Bevorzugt digitale Gerфusch-Effekte statt synthethisierter."
#: engines/sci/detection.cpp:404
msgid "Use IMF/Yamaha FB-01 for MIDI output"
@@ -2609,36 +2600,36 @@ msgstr "~Z~urќck"
msgid "~N~ext"
msgstr "~W~eiter"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Nur Sprachausgabe"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Sprachausgabe und Untertitel"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Nur Untertitel"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Sprache & Text"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Wфhle einen Schwierigkeitsgrad."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Fќr Hilfe schaue ins Loom-Handbuch."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Anfфnger"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Experte"
@@ -2696,10 +2687,6 @@ msgstr "Spielstand 1-10 speichern"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Vollbild-/Fenster-Modus"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musiklautstфrke hіher/niedriger"
@@ -3155,7 +3142,7 @@ msgstr "Nach rechts fliegen"
msgid "Fly to lower right"
msgstr "Nach unten rechts fliegen"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3165,7 +3152,7 @@ msgstr ""
"Roland-Upgrade von LucasArts, aber %s\n"
"fehlt. Stattdessen wird AdLib verwendet."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3209,17 +3196,17 @@ msgstr ""
"PSX-Zwischensequenz \"%s\" kann in Palettenmodus nicht wiedergegeben werden."
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
-msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
"DXA-Zwischensequenzen gefunden, aber ScummVM wurde ohne Zlib-Unterstќtzung "
"erstellt."
-#: engines/sword1/animation.cpp:561
-#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#: 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 ""
-"PSX-Zwischensequenzen gefunden, aber ScummVM wurde ohne Unterstќtzung fќr "
-"RGB-Farben erstellt."
+"MPEG-2-Zwischensequenzen gefunden, aber ScummVM wurde ohne Unterstќtzung fќr "
+"MPEG-2-Videos erstellt."
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3272,14 +3259,6 @@ msgstr ""
"PSX-Zwischensequenzen gefunden, aber ScummVM wurde ohne Unterstќtzung fќr "
"RGB-Farben erstellt."
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-"DXA-Zwischensequenzen gefunden, aber ScummVM wurde ohne Zlib-Unterstќtzung "
-"erstellt."
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr "Objektnamen zeigen"
@@ -3303,6 +3282,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."
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr ""
+#~ "MPEG-2-Zwischensequenzen gefunden, aber ScummVM wurde ohne Unterstќtzung "
+#~ "fќr MPEG-2-Videos erstellt."
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Durchsuchen"
diff --git a/po/es_ES.po b/po/es_ES.po
index b22254d196..312eeed5f1 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -7,15 +7,15 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.4.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
-"PO-Revision-Date: 2013-04-28 16:31+0100\n"
-"Last-Translator: Tomсs Maidagan\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-07-06 20:39+0100\n"
+"Last-Translator: \n"
"Language-Team: \n"
"Language: Espanol\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.5.5\n"
+"X-Generator: Poedit 1.6.5\n"
#: gui/about.cpp:94
#, c-format
@@ -87,13 +87,13 @@ msgstr "Mostrar el teclado"
msgid "Remap keys"
msgstr "Asignar teclas"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Activar/Desactivar pantalla completa"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
msgid "Choose an action to map"
-msgstr "Elige la acciѓn a asociar"
+msgstr "Elige una acciѓn para asociarla"
#: gui/KeysDialog.cpp:41
msgid "Map"
@@ -107,7 +107,7 @@ msgstr "Asignar"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -137,7 +137,7 @@ msgstr "Por favor, selecciona una acciѓn"
#: gui/KeysDialog.cpp:106
msgid "Press the key to associate"
-msgstr "Pulsa la tecla a asignar"
+msgstr "Pulsa una tecla para asignarla"
#: gui/launcher.cpp:193
msgid "Game"
@@ -149,7 +149,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Identificador usado para las partidas guardadas y para ejecutar el juego "
@@ -214,7 +214,7 @@ msgstr "Grсficos"
#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090
msgid "GFX"
-msgstr "GFX"
+msgstr "Grсf."
#: gui/launcher.cpp:248
msgid "Override global graphic settings"
@@ -305,7 +305,7 @@ msgid "Extra Path:"
msgstr "Adicional:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Especifica un directorio para datos adicionales del juego"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -319,7 +319,7 @@ msgstr "Partidas:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Especifica dѓnde guardar tus partidas"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -355,7 +355,7 @@ msgstr "Selecciona el directorio del juego"
msgid "Select additional game directory"
msgstr "Selecciona el directorio adicional"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Selecciona el directorio para partidas guardadas"
@@ -400,7 +400,7 @@ msgid "~L~oad..."
msgstr "~C~argar..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Cargar partida del juego seleccionado"
#: gui/launcher.cpp:638
@@ -409,7 +409,7 @@ msgstr "~A~ёadir juego..."
#: gui/launcher.cpp:638 gui/launcher.cpp:645
msgid "Hold Shift for Mass Add"
-msgstr "Mantener pulsado Mayњs para aёadir varios juegos"
+msgstr "Mantщn pulsado Mayњs para aёadir varios juegos"
#: gui/launcher.cpp:640
msgid "~E~dit Game..."
@@ -508,9 +508,8 @@ msgid "Do you really want to remove this game configuration?"
msgstr "ПSeguro que quieres eliminar la configuraciѓn de este juego?"
#: gui/launcher.cpp:999
-#, fuzzy
-msgid "Do you want to load savegame?"
-msgstr "ПQuieres cargar o guardar el juego?"
+msgid "Do you want to load saved game?"
+msgstr "ПQuieres cargar la partida guardada?"
#: gui/launcher.cpp:1048
msgid "This game does not support loading games from the launcher."
@@ -569,8 +568,8 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
-msgstr "11kHz"
+msgid "11 kHz"
+msgstr "11 kHz"
#: gui/options.cpp:87
msgid "22 kHz"
@@ -701,9 +700,9 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr ""
-"SoundFont es compatible con algunas tarjetas de sonido, con Fluidsynth y con "
+"SoundFont es compatible con algunas tarjetas de sonido, con FluidSynth y con "
"Timidity"
#: gui/options.cpp:858
@@ -755,15 +754,16 @@ msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 real (sin emulaciѓn GM)"
#: gui/options.cpp:891
-#, fuzzy
msgid "Roland GS Device (enable MT-32 mappings)"
-msgstr "Modo Roland GS (desactivar conversiѓn GM)"
+msgstr "Dispositivo Roland GS (activar conversiѓn MT-32)"
#: gui/options.cpp:891
msgid ""
"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
"GS device"
msgstr ""
+"Marca esta opciѓn si quieres activar la conversiѓn para emular una MT-32 en "
+"un dispositivo Roland GS"
#: gui/options.cpp:900
msgid "Don't use Roland MT-32 music"
@@ -915,10 +915,6 @@ msgstr "Idioma de la interfaz de ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Tienes que reiniciar ScummVM para aplicar los cambios."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Selecciona el directorio de guardado"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
@@ -969,7 +965,7 @@ msgid "Delete"
msgstr "Borrar"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "ПSeguro que quieres borrar esta partida?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1019,31 +1015,28 @@ msgstr "Selecciona un tema"
#: gui/ThemeEngine.cpp:347
msgid "Disabled GFX"
-msgstr "GFX desactivados"
+msgstr "Grсf. desactivados"
#: gui/ThemeEngine.cpp:347
msgctxt "lowres"
msgid "Disabled GFX"
-msgstr "GFX desactivados"
+msgstr "Grсf. desactivados"
#: gui/ThemeEngine.cpp:348
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Estсndar (16bpp)"
+msgstr "Estсndar"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Estсndar"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "Suavizado (16bpp)"
+msgstr "Suavizado"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased"
-msgstr "Suavizado (16bpp)"
+msgstr "Suavizado"
#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
msgid "Clear value"
@@ -1127,7 +1120,7 @@ msgstr "Reiniciar"
#: gui/fluidsynth-dialog.cpp:150
msgid "Reset all FluidSynth settings to their default values."
-msgstr "Vuelve a los valores por defecto de las opciones de FluidSynth"
+msgstr "Volver a los valores por defecto de las opciones de FluidSynth"
#: gui/fluidsynth-dialog.cpp:217
msgid ""
@@ -1675,13 +1668,12 @@ msgid "Windowed mode"
msgstr "Modo ventana"
#: backends/graphics/opengl/opengl-graphics.cpp:118
-#, fuzzy
msgid "OpenGL"
-msgstr "Abrir"
+msgstr "OpenGL"
#: backends/graphics/opengl/opengl-graphics.cpp:119
msgid "OpenGL (No filtering)"
-msgstr ""
+msgstr "OpenGL (sin filtros)"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -2003,7 +1995,7 @@ msgstr ""
#: backends/events/default/default-events.cpp:196
msgid "Do you really want to return to the Launcher?"
-msgstr "ПSeguro que quieres volver al Lanzador?"
+msgstr "ПSeguro que quieres volver al lanzador?"
#: backends/events/default/default-events.cpp:196
msgid "Launcher"
@@ -2011,39 +2003,39 @@ msgstr "Lanzador"
#: backends/events/default/default-events.cpp:218
msgid "Do you really want to quit?"
-msgstr "ПRealmente quieres salir?"
+msgstr "ПSeguro que quieres salir?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "'Modo toque' de pantalla tсctil - Clic izquierdo"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "'Modo toque' de pantalla tсctil - Clic derecho"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "'Modo toque' de pantalla tсctil - Flotante (sin clic)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Volumen mсximo"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Aumentando el volumen"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Volumen mэnimo"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Bajando el volumen"
@@ -2079,23 +2071,23 @@ msgstr "Mostrar el teclado numщrico"
msgid "Control Mouse"
msgstr "Control del ratѓn"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Clic activado"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Clic desactivado"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Usar pantallas de guardar/cargar originales"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
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"
@@ -2112,7 +2104,7 @@ msgstr "Cargar partida:"
msgid "Restore"
msgstr "Cargar"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2123,7 +2115,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2134,7 +2126,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2209,7 +2201,7 @@ msgstr "Risas del pњblico"
#: engines/kyra/detection.cpp:63
msgid "Enable studio audience"
-msgstr "Activa las risas del pњblico"
+msgstr "Activar las risas del pњblico"
#. I18N: This option allows the user to skip text and cutscenes.
#: engines/kyra/detection.cpp:73
@@ -2218,7 +2210,7 @@ msgstr "Permitir omisiones"
#: engines/kyra/detection.cpp:74
msgid "Allow text and cutscenes to be skipped"
-msgstr "Permite saltarse frases y vэdeos"
+msgstr "Permitir saltarse frases y vэdeos"
#. I18N: Helium mode makes people sound like they've inhaled Helium.
#: engines/kyra/detection.cpp:84
@@ -2227,7 +2219,7 @@ msgstr "Modo helio"
#: engines/kyra/detection.cpp:85
msgid "Enable helium mode"
-msgstr "Activa el modo helio"
+msgstr "Activar el modo helio"
#. I18N: When enabled, this option makes scrolling smoother when
#. changing from one screen to another.
@@ -2237,7 +2229,7 @@ msgstr "Desplazamiento suave"
#: engines/kyra/detection.cpp:100
msgid "Enable smooth scrolling when walking"
-msgstr "Activa el desplazamiento de pantalla suave al caminar"
+msgstr "Activar el desplazamiento de pantalla suave al caminar"
#. 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
@@ -2257,7 +2249,7 @@ msgstr "Barras de energэa"
#: engines/kyra/detection.cpp:128
msgid "Enable hit point bar graphs"
-msgstr "Activa las barras de energэa"
+msgstr "Activar las barras de energэa"
#: engines/kyra/lol.cpp:478
msgid "Attack 1"
@@ -2349,19 +2341,20 @@ msgstr "Efecto ag~u~a activado"
#: engines/neverhood/detection.cpp:167
msgid "Skip the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Saltar las escenas del salѓn de registros"
#: engines/neverhood/detection.cpp:168
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
msgstr ""
+"Permitir al jugador saltarse las escenas storyboard del salѓn de registros"
#: engines/neverhood/detection.cpp:174
msgid "Scale the making of videos to full screen"
-msgstr ""
+msgstr "Redimensionar vэdeos a pantalla completa"
#: engines/neverhood/detection.cpp:175
msgid "Scale the making of videos, so that they use the whole screen"
-msgstr ""
+msgstr "Redimensionar los vэdeos para que utilicen toda la pantalla"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2419,7 +2412,7 @@ msgstr "Nombre no vсlido para la partida"
#: engines/pegasus/pegasus.cpp:2507
msgid "Up/Zoom In/Move Forward/Open Doors"
-msgstr "Arriba/Zoom/Avanzar/Abrir puertas"
+msgstr "Arriba/Aumentar zoom/Avanzar/Abrir puertas"
#: engines/pegasus/pegasus.cpp:2508
msgid "Down/Zoom Out"
@@ -2449,10 +2442,6 @@ msgstr "Mostrar/Ocultar pantalla de informaciѓn"
msgid "Display/Hide Pause Menu"
msgstr "Mostrar/Ocultar menњ de pausa"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Difuminado EGA"
@@ -2478,7 +2467,7 @@ msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
msgstr ""
-"Usa una tarjeta IBM Music o un mѓdulo sintetizador Yamaha FB-01 FM para la "
+"Usar una tarjeta IBM Music o un mѓdulo sintetizador Yamaha FB-01 FM para la "
"salida MIDI"
#: engines/sci/detection.cpp:415
@@ -2487,7 +2476,7 @@ msgstr "Usar CD audio"
#: engines/sci/detection.cpp:416
msgid "Use CD audio instead of in-game audio, if available"
-msgstr "Usa CD audio en vez del sonido interno del juego, si estс disponible"
+msgstr "Usar CD audio en vez del sonido interno del juego, si estс disponible"
#: engines/sci/detection.cpp:426
msgid "Use Windows cursors"
@@ -2592,36 +2581,36 @@ msgstr "~A~nterior"
msgid "~N~ext"
msgstr "Si~g~uiente"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Solo voces"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Voces y subtэtulos"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Solo subtэtulos"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Voces y sub."
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Selecciona un nivel de dificultad."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Consulta el manual para obtener mсs informaciѓn."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Prсctica"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Experto"
@@ -2679,10 +2668,6 @@ msgstr "Guardar partida 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Activar/Desactivar pantalla completa"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Subir / Bajar el volumen de la mњsica"
@@ -2876,35 +2861,35 @@ msgstr "Henry / Indy"
#. I18N: These are different musical notes
#: engines/scumm/help.cpp:179
msgid "play C minor on distaff"
-msgstr "Tocar C menor con el bastѓn"
+msgstr "Tocar do menor con el bastѓn"
#: engines/scumm/help.cpp:180
msgid "play D on distaff"
-msgstr "Tocar D con el bastѓn"
+msgstr "Tocar re con el bastѓn"
#: engines/scumm/help.cpp:181
msgid "play E on distaff"
-msgstr "Tocar E con el bastѓn"
+msgstr "Tocar mi con el bastѓn"
#: engines/scumm/help.cpp:182
msgid "play F on distaff"
-msgstr "Tocar F con el bastѓn"
+msgstr "Tocar fa con el bastѓn"
#: engines/scumm/help.cpp:183
msgid "play G on distaff"
-msgstr "Tocar G con el bastѓn"
+msgstr "Tocar sol con el bastѓn"
#: engines/scumm/help.cpp:184
msgid "play A on distaff"
-msgstr "Tocar A con el bastѓn"
+msgstr "Tocar la con el bastѓn"
#: engines/scumm/help.cpp:185
msgid "play B on distaff"
-msgstr "Tocar B con el bastѓn"
+msgstr "Tocar si con el bastѓn"
#: engines/scumm/help.cpp:186
msgid "play C major on distaff"
-msgstr "Tocar C mayor con el bastѓn"
+msgstr "Tocar do mayor con el bastѓn"
#: engines/scumm/help.cpp:192 engines/scumm/help.cpp:214
msgid "puSh"
@@ -3138,7 +3123,7 @@ msgstr "Volar a la derecha"
msgid "Fly to lower right"
msgstr "Volar abajo y a la derecha"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3147,7 +3132,7 @@ msgstr ""
"El soporte MIDI nativo requiere la actualizaciѓn Roland de LucasArts,\n"
"pero %s no estс disponible. Se usarс AdLib."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3188,16 +3173,17 @@ msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "El vэdeo de PSX '%s' no se puede reproducir en modo paleta"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
-msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
-"Se han encontrado vэdeos DXA, pero se ha compilado ScummVM sin soporte zlib"
+"Se han encontrado vэdeos DXA, pero se ha compilado ScummVM sin "
+"compatibilidad con zlib"
-#: engines/sword1/animation.cpp:561
-#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#: 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 ""
-"Se han encontrado vэdeos PSX, pero se ha compilado ScummVM sin soporte de "
-"color RGB"
+"Se han encontrado vэdeos MPEG-2, pero se ha compilado ScummVM sin "
+"compatibilidad con MPEG-2"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3247,15 +3233,8 @@ msgstr "Este es el final de la demo de Broken Sword 1"
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
-"Se han encontrado vэdeos PSX, pero se ha compilado ScummVM sin soporte de "
-"color RGB"
-
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-"Se han encontrado vэdeos DXA, pero se ha compilado ScummVM sin soporte zlib"
+"Se han encontrado vэdeos PSX, pero se ha compilado ScummVM sin "
+"compatibilidad con color RGB"
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
@@ -3280,6 +3259,10 @@ msgstr ""
"El archivo teenagent.dat estс comprimido y este ejecutable no incluye zlib. "
"Por favor, descomprэmelo"
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr ""
+#~ "Se han encontrado vэdeos MPEG-2, pero se ha compilado ScummVM sin MPEG-2"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Aёad. varios"
diff --git a/po/eu.po b/po/eu.po
index be771d14d3..3836897589 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
"PO-Revision-Date: 2011-12-15 14:53+0100\n"
"Last-Translator: Mikel Iturbe Urretxa <mikel@hamahiru.org>\n"
"Language-Team: Librezale <librezale@librezale.org>\n"
@@ -87,8 +87,8 @@ msgstr "Teklatua erakutsi"
msgid "Remap keys"
msgstr "Teklak esleitu"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Txandakatu pantaila osoa"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -107,7 +107,7 @@ msgstr "Esleitu"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -149,7 +149,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Partida gordeak identifikatzeko eta jokoa komando lerrotik abiarazteko "
@@ -305,7 +305,7 @@ msgid "Extra Path:"
msgstr "Gehigarriak:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Jokoak erabiltzen duen datu gehigarrien bide-izena"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -319,7 +319,7 @@ msgstr "Partida gordeak:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Zure gordetako partidak non gordeko diren zehazten du"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -355,7 +355,7 @@ msgstr "Jokoaren direktorioa aukeratu"
msgid "Select additional game directory"
msgstr "Direktorio gehigarria aukeratu"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Partida gordeen direktorioa aukeratu"
@@ -400,7 +400,7 @@ msgid "~L~oad..."
msgstr "~K~argatu"
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Aukeraturiko jokorako partida gordea kargatu"
#: gui/launcher.cpp:638
@@ -509,7 +509,7 @@ msgstr "Benetan ezabatu nahi duzu joko-konfigurazio hau?"
#: gui/launcher.cpp:999
#, fuzzy
-msgid "Do you want to load savegame?"
+msgid "Do you want to load saved game?"
msgstr "Jokoa kargatu edo gorde nahi duzu?"
#: gui/launcher.cpp:1048
@@ -572,8 +572,8 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
-msgstr "11kHz"
+msgid "11 kHz"
+msgstr "11 kHz"
#: gui/options.cpp:87
msgid "22 kHz"
@@ -701,9 +701,9 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr ""
-"Zenbait soinu txartel bateragarriak dira SoundFont-ekin, Fluidsynth eta "
+"Zenbait soinu txartel bateragarriak dira SoundFont-ekin, FluidSynth eta "
"Timidity besteak beste"
#: gui/options.cpp:858
@@ -916,10 +916,6 @@ msgstr "ScummVM interfazearen hizkuntza"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "ScummVM berrabiarazi behar duzu aldaketak indarrean jartzeko"
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Gordetako partiden direktorioa aukeratu"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Aukeraturiko direktorioan ezin da idatzi. Mesedez, aukeratu beste bat."
@@ -969,7 +965,7 @@ msgid "Delete"
msgstr "Ezabatu"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Ezabatu partida gorde hau?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1034,7 +1030,7 @@ msgstr "GFX desgaituta"
msgid "Standard Renderer"
msgstr "Estandarra (16bpp)"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Estandarra"
@@ -2015,37 +2011,37 @@ msgstr "Abiarazlea"
msgid "Do you really want to quit?"
msgstr "Benetan irten?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "Ukimen-pantailako 'kolpetxo modua' - Ezker klika"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "Ukimen-pantailako 'kolpetxo modua' - Eskuin klika"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "Ukimen-pantailako 'kolpetxo modua' - Flotatu (klikik ez)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Bolumen maximoa"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Bolumena igotzen"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Bolumen minimoa"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Bolumena jaisten"
@@ -2082,23 +2078,23 @@ msgstr "Teklatu numerikoa erakutsi"
msgid "Control Mouse"
msgstr "Saguaren kontrola"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Klikatzea gaituta"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Klikatzea desgaituta"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr ""
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
@@ -2114,7 +2110,7 @@ msgstr "Jokoa kargatu:"
msgid "Restore"
msgstr "Kargatu"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2125,7 +2121,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2136,7 +2132,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2458,10 +2454,6 @@ msgstr ""
msgid "Display/Hide Pause Menu"
msgstr ""
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr ""
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA lausotzea"
@@ -2600,36 +2592,36 @@ msgstr "~A~urrekoa"
msgid "~N~ext"
msgstr "~H~urrengoa"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Ahotsak bakarrik"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Ahotsak eta azpitituluak"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Azpitituluak bakarrik"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Ahotsak & azpit."
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Zailtasuna aukeratu."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Loom(TM)-ko eskuliburura jo ezazu laguntza lortzeko."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Entrenamendua"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Aditua"
@@ -2687,10 +2679,6 @@ msgstr "1-10 partida gorde"
msgid "Enter"
msgstr "Sartu"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Pantaila osoa jarri / kendu"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musikaren bolumena gora / behera"
@@ -3146,7 +3134,7 @@ msgstr "Eskuinera hegan egin"
msgid "Fly to lower right"
msgstr "Behera eta eskuinera hegan egin"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3155,7 +3143,7 @@ msgstr ""
"MIDI euskarri natiboak LucasArts-en Roland eguneraketa behar du,\n"
"baina %s ez dago eskuragarri. AdLib erabiliko da."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3195,16 +3183,16 @@ 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 support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
"DXA bideoak aurkitu dira, baina ScummVM zlib euskarri gabe konpilatu da"
-#: engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:561 engines/sword2/animation.cpp:461
#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+msgid ""
+"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
msgstr ""
-"PSX eszenak aurkitu dira, baina ScummVM RGB kolorearen euskarri gabe "
-"konpilatu da"
+"DXA bideoak aurkitu dira, baina ScummVM zlib euskarri gabe konpilatu da"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3257,13 +3245,6 @@ msgstr ""
"PSX eszenak aurkitu dira, baina ScummVM RGB kolorearen euskarri gabe "
"konpilatu da"
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-"DXA bideoak aurkitu dira, baina ScummVM zlib euskarri gabe konpilatu da"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr ""
@@ -3283,6 +3264,12 @@ msgid ""
"executable. Please decompress it"
msgstr ""
+#, fuzzy
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr ""
+#~ "PSX eszenak aurkitu dira, baina ScummVM RGB kolorearen euskarri gabe "
+#~ "konpilatu da"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Hainbat gehitu..."
diff --git a/po/fi_FI.po b/po/fi_FI.po
index d5308177ad..4a34148f39 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
"PO-Revision-Date: 2012-12-01 19:37+0200\n"
"Last-Translator: Toni Saarela <saarela@gmail.com>\n"
"Language-Team: Finnish\n"
@@ -88,8 +88,8 @@ msgstr "Nфytф nфppфimistі"
msgid "Remap keys"
msgstr "Mффritф nфppфimet uudelleen"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Kokoruututilan vaihto"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -108,7 +108,7 @@ msgstr "Nфppфinkartta"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -150,7 +150,7 @@ msgstr "Tunniste:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Lyhyt pelitunniste, jota kфytetффn kun viitataan pelitallennuksiin ja kun "
@@ -306,7 +306,7 @@ msgid "Extra Path:"
msgstr "Lisфkansio:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Mффrittфф polun lisфtiedostoihin joita peli mahdollisesti kфyttфф"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -320,7 +320,7 @@ msgstr "Tallennuskansio:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Mффrittфф polun pelitallennuksille"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -356,7 +356,7 @@ msgstr "Valitse pelin kansio"
msgid "Select additional game directory"
msgstr "Valitse lisфkansio pelille"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Valitse kansio pelitallennuksille"
@@ -401,7 +401,7 @@ msgid "~L~oad..."
msgstr "~L~ataa..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Lataa pelitallennus valitulle pelille"
#: gui/launcher.cpp:638
@@ -510,7 +510,7 @@ msgstr "Haluatko varmasti poistaa pelin asetuksineen listalta?"
#: gui/launcher.cpp:999
#, fuzzy
-msgid "Do you want to load savegame?"
+msgid "Do you want to load saved game?"
msgstr "Haluatko tallentaa vai ladata pelin?"
#: gui/launcher.cpp:1048
@@ -573,7 +573,7 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
+msgid "11 kHz"
msgstr "11 kHz"
#: gui/options.cpp:87
@@ -704,7 +704,7 @@ msgid "SoundFont:"
msgstr "Ффnifontti:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr ""
"Jotkut ффnikortit tukevat ффnifonttia (SoundFont), FluidSynth ja Timidity"
@@ -917,10 +917,6 @@ msgstr "ScummVM kфyttіliittymфn kieli"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "ScummVM pitфф kфynnistфф uudelleen jotta muutokset tulevat voimaan."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Valitse hakemisto pelitallennuksille."
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Valittuun hakemistoon ei voi kirjoittaa. Valitse toinen hakemisto."
@@ -970,7 +966,7 @@ msgid "Delete"
msgstr "Poista"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Haluatko varmasti poistaa tфmфn pelitallennuksen?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1032,7 +1028,7 @@ msgstr "Disabloitu GFX"
msgid "Standard Renderer"
msgstr "Standardirenderіijф (16 bpp)"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standardi"
@@ -2016,37 +2012,37 @@ msgstr "Pelivalitsin"
msgid "Do you really want to quit?"
msgstr "Haluatko varmasti lopettaa?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: backends/events/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 "Kosketusnфytіn 'Tap moodi' - vasen klikkaus"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "Kosketusnфytіn 'Tap moodi' - oikea klikkaus"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "Kosketusnфytіn 'Tap moodi' - ei klikkausta"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Maksimi ффnenvoimakkuus"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Nostetaan ффnenvoimakkuutta"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Minimi ффnenvoimakkuus"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Lasketaan ффnenvoimakkuutta"
@@ -2083,23 +2079,23 @@ msgstr "Nфytф keypad"
msgid "Control Mouse"
msgstr "Ohjaa hiirtф"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Klikkaus pффllф"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Klikkaus pois pффltф"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Kфytф alkuperфisiф tallenna/lataa valikkoja"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Kфytф alkuperфisiф tallenna/lataa valikkoja, ScummVM valikoiden sijaan"
@@ -2115,7 +2111,7 @@ msgstr "Lataa pelitallenne:"
msgid "Restore"
msgstr "Lataa tallenne"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2126,7 +2122,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2137,7 +2133,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2449,10 +2445,6 @@ msgstr ""
msgid "Display/Hide Pause Menu"
msgstr ""
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr ""
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA unditterіinti"
@@ -2591,36 +2583,36 @@ msgstr "E~d~ellinen"
msgid "~N~ext"
msgstr "Se~u~raava"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Vain puhe"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Puhe ja Tekstitys"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Vain tekstitys"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Puhe & teksti"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Valitse taitotasosi."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Lue Loom(TM) ohjekirjaa saadaksesi ohjeita."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Harjoitus"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Ekspertti"
@@ -2678,10 +2670,6 @@ msgstr "Tallenna pelitila 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Kytke kokoruututila pффlle tai pois"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musiikin ффnenvoimakkuus ylіs / alas"
@@ -3137,7 +3125,7 @@ msgstr "Lennф oikealle"
msgid "Fly to lower right"
msgstr "Lennф alas oikealle"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3146,7 +3134,7 @@ msgstr ""
"Suora MIDI tuki vaatii Roland pфivityksen LucasArtsilta, mutta\n"
"%s puuttuu. Kфytetффn AdLibia sen sijaan."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3186,14 +3174,16 @@ msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "PSX stream videota '%s' ei voi nфyttфф paletisoidussa tilassa"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
-msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
"DXA videotiedostoja lіydettiin mutta ScummVM on kффnnetty ilman zlib-tukea"
-#: engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:561 engines/sword2/animation.cpp:461
#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
-msgstr "PSX videoita lіydetty, mutta ScummVM on kффnnetty ilman RGB tukea"
+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"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3242,13 +3232,6 @@ msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr "PSX videoita lіydetty, mutta ScummVM on kффnnetty ilman RGB tukea"
-#: engines/sword2/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"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr "Nфytф esineiden tiedot"
@@ -3272,6 +3255,10 @@ msgstr ""
"Tiedosto teenagent.dat on pakattu, mutta zlib-kirjastoa ei ole kффnnetty "
"ScummVM:ффn. Pura teenagent.dat."
+#, fuzzy
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr "PSX videoita lіydetty, mutta ScummVM on kффnnetty ilman RGB tukea"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Lisфф monta..."
diff --git a/po/fr_FR.po b/po/fr_FR.po
index 71406e472c..300882ff94 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
-"PO-Revision-Date: 2013-04-26 12:24+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-07-05 13:49-0000\n"
"Last-Translator: Thierry Crozat <criezy@scummvm.org>\n"
"Language-Team: French <scummvm-devel@lists.sf.net>\n"
"Language: Francais\n"
@@ -16,6 +16,7 @@ msgstr ""
"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"
#: gui/about.cpp:94
#, c-format
@@ -87,8 +88,8 @@ msgstr "Afficher le clavier"
msgid "Remap keys"
msgstr "Changer l'affectation des touches"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Basculer en plein щcran"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -107,7 +108,7 @@ msgstr "Affecter"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -149,7 +150,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"ID compact du jeu utilisщe pour identifier les sauvegardes et dщmarrer le "
@@ -305,7 +306,7 @@ msgid "Extra Path:"
msgstr "Extra:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Dщfinie un chemin vers des donnщes suplщmentaires utilisщes par le jeu"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -319,7 +320,7 @@ msgstr "Sauvegardes:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Dщfinie l'emplacement oљ les fichiers de sauvegarde sont crщщs"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -355,7 +356,7 @@ msgstr "Sщlectionner le rщpertoire contenant les donnщes du jeu"
msgid "Select additional game directory"
msgstr "Sщlectionner un rщpertoire supplщmentaire"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Sщlectionner le rщpertoire pour les sauvegardes"
@@ -400,7 +401,7 @@ msgid "~L~oad..."
msgstr "~C~harger"
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Charge une sauvegarde pour le jeu sщlectionnщ"
#: gui/launcher.cpp:638
@@ -509,9 +510,8 @@ msgid "Do you really want to remove this game configuration?"
msgstr "Voulez-vous vraiment supprimer ce jeu ?"
#: gui/launcher.cpp:999
-#, fuzzy
-msgid "Do you want to load savegame?"
-msgstr "Voulez-vous charger ou enregistrer le jeu ?"
+msgid "Do you want to load saved game?"
+msgstr "Voulez-vous charger le jeu ?"
#: gui/launcher.cpp:1048
msgid "This game does not support loading games from the launcher."
@@ -571,7 +571,7 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
+msgid "11 kHz"
msgstr "11 kHz"
#: gui/options.cpp:87
@@ -702,10 +702,10 @@ msgid "SoundFont:"
msgstr "Banque de sons:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr ""
"La banque de sons (SoundFont) est utilisщe par certaines cartes audio, "
-"Fluidsynth et Timidity"
+"FluidSynth et Timidity"
#: gui/options.cpp:858
msgctxt "lowres"
@@ -756,15 +756,16 @@ msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 exacte (pas d'щmu GM)"
#: gui/options.cpp:891
-#, fuzzy
msgid "Roland GS Device (enable MT-32 mappings)"
-msgstr "Roland GS (dщsactive le mappage GM)"
+msgstr "Roland GS (active le mappage MT-32)"
#: gui/options.cpp:891
msgid ""
"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
"GS device"
msgstr ""
+"Utilisez cette option si vous voulez activez le mappage р la volщe pour une "
+"щmulation MT-32 sur un appareil Roland GS."
#: gui/options.cpp:900
msgid "Don't use Roland MT-32 music"
@@ -919,10 +920,6 @@ msgid "You have to restart ScummVM before your changes will take effect."
msgstr ""
"Vous devez relancer ScummVM pour que le changement soit pris en compte."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Sщlectionner le rщpertoire pour les sauvegardes"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
@@ -974,7 +971,7 @@ msgid "Delete"
msgstr "Supprimer"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Voulez-vous vraiment supprimer cette sauvegarde ?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1032,23 +1029,20 @@ msgid "Disabled GFX"
msgstr "GFX dщsactivщ"
#: gui/ThemeEngine.cpp:348
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Rendu Standard (16bpp)"
+msgstr "Rendu Standard"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Normal"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "Rendu Anti-crщnelщ (16 bpp)"
+msgstr "Rendu Anti-crщnelщ"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased"
-msgstr "Anti-crщnelщ (16 bpp)"
+msgstr "Anti-crщnelщ"
#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
msgid "Clear value"
@@ -1679,13 +1673,12 @@ msgid "Windowed mode"
msgstr "Mode Fenъtre"
#: backends/graphics/opengl/opengl-graphics.cpp:118
-#, fuzzy
msgid "OpenGL"
-msgstr "Ouvrir"
+msgstr "OpenGL"
#: backends/graphics/opengl/opengl-graphics.cpp:119
msgid "OpenGL (No filtering)"
-msgstr ""
+msgstr "OpenGL (sans filtre)"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -2018,37 +2011,37 @@ msgstr "Lanceur"
msgid "Do you really want to quit?"
msgstr "Voulez-vous vraiment quitter ?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "Touchscreen 'Tap Mode' - Clic Gauche"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "Touchscreen 'Tap Mode' - Clic Droit"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "Touchscreen 'Tap Mode' - Dщplacer sans cliquer"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Volume Maximum"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Augmentation Volume"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Volume Minimum"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Diminution Volume"
@@ -2084,23 +2077,23 @@ msgstr "Afficher le clavier"
msgid "Control Mouse"
msgstr "Contrєles la Souris"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Clic Activщ"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Clic Dщsactivщ"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Dialogues sauvegarde/chargement d'origine"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Utiliser les dialogues sauvegarde/chargement d'origine plutєt que ceux de "
@@ -2118,7 +2111,7 @@ msgstr "Charger le jeu:"
msgid "Restore"
msgstr "Charger"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2129,7 +2122,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2140,7 +2133,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2355,19 +2348,22 @@ msgstr "~E~ffets de l'Eau Activщs"
#: engines/neverhood/detection.cpp:167
msgid "Skip the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Sauter les scшnes storyboard de la Salle des Archives"
#: engines/neverhood/detection.cpp:168
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
msgstr ""
+"Permet au joueur de sauter les scшnes de storyboard de la Salle des Archives."
#: engines/neverhood/detection.cpp:174
msgid "Scale the making of videos to full screen"
-msgstr ""
+msgstr "Afficher les vidщos du 'making of' en plein щcran."
#: engines/neverhood/detection.cpp:175
msgid "Scale the making of videos, so that they use the whole screen"
msgstr ""
+"Redimensionne les vidщos du 'making of' pour qu'elles s'affichent en plein "
+"щcran."
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2453,10 +2449,6 @@ msgstr "Montrer/Cacher l'Щcran d'Info"
msgid "Display/Hide Pause Menu"
msgstr "Montrer/Cacher le Menu de Pause"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Dщtramage EGA"
@@ -2598,36 +2590,36 @@ msgstr "~P~rщcщdent"
msgid "~N~ext"
msgstr "~S~uivant"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Voix"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Voix et Sous-titres"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Sous-titres"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Voix & ST"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Sщlectionnez un niveau de compщtence."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Reportez-vous р votre manuel d'instruction."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Essai"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Expert"
@@ -2685,10 +2677,6 @@ msgstr "Щcrire sauvegarde 1-10:"
msgid "Enter"
msgstr "Entrer"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Basculer en plein щcran"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Augmenter / Diminuer volume musique"
@@ -3144,7 +3132,7 @@ msgstr "Voler vers la droite"
msgid "Fly to lower right"
msgstr "Voler vers la bas р droite"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3153,7 +3141,7 @@ msgstr ""
"Support MIDI natif requiшre la mise р jour Roland de LucasArt,\n"
"mais %s manque. Utilise AdLib р la place."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3195,17 +3183,17 @@ msgstr ""
"La scшne cinщmatique PSX '%s' ne peut pas ъtre lu avec 256 couleurs ou moins"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
-msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
-"Les sщquences DXA sont prщsente mais ScummVM a щtщ compilщ sans le support "
-"zlib."
+"Scшnes cinщmatiques DXA dщtectщes mais ScummVM a щtщ compilщ sans le support "
+"zlib et ne peut donc les afficher"
-#: engines/sword1/animation.cpp:561
-#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#: 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 ""
-"Scшnes cinщmatique PSX dщtectщes mais ScummVM a щtщ compilщ sans le support "
-"des couleurs RGB"
+"Scшnes cinщmatiques MPEG-2 dщtectщes mais ScummVM a щtщ compilщ sans le "
+"support du MPEG-2"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3255,16 +3243,8 @@ msgstr "C'est la fin de la dщmo des Chevaliers de Baphomet"
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
-"Scшnes cinщmatique PSX dщtectщes mais ScummVM a щtщ compilщ sans le support "
-"des couleurs RGB"
-
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-"Les sщquences DXA sont prщsente mais ScummVM a щtщ compilщ sans le support "
-"zlib."
+"Scшnes cinщmatiques PSX dщtectщes mais ScummVM a щtщ compilщ sans le support "
+"des couleurs RGB et ne peut donc les afficher"
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
@@ -3289,6 +3269,11 @@ msgstr ""
"Le fichier teenagent.dat est compressщ et cet exщcutable n'inclus pas zlib. "
"Veuillez le dщcompresser."
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr ""
+#~ "Scшnes cinщmatiques MPEG-2 dщtectщes mais ScummVM a щtщ compilщ sans le "
+#~ "support du MPEG-2"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Ajout Massif..."
diff --git a/po/gl_ES.po b/po/gl_ES.po
index f6fb04b619..cb2b7b31c9 100644
--- a/po/gl_ES.po
+++ b/po/gl_ES.po
@@ -7,14 +7,15 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
-"PO-Revision-Date: 2013-04-24 15:41+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-07-02 09:51+0100\n"
"Last-Translator: Santiago G. Sanz <s.sanz@uvigo.es>\n"
"Language-Team: Santiago G. Sanz <s.sanz@uvigo.es>\n"
"Language: Galego\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
#: gui/about.cpp:94
#, c-format
@@ -65,7 +66,7 @@ msgstr "Cancelar"
#: gui/browser.cpp:76 gui/chooser.cpp:47 gui/themebrowser.cpp:56
msgid "Choose"
-msgstr "Elexir"
+msgstr "Elixir"
#: gui/gui-manager.cpp:117 backends/keymapper/remap-dialog.cpp:53
#: engines/scumm/help.cpp:125 engines/scumm/help.cpp:140
@@ -86,8 +87,8 @@ msgstr "Mostrar teclado"
msgid "Remap keys"
msgstr "Asignar teclas"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Activar/desactivar pantalla completa"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -106,7 +107,7 @@ msgstr "Asignar"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -148,7 +149,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Identificador curto do xogo para os ficheiros de gardado e a execuciѓn do "
@@ -302,7 +303,7 @@ msgid "Extra Path:"
msgstr "Camiёo adicional:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Especifica o camiёo dos datos adicionais usados no xogo"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -316,7 +317,7 @@ msgstr "Camiёo de gardado:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Especifica o lugar dos ficheiros de gardado"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -352,7 +353,7 @@ msgstr "Selecciona un directorio con datos de xogo"
msgid "Select additional game directory"
msgstr "Selecciona un directorio con datos adicionais"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Selecciona un directorio para ficheiros de gardado"
@@ -397,7 +398,7 @@ msgid "~L~oad..."
msgstr "~C~argar..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Cargar partida do xogo seleccionado"
#: gui/launcher.cpp:638
@@ -505,9 +506,8 @@ msgid "Do you really want to remove this game configuration?"
msgstr "Seguro que queres eliminar esta configuraciѓn de xogo?"
#: gui/launcher.cpp:999
-#, fuzzy
-msgid "Do you want to load savegame?"
-msgstr "Queres cargar ou gardar a partida?"
+msgid "Do you want to load saved game?"
+msgstr "Queres cargar a partida gardada?"
#: gui/launcher.cpp:1048
msgid "This game does not support loading games from the launcher."
@@ -565,7 +565,7 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
+msgid "11 kHz"
msgstr "11 kHz"
#: gui/options.cpp:87
@@ -604,11 +604,11 @@ msgstr "non se puido cambiar a proporciѓn."
#: gui/options.cpp:734
msgid "Graphics mode:"
-msgstr "Modo de grсficos:"
+msgstr "Grсficos:"
#: gui/options.cpp:748
msgid "Render mode:"
-msgstr "Modo de procesamento:"
+msgstr "Procesamento:"
#: gui/options.cpp:748 gui/options.cpp:749
msgid "Special dithering modes supported by some games"
@@ -695,9 +695,9 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr ""
-"SoundFont щ compatible con algunhas tarxetas de son, Fluidsynth e Timidity"
+"SoundFont щ compatible con algunhas tarxetas de son, FluidSynth e Timidity"
#: gui/options.cpp:858
msgctxt "lowres"
@@ -747,15 +747,16 @@ msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 (sen emulaciѓn de GM)"
#: gui/options.cpp:891
-#, fuzzy
msgid "Roland GS Device (enable MT-32 mappings)"
-msgstr "Modo Roland GS (desactivar mapeamento GM)"
+msgstr "Dispositivo Roland GS (activar atribuciѓn MT-32)"
#: gui/options.cpp:891
msgid ""
"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
"GS device"
msgstr ""
+"Marcar para activar a atribuciѓn de parches e emular MT-32 nun dispositivo "
+"Roland GS"
#: gui/options.cpp:900
msgid "Don't use Roland MT-32 music"
@@ -908,10 +909,6 @@ msgstr "Idioma da interfaz de ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Debes reiniciar ScummVM para que os cambios teёan efecto."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Seleccionar directorio para ficheiros de gardado"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Non щ posible escribir no directorio elixido. Selecciona outro."
@@ -961,7 +958,7 @@ msgid "Delete"
msgstr "Eliminar"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Seguro que queres eliminar esta partida?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1019,23 +1016,20 @@ msgid "Disabled GFX"
msgstr "Efectos desactivados"
#: gui/ThemeEngine.cpp:348
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Procesamento estсndar (16 bpp)"
+msgstr "Procesamento estсndar"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Estсndar"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "Procesamento antidistorsiѓn (16 bpp)"
+msgstr "Procesamento antidistorsiѓn"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased"
-msgstr "Antidistorsiѓn (16 bpp)"
+msgstr "Antidistorsiѓn"
#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
msgid "Clear value"
@@ -1666,13 +1660,12 @@ msgid "Windowed mode"
msgstr "Modo en ventс"
#: backends/graphics/opengl/opengl-graphics.cpp:118
-#, fuzzy
msgid "OpenGL"
-msgstr "Abrir"
+msgstr "OpenGL"
#: backends/graphics/opengl/opengl-graphics.cpp:119
msgid "OpenGL (No filtering)"
-msgstr ""
+msgstr "OpenGL (Sen filtraxe)"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -2003,37 +1996,37 @@ msgstr "Iniciador"
msgid "Do you really want to quit?"
msgstr "Seguro que queres saэr?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "Modo pantalla tсctil: premer botѓn primario"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "Modo pantalla tсctil: premer botѓn secundario"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "Modo pantalla tсctil: apuntar co rato (sen premer)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Volume mсximo"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Subindo volume"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Volume mэnimo"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Baixando volume"
@@ -2069,23 +2062,23 @@ msgstr "Mostrar teclado numщrico"
msgid "Control Mouse"
msgstr "Rato"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Premer activado"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Premer desactivado"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Empregar pantallas orixinais de gardado e carga"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Empregar as pantallas orixinais de gardado e carga, no canto das de ScummVM"
@@ -2102,7 +2095,7 @@ msgstr "Restaurar xogo:"
msgid "Restore"
msgstr "Restaurar"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2113,7 +2106,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2124,7 +2117,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2339,19 +2332,19 @@ msgstr "Efecto de ~a~uga activado"
#: engines/neverhood/detection.cpp:167
msgid "Skip the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Omitir as escenas do Salѓn dos rexistros"
#: engines/neverhood/detection.cpp:168
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Permite ao xogador saltar as escenas do Salѓn dos rexistros"
#: engines/neverhood/detection.cpp:174
msgid "Scale the making of videos to full screen"
-msgstr ""
+msgstr "Redimensionar vэdeos a pantalla completa"
#: engines/neverhood/detection.cpp:175
msgid "Scale the making of videos, so that they use the whole screen"
-msgstr ""
+msgstr "Redimensionar a creaciѓn de vэdeos en pantalla completa"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2439,10 +2432,6 @@ msgstr "Mostrar/Ocultar pantalla de informaciѓn"
msgid "Display/Hide Pause Menu"
msgstr "Mostrar/Ocultar menњ de pausa"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Non interpolaciѓn EGA"
@@ -2584,36 +2573,36 @@ msgstr "~A~nterior"
msgid "~N~ext"
msgstr "~S~eguinte"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Sѓ voz"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Voz e subtэtulos"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Sѓ subtэtulos"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Voz e subs"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Selecciona un nivel de habilidade."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Consulta o manual de Loom(TM) para obter axuda."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Prсctica"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Experto"
@@ -2671,10 +2660,6 @@ msgstr "Gardar partida 1-10"
msgid "Enter"
msgstr "INTRO"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Activar/desactivar pantalla completa"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Subir/baixar volume de mњsica"
@@ -3130,7 +3115,7 @@ msgstr "Voar с dereita"
msgid "Fly to lower right"
msgstr "Voar с dereita abaixo"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3139,7 +3124,7 @@ msgstr ""
"A compatibilidade nativa con MIDI precisa a actualizaciѓn de Roland\n"
"de LucasArts, mais falla %s. Empregarase AdLib."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3179,17 +3164,17 @@ msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "Non se pode reproducir a secuencia %s de PSX neste modo grсfico"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
-msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
"Atopсronse secuencias de DXA. No entanto, esta versiѓn de ScummVM non щ "
"compatible con zlib"
-#: engines/sword1/animation.cpp:561
-#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#: 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 ""
-"Atopсronse secuencias de PSX. No entanto, a versiѓn de ScummVM non щ "
-"compatible con cores RGB"
+"Atopсronse secuencias MPEG-2, mais ScummVM foi compilado sen compatibilidade "
+"con MPEG-2"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3242,14 +3227,6 @@ msgstr ""
"Atopсronse secuencias de PSX. No entanto, a versiѓn de ScummVM non щ "
"compatible con cores RGB"
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-"Atopсronse secuencias de DXA. No entanto, esta versiѓn de ScummVM non щ "
-"compatible con zlib"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr "Mostrar etiquetas"
@@ -3272,6 +3249,9 @@ msgstr ""
"O ficheiro teenagent.dat estс comprimido e zlib non foi incluэdo neste "
"executable. Descomprime o ficheiro"
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr "Atopсronse secuencias MPEG-2, mais ScummVM foi compilado sen MPEG-2"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Engadir en masa..."
diff --git a/po/hu_HU.po b/po/hu_HU.po
index 74f1a39ed5..c0648e4602 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
"PO-Revision-Date: 2014-02-18 06:30+0100\n"
"Last-Translator: George Kormendi <grubycza@hotmail.com>\n"
"Language-Team: Hungarian\n"
@@ -89,8 +89,8 @@ msgstr "Billentyћzet beсllэtсsok"
msgid "Remap keys"
msgstr "Billentyћk сtсllэtсsa"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Teljeskщpernyѕ kapcsolѓ"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -109,7 +109,7 @@ msgstr "Kiosztсs"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -151,7 +151,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Rіvid jсtщkazonosэtѓ a jсtщkmentщsekhez щs a jсtщk parancssori futtatсsсhoz"
@@ -305,7 +305,7 @@ msgid "Extra Path:"
msgstr "Extra Mappa:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Mappa kivсlasztсs a jсtщkok kiegщszэtѕ fсjljaihoz"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -319,7 +319,7 @@ msgstr "Mentщs Mappa:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Jсtщkmentщsek helyщnek meghatсrozсsa"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -355,7 +355,7 @@ msgstr "Jсtщkok helyщnek kivсlasztсsa"
msgid "Select additional game directory"
msgstr "Vсlassz mappсt a jсtщk kiegщszэtѕkhіz"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Vсlaszz jсtщkmentщseknek mappсt"
@@ -400,7 +400,7 @@ msgid "~L~oad..."
msgstr "Betіltщs"
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Kimentett jсtщkсllсs betіltщse"
#: gui/launcher.cpp:638
@@ -508,7 +508,7 @@ msgid "Do you really want to remove this game configuration?"
msgstr "Biztosan tіrіlni akarod ezt a jсtщkkonfigurсciѓt?"
#: gui/launcher.cpp:999
-msgid "Do you want to load savegame?"
+msgid "Do you want to load saved game?"
msgstr "Akarod hogy betіltщsem a jсtщkсllсst?"
#: gui/launcher.cpp:1048
@@ -568,8 +568,8 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
-msgstr "11kHz"
+msgid "11 kHz"
+msgstr "11 kHz"
#: gui/options.cpp:87
msgid "22 kHz"
@@ -696,9 +696,9 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr ""
-"Nщhсny hangkсrya, Fluidsynth щs Timidyti tсmogatja a SoundFont betіltщsщt"
+"Nщhсny hangkсrya, FluidSynth щs Timidyti tсmogatja a SoundFont betіltщsщt"
#: gui/options.cpp:858
msgctxt "lowres"
@@ -908,10 +908,6 @@ msgstr "A ScummVM GUI nyelve"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Indэtsd њjra a ScummVM-et a vсltozсsok щrvщnyesэtщsщhez."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Vсlassz jсtщkmentщs mappсt"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "A kivсlasztott mappсba nem lehet эrni, vсlassz egy mсsikat"
@@ -961,7 +957,7 @@ msgid "Delete"
msgstr "Tіrіl"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Biztos hogy tіrіlni akarod ezt a jсtщkсllсst?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1022,7 +1018,7 @@ msgstr "GFX letiltva"
msgid "Standard Renderer"
msgstr "Standard lekщpezѕ"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Сtlagos"
@@ -1992,37 +1988,37 @@ msgstr "Indэtѓpult"
msgid "Do you really want to quit?"
msgstr "Biztos hogy ki akarsz lщpni ?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "Щrintѕkщpernyѕ 'Tap Mѓd' - Bal katt"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "Щrintѕkщpernyѕ 'Tap Mѓd' - Jobb katt"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "Щrintѕkщpernyѕ 'Tap Mѓd' - Lebegѕ (Nincs katt)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Maximum Hangerѕ"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Hangerѕ nіvelщse"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Minimum Hangerѕ"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Hangerѕ csіkkentщse"
@@ -2058,23 +2054,23 @@ msgstr "Kщzi billentyћzet"
msgid "Control Mouse"
msgstr "Egщr irсnyitсs"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Kattintсs engedve"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Kattintсs tiltva"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Eredeti ment/tіlt kщpernyѕk hasznсlata"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Az eredeti mentщs/betіltщs kщpernyѕ hasznсlata a ScummVM kщpek helyett"
@@ -2090,7 +2086,7 @@ msgstr "Jсtщkmenet visszaсllэtсsa:"
msgid "Restore"
msgstr "Visszaсllэtсs"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2101,7 +2097,7 @@ msgstr ""
"\n"
"%s fсjlbѓl nem sikerќlt"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2112,7 +2108,7 @@ msgstr ""
"\n"
"%s fсjlba nem sikerќlt"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2426,10 +2422,6 @@ msgstr "Infѓkщpernyѕ Kщpre/Elrejt"
msgid "Display/Hide Pause Menu"
msgstr "Szќnet menќ Kщpre/Elrejt"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA szinjavэtсs"
@@ -2567,36 +2559,36 @@ msgstr "Elѕzѕ"
msgid "~N~ext"
msgstr "Kіvetkezѕ"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Csak beszщd"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Beszщd щs felirat"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Csak felirat"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Beszщd & Felir"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Vсlassz hozzсщrtщs szintet."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Segэtsщgщrt nщzd meg a Loom(TM) kщzikіnyvedet."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Gyakorlсs"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Szakщrtѕ"
@@ -2654,10 +2646,6 @@ msgstr "1-10 Jсtщkсllсs mentщse"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Teljeskщpernyѕ kapcsolѓ"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Zene hangerѕ fel / le"
@@ -3113,7 +3101,7 @@ msgstr "Jobbra repќlщs"
msgid "Fly to lower right"
msgstr "Jobbra le repќlщs"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3122,7 +3110,7 @@ msgstr ""
"Native MIDI tсmogatсshoz kell a Roland Upgrade a LucasArts-tѓl,\n"
"a %s hiсnyzik. AdLib-ot hasznсlok helyette."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3162,13 +3150,15 @@ msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "'%s' PSX stream сtvezetѕ nem jсtszhatѓ le paletta mѓdban"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
-msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr "DXA сtvezetѕ elщrhetѕ, de a ScummVM zlib tсmogatсs nincs lefordэtva"
-#: engines/sword1/animation.cpp:561
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#: 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 сtvezetѕfilmet talсltam, de a ScummVM MPEG-2 nщlkќl van lefordэtva"
+"MPEG-2 сtvezetѕfilmet talсltam, de a ScummVM MPEG-2 tсmogatсs nщlkќl van "
+"lefordэtva"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3221,13 +3211,6 @@ msgstr ""
"PSX сtvezetѕfilmet talсltam, de ez a ScummVM RGB szэntсmogatсs nщlkќl van "
"lefordэtva"
-#: engines/sword2/animation.cpp:461
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-"MPEG-2 сtvezetѕfilmet talсltam, de a ScummVM MPEG-2 tсmogatсs nщlkќl van "
-"lefordэtva"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr "Tсrgycimke lсthatѓ"
@@ -3249,6 +3232,10 @@ 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"
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr ""
+#~ "MPEG-2 сtvezetѕfilmet talсltam, de a ScummVM MPEG-2 nщlkќl van lefordэtva"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Masszэv mѓd..."
diff --git a/po/it_IT.po b/po/it_IT.po
index 7f5e685222..27c7ebe3eb 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
-"PO-Revision-Date: 2013-04-27 11:41+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-07-03 17:59-0600\n"
"Last-Translator: Matteo 'Maff' Angelino <matteo.maff at gmail dot com>\n"
"Language-Team: Italian\n"
"Language: Italiano\n"
@@ -23,7 +23,7 @@ msgstr "(build creata il %s)"
#: gui/about.cpp:101
msgid "Features compiled in:"
-msgstr "Funzionalitр compilate in:"
+msgstr "Funzionalitр incluse:"
#: gui/about.cpp:110
msgid "Available engines:"
@@ -86,8 +86,8 @@ msgstr "Mostra tastiera"
msgid "Remap keys"
msgstr "Riprogramma tasti"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Attiva / disattiva schermo intero"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -106,7 +106,7 @@ msgstr "Mappa"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -148,7 +148,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Breve identificatore di gioco utilizzato per il riferimento a salvataggi e "
@@ -303,7 +303,7 @@ msgid "Extra Path:"
msgstr "Percorso extra:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Specifica il percorso di ulteriori dati usati dal gioco"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -317,7 +317,7 @@ msgstr "Salvataggi:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Specifica dove archiviare i salvataggi"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -353,7 +353,7 @@ msgstr "Seleziona la cartella contenente i file di gioco"
msgid "Select additional game directory"
msgstr "Seleziona la cartella di gioco aggiuntiva"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Seleziona la cartella dei salvataggi"
@@ -398,7 +398,7 @@ msgid "~L~oad..."
msgstr "~C~arica..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Carica un salvataggio del gioco selezionato"
#: gui/launcher.cpp:638
@@ -506,9 +506,8 @@ msgid "Do you really want to remove this game configuration?"
msgstr "Sei sicuro di voler rimuovere questa configurazione di gioco?"
#: gui/launcher.cpp:999
-#, fuzzy
-msgid "Do you want to load savegame?"
-msgstr "Vuoi caricare o salvare il gioco?"
+msgid "Do you want to load saved game?"
+msgstr "Vuoi caricare il salvataggio?"
#: gui/launcher.cpp:1048
msgid "This game does not support loading games from the launcher."
@@ -570,8 +569,8 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
-msgstr "11kHz"
+msgid "11 kHz"
+msgstr "11 kHz"
#: gui/options.cpp:87
msgid "22 kHz"
@@ -701,8 +700,8 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
-msgstr "SoundFont ш supportato da alcune schede audio, Fluidsynth e Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
+msgstr "SoundFont ш supportato da alcune schede audio, FluidSynth e Timidity"
#: gui/options.cpp:858
msgctxt "lowres"
@@ -753,15 +752,16 @@ msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 effettivo (disat.emul.GM)"
#: gui/options.cpp:891
-#, fuzzy
msgid "Roland GS Device (enable MT-32 mappings)"
-msgstr "Modalitр Roland GS (disattiva mappatura GM)"
+msgstr "Dispositivo Roland GS (attiva mappature MT-32)"
#: gui/options.cpp:891
msgid ""
"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
"GS device"
msgstr ""
+"Seleziona se vuoi attivare le mappature per emulare un MT-32 su un "
+"dispositivo Roland GS"
#: gui/options.cpp:900
msgid "Don't use Roland MT-32 music"
@@ -913,10 +913,6 @@ msgstr "Lingua dell'interfaccia grafica di ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Devi riavviare ScummVM affinchщ le modifiche abbiano effetto."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Seleziona la cartella per i salvataggi"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "La cartella scelta ш in sola lettura. Si prega di sceglierne un'altra."
@@ -966,7 +962,7 @@ msgid "Delete"
msgstr "Elimina"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Sei sicuro di voler eliminare questo salvataggio?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1024,23 +1020,20 @@ msgid "Disabled GFX"
msgstr "Grafica disattivata"
#: gui/ThemeEngine.cpp:348
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Renderer standard (16bpp)"
+msgstr "Renderer standard"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Medio"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "Renderer con antialiasing (16bpp)"
+msgstr "Renderer con antialiasing"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased"
-msgstr "Con antialiasing (16bpp)"
+msgstr "Con antialiasing"
#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
msgid "Clear value"
@@ -1674,13 +1667,12 @@ msgid "Windowed mode"
msgstr "Modalitр finestra"
#: backends/graphics/opengl/opengl-graphics.cpp:118
-#, fuzzy
msgid "OpenGL"
-msgstr "Apri"
+msgstr "OpenGL"
#: backends/graphics/opengl/opengl-graphics.cpp:119
msgid "OpenGL (No filtering)"
-msgstr ""
+msgstr "OpenGL (senza filtri)"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -2011,37 +2003,37 @@ msgstr "Elenco giochi"
msgid "Do you really want to quit?"
msgstr "Sei sicuro di voler uscire?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "Touchscreen 'Tap Mode' - Clic sinistro"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "Touchscreen 'Tap Mode' - Clic destro"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "Touchscreen 'Tap Mode' - Passaggio del cursore (nessun clic)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Volume massimo"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Aumento volume"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Volume minimo"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Diminuzione volume"
@@ -2077,23 +2069,23 @@ msgstr "Mostra tastierino numerico"
msgid "Control Mouse"
msgstr "Controllo mouse"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Clic attivato"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Clic disattivato"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Usa schermate di salvataggio originali"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
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 "
@@ -2111,7 +2103,7 @@ msgstr "Ripristina gioco:"
msgid "Restore"
msgstr "Ripristina"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2122,7 +2114,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2133,7 +2125,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2348,19 +2340,19 @@ msgstr "~E~ffetto acqua attivo"
#: engines/neverhood/detection.cpp:167
msgid "Skip the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Salta le scene della Hall of Records"
#: engines/neverhood/detection.cpp:168
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Permette al giocatore di saltare le scene della Hall of Records"
#: engines/neverhood/detection.cpp:174
msgid "Scale the making of videos to full screen"
-msgstr ""
+msgstr "Ridimensiona a tutto schermo i video dietro le quinte"
#: engines/neverhood/detection.cpp:175
msgid "Scale the making of videos, so that they use the whole screen"
-msgstr ""
+msgstr "Ridimensiona i video dietro le quinte, per adattarli allo schermo"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2448,10 +2440,6 @@ msgstr "Mostra/nascondi schermana info"
msgid "Display/Hide Pause Menu"
msgstr "Mostra/nascondi menu pausa"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Undithering EGA"
@@ -2592,36 +2580,36 @@ msgstr "~P~recedenti"
msgid "~N~ext"
msgstr "~S~uccessivi"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Solo voci"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Voci e testo"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Solo testo"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Voci e testo"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Selezionate un livello di difficoltр."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Consultate il manuale delle istruzioni."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Base"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Expert"
@@ -2679,10 +2667,6 @@ msgstr "Salva nella posizione 1-10"
msgid "Enter"
msgstr "Invio"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Attiva / disattiva schermo intero"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Volume musica su / giљ"
@@ -3138,7 +3122,7 @@ msgstr "Vola a destra"
msgid "Fly to lower right"
msgstr "Vola in basso a destra"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3147,7 +3131,7 @@ msgstr ""
"Il supporto nativo MIDI richiede il Roland Upgrade della LucasArts,\n"
"ma %s non ш presente. Verrр usato AdLib."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3189,17 +3173,17 @@ msgstr ""
"La scena PSX di intermezzo '%s' non puђ essere eseguita in modalitр tavolozza"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
-msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
"Sono state trovare scene di intermezzo DXA ma ScummVM ш stato compilato "
"senza il supporto zlib"
-#: engines/sword1/animation.cpp:561
-#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#: 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 ""
-"Sono state trovare scene di intermezzo PSX ma ScummVM ш stato compilato "
-"senza il supporto colori RGB"
+"Sono state trovare scene di intermezzo MPEG-2 ma ScummVM ш stato compilato "
+"senza il supporto MPEG-2"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3252,14 +3236,6 @@ msgstr ""
"Sono state trovare scene di intermezzo PSX ma ScummVM ш stato compilato "
"senza il supporto colori RGB"
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-"Sono state trovare scene di intermezzo DXA ma ScummVM ш stato compilato "
-"senza il supporto zlib"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr "Mostra etichette oggetti"
@@ -3281,6 +3257,11 @@ msgstr ""
"Il file teenagent.dat ш compresso e zlib non ш stata inclusa in questo "
"eseguibile. Si prega di decomprimerlo"
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr ""
+#~ "Sono state trovare scene di intermezzo MPEG-2 ma ScummVM ш stato "
+#~ "compilato senza MPEG-2"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Agg. massa..."
diff --git a/po/nb_NO.po b/po/nb_NO.po
index 72b95cdb56..172b402324 100644
--- a/po/nb_NO.po
+++ b/po/nb_NO.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
-"PO-Revision-Date: 2013-04-24 14:05+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-07-11 00:02+0100\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"
@@ -22,7 +22,7 @@ msgstr ""
#: gui/about.cpp:94
#, c-format
msgid "(built on %s)"
-msgstr "(bygd den %s)"
+msgstr "(bygd %s)"
#: gui/about.cpp:101
msgid "Features compiled in:"
@@ -42,7 +42,7 @@ msgstr "Vis filer merket med ЋskjultЛ-attributten"
#: gui/browser.cpp:72
msgid "Go up"
-msgstr "Gх tilbake"
+msgstr "Opp et nivх"
#: gui/browser.cpp:72 gui/browser.cpp:74
msgid "Go to previous directory level"
@@ -51,7 +51,7 @@ msgstr "Gх til forrige mappenivх"
#: gui/browser.cpp:74
msgctxt "lowres"
msgid "Go up"
-msgstr "Gх tilbake"
+msgstr "Oppover"
#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:351 gui/massadd.cpp:95 gui/options.cpp:1239
@@ -89,8 +89,8 @@ msgstr "Vis tastatur"
msgid "Remap keys"
msgstr "Omkoble taster"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Veksle fullskjerm"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -109,7 +109,7 @@ msgstr "Koble"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -151,7 +151,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Kort spill-identifikator, brukt for х referere til lagrede spill, og х kjјre "
@@ -307,7 +307,7 @@ msgid "Extra Path:"
msgstr "Ekstrasti:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Bestemmer sti til ytterligere data brukt av spillet"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -321,7 +321,7 @@ msgstr "Lagringssti:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Bestemmer sti til lagrede spill"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -357,7 +357,7 @@ msgstr "Velg mappe med spilldata"
msgid "Select additional game directory"
msgstr "Velg mappe med ytterligere data"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Velg mappe for lagrede spill"
@@ -402,7 +402,7 @@ msgid "~L~oad..."
msgstr "~Х~pne..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Хpne lagret spill for det valgte spillet"
#: gui/launcher.cpp:638
@@ -510,9 +510,8 @@ msgid "Do you really want to remove this game configuration?"
msgstr "Vil du virkelig fjerne denne spillkonfigurasjonen?"
#: gui/launcher.cpp:999
-#, fuzzy
-msgid "Do you want to load savegame?"
-msgstr "Vil du хpne eller lagre spillet?"
+msgid "Do you want to load saved game?"
+msgstr "Vil du laste et lagret spill?"
#: gui/launcher.cpp:1048
msgid "This game does not support loading games from the launcher."
@@ -573,8 +572,8 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
-msgstr "11kHz"
+msgid "11 kHz"
+msgstr "11 kHz"
#: gui/options.cpp:87
msgid "22 kHz"
@@ -702,7 +701,7 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr "SoundFont stјttes ikke av enkelte lydkort, FluidSynth og Timidity"
#: gui/options.cpp:858
@@ -752,9 +751,8 @@ msgid "True Roland MT-32 (no GM emulation)"
msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)"
#: gui/options.cpp:891
-#, fuzzy
msgid "Roland GS Device (enable MT-32 mappings)"
-msgstr "Roland GS Modus (deaktiver GM-mapping)"
+msgstr "Roland GS Modus (aktiver MT32-mapping)"
#: gui/options.cpp:891
msgid ""
@@ -872,7 +870,7 @@ msgstr "Pluginsti:"
#: gui/options.cpp:1170 gui/fluidsynth-dialog.cpp:138
msgid "Misc"
-msgstr "Div"
+msgstr "Diverse"
#: gui/options.cpp:1172
msgctxt "lowres"
@@ -912,10 +910,6 @@ msgstr "Sprхk i ScummVM-GUIet"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Du mх starte ScummVM pх nytt for at endringene skal tre i kraft. "
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Velg mappe for lagrede spill"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Den valgte mappen kan ikke skrives til. Vennligst velg en annen."
@@ -965,7 +959,7 @@ msgid "Delete"
msgstr "Slett"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Vil du virkelig slette dette lagrede spillet?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1023,37 +1017,32 @@ msgid "Disabled GFX"
msgstr "Deaktivert GFX"
#: gui/ThemeEngine.cpp:348
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Standard Tegner (16bpp)"
+msgstr "Standard tegner"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standard"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "Antialiased Tegner (16bpp)"
+msgstr "Kantutjevnet tegner"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased"
-msgstr "Antialiased (16bpp)"
+msgstr "Kantutjevnet"
#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
msgid "Clear value"
msgstr "Tјm verdi"
#: gui/fluidsynth-dialog.cpp:68
-#, fuzzy
msgid "Reverb"
-msgstr "Aldri"
+msgstr "Romklang"
#: gui/fluidsynth-dialog.cpp:70 gui/fluidsynth-dialog.cpp:102
-#, fuzzy
msgid "Active"
-msgstr " (Aktiv)"
+msgstr "Aktiv"
#: gui/fluidsynth-dialog.cpp:72
msgid "Room:"
@@ -1065,11 +1054,11 @@ msgstr ""
#: gui/fluidsynth-dialog.cpp:86
msgid "Width:"
-msgstr ""
+msgstr "Bredde:"
#: gui/fluidsynth-dialog.cpp:93 gui/fluidsynth-dialog.cpp:111
msgid "Level:"
-msgstr ""
+msgstr "Nivх:"
#: gui/fluidsynth-dialog.cpp:100
msgid "Chorus"
@@ -1077,40 +1066,39 @@ msgstr ""
#: gui/fluidsynth-dialog.cpp:104
msgid "N:"
-msgstr ""
+msgstr "N:"
#: gui/fluidsynth-dialog.cpp:118
-#, fuzzy
msgid "Speed:"
-msgstr "Tale"
+msgstr "Hastighet:"
#: gui/fluidsynth-dialog.cpp:125
msgid "Depth:"
-msgstr ""
+msgstr "Dybde:"
#: gui/fluidsynth-dialog.cpp:132
msgid "Type:"
-msgstr ""
+msgstr "Type:"
#: gui/fluidsynth-dialog.cpp:135
msgid "Sine"
-msgstr ""
+msgstr "Sinus"
#: gui/fluidsynth-dialog.cpp:136
msgid "Triangle"
-msgstr ""
+msgstr "Trekant"
#: gui/fluidsynth-dialog.cpp:140
msgid "Interpolation:"
-msgstr ""
+msgstr "Interpolering:"
#: gui/fluidsynth-dialog.cpp:143
msgid "None (fastest)"
-msgstr ""
+msgstr "Ingen (raskest)"
#: gui/fluidsynth-dialog.cpp:144
msgid "Linear"
-msgstr ""
+msgstr "Linjцr"
#: gui/fluidsynth-dialog.cpp:145
msgid "Fourth-order"
@@ -1122,17 +1110,17 @@ msgstr ""
#: gui/fluidsynth-dialog.cpp:150
msgid "Reset"
-msgstr ""
+msgstr "Nullstill"
#: gui/fluidsynth-dialog.cpp:150
msgid "Reset all FluidSynth settings to their default values."
-msgstr ""
+msgstr "Nullstill alle FluidSynth-instillinger til standardverdier"
#: gui/fluidsynth-dialog.cpp:217
-#, fuzzy
msgid ""
"Do you really want to reset all FluidSynth settings to their default values?"
-msgstr "Vil du virkelig returnere til oppstarteren?"
+msgstr ""
+"Vil du virkelig nullstille alle FluidSynth-instillinger til standardverdier?"
#: base/main.cpp:228
#, c-format
@@ -1672,13 +1660,12 @@ msgid "Windowed mode"
msgstr "Vindusmodus"
#: backends/graphics/opengl/opengl-graphics.cpp:118
-#, fuzzy
msgid "OpenGL"
-msgstr "Хpne"
+msgstr "OpenGL"
#: backends/graphics/opengl/opengl-graphics.cpp:119
msgid "OpenGL (No filtering)"
-msgstr ""
+msgstr "OpenGL (Ingen filtrering)"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -2010,37 +1997,37 @@ msgstr "Oppstarter"
msgid "Do you really want to quit?"
msgstr "Vil du virkelig avslutte?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "Touchskjerm 'Tapmodus' - Venstreklikk"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "Touchskjerm 'Tapmodus' - Hјyreklikk"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "Touchskjerm 'Tapmodus' - Sveve (Ingen Klikk)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Maksimalt Volum"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "иker volum"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Minimalt Volum"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Senker volum"
@@ -2076,23 +2063,23 @@ msgstr "Vis talltastatur"
msgid "Control Mouse"
msgstr "Styr Mus"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Klikking aktivert"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Klikking deaktivert"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Bruk originale lagre/laste-skjermer"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Bruk de originale lagre/laste-skjermene, istedenfor ScummVM-variantene"
@@ -2108,7 +2095,7 @@ msgstr "Gjennopprett spill:"
msgid "Restore"
msgstr "Gjenopprett"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2119,7 +2106,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2130,7 +2117,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2209,8 +2196,9 @@ msgstr "Aktiver studiopublikum"
#. I18N: This option allows the user to skip text and cutscenes.
#: engines/kyra/detection.cpp:73
+#, fuzzy
msgid "Skip support"
-msgstr ""
+msgstr "Hopp over"
#: engines/kyra/detection.cpp:74
msgid "Allow text and cutscenes to be skipped"
@@ -2345,19 +2333,19 @@ msgstr "~V~anneffekt aktivert"
#: engines/neverhood/detection.cpp:167
msgid "Skip the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Hopp over Hall of Records storyboard scenene."
#: engines/neverhood/detection.cpp:168
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Tillater spilleren х hoppe forbi Hall of Records storyboard scener. "
#: engines/neverhood/detection.cpp:174
msgid "Scale the making of videos to full screen"
-msgstr ""
+msgstr "Skaler Ћmaking ofЛ-videoer til fullskjerm"
#: engines/neverhood/detection.cpp:175
msgid "Scale the making of videos, so that they use the whole screen"
-msgstr ""
+msgstr "Skaler Ћmaking ofЛ-videoene, slik at de bruker hele skjermen."
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2445,10 +2433,6 @@ msgstr "Vis/Skjul Infoskjerm"
msgid "Display/Hide Pause Menu"
msgstr "Vis/Skjul Pausemeny"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA av-dithering"
@@ -2587,36 +2571,36 @@ msgstr "~F~orrige"
msgid "~N~ext"
msgstr "~N~este"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Kun tale"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Tale og undertekster"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Kun undertekster"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Tekst & Tale"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Velg ferdighetsnivх"
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Referer til Loom(TM)-hхndboka di for hjelp."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Trening"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Ekspert"
@@ -2674,10 +2658,6 @@ msgstr "Lagre spilltilstand 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Veksle fullskjerm"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musikkvolum opp/ned"
@@ -3133,7 +3113,7 @@ msgstr "Fly til hјyre"
msgid "Fly to lower right"
msgstr "Fly til nedre hјyre"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3142,7 +3122,7 @@ msgstr ""
"Ekte MIDI-stјtte krever ЋRoland UpgradeЛ fra LucasArts,\n"
"men %s mangler. Bruker AdLib istedet."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3182,13 +3162,13 @@ msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "PSX-strјm cutscene '%s' kan ikke spilles i pallettmodus"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
-msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr "DXA-cutscener funnet men ScummVM er bygd uten zlib-stјtte"
-#: engines/sword1/animation.cpp:561
-#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
-msgstr "PSX-cutscener funnet, men ScummVM har blitt bygd uten RGB-fargestјtte"
+#: 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 "MPEG2-cutscener funnet men ScummVM er bygd uten MPEG2-stјtte"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3239,12 +3219,6 @@ msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr "PSX-cutscener funnet, men ScummVM har blitt bygd uten RGB-fargestјtte"
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr "DXA-cutscener funnet men ScummVM er bygd uten zlib-stјtte"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr "Vis objektmerkelapper"
@@ -3266,6 +3240,9 @@ msgstr ""
"teenagent.dat-fila er komprimert og zlib har ikke blitt inkludert i denne "
"programfilen. Vennligst pakk den ut"
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr "MPEG2-cutscener funnet men ScummVM er bygd uten MPEG2-stјtte"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Legg til flere..."
diff --git a/po/nl_NL.po b/po/nl_NL.po
new file mode 100644
index 0000000000..2d43470fd5
--- /dev/null
+++ b/po/nl_NL.po
@@ -0,0 +1,3269 @@
+# LANGUAGE translation for ScummVM.
+# Copyright (C) YEAR ScummVM Team
+# This file is distributed under the same license as the ScummVM package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ScummVM 1.8.0git\n"
+"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-09-03 07:42+0100\n"
+"Last-Translator: Ben Castricum <scummvm@bencastricum.nl>\n"
+"Language-Team: Ben Castricum <scummvm@bencastricum.nl>\n"
+"Language: Nederlands\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.3\n"
+"X-Poedit-SourceCharset: iso-8859-1\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: gui/about.cpp:94
+#, c-format
+msgid "(built on %s)"
+msgstr "(gebouwd op %s)"
+
+#: gui/about.cpp:101
+msgid "Features compiled in:"
+msgstr "Features meegecompileerd:"
+
+#: gui/about.cpp:110
+msgid "Available engines:"
+msgstr "Beschikbare engines:"
+
+#: gui/browser.cpp:68
+msgid "Show hidden files"
+msgstr "Verborgen bestanden weergeven"
+
+#: gui/browser.cpp:68
+msgid "Show files marked with the hidden attribute"
+msgstr "Toon de bestanden die met het verborgen kenmerk hebben."
+
+#: gui/browser.cpp:72
+msgid "Go up"
+msgstr "Ga omhoog"
+
+#: gui/browser.cpp:72 gui/browser.cpp:74
+msgid "Go to previous directory level"
+msgstr "Ga naar bovenliggende map"
+
+#: gui/browser.cpp:74
+msgctxt "lowres"
+msgid "Go up"
+msgstr "Ga omhoog"
+
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:351 gui/massadd.cpp:95 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:216 gui/saveload-dialog.cpp:276
+#: gui/saveload-dialog.cpp:547 gui/saveload-dialog.cpp:922
+#: gui/themebrowser.cpp:55 gui/fluidsynth-dialog.cpp:152
+#: engines/engine.cpp:452 backends/platform/wii/options.cpp:48
+#: backends/events/default/default-events.cpp:196
+#: backends/events/default/default-events.cpp:218
+#: engines/drascula/saveload.cpp:49 engines/parallaction/saveload.cpp:274
+#: engines/scumm/dialogs.cpp:191 engines/sword1/control.cpp:865
+msgid "Cancel"
+msgstr "Annuleren"
+
+#: gui/browser.cpp:76 gui/chooser.cpp:47 gui/themebrowser.cpp:56
+msgid "Choose"
+msgstr "Selecteer"
+
+#: gui/gui-manager.cpp:117 backends/keymapper/remap-dialog.cpp:53
+#: 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 "Close"
+msgstr "Sluiten"
+
+#: gui/gui-manager.cpp:120
+msgid "Mouse click"
+msgstr "Muisklik"
+
+#: gui/gui-manager.cpp:124 base/main.cpp:319
+msgid "Display keyboard"
+msgstr "Toon toetsenbord"
+
+#: gui/gui-manager.cpp:128 base/main.cpp:323
+msgid "Remap keys"
+msgstr "Toetsen opnieuw koppelen"
+
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
+msgstr "Volledig scherm in-/uitschakelen"
+
+#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
+msgid "Choose an action to map"
+msgstr "Selecteer een actie om te koppelen"
+
+#: gui/KeysDialog.cpp:41
+msgid "Map"
+msgstr "Koppel"
+
+#: gui/KeysDialog.cpp:42 gui/launcher.cpp:352 gui/launcher.cpp:1048
+#: gui/launcher.cpp:1052 gui/massadd.cpp:92 gui/options.cpp:1240
+#: gui/saveload-dialog.cpp:923 gui/fluidsynth-dialog.cpp:153
+#: engines/engine.cpp:371 engines/engine.cpp:382
+#: backends/platform/wii/options.cpp:47
+#: backends/platform/wince/CELauncherDialog.cpp:54
+#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
+#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: 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
+msgid "OK"
+msgstr "OK"
+
+#: gui/KeysDialog.cpp:49
+msgid "Select an action and click 'Map'"
+msgstr "Selecteer een actie en klik 'Koppel'"
+
+#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141
+#, c-format
+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"
+
+#: gui/KeysDialog.cpp:90
+msgid "Please select an action"
+msgstr "Selecteer een actie a.u.b."
+
+#: gui/KeysDialog.cpp:106
+msgid "Press the key to associate"
+msgstr "Druk op de te associыren toets"
+
+#: gui/launcher.cpp:193
+msgid "Game"
+msgstr "Spel"
+
+#: gui/launcher.cpp:197
+msgid "ID:"
+msgstr "ID:"
+
+#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
+msgid ""
+"Short game identifier used for referring to saved games and running the game "
+"from the command line"
+msgstr ""
+"Korte identifier die gebruikt wordt voor opgeslagen spellen en voor het "
+"starten van een spel vanaf de opdrachtprompt."
+
+#: gui/launcher.cpp:199
+msgctxt "lowres"
+msgid "ID:"
+msgstr "ID:"
+
+#: gui/launcher.cpp:204
+msgid "Name:"
+msgstr "Naam:"
+
+#: gui/launcher.cpp:204 gui/launcher.cpp:206 gui/launcher.cpp:207
+msgid "Full title of the game"
+msgstr "Volledige titel van het spel"
+
+#: gui/launcher.cpp:206
+msgctxt "lowres"
+msgid "Name:"
+msgstr "Naam:"
+
+#: gui/launcher.cpp:210
+msgid "Language:"
+msgstr "Taal:"
+
+#: gui/launcher.cpp:210 gui/launcher.cpp:211
+msgid ""
+"Language of the game. This will not turn your Spanish game version into "
+"English"
+msgstr ""
+"De taal van het spel. Dit verandert een Engels spel niet naar een "
+"Nederlandse."
+
+#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87
+#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210
+#: audio/null.cpp:41
+msgid "<default>"
+msgstr "<standaard>"
+
+#: gui/launcher.cpp:222
+msgid "Platform:"
+msgstr "Platform:"
+
+#: gui/launcher.cpp:222 gui/launcher.cpp:224 gui/launcher.cpp:225
+msgid "Platform the game was originally designed for"
+msgstr "Het platform waar het spel oorspronkelijk voor ontworpen was."
+
+#: gui/launcher.cpp:224
+msgctxt "lowres"
+msgid "Platform:"
+msgstr "Platform:"
+
+#: gui/launcher.cpp:237
+msgid "Engine"
+msgstr "Engine"
+
+#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090
+msgid "Graphics"
+msgstr "Grafisch"
+
+#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090
+msgid "GFX"
+msgstr "GFX"
+
+#: gui/launcher.cpp:248
+msgid "Override global graphic settings"
+msgstr "Negeer algemene grafische instellingen"
+
+#: gui/launcher.cpp:250
+msgctxt "lowres"
+msgid "Override global graphic settings"
+msgstr "Negeer algemene grafische instellingen"
+
+#: gui/launcher.cpp:257 gui/options.cpp:1096
+msgid "Audio"
+msgstr "Audio"
+
+#: gui/launcher.cpp:260
+msgid "Override global audio settings"
+msgstr "Negeer algemene audio instellingen"
+
+#: gui/launcher.cpp:262
+msgctxt "lowres"
+msgid "Override global audio settings"
+msgstr "Negeer algemene audio instellingen"
+
+#: gui/launcher.cpp:271 gui/options.cpp:1101
+msgid "Volume"
+msgstr "Volume"
+
+#: gui/launcher.cpp:273 gui/options.cpp:1103
+msgctxt "lowres"
+msgid "Volume"
+msgstr "Volume"
+
+#: gui/launcher.cpp:276
+msgid "Override global volume settings"
+msgstr "Negeer algemene volume instellingen"
+
+#: gui/launcher.cpp:278
+msgctxt "lowres"
+msgid "Override global volume settings"
+msgstr "Negeer algemene volume instellingen"
+
+#: gui/launcher.cpp:286 gui/options.cpp:1111
+msgid "MIDI"
+msgstr "MIDI"
+
+#: gui/launcher.cpp:289
+msgid "Override global MIDI settings"
+msgstr "Negeer algemene MIDI instellingen"
+
+#: gui/launcher.cpp:291
+msgctxt "lowres"
+msgid "Override global MIDI settings"
+msgstr "Negeer algemene MIDI instellingen"
+
+#: gui/launcher.cpp:300 gui/options.cpp:1117
+msgid "MT-32"
+msgstr "MT-32"
+
+#: gui/launcher.cpp:303
+msgid "Override global MT-32 settings"
+msgstr "Negeer algemene MT-32 instellingen"
+
+#: gui/launcher.cpp:305
+msgctxt "lowres"
+msgid "Override global MT-32 settings"
+msgstr "Negeer algemene MT-32 instellingen"
+
+#: gui/launcher.cpp:314 gui/options.cpp:1124
+msgid "Paths"
+msgstr "Paden"
+
+#: gui/launcher.cpp:316 gui/options.cpp:1126
+msgctxt "lowres"
+msgid "Paths"
+msgstr "Paden"
+
+#: gui/launcher.cpp:323
+msgid "Game Path:"
+msgstr "Spel Pad:"
+
+#: gui/launcher.cpp:325
+msgctxt "lowres"
+msgid "Game Path:"
+msgstr "Spel Pad:"
+
+#: gui/launcher.cpp:330 gui/options.cpp:1150
+msgid "Extra Path:"
+msgstr "Extra Pad:"
+
+#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
+msgid "Specifies path to additional data used by the game"
+msgstr "Specificeer pad naar additionele data voor het spel"
+
+#: gui/launcher.cpp:332 gui/options.cpp:1152
+msgctxt "lowres"
+msgid "Extra Path:"
+msgstr "Extra Pad:"
+
+#: gui/launcher.cpp:339 gui/options.cpp:1134
+msgid "Save Path:"
+msgstr "Save Pad:"
+
+#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
+#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
+msgid "Specifies where your saved games are put"
+msgstr "Bepaalt waar opgeslagen spellen worden bewaard."
+
+#: gui/launcher.cpp:341 gui/options.cpp:1136
+msgctxt "lowres"
+msgid "Save Path:"
+msgstr "Save Pad:"
+
+#: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517
+#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153
+#: gui/options.cpp:1162 gui/options.cpp:1277 gui/options.cpp:1283
+#: gui/options.cpp:1291 gui/options.cpp:1321 gui/options.cpp:1327
+#: gui/options.cpp:1334 gui/options.cpp:1427 gui/options.cpp:1430
+#: gui/options.cpp:1442
+msgctxt "path"
+msgid "None"
+msgstr "Geen"
+
+#: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575
+#: gui/options.cpp:1271 gui/options.cpp:1315 gui/options.cpp:1433
+#: backends/platform/wii/options.cpp:56
+msgid "Default"
+msgstr "Standaard"
+
+#: gui/launcher.cpp:510 gui/options.cpp:1436
+msgid "Select SoundFont"
+msgstr "Selecteer SoundFont"
+
+#: gui/launcher.cpp:529 gui/launcher.cpp:682
+msgid "Select directory with game data"
+msgstr "Selecteer map met speldata"
+
+#: gui/launcher.cpp:547
+msgid "Select additional game directory"
+msgstr "Selecteer additionele speldatamap"
+
+#: gui/launcher.cpp:559 gui/options.cpp:1379
+msgid "Select directory for saved games"
+msgstr "Selecteer map voor opgeslagen spellen"
+
+#: gui/launcher.cpp:586
+msgid "This game ID is already taken. Please choose another one."
+msgstr "Dit spel-ID is al in gebruik. Kies a.u.b. een andere."
+
+#: gui/launcher.cpp:626 engines/dialogs.cpp:111
+msgid "~Q~uit"
+msgstr "~S~toppen"
+
+#: gui/launcher.cpp:626 backends/platform/sdl/macosx/appmenu_osx.mm:95
+msgid "Quit ScummVM"
+msgstr "Hiermee verlaat u ScummVM."
+
+#: gui/launcher.cpp:627
+msgid "A~b~out..."
+msgstr "O~v~er..."
+
+#: gui/launcher.cpp:627 backends/platform/sdl/macosx/appmenu_osx.mm:69
+msgid "About ScummVM"
+msgstr "Geeft informatie over ScummVM."
+
+#: gui/launcher.cpp:628
+msgid "~O~ptions..."
+msgstr "~O~pties..."
+
+#: gui/launcher.cpp:628
+msgid "Change global ScummVM options"
+msgstr "Algemene ScummVM opties"
+
+#: gui/launcher.cpp:630
+msgid "~S~tart"
+msgstr "~S~tarten"
+
+#: gui/launcher.cpp:630
+msgid "Start selected game"
+msgstr "Start het geselecteerde spel."
+
+#: gui/launcher.cpp:633
+msgid "~L~oad..."
+msgstr "~L~aad Spel..."
+
+#: gui/launcher.cpp:633
+msgid "Load saved game for selected game"
+msgstr "Laad een eerder opgeslagen spel voor het geselecteerde spel."
+
+#: gui/launcher.cpp:638
+msgid "~A~dd Game..."
+msgstr "Spel ~T~oevoegen"
+
+#: gui/launcher.cpp:638 gui/launcher.cpp:645
+msgid "Hold Shift for Mass Add"
+msgstr ""
+"Houd Shift ingedrukt voor het toevoegen van grote hoeveelheden spellen."
+
+#: gui/launcher.cpp:640
+msgid "~E~dit Game..."
+msgstr "Spel ~B~ewerken"
+
+#: gui/launcher.cpp:640 gui/launcher.cpp:647
+msgid "Change game options"
+msgstr "Verander spel opties"
+
+#: gui/launcher.cpp:642
+msgid "~R~emove Game"
+msgstr "Spel ~V~erwijderen"
+
+#: gui/launcher.cpp:642 gui/launcher.cpp:649
+msgid "Remove game from the list. The game data files stay intact"
+msgstr ""
+"Verwijder dit spel uit de lijst. De spel data bestanden blijven intact."
+
+#: gui/launcher.cpp:645
+msgctxt "lowres"
+msgid "~A~dd Game..."
+msgstr "~T~oevoegen..."
+
+#: gui/launcher.cpp:647
+msgctxt "lowres"
+msgid "~E~dit Game..."
+msgstr "~B~ewerken..."
+
+#: gui/launcher.cpp:649
+msgctxt "lowres"
+msgid "~R~emove Game"
+msgstr "~V~erwijderen"
+
+#: gui/launcher.cpp:657
+msgid "Search in game list"
+msgstr "Zoek in lijst met spellen"
+
+#: gui/launcher.cpp:661 gui/launcher.cpp:1222
+msgid "Search:"
+msgstr "Zoeken:"
+
+#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
+#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
+#: engines/pegasus/pegasus.cpp:353
+msgid "Load game:"
+msgstr "Laad spel:"
+
+#: gui/launcher.cpp:685 engines/dialogs.cpp:115
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
+#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
+#: engines/scumm/dialogs.cpp:189
+msgid "Load"
+msgstr "Laden"
+
+#: gui/launcher.cpp:792
+msgid ""
+"Do you really want to run the mass game detector? This could potentially add "
+"a huge number of games."
+msgstr ""
+"Wilt u echt de mass game detector draaien? Dit voegt potentieel een groot "
+"aantal spellen toe."
+
+#: gui/launcher.cpp:793 gui/launcher.cpp:941 gui/launcher.cpp:1000
+#: gui/fluidsynth-dialog.cpp:217
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "Yes"
+msgstr "Ja"
+
+#: gui/launcher.cpp:793 gui/launcher.cpp:941 gui/launcher.cpp:1000
+#: gui/fluidsynth-dialog.cpp:217
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "No"
+msgstr "Nee"
+
+#: gui/launcher.cpp:841
+msgid "ScummVM couldn't open the specified directory!"
+msgstr "ScummVM kon de opgegeven map niet openen!"
+
+#: gui/launcher.cpp:853
+msgid "ScummVM could not find any game in the specified directory!"
+msgstr "ScummVM kon geen enkel spel vinden in de opgegeven map!"
+
+#: gui/launcher.cpp:867
+msgid "Pick the game:"
+msgstr "Kies het spel:"
+
+#: gui/launcher.cpp:941
+msgid "Do you really want to remove this game configuration?"
+msgstr "Wilt u echt deze spelconfiguratie verwijderen?"
+
+#: gui/launcher.cpp:999
+msgid "Do you want to load saved game?"
+msgstr "Wilt u het opgeslagen spel laden?"
+
+#: gui/launcher.cpp:1048
+msgid "This game does not support loading games from the launcher."
+msgstr "Dit spel ondersteunt het laden van spelen vanaf het startmenu niet."
+
+#: gui/launcher.cpp:1052
+msgid "ScummVM could not find any engine capable of running the selected game!"
+msgstr ""
+"ScummVM heeft geen engine gevonden die in staat was het geselecteerde spel "
+"te spelen!"
+
+#: gui/massadd.cpp:79 gui/massadd.cpp:82
+msgid "... progress ..."
+msgstr "... voortgang ..."
+
+#: gui/massadd.cpp:259
+msgid "Scan complete!"
+msgstr "Klaar met zoeken!"
+
+#: gui/massadd.cpp:262
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games."
+msgstr ""
+"%d nieuwe spellen ontdekt, %d spellen die al eerder waren toegevoegd "
+"genegeerd."
+
+#: gui/massadd.cpp:266
+#, c-format
+msgid "Scanned %d directories ..."
+msgstr "%d directories doorgezocht..."
+
+#: gui/massadd.cpp:269
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games ..."
+msgstr ""
+"%d nieuwe spellen ontdekt, %d spellen die al eerder waren toegevoegd "
+"genegeerd ..."
+
+#: gui/options.cpp:85
+msgid "Never"
+msgstr "Nooit"
+
+#: gui/options.cpp:85
+msgid "every 5 mins"
+msgstr "elke 5 minuten"
+
+#: gui/options.cpp:85
+msgid "every 10 mins"
+msgstr "elke 10 minuten"
+
+#: gui/options.cpp:85
+msgid "every 15 mins"
+msgstr "elke 15 minuten"
+
+#: gui/options.cpp:85
+msgid "every 30 mins"
+msgstr "elke 30 minuten"
+
+#: gui/options.cpp:87
+msgid "8 kHz"
+msgstr "8 kHz"
+
+#: gui/options.cpp:87
+msgid "11 kHz"
+msgstr "11 kHz"
+
+#: gui/options.cpp:87
+msgid "22 kHz"
+msgstr "22 kHz"
+
+#: gui/options.cpp:87
+msgid "44 kHz"
+msgstr "44 kHz"
+
+#: gui/options.cpp:87
+msgid "48 kHz"
+msgstr "48 kHz"
+
+#: gui/options.cpp:255 gui/options.cpp:481 gui/options.cpp:582
+#: gui/options.cpp:651 gui/options.cpp:859
+msgctxt "soundfont"
+msgid "None"
+msgstr "Geen"
+
+#: gui/options.cpp:389
+msgid "Failed to apply some of the graphic options changes:"
+msgstr ""
+"Het is niet gelukt om enkele veranderingen in grafische opties toe te passen:"
+
+#: gui/options.cpp:401
+msgid "the video mode could not be changed."
+msgstr "de videomodus kon niet veranderd worden."
+
+#: gui/options.cpp:407
+msgid "the fullscreen setting could not be changed"
+msgstr "de volledig-scherminstelling kon niet veranderd worden"
+
+#: gui/options.cpp:413
+msgid "the aspect ratio setting could not be changed"
+msgstr "de pixelverhoudinginstelling kon niet veranderd worden"
+
+#: gui/options.cpp:734
+msgid "Graphics mode:"
+msgstr "Grafische modus:"
+
+#: gui/options.cpp:748
+msgid "Render mode:"
+msgstr "Render modus:"
+
+#: gui/options.cpp:748 gui/options.cpp:749
+msgid "Special dithering modes supported by some games"
+msgstr "Speciale ditheringmodi die door sommige games ondersteund worden."
+
+#: gui/options.cpp:760
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2249
+msgid "Fullscreen mode"
+msgstr "Volledig-scherm modus"
+
+#: gui/options.cpp:763
+msgid "Aspect ratio correction"
+msgstr "Pixelverhoudingcorrectie"
+
+#: gui/options.cpp:763
+msgid "Correct aspect ratio for 320x200 games"
+msgstr "Corrigeer de pixelverhouding voor 320x200 spellen."
+
+#: gui/options.cpp:771
+msgid "Preferred Device:"
+msgstr "Voorkeursapparaat:"
+
+#: gui/options.cpp:771
+msgid "Music Device:"
+msgstr "Muziekapparaat:"
+
+#: gui/options.cpp:771 gui/options.cpp:773
+msgid "Specifies preferred sound device or sound card emulator"
+msgstr "Specificeert het voorkeurs geluidsapparaat of geluidskaartemulator"
+
+#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774
+msgid "Specifies output sound device or sound card emulator"
+msgstr "Specificeert geluidsapparaat of geluidskaartemulator"
+
+#: gui/options.cpp:773
+msgctxt "lowres"
+msgid "Preferred Dev.:"
+msgstr "Voorkeursapparaat:"
+
+#: gui/options.cpp:773
+msgctxt "lowres"
+msgid "Music Device:"
+msgstr "Muziekapparaat:"
+
+#: gui/options.cpp:800
+msgid "AdLib emulator:"
+msgstr "AdLib emulator:"
+
+#: gui/options.cpp:800 gui/options.cpp:801
+msgid "AdLib is used for music in many games"
+msgstr "AdLib word in vele spelen voor muziek gebruikt"
+
+#: gui/options.cpp:811
+msgid "Output rate:"
+msgstr "Output snelheid:"
+
+#: gui/options.cpp:811 gui/options.cpp:812
+msgid ""
+"Higher value specifies better sound quality but may be not supported by your "
+"soundcard"
+msgstr ""
+"Hogere waarden geven betere geluidskwaliteit maar worden mogelijk niet "
+"ondersteund door uw geluidskaart."
+
+#: gui/options.cpp:822
+msgid "GM Device:"
+msgstr "GM Apparaat:"
+
+#: gui/options.cpp:822
+msgid "Specifies default sound device for General MIDI output"
+msgstr "Specificeert het standaard geluidsapparaat voor General MIDI"
+
+#: gui/options.cpp:833
+msgid "Don't use General MIDI music"
+msgstr "Geen General MIDI muziek gebruiken"
+
+#: gui/options.cpp:844 gui/options.cpp:910
+msgid "Use first available device"
+msgstr "Gebruik eerst beschikbare apparaat"
+
+#: gui/options.cpp:856
+msgid "SoundFont:"
+msgstr "SoundFont:"
+
+#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
+msgstr ""
+"SoundFont wordt ondersteund door FluidSynth en Timidity en sommige "
+"geluidskaarten."
+
+#: gui/options.cpp:858
+msgctxt "lowres"
+msgid "SoundFont:"
+msgstr "SoundFont:"
+
+#: gui/options.cpp:864
+msgid "Mixed AdLib/MIDI mode"
+msgstr "Gemengde AdLib/MIDI modus"
+
+#: gui/options.cpp:864
+msgid "Use both MIDI and AdLib sound generation"
+msgstr "Gebruik zowel MIDI als AdLib geluid"
+
+#: gui/options.cpp:867
+msgid "MIDI gain:"
+msgstr "MIDI gain:"
+
+#: gui/options.cpp:874
+msgid "FluidSynth Settings"
+msgstr "FluidSynth Instellingen"
+
+#: gui/options.cpp:881
+msgid "MT-32 Device:"
+msgstr "MT-32 Apparaat:"
+
+#: gui/options.cpp:881
+msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
+msgstr ""
+"Specificeert het standaard geluidsapparaat voor Roland MT-32/LAPC1/CM32l/CM64"
+
+#: gui/options.cpp:886
+msgid "True Roland MT-32 (disable GM emulation)"
+msgstr "Waarheidsgetrouwe Roland MT-32 (GM emulatie uitschakelen)"
+
+#: gui/options.cpp:886 gui/options.cpp:888
+msgid ""
+"Check if you want to use your real hardware Roland-compatible sound device "
+"connected to your computer"
+msgstr ""
+"Selecteer als u een hardware Roland-compatible geluidsapparaat gekoppeld aan "
+"uw computer wilt gebruiken"
+
+#: gui/options.cpp:888
+msgctxt "lowres"
+msgid "True Roland MT-32 (no GM emulation)"
+msgstr "Echte Roland MT-32 (geen GM emulatie)"
+
+#: gui/options.cpp:891
+msgid "Roland GS Device (enable MT-32 mappings)"
+msgstr "Roland GS Device (met MT-32 mappings)"
+
+#: gui/options.cpp:891
+msgid ""
+"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
+"GS device"
+msgstr ""
+"Selecteer dit als u patchmappings wilt om een MT-32 op een Roland GS "
+"apparaat te emuleren."
+
+#: gui/options.cpp:900
+msgid "Don't use Roland MT-32 music"
+msgstr "Geen Roland MT-32 muziek gebruiken"
+
+#: gui/options.cpp:927
+msgid "Text and Speech:"
+msgstr "Spraak en/of ondertitels:"
+
+#: gui/options.cpp:931 gui/options.cpp:941
+msgid "Speech"
+msgstr "Spraak"
+
+#: gui/options.cpp:932 gui/options.cpp:942
+msgid "Subtitles"
+msgstr "Ondertitels"
+
+#: gui/options.cpp:933
+msgid "Both"
+msgstr "Beide"
+
+#: gui/options.cpp:935
+msgid "Subtitle speed:"
+msgstr "Snelheid ondertitels:"
+
+#: gui/options.cpp:937
+msgctxt "lowres"
+msgid "Text and Speech:"
+msgstr "Spraak en/of text:"
+
+#: gui/options.cpp:941
+msgid "Spch"
+msgstr "Sprk"
+
+#: gui/options.cpp:942
+msgid "Subs"
+msgstr "Text"
+
+#: gui/options.cpp:943
+msgctxt "lowres"
+msgid "Both"
+msgstr "Beide"
+
+#: gui/options.cpp:943
+msgid "Show subtitles and play speech"
+msgstr "Toon ondertitels en speel spraak af"
+
+#: gui/options.cpp:945
+msgctxt "lowres"
+msgid "Subtitle speed:"
+msgstr "Snelheid text:"
+
+#: gui/options.cpp:961
+msgid "Music volume:"
+msgstr "Muziek volume:"
+
+#: gui/options.cpp:963
+msgctxt "lowres"
+msgid "Music volume:"
+msgstr "Muziek volume:"
+
+#: gui/options.cpp:970
+msgid "Mute All"
+msgstr "Alles Dempen"
+
+#: gui/options.cpp:973
+msgid "SFX volume:"
+msgstr "SFX volume:"
+
+#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976
+msgid "Special sound effects volume"
+msgstr "Volume voor speciale geluidseffecten"
+
+#: gui/options.cpp:975
+msgctxt "lowres"
+msgid "SFX volume:"
+msgstr "SFX volume:"
+
+#: gui/options.cpp:983
+msgid "Speech volume:"
+msgstr "Spraak volume:"
+
+#: gui/options.cpp:985
+msgctxt "lowres"
+msgid "Speech volume:"
+msgstr "Spraak volume:"
+
+#: gui/options.cpp:1142
+msgid "Theme Path:"
+msgstr "Thema Pad:"
+
+#: gui/options.cpp:1144
+msgctxt "lowres"
+msgid "Theme Path:"
+msgstr "Thema Pad:"
+
+#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153
+msgid "Specifies path to additional data used by all games or ScummVM"
+msgstr ""
+"Specificeert het pad for aanvullende data voor ScummVM zelf of de spellen."
+
+#: gui/options.cpp:1159
+msgid "Plugins Path:"
+msgstr "Plugins Pad:"
+
+#: gui/options.cpp:1161
+msgctxt "lowres"
+msgid "Plugins Path:"
+msgstr "Plugins Pad:"
+
+#: gui/options.cpp:1170 gui/fluidsynth-dialog.cpp:138
+msgid "Misc"
+msgstr "Misc"
+
+#: gui/options.cpp:1172
+msgctxt "lowres"
+msgid "Misc"
+msgstr "Misc"
+
+#: gui/options.cpp:1174
+msgid "Theme:"
+msgstr "Thema:"
+
+#: gui/options.cpp:1178
+msgid "GUI Renderer:"
+msgstr "GUI Renderer:"
+
+#: gui/options.cpp:1190
+msgid "Autosave:"
+msgstr "Autosave:"
+
+#: gui/options.cpp:1192
+msgctxt "lowres"
+msgid "Autosave:"
+msgstr "Autosave:"
+
+#: gui/options.cpp:1200
+msgid "Keys"
+msgstr "Toetsen"
+
+#: gui/options.cpp:1207
+msgid "GUI Language:"
+msgstr "GUI Taal:"
+
+#: gui/options.cpp:1207
+msgid "Language of ScummVM GUI"
+msgstr "Taal van de ScummVM GUI"
+
+#: gui/options.cpp:1366
+msgid "You have to restart ScummVM before your changes will take effect."
+msgstr "U dient ScummVM opnieuw op te starten om de wijzigingen te activeren."
+
+#: gui/options.cpp:1386
+msgid "The chosen directory cannot be written to. Please select another one."
+msgstr ""
+"Er kan niet worden geschreven in de gekozen map. Selecteer a.u.b. een andere."
+
+#: gui/options.cpp:1395
+msgid "Select directory for GUI themes"
+msgstr "Selecteer map voor GUI themas"
+
+#: gui/options.cpp:1405
+msgid "Select directory for extra files"
+msgstr "Selecteer map voor extra bestanden"
+
+#: gui/options.cpp:1416
+msgid "Select directory for plugins"
+msgstr "Selecteer map voor plugins"
+
+#: gui/options.cpp:1469
+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 ""
+"De thema die u heeft geselecteerd ondersteund uw gekozen taal niet. Als u "
+"dit thema wilt gebruiken dient u eerst een andere taal te selecteren."
+
+#: gui/saveload-dialog.cpp:167
+msgid "List view"
+msgstr "Lijstopmaak"
+
+#: gui/saveload-dialog.cpp:168
+msgid "Grid view"
+msgstr "Rasterbeeld"
+
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:360
+msgid "No date saved"
+msgstr "Gaan datum opgeslagen"
+
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:361
+msgid "No time saved"
+msgstr "Geen tijd opgeslagen"
+
+#: gui/saveload-dialog.cpp:213 gui/saveload-dialog.cpp:362
+msgid "No playtime saved"
+msgstr "Geen speeltijd opgeslagen"
+
+#: gui/saveload-dialog.cpp:220 gui/saveload-dialog.cpp:276
+msgid "Delete"
+msgstr "Verwijderen"
+
+#: gui/saveload-dialog.cpp:275
+msgid "Do you really want to delete this saved game?"
+msgstr "Wilt u dit opgeslagen spel echt verwijderen?"
+
+#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
+msgid "Date: "
+msgstr "Datum: "
+
+#: gui/saveload-dialog.cpp:389 gui/saveload-dialog.cpp:881
+msgid "Time: "
+msgstr "Tijd: "
+
+#: gui/saveload-dialog.cpp:395 gui/saveload-dialog.cpp:889
+msgid "Playtime: "
+msgstr "Speeltijd: "
+
+#: gui/saveload-dialog.cpp:408 gui/saveload-dialog.cpp:496
+msgid "Untitled savestate"
+msgstr "Naamloos opgeslagen spel"
+
+#: gui/saveload-dialog.cpp:548
+msgid "Next"
+msgstr "Volgende"
+
+#: gui/saveload-dialog.cpp:551
+msgid "Prev"
+msgstr "Vorig"
+
+#: gui/saveload-dialog.cpp:739
+msgid "New Save"
+msgstr "Nieuw spel opslaan"
+
+#: gui/saveload-dialog.cpp:739
+msgid "Create a new save game"
+msgstr "Nieuw spel opslaan"
+
+#: gui/saveload-dialog.cpp:868
+msgid "Name: "
+msgstr "Naam: "
+
+#: gui/saveload-dialog.cpp:940
+#, c-format
+msgid "Enter a description for slot %d:"
+msgstr "Geef een omschrijving voor slot %d:"
+
+#: gui/themebrowser.cpp:45
+msgid "Select a Theme"
+msgstr "Selecteer een thema"
+
+#: gui/ThemeEngine.cpp:347
+msgid "Disabled GFX"
+msgstr "GFX uitgeschakeld"
+
+#: gui/ThemeEngine.cpp:347
+msgctxt "lowres"
+msgid "Disabled GFX"
+msgstr "GFX uitgeschakeld"
+
+#: gui/ThemeEngine.cpp:348
+msgid "Standard Renderer"
+msgstr "Standaard Renderer"
+
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
+msgid "Standard"
+msgstr "Standaard"
+
+#: gui/ThemeEngine.cpp:350
+msgid "Antialiased Renderer"
+msgstr "Antialiased Renderer"
+
+#: gui/ThemeEngine.cpp:350
+msgid "Antialiased"
+msgstr "Antialiased"
+
+#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
+msgid "Clear value"
+msgstr "Veld leegmaken"
+
+#: gui/fluidsynth-dialog.cpp:68
+msgid "Reverb"
+msgstr "Reverb"
+
+#: gui/fluidsynth-dialog.cpp:70 gui/fluidsynth-dialog.cpp:102
+msgid "Active"
+msgstr "Actief"
+
+#: gui/fluidsynth-dialog.cpp:72
+msgid "Room:"
+msgstr "Kamer:"
+
+#: gui/fluidsynth-dialog.cpp:79
+msgid "Damp:"
+msgstr "Damp:"
+
+#: gui/fluidsynth-dialog.cpp:86
+msgid "Width:"
+msgstr "Breedte:"
+
+#: gui/fluidsynth-dialog.cpp:93 gui/fluidsynth-dialog.cpp:111
+msgid "Level:"
+msgstr "Level:"
+
+#: gui/fluidsynth-dialog.cpp:100
+msgid "Chorus"
+msgstr "Koor"
+
+#: gui/fluidsynth-dialog.cpp:104
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:118
+msgid "Speed:"
+msgstr "Snelheid:"
+
+#: gui/fluidsynth-dialog.cpp:125
+msgid "Depth:"
+msgstr "Diepte:"
+
+#: gui/fluidsynth-dialog.cpp:132
+msgid "Type:"
+msgstr "Type:"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Sine"
+msgstr "Sinus"
+
+#: gui/fluidsynth-dialog.cpp:136
+msgid "Triangle"
+msgstr "Driehoek"
+
+#: gui/fluidsynth-dialog.cpp:140
+msgid "Interpolation:"
+msgstr "Interpolatie:"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "None (fastest)"
+msgstr "Geen (snelst)"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Linear"
+msgstr "Lineair"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Fourth-order"
+msgstr "Vierde-order"
+
+#: gui/fluidsynth-dialog.cpp:146
+msgid "Seventh-order"
+msgstr "Zevende-order"
+
+#: gui/fluidsynth-dialog.cpp:150
+msgid "Reset"
+msgstr "Reset"
+
+#: gui/fluidsynth-dialog.cpp:150
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "Alle FluidSynth instellingen terugzetten naar de standaard waarden."
+
+#: gui/fluidsynth-dialog.cpp:217
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"Wilt u echt alle FluidSynth instellingen terugzetten naar de standaard "
+"waarden?"
+
+#: base/main.cpp:228
+#, c-format
+msgid "Engine does not support debug level '%s'"
+msgstr "Engine ondersteunt debug level '%s' niet"
+
+#: base/main.cpp:306
+msgid "Menu"
+msgstr "Menu"
+
+#: base/main.cpp:309 backends/platform/symbian/src/SymbianActions.cpp:45
+#: backends/platform/wince/CEActionsPocket.cpp:45
+#: backends/platform/wince/CEActionsSmartphone.cpp:46
+msgid "Skip"
+msgstr "Overslaan"
+
+#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:50
+#: backends/platform/wince/CEActionsPocket.cpp:42
+msgid "Pause"
+msgstr "Pauze"
+
+#: base/main.cpp:315
+msgid "Skip line"
+msgstr "Regel overslaan"
+
+#: base/main.cpp:507
+msgid "Error running game:"
+msgstr "Fout tijdens het starten van spel:"
+
+#: base/main.cpp:536
+msgid "Could not find any engine capable of running the selected game"
+msgstr ""
+"Kon geen engine vinden die in staat was het geselecteerde spel te spelen"
+
+#: common/error.cpp:38
+msgid "No error"
+msgstr "Geen fout"
+
+#: common/error.cpp:40
+msgid "Game data not found"
+msgstr "Speldata niet gevonden"
+
+#: common/error.cpp:42
+msgid "Game id not supported"
+msgstr "Spel-ID niet ondersteund"
+
+#: common/error.cpp:44
+msgid "Unsupported color mode"
+msgstr "Niet ondersteunde kleurmodus"
+
+#: common/error.cpp:47
+msgid "Read permission denied"
+msgstr "Leesrechten geweigerd"
+
+#: common/error.cpp:49
+msgid "Write permission denied"
+msgstr "Schrijfrechten geweigerd"
+
+#: common/error.cpp:52
+msgid "Path does not exist"
+msgstr "Pad bestaat niet"
+
+#: common/error.cpp:54
+msgid "Path not a directory"
+msgstr "Pad is geen map"
+
+#: common/error.cpp:56
+msgid "Path not a file"
+msgstr "Pad is geen bestand"
+
+#: common/error.cpp:59
+msgid "Cannot create file"
+msgstr "Kan bestand niet aanmaken"
+
+#: common/error.cpp:61
+msgid "Reading data failed"
+msgstr "Data lezen mislukt"
+
+#: common/error.cpp:63
+msgid "Writing data failed"
+msgstr "Data wegschrijven mislukt"
+
+#: common/error.cpp:66
+msgid "Could not find suitable engine plugin"
+msgstr "Kon geen geschikte engine plugin vinden"
+
+#: common/error.cpp:68
+msgid "Engine plugin does not support save states"
+msgstr "Engine plugin ondersteunt opgeslagen spellen niet"
+
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr "Gebruiker annuleerde"
+
+#: common/error.cpp:75
+msgid "Unknown error"
+msgstr "Onbekende fout"
+
+#: engines/advancedDetector.cpp:317
+#, c-format
+msgid "The game in '%s' seems to be unknown."
+msgstr "Het spel in '%s' lijkt onbekend te zijn."
+
+#: engines/advancedDetector.cpp:318
+msgid "Please, report the following data to the ScummVM team along with name"
+msgstr ""
+"Raporteer a.u.b. de volgende gegevens aan het ScummVM team samen met de naam"
+
+#: engines/advancedDetector.cpp:320
+msgid "of the game you tried to add and its version/language/etc.:"
+msgstr "van het spel die u probeerde toe te voegen, en haar versie/taal/etc.:"
+
+#: engines/dialogs.cpp:85
+msgid "~R~esume"
+msgstr "~H~ervatten"
+
+#: engines/dialogs.cpp:87
+msgid "~L~oad"
+msgstr "~L~aden"
+
+#: engines/dialogs.cpp:91
+msgid "~S~ave"
+msgstr "Op~s~laan"
+
+#: engines/dialogs.cpp:95
+msgid "~O~ptions"
+msgstr "~O~pties"
+
+#: engines/dialogs.cpp:100
+msgid "~H~elp"
+msgstr "~H~elp"
+
+#: engines/dialogs.cpp:102
+msgid "~A~bout"
+msgstr "O~v~er"
+
+#: engines/dialogs.cpp:105 engines/dialogs.cpp:181
+msgid "~R~eturn to Launcher"
+msgstr "~T~erug naar het startmenu"
+
+#: engines/dialogs.cpp:107 engines/dialogs.cpp:183
+msgctxt "lowres"
+msgid "~R~eturn to Launcher"
+msgstr "~T~erug naar startmenu"
+
+#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
+#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+msgid "Save game:"
+msgstr "Spel opslaan:"
+
+#: 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:803 engines/cruise/menu.cpp:212
+#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+msgid "Save"
+msgstr "Opslaan"
+
+#: 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 ""
+"Sorry, deze engine heeft momenteel geen in-game help. Raadpleeg a.u.b. de "
+"README voor basisinformatie, en voor instructies voor het verkrijgen van "
+"verdere assistentie."
+
+#: engines/dialogs.cpp:234 engines/pegasus/pegasus.cpp:393
+#, c-format
+msgid ""
+"Gamestate save failed (%s)! Please consult the README for basic information, "
+"and for instructions on how to obtain further assistance."
+msgstr ""
+"Opslaan van spel is niet gelukt (%s)! Raadpleeg a.u.b. de README voor "
+"basisinformatie, en voor instructies voor het verkrijgen van verdere "
+"assistentie."
+
+#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
+#: engines/mohawk/dialogs.cpp:170
+msgid "~O~K"
+msgstr "~O~K"
+
+#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
+#: engines/mohawk/dialogs.cpp:171
+msgid "~C~ancel"
+msgstr "~A~nnuleer"
+
+#: engines/dialogs.cpp:311
+msgid "~K~eys"
+msgstr "~T~oetsen"
+
+#: engines/engine.cpp:245
+msgid "Could not initialize color format."
+msgstr "Kon kleurformaat niet initialiseren."
+
+# can this be changed into "Could not switch to video mode '%s'"?
+#: engines/engine.cpp:253
+msgid "Could not switch to video mode: '"
+msgstr "Kon niet schakelen naar videomodus: '"
+
+#: engines/engine.cpp:262
+msgid "Could not apply aspect ratio setting."
+msgstr "Pixelverhoudinginstelling kon niet toegepast worden."
+
+#: engines/engine.cpp:267
+msgid "Could not apply fullscreen setting."
+msgstr "Kon volledig-scherminstelling niet toepassen."
+
+#: engines/engine.cpp:367
+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 ""
+"U lijkt het spel direct van CD the spelen.\n"
+"Hiervan is bekend dat dit problemen veroorzaakt.\n"
+"Het wordt daarom aangeraden om de data\n"
+"bestanden naar uw harddisk te kopieren.\n"
+"Voor details kijk in de README."
+
+#: engines/engine.cpp:378
+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 ""
+"Dit spel heeft audio sporen op zijn disk. Deze\n"
+"dienen eerst geripped te worden met een audio\n"
+"CD rip programma om te kunnen luisteren naar\n"
+"het spelmuziek. Voor details kijk in de README."
+
+#: engines/engine.cpp:436
+#, c-format
+msgid ""
+"Gamestate load failed (%s)! Please consult the README for basic information, "
+"and for instructions on how to obtain further assistance."
+msgstr ""
+"Laden van opgeslagen spel is niet gelukt (%s)! Raadpleeg a.u.b. de README "
+"voor basisinformatie, en voor instructies voor het verkrijgen van verdere "
+"assistentie."
+
+#: engines/engine.cpp:449
+msgid ""
+"WARNING: The game you are about to start is not yet fully supported by "
+"ScummVM. As such, it is likely to be unstable, and any saves you make might "
+"not work in future versions of ScummVM."
+msgstr ""
+"WAARSCHUWING: Het spel dat u wilt gaan spelen is nog niet volledig "
+"ondersteund door ScummVM. Om die reden is het waarschijnlijk dat het spel "
+"instabiel is, en opgeslagen spellen zullen mogelijk niet werken in "
+"toekomstige versies van ScummVM."
+
+#: engines/engine.cpp:452
+msgid "Start anyway"
+msgstr "Evengoed starten"
+
+#: audio/fmopl.cpp:50
+msgid "MAME OPL emulator"
+msgstr "MAME OPL emulator"
+
+#: audio/fmopl.cpp:52
+msgid "DOSBox OPL emulator"
+msgstr "DOSBox OPL emulator"
+
+#: audio/mididrv.cpp:209
+#, c-format
+msgid ""
+"The selected audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+"Het geselecteerde audioapparaat '%s' was niet gevonden (staat misschien uit "
+"of is losgekoppeld)."
+
+#: 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 "Poging om terug te vallen op het volgende beschikbare apparaat..."
+
+#: audio/mididrv.cpp:221
+#, c-format
+msgid ""
+"The selected audio device '%s' cannot be used. See log file for more "
+"information."
+msgstr ""
+"Het geselecteerde audioapparaat '%s' kan niet gebruikt worden. Zie het log "
+"bestand voor meer informatie."
+
+#: audio/mididrv.cpp:257
+#, c-format
+msgid ""
+"The preferred audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+"Het voorkeursaudioapparaat '%s' was niet gevonden (staat misschien uit of is "
+"losgekoppeld)."
+
+#: audio/mididrv.cpp:272
+#, c-format
+msgid ""
+"The preferred audio device '%s' cannot be used. See log file for more "
+"information."
+msgstr ""
+"Het voorkeursaudioapparaat '%s' kan niet gebruikt worden. Zie het logbestand "
+"voor meer informatie."
+
+#: audio/null.h:44
+msgid "No music"
+msgstr "Geen muziek"
+
+#: audio/mods/paula.cpp:196
+msgid "Amiga Audio Emulator"
+msgstr "Amiga Audio Emulator"
+
+#: audio/softsynth/adlib.cpp:2285
+msgid "AdLib Emulator"
+msgstr "AdLib Emulator"
+
+#: audio/softsynth/appleiigs.cpp:33
+msgid "Apple II GS Emulator (NOT IMPLEMENTED)"
+msgstr "Apple II GS Emulator (NIET GEЯMPLEMENTEERD)"
+
+#: audio/softsynth/sid.cpp:1430
+msgid "C64 Audio Emulator"
+msgstr "C64 Audio Emulator"
+
+#: audio/softsynth/mt32.cpp:200
+msgid "Initializing MT-32 Emulator"
+msgstr "MT-32 Emulator initialiseren"
+
+#: audio/softsynth/mt32.cpp:426
+msgid "MT-32 Emulator"
+msgstr "MT-32 Emulator"
+
+#: audio/softsynth/pcspk.cpp:139
+msgid "PC Speaker Emulator"
+msgstr "PC Speaker Emulator"
+
+#: audio/softsynth/pcspk.cpp:158
+msgid "IBM PCjr Emulator"
+msgstr "IBM PCjr Emulator"
+
+#: backends/keymapper/remap-dialog.cpp:48
+msgid "Keymap:"
+msgstr "Toetskoppeling:"
+
+#: backends/keymapper/remap-dialog.cpp:67
+msgid " (Effective)"
+msgstr " (Effectief)"
+
+#: backends/keymapper/remap-dialog.cpp:107
+msgid " (Active)"
+msgstr " (Actief)"
+
+#: backends/keymapper/remap-dialog.cpp:107
+msgid " (Blocked)"
+msgstr " (Geblokkeerd)"
+
+#: backends/keymapper/remap-dialog.cpp:120
+msgid " (Global)"
+msgstr " (Globaal)"
+
+#: backends/keymapper/remap-dialog.cpp:128
+msgid " (Game)"
+msgstr " (Spel)"
+
+#: backends/midi/windows.cpp:165
+msgid "Windows MIDI"
+msgstr "Windows MIDI"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:56
+#: engines/scumm/dialogs.cpp:291
+msgid "~C~lose"
+msgstr "~S~luiten"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:57
+msgid "ScummVM Main Menu"
+msgstr "ScummVM Hoofdmenu"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:63
+msgid "~L~eft handed mode"
+msgstr "~L~inkshandige modus"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:64
+msgid "~I~ndy fight controls"
+msgstr "~I~ndy vecht besturing"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:65
+msgid "Show mouse cursor"
+msgstr "Toon muis wijzer"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:66
+msgid "Snap to edges"
+msgstr "Klik vast aan randen"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:68
+msgid "Touch X Offset"
+msgstr "Raak X Offset"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:75
+msgid "Touch Y Offset"
+msgstr "Raak Y Offset"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:87
+msgid "Use laptop trackpad-style cursor control"
+msgstr "Gebruik laptop trackpad-stijl wijzeraansturing"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:88
+msgid "Tap for left click, double tap right click"
+msgstr "Tap voor linker klik, dubbele tap voor rechter klik"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:90
+msgid "Sensitivity"
+msgstr "Gevoeligheid"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:99
+msgid "Initial top screen scale:"
+msgstr "Initiele top schermschaal:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:105
+msgid "Main screen scaling:"
+msgstr "Hoofdschermschaal:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:107
+msgid "Hardware scale (fast, but low quality)"
+msgstr "Hardware schalen (snel, maar slechte kwaliteit)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:108
+msgid "Software scale (good quality, but slower)"
+msgstr "Software schalen (langzamer, maar goede kwaliteit)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:109
+msgid "Unscaled (you must scroll left and right)"
+msgstr "Niet geschaald (U moet naar link en naar rechts scrollen)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:111
+msgid "Brightness:"
+msgstr "Helderheid:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:121
+msgid "High quality audio (slower) (reboot)"
+msgstr "Hoge kwaliteit audio (langzamer) (opnieuw opstarten)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:122
+msgid "Disable power off"
+msgstr "Power-off uitschakelen"
+
+#: backends/platform/iphone/osys_events.cpp:300
+msgid "Mouse-click-and-drag mode enabled."
+msgstr "Muis-klik-en-sleepmodus aangezet."
+
+#: backends/platform/iphone/osys_events.cpp:302
+msgid "Mouse-click-and-drag mode disabled."
+msgstr "Muis-klik-en-sleepmodus uitgezet."
+
+#: backends/platform/iphone/osys_events.cpp:313
+msgid "Touchpad mode enabled."
+msgstr "Touchpadmodus ingeschakeld."
+
+#: backends/platform/iphone/osys_events.cpp:315
+msgid "Touchpad mode disabled."
+msgstr "Touchpadmodus uitgeschakeld."
+
+#: backends/platform/maemo/maemo.cpp:209
+msgid "Click Mode"
+msgstr "Klik Modus"
+
+#: backends/platform/maemo/maemo.cpp:215
+#: backends/platform/symbian/src/SymbianActions.cpp:42
+#: backends/platform/wince/CEActionsPocket.cpp:60
+#: backends/platform/wince/CEActionsSmartphone.cpp:43
+#: backends/platform/tizen/form.cpp:275
+msgid "Left Click"
+msgstr "Linker Klik"
+
+#: backends/platform/maemo/maemo.cpp:218
+msgid "Middle Click"
+msgstr "Middelste Klik"
+
+#: backends/platform/maemo/maemo.cpp:221
+#: backends/platform/symbian/src/SymbianActions.cpp:43
+#: backends/platform/wince/CEActionsSmartphone.cpp:44
+#: backends/platform/tizen/form.cpp:267
+msgid "Right Click"
+msgstr "Rechter klik"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
+msgid "Hide ScummVM"
+msgstr "Verberg ScummVM"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
+msgid "Hide Others"
+msgstr "Verberg Anderen"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
+msgid "Show All"
+msgstr "Toon Alles"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
+msgid "Window"
+msgstr "Venster"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
+msgid "Minimize"
+msgstr "Minimaliseer"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:46
+msgid "Normal (no scaling)"
+msgstr "Normaal (niet schalen)"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:65
+msgctxt "lowres"
+msgid "Normal (no scaling)"
+msgstr "Normaal (niet schalen)"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2148
+msgid "Enabled aspect ratio correction"
+msgstr "Pixelverhoudingcorrectie ingeschakeld"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2154
+msgid "Disabled aspect ratio correction"
+msgstr "Pixelverhoudingcorrectie uitgeschakeld"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2209
+msgid "Active graphics filter:"
+msgstr "Actieve grafische filter:"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2251
+msgid "Windowed mode"
+msgstr "Venstermodus"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:118
+msgid "OpenGL"
+msgstr "OpenGL"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:119
+msgid "OpenGL (No filtering)"
+msgstr "OpenGL (geen filters)"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:38
+#: backends/platform/wince/CEActionsSmartphone.cpp:39
+msgid "Up"
+msgstr "Omhoog"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:39
+#: backends/platform/wince/CEActionsSmartphone.cpp:40
+msgid "Down"
+msgstr "Omlaag"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:40
+#: backends/platform/wince/CEActionsSmartphone.cpp:41
+msgid "Left"
+msgstr "Links"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:41
+#: backends/platform/wince/CEActionsSmartphone.cpp:42
+msgid "Right"
+msgstr "Rechts"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:46
+#: backends/platform/wince/CEActionsSmartphone.cpp:47
+msgid "Zone"
+msgstr "Zone"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:47
+#: backends/platform/wince/CEActionsPocket.cpp:54
+#: backends/platform/wince/CEActionsSmartphone.cpp:48
+msgid "Multi Function"
+msgstr "Meerdere Functies"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:48
+msgid "Swap character"
+msgstr "Verwissel karakter"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:49
+msgid "Skip text"
+msgstr "Text overslaan"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:51
+msgid "Fast mode"
+msgstr "Snelle modus"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:52
+#: backends/platform/wince/CEActionsPocket.cpp:44
+#: backends/platform/wince/CEActionsSmartphone.cpp:52
+#: backends/events/default/default-events.cpp:218
+#: engines/scumm/dialogs.cpp:192 engines/scumm/help.cpp:82
+#: engines/scumm/help.cpp:84
+msgid "Quit"
+msgstr "Stoppen"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:53
+msgid "Debugger"
+msgstr "Debugger"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:54
+msgid "Global menu"
+msgstr "Globale menu"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:55
+msgid "Virtual keyboard"
+msgstr "Virtueel toetsenbord"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:56
+msgid "Key mapper"
+msgstr "Toets koppeltool"
+
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+msgid "Do you want to quit ?"
+msgstr "Wilt u stoppen?"
+
+#: backends/platform/wii/options.cpp:51
+msgid "Video"
+msgstr "Video"
+
+#: backends/platform/wii/options.cpp:54
+msgid "Current video mode:"
+msgstr "Huidige video modus:"
+
+#: backends/platform/wii/options.cpp:56
+msgid "Double-strike"
+msgstr "Dubbele-slag"
+
+#: backends/platform/wii/options.cpp:60
+msgid "Horizontal underscan:"
+msgstr "Horizontale underscan:"
+
+#: backends/platform/wii/options.cpp:66
+msgid "Vertical underscan:"
+msgstr "Verticale underscan:"
+
+#: backends/platform/wii/options.cpp:71
+msgid "Input"
+msgstr "Invoer"
+
+#: backends/platform/wii/options.cpp:74
+msgid "GC Pad sensitivity:"
+msgstr "GC Pad gevoeligheid:"
+
+#: backends/platform/wii/options.cpp:80
+msgid "GC Pad acceleration:"
+msgstr "GC Pad versnelling:"
+
+#: 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 "Status:"
+
+#: backends/platform/wii/options.cpp:90 backends/platform/wii/options.cpp:102
+msgid "Unknown"
+msgstr "Onbekend"
+
+#: backends/platform/wii/options.cpp:93
+msgid "Mount DVD"
+msgstr "Mount DVD"
+
+#: backends/platform/wii/options.cpp:94
+msgid "Unmount DVD"
+msgstr "Unmount DVD"
+
+#: backends/platform/wii/options.cpp:98
+msgid "SMB"
+msgstr "SMB"
+
+#: backends/platform/wii/options.cpp:106
+msgid "Server:"
+msgstr "Server:"
+
+#: backends/platform/wii/options.cpp:110
+msgid "Share:"
+msgstr "Share:"
+
+#: backends/platform/wii/options.cpp:114
+msgid "Username:"
+msgstr "Gebruikersnaam:"
+
+#: backends/platform/wii/options.cpp:118
+msgid "Password:"
+msgstr "Wachtwoord:"
+
+#: backends/platform/wii/options.cpp:121
+msgid "Init network"
+msgstr "Init netwerk"
+
+#: backends/platform/wii/options.cpp:123
+msgid "Mount SMB"
+msgstr "Mount SMB"
+
+#: backends/platform/wii/options.cpp:124
+msgid "Unmount SMB"
+msgstr "Unmount SMB"
+
+#: backends/platform/wii/options.cpp:143
+msgid "DVD Mounted successfully"
+msgstr "DVD succesvol gemount"
+
+#: backends/platform/wii/options.cpp:146
+msgid "Error while mounting the DVD"
+msgstr "Fout tijdens het mounten van de DVD"
+
+#: backends/platform/wii/options.cpp:148
+msgid "DVD not mounted"
+msgstr "DVD niet gemount"
+
+#: backends/platform/wii/options.cpp:161
+msgid "Network up, share mounted"
+msgstr "Network up, share gemount"
+
+#: backends/platform/wii/options.cpp:163
+msgid "Network up"
+msgstr "Netwerk up"
+
+#: backends/platform/wii/options.cpp:166
+msgid ", error while mounting the share"
+msgstr ", fout tijdens het mounten van de share"
+
+#: backends/platform/wii/options.cpp:168
+msgid ", share not mounted"
+msgstr ", share niet gemount"
+
+#: backends/platform/wii/options.cpp:174
+msgid "Network down"
+msgstr "Netwerk down"
+
+#: backends/platform/wii/options.cpp:178
+msgid "Initializing network"
+msgstr "Network initialiseren"
+
+#: backends/platform/wii/options.cpp:182
+msgid "Timeout while initializing network"
+msgstr "Timeout tijdens netwerkinitialisatie "
+
+#: backends/platform/wii/options.cpp:186
+#, c-format
+msgid "Network not initialized (%d)"
+msgstr "Netwerk niet geяnitialiseerd (%d)"
+
+#: backends/platform/wince/CEActionsPocket.cpp:46
+msgid "Hide Toolbar"
+msgstr "Verberg werkbalk"
+
+#: backends/platform/wince/CEActionsPocket.cpp:47
+msgid "Show Keyboard"
+msgstr "Toon Toetsenbord"
+
+#: backends/platform/wince/CEActionsPocket.cpp:48
+msgid "Sound on/off"
+msgstr "Geluid aan/uit"
+
+#: backends/platform/wince/CEActionsPocket.cpp:49
+msgid "Right click"
+msgstr "Rechter klik"
+
+#: backends/platform/wince/CEActionsPocket.cpp:50
+msgid "Show/Hide Cursor"
+msgstr "Toon/Verberg Wijzer"
+
+#: backends/platform/wince/CEActionsPocket.cpp:51
+msgid "Free look"
+msgstr "Vrij kijken"
+
+#: backends/platform/wince/CEActionsPocket.cpp:52
+msgid "Zoom up"
+msgstr "Zoom omhoog"
+
+#: backends/platform/wince/CEActionsPocket.cpp:53
+msgid "Zoom down"
+msgstr "Zoom omlaag"
+
+#: backends/platform/wince/CEActionsPocket.cpp:55
+#: backends/platform/wince/CEActionsSmartphone.cpp:49
+msgid "Bind Keys"
+msgstr "Koppel Toetsen"
+
+#: backends/platform/wince/CEActionsPocket.cpp:56
+msgid "Cursor Up"
+msgstr "Cursor Omhoog"
+
+#: backends/platform/wince/CEActionsPocket.cpp:57
+msgid "Cursor Down"
+msgstr "Cursor Omlaag"
+
+#: backends/platform/wince/CEActionsPocket.cpp:58
+msgid "Cursor Left"
+msgstr "Cursor naar Links"
+
+#: backends/platform/wince/CEActionsPocket.cpp:59
+msgid "Cursor Right"
+msgstr "Cursor naar Rechts"
+
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Do you want to load or save the game?"
+msgstr "Wilt u het spel laden of opslaan?"
+
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+msgid " Are you sure you want to quit ? "
+msgstr "Weet u zeker dat u wilt stoppen?"
+
+#: backends/platform/wince/CEActionsSmartphone.cpp:50
+msgid "Keyboard"
+msgstr "Toetsenbord"
+
+#: backends/platform/wince/CEActionsSmartphone.cpp:51
+msgid "Rotate"
+msgstr "Roteer"
+
+#: backends/platform/wince/CELauncherDialog.cpp:56
+msgid "Using SDL driver "
+msgstr "Gebruik SDL stuurprogramma"
+
+#: backends/platform/wince/CELauncherDialog.cpp:60
+msgid "Display "
+msgstr "Scherm"
+
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "Do you want to perform an automatic scan ?"
+msgstr "Wilt u een automatische scan uitvoeren?"
+
+#: backends/platform/wince/wince-sdl.cpp:516
+msgid "Map right click action"
+msgstr "Koppel 'Rechter klik' actie"
+
+#: backends/platform/wince/wince-sdl.cpp:520
+msgid "You must map a key to the 'Right Click' action to play this game"
+msgstr ""
+"U moet een toets koppelen aan de 'Rechter klik' actie om dit spel te kunnen "
+"spelen."
+
+#: backends/platform/wince/wince-sdl.cpp:529
+msgid "Map hide toolbar action"
+msgstr "Koppel 'Verberg werkbalk' actie"
+
+#: backends/platform/wince/wince-sdl.cpp:533
+msgid "You must map a key to the 'Hide toolbar' action to play this game"
+msgstr ""
+"U moet een toets koppelen aan de 'Verberg werkbalk' actie om dit spel te "
+"kunnen spelen."
+
+#: backends/platform/wince/wince-sdl.cpp:542
+msgid "Map Zoom Up action (optional)"
+msgstr "Koppel 'Zoom naar boven' actie (optioneel)"
+
+#: backends/platform/wince/wince-sdl.cpp:545
+msgid "Map Zoom Down action (optional)"
+msgstr "Koppel 'Zoom naar beneden' actie (optioneel)"
+
+#: 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 ""
+"Vergeet niet de 'Verberg werkbalk' te koppelen aan een toets om de hele "
+"inventaris te zien."
+
+#: backends/events/default/default-events.cpp:196
+msgid "Do you really want to return to the Launcher?"
+msgstr "Wilt u echt terug naar het startmenu?"
+
+#: backends/events/default/default-events.cpp:196
+msgid "Launcher"
+msgstr "Startmenu"
+
+#: backends/events/default/default-events.cpp:218
+msgid "Do you really want to quit?"
+msgstr "Wilt u echt stoppen?"
+
+#: 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 "Touchscreen 'Tap Modus' - Linker klik"
+
+#: 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 "Touchscreen 'Tap Modus' - Rechter Klik"
+
+#: 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 "Touchscreen 'Tap Modus' - Zweven (Geen Klik)"
+
+#: backends/events/gph/gph-events.cpp:409
+msgid "Maximum Volume"
+msgstr "Maximale Volume"
+
+#: backends/events/gph/gph-events.cpp:411
+msgid "Increasing Volume"
+msgstr "Volume omhoog"
+
+#: backends/events/gph/gph-events.cpp:417
+msgid "Minimal Volume"
+msgstr "Minimale Volume"
+
+#: backends/events/gph/gph-events.cpp:419
+msgid "Decreasing Volume"
+msgstr "Volume omlaag"
+
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchscreen 'Tap Modus' - Zweven (DPad Klik)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
+msgid "Check for Updates..."
+msgstr "Controleren op updates..."
+
+#: backends/platform/tizen/form.cpp:263
+msgid "Right Click Once"
+msgstr "Rechter klik eenmalig"
+
+#: backends/platform/tizen/form.cpp:271
+msgid "Move Only"
+msgstr "Alleen Verplaatsen"
+
+#: backends/platform/tizen/form.cpp:294
+msgid "Escape Key"
+msgstr "Escape Toets"
+
+#: backends/platform/tizen/form.cpp:299
+msgid "Game Menu"
+msgstr "Spel Menu"
+
+#: backends/platform/tizen/form.cpp:304
+msgid "Show Keypad"
+msgstr "Toon Toetsenblok"
+
+#: backends/platform/tizen/form.cpp:309
+msgid "Control Mouse"
+msgstr "Muis Besturing"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:180
+msgid "Clicking Enabled"
+msgstr "Klikken Aangezet"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:180
+msgid "Clicking Disabled"
+msgstr "Klikken Uitgeschakeld"
+
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
+#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+msgid "Use original save/load screens"
+msgstr "Gebruik originele opslaan/laad schermen"
+
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
+#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+msgid "Use the original save/load screens, instead of the ScummVM ones"
+msgstr ""
+"Gebruik de originele opslaan/laden schermen, in plaats van die van ScummVM"
+
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
+#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
+#: engines/toltecs/menu.cpp:256
+msgid "Restore game:"
+msgstr "Laad opgeslagen spel:"
+
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
+#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
+#: engines/toltecs/menu.cpp:256
+msgid "Restore"
+msgstr "Laad"
+
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
+#, c-format
+msgid ""
+"Failed to load game state from file:\n"
+"\n"
+"%s"
+msgstr ""
+"Fout tijdens laden van opgeslagen spel in bestand:\n"
+"\n"
+"%s"
+
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
+#, c-format
+msgid ""
+"Failed to save game state to file:\n"
+"\n"
+"%s"
+msgstr ""
+"Fout tijdens opslaan van spel in bestand:\n"
+"\n"
+"%s"
+
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
+#, c-format
+msgid ""
+"Successfully saved game state in file:\n"
+"\n"
+"%s"
+msgstr ""
+"Spel succesvol opgeslagen in bestand:\n"
+"\n"
+"%s"
+
+#: engines/agos/animation.cpp:557
+#, c-format
+msgid "Cutscene file '%s' not found!"
+msgstr "Cutscene bestand '%s' niet gevonden!"
+
+#: engines/drascula/saveload.cpp:47
+msgid ""
+"ScummVM found that you have old savefiles for Drascula that should be "
+"converted.\n"
+"The old save game format is no longer supported, so you will not be able to "
+"load your games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked again the next "
+"time you start the game.\n"
+msgstr ""
+"ScummVM heeft geconstateerd dat u oude opgeslagen spellen voor Drascula "
+"heeft die geconverteerd zouden moeten worden.\n"
+"Het oude formaat wordt niet meer ondersteund, dus u zult uw opgeslagen "
+"spellen niet meer kunnen laden als u ze niet converteerd.\n"
+"\n"
+"Klik OK om ze nu te converteren, anders zult u de volgende keer als u het "
+"spel start dit weer gevraagd worden.\n"
+
+#: engines/dreamweb/detection.cpp:57
+msgid "Use bright palette mode"
+msgstr "Gebruik heldere palet modus"
+
+#: engines/dreamweb/detection.cpp:58
+msgid "Display graphics using the game's bright palette"
+msgstr "Gebruik het heldere palet van het spel voor grafische zaken."
+
+#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
+#: engines/tinsel/saveload.cpp:532
+msgid "Failed to load game state from file."
+msgstr "Laden van opgeslagen spel mislukt."
+
+#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+msgid "Failed to save game state to file."
+msgstr "Opslaan van spel in bestand is mislukt."
+
+#: engines/gob/inter_v5.cpp:107
+msgid "Failed to delete file."
+msgstr "Bestand verwijderen niet gelukt."
+
+#: engines/groovie/detection.cpp:312
+msgid "Fast movie speed"
+msgstr "Film snel afspelen"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Speel films sneller af"
+
+#: engines/groovie/script.cpp:399
+msgid "Failed to save game"
+msgstr "Opslaan van spel mislukt."
+
+#. I18N: Studio audience adds an applause and cheering sounds whenever
+#. Malcolm makes a joke.
+#: engines/kyra/detection.cpp:62
+msgid "Studio audience"
+msgstr "Publiek"
+
+#: engines/kyra/detection.cpp:63
+msgid "Enable studio audience"
+msgstr "Publiek inschakelen"
+
+#. I18N: This option allows the user to skip text and cutscenes.
+#: engines/kyra/detection.cpp:73
+msgid "Skip support"
+msgstr "Support overslaan"
+
+#: engines/kyra/detection.cpp:74
+msgid "Allow text and cutscenes to be skipped"
+msgstr "Toestaan om tekst en cutscenes over te slaan"
+
+#. I18N: Helium mode makes people sound like they've inhaled Helium.
+#: engines/kyra/detection.cpp:84
+msgid "Helium mode"
+msgstr "Helium-modus"
+
+#: engines/kyra/detection.cpp:85
+msgid "Enable helium mode"
+msgstr "Helium-modus aangezet"
+
+#. I18N: When enabled, this option makes scrolling smoother when
+#. changing from one screen to another.
+#: engines/kyra/detection.cpp:99
+msgid "Smooth scrolling"
+msgstr "Vloeiend scrollen"
+
+#: engines/kyra/detection.cpp:100
+msgid "Enable smooth scrolling when walking"
+msgstr "Schakelt vloeiend scrollen in als er gelopen word"
+
+#. 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 "Zwevend wijzers"
+
+#: engines/kyra/detection.cpp:113
+msgid "Enable floating cursors"
+msgstr "Zwevende wijzers inschakelen"
+
+#. I18N: HP stands for Hit Points
+#: engines/kyra/detection.cpp:127
+msgid "HP bar graphs"
+msgstr "HP balk grafieken"
+
+#: engines/kyra/detection.cpp:128
+msgid "Enable hit point bar graphs"
+msgstr "Hitpoints balkgrafieken inschakelen"
+
+#: engines/kyra/lol.cpp:478
+msgid "Attack 1"
+msgstr "Aanval 1"
+
+#: engines/kyra/lol.cpp:479
+msgid "Attack 2"
+msgstr "Aanval 2"
+
+#: engines/kyra/lol.cpp:480
+msgid "Attack 3"
+msgstr "Aanval 3"
+
+#: engines/kyra/lol.cpp:481
+msgid "Move Forward"
+msgstr "Beweeg Vooruit"
+
+#: engines/kyra/lol.cpp:482
+msgid "Move Back"
+msgstr "Beweeg Terug"
+
+#: engines/kyra/lol.cpp:483
+msgid "Slide Left"
+msgstr "Schuif Links"
+
+#: engines/kyra/lol.cpp:484
+msgid "Slide Right"
+msgstr "Schuif Rechts"
+
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2509
+msgid "Turn Left"
+msgstr "Draai Linksom"
+
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2510
+msgid "Turn Right"
+msgstr "Draai Rechtsom"
+
+#: engines/kyra/lol.cpp:487
+msgid "Rest"
+msgstr "Rust"
+
+#: engines/kyra/lol.cpp:488
+msgid "Options"
+msgstr "Opties"
+
+#: engines/kyra/lol.cpp:489
+msgid "Choose Spell"
+msgstr "Kies Spreuk"
+
+#: 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 ""
+"Het lijkt erop dat u een General MIDI apparaat gebruikt,\n"
+"maar het spel ondersteunt alleen Roland MT32 MIDI.\n"
+"We zullen proberen te Roland MT32 instrumenten te vertalen naar General MIDI "
+"instrumenten. Het is mogelijk dat somige tracks niet goed klinken."
+
+#. I18N: Option for fast scene switching
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
+msgid "~Z~ip Mode Activated"
+msgstr "~Z~ip Modus Aangezet"
+
+#: engines/mohawk/dialogs.cpp:93
+msgid "~T~ransitions Enabled"
+msgstr "~O~vergangen Aangezet"
+
+#. I18N: Drop book page
+#: engines/mohawk/dialogs.cpp:95
+msgid "~D~rop Page"
+msgstr "Laat Pagina ~V~allen"
+
+#: engines/mohawk/dialogs.cpp:99
+msgid "~S~how Map"
+msgstr "~T~oon Map"
+
+#: engines/mohawk/dialogs.cpp:105
+msgid "~M~ain Menu"
+msgstr "~H~oofdmenu"
+
+#: engines/mohawk/dialogs.cpp:168
+msgid "~W~ater Effect Enabled"
+msgstr "~W~ater Effect Aangezet"
+
+#: engines/neverhood/detection.cpp:167
+msgid "Skip the Hall of Records storyboard scenes"
+msgstr "Sla de Hall of Records verhaallijnscenes over"
+
+#: engines/neverhood/detection.cpp:168
+msgid "Allows the player to skip past the Hall of Records storyboard scenes"
+msgstr ""
+"Maakt het voor de speler mogelijk om de Hall of Records verhaallijnscenes "
+"over te slaan"
+
+#: engines/neverhood/detection.cpp:174
+msgid "Scale the making of videos to full screen"
+msgstr "Schaal het maken van videos naar het volledige scherm"
+
+#: engines/neverhood/detection.cpp:175
+msgid "Scale the making of videos, so that they use the whole screen"
+msgstr "Schaal het maken van videos zodat ze het volledige scherm gebruiken"
+
+#: engines/parallaction/saveload.cpp:133
+#, c-format
+msgid ""
+"Can't save game in slot %i\n"
+"\n"
+msgstr ""
+"Spel opslaan in slot %i mislukt\n"
+"\n"
+
+#: engines/parallaction/saveload.cpp:204
+msgid "Loading game..."
+msgstr "Laden spel..."
+
+#: engines/parallaction/saveload.cpp:219
+msgid "Saving game..."
+msgstr "Spel opslaan..."
+
+#: engines/parallaction/saveload.cpp:272
+msgid ""
+"ScummVM found that you have old savefiles for Nippon Safes that should be "
+"renamed.\n"
+"The old names are no longer supported, so you will not be able to load your "
+"games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked next time.\n"
+msgstr ""
+"ScummVM heeft geconstateerd dat u oude opgeslagen spellen voor Nippon Safes "
+"heeft die van naam veranderd zouden moeten worden.\n"
+"De oude namen worden niet meer ondersteund, dus u zult uw opgeslagen spellen "
+"niet meer kunnen laden als u ze niet converteerd.\n"
+"\n"
+"Klik OK om ze nu te converteren, anders zult u de volgende keer als u het "
+"spel start dit weer gevraagd worden.\n"
+
+#: engines/parallaction/saveload.cpp:319
+msgid "ScummVM successfully converted all your savefiles."
+msgstr "ScummVM heeft al uw opgeslagen spellen succesvol geconverteerd."
+
+#: engines/parallaction/saveload.cpp:321
+msgid ""
+"ScummVM printed some warnings in your console window and can't guarantee all "
+"your files have been converted.\n"
+"\n"
+"Please report to the team."
+msgstr ""
+"ScummVM heeft enkele waarschuwing in uw consolewindow geprint en kan niet "
+"garanderen dat al uw files zijn geconverteerd.\n"
+"\n"
+"Meld dit a.u.b. bij de ontwikkelaars."
+
+#: engines/pegasus/pegasus.cpp:714
+msgid "Invalid save file name"
+msgstr "ongeldige bewaarbestandsnaam"
+
+#: engines/pegasus/pegasus.cpp:2507
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Omhoog/Zoom In/Ga Vooruit/Open Deuren"
+
+#: engines/pegasus/pegasus.cpp:2508
+msgid "Down/Zoom Out"
+msgstr "Naar beneden/Uitzoomen"
+
+#: engines/pegasus/pegasus.cpp:2511
+msgid "Display/Hide Inventory Tray"
+msgstr "Toon/Verberg Inventaris Blad"
+
+#: engines/pegasus/pegasus.cpp:2512
+msgid "Display/Hide Biochip Tray"
+msgstr "Toon/Verberg Bioschip Blad"
+
+#: engines/pegasus/pegasus.cpp:2513
+msgid "Action/Select"
+msgstr "Actie/Selecteer"
+
+#: engines/pegasus/pegasus.cpp:2514
+msgid "Toggle Center Data Display"
+msgstr "Aan-/Uitzetten centreren van Datascherm"
+
+#: engines/pegasus/pegasus.cpp:2515
+msgid "Display/Hide Info Screen"
+msgstr "Toon/Verberg Infoscherm"
+
+#: engines/pegasus/pegasus.cpp:2516
+msgid "Display/Hide Pause Menu"
+msgstr "Toon/Verberg Pauze-Menu"
+
+#: engines/sci/detection.cpp:374
+msgid "EGA undithering"
+msgstr "EGA undithering"
+
+#: engines/sci/detection.cpp:375
+msgid "Enable undithering in EGA games"
+msgstr "Undithering inschakelen in EGA spellen"
+
+#: engines/sci/detection.cpp:384
+msgid "Prefer digital sound effects"
+msgstr "Geef de voorkeur aan digitale geluidseffecten"
+
+#: engines/sci/detection.cpp:385
+msgid "Prefer digital sound effects instead of synthesized ones"
+msgstr "Geef de voorkeur aan digitale geluidseffecten boven gesynthetiseerde"
+
+#: engines/sci/detection.cpp:404
+msgid "Use IMF/Yamaha FB-01 for MIDI output"
+msgstr "Gebruik IMF/Yamaha FB-01 voor MIDI"
+
+#: engines/sci/detection.cpp:405
+msgid ""
+"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
+"output"
+msgstr ""
+"Gebruik een IBM Music Feature kaart of eem Yamaha FB-01 FM synth module voor "
+"MIDI"
+
+#: engines/sci/detection.cpp:415
+msgid "Use CD audio"
+msgstr "Gebruik CD audio"
+
+#: engines/sci/detection.cpp:416
+msgid "Use CD audio instead of in-game audio, if available"
+msgstr "Gebruik CD audio in plaats van in-game audio, als dat beschikbaar is."
+
+#: engines/sci/detection.cpp:426
+msgid "Use Windows cursors"
+msgstr "Gebruik Windows muisaanwijzers"
+
+#: engines/sci/detection.cpp:427
+msgid ""
+"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
+msgstr ""
+"Gebruik Windows muisaanwijzers (kleiner en monochrome) in plaats van de DOS "
+"muisaanwijzers"
+
+#: engines/sci/detection.cpp:437
+msgid "Use silver cursors"
+msgstr "Gebruik zilveren muisaanwijzers"
+
+#: engines/sci/detection.cpp:438
+msgid ""
+"Use the alternate set of silver cursors, instead of the normal golden ones"
+msgstr ""
+"Gebruik de alternative set van zilveren cursors, in plaats van de normale "
+"gouden"
+
+#: engines/scumm/dialogs.cpp:176
+#, c-format
+msgid "Insert Disk %c and Press Button to Continue."
+msgstr "Plaats disk %c en druk knop om verder te gaan."
+
+#: engines/scumm/dialogs.cpp:177
+#, c-format
+msgid "Unable to Find %s, (%c%d) Press Button."
+msgstr "Kan %s niet vinden, (%c%d) Druk op de knop."
+
+#: engines/scumm/dialogs.cpp:178
+#, c-format
+msgid "Error reading disk %c, (%c%d) Press Button."
+msgstr "Fout tijdens lezen van disk %c, (%c%d) Druk op de knop."
+
+#: engines/scumm/dialogs.cpp:179
+msgid "Game Paused. Press SPACE to Continue."
+msgstr "Spel is gepauzeerd. Druk op de spatiebalk om verder te gaan."
+
+#. 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:183
+msgid "Are you sure you want to restart? (Y/N)"
+msgstr "Weet u zeker dat u opnieuw wilt beginnen? (J/N)J"
+
+#. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment
+#: engines/scumm/dialogs.cpp:185
+msgid "Are you sure you want to quit? (Y/N)"
+msgstr "Weet u zeker dat u wilt stoppen? (J/N)J"
+
+#: engines/scumm/dialogs.cpp:190
+msgid "Play"
+msgstr "Spelen"
+
+#: engines/scumm/dialogs.cpp:194
+msgid "Insert save/load game disk"
+msgstr "Plaats bewaar/laad speldisk"
+
+#: engines/scumm/dialogs.cpp:195
+msgid "You must enter a name"
+msgstr "U moet een naam invoeren"
+
+#: engines/scumm/dialogs.cpp:196
+msgid "The game was NOT saved (disk full?)"
+msgstr "Het spel was NIET opgeslagen (disk vol?)"
+
+#: engines/scumm/dialogs.cpp:197
+msgid "The game was NOT loaded"
+msgstr "Het spel was NIET geladen"
+
+#: engines/scumm/dialogs.cpp:198
+#, c-format
+msgid "Saving '%s'"
+msgstr "Opslaan '%s'"
+
+#: engines/scumm/dialogs.cpp:199
+#, c-format
+msgid "Loading '%s'"
+msgstr "Laden '%s'"
+
+#: engines/scumm/dialogs.cpp:200
+msgid "Name your SAVE game"
+msgstr "Geef uw spel een naam"
+
+#: engines/scumm/dialogs.cpp:201
+msgid "Select a game to LOAD"
+msgstr "Selecteer welk opgeslagen spel u wilt laden."
+
+#: engines/scumm/dialogs.cpp:202
+msgid "Game title)"
+msgstr "Spel titel)"
+
+#. I18N: Previous page button
+#: engines/scumm/dialogs.cpp:288
+msgid "~P~revious"
+msgstr "~V~orige"
+
+#. I18N: Next page button
+#: engines/scumm/dialogs.cpp:290
+msgid "~N~ext"
+msgstr "~V~olgende"
+
+#: engines/scumm/dialogs.cpp:600
+msgid "Speech Only"
+msgstr "Alleen Spraak"
+
+#: engines/scumm/dialogs.cpp:601
+msgid "Speech and Subtitles"
+msgstr "Spraak and Subtitels"
+
+#: engines/scumm/dialogs.cpp:602
+msgid "Subtitles Only"
+msgstr "Alleen subtitels"
+
+#: engines/scumm/dialogs.cpp:610
+msgctxt "lowres"
+msgid "Speech & Subs"
+msgstr "Tekst en Spraak"
+
+#: engines/scumm/dialogs.cpp:656
+msgid "Select a Proficiency Level."
+msgstr "Selecteer een vakkundigheidsniveau."
+
+#: engines/scumm/dialogs.cpp:658
+msgid "Refer to your Loom(TM) manual for help."
+msgstr "Raadpleeg uw Loom(TM) handleiding voor hulp."
+
+#: engines/scumm/dialogs.cpp:662
+msgid "Practice"
+msgstr "Oefenen"
+
+#: engines/scumm/dialogs.cpp:663
+msgid "Expert"
+msgstr "Expert"
+
+#: engines/scumm/help.cpp:73
+msgid "Common keyboard commands:"
+msgstr "Gebruikelijke toetsenbord commandos:"
+
+#: engines/scumm/help.cpp:74
+msgid "Save / Load dialog"
+msgstr "Opslaan / Laden dialoog"
+
+#: engines/scumm/help.cpp:76
+msgid "Skip line of text"
+msgstr "Regel text overslaan"
+
+#: engines/scumm/help.cpp:77
+msgid "Esc"
+msgstr "Esc"
+
+#: engines/scumm/help.cpp:77
+msgid "Skip cutscene"
+msgstr "Cutscene overslaan"
+
+#: engines/scumm/help.cpp:78
+msgid "Space"
+msgstr "Spatie"
+
+#: engines/scumm/help.cpp:78
+msgid "Pause game"
+msgstr "Spel pauzeren"
+
+#: engines/scumm/help.cpp:79 engines/scumm/help.cpp:84
+#: engines/scumm/help.cpp:95 engines/scumm/help.cpp:96
+#: engines/scumm/help.cpp:97 engines/scumm/help.cpp:98
+#: engines/scumm/help.cpp:99 engines/scumm/help.cpp:100
+#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102
+msgid "Ctrl"
+msgstr "Ctrl"
+
+#: engines/scumm/help.cpp:79
+msgid "Load game state 1-10"
+msgstr "Laad opgeslagen spel 1-10"
+
+#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:84
+#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:100
+#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102
+msgid "Alt"
+msgstr "Alt"
+
+#: engines/scumm/help.cpp:80
+msgid "Save game state 1-10"
+msgstr "Spel opslaan 1-10"
+
+#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:89
+msgid "Enter"
+msgstr "Enter"
+
+#: engines/scumm/help.cpp:87
+msgid "Music volume up / down"
+msgstr "Muziek volume omhoog / omlaag"
+
+#: engines/scumm/help.cpp:88
+msgid "Text speed slower / faster"
+msgstr "Tekst langzamer / sneller"
+
+#: engines/scumm/help.cpp:89
+msgid "Simulate left mouse button"
+msgstr "Simuleer linkermuisknop"
+
+#: engines/scumm/help.cpp:90
+msgid "Tab"
+msgstr "Tab"
+
+#: engines/scumm/help.cpp:90
+msgid "Simulate right mouse button"
+msgstr "Simuleer rechtermuisknop"
+
+#: engines/scumm/help.cpp:93
+msgid "Special keyboard commands:"
+msgstr "Speciale toetsenbord commando's:"
+
+#: engines/scumm/help.cpp:94
+msgid "Show / Hide console"
+msgstr "Toon / Verberg console"
+
+#: engines/scumm/help.cpp:95
+msgid "Start the debugger"
+msgstr "Start de debugger"
+
+#: engines/scumm/help.cpp:96
+msgid "Show memory consumption"
+msgstr "Toon geheugen gebruik"
+
+#: engines/scumm/help.cpp:97
+msgid "Run in fast mode (*)"
+msgstr "Draai in snelle modus (*)"
+
+#: engines/scumm/help.cpp:98
+msgid "Run in really fast mode (*)"
+msgstr "Draai in zeer snelle modus (*)"
+
+#: engines/scumm/help.cpp:99
+msgid "Toggle mouse capture"
+msgstr "Mousecapture In-/Uitschakelen"
+
+#: engines/scumm/help.cpp:100
+msgid "Switch between graphics filters"
+msgstr "Schakel tussen grafische filters"
+
+#: engines/scumm/help.cpp:101
+msgid "Increase / Decrease scale factor"
+msgstr "Verhoog / Verlaag schalingsfactor"
+
+#: engines/scumm/help.cpp:102
+msgid "Toggle aspect-ratio correction"
+msgstr "Schakel pixelverhoudingcorrectie aan/uit"
+
+#: engines/scumm/help.cpp:107
+msgid "* Note that using ctrl-f and"
+msgstr "* Het gebruik van Ctrl-F en"
+
+#: engines/scumm/help.cpp:108
+msgid " ctrl-g are not recommended"
+msgstr " Ctrl-G wordt niet aanbevolen"
+
+#: engines/scumm/help.cpp:109
+msgid " since they may cause crashes"
+msgstr " omdat dit crashes of andere"
+
+#: engines/scumm/help.cpp:110
+msgid " or incorrect game behavior."
+msgstr " effecten in het spel kan veroorzaken."
+
+#: engines/scumm/help.cpp:114
+msgid "Spinning drafts on the keyboard:"
+msgstr "Garen spinnen op het toetsenbord:"
+
+#: engines/scumm/help.cpp:116
+msgid "Main game controls:"
+msgstr "Hoofd spel besturing:"
+
+#: engines/scumm/help.cpp:121 engines/scumm/help.cpp:136
+#: engines/scumm/help.cpp:161
+msgid "Push"
+msgstr "Duw"
+
+#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137
+#: engines/scumm/help.cpp:162
+msgid "Pull"
+msgstr "Trek"
+
+#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138
+#: engines/scumm/help.cpp:163 engines/scumm/help.cpp:197
+#: engines/scumm/help.cpp:207
+msgid "Give"
+msgstr "Geef"
+
+#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139
+#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:190
+#: engines/scumm/help.cpp:208
+msgid "Open"
+msgstr "Open"
+
+#: engines/scumm/help.cpp:126
+msgid "Go to"
+msgstr "Ga naar"
+
+#: engines/scumm/help.cpp:127
+msgid "Get"
+msgstr "Pak"
+
+#: engines/scumm/help.cpp:128 engines/scumm/help.cpp:152
+#: engines/scumm/help.cpp:170 engines/scumm/help.cpp:198
+#: engines/scumm/help.cpp:213 engines/scumm/help.cpp:224
+#: engines/scumm/help.cpp:250
+msgid "Use"
+msgstr "Gebruik"
+
+#: engines/scumm/help.cpp:129 engines/scumm/help.cpp:141
+msgid "Read"
+msgstr "Lees"
+
+#: engines/scumm/help.cpp:130 engines/scumm/help.cpp:147
+msgid "New kid"
+msgstr "Nieuw kind"
+
+#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:153
+#: engines/scumm/help.cpp:171
+msgid "Turn on"
+msgstr "Zet aan"
+
+#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:154
+#: engines/scumm/help.cpp:172
+msgid "Turn off"
+msgstr "Zet uit"
+
+#: engines/scumm/help.cpp:142 engines/scumm/help.cpp:167
+#: engines/scumm/help.cpp:194
+msgid "Walk to"
+msgstr "Loop naar"
+
+#: engines/scumm/help.cpp:143 engines/scumm/help.cpp:168
+#: engines/scumm/help.cpp:195 engines/scumm/help.cpp:210
+#: engines/scumm/help.cpp:227
+msgid "Pick up"
+msgstr "Pak op"
+
+#: engines/scumm/help.cpp:144 engines/scumm/help.cpp:169
+msgid "What is"
+msgstr "Wat is"
+
+#: engines/scumm/help.cpp:146
+msgid "Unlock"
+msgstr "Maak open"
+
+#: engines/scumm/help.cpp:149
+msgid "Put on"
+msgstr "Zet op"
+
+#: engines/scumm/help.cpp:150
+msgid "Take off"
+msgstr "Doe af"
+
+#: engines/scumm/help.cpp:156
+msgid "Fix"
+msgstr "Repareer"
+
+#: engines/scumm/help.cpp:158
+msgid "Switch"
+msgstr "Schakel"
+
+#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:228
+msgid "Look"
+msgstr "Kijk"
+
+#: engines/scumm/help.cpp:173 engines/scumm/help.cpp:223
+msgid "Talk"
+msgstr "Praat"
+
+#: engines/scumm/help.cpp:174
+msgid "Travel"
+msgstr "Reis"
+
+#: engines/scumm/help.cpp:175
+msgid "To Henry / To Indy"
+msgstr "Naar Henry / Naar Indy"
+
+#. I18N: These are different musical notes
+#: engines/scumm/help.cpp:179
+msgid "play C minor on distaff"
+msgstr "speel C mineur op spinrok"
+
+#: engines/scumm/help.cpp:180
+msgid "play D on distaff"
+msgstr "speel D op spinrok"
+
+#: engines/scumm/help.cpp:181
+msgid "play E on distaff"
+msgstr "speel E op spinrok"
+
+#: engines/scumm/help.cpp:182
+msgid "play F on distaff"
+msgstr "speel F op spinrok"
+
+#: engines/scumm/help.cpp:183
+msgid "play G on distaff"
+msgstr "speel G op spinrok"
+
+#: engines/scumm/help.cpp:184
+msgid "play A on distaff"
+msgstr "speel A op spinrok"
+
+#: engines/scumm/help.cpp:185
+msgid "play B on distaff"
+msgstr "speel B op spinrok"
+
+#: engines/scumm/help.cpp:186
+msgid "play C major on distaff"
+msgstr "speel C majeur op spinrok"
+
+#: engines/scumm/help.cpp:192 engines/scumm/help.cpp:214
+msgid "puSh"
+msgstr "Duw"
+
+#: engines/scumm/help.cpp:193 engines/scumm/help.cpp:215
+msgid "pull (Yank)"
+msgstr "Trek"
+
+#: engines/scumm/help.cpp:196 engines/scumm/help.cpp:212
+#: engines/scumm/help.cpp:248
+msgid "Talk to"
+msgstr "Praat met"
+
+#: engines/scumm/help.cpp:199 engines/scumm/help.cpp:211
+msgid "Look at"
+msgstr "Kijk naar"
+
+#: engines/scumm/help.cpp:200
+msgid "turn oN"
+msgstr "zet aaN"
+
+#: engines/scumm/help.cpp:201
+msgid "turn oFf"
+msgstr "zet uit"
+
+#: engines/scumm/help.cpp:217
+msgid "KeyUp"
+msgstr "ToetsOmhoog"
+
+#: engines/scumm/help.cpp:217
+msgid "Highlight prev dialogue"
+msgstr "Vorig dialoog oplichten"
+
+#: engines/scumm/help.cpp:218
+msgid "KeyDown"
+msgstr "ToetsOmlaag"
+
+#: engines/scumm/help.cpp:218
+msgid "Highlight next dialogue"
+msgstr "Volgend dialoog oplichten"
+
+#: engines/scumm/help.cpp:222
+msgid "Walk"
+msgstr "Loop"
+
+#: engines/scumm/help.cpp:225 engines/scumm/help.cpp:234
+#: engines/scumm/help.cpp:241 engines/scumm/help.cpp:249
+msgid "Inventory"
+msgstr "Inventaris"
+
+#: engines/scumm/help.cpp:226
+msgid "Object"
+msgstr "Object"
+
+#: engines/scumm/help.cpp:229
+msgid "Black and White / Color"
+msgstr "Zwart-Wit / Kleur"
+
+#: engines/scumm/help.cpp:232
+msgid "Eyes"
+msgstr "Ogen"
+
+#: engines/scumm/help.cpp:233
+msgid "Tongue"
+msgstr "Tong"
+
+#: engines/scumm/help.cpp:235
+msgid "Punch"
+msgstr "Stoot"
+
+#: engines/scumm/help.cpp:236
+msgid "Kick"
+msgstr "Schop"
+
+#: engines/scumm/help.cpp:239 engines/scumm/help.cpp:247
+msgid "Examine"
+msgstr "Onderzoek"
+
+#: engines/scumm/help.cpp:240
+msgid "Regular cursor"
+msgstr "Normale cursor"
+
+#. I18N: Comm is a communication device
+#: engines/scumm/help.cpp:243
+msgid "Comm"
+msgstr "Comm"
+
+#: engines/scumm/help.cpp:246
+msgid "Save / Load / Options"
+msgstr "Opslaan / Laden / Opties"
+
+#: engines/scumm/help.cpp:255
+msgid "Other game controls:"
+msgstr "Andere spel besturing:"
+
+#: engines/scumm/help.cpp:257 engines/scumm/help.cpp:267
+msgid "Inventory:"
+msgstr "Inventaris:"
+
+#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:274
+msgid "Scroll list up"
+msgstr "Scroll lijst omhoog"
+
+#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275
+msgid "Scroll list down"
+msgstr "Scroll lijst naar beneden"
+
+#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:268
+msgid "Upper left item"
+msgstr "Linker bovenste voorwerp"
+
+#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:270
+msgid "Lower left item"
+msgstr "Linker beneden voorwerp"
+
+#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271
+msgid "Upper right item"
+msgstr "Rechter bovenste voorwerp"
+
+#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:273
+msgid "Lower right item"
+msgstr "Rechter beneden voorwerp"
+
+#: engines/scumm/help.cpp:269
+msgid "Middle left item"
+msgstr "Linker middelste voorwerp"
+
+#: engines/scumm/help.cpp:272
+msgid "Middle right item"
+msgstr "Rechter middelste voorwerp"
+
+#: engines/scumm/help.cpp:279 engines/scumm/help.cpp:284
+msgid "Switching characters:"
+msgstr "Verwissel karakters:"
+
+#: engines/scumm/help.cpp:281
+msgid "Second kid"
+msgstr "Tweede kind"
+
+#: engines/scumm/help.cpp:282
+msgid "Third kid"
+msgstr "Derde kind"
+
+#: engines/scumm/help.cpp:294
+msgid "Fighting controls (numpad):"
+msgstr "Gevechtbesturing (numeriek toetsenblok):"
+
+#: engines/scumm/help.cpp:295 engines/scumm/help.cpp:296
+#: engines/scumm/help.cpp:297
+msgid "Step back"
+msgstr "Stap terug"
+
+#: engines/scumm/help.cpp:298
+msgid "Block high"
+msgstr "Blokker hoog"
+
+#: engines/scumm/help.cpp:299
+msgid "Block middle"
+msgstr "Blokkeer midden"
+
+#: engines/scumm/help.cpp:300
+msgid "Block low"
+msgstr "Blokkeer laag"
+
+#: engines/scumm/help.cpp:301
+msgid "Punch high"
+msgstr "Stoot hoog"
+
+#: engines/scumm/help.cpp:302
+msgid "Punch middle"
+msgstr "Stoot in het midden"
+
+#: engines/scumm/help.cpp:303
+msgid "Punch low"
+msgstr "Stoot laag"
+
+#: engines/scumm/help.cpp:306
+msgid "These are for Indy on left."
+msgstr "Deze zijn voor Indy op links."
+
+#: engines/scumm/help.cpp:307
+msgid "When Indy is on the right,"
+msgstr "Wanneer Indy rechts staat,"
+
+#: engines/scumm/help.cpp:308
+msgid "7, 4, and 1 are switched with"
+msgstr "7, 4 en 1 zijn verwisseld met"
+
+#: engines/scumm/help.cpp:309
+msgid "9, 6, and 3, respectively."
+msgstr "9, 6 en 3 respectievelijk."
+
+#: engines/scumm/help.cpp:316
+msgid "Biplane controls (numpad):"
+msgstr "Tweedekkerbesturing (numeriek toetsenbord):"
+
+#: engines/scumm/help.cpp:317
+msgid "Fly to upper left"
+msgstr "Vlieg naar links omhoog"
+
+#: engines/scumm/help.cpp:318
+msgid "Fly to left"
+msgstr "Vlieg naar links"
+
+#: engines/scumm/help.cpp:319
+msgid "Fly to lower left"
+msgstr "Vlieg naar links omlaag"
+
+#: engines/scumm/help.cpp:320
+msgid "Fly upwards"
+msgstr "Vlieg omhoog"
+
+#: engines/scumm/help.cpp:321
+msgid "Fly straight"
+msgstr "Vlieg recht"
+
+#: engines/scumm/help.cpp:322
+msgid "Fly down"
+msgstr "Vlieg omlaag"
+
+#: engines/scumm/help.cpp:323
+msgid "Fly to upper right"
+msgstr "Vlieg naar rechts omhoog"
+
+#: engines/scumm/help.cpp:324
+msgid "Fly to right"
+msgstr "Vlieg naar rechts"
+
+#: engines/scumm/help.cpp:325
+msgid "Fly to lower right"
+msgstr "Vlieg naar rechts omlaag"
+
+#: engines/scumm/scumm.cpp:1823
+#, c-format
+msgid ""
+"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
+"but %s is missing. Using AdLib instead."
+msgstr ""
+"Voor MIDI support is de Roland Upgrade van Lucasarts vereist,\n"
+"maar %s ontbreekt. Er wordt nu AdLib gebruikt."
+
+#: engines/scumm/scumm.cpp:2594
+msgid ""
+"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
+"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
+"directory inside the Tentacle game directory."
+msgstr ""
+"Normaal gesproken zou Maniac Mansion nu starten. Maar ScummVM doet dat nog "
+"niet. Om het te spelen, ga naar \"Spel Toevoegen\" in het ScummVM start menu "
+"en selecteer de map 'Maniac' in de Tentacle map."
+
+#: 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"
+
+#: engines/sky/detection.cpp:44
+msgid "Floppy intro"
+msgstr "Floppy intro"
+
+#: engines/sky/detection.cpp:45
+msgid "Use the floppy version's intro (CD version only)"
+msgstr "Gebruik de floppy versie van de intro (alleen voor de CD versie)"
+
+#: engines/sword1/animation.cpp:524
+#, c-format
+msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
+msgstr "PSX stream cutscene '%s' kan niet in paletted modus afgespeeld worden"
+
+#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
+msgstr "DXA cutscenes gevonden maar ScummVM is gebouwd zonder 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 cutscenes gevonden maar ScummVM is gebouwd zonder MPEG-2 ondersteuning"
+
+#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
+#, c-format
+msgid "Cutscene '%s' not found"
+msgstr "Cutscene '%s' niet gevonden"
+
+#: engines/sword1/control.cpp:863
+msgid ""
+"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
+"converted.\n"
+"The old save game format is no longer supported, so you will not be able to "
+"load your games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked again the next "
+"time you start the game.\n"
+msgstr ""
+"ScummVM heeft geconstateerd dat u oude opgeslagen spellen voor Broken Sword "
+"1 heeft die geconverteerd zouden moeten worden.\n"
+"Het oude formaat wordt niet meer ondersteund, dus u zult uw opgeslagen "
+"spellen niet meer kunnen laden als u ze niet converteerd.\n"
+"\n"
+"Klik OK om ze nu te converteren, anders zult u de volgende keer als u het "
+"spel start dit weer gevraagd worden.\n"
+
+#: engines/sword1/control.cpp:1232
+#, c-format
+msgid ""
+"Target new save game already exists!\n"
+"Would you like to keep the old save game (%s) or the new one (%s)?\n"
+msgstr ""
+"Bestand voor het nieuwe opgeslagen spel bestaat al!\n"
+"Wilt u het oude opgeslagen spel (%s) of de nieuwe (%s) behouden?\n"
+
+#: engines/sword1/control.cpp:1235
+msgid "Keep the old one"
+msgstr "Houd de oude"
+
+#: engines/sword1/control.cpp:1235
+msgid "Keep the new one"
+msgstr "Houd de nieuwe"
+
+#: engines/sword1/logic.cpp:1633
+msgid "This is the end of the Broken Sword 1 Demo"
+msgstr "Dit is het einde van de Broken Sword 1 Demo"
+
+#: engines/sword2/animation.cpp:425
+msgid ""
+"PSX cutscenes found but ScummVM has been built without RGB color support"
+msgstr ""
+"PSX cutscenes gevonden maar ScummVM is gebouwd zonder RGB kleuren "
+"ondersteuning"
+
+#: engines/sword2/sword2.cpp:79
+msgid "Show object labels"
+msgstr "Toon objectnamen"
+
+#: engines/sword2/sword2.cpp:80
+msgid "Show labels for objects on mouse hover"
+msgstr "Toon labels voor objecten als de muis er over zweeft"
+
+#: engines/teenagent/resources.cpp:95
+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:116
+msgid ""
+"The teenagent.dat file is compressed and zlib hasn't been included in this "
+"executable. Please decompress it"
+msgstr ""
+"Het \"teenagent.dat\" bestand is gecomprimeerd en zlib is niet meegenomen in "
+"deze versie van ScummVM. Decomprimeer a.u.b. het bestand."
diff --git a/po/nn_NO.po b/po/nn_NO.po
index ff5b51a093..496b00703b 100644
--- a/po/nn_NO.po
+++ b/po/nn_NO.po
@@ -7,18 +7,17 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
-"PO-Revision-Date: 2011-04-25 23:07+0100\n"
-"Last-Translator: Einar Johan T. Sјmхen <einarjohants@gmail.com>\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-07-11 00:04+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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Poedit-Language: Norwegian Nynorsk\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
-"X-Poedit-Country: NORWAY\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 1.5.5\n"
#: gui/about.cpp:94
#, c-format
@@ -34,17 +33,16 @@ msgid "Available engines:"
msgstr "Tilgjengelege motorar:"
#: gui/browser.cpp:68
-#, fuzzy
msgid "Show hidden files"
-msgstr "Vis / Skjul konsoll"
+msgstr "Vis skjulte filer"
#: gui/browser.cpp:68
msgid "Show files marked with the hidden attribute"
-msgstr ""
+msgstr "Syn filer markert med skjult-attributten"
#: gui/browser.cpp:72
msgid "Go up"
-msgstr "Gх tilbake"
+msgstr "Opp eit nivх"
#: gui/browser.cpp:72 gui/browser.cpp:74
msgid "Go to previous directory level"
@@ -53,7 +51,7 @@ msgstr "Gх til forrige mappenivх"
#: gui/browser.cpp:74
msgctxt "lowres"
msgid "Go up"
-msgstr "Gх tilbake"
+msgstr "Oppover"
#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:351 gui/massadd.cpp:95 gui/options.cpp:1239
@@ -91,9 +89,8 @@ msgstr "Syn Tastatur"
msgid "Remap keys"
msgstr "Omkople tastar"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-#, fuzzy
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Veksle fullskjerm"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -112,7 +109,7 @@ msgstr "Kople"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -154,7 +151,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Kort spelidentifikator nytta for х referere til lagra spel, og х kјyre "
@@ -210,9 +207,8 @@ msgid "Platform:"
msgstr "Plattform:"
#: gui/launcher.cpp:237
-#, fuzzy
msgid "Engine"
-msgstr "Undersјk"
+msgstr "Motor"
#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090
msgid "Graphics"
@@ -311,7 +307,7 @@ msgid "Extra Path:"
msgstr "Ekstrasti:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr ""
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -325,7 +321,7 @@ msgstr "Lagringssti:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr ""
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -358,10 +354,11 @@ msgid "Select directory with game data"
msgstr "Vel mappe med speldata"
#: gui/launcher.cpp:547
+#, fuzzy
msgid "Select additional game directory"
-msgstr ""
+msgstr "Vel mappe med speldata"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Vel mappe for lagra spel"
@@ -406,7 +403,7 @@ msgid "~L~oad..."
msgstr "~Х~pne..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Хpne eit lagra spel for the velde spelet"
#: gui/launcher.cpp:638
@@ -512,9 +509,8 @@ msgid "Do you really want to remove this game configuration?"
msgstr "Vil du verkeleg fjerne denne spelkonfigurasjonen?"
#: gui/launcher.cpp:999
-#, fuzzy
-msgid "Do you want to load savegame?"
-msgstr "Vil du хpne eller lagre spelet?"
+msgid "Do you want to load saved game?"
+msgstr "Vil du laste det lagra spelet?"
#: gui/launcher.cpp:1048
msgid "This game does not support loading games from the launcher."
@@ -574,8 +570,8 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
-msgstr "11kHz"
+msgid "11 kHz"
+msgstr "11 kHz"
#: gui/options.cpp:87
msgid "22 kHz"
@@ -601,11 +597,11 @@ msgstr ""
#: gui/options.cpp:401
msgid "the video mode could not be changed."
-msgstr ""
+msgstr "Kunne ikkje endre videomodus."
#: gui/options.cpp:407
msgid "the fullscreen setting could not be changed"
-msgstr ""
+msgstr "Fullskjerminstillinga kunne ikkje endrast"
#: gui/options.cpp:413
msgid "the aspect ratio setting could not be changed"
@@ -642,7 +638,7 @@ msgstr "Fјretrukken eining:"
#: gui/options.cpp:771
msgid "Music Device:"
-msgstr ""
+msgstr "Musikkeining:"
#: gui/options.cpp:771 gui/options.cpp:773
msgid "Specifies preferred sound device or sound card emulator"
@@ -653,14 +649,16 @@ msgid "Specifies output sound device or sound card emulator"
msgstr ""
#: gui/options.cpp:773
+#, fuzzy
msgctxt "lowres"
msgid "Preferred Dev.:"
-msgstr ""
+msgstr "Fјretrukken eining:"
#: gui/options.cpp:773
+#, fuzzy
msgctxt "lowres"
msgid "Music Device:"
-msgstr ""
+msgstr "Ingen musikk"
#: gui/options.cpp:800
msgid "AdLib emulator:"
@@ -684,7 +682,7 @@ msgstr ""
#: gui/options.cpp:822
msgid "GM Device:"
-msgstr ""
+msgstr "GM Eining:"
#: gui/options.cpp:822
msgid "Specifies default sound device for General MIDI output"
@@ -696,15 +694,15 @@ msgstr "Ikkje nytt General MIDI musikk"
#: gui/options.cpp:844 gui/options.cpp:910
msgid "Use first available device"
-msgstr ""
+msgstr "Nytt fјrste tilgjengelege eining"
#: gui/options.cpp:856
msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
-msgstr "SoundFont stјttast av enkelte lydkort, Fluidsynth og Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
+msgstr "SoundFont stјttast av enkelte lydkort, FluidSynth og Timidity"
#: gui/options.cpp:858
msgctxt "lowres"
@@ -725,11 +723,11 @@ msgstr "MIDI gain:"
#: gui/options.cpp:874
msgid "FluidSynth Settings"
-msgstr ""
+msgstr "FluidSynth instillingar"
#: gui/options.cpp:881
msgid "MT-32 Device:"
-msgstr ""
+msgstr "MT-32 Eining:"
#: gui/options.cpp:881
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
@@ -871,7 +869,7 @@ msgstr "Pluginsti:"
#: gui/options.cpp:1170 gui/fluidsynth-dialog.cpp:138
msgid "Misc"
-msgstr "Div"
+msgstr "Diverse"
#: gui/options.cpp:1172
msgctxt "lowres"
@@ -908,13 +906,8 @@ msgid "Language of ScummVM GUI"
msgstr "Sprхk i ScummVM-GUIet"
#: gui/options.cpp:1366
-#, fuzzy
msgid "You have to restart ScummVM before your changes will take effect."
-msgstr "Du mх omstarte ScummVM for at endringane skal skje."
-
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Vel mappe for lagra spel"
+msgstr "Du mх starte ScummVM pх nytt for at endringane skal tre i kraft."
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
@@ -942,11 +935,11 @@ msgstr ""
#: gui/saveload-dialog.cpp:167
msgid "List view"
-msgstr ""
+msgstr "Listevisning"
#: gui/saveload-dialog.cpp:168
msgid "Grid view"
-msgstr ""
+msgstr "Rutenettvisning"
#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:360
msgid "No date saved"
@@ -965,7 +958,7 @@ msgid "Delete"
msgstr "Slett"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Vil du verkeleg slette det lagra spelet?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -986,24 +979,21 @@ msgstr "Ikkje navngjeven speltilstand"
#: gui/saveload-dialog.cpp:548
msgid "Next"
-msgstr ""
+msgstr "Neste"
#: gui/saveload-dialog.cpp:551
msgid "Prev"
-msgstr ""
+msgstr "Forrige"
#: gui/saveload-dialog.cpp:739
-#, fuzzy
msgid "New Save"
-msgstr "Lagre"
+msgstr "Ny Lagring"
#: gui/saveload-dialog.cpp:739
-#, fuzzy
msgid "Create a new save game"
-msgstr "Full speltittel:"
+msgstr "Lag eit nytt lagra spel"
#: gui/saveload-dialog.cpp:868
-#, fuzzy
msgid "Name: "
msgstr "Namn:"
@@ -1026,38 +1016,32 @@ msgid "Disabled GFX"
msgstr "Deaktivert GFX"
#: gui/ThemeEngine.cpp:348
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Standard Teiknar (16bpp)"
+msgstr "Standardteiknar"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
-#, fuzzy
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
-msgstr "Standard (16bpp)"
+msgstr "Standard"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "Antialiased Teiknar (16bpp)"
+msgstr "Kantutjevna teiknar"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased"
-msgstr "Antialiased (16bpp)"
+msgstr "Kantutjevna"
#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
msgid "Clear value"
msgstr "Tјm verdi"
#: gui/fluidsynth-dialog.cpp:68
-#, fuzzy
msgid "Reverb"
-msgstr "Aldri"
+msgstr "Romklang"
#: gui/fluidsynth-dialog.cpp:70 gui/fluidsynth-dialog.cpp:102
-#, fuzzy
msgid "Active"
-msgstr " (Aktivt)"
+msgstr "Aktiv"
#: gui/fluidsynth-dialog.cpp:72
msgid "Room:"
@@ -1069,11 +1053,11 @@ msgstr ""
#: gui/fluidsynth-dialog.cpp:86
msgid "Width:"
-msgstr ""
+msgstr "Bredde:"
#: gui/fluidsynth-dialog.cpp:93 gui/fluidsynth-dialog.cpp:111
msgid "Level:"
-msgstr ""
+msgstr "Nivх:"
#: gui/fluidsynth-dialog.cpp:100
msgid "Chorus"
@@ -1081,40 +1065,39 @@ msgstr ""
#: gui/fluidsynth-dialog.cpp:104
msgid "N:"
-msgstr ""
+msgstr "N:"
#: gui/fluidsynth-dialog.cpp:118
-#, fuzzy
msgid "Speed:"
-msgstr "Tale"
+msgstr "Hastighet:"
#: gui/fluidsynth-dialog.cpp:125
msgid "Depth:"
-msgstr ""
+msgstr "Dybde:"
#: gui/fluidsynth-dialog.cpp:132
msgid "Type:"
-msgstr ""
+msgstr "Type:"
#: gui/fluidsynth-dialog.cpp:135
msgid "Sine"
-msgstr ""
+msgstr "Sinus"
#: gui/fluidsynth-dialog.cpp:136
msgid "Triangle"
-msgstr ""
+msgstr "Triangel"
#: gui/fluidsynth-dialog.cpp:140
msgid "Interpolation:"
-msgstr ""
+msgstr "Interpolering:"
#: gui/fluidsynth-dialog.cpp:143
msgid "None (fastest)"
-msgstr ""
+msgstr "Ingen (raskast)"
#: gui/fluidsynth-dialog.cpp:144
msgid "Linear"
-msgstr ""
+msgstr "Linjцr"
#: gui/fluidsynth-dialog.cpp:145
msgid "Fourth-order"
@@ -1126,11 +1109,11 @@ msgstr ""
#: gui/fluidsynth-dialog.cpp:150
msgid "Reset"
-msgstr ""
+msgstr "Nullstill"
#: gui/fluidsynth-dialog.cpp:150
msgid "Reset all FluidSynth settings to their default values."
-msgstr ""
+msgstr "Nullstill alle FluidSynth-instillingar til standardverdiar"
#: gui/fluidsynth-dialog.cpp:217
#, fuzzy
@@ -1175,9 +1158,8 @@ msgid "No error"
msgstr "Ingen feil"
#: common/error.cpp:40
-#, fuzzy
msgid "Game data not found"
-msgstr "Speldata ikkje funne"
+msgstr "Fant ikkje speldata"
#: common/error.cpp:42
msgid "Game id not supported"
@@ -1238,15 +1220,16 @@ msgstr "Ukjend feil"
#: engines/advancedDetector.cpp:317
#, c-format
msgid "The game in '%s' seems to be unknown."
-msgstr ""
+msgstr "Spelet i '%s' ser ut til х vere ukjend."
#: engines/advancedDetector.cpp:318
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
+"Vennlegst rapporter fјlgjande data til ScummVM-teamet, saman med namnet"
#: engines/advancedDetector.cpp:320
msgid "of the game you tried to add and its version/language/etc.:"
-msgstr ""
+msgstr "pх spelet du prјvde х leggje til, samt versjon/sprхk/etc.:"
#: engines/dialogs.cpp:85
msgid "~R~esume"
@@ -1273,15 +1256,13 @@ msgid "~A~bout"
msgstr "~O~m"
#: engines/dialogs.cpp:105 engines/dialogs.cpp:181
-#, fuzzy
msgid "~R~eturn to Launcher"
-msgstr "~T~ilbake til oppstarter"
+msgstr "Tilbake til Oppsta~r~tar"
#: engines/dialogs.cpp:107 engines/dialogs.cpp:183
-#, fuzzy
msgctxt "lowres"
msgid "~R~eturn to Launcher"
-msgstr "~T~ilbake til oppstarter"
+msgstr "Tilbake til Oppsta~r~tar"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
@@ -1335,9 +1316,8 @@ msgid "Could not initialize color format."
msgstr ""
#: engines/engine.cpp:253
-#, fuzzy
msgid "Could not switch to video mode: '"
-msgstr "Gjeldende videomodus:"
+msgstr "Kunne ikkje veksle til videomodus: '"
#: engines/engine.cpp:262
#, fuzzy
@@ -1379,10 +1359,13 @@ msgid ""
"ScummVM. As such, it is likely to be unstable, and any saves you make might "
"not work in future versions of ScummVM."
msgstr ""
+"ХTVARING: Spelet du forsјker х starte er ikkje fullt ut stјtta av ScummVM "
+"ennх. Derfor er det sannsynleg at det er ustabilt, og det er mogleg at lagra "
+"spel ikkje vil fungere med fremtidige versjonar av ScummVM."
#: engines/engine.cpp:452
msgid "Start anyway"
-msgstr ""
+msgstr "Start allikevel"
#: audio/fmopl.cpp:50
msgid "MAME OPL emulator"
@@ -1448,7 +1431,7 @@ msgstr "C64 Lydemulator"
#: audio/softsynth/mt32.cpp:200
#, fuzzy
msgid "Initializing MT-32 Emulator"
-msgstr "Initialiserar MT-32-emulator"
+msgstr "MT-32 Emulator"
#: audio/softsynth/mt32.cpp:426
msgid "MT-32 Emulator"
@@ -1477,7 +1460,7 @@ msgstr " (Aktivt)"
#: backends/keymapper/remap-dialog.cpp:107
msgid " (Blocked)"
-msgstr ""
+msgstr " (Blokkert)"
#: backends/keymapper/remap-dialog.cpp:120
msgid " (Global)"
@@ -1546,11 +1529,11 @@ msgstr "Hovudskjermsskalering:"
#: backends/platform/ds/arm9/source/dsoptions.cpp:107
msgid "Hardware scale (fast, but low quality)"
-msgstr ""
+msgstr "Maskinvareskalering (rask, men lav kvalitet)"
#: backends/platform/ds/arm9/source/dsoptions.cpp:108
msgid "Software scale (good quality, but slower)"
-msgstr ""
+msgstr "Programvareskalering (god kvalitet, men treigare)"
#: backends/platform/ds/arm9/source/dsoptions.cpp:109
msgid "Unscaled (you must scroll left and right)"
@@ -1577,16 +1560,18 @@ msgid "Mouse-click-and-drag mode disabled."
msgstr ""
#: backends/platform/iphone/osys_events.cpp:313
+#, fuzzy
msgid "Touchpad mode enabled."
-msgstr ""
+msgstr "~O~vergangar aktivert"
#: backends/platform/iphone/osys_events.cpp:315
+#, fuzzy
msgid "Touchpad mode disabled."
-msgstr ""
+msgstr "Deaktivert GFX"
#: backends/platform/maemo/maemo.cpp:209
msgid "Click Mode"
-msgstr ""
+msgstr "Klikkmodus"
#: backends/platform/maemo/maemo.cpp:215
#: backends/platform/symbian/src/SymbianActions.cpp:42
@@ -1597,9 +1582,8 @@ msgid "Left Click"
msgstr "Venstreklikk"
#: backends/platform/maemo/maemo.cpp:218
-#, fuzzy
msgid "Middle Click"
-msgstr "Midtre venstre gjenstand"
+msgstr "Midtklikk"
#: backends/platform/maemo/maemo.cpp:221
#: backends/platform/symbian/src/SymbianActions.cpp:43
@@ -1609,64 +1593,60 @@ msgid "Right Click"
msgstr "Hјgreklikk"
#: backends/platform/sdl/macosx/appmenu_osx.mm:77
-#, fuzzy
msgid "Hide ScummVM"
-msgstr "Avslutt ScummVM"
+msgstr "Skjul ScummVM"
#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
-msgstr ""
+msgstr "Skjul Andre"
#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
-msgstr ""
+msgstr "Syn alle"
#: backends/platform/sdl/macosx/appmenu_osx.mm:109
#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
-msgstr ""
+msgstr "Vindu"
#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
-msgstr ""
+msgstr "Minimer"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:46
msgid "Normal (no scaling)"
-msgstr "Normal (inga skalering)"
+msgstr "Normal (ikkje skaler)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:65
msgctxt "lowres"
msgid "Normal (no scaling)"
-msgstr "Normal (inga skalering)"
+msgstr "Normal (ikkje skaler)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2148
#, fuzzy
msgid "Enabled aspect ratio correction"
-msgstr "Veksle aspekt-korrigering"
+msgstr "Aspekt-korrigering"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2154
#, fuzzy
msgid "Disabled aspect ratio correction"
-msgstr "Veksle aspekt-korrigering"
+msgstr "Aspekt-korrigering"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2209
-#, fuzzy
msgid "Active graphics filter:"
-msgstr "Veksle grafikkfiltre"
+msgstr "Aktivt grafikkfilter:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2251
-#, fuzzy
msgid "Windowed mode"
-msgstr "Teiknemodus:"
+msgstr "Vindusmodus"
#: backends/graphics/opengl/opengl-graphics.cpp:118
-#, fuzzy
msgid "OpenGL"
-msgstr "Хpne"
+msgstr "OpenGL"
#: backends/graphics/opengl/opengl-graphics.cpp:119
msgid "OpenGL (No filtering)"
-msgstr ""
+msgstr "OpenGL (Ingen filtrering)"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -1704,8 +1684,9 @@ msgid "Swap character"
msgstr ""
#: backends/platform/symbian/src/SymbianActions.cpp:49
+#, fuzzy
msgid "Skip text"
-msgstr ""
+msgstr "Hopp over tekstlinje"
#: backends/platform/symbian/src/SymbianActions.cpp:51
msgid "Fast mode"
@@ -1730,7 +1711,7 @@ msgstr "Globalmeny"
#: backends/platform/symbian/src/SymbianActions.cpp:55
msgid "Virtual keyboard"
-msgstr ""
+msgstr "Virtuelt tastatur"
#: backends/platform/symbian/src/SymbianActions.cpp:56
msgid "Key mapper"
@@ -1765,8 +1746,9 @@ msgid "Input"
msgstr "Input"
#: backends/platform/wii/options.cpp:74
+#, fuzzy
msgid "GC Pad sensitivity:"
-msgstr ""
+msgstr "Sensitivitet"
#: backends/platform/wii/options.cpp:80
msgid "GC Pad acceleration:"
@@ -1801,8 +1783,9 @@ msgid "Server:"
msgstr "Teinar:"
#: backends/platform/wii/options.cpp:110
+#, fuzzy
msgid "Share:"
-msgstr ""
+msgstr ", delt ressurs ikkje montert"
#: backends/platform/wii/options.cpp:114
msgid "Username:"
@@ -1845,8 +1828,9 @@ msgid "Network up"
msgstr "Nettverket er oppe"
#: backends/platform/wii/options.cpp:166
+#, fuzzy
msgid ", error while mounting the share"
-msgstr ""
+msgstr "Feil under montering av DVD"
#: backends/platform/wii/options.cpp:168
msgid ", share not mounted"
@@ -1859,7 +1843,7 @@ msgstr "Nettverket er nede"
#: backends/platform/wii/options.cpp:178
#, fuzzy
msgid "Initializing network"
-msgstr "Initialiserer nettverk"
+msgstr "Init nettverk"
#: backends/platform/wii/options.cpp:182
#, fuzzy
@@ -1869,7 +1853,7 @@ msgstr "Initialiserer nettverk"
#: backends/platform/wii/options.cpp:186
#, fuzzy, c-format
msgid "Network not initialized (%d)"
-msgstr "Nettverk ikkje initialisert (%d)"
+msgstr "Init nettverk"
#: backends/platform/wince/CEActionsPocket.cpp:46
msgid "Hide Toolbar"
@@ -1987,55 +1971,55 @@ msgstr ""
"inventaret"
#: backends/events/default/default-events.cpp:196
-#, fuzzy
msgid "Do you really want to return to the Launcher?"
-msgstr "Vil du verkeleg slette det lagra spelet?"
+msgstr "Vil du verkeleg gх tilbake til oppstartaren?"
#: backends/events/default/default-events.cpp:196
-#, fuzzy
msgid "Launcher"
-msgstr "Slх"
+msgstr "Oppstartar"
#: backends/events/default/default-events.cpp:218
-#, fuzzy
msgid "Do you really want to quit?"
-msgstr "Vil du avslutte?"
+msgstr "Vil du verkeleg avslutte?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: backends/events/gph/gph-events.cpp:385
+#: backends/events/gph/gph-events.cpp:428
#: backends/events/openpandora/op-events.cpp:168
+#, fuzzy
msgid "Touchscreen 'Tap Mode' - Left Click"
-msgstr ""
+msgstr "Tap for venstre-klikk, dobbelt-tap for hјgre-klikk"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: backends/events/gph/gph-events.cpp:387
+#: backends/events/gph/gph-events.cpp:430
#: backends/events/openpandora/op-events.cpp:170
+#, fuzzy
msgid "Touchscreen 'Tap Mode' - Right Click"
-msgstr ""
+msgstr "Tap for venstre-klikk, dobbelt-tap for hјgre-klikk"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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:410
-#, fuzzy
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
-msgstr "Volum"
+msgstr "Maks Volum"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
+#, fuzzy
msgid "Increasing Volume"
-msgstr ""
+msgstr "Volum"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
#, fuzzy
msgid "Minimal Volume"
msgstr "Volum"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
+#, fuzzy
msgid "Decreasing Volume"
-msgstr ""
+msgstr "Volum"
#: backends/events/openpandora/op-events.cpp:174
msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
@@ -2043,7 +2027,7 @@ msgstr ""
#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
-msgstr ""
+msgstr "SJх etter oppdateringar..."
#: backends/platform/tizen/form.cpp:263
#, fuzzy
@@ -2057,39 +2041,39 @@ msgstr "Tale"
#: backends/platform/tizen/form.cpp:294
msgid "Escape Key"
-msgstr ""
+msgstr "Escape Tast"
#: backends/platform/tizen/form.cpp:299
-#, fuzzy
msgid "Game Menu"
-msgstr "Spel"
+msgstr "Spelmeny"
#: backends/platform/tizen/form.cpp:304
-#, fuzzy
msgid "Show Keypad"
-msgstr "Syn tastatur"
+msgstr "Syn taltastatur"
#: backends/platform/tizen/form.cpp:309
+#, fuzzy
msgid "Control Mouse"
-msgstr ""
+msgstr "Musklikk"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
+#, fuzzy
msgid "Clicking Enabled"
-msgstr ""
+msgstr "~O~vergangar aktivert"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
-msgstr ""
+msgstr "Klikking Deaktivert"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
-msgstr ""
+msgstr "Nytt opprinnelege skjermar for lagring/lasting"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
@@ -2105,7 +2089,7 @@ msgstr "Gjenopprett spel:"
msgid "Restore"
msgstr "Gjenopprett"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2113,7 +2097,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2121,7 +2105,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2157,15 +2141,15 @@ msgstr ""
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
#: engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
-msgstr ""
+msgstr "Kunne ikkje laste lagra spel frх fil."
#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
-msgstr ""
+msgstr "Klarte ikkje lagre speltilstand til fil."
#: engines/gob/inter_v5.cpp:107
msgid "Failed to delete file."
-msgstr ""
+msgstr "Klarte ikkje slette fil."
#: engines/groovie/detection.cpp:312
#, fuzzy
@@ -2174,27 +2158,28 @@ msgstr "Rask modus"
#: engines/groovie/detection.cpp:313
msgid "Play movies at an increased speed"
-msgstr ""
+msgstr "Spel filmar med auka hastighet"
#: engines/groovie/script.cpp:399
#, fuzzy
msgid "Failed to save game"
-msgstr "Full speltittel:"
+msgstr "Lagra spel:"
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
msgid "Studio audience"
-msgstr ""
+msgstr "Studiopublikum"
#: engines/kyra/detection.cpp:63
msgid "Enable studio audience"
-msgstr ""
+msgstr "Aktiver studiopublikum"
#. I18N: This option allows the user to skip text and cutscenes.
#: engines/kyra/detection.cpp:73
+#, fuzzy
msgid "Skip support"
-msgstr ""
+msgstr "Hopp over"
#: engines/kyra/detection.cpp:74
msgid "Allow text and cutscenes to be skipped"
@@ -2202,13 +2187,14 @@ msgstr ""
#. I18N: Helium mode makes people sound like they've inhaled Helium.
#: engines/kyra/detection.cpp:84
+#, fuzzy
msgid "Helium mode"
-msgstr ""
+msgstr "Grafikkmodus:"
#: engines/kyra/detection.cpp:85
#, fuzzy
msgid "Enable helium mode"
-msgstr "Aktiver Roland GS-modus"
+msgstr "Grafikkmodus:"
#. I18N: When enabled, this option makes scrolling smoother when
#. changing from one screen to another.
@@ -2242,28 +2228,32 @@ msgid "Enable hit point bar graphs"
msgstr ""
#: engines/kyra/lol.cpp:478
+#, fuzzy
msgid "Attack 1"
-msgstr ""
+msgstr "byttast 7, 4, og 1 med"
#: engines/kyra/lol.cpp:479
msgid "Attack 2"
msgstr ""
#: engines/kyra/lol.cpp:480
+#, fuzzy
msgid "Attack 3"
-msgstr ""
+msgstr "9, 6, og 3, henhaldsvis."
#: engines/kyra/lol.cpp:481
msgid "Move Forward"
msgstr ""
#: engines/kyra/lol.cpp:482
+#, fuzzy
msgid "Move Back"
-msgstr ""
+msgstr "Bakoversteg"
#: engines/kyra/lol.cpp:483
+#, fuzzy
msgid "Slide Left"
-msgstr ""
+msgstr "Venstre"
#: engines/kyra/lol.cpp:484
#, fuzzy
@@ -2273,12 +2263,12 @@ msgstr "Hјgre"
#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2509
#, fuzzy
msgid "Turn Left"
-msgstr "Slх av"
+msgstr "Slх pх"
#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2510
#, fuzzy
msgid "Turn Right"
-msgstr "Peikar hјgre"
+msgstr "Slх pх"
#: engines/kyra/lol.cpp:487
#, fuzzy
@@ -2286,9 +2276,8 @@ msgid "Rest"
msgstr "Gjenopprett"
#: engines/kyra/lol.cpp:488
-#, fuzzy
msgid "Options"
-msgstr "~V~al"
+msgstr "Val"
#: engines/kyra/lol.cpp:489
#, fuzzy
@@ -2315,17 +2304,17 @@ msgstr "~O~vergangar aktivert"
#. I18N: Drop book page
#: engines/mohawk/dialogs.cpp:95
+#, fuzzy
msgid "~D~rop Page"
-msgstr ""
+msgstr "Sјkt i %d mappar ..."
#: engines/mohawk/dialogs.cpp:99
msgid "~S~how Map"
-msgstr ""
+msgstr "~S~yn Kart"
#: engines/mohawk/dialogs.cpp:105
-#, fuzzy
msgid "~M~ain Menu"
-msgstr "ScummVM Hovudmeny"
+msgstr "Hoved~m~eny"
#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
@@ -2353,16 +2342,16 @@ msgid ""
"Can't save game in slot %i\n"
"\n"
msgstr ""
+"Kan ikkje lagre spel i spor %i\n"
+"\n"
#: engines/parallaction/saveload.cpp:204
-#, fuzzy
msgid "Loading game..."
-msgstr "Хpne spel:"
+msgstr "Lastar spel..."
#: engines/parallaction/saveload.cpp:219
-#, fuzzy
msgid "Saving game..."
-msgstr "Lagra spel:"
+msgstr "Lagrar spel..."
#: engines/parallaction/saveload.cpp:272
msgid ""
@@ -2388,7 +2377,7 @@ msgstr ""
#: engines/pegasus/pegasus.cpp:714
msgid "Invalid save file name"
-msgstr ""
+msgstr "Ugyldig namn for lagra spel"
#: engines/pegasus/pegasus.cpp:2507
msgid "Up/Zoom In/Move Forward/Open Doors"
@@ -2397,7 +2386,7 @@ msgstr ""
#: engines/pegasus/pegasus.cpp:2508
#, fuzzy
msgid "Down/Zoom Out"
-msgstr "Zoom opp"
+msgstr "Zoom ned"
#: engines/pegasus/pegasus.cpp:2511
msgid "Display/Hide Inventory Tray"
@@ -2408,8 +2397,9 @@ msgid "Display/Hide Biochip Tray"
msgstr ""
#: engines/pegasus/pegasus.cpp:2513
+#, fuzzy
msgid "Action/Select"
-msgstr ""
+msgstr "Vel ei handling, og klikk 'Kople'"
#: engines/pegasus/pegasus.cpp:2514
msgid "Toggle Center Data Display"
@@ -2417,15 +2407,11 @@ msgstr ""
#: engines/pegasus/pegasus.cpp:2515
msgid "Display/Hide Info Screen"
-msgstr ""
+msgstr "Skjul/Vis infoskjerm"
#: engines/pegasus/pegasus.cpp:2516
msgid "Display/Hide Pause Menu"
-msgstr ""
-
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr ""
+msgstr "Skjul/Vis pausemeny"
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
@@ -2437,7 +2423,7 @@ msgstr ""
#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects"
-msgstr ""
+msgstr "Foretrekk digitale lydeffekter"
#: engines/sci/detection.cpp:385
msgid "Prefer digital sound effects instead of synthesized ones"
@@ -2445,7 +2431,7 @@ msgstr ""
#: engines/sci/detection.cpp:404
msgid "Use IMF/Yamaha FB-01 for MIDI output"
-msgstr ""
+msgstr "Nytt IMF/Yamaha FB-01 til MIDI-output"
#: engines/sci/detection.cpp:405
msgid ""
@@ -2455,30 +2441,29 @@ msgstr ""
#: engines/sci/detection.cpp:415
msgid "Use CD audio"
-msgstr ""
+msgstr "Nytt CD-lyd"
#: engines/sci/detection.cpp:416
msgid "Use CD audio instead of in-game audio, if available"
-msgstr ""
+msgstr "Nytt CD-lyd istaden for spellyd, om den er tilgjengeleg"
#: engines/sci/detection.cpp:426
msgid "Use Windows cursors"
-msgstr ""
+msgstr "Nytt Windospeikarar"
#: engines/sci/detection.cpp:427
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
-msgstr ""
+msgstr "Nytt windowspeikarane (mindre og monokrome) istaden for DOS-peikarane"
#: engines/sci/detection.cpp:437
-#, fuzzy
msgid "Use silver cursors"
-msgstr "Vanleg peikar"
+msgstr "Nytt sјlvpeikarar"
#: engines/sci/detection.cpp:438
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
-msgstr ""
+msgstr "Nytt det alternative settet med sјlvpeikarar, istaden for dei gylne"
#: engines/scumm/dialogs.cpp:176
#, c-format
@@ -2497,64 +2482,63 @@ msgstr ""
#: engines/scumm/dialogs.cpp:179
msgid "Game Paused. Press SPACE to Continue."
-msgstr ""
+msgstr "Spelet er pausa. Trykk MELLOMROM for х fortsette."
#. 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:183
-#, fuzzy
msgid "Are you sure you want to restart? (Y/N)"
-msgstr "Er du sikker pх at du vil avslutte?"
+msgstr "Er du sikker pх at du vil starte pх nytt (Y/N)?"
#. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment
#: engines/scumm/dialogs.cpp:185
-#, fuzzy
msgid "Are you sure you want to quit? (Y/N)"
-msgstr "Er du sikker pх at du vil avslutte?"
+msgstr "Er du sikker pх at du vil avslutte (Y/N)?"
#: engines/scumm/dialogs.cpp:190
msgid "Play"
-msgstr ""
+msgstr "Spel"
#: engines/scumm/dialogs.cpp:194
+#, fuzzy
msgid "Insert save/load game disk"
-msgstr ""
+msgstr "Vil du хpne eller lagre spelet?"
#: engines/scumm/dialogs.cpp:195
msgid "You must enter a name"
-msgstr ""
+msgstr "Du mх skrive eit namn"
#: engines/scumm/dialogs.cpp:196
+#, fuzzy
msgid "The game was NOT saved (disk full?)"
-msgstr ""
+msgstr "Full speltittel:"
#: engines/scumm/dialogs.cpp:197
msgid "The game was NOT loaded"
-msgstr ""
+msgstr "Spelet vart IKKJE lasta"
#: engines/scumm/dialogs.cpp:198
#, c-format
msgid "Saving '%s'"
-msgstr ""
+msgstr "Lagrar '%s'"
#: engines/scumm/dialogs.cpp:199
#, c-format
msgid "Loading '%s'"
-msgstr ""
+msgstr "Lastar '%s'"
#: engines/scumm/dialogs.cpp:200
msgid "Name your SAVE game"
-msgstr ""
+msgstr "Namngi det LAGRA spelet"
#: engines/scumm/dialogs.cpp:201
-#, fuzzy
msgid "Select a game to LOAD"
-msgstr "Vel eit tema"
+msgstr "Vel eit spel for LASTING"
#: engines/scumm/dialogs.cpp:202
msgid "Game title)"
-msgstr ""
+msgstr "Speltittel)"
#. I18N: Previous page button
#: engines/scumm/dialogs.cpp:288
@@ -2566,42 +2550,39 @@ msgstr "~F~orrige"
msgid "~N~ext"
msgstr "~N~este"
-#: engines/scumm/dialogs.cpp:598
-#, fuzzy
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
-msgstr "Tale"
+msgstr "Berre Tale"
-#: engines/scumm/dialogs.cpp:599
-#, fuzzy
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
-msgstr "Teksting"
+msgstr "Tale og undertekstar"
-#: engines/scumm/dialogs.cpp:600
-#, fuzzy
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
-msgstr "Teksting"
+msgstr "Berre undertekstar"
-#: engines/scumm/dialogs.cpp:608
-#, fuzzy
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
-msgstr "Tale"
+msgstr "Tekst & Tale"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
+#, fuzzy
msgid "Select a Proficiency Level."
-msgstr ""
+msgstr "Gх til forrige mappenivх"
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
-msgstr ""
+msgstr "Sjх i Loom(TM)-manualen for hjelp."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr ""
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
-msgstr ""
+msgstr "Ekspert"
#: engines/scumm/help.cpp:73
msgid "Common keyboard commands:"
@@ -2657,10 +2638,6 @@ msgstr "Lagre speltilstand 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Veksle fullskjerm"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musikkvolum opp / ned"
@@ -2736,7 +2713,7 @@ msgstr " dei kan forхrsake krцsj og"
#: engines/scumm/help.cpp:110
#, fuzzy
msgid " or incorrect game behavior."
-msgstr " feilaktig speloppfјrsel."
+msgstr "Spel"
#: engines/scumm/help.cpp:114
msgid "Spinning drafts on the keyboard:"
@@ -3117,14 +3094,14 @@ msgstr "Fly til hјgre"
msgid "Fly to lower right"
msgstr "Fly til nedre hјgre"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, 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:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3139,6 +3116,8 @@ 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 ""
@@ -3148,11 +3127,11 @@ msgstr ""
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
-msgstr ""
+msgstr "Diskettintro"
#: engines/sky/detection.cpp:45
msgid "Use the floppy version's intro (CD version only)"
-msgstr ""
+msgstr "Nytt diskettversjonens хpning (Kun CD-versjon)"
#: engines/sword1/animation.cpp:524
#, c-format
@@ -3160,17 +3139,18 @@ 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 support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
-#: engines/sword1/animation.cpp:561
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#: 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
+#, fuzzy, c-format
msgid "Cutscene '%s' not found"
-msgstr ""
+msgstr "Hopp over cutscene"
#: engines/sword1/control.cpp:863
msgid ""
@@ -3192,29 +3172,25 @@ msgstr ""
#: engines/sword1/control.cpp:1235
msgid "Keep the old one"
-msgstr ""
+msgstr "Ta vare pх den gamle"
#: engines/sword1/control.cpp:1235
msgid "Keep the new one"
-msgstr ""
+msgstr "Ta vare pх den nye"
#: engines/sword1/logic.cpp:1633
msgid "This is the end of the Broken Sword 1 Demo"
-msgstr ""
+msgstr "Dette er slutten pх Broken Sword 1-demoen"
#: engines/sword2/animation.cpp:425
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
-#: engines/sword2/animation.cpp:461
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-
#: engines/sword2/sword2.cpp:79
+#, fuzzy
msgid "Show object labels"
-msgstr ""
+msgstr "Objekt"
#: engines/sword2/sword2.cpp:80
msgid "Show labels for objects on mouse hover"
@@ -3223,7 +3199,7 @@ msgstr ""
#: engines/teenagent/resources.cpp:95
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
+msgstr "Du mangler fila 'teenagent.dat'. Skaff den frх ScummVM-heimesida"
#: engines/teenagent/resources.cpp:116
msgid ""
diff --git a/po/pl_PL.po b/po/pl_PL.po
index e42a0a8356..bc78909234 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
-"PO-Revision-Date: 2013-05-22 14:26+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-07-02 12:28+0100\n"
"Last-Translator: MichaГ ZiБbkowski <mziab@o2.pl>\n"
"Language-Team: Grajpopolsku.pl <grajpopolsku@gmail.com>\n"
"Language: Polski\n"
@@ -90,8 +90,8 @@ msgstr "WyЖwietl klawiaturъ"
msgid "Remap keys"
msgstr "Dostosuj klawisze"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "WГБcz/wyГБcz peГny ekran"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -110,7 +110,7 @@ msgstr "Przypisz"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -152,7 +152,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Krѓtki identyfikator gry uПywany do rozpoznawania zapisѓw i uruchamiania gry "
@@ -306,7 +306,7 @@ msgid "Extra Path:"
msgstr "Іc. dodatkѓw:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "OkreЖla ЖcieПkъ dodatkowych danych gry"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -320,7 +320,7 @@ msgstr "ІcieПka zapisѓw:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "OkreЖla gdzie zapisywaц stan gry"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -356,7 +356,7 @@ msgstr "Wybierz katalog z plikami gry"
msgid "Select additional game directory"
msgstr "Wybierz dodatkowy katalog gry"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Wybierz katalog dla zapisѓw"
@@ -401,7 +401,7 @@ msgid "~L~oad..."
msgstr "~W~czytaj..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Wczytaj zapis wybranej gry"
#: gui/launcher.cpp:638
@@ -508,9 +508,8 @@ msgid "Do you really want to remove this game configuration?"
msgstr "Na pewno chcesz usunБц tъ grъ z konfiguracji?"
#: gui/launcher.cpp:999
-#, fuzzy
-msgid "Do you want to load savegame?"
-msgstr "Chcesz wczytaц bБdМ zapisaц grъ?"
+msgid "Do you want to load saved game?"
+msgstr "Chcesz wczytaц zapis stanu gry?"
#: gui/launcher.cpp:1048
msgid "This game does not support loading games from the launcher."
@@ -568,7 +567,7 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
+msgid "11 kHz"
msgstr "11 kHz"
#: gui/options.cpp:87
@@ -697,9 +696,9 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr ""
-"SoundFont jest wspierany przez niektѓre karty dМwiъkowe, Fluidsynth i "
+"SoundFont jest wspierany przez niektѓre karty dМwiъkowe, FluidSynth i "
"Timidity"
#: gui/options.cpp:858
@@ -750,15 +749,16 @@ msgid "True Roland MT-32 (no GM emulation)"
msgstr "Prawdziwy Roland MT-32 (brak emulacji GM)"
#: gui/options.cpp:891
-#, fuzzy
msgid "Roland GS Device (enable MT-32 mappings)"
-msgstr "Roland w trybie GS (wyГБcz mapowanie GM)"
+msgstr "Roland w trybie GS (wГБcz mapowanie MT-32)"
#: gui/options.cpp:891
msgid ""
"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
"GS device"
msgstr ""
+"Zaznacz, jeЖli chcesz wГБczyц Гatki mapowania pozwalajБce na emulacjъ MT-32 "
+"na urzБdzeniu Roland GS"
#: gui/options.cpp:900
msgid "Don't use Roland MT-32 music"
@@ -910,10 +910,6 @@ msgstr "Jъzyk interfejsu ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Musisz zrestartowaц ScummVM, by zmiany zostaГy uwzglъdnione."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Wybierz katalog zapisѓw"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Ten katalog jest zabezpieczony przed zapisem. Wybierz inny."
@@ -963,7 +959,7 @@ msgid "Delete"
msgstr "Skasuj"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Na pewno chcesz skasowaц ten zapis?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1021,23 +1017,20 @@ msgid "Disabled GFX"
msgstr "WyГБczona grafika"
#: gui/ThemeEngine.cpp:348
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Standardowy renderer (16bpp)"
+msgstr "Standardowy renderer"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standardowy"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "WygГadzany renderer (16bpp)"
+msgstr "WygГadzany renderer"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased"
-msgstr "WygГadzany (16bpp)"
+msgstr "WygГadzany"
#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
msgid "Clear value"
@@ -1662,13 +1655,12 @@ msgid "Windowed mode"
msgstr "Okno"
#: backends/graphics/opengl/opengl-graphics.cpp:118
-#, fuzzy
msgid "OpenGL"
-msgstr "Otwѓrz"
+msgstr "OpenGL"
#: backends/graphics/opengl/opengl-graphics.cpp:119
msgid "OpenGL (No filtering)"
-msgstr ""
+msgstr "OpenGL (bez filtrowania)"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -1997,37 +1989,37 @@ msgstr "Launcher"
msgid "Do you really want to quit?"
msgstr "Na pewno chcesz wyjЖц?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "Dotkniъcie ekranu - klikniъcie LPM"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "Dotkniъcie ekranu - klikniъcie PPM"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "Dotkniъcie ekranu - przytrzymanie (brak klikniъcia)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Maksymalna gГoЖnoЖц"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Zwiъkszenie gГoЖnoЖci"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Minimalna gГoЖnoЖц"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Zmniejszenie gГoЖnoЖci"
@@ -2063,23 +2055,23 @@ msgstr "PokaП klawiaturъ"
msgid "Control Mouse"
msgstr "Steruj myszkБ"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Klikanie wГБczone"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Klikanie wyГБczone"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "UПyj oryginalnych ekranѓw odczytu/zapisu"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "UПyj oryginalnych ekranѓw odczytu/zapisu zamiast tych ze ScummVM"
@@ -2095,7 +2087,7 @@ msgstr "Wznѓw grъ:"
msgid "Restore"
msgstr "Wznѓw"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2106,7 +2098,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2117,7 +2109,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2330,19 +2322,19 @@ msgstr "~E~fekty wody wГБczone"
#: engines/neverhood/detection.cpp:167
msgid "Skip the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Pomiё scenki storyboardowe w Hali Rekordѓw"
#: engines/neverhood/detection.cpp:168
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Pozwala graczowi na pomijanie scenek storyboardowych w Hali Rekordѓw"
#: engines/neverhood/detection.cpp:174
msgid "Scale the making of videos to full screen"
-msgstr ""
+msgstr "Skaluj filmy making of na peГny ekran"
#: engines/neverhood/detection.cpp:175
msgid "Scale the making of videos, so that they use the whole screen"
-msgstr ""
+msgstr "Skaluj filmy making of, by wypeГniaГy caГy ekran"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2429,10 +2421,6 @@ msgstr "PokaП/schowaj ekran informacji"
msgid "Display/Hide Pause Menu"
msgstr "PokaП/schowaj menu pauzy"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Anty-dithering EGA"
@@ -2572,36 +2560,36 @@ msgstr "~P~oprzednia"
msgid "~N~ext"
msgstr "~N~astъpna"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Tylko mowa"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Mowa i napisy"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Tylko napisy"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Mowa i napisy"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Wybierz poziom umiejъtnoЖci."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Pomocy szukaj w instrukcji doГБczonej do Loom(TM)."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Trening"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Ekspert"
@@ -2659,10 +2647,6 @@ msgstr "Zapisz stan gry 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "WГБcz/wyГБcz peГny ekran"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Zwiъksz/zmniejsz gГoЖnoЖц muzyki"
@@ -3118,7 +3102,7 @@ msgstr "Leц w prawo"
msgid "Fly to lower right"
msgstr "Leц w dѓГ, w prawo"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3127,7 +3111,7 @@ msgstr ""
"Natywne wsparcie MIDI wymaga aktualizacji Rolanda od LucasArts,\n"
"ale brakuje %s. PrzeГБczam na tryb AdLib."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3169,17 +3153,17 @@ msgstr ""
"trybie indeksowanym"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
-msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
"Znaleziono przerywniki w formacie DXA, ale ScummVM jest skompilowany bez "
"obsГugi zlib"
-#: engines/sword1/animation.cpp:561
-#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#: 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 ""
-"Znaleziono przerywniki PSX, ale ScummVM jest skompilowany bez obsГugi trybu "
-"RGB"
+"Znaleziono przerywniki w formacie MPEG-2, ale ScummVM jest skompilowany bez "
+"obsГugi tego formatu"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3232,14 +3216,6 @@ msgstr ""
"Znaleziono przerywniki PSX, ale ScummVM jest skompilowany bez obsГugi trybu "
"RGB"
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-"Znaleziono przerywniki w formacie DXA, ale ScummVM jest skompilowany bez "
-"obsГugi zlib"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr "PokaП etykiety obiektѓw"
@@ -3261,6 +3237,11 @@ msgstr ""
"Plik teenagent.dat jest skompresowany, a ScummVM nie zawiera obsГugi zlib. "
"Rozpakuj plik."
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr ""
+#~ "Znaleziono przerywniki w formacie MPEG-2, ale ScummVM jest skompilowany "
+#~ "bez obsГugi tego formatu"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Masowe dodawanie..."
diff --git a/po/pt_BR.po b/po/pt_BR.po
index a99fa4a4aa..64d7ff8933 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\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"
@@ -91,9 +91,9 @@ msgstr "Mostrar teclado"
msgid "Remap keys"
msgstr "Remapear teclas"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
#, fuzzy
-msgid "Toggle FullScreen"
+msgid "Toggle fullscreen"
msgstr "Habilita Tela Cheia"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -112,7 +112,7 @@ msgstr "Mapear"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -154,7 +154,7 @@ msgstr "Cѓdigo:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Cѓdigo identificador usado para se referir a jogos salvos e execuчуo do jogo "
@@ -309,7 +309,7 @@ msgid "Extra Path:"
msgstr "Pasta de Extras"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Especifique a pasta para dados utilizados no jogo"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -323,7 +323,7 @@ msgstr "Pasta para Salvar"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Especifique onde guardar seus jogos salvos"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -359,7 +359,7 @@ msgstr "Selecione a pasta com os arquivos do jogo"
msgid "Select additional game directory"
msgstr "Selecione a pasta adicional do jogo"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Selecione a pasta para os jogos salvos"
@@ -404,7 +404,7 @@ msgid "~L~oad..."
msgstr "~C~arregar"
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Carregar jogo salvo do jogo selecionado"
#: gui/launcher.cpp:638
@@ -514,7 +514,7 @@ msgstr "Vocъ deseja realmente remover a configuraчуo deste jogo?"
#: gui/launcher.cpp:999
#, fuzzy
-msgid "Do you want to load savegame?"
+msgid "Do you want to load saved game?"
msgstr "Vocъ deseja carregar ou salvar o jogo?"
#: gui/launcher.cpp:1048
@@ -579,7 +579,7 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
+msgid "11 kHz"
msgstr "11 kHz"
#: gui/options.cpp:87
@@ -708,8 +708,8 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
-msgstr "SoundFont щ suportado por algumas placas de som, Fluidsynth e Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
+msgstr "SoundFont щ suportado por algumas placas de som, FluidSynth e Timidity"
#: gui/options.cpp:858
msgctxt "lowres"
@@ -922,10 +922,6 @@ msgstr "Linguagem do ScummVM GUI"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Vocъ tem que reiniciar o ScummVM para funcionar."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Selecione a pasta para o jogos salvos"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "O diretѓrio escolhido nуo pode ser usado. Por favor, selecione outro."
@@ -975,7 +971,7 @@ msgid "Delete"
msgstr "Excluir"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Vocъ realmente quer excluir este jogo salvo?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1040,7 +1036,7 @@ msgstr "GFX desabilitado"
msgid "Standard Renderer"
msgstr "Renderizador padrуo (16bpp)"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
#, fuzzy
msgid "Standard"
msgstr "Padrуo (16bpp)"
@@ -2030,37 +2026,37 @@ msgstr "Menu principal"
msgid "Do you really want to quit?"
msgstr "Vocъ realmente deseja sair?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "Touchscreen 'Modo Toque' - Clique Esquerdo"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "Touchscreen 'Modo Toque' - Clique Direito"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "Touchscreen 'Modo Toque' - Acima (Sem Clicar)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Volume mсximo"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Aumentando Volume"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Volume mэnimo"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Diminuindo Volume"
@@ -2097,23 +2093,23 @@ msgstr "Mostrar teclado"
msgid "Control Mouse"
msgstr "Controle do Mouse"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Clicando Habilitado"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Clicando Desabilitado"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr ""
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
@@ -2129,7 +2125,7 @@ msgstr "Restaurar jogo:"
msgid "Restore"
msgstr "Restaurar"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2140,7 +2136,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2151,7 +2147,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2485,10 +2481,6 @@ msgstr ""
msgid "Display/Hide Pause Menu"
msgstr ""
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr ""
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA sem dithering"
@@ -2627,36 +2619,36 @@ msgstr "~A~nterior"
msgid "~N~ext"
msgstr "~P~rѓximo"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Somente Voz"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Voz e Legendas"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Somente Legendas"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Voz e Legendas"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr ""
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr ""
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr ""
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr ""
@@ -2714,10 +2706,6 @@ msgstr "Salvar estado do jogo 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Habilita Tela Cheia"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Volume da mњsica"
@@ -3173,7 +3161,7 @@ msgstr "Voar para direita"
msgid "Fly to lower right"
msgstr "Voar para direita inferior"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3183,7 +3171,7 @@ msgstr ""
"LucasArts,\n"
"mas %s estс faltando. Utilizando AdLib ao invщs."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3224,14 +3212,15 @@ 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 support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
"Vэdeos no formato DXA foram encontrados, mas o ScummVM foi compilado sem "
"suporte a zlib"
-#: engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:561 engines/sword2/animation.cpp:461
#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+msgid ""
+"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
msgstr ""
"Vэdeos no formato DXA foram encontrados, mas o ScummVM foi compilado sem "
"suporte a zlib"
@@ -3288,14 +3277,6 @@ msgstr ""
"Vэdeos no formato DXA foram encontrados, mas o ScummVM foi compilado sem "
"suporte a zlib"
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-"Vэdeos no formato DXA foram encontrados, mas o ScummVM foi compilado sem "
-"suporte a zlib"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr ""
@@ -3315,6 +3296,12 @@ msgid ""
"executable. Please decompress it"
msgstr ""
+#, fuzzy
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr ""
+#~ "Vэdeos no formato DXA foram encontrados, mas o ScummVM foi compilado sem "
+#~ "suporte a zlib"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Multi-Adiчуo..."
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 4bade1e5e8..5c5690a746 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -1,14 +1,14 @@
# Russian translation for ScummVM.
# Copyright (C) 2010-2014 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
-# Eugene Sandulenko <sev@scummvm.org>, 2010`
+# Eugene Sandulenko <sev@scummvm.org>, 2010-2014
#
msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
-"PO-Revision-Date: 2013-05-08 22:24+0300\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-07-02 17:20+0300\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Russian\n"
"Language: Russian\n"
@@ -89,8 +89,8 @@ msgstr "Показать клавиатуру"
msgid "Remap keys"
msgstr "Переназначить клавиши"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Переключение на весь экран"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -109,7 +109,7 @@ msgstr "Назначить"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -151,7 +151,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Короткий идентификатор, используемый для имён сохранений игр и для запуска "
@@ -306,7 +306,7 @@ msgid "Extra Path:"
msgstr "Доп. путь:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Указывает путь к дополнительным файлам данных для игры"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -320,7 +320,7 @@ msgstr "Сохранения игр:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Указывает путь к сохранениям игры"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -356,7 +356,7 @@ msgstr "Выберите директорию с файлами игры"
msgid "Select additional game directory"
msgstr "Выберите дополнительную директорию игры"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Выберите директорию для сохранений"
@@ -401,7 +401,7 @@ msgid "~L~oad..."
msgstr "~З~агрузить..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Загрузить сохрнение для выбранной игры"
#: gui/launcher.cpp:638
@@ -426,7 +426,7 @@ msgstr "~У~далить игру"
#: gui/launcher.cpp:642 gui/launcher.cpp:649
msgid "Remove game from the list. The game data files stay intact"
-msgstr "Удалить игру из списка. Не удаляет игру с жесткого диска"
+msgstr "Удалить игру из списка. Не удаляет игру с носителя"
#: gui/launcher.cpp:645
msgctxt "lowres"
@@ -509,9 +509,8 @@ msgid "Do you really want to remove this game configuration?"
msgstr "Вы действительно хотите удалить настройки для этой игры?"
#: gui/launcher.cpp:999
-#, fuzzy
-msgid "Do you want to load savegame?"
-msgstr "Вы хотите загрузить либо сохранить игру?"
+msgid "Do you want to load saved game?"
+msgstr "Вы хотите загрузить игру?"
#: gui/launcher.cpp:1048
msgid "This game does not support loading games from the launcher."
@@ -569,7 +568,7 @@ msgid "8 kHz"
msgstr "8 кГц"
#: gui/options.cpp:87
-msgid "11kHz"
+msgid "11 kHz"
msgstr "11 кГц"
#: gui/options.cpp:87
@@ -592,7 +591,7 @@ msgstr "Не задан"
#: gui/options.cpp:389
msgid "Failed to apply some of the graphic options changes:"
-msgstr "Не удалось применить изменения некторых графических настроек:"
+msgstr "Не удалось применить изменения некоторых графических настроек:"
#: gui/options.cpp:401
msgid "the video mode could not be changed."
@@ -699,9 +698,10 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr ""
-"SoundFontы поддерживаются некоторыми звуковыми картами, Fluidsynth и Timidity"
+"SoundFont'ы поддерживаются некоторыми звуковыми картами, FluidSynth и "
+"Timidity"
#: gui/options.cpp:858
msgctxt "lowres"
@@ -714,7 +714,7 @@ msgstr "Смешанный режим AdLib/MIDI"
#: gui/options.cpp:864
msgid "Use both MIDI and AdLib sound generation"
-msgstr "Использовать и MIDI и AdLib для генерации звука"
+msgstr "Использовать и MIDI, и AdLib для генерации звука"
#: gui/options.cpp:867
msgid "MIDI gain:"
@@ -752,15 +752,16 @@ msgid "True Roland MT-32 (no GM emulation)"
msgstr "Настоящий Roland MT-32 (без эмуляции GM)"
#: gui/options.cpp:891
-#, fuzzy
msgid "Roland GS Device (enable MT-32 mappings)"
-msgstr "Режим Roland GS (запретить маппинг GM)"
+msgstr "Устройство Roland GS (разрешить маппинг MT-32)"
#: gui/options.cpp:891
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:900
msgid "Don't use Roland MT-32 music"
@@ -914,10 +915,6 @@ msgstr "Язык графического интерфейса ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Вы должны перезапустить ScummVM, чтобы применить изменения."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Выберите директорию для сохранений"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Не могу писать в выбранную директорию. Пожалуйста, укажите другую."
@@ -967,7 +964,7 @@ msgid "Delete"
msgstr "Удалить"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Вы действительно хотите удалить это сохранение?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1025,23 +1022,20 @@ msgid "Disabled GFX"
msgstr "Без графики"
#: gui/ThemeEngine.cpp:348
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Стандартный растеризатор (16bpp)"
+msgstr "Стандартный растеризатор"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Стандартный"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "Растеризатор со сглаживанием (16bpp)"
+msgstr "Растеризатор со сглаживанием"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased"
-msgstr "Растеризатор со сглаживанием (16bpp)"
+msgstr "Со сглаживанием"
#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
msgid "Clear value"
@@ -1052,7 +1046,6 @@ msgid "Reverb"
msgstr "Реверберация"
#: gui/fluidsynth-dialog.cpp:70 gui/fluidsynth-dialog.cpp:102
-#, fuzzy
msgid "Active"
msgstr "Активно"
@@ -1082,7 +1075,7 @@ msgstr "N:"
#: gui/fluidsynth-dialog.cpp:118
msgid "Speed:"
-msgstr "Озвучка"
+msgstr "Скорость:"
#: gui/fluidsynth-dialog.cpp:125
msgid "Depth:"
@@ -1126,7 +1119,7 @@ msgstr "Сброс"
#: gui/fluidsynth-dialog.cpp:150
msgid "Reset all FluidSynth settings to their default values."
-msgstr "Сбросить все установки FluidSynth в значения по умолчанию"
+msgstr "Сбросить все установки FluidSynth в значения по умолчанию."
#: gui/fluidsynth-dialog.cpp:217
msgid ""
@@ -1524,11 +1517,11 @@ msgstr "Главное меню ScummVM"
#: backends/platform/ds/arm9/source/dsoptions.cpp:63
msgid "~L~eft handed mode"
-msgstr "Леворукий режим"
+msgstr "~Л~еворукий режим"
#: backends/platform/ds/arm9/source/dsoptions.cpp:64
msgid "~I~ndy fight controls"
-msgstr "Управление боями в Indy"
+msgstr "~У~правление боями в Indy"
#: backends/platform/ds/arm9/source/dsoptions.cpp:65
msgid "Show mouse cursor"
@@ -1676,13 +1669,12 @@ msgid "Windowed mode"
msgstr "Оконный режим"
#: backends/graphics/opengl/opengl-graphics.cpp:118
-#, fuzzy
msgid "OpenGL"
-msgstr "Открыть"
+msgstr "OpenGL"
#: backends/graphics/opengl/opengl-graphics.cpp:119
msgid "OpenGL (No filtering)"
-msgstr ""
+msgstr "OpenGL (без фильтров)"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -2011,37 +2003,37 @@ msgstr "Главное меню"
msgid "Do you really want to quit?"
msgstr "Вы действительно хотите выйти?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Максимальная громкость"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Увеличение громкости"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Минимальная громкость"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Уменьшение громкости"
@@ -2077,23 +2069,23 @@ msgstr "Показать клавиатуру"
msgid "Control Mouse"
msgstr "Управление мышью"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Щелчки включены"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Щелчки выключены"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Использовать оригинальные экраны записи/чтения игры"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Использовать оригинальные экраны записи и сохранения игры вместо сделанных в "
@@ -2111,7 +2103,7 @@ msgstr "Восстановить игру:"
msgid "Restore"
msgstr "Восстановить"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2122,7 +2114,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2133,7 +2125,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2150,7 +2142,6 @@ msgid "Cutscene file '%s' not found!"
msgstr "Файл заставки '%s' не найден!"
#: engines/drascula/saveload.cpp:47
-#, fuzzy
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
"converted.\n"
@@ -2160,9 +2151,10 @@ msgid ""
"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"
+"ScummVM обнаружил у вас сохранения игры Drascula в старом формате, которые "
+"необходимо преобразовать.\n"
+"Старый формат больше не поддерживается, и вы не сможете загрузить сохранения "
+"если не преобразуете их.\n"
"\n"
"Нажмите ОК, чтобы перевести их в новый формат сейчас, в противном случае это "
"сообщение появится снова при следующем запуске игры.\n"
@@ -2324,44 +2316,44 @@ msgstr ""
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
-msgstr "Режим быстрого перехода активирован"
+msgstr "~Р~ежим быстрого перехода активирован"
#: engines/mohawk/dialogs.cpp:93
msgid "~T~ransitions Enabled"
-msgstr "Переходы активированы"
+msgstr "~П~ереходы активированы"
#. I18N: Drop book page
#: engines/mohawk/dialogs.cpp:95
msgid "~D~rop Page"
-msgstr "Выбросить страницу"
+msgstr "~В~ыбросить страницу"
#: engines/mohawk/dialogs.cpp:99
msgid "~S~how Map"
-msgstr "Показать карту"
+msgstr "П~о~казать карту"
#: engines/mohawk/dialogs.cpp:105
msgid "~M~ain Menu"
-msgstr "Главное меню"
+msgstr "~Г~лавное меню"
#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
-msgstr "Эффекты воды включены"
+msgstr "~Э~ффекты воды включены"
#: engines/neverhood/detection.cpp:167
msgid "Skip the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Пропустить сцены из Галереи Истории"
#: engines/neverhood/detection.cpp:168
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Позволяет игроку пропустить все сцены в Галерее Истории"
#: engines/neverhood/detection.cpp:174
msgid "Scale the making of videos to full screen"
-msgstr ""
+msgstr "Растянуть на весь экран видео о создании игры"
#: engines/neverhood/detection.cpp:175
msgid "Scale the making of videos, so that they use the whole screen"
-msgstr ""
+msgstr "Растягивает видео о создании игры так, что оно занимает весь экран"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2448,10 +2440,6 @@ msgstr "Показать/Спрятать инфоэкран"
msgid "Display/Hide Pause Menu"
msgstr "Показать/Спрятать меню паузы"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA без растра"
@@ -2595,36 +2583,36 @@ msgstr "~П~ред"
msgid "~N~ext"
msgstr "~С~лед"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Только озвучка"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Озвучка и субтитры"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Только субтитры"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Озвучка и текст"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Выберите уровень сложности."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "За помощью обратитесь к инстукции Loom(TM)"
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Практикант"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Эксперт"
@@ -2682,10 +2670,6 @@ msgstr "Сохранить игру 1-10"
msgid "Enter"
msgstr "Ввод"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Переключить на весь экран"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Громкость музыки увеличить / уменьшить"
@@ -3141,7 +3125,7 @@ msgstr "Лететь вправо"
msgid "Fly to lower right"
msgstr "Лететь вправо-вниз"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3150,7 +3134,7 @@ msgstr ""
"Режим \"родного\" MIDI требует обновление Roland Upgrade от\n"
"LucasArts, но не хватает %s. Переключаюсь на AdLib."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3190,16 +3174,15 @@ 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 support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
"Найдены заставки в формате DXA, но ScummVM был собран без поддержки zlib"
-#: engines/sword1/animation.cpp:561
-#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#: 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 ""
-"Найдены заставки в формате PSX, но ScummVM был собран без поддержки RGB "
-"цветов"
+"Найдены заставки в формате MPEG-2, но ScummVM был собран без поддержки MPEG-2"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3251,13 +3234,6 @@ msgstr ""
"Найдены заставки в формате PSX, но ScummVM был собран без поддержки RGB "
"цветов"
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-"Найдены заставки в формате DXA, но ScummVM был собран без поддержки zlib"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr "Показывать названия объектов"
@@ -3280,6 +3256,11 @@ msgstr ""
"Файл teenagent.dat сжат, но zlib не включено в эту программу. Пожалуйста, "
"распакуйте его"
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr ""
+#~ "Найдены заставки в формате MPEG-2, но ScummVM был собран без поддержки "
+#~ "MPEG-2"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Много игр..."
diff --git a/po/scummvm.pot b/po/scummvm.pot
index 7217198637..073ddeb029 100644
--- a/po/scummvm.pot
+++ b/po/scummvm.pot
@@ -6,13 +6,12 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: ScummVM 1.7.0git\n"
+"Project-Id-Version: ScummVM 1.8.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -87,8 +86,8 @@ msgstr ""
msgid "Remap keys"
msgstr ""
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr ""
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -107,7 +106,7 @@ msgstr ""
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -149,7 +148,7 @@ msgstr ""
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
@@ -301,7 +300,7 @@ msgid "Extra Path:"
msgstr ""
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr ""
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -315,7 +314,7 @@ msgstr ""
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr ""
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -351,7 +350,7 @@ msgstr ""
msgid "Select additional game directory"
msgstr ""
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr ""
@@ -396,7 +395,7 @@ msgid "~L~oad..."
msgstr ""
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr ""
#: gui/launcher.cpp:638
@@ -502,7 +501,7 @@ msgid "Do you really want to remove this game configuration?"
msgstr ""
#: gui/launcher.cpp:999
-msgid "Do you want to load savegame?"
+msgid "Do you want to load saved game?"
msgstr ""
#: gui/launcher.cpp:1048
@@ -561,7 +560,7 @@ msgid "8 kHz"
msgstr ""
#: gui/options.cpp:87
-msgid "11kHz"
+msgid "11 kHz"
msgstr ""
#: gui/options.cpp:87
@@ -688,7 +687,7 @@ msgid "SoundFont:"
msgstr ""
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr ""
#: gui/options.cpp:858
@@ -895,10 +894,6 @@ msgstr ""
msgid "You have to restart ScummVM before your changes will take effect."
msgstr ""
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr ""
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
@@ -946,7 +941,7 @@ msgid "Delete"
msgstr ""
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr ""
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1007,7 +1002,7 @@ msgstr ""
msgid "Standard Renderer"
msgstr ""
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr ""
@@ -1949,37 +1944,37 @@ msgstr ""
msgid "Do you really want to quit?"
msgstr ""
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr ""
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr ""
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr ""
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr ""
@@ -2015,23 +2010,23 @@ msgstr ""
msgid "Control Mouse"
msgstr ""
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr ""
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr ""
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr ""
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
@@ -2047,7 +2042,7 @@ msgstr ""
msgid "Restore"
msgstr ""
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2055,7 +2050,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2063,7 +2058,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2350,10 +2345,6 @@ msgstr ""
msgid "Display/Hide Pause Menu"
msgstr ""
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr ""
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr ""
@@ -2489,36 +2480,36 @@ msgstr ""
msgid "~N~ext"
msgstr ""
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr ""
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr ""
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr ""
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr ""
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr ""
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr ""
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr ""
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr ""
@@ -2576,10 +2567,6 @@ msgstr ""
msgid "Enter"
msgstr ""
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr ""
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr ""
@@ -3035,14 +3022,14 @@ msgstr ""
msgid "Fly to lower right"
msgstr ""
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, 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:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3075,11 +3062,12 @@ 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 support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr ""
-#: engines/sword1/animation.cpp:561
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#: 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
@@ -3122,11 +3110,6 @@ msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
-#: engines/sword2/animation.cpp:461
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr ""
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr ""
diff --git a/po/se_SE.po b/po/se_SE.po
index 3af34732f8..b2da26bc8a 100644
--- a/po/se_SE.po
+++ b/po/se_SE.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
-"PO-Revision-Date: 2013-05-13 21:30+0100\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-07-02 16:30+0100\n"
"Last-Translator: Hampus Flink <hampus.flink@gmail.com>\n"
"Language-Team: \n"
"Language: Svenska\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.5\n"
+"X-Generator: Poedit 1.6.5\n"
#: gui/about.cpp:94
#, c-format
@@ -89,8 +89,8 @@ msgstr "Visa tangentbord"
msgid "Remap keys"
msgstr "Stфll in tangenter"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Fullskфrmslфge"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -109,7 +109,7 @@ msgstr "Stфll in"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -151,7 +151,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Kortnamn fіr spel. Anvфnds fіr att hфnvisa till spardata och att starta "
@@ -307,7 +307,7 @@ msgid "Extra Path:"
msgstr "Sіkv. extra:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Bestфmmer sіkvфgen till ytterligare data som spelet anvфnder"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -321,7 +321,7 @@ msgstr "Sіkv. sparat:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Bestфmmer var dina spardata lagras"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -357,7 +357,7 @@ msgstr "Vфlj katalog med speldata"
msgid "Select additional game directory"
msgstr "Vфlj en ytterligare spelkatalog"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Vфlj katalog fіr spardata"
@@ -402,7 +402,7 @@ msgid "~L~oad..."
msgstr "~L~adda..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Ladda spardata fіr det valda spelet"
#: gui/launcher.cpp:638
@@ -510,9 +510,8 @@ msgid "Do you really want to remove this game configuration?"
msgstr "Vill du verkligen radera den hфr spelkonfigurationen?"
#: gui/launcher.cpp:999
-#, fuzzy
-msgid "Do you want to load savegame?"
-msgstr "Vill du ladda eller spara spelet?"
+msgid "Do you want to load saved game?"
+msgstr "Vill du ladda sparat spel?"
#: gui/launcher.cpp:1048
msgid "This game does not support loading games from the launcher."
@@ -571,7 +570,7 @@ msgid "8 kHz"
msgstr "8 kHz"
#: gui/options.cpp:87
-msgid "11kHz"
+msgid "11 kHz"
msgstr "11 kHz"
#: gui/options.cpp:87
@@ -700,8 +699,8 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
-msgstr "SoundFont stіds endast av vissa ljudkort, Fluidsynth och Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
+msgstr "SoundFont stіds endast av vissa ljudkort, FluidSynth och Timidity"
#: gui/options.cpp:858
msgctxt "lowres"
@@ -751,15 +750,16 @@ msgid "True Roland MT-32 (no GM emulation)"
msgstr "Фkta Roland MT-32 (ingen GM-emulation)"
#: gui/options.cpp:891
-#, fuzzy
msgid "Roland GS Device (enable MT-32 mappings)"
-msgstr "Roland GS-lфge (avaktivera GM-mapping)"
+msgstr "Roland GS-enhet (aktivera MT-32 mappings)"
#: gui/options.cpp:891
msgid ""
"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
"GS device"
msgstr ""
+"Aktivera om du vill anvфnda patch mapping fіr att emulera en MT-32 pх en "
+"Roland GS-enhet"
#: gui/options.cpp:900
msgid "Don't use Roland MT-32 music"
@@ -912,10 +912,6 @@ msgstr "Sprхk fіr ScummVM:s anvфndargrфnssnitt"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Du mхste starta om ScummVM fіr att фndringarna ska fх effekt."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Vфlj katalog fіr spardata"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
@@ -966,7 +962,7 @@ msgid "Delete"
msgstr "Radera"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Vill du verkligen radera den hфr spardatan?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1024,23 +1020,20 @@ msgid "Disabled GFX"
msgstr "Inaktiverad GFX"
#: gui/ThemeEngine.cpp:348
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Standard rendering (16 bpp)"
+msgstr "Standard rendering"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standard"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "Antialiserad rendering (16 bpp)"
+msgstr "Antialiserad rendering"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased"
-msgstr "Antialiserad (16 bpp)"
+msgstr "Antialiserad"
#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
msgid "Clear value"
@@ -1672,13 +1665,12 @@ msgid "Windowed mode"
msgstr "Fіnsterlфge"
#: backends/graphics/opengl/opengl-graphics.cpp:118
-#, fuzzy
msgid "OpenGL"
-msgstr "жppna"
+msgstr "OpenGL"
#: backends/graphics/opengl/opengl-graphics.cpp:119
msgid "OpenGL (No filtering)"
-msgstr ""
+msgstr "OpenGL (ingen filtrering)"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -2010,37 +2002,37 @@ msgstr "Launcher"
msgid "Do you really want to quit?"
msgstr "Vill du verkligen avsluta?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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 "Touchscreen \"Tap-lфge\" - Vфnsterklick"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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 "Touchscren \"Tap-lфge\" - Hіgerklick"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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 "Touchscreen \"Tap-lфge\" - Hover (utan klick)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Max. volym"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Hіja volymen"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Min. volym"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Sфnka volymen"
@@ -2076,23 +2068,23 @@ msgstr "Visa tangentbord"
msgid "Control Mouse"
msgstr "Kontrollera musen"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Klickning aktiverad"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Klickning deaktiverad"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Anvфnd originalskфrmar fіr spara/ladda"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
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"
@@ -2108,7 +2100,7 @@ msgstr "Хterstфll spel:"
msgid "Restore"
msgstr "Хterstфll"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2119,7 +2111,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2130,7 +2122,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2345,19 +2337,19 @@ msgstr "~V~atteneffekt aktiverad"
#: engines/neverhood/detection.cpp:167
msgid "Skip the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Skippa Hall of Records storyboard-scenerna"
#: engines/neverhood/detection.cpp:168
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Lхter spelaren skippa Hall of Records storyboard-scenerna"
#: engines/neverhood/detection.cpp:174
msgid "Scale the making of videos to full screen"
-msgstr ""
+msgstr "Skala dokumentфrvideor till helskфrm"
#: engines/neverhood/detection.cpp:175
msgid "Scale the making of videos, so that they use the whole screen"
-msgstr ""
+msgstr "Skala dokumentфrvideorna sх att de anvфnder hela skфrmen"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2445,10 +2437,6 @@ msgstr "Visa/dіlj informationsskфrm"
msgid "Display/Hide Pause Menu"
msgstr "Visa/dіlj pausmeny"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA anti-gitter"
@@ -2588,36 +2576,36 @@ msgstr "~F~іregхende"
msgid "~N~ext"
msgstr "~N~фsta"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Endast tal"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Tal och undertexter"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Endast undertexter"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Tal & text"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Vфlj en skicklighetsnivх."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Hфnvisa till din Loom(TM)-manual fіr hjфlp."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "жvning"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Expert"
@@ -2675,10 +2663,6 @@ msgstr "Spara speldata 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Fullskфrmslфge"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musikvolym hіj / sфnk"
@@ -3134,7 +3118,7 @@ msgstr "Flyg хt hіger"
msgid "Fly to lower right"
msgstr "Flyg хt nedre hіger"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3143,7 +3127,7 @@ msgstr ""
"Stіd fіr Native MIDI krфver Roland-uppdateringen frхn LucasArts,\n"
"men %s saknas. Anvфnder AdLib istфllet."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3183,13 +3167,13 @@ msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "PSX-filmscenen '%s' kan inte visas i palettlфget"
#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
-msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr "DXA filmscener hittades men ScummVM har byggts utan stіd fіr zlib"
-#: engines/sword1/animation.cpp:561
-#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
-msgstr "PSX-filmscener hittades men ScummVM har byggts utan stіd fіr RGB-fфrg"
+#: 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-filmscener hittades men ScummVM har byggts utan stіd fіr MPEG-2"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3240,12 +3224,6 @@ msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr "PSX-filmscener hittades men ScummVM har byggts utan stіd fіr RGB-fфrg"
-#: engines/sword2/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr "DXA filmscener hittades men ScummVM har byggts utan stіd fіr zlib"
-
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
msgstr "Visa etiketter"
@@ -3267,6 +3245,9 @@ msgstr ""
"Teenagent.dat-filen фr komprimerad och zlib har inte inkluderats i det hфr "
"programmet. Var god dekomprimera den"
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr "MPEG-2-filmscener hittades men ScummVM har byggts utan MPEG-2"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Masstillфgg..."
diff --git a/po/uk_UA.po b/po/uk_UA.po
index 913d2a3ca4..52427ce3c5 100644
--- a/po/uk_UA.po
+++ b/po/uk_UA.po
@@ -2,13 +2,14 @@
# Copyright (C) 2010-2014 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Lubomyr Lisen, 2010.
+# Eugene Sandulenko <sev@scummvm.org>, 2010-2014
#
msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
-"PO-Revision-Date: 2013-05-05 23:26+0200\n"
+"POT-Creation-Date: 2014-09-03 07:39+0200\n"
+"PO-Revision-Date: 2014-07-01 02:34+0300\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Ukrainian\n"
"Language: Ukrainian\n"
@@ -88,8 +89,8 @@ msgstr "Показати клавіатуру"
msgid "Remap keys"
msgstr "Перепризначити клавіші"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
-msgid "Toggle FullScreen"
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
msgstr "Перемкнути повноекранний режим"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
@@ -108,7 +109,7 @@ msgstr "Призначити"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
#: 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
@@ -150,7 +151,7 @@ msgstr "ID:"
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
"Короткий ідентифікатор, який використовується для назв збережених ігор і для "
@@ -306,7 +307,7 @@ msgid "Extra Path:"
msgstr "Додатк. шлях:"
#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
-msgid "Specifies path to additional data used the game"
+msgid "Specifies path to additional data used by the game"
msgstr "Вказує шлях до додаткових файлів даних для гри"
#: gui/launcher.cpp:332 gui/options.cpp:1152
@@ -320,7 +321,7 @@ msgstr "Шлях збер.:"
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr "Вказує шлях до збережень гри"
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -356,7 +357,7 @@ msgstr "Виберіть папку з файлами гри"
msgid "Select additional game directory"
msgstr "Виберіть додаткову папку гри"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Виберіть папку для збережень"
@@ -401,7 +402,7 @@ msgid "~L~oad..."
msgstr "~З~авантажити..."
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr "Завантажити збереження для вибраної гри"
#: gui/launcher.cpp:638
@@ -510,8 +511,8 @@ msgstr "Ви дійсно хочете видалити установки для цієї гри?"
#: gui/launcher.cpp:999
#, fuzzy
-msgid "Do you want to load savegame?"
-msgstr "Ви хочете завантажити або зберегти гру?"
+msgid "Do you want to load saved game?"
+msgstr "Ви хочете завантажити гру?"
#: gui/launcher.cpp:1048
msgid "This game does not support loading games from the launcher."
@@ -569,7 +570,7 @@ msgid "8 kHz"
msgstr "8 кГц"
#: gui/options.cpp:87
-msgid "11kHz"
+msgid "11 kHz"
msgstr "11 кГц"
#: gui/options.cpp:87
@@ -698,9 +699,9 @@ msgid "SoundFont:"
msgstr "SoundFont:"
#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
-msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
msgstr ""
-"SoundFont підтримується деякими звуковими картами, Fluidsynth та Timidity"
+"SoundFont підтримується деякими звуковими картами, FluidSynth та Timidity"
#: gui/options.cpp:858
msgctxt "lowres"
@@ -751,19 +752,20 @@ msgid "True Roland MT-32 (no GM emulation)"
msgstr "Справжній Roland MT-32 (вимкнути емуляцию GM)"
#: gui/options.cpp:891
-#, fuzzy
msgid "Roland GS Device (enable MT-32 mappings)"
-msgstr "Режим Roland GS (вимкнути маплення GM)"
+msgstr "Режим Roland GS (ввімкнути маплення MT-32)"
#: gui/options.cpp:891
msgid ""
"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
"GS device"
msgstr ""
+"Відмітьте, якщо хочете включити латки для іструментів для емуляції MT-32 на "
+"Roland"
#: gui/options.cpp:900
msgid "Don't use Roland MT-32 music"
-msgstr "Не використовувати Roland MT-32"
+msgstr "Не використовувати музику для Roland MT-32"
#: gui/options.cpp:927
msgid "Text and Speech:"
@@ -913,10 +915,6 @@ msgstr "Мова графічного інтерфейсу ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Ви повинні перезапустити ScummVM щоб застосувати зміни."
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr "Виберіть папку для збережень"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Не можу писати у вибрану папку. Будь ласка, вкажіть іншу."
@@ -966,7 +964,7 @@ msgid "Delete"
msgstr "Видалити"
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr "Ви дійсно хочете видалити це збереження?"
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1024,23 +1022,20 @@ msgid "Disabled GFX"
msgstr "Без графіки"
#: gui/ThemeEngine.cpp:348
-#, fuzzy
msgid "Standard Renderer"
-msgstr "Стандартний растеризатор (16bpp)"
+msgstr "Стандартний растеризатор"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Стандартний"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased Renderer"
-msgstr "Растеризатор зі згладжуванням (16bpp)"
+msgstr "Растеризатор зі згладжуванням"
#: gui/ThemeEngine.cpp:350
-#, fuzzy
msgid "Antialiased"
-msgstr "Растеризатор зі згладжуванням (16bpp)"
+msgstr "Зі згладжуванням"
#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
msgid "Clear value"
@@ -1670,13 +1665,12 @@ msgid "Windowed mode"
msgstr "Віконний режим"
#: backends/graphics/opengl/opengl-graphics.cpp:118
-#, fuzzy
msgid "OpenGL"
-msgstr "Відкрити"
+msgstr "OpenGL"
#: backends/graphics/opengl/opengl-graphics.cpp:119
msgid "OpenGL (No filtering)"
-msgstr ""
+msgstr "OpenGL (без фільтрів)"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -2007,37 +2001,37 @@ msgstr "Головне меню"
msgid "Do you really want to quit?"
msgstr "Ви дійсно хочете вийти?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: 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:388
-#: backends/events/gph/gph-events.cpp:431
+#: 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:390
-#: backends/events/gph/gph-events.cpp:433
+#: 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:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Максимальна Гучність"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Підвищення гучності"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Мінімальна Гучність"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Пониження гучності"
@@ -2073,23 +2067,23 @@ msgstr "Показати клавіатуру"
msgid "Control Mouse"
msgstr "Управління мишею"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Кліки увімкнено"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Кліки вимкнено"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
msgid "Use original save/load screens"
msgstr "Використовувати ориг. збереження/завантаження екрани"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Використовувати оригінальні збереження/завантаження екрани, замість ScummVM"
@@ -2106,7 +2100,7 @@ msgstr "Відновити гру:"
msgid "Restore"
msgstr "Відновити"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2117,7 +2111,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2128,7 +2122,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2142,7 +2136,7 @@ msgstr ""
#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
-msgstr "Файл заставки '%s' не знайдено!"
+msgstr "Файл ролику '%s' не знайдено!"
#: engines/drascula/saveload.cpp:47
msgid ""
@@ -2342,19 +2336,19 @@ msgstr "Ефекти води увімкнено"
#: engines/neverhood/detection.cpp:167
msgid "Skip the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Перескакувати Залу Рекордів"
#: engines/neverhood/detection.cpp:168
msgid "Allows the player to skip past the Hall of Records storyboard scenes"
-msgstr ""
+msgstr "Дозволяє гравцеві перескакувати через сцени у Залі Рекордів"
#: engines/neverhood/detection.cpp:174
msgid "Scale the making of videos to full screen"
-msgstr ""
+msgstr "Розтягувати відео про створення ігри"
#: engines/neverhood/detection.cpp:175
msgid "Scale the making of videos, so that they use the whole screen"
-msgstr ""
+msgstr "Розтягувати відео про створення ігри так, що воно займатиме весь екран"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2441,10 +2435,6 @@ msgstr "Показати/Сховати інфоекран"
msgid "Display/Hide Pause Menu"
msgstr "Показувати/Сховати меню паузи"
-#: engines/pegasus/pegasus.cpp:2517
-msgid "???"
-msgstr "???"
-
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA без растрування"
@@ -2584,36 +2574,36 @@ msgstr "~П~опер"
msgid "~N~ext"
msgstr "~Н~аст"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Тільки озвучка"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Озвучка та субтитри"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Тільки субтитри"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Озвучка та текст"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Оберіть режим складності."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "За допомогою звертайтеся до інструкції Loom(TM)."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Практика"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Експерт"
@@ -2635,7 +2625,7 @@ msgstr "Esc"
#: engines/scumm/help.cpp:77
msgid "Skip cutscene"
-msgstr "Пропустити заставку"
+msgstr "Пропустити ролик"
#: engines/scumm/help.cpp:78
msgid "Space"
@@ -2671,10 +2661,6 @@ msgstr "Зберегти стан гри 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Увімкнути повноекранний режим"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Гучність музики вище / нижче"
@@ -3130,7 +3116,7 @@ msgstr "Летіти направо"
msgid "Fly to lower right"
msgstr "Летіти донизу направо"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3139,7 +3125,7 @@ msgstr ""
"Режим \"рідного\" MIDI потребує поновлення Roland Upgrade від\n"
"LucasArts, проте %s відсутній. Перемикаюсь на AdLib."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3179,18 +3165,19 @@ 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 support"
-msgstr "Знайдено заставки DXA, але ScummVM був побудований без підтримки zlib"
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
+msgstr "Знайдено ролики DXA, але ScummVM був побудований без підтримки zlib"
-#: engines/sword1/animation.cpp:561
-#, fuzzy
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
-msgstr "Знайдені PSX ролики, але ScummVM був зібраний без підтримки RGB коліру"
+#: 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' не знайдено"
+msgstr "Ролик '%s' не знайдено"
#: engines/sword1/control.cpp:863
msgid ""
@@ -3233,13 +3220,8 @@ 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/animation.cpp:461
-#, fuzzy
-msgid ""
-"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr "Знайдено заставки DXA, але ScummVM був побудований без підтримки zlib"
+msgstr ""
+"Знайдені PSX ролики, але ScummVM був зібраний без підтримки RGB кольорів"
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
@@ -3263,6 +3245,10 @@ msgstr ""
"Файл teenagent.dat запаковано, але zlib не було включено в цю программу.Будь-"
"ласка розпакуйте його"
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr ""
+#~ "Знайдені ролики MPEG-2, але ScummVM був зібраний без підтримки MPEG-2"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Дод. багато..."
@@ -3285,7 +3271,7 @@ msgstr ""
#~ msgstr "Використовувати альтернативний вступ гри (тільки CD версія)"
#~ msgid "MPEG2 cutscenes are no longer supported"
-#~ msgstr "Заставки MPEG2 більше не підтримуються"
+#~ msgstr "Ролики MPEG2 більше не підтримуються"
#~ msgid "OpenGL Normal"
#~ msgstr "OpenGL нормальний"
diff --git a/ports.mk b/ports.mk
index 306e0f046b..97b43fe92e 100644
--- a/ports.mk
+++ b/ports.mk
@@ -156,10 +156,6 @@ ifdef USE_SPARKLE
OSX_STATIC_LIBS += -framework Sparkle -F$(STATICLIBPATH)
endif
-ifdef USE_TERMCONV
-OSX_ICONV ?= -liconv
-endif
-
# Special target to create a static linked binary for Mac OS X.
# We use -force_cpusubtype_ALL to ensure the binary runs on every
# PowerPC machine.
@@ -167,8 +163,7 @@ scummvm-static: $(OBJS)
$(CXX) $(LDFLAGS) -force_cpusubtype_ALL -o scummvm-static $(OBJS) \
-framework CoreMIDI \
$(OSX_STATIC_LIBS) \
- $(OSX_ZLIB) \
- $(OSX_ICONV)
+ $(OSX_ZLIB)
# Special target to create a static linked binary for the iPhone
iphone: $(OBJS)
@@ -252,7 +247,6 @@ win32dist: $(EXECUTABLE)
mkdir -p $(WIN32PATH)/doc/no-nb
mkdir -p $(WIN32PATH)/doc/se
$(STRIP) $(EXECUTABLE) -o $(WIN32PATH)/$(EXECUTABLE)
- cp $(DIST_FILES_THEMES) $(WIN32PATH)
cp $(srcdir)/AUTHORS $(WIN32PATH)/AUTHORS.txt
cp $(srcdir)/COPYING $(WIN32PATH)/COPYING.txt
cp $(srcdir)/COPYING.BSD $(WIN32PATH)/COPYING.BSD.txt
@@ -319,8 +313,6 @@ else ifeq "$(CUR_BRANCH)" ""
endif
@echo Creating Code::Blocks project files...
@cd $(srcdir)/dists/codeblocks && ../../devtools/create_project/create_project ../.. --codeblocks >/dev/null && git add -f engines/plugins_table.h *.workspace *.cbp
- @echo Creating MSVC8 project files...
- @cd $(srcdir)/dists/msvc8 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 8 >/dev/null && git add -f engines/plugins_table.h *.sln *.vcproj *.vsprops
@echo Creating MSVC9 project files...
@cd $(srcdir)/dists/msvc9 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 9 >/dev/null && git add -f engines/plugins_table.h *.sln *.vcproj *.vsprops
@echo Creating MSVC10 project files...
@@ -332,50 +324,5 @@ endif
@echo Now run
@echo "\tgit commit 'DISTS: Generated Code::Blocks and MSVC project files'"
-#
-# AmigaOS specific
-#
-
-# Special target to create an AmigaOS snapshot installation
-aos4dist: $(EXECUTABLE)
- mkdir -p $(AOS4PATH)
- mkdir -p $(AOS4PATH)/themes
- mkdir -p $(AOS4PATH)/extras
- $(STRIP) $(EXECUTABLE) -o $(AOS4PATH)/$(EXECUTABLE)
- cp ${srcdir}/icons/scummvm.info $(AOS4PATH)/$(EXECUTABLE).info
- cp $(DIST_FILES_THEMES) $(AOS4PATH)/themes/
-ifdef DIST_FILES_ENGINEDATA
- cp $(DIST_FILES_ENGINEDATA) $(AOS4PATH)/extras/
-endif
- cp $(DIST_FILES_DOCS) $(AOS4PATH)
-
-#
-# PlayStation 3 specific
-#
-ps3pkg: $(EXECUTABLE)
- $(STRIP) $(EXECUTABLE)
- sprxlinker $(EXECUTABLE)
- mkdir -p ps3pkg/USRDIR/data/
- mkdir -p ps3pkg/USRDIR/doc/
- mkdir -p ps3pkg/USRDIR/saves/
- make_self_npdrm "$(EXECUTABLE)" ps3pkg/USRDIR/EBOOT.BIN UP0001-SCUM12000_00-0000000000000000
- cp $(DIST_FILES_THEMES) ps3pkg/USRDIR/data/
-ifdef DIST_FILES_ENGINEDATA
- cp $(DIST_FILES_ENGINEDATA) ps3pkg/USRDIR/data/
-endif
- cp $(DIST_FILES_DOCS) ps3pkg/USRDIR/doc/
- cp $(srcdir)/dists/ps3/readme-ps3.md ps3pkg/USRDIR/doc/
- cp $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip ps3pkg/USRDIR/data/
- cp $(srcdir)/dists/ps3/ICON0.PNG ps3pkg/
- cp $(srcdir)/dists/ps3/PIC1.PNG ps3pkg/
- sfo.py -f $(srcdir)/dists/ps3/sfo.xml ps3pkg/PARAM.SFO
- pkg.py --contentid UP0001-SCUM12000_00-0000000000000000 ps3pkg/ scummvm-ps3.pkg
-
-ps3run: $(EXECUTABLE)
- $(STRIP) $(EXECUTABLE)
- sprxlinker $(EXECUTABLE)
- make_self $(EXECUTABLE) $(EXECUTABLE).self
- ps3load $(EXECUTABLE).self
-
# Mark special targets as phony
-.PHONY: deb bundle osxsnap win32dist install uninstall ps3pkg ps3run
+.PHONY: deb bundle osxsnap win32dist install uninstall
diff --git a/test/common/rendermode.h b/test/common/rendermode.h
index e5e277f16b..b96ae243a5 100644
--- a/test/common/rendermode.h
+++ b/test/common/rendermode.h
@@ -49,7 +49,6 @@ class RenderModeTestSuite : public CxxTest::TestSuite {
* Notably, the output should not be in mixed case.
*/
TS_ASSERT_SAME_DATA(Common::getRenderModeCode(Common::parseRenderMode("FMTOWNS")), "fmtowns", 7);
- TS_ASSERT_DIFFERS(Common::getRenderModeCode(Common::parseRenderMode("FMTOWNS")), "fmtowns");
TS_ASSERT_SAME_DATA(Common::getRenderModeCode(Common::parseRenderMode("CGA")), "cga", 3);
TS_ASSERT_SAME_DATA(Common::getRenderModeCode(Common::parseRenderMode("vga")), "vga", 3);
TS_ASSERT_SAME_DATA(Common::getRenderModeCode(Common::parseRenderMode("Ega")), "ega", 3);
diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp
index be4dc549a4..a228377a27 100644
--- a/video/bink_decoder.cpp
+++ b/video/bink_decoder.cpp
@@ -108,20 +108,18 @@ bool BinkDecoder::loadStream(Common::SeekableReadStream *stream) {
uint32 audioTrackCount = _bink->readUint32LE();
if (audioTrackCount > 0) {
- _audioTracks.reserve(audioTrackCount);
+ _audioTracks.resize(audioTrackCount);
_bink->skip(4 * audioTrackCount);
// Reading audio track properties
for (uint32 i = 0; i < audioTrackCount; i++) {
- AudioInfo track;
+ AudioInfo &track = _audioTracks[i];
track.sampleRate = _bink->readUint16LE();
track.flags = _bink->readUint16LE();
- _audioTracks.push_back(track);
-
- initAudioTrack(_audioTracks[i]);
+ initAudioTrack(track);
}
_bink->skip(4 * audioTrackCount);
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp
index c6171c4450..dce96aae03 100644
--- a/video/video_decoder.cpp
+++ b/video/video_decoder.cpp
@@ -778,6 +778,31 @@ void VideoDecoder::setEndTime(const Audio::Timestamp &endTime) {
}
}
+void VideoDecoder::setEndFrame(uint frame) {
+ VideoTrack *track = 0;
+
+ for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) {
+ if ((*it)->getTrackType() == Track::kTrackTypeVideo) {
+ // We only allow this when one video track is present
+ if (track)
+ return;
+
+ track = (VideoTrack *)*it;
+ }
+ }
+
+ // If we didn't find a video track, we can't set the final frame (of course)
+ if (!track)
+ return;
+
+ Audio::Timestamp time = track->getFrameTime(frame + 1);
+
+ if (time < 0)
+ return;
+
+ setEndTime(time);
+}
+
VideoDecoder::Track *VideoDecoder::getTrack(uint track) {
if (track > _internalTracks.size())
return 0;
diff --git a/video/video_decoder.h b/video/video_decoder.h
index 2faec0fb3e..c3879e9144 100644
--- a/video/video_decoder.h
+++ b/video/video_decoder.h
@@ -214,6 +214,17 @@ public:
void setEndTime(const Audio::Timestamp &endTime);
/**
+ * Set the end frame.
+ *
+ * The passed frame will be the last frame to show.
+ *
+ * Like seekToFrame(), this only works when one video track is present,
+ * and that track supports getFrameTime(). This calls setEndTime()
+ * internally.
+ */
+ void setEndFrame(uint frame);
+
+ /**
* Get the stop time of the video (if not set, zero)
*/
Audio::Timestamp getEndTime() const { return _endTime; }