aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS10
-rw-r--r--COPYRIGHT2
-rw-r--r--Makefile.common3
-rw-r--r--NEWS33
-rw-r--r--README12
-rw-r--r--audio/mods/maxtrax.cpp6
-rw-r--r--audio/mods/maxtrax.h2
-rw-r--r--audio/mods/protracker.cpp16
-rw-r--r--audio/mods/protracker.h8
-rw-r--r--audio/mods/tfmx.cpp2
-rw-r--r--audio/mods/tfmx.h2
-rw-r--r--audio/softsynth/fluidsynth.cpp52
-rw-r--r--audio/softsynth/mt32.cpp245
-rw-r--r--audio/softsynth/mt32/AReverbModel.cpp258
-rw-r--r--audio/softsynth/mt32/AReverbModel.h59
-rw-r--r--audio/softsynth/mt32/BReverbModel.cpp393
-rw-r--r--audio/softsynth/mt32/BReverbModel.h112
-rw-r--r--audio/softsynth/mt32/DelayReverb.cpp81
-rw-r--r--audio/softsynth/mt32/DelayReverb.h9
-rw-r--r--audio/softsynth/mt32/FreeverbModel.cpp6
-rw-r--r--audio/softsynth/mt32/FreeverbModel.h4
-rw-r--r--audio/softsynth/mt32/LA32Ramp.cpp10
-rw-r--r--audio/softsynth/mt32/LA32Ramp.h2
-rw-r--r--audio/softsynth/mt32/LA32WaveGenerator.cpp418
-rw-r--r--audio/softsynth/mt32/LA32WaveGenerator.h246
-rw-r--r--audio/softsynth/mt32/LegacyWaveGenerator.cpp347
-rw-r--r--audio/softsynth/mt32/LegacyWaveGenerator.h146
-rw-r--r--audio/softsynth/mt32/Part.cpp153
-rw-r--r--audio/softsynth/mt32/Part.h24
-rw-r--r--audio/softsynth/mt32/Partial.cpp434
-rw-r--r--audio/softsynth/mt32/Partial.h21
-rw-r--r--audio/softsynth/mt32/PartialManager.cpp2
-rw-r--r--audio/softsynth/mt32/PartialManager.h2
-rw-r--r--audio/softsynth/mt32/Poly.cpp11
-rw-r--r--audio/softsynth/mt32/Poly.h7
-rw-r--r--audio/softsynth/mt32/ROMInfo.cpp111
-rw-r--r--audio/softsynth/mt32/ROMInfo.h77
-rw-r--r--audio/softsynth/mt32/Structures.h2
-rw-r--r--audio/softsynth/mt32/Synth.cpp249
-rw-r--r--audio/softsynth/mt32/Synth.h133
-rw-r--r--audio/softsynth/mt32/TVA.cpp12
-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.cpp7
-rw-r--r--audio/softsynth/mt32/TVP.h2
-rw-r--r--audio/softsynth/mt32/Tables.cpp39
-rw-r--r--audio/softsynth/mt32/Tables.h15
-rw-r--r--audio/softsynth/mt32/mmath.h6
-rw-r--r--audio/softsynth/mt32/module.mk4
-rw-r--r--audio/softsynth/mt32/mt32emu.h30
-rw-r--r--audio/softsynth/opl/mame.cpp2
-rw-r--r--audio/softsynth/sid.cpp2
-rw-r--r--backends/fs/ds/ds-fs.h2
-rw-r--r--backends/graphics/opengl/gltexture.cpp54
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp2
-rw-r--r--backends/midi/coreaudio.cpp117
-rw-r--r--backends/mixer/sdl/sdl-mixer.cpp2
-rw-r--r--backends/platform/android/android.mk4
-rw-r--r--backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java1
-rw-r--r--backends/platform/ds/arm9/source/blitters.cpp2
-rw-r--r--backends/platform/ds/arm9/source/blitters.h2
-rw-r--r--backends/platform/ds/arm9/source/cdaudio.cpp2
-rw-r--r--backends/platform/ds/arm9/source/cdaudio.h2
-rw-r--r--backends/platform/ds/arm9/source/dsmain.cpp2
-rw-r--r--backends/platform/ds/arm9/source/dsmain.h2
-rw-r--r--backends/platform/ds/arm9/source/dsoptions.cpp2
-rw-r--r--backends/platform/ds/arm9/source/dsoptions.h2
-rw-r--r--backends/platform/ds/arm9/source/keys.cpp2
-rw-r--r--backends/platform/ds/arm9/source/keys.h2
-rw-r--r--backends/platform/ds/arm9/source/scummhelp.cpp2
-rw-r--r--backends/platform/ds/arm9/source/scummhelp.h2
-rw-r--r--backends/platform/ds/arm9/source/touchkeyboard.cpp2
-rw-r--r--backends/platform/ds/arm9/source/touchkeyboard.h2
-rw-r--r--backends/platform/ds/arm9/source/wordcompletion.cpp2
-rw-r--r--backends/platform/ds/arm9/source/wordcompletion.h2
-rw-r--r--backends/platform/iphone/osys_main.cpp4
-rw-r--r--backends/platform/iphone/osys_video.mm5
-rw-r--r--backends/platform/symbian/AdaptAllMMPs.pl32
-rw-r--r--backends/platform/symbian/BuildPackageUpload_LocalSettings.pl8
-rw-r--r--backends/platform/symbian/README2
-rw-r--r--backends/platform/symbian/S60/ScummVM_S60.mmp.in2
-rw-r--r--backends/platform/symbian/S60/ScummVM_S60_App.mmp2
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in6
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in6
-rw-r--r--backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg5
-rw-r--r--backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3_split.pkg5
-rw-r--r--backends/platform/symbian/S80/ScummVM_S80.mmp.in2
-rw-r--r--backends/platform/symbian/S80/ScummVM_S80_App.mmp2
-rw-r--r--backends/platform/symbian/S90/Scummvm_S90.mmp.in2
-rw-r--r--backends/platform/symbian/S90/Scummvm_S90_App.mmp2
-rw-r--r--backends/platform/symbian/UIQ2/ScummVM.rss2
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM.rss2
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_A0000658.rss2
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in4
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in4
-rw-r--r--backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg3
-rw-r--r--backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3_split.pkg3
-rw-r--r--backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss2
-rw-r--r--backends/platform/symbian/mmp/scummvm_agi.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_agos.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_base.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_cge.mmp.in61
-rw-r--r--backends/platform/symbian/mmp/scummvm_cine.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_composer.mmp.in61
-rw-r--r--backends/platform/symbian/mmp/scummvm_cruise.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_draci.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_drascula.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_gob.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_groovie.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_hopkins.mmp.in61
-rw-r--r--backends/platform/symbian/mmp/scummvm_hugo.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_kyra.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_lure.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_m4.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_made.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_mohawk.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_parallaction.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_pegasus.mmp.in61
-rw-r--r--backends/platform/symbian/mmp/scummvm_queen.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_saga.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_sci.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_scumm.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_sky.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_sword1.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_sword2.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_teenagent.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_tinsel.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_toltecs.mmp.in61
-rw-r--r--backends/platform/symbian/mmp/scummvm_tony.mmp.in61
-rw-r--r--backends/platform/symbian/mmp/scummvm_toon.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_touche.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_tsage.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_tucker.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_wintermute.mmp.in61
-rw-r--r--backends/platform/symbian/res/ScummVmAif.rss2
-rw-r--r--backends/platform/symbian/res/scummvm.rss2
-rw-r--r--backends/platform/symbian/res/scummvm_A0000658.rss2
-rw-r--r--backends/platform/symbian/src/ScummVm.hrh2
-rw-r--r--base/commandLine.cpp32
-rw-r--r--common/bufferedstream.h2
-rw-r--r--common/c++11-compat.h42
-rw-r--r--common/config-file.cpp2
-rw-r--r--common/config-file.h2
-rw-r--r--common/config-manager.h2
-rw-r--r--common/debug-channels.h2
-rw-r--r--common/debug.cpp2
-rw-r--r--common/file.cpp2
-rw-r--r--common/fs.cpp2
-rw-r--r--common/func.h2
-rw-r--r--common/hash-str.h2
-rw-r--r--common/hashmap.cpp2
-rw-r--r--common/hashmap.h2
-rw-r--r--common/iff_container.cpp49
-rw-r--r--common/iff_container.h41
-rw-r--r--common/language.h2
-rw-r--r--common/memorypool.h2
-rw-r--r--common/memstream.h2
-rw-r--r--common/mutex.cpp2
-rw-r--r--common/platform.cpp2
-rw-r--r--common/platform.h4
-rw-r--r--common/quicktime.cpp2
-rw-r--r--common/random.cpp2
-rw-r--r--common/random.h2
-rw-r--r--common/rect.h2
-rw-r--r--common/scummsys.h7
-rw-r--r--common/singleton.h2
-rw-r--r--common/str.cpp4
-rw-r--r--common/stream.cpp38
-rw-r--r--common/stream.h2
-rw-r--r--common/taskbar.h2
-rw-r--r--common/textconsole.cpp2
-rw-r--r--common/textconsole.h2
-rw-r--r--common/unzip.cpp2
-rw-r--r--common/unzip.h2
-rw-r--r--common/updates.h2
-rw-r--r--common/zlib.cpp12
-rw-r--r--common/zlib.h6
-rwxr-xr-xconfigure74
-rw-r--r--devtools/create_kyradat/create_kyradat.cpp41
-rw-r--r--devtools/create_kyradat/create_kyradat.h5
-rw-r--r--devtools/create_kyradat/extract.cpp36
-rw-r--r--devtools/create_kyradat/games.cpp102
-rw-r--r--devtools/create_kyradat/tables.cpp60
-rwxr-xr-xdevtools/credits.pl46
-rw-r--r--devtools/scumm-md5.txt3
-rw-r--r--dists/bada/Res/scummmobile/scummmobile_layout.stx155
-rw-r--r--dists/debian/copyright2
-rw-r--r--dists/engine-data/kyra.datbin471460 -> 486382 bytes
-rw-r--r--dists/engine-data/wintermute.zipbin0 -> 4057 bytes
-rw-r--r--dists/macosx/Info.plist4
-rw-r--r--dists/macosx/Info.plist.in4
-rw-r--r--dists/scummvm.rc25
-rw-r--r--dists/scummvm.rc.in23
-rw-r--r--dists/win32/ScummVM.iss2
-rw-r--r--dists/win32/migration.bat2
-rw-r--r--dists/win32/scummvm.nsi2
-rw-r--r--dists/win32/scummvm.nsi.in2
-rw-r--r--doc/cz/PrectiMe36
-rw-r--r--engines/agi/logic.h2
-rw-r--r--engines/agi/lzw.h2
-rw-r--r--engines/agi/op_cmd.cpp2
-rw-r--r--engines/agi/preagi_winnie.h2
-rw-r--r--engines/cge/snail.cpp8
-rw-r--r--engines/composer/resource.cpp2
-rw-r--r--engines/configure.engines5
-rw-r--r--engines/cruise/linker.h2
-rw-r--r--engines/cruise/volume.cpp2
-rw-r--r--engines/drascula/animation.cpp358
-rw-r--r--engines/drascula/console.cpp1
-rw-r--r--engines/drascula/converse.cpp1
-rw-r--r--engines/drascula/detection.cpp153
-rw-r--r--engines/drascula/drascula.cpp68
-rw-r--r--engines/drascula/drascula.h119
-rw-r--r--engines/drascula/graphics.cpp2
-rw-r--r--engines/drascula/interface.cpp50
-rw-r--r--engines/drascula/objects.cpp4
-rw-r--r--engines/drascula/rooms.cpp34
-rw-r--r--engines/drascula/saveload.cpp529
-rw-r--r--engines/dreamweb/dreamweb.h1
-rw-r--r--engines/dreamweb/monitor.cpp107
-rw-r--r--engines/engine.cpp7
-rw-r--r--engines/engines.mk5
-rw-r--r--engines/gob/anifile.cpp2
-rw-r--r--engines/gob/cmpfile.cpp5
-rw-r--r--engines/gob/detection/tables_geisha.h14
-rw-r--r--engines/gob/inter.h2
-rw-r--r--engines/gob/inter_v7.cpp52
-rw-r--r--engines/gob/surface.cpp124
-rw-r--r--engines/gob/surface.h32
-rw-r--r--engines/groovie/detection.cpp31
-rw-r--r--engines/groovie/groovie.cpp9
-rw-r--r--engines/groovie/groovie.h11
-rw-r--r--engines/groovie/vdx.cpp2
-rw-r--r--engines/hopkins/anim.cpp804
-rw-r--r--engines/hopkins/anim.h78
-rw-r--r--engines/hopkins/computer.cpp1222
-rw-r--r--engines/hopkins/computer.h106
-rw-r--r--engines/hopkins/debugger.cpp67
-rw-r--r--engines/hopkins/debugger.h48
-rw-r--r--engines/hopkins/detection.cpp191
-rw-r--r--engines/hopkins/detection_tables.h247
-rw-r--r--engines/hopkins/dialogs.cpp781
-rw-r--r--engines/hopkins/dialogs.h77
-rw-r--r--engines/hopkins/events.cpp542
-rw-r--r--engines/hopkins/events.h94
-rw-r--r--engines/hopkins/files.cpp271
-rw-r--r--engines/hopkins/files.h58
-rw-r--r--engines/hopkins/font.cpp495
-rw-r--r--engines/hopkins/font.h98
-rw-r--r--engines/hopkins/globals.cpp215
-rw-r--r--engines/hopkins/globals.h225
-rw-r--r--engines/hopkins/graphics.cpp1855
-rw-r--r--engines/hopkins/graphics.h188
-rw-r--r--engines/hopkins/hopkins.cpp2861
-rw-r--r--engines/hopkins/hopkins.h197
-rw-r--r--engines/hopkins/lines.cpp2914
-rw-r--r--engines/hopkins/lines.h196
-rw-r--r--engines/hopkins/menu.cpp168
-rw-r--r--engines/hopkins/menu.h46
-rw-r--r--engines/hopkins/module.mk29
-rw-r--r--engines/hopkins/objects.cpp4058
-rw-r--r--engines/hopkins/objects.h338
-rw-r--r--engines/hopkins/saveload.cpp333
-rw-r--r--engines/hopkins/saveload.h78
-rw-r--r--engines/hopkins/script.cpp2624
-rw-r--r--engines/hopkins/script.h50
-rw-r--r--engines/hopkins/sound.cpp916
-rw-r--r--engines/hopkins/sound.h138
-rw-r--r--engines/hopkins/talk.cpp1081
-rw-r--r--engines/hopkins/talk.h78
-rw-r--r--engines/kyra/chargen.cpp36
-rw-r--r--engines/kyra/darkmoon.cpp4
-rw-r--r--engines/kyra/detection_tables.h39
-rw-r--r--engines/kyra/eob.cpp10
-rw-r--r--engines/kyra/eobcommon.cpp42
-rw-r--r--engines/kyra/eobcommon.h16
-rw-r--r--engines/kyra/gui_eob.cpp106
-rw-r--r--engines/kyra/gui_hof.cpp2
-rw-r--r--engines/kyra/gui_lol.cpp130
-rw-r--r--engines/kyra/gui_lol.h18
-rw-r--r--engines/kyra/gui_rpg.cpp6
-rw-r--r--engines/kyra/items_eob.cpp10
-rw-r--r--engines/kyra/items_hof.cpp14
-rw-r--r--engines/kyra/items_lok.cpp6
-rw-r--r--engines/kyra/items_lol.cpp20
-rw-r--r--engines/kyra/kyra_rpg.cpp15
-rw-r--r--engines/kyra/kyra_rpg.h2
-rw-r--r--engines/kyra/kyra_v1.cpp128
-rw-r--r--engines/kyra/lol.cpp232
-rw-r--r--engines/kyra/lol.h26
-rw-r--r--engines/kyra/magic_eob.cpp18
-rw-r--r--engines/kyra/resource.cpp2
-rw-r--r--engines/kyra/resource.h5
-rw-r--r--engines/kyra/resource_intern.cpp36
-rw-r--r--engines/kyra/saveload_eob.cpp2
-rw-r--r--engines/kyra/saveload_lol.cpp6
-rw-r--r--engines/kyra/scene_eob.cpp30
-rw-r--r--engines/kyra/scene_lol.cpp60
-rw-r--r--engines/kyra/scene_rpg.cpp24
-rw-r--r--engines/kyra/screen.cpp70
-rw-r--r--engines/kyra/screen.h11
-rw-r--r--engines/kyra/screen_eob.cpp112
-rw-r--r--engines/kyra/screen_hof.cpp18
-rw-r--r--engines/kyra/screen_lol.cpp54
-rw-r--r--engines/kyra/screen_v2.cpp26
-rw-r--r--engines/kyra/script_eob.cpp30
-rw-r--r--engines/kyra/script_hof.cpp44
-rw-r--r--engines/kyra/script_lok.cpp20
-rw-r--r--engines/kyra/script_lol.cpp88
-rw-r--r--engines/kyra/script_mr.cpp28
-rw-r--r--engines/kyra/script_tim.cpp26
-rw-r--r--engines/kyra/sequences_darkmoon.cpp8
-rw-r--r--engines/kyra/sequences_eob.cpp2
-rw-r--r--engines/kyra/sequences_hof.cpp80
-rw-r--r--engines/kyra/sequences_lok.cpp2
-rw-r--r--engines/kyra/sequences_lol.cpp29
-rw-r--r--engines/kyra/sound.h4
-rw-r--r--engines/kyra/sound_adlib.cpp10
-rw-r--r--engines/kyra/sound_adlib.h2
-rw-r--r--engines/kyra/sound_digital.cpp6
-rw-r--r--engines/kyra/sound_intern.h147
-rw-r--r--engines/kyra/sound_lol.cpp16
-rw-r--r--engines/kyra/sound_midi.cpp1
-rw-r--r--engines/kyra/sound_towns.cpp16
-rw-r--r--engines/kyra/sprites_eob.cpp18
-rw-r--r--engines/kyra/sprites_lol.cpp103
-rw-r--r--engines/kyra/sprites_rpg.cpp4
-rw-r--r--engines/kyra/staticres.cpp14
-rw-r--r--engines/kyra/staticres_eob.cpp42
-rw-r--r--engines/kyra/staticres_lol.cpp106
-rw-r--r--engines/kyra/text_hof.cpp4
-rw-r--r--engines/kyra/text_lol.cpp25
-rw-r--r--engines/kyra/text_rpg.cpp289
-rw-r--r--engines/kyra/text_rpg.h2
-rw-r--r--engines/kyra/timer_eob.cpp14
-rw-r--r--engines/kyra/timer_lol.cpp12
-rw-r--r--engines/kyra/vqa.cpp8
-rw-r--r--engines/lure/hotspots.cpp2
-rw-r--r--engines/lure/menu.cpp2
-rw-r--r--engines/lure/room.cpp2
-rw-r--r--engines/mohawk/detection_tables.h36
-rw-r--r--engines/mohawk/installer_archive.cpp2
-rw-r--r--engines/mohawk/livingbooks.cpp4
-rw-r--r--engines/mohawk/myst_stacks/mechanical.cpp4
-rw-r--r--engines/mohawk/resource.cpp2
-rw-r--r--engines/parallaction/disk.cpp145
-rw-r--r--engines/parallaction/disk.h33
-rw-r--r--engines/parallaction/disk_br.cpp50
-rw-r--r--engines/parallaction/disk_ns.cpp57
-rw-r--r--engines/parallaction/module.mk1
-rw-r--r--engines/pegasus/detection.cpp10
-rw-r--r--engines/pegasus/elements.cpp2
-rw-r--r--engines/pegasus/energymonitor.cpp2
-rw-r--r--engines/pegasus/neighborhood/mars/mars.cpp15
-rw-r--r--engines/pegasus/neighborhood/mars/reactor.cpp6
-rw-r--r--engines/pegasus/pegasus.cpp62
-rw-r--r--engines/pegasus/pegasus.h2
-rw-r--r--engines/pegasus/sound.cpp3
-rw-r--r--engines/pegasus/timers.cpp33
-rw-r--r--engines/pegasus/timers.h6
-rw-r--r--engines/plugins_table.h3
-rw-r--r--engines/queen/display.cpp88
-rw-r--r--engines/queen/display.h4
-rw-r--r--engines/queen/sound.cpp6
-rw-r--r--engines/queen/sound.h2
-rw-r--r--engines/saga/resource.cpp12
-rw-r--r--engines/saga/scene.cpp19
-rw-r--r--engines/sci/console.cpp12
-rw-r--r--engines/sci/decompressor.cpp2
-rw-r--r--engines/sci/detection_tables.h10
-rw-r--r--engines/sci/engine/kernel.h10
-rw-r--r--engines/sci/engine/kernel_tables.h5
-rw-r--r--engines/sci/engine/kfile.cpp34
-rw-r--r--engines/sci/engine/kgraphics.cpp5
-rw-r--r--engines/sci/engine/kgraphics32.cpp55
-rw-r--r--engines/sci/engine/kmath.cpp82
-rw-r--r--engines/sci/engine/kstring.cpp77
-rw-r--r--engines/sci/engine/message.cpp38
-rw-r--r--engines/sci/engine/script_patches.cpp26
-rw-r--r--engines/sci/engine/scriptdebug.cpp2
-rw-r--r--engines/sci/engine/workarounds.cpp9
-rw-r--r--engines/sci/event.cpp10
-rw-r--r--engines/sci/graphics/animate.h1
-rw-r--r--engines/sci/graphics/frameout.cpp75
-rw-r--r--engines/sci/graphics/frameout.h8
-rw-r--r--engines/sci/graphics/menu.cpp2
-rw-r--r--engines/sci/graphics/palette.cpp5
-rw-r--r--engines/sci/graphics/portrait.cpp2
-rw-r--r--engines/sci/sound/drivers/midi.cpp9
-rw-r--r--engines/sci/sound/music.cpp3
-rw-r--r--engines/sci/sound/soundcmd.cpp86
-rw-r--r--engines/scumm/detection_tables.h1
-rw-r--r--engines/scumm/gfx.cpp2
-rw-r--r--engines/scumm/he/sound_he.cpp26
-rw-r--r--engines/scumm/imuse/imuse.cpp4
-rw-r--r--engines/scumm/insane/insane_ben.cpp11
-rw-r--r--engines/scumm/insane/insane_enemy.cpp71
-rw-r--r--engines/scumm/player_v3m.cpp14
-rw-r--r--engines/scumm/saveload.h14
-rw-r--r--engines/scumm/scumm-md5.h5
-rw-r--r--engines/sky/compact.cpp2
-rw-r--r--engines/sword25/gfx/graphicengine.cpp8
-rw-r--r--engines/sword25/util/lua/ldo.cpp25
-rw-r--r--engines/sword25/util/lua/lua.h9
-rw-r--r--engines/sword25/util/lua/luaconf.h2
-rw-r--r--engines/testbed/config-params.cpp2
-rw-r--r--engines/testbed/config.cpp2
-rw-r--r--engines/testbed/sound.cpp2
-rw-r--r--engines/tinsel/bg.cpp2
-rw-r--r--engines/tinsel/detection_tables.h2
-rw-r--r--engines/tinsel/dw.h2
-rw-r--r--engines/tinsel/faders.cpp54
-rw-r--r--engines/tinsel/faders.h12
-rw-r--r--engines/tinsel/graphics.cpp2
-rw-r--r--engines/tinsel/music.cpp198
-rw-r--r--engines/tinsel/palette.cpp47
-rw-r--r--engines/tinsel/palette.h4
-rw-r--r--engines/tinsel/saveload.cpp2
-rw-r--r--engines/tinsel/savescn.cpp3
-rw-r--r--engines/tinsel/scene.cpp2
-rw-r--r--engines/tinsel/sound.cpp22
-rw-r--r--engines/tinsel/sound.h2
-rw-r--r--engines/tinsel/timers.cpp2
-rw-r--r--engines/tinsel/tinlib.cpp5
-rw-r--r--engines/tinsel/tinsel.cpp2
-rw-r--r--engines/toltecs/console.cpp79
-rw-r--r--engines/toltecs/console.h45
-rw-r--r--engines/toltecs/detection.cpp57
-rw-r--r--engines/toltecs/menu.cpp200
-rw-r--r--engines/toltecs/menu.h6
-rw-r--r--engines/toltecs/module.mk1
-rw-r--r--engines/toltecs/movie.cpp38
-rw-r--r--engines/toltecs/movie.h4
-rw-r--r--engines/toltecs/palette.cpp68
-rw-r--r--engines/toltecs/palette.h2
-rw-r--r--engines/toltecs/resource.cpp11
-rw-r--r--engines/toltecs/resource.h2
-rw-r--r--engines/toltecs/screen.cpp64
-rw-r--r--engines/toltecs/screen.h5
-rw-r--r--engines/toltecs/script.cpp155
-rw-r--r--engines/toltecs/script.h1
-rw-r--r--engines/toltecs/sound.cpp9
-rw-r--r--engines/toltecs/toltecs.cpp37
-rw-r--r--engines/toltecs/toltecs.h2
-rw-r--r--engines/toon/toon.h5
-rw-r--r--engines/wintermute/ad/ad_actor.cpp116
-rw-r--r--engines/wintermute/ad/ad_actor.h2
-rw-r--r--engines/wintermute/ad/ad_entity.cpp64
-rw-r--r--engines/wintermute/ad/ad_game.cpp158
-rw-r--r--engines/wintermute/ad/ad_inventory.cpp12
-rw-r--r--engines/wintermute/ad/ad_inventory.h2
-rw-r--r--engines/wintermute/ad/ad_inventory_box.cpp12
-rw-r--r--engines/wintermute/ad/ad_item.cpp40
-rw-r--r--engines/wintermute/ad/ad_layer.cpp16
-rw-r--r--engines/wintermute/ad/ad_node_state.cpp24
-rw-r--r--engines/wintermute/ad/ad_object.cpp92
-rw-r--r--engines/wintermute/ad/ad_object.h2
-rw-r--r--engines/wintermute/ad/ad_path.cpp6
-rw-r--r--engines/wintermute/ad/ad_path_point.cpp6
-rw-r--r--engines/wintermute/ad/ad_region.cpp2
-rw-r--r--engines/wintermute/ad/ad_response.cpp24
-rw-r--r--engines/wintermute/ad/ad_response_box.cpp54
-rw-r--r--engines/wintermute/ad/ad_response_context.cpp6
-rw-r--r--engines/wintermute/ad/ad_rot_level.cpp2
-rw-r--r--engines/wintermute/ad/ad_scale_level.cpp2
-rw-r--r--engines/wintermute/ad/ad_scene.cpp140
-rw-r--r--engines/wintermute/ad/ad_scene.h20
-rw-r--r--engines/wintermute/ad/ad_scene_node.cpp8
-rw-r--r--engines/wintermute/ad/ad_scene_state.cpp6
-rw-r--r--engines/wintermute/ad/ad_sentence.cpp56
-rw-r--r--engines/wintermute/ad/ad_sprite_set.cpp34
-rw-r--r--engines/wintermute/ad/ad_sprite_set.h2
-rw-r--r--engines/wintermute/ad/ad_talk_def.cpp32
-rw-r--r--engines/wintermute/ad/ad_talk_holder.cpp22
-rw-r--r--engines/wintermute/ad/ad_talk_node.cpp32
-rw-r--r--engines/wintermute/ad/ad_waypoint_group.cpp2
-rw-r--r--engines/wintermute/base/base.cpp20
-rw-r--r--engines/wintermute/base/base.h2
-rw-r--r--engines/wintermute/base/base_active_rect.cpp16
-rw-r--r--engines/wintermute/base/base_active_rect.h2
-rw-r--r--engines/wintermute/base/base_dynamic_buffer.cpp6
-rw-r--r--engines/wintermute/base/base_engine.cpp8
-rw-r--r--engines/wintermute/base/base_engine.h2
-rw-r--r--engines/wintermute/base/base_file_manager.cpp53
-rw-r--r--engines/wintermute/base/base_file_manager.h7
-rw-r--r--engines/wintermute/base/base_frame.cpp26
-rw-r--r--engines/wintermute/base/base_frame.h2
-rw-r--r--engines/wintermute/base/base_game.cpp259
-rw-r--r--engines/wintermute/base/base_game.h20
-rw-r--r--engines/wintermute/base/base_game_music.cpp12
-rw-r--r--engines/wintermute/base/base_named_object.cpp14
-rw-r--r--engines/wintermute/base/base_object.cpp52
-rw-r--r--engines/wintermute/base/base_object.h2
-rw-r--r--engines/wintermute/base/base_parser.cpp8
-rw-r--r--engines/wintermute/base/base_parser.h2
-rw-r--r--engines/wintermute/base/base_persistence_manager.cpp180
-rw-r--r--engines/wintermute/base/base_persistence_manager.h4
-rw-r--r--engines/wintermute/base/base_quick_msg.cpp14
-rw-r--r--engines/wintermute/base/base_quick_msg.h11
-rw-r--r--engines/wintermute/base/base_region.cpp4
-rw-r--r--engines/wintermute/base/base_region.h2
-rw-r--r--engines/wintermute/base/base_save_thumb_helper.cpp59
-rw-r--r--engines/wintermute/base/base_save_thumb_helper.h3
-rw-r--r--engines/wintermute/base/base_script_holder.cpp34
-rw-r--r--engines/wintermute/base/base_scriptable.cpp12
-rw-r--r--engines/wintermute/base/base_sprite.cpp26
-rw-r--r--engines/wintermute/base/base_sprite.h8
-rw-r--r--engines/wintermute/base/base_string_table.cpp24
-rw-r--r--engines/wintermute/base/base_sub_frame.cpp24
-rw-r--r--engines/wintermute/base/base_sub_frame.h2
-rw-r--r--engines/wintermute/base/base_surface_storage.cpp4
-rw-r--r--engines/wintermute/base/base_viewport.cpp2
-rw-r--r--engines/wintermute/base/base_viewport.h2
-rw-r--r--engines/wintermute/base/file/base_disk_file.cpp31
-rw-r--r--engines/wintermute/base/file/base_file_entry.cpp6
-rw-r--r--engines/wintermute/base/file/base_package.cpp8
-rw-r--r--engines/wintermute/base/file/base_resources.cpp2830
-rw-r--r--engines/wintermute/base/file/base_save_thumb_file.cpp4
-rw-r--r--engines/wintermute/base/font/base_font.cpp6
-rw-r--r--engines/wintermute/base/font/base_font_bitmap.cpp28
-rw-r--r--engines/wintermute/base/font/base_font_storage.cpp6
-rw-r--r--engines/wintermute/base/font/base_font_truetype.cpp93
-rw-r--r--engines/wintermute/base/font/base_font_truetype.h2
-rw-r--r--engines/wintermute/base/gfx/base_image.cpp14
-rw-r--r--engines/wintermute/base/gfx/base_image.h2
-rw-r--r--engines/wintermute/base/gfx/base_renderer.cpp33
-rw-r--r--engines/wintermute/base/gfx/base_renderer.h14
-rw-r--r--engines/wintermute/base/gfx/base_surface.h5
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.cpp112
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.h44
-rw-r--r--engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp41
-rw-r--r--engines/wintermute/base/gfx/osystem/base_surface_osystem.h31
-rw-r--r--engines/wintermute/base/gfx/osystem/render_ticket.cpp2
-rw-r--r--engines/wintermute/base/gfx/osystem/render_ticket.h1
-rw-r--r--engines/wintermute/base/particles/part_emitter.cpp10
-rw-r--r--engines/wintermute/base/particles/part_emitter.h2
-rw-r--r--engines/wintermute/base/particles/part_particle.cpp12
-rw-r--r--engines/wintermute/base/saveload.cpp14
-rw-r--r--engines/wintermute/base/scriptables/script.cpp136
-rw-r--r--engines/wintermute/base/scriptables/script_engine.cpp34
-rw-r--r--engines/wintermute/base/scriptables/script_engine.h4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_array.cpp2
-rw-r--r--engines/wintermute/base/scriptables/script_ext_date.cpp2
-rw-r--r--engines/wintermute/base/scriptables/script_ext_file.cpp22
-rw-r--r--engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp18
-rw-r--r--engines/wintermute/base/scriptables/script_ext_string.cpp51
-rw-r--r--engines/wintermute/base/scriptables/script_stack.cpp43
-rw-r--r--engines/wintermute/base/scriptables/script_value.cpp68
-rw-r--r--engines/wintermute/base/sound/base_sound.cpp6
-rw-r--r--engines/wintermute/base/sound/base_sound_buffer.cpp16
-rw-r--r--engines/wintermute/base/sound/base_sound_manager.cpp24
-rw-r--r--engines/wintermute/base/sound/base_sound_manager.h4
-rw-r--r--engines/wintermute/dcgf.h4
-rw-r--r--engines/wintermute/debugger.cpp84
-rw-r--r--engines/wintermute/debugger.h (renamed from engines/wintermute/base/file/base_resources.h)33
-rw-r--r--engines/wintermute/detection.cpp18
-rw-r--r--engines/wintermute/detection_tables.h92
-rw-r--r--engines/wintermute/graphics/transparent_surface.cpp12
-rw-r--r--engines/wintermute/graphics/transparent_surface.h2
-rw-r--r--engines/wintermute/module.mk2
-rw-r--r--engines/wintermute/persistent.h40
-rw-r--r--engines/wintermute/platform_osystem.cpp19
-rw-r--r--engines/wintermute/platform_osystem.h6
-rw-r--r--engines/wintermute/system/sys_class.cpp4
-rw-r--r--engines/wintermute/system/sys_class_registry.cpp6
-rw-r--r--engines/wintermute/ui/ui_button.cpp78
-rw-r--r--engines/wintermute/ui/ui_button.h2
-rw-r--r--engines/wintermute/ui/ui_edit.cpp22
-rw-r--r--engines/wintermute/ui/ui_entity.cpp8
-rw-r--r--engines/wintermute/ui/ui_object.cpp26
-rw-r--r--engines/wintermute/ui/ui_object.h2
-rw-r--r--engines/wintermute/ui/ui_text.cpp12
-rw-r--r--engines/wintermute/ui/ui_text.h2
-rw-r--r--engines/wintermute/ui/ui_tiled_image.cpp19
-rw-r--r--engines/wintermute/ui/ui_tiled_image.h2
-rw-r--r--engines/wintermute/ui/ui_window.cpp50
-rw-r--r--engines/wintermute/utils/string_util.cpp8
-rw-r--r--engines/wintermute/utils/utils.cpp4
-rw-r--r--engines/wintermute/video/video_player.cpp2
-rw-r--r--engines/wintermute/video/video_player.h2
-rw-r--r--engines/wintermute/video/video_theora_player.cpp22
-rw-r--r--engines/wintermute/video/video_theora_player.h2
-rw-r--r--engines/wintermute/wintermute.cpp34
-rw-r--r--engines/wintermute/wintermute.h13
-rw-r--r--graphics/decoders/iff.cpp241
-rw-r--r--graphics/decoders/iff.h119
-rw-r--r--graphics/decoders/jpeg.cpp12
-rw-r--r--graphics/decoders/png.cpp2
-rw-r--r--graphics/iff.cpp268
-rw-r--r--graphics/iff.h137
-rw-r--r--graphics/module.mk2
-rw-r--r--graphics/primitives.cpp2
-rw-r--r--graphics/primitives.h2
-rw-r--r--graphics/scaler.cpp2
-rw-r--r--graphics/thumbnail.cpp96
-rw-r--r--graphics/thumbnail.h2
-rw-r--r--gui/ThemeEngine.h2
-rw-r--r--gui/about.cpp43
-rw-r--r--gui/browser.cpp18
-rw-r--r--gui/browser.h4
-rw-r--r--gui/credits.h45
-rw-r--r--gui/debugger.cpp2
-rw-r--r--gui/debugger.h2
-rw-r--r--gui/fluidsynth-dialog.cpp366
-rw-r--r--gui/fluidsynth-dialog.h104
-rw-r--r--gui/launcher.cpp4
-rw-r--r--gui/module.mk5
-rw-r--r--gui/options.cpp25
-rw-r--r--gui/options.h7
-rw-r--r--gui/themes/default.inc320
-rw-r--r--gui/themes/scummclassic.zipbin95180 -> 104059 bytes
-rw-r--r--gui/themes/scummclassic/THEMERC2
-rw-r--r--gui/themes/scummclassic/classic_layout.stx181
-rw-r--r--gui/themes/scummclassic/classic_layout_lowres.stx184
-rw-r--r--gui/themes/scummmodern.zipbin1453485 -> 1462338 bytes
-rw-r--r--gui/themes/scummmodern/THEMERC2
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx180
-rw-r--r--gui/themes/scummmodern/scummmodern_layout_lowres.stx184
-rw-r--r--gui/themes/translations.datbin415352 -> 417353 bytes
-rw-r--r--gui/widget.cpp4
-rw-r--r--gui/widgets/popup.cpp26
-rw-r--r--po/POTFILES6
-rw-r--r--po/be_BY.po591
-rw-r--r--po/ca_ES.po453
-rw-r--r--po/cs_CZ.po489
-rw-r--r--po/da_DA.po454
-rw-r--r--po/de_DE.po453
-rw-r--r--po/es_ES.po453
-rw-r--r--po/eu.po453
-rw-r--r--po/fi_FI.po451
-rw-r--r--po/fr_FR.po453
-rw-r--r--po/gl_ES.po453
-rw-r--r--po/hu_HU.po457
-rw-r--r--po/it_IT.po453
-rw-r--r--po/nb_NO.po457
-rw-r--r--po/nn_NO.po445
-rw-r--r--po/pl_PL.po455
-rw-r--r--po/pt_BR.po453
-rw-r--r--po/ru_RU.po452
-rw-r--r--po/scummvm.pot434
-rw-r--r--po/se_SE.po453
-rw-r--r--po/uk_UA.po452
-rw-r--r--ports.mk9
-rw-r--r--test/common/bufferedseekablereadstream.h7
-rw-r--r--video/avi_decoder.cpp6
-rw-r--r--video/avi_decoder.h4
-rw-r--r--video/bink_decoder.cpp4
-rw-r--r--video/codecs/rpza.cpp4
-rw-r--r--video/flic_decoder.cpp12
-rw-r--r--video/flic_decoder.h1
-rw-r--r--video/smk_decoder.cpp4
653 files changed, 41281 insertions, 13080 deletions
diff --git a/AUTHORS b/AUTHORS
index e39400f22f..e6a25b5b76 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -106,6 +106,10 @@ ScummVM Team
Scott Thomas
Jordi Vilalta Prat
+ Hopkins:
+ Arnaud Boutonne
+ Paul Gilbert
+
Hugo:
Arnaud Boutonne
Oystein Eftevaag
@@ -203,6 +207,10 @@ ScummVM Team
Filippos Karapetis
Joost Peters
+ Toltecs:
+ Benjamin Haisch
+ Filippos Karapetis
+
Tony:
Arnaud Boutonne
Paul Gilbert
@@ -307,6 +315,8 @@ ScummVM Team
Benjamin Haisch - Heavily improved de-/encoder for DXA videos
Jochen Hoenicke - Speaker & PCjr sound support, AdLib work
(retired)
+ Daniel ter Laan - Restoring original Drascula tracks, and
+ writing convert_dxa.bat
Chris Page - Return to launcher, savestate improvements,
leak fixes, ... (GSoC 2008 task) (retired)
Robin Watts - ARM assembly routines for nice speedups on
diff --git a/COPYRIGHT b/COPYRIGHT
index 9de8ac6492..e964d8c0a1 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
ScummVM
-Copyright (C) 2001-2012 by the following:
+Copyright (C) 2001-2013 by the following:
If you have contributed to this project then you deserve to be on this
list. Contact us (see: AUTHORS) and we'll add you.
diff --git a/Makefile.common b/Makefile.common
index 2a92ba441c..bfbfd67fb8 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -265,6 +265,9 @@ endif
ifdef ENABLE_TOON
DIST_FILES_ENGINEDATA+=toon.dat
endif
+ifdef ENABLE_WINTERMUTE
+DIST_FILES_ENGINEDATA+=wintermute.zip
+endif
DIST_FILES_ENGINEDATA:=$(addprefix $(srcdir)/dists/engine-data/,$(DIST_FILES_ENGINEDATA))
# pred.dic is currently only used for the AGI engine
diff --git a/NEWS b/NEWS
index 9affe57b6a..dcca959696 100644
--- a/NEWS
+++ b/NEWS
@@ -3,8 +3,12 @@ For a more comprehensive changelog of the latest experimental code, see:
1.6.0 (????-??-??)
New Games:
+ - Added support for 3 Skulls of the Toltecs.
- Added support for Eye of the Beholder.
- Added support for Eye of the Beholder II: The Legend of Darkmoon.
+ - Added support for Tony Tough and the Night of Roasted Moths.
+ - Added support for The Journeyman Project: Pegasus Prime.
+ - Added support for the Macintosh version of Discworld 1.
General:
- Added a new save/load chooser based on a grid of thumbnails. This is only
@@ -15,12 +19,33 @@ For a more comprehensive changelog of the latest experimental code, see:
- Added Galician translation.
- Added Finnish translation.
- Added Belarusian translation.
+ - Using the mouse wheel on a slider widget now changes the value by the
+ smallest possible amount. This is more predictable than the old behaviour,
+ which was to change the value by "one pixel" which would sometimes not
+ change it at all.
+ - Updated MT-32 emulation code to latest munt project snapshot.
+ - Added FluidSynth settings dialog, mainly for reverb and chorus settings.
+ - Fixed crash on certain Smacker movies.
Cine:
- Improved audio support for Amiga and AtariST versions of Future Wars.
Now music fades out slowly instead of stopping immediately. Sound
effects are now properly panned, when requested by the game.
+ CGE:
+ - Soltys contains a puzzle requiring the ALT key to be pressed while clicking
+ on an object. This puzzle has been disabled on devices not using this key.
+
+ Drascula:
+ - Resolved multiple UI issues with the original save/load screen.
+ - Added advanced savegame functionality, including savegame timestamps and
+ thumbnails and the ability to load and delete savegames from the launcher.
+ It's now possible to use the ScummvM save/load dialogs.
+ - The F7 key (previously unmapped) now always shows the ScummVM load screen.
+ The F10 key displays either the original save/load screen, or the ScummVM
+ save screen, if the user has selected to use the ScummVM save/load
+ dialogs.
+
Dreamweb:
- Now that the game is freeware, there is a small extra help text showing
the available commands in the in-game terminals when the player uses the
@@ -29,6 +54,13 @@ For a more comprehensive changelog of the latest experimental code, see:
protection, this extra line can be toggled by the ScummVM copy protection
command line option.
+ Groovie:
+ - Simplified the movie speed options, and added a custom option for The 7th
+ Guest. Movie options are now "normal" and "fast", with the latter changing
+ the movie speed in T7G to match the faster movie speed of the iOS version.
+ The game entry might need to be readded in the launcher for the new setting
+ to appear.
+
SAGA:
- Added music support for the Macintosh version of I Have No Mouth and, I
Must Scream.
@@ -42,6 +74,7 @@ For a more comprehensive changelog of the latest experimental code, see:
General MIDI instruments, and should sound a lot closer to the original.
- Added sound and music support for the Macintosh version of Loom.
- Handle double-clicking in the Macintosh version of Loom.
+ - Major bugfixes in INSANE (the Full Throttle bike fights).
1.5.0 (2012-07-27)
New Games:
diff --git a/README b/README
index b7b8176923..a6c3d9773a 100644
--- a/README
+++ b/README
@@ -264,10 +264,15 @@ Other Games:
Discworld 2: Missing Presumed ...!? [dw2]
Dragon History [draci]
Drascula: The Vampire Strikes Back [drascula]
+ Eye of the Beholder [eob]
+ Eye of the Beholder II: The Legend of
+ Darkmoon [eob2]
Flight of the Amazon Queen [queen]
Future Wars [fw]
Inherit the Earth: Quest for the Orb [ite]
Nippon Safes Inc. [nippon]
+ Lands of Lore: The Throne of Chaos [lol]
+ The Journeyman Project: Pegasus Prime [pegasus]
The Legend of Kyrandia [kyra1]
The Legend of Kyrandia: The Hand of Fate [kyra2]
The Legend of Kyrandia: Malcolm's Revenge [kyra3]
@@ -2161,8 +2166,11 @@ keywords:
The 7th Guest adds the following non-standard keyword:
- t7g_speed string Video playback speed (normal, tweaked,
- im_an_ios)
+ fast_movie_speed bool If true, movies are played at an increased
+ speed, matching the speed of the iOS version.
+ Movies without sound are still played at their
+ normal speed, to avoid music synchronization
+ issues
8.2) Custom game options that can be toggled via the GUI
diff --git a/audio/mods/maxtrax.cpp b/audio/mods/maxtrax.cpp
index 8ed51ae5c3..a2d470cdbf 100644
--- a/audio/mods/maxtrax.cpp
+++ b/audio/mods/maxtrax.cpp
@@ -105,7 +105,7 @@ inline uint32 pow2Fixed(int32 val) {
}
#endif
-} // End of namespace
+} // End of anonymous namespace
namespace Audio {
@@ -211,7 +211,7 @@ void MaxTrax::interrupt() {
goto endOfEventLoop;
case 0xA0: // SPECIAL
- switch (curEvent->stopTime >> 8){
+ switch (curEvent->stopTime >> 8) {
case 0x01: // SPECIAL_SYNC
_playerCtx.syncCallBack(curEvent->stopTime & 0xFF);
break;
@@ -1032,6 +1032,6 @@ void MaxTrax::outPutEvent(const Event &ev, int num) {}
void MaxTrax::outPutScore(const Score &sc, int num) {}
#endif // #ifndef NDEBUG
-} // End of namespace Audio
+} // End of namespace Audio
#endif // #if defined(AUDIO_MODS_MAXTRAX_H)
diff --git a/audio/mods/maxtrax.h b/audio/mods/maxtrax.h
index ffb176c241..8288aef186 100644
--- a/audio/mods/maxtrax.h
+++ b/audio/mods/maxtrax.h
@@ -214,6 +214,6 @@ private:
static void outPutEvent(const Event &ev, int num = -1);
static void outPutScore(const Score &sc, int num = -1);
};
-} // End of namespace Audio
+} // End of namespace Audio
#endif // !defined(AUDIO_MODS_MAXTRAX_H)
diff --git a/audio/mods/protracker.cpp b/audio/mods/protracker.cpp
index 1e18d5adf8..c947f256e0 100644
--- a/audio/mods/protracker.cpp
+++ b/audio/mods/protracker.cpp
@@ -90,6 +90,14 @@ private:
public:
ProtrackerStream(Common::SeekableReadStream *stream, int offs, int rate, bool stereo);
+ Modules::Module *getModule() {
+ // Ordinarily, the Module is not meant to be seen outside of
+ // this class, but occasionally, it's useful to be able to
+ // manipulate it directly. The Hopkins engine uses this to
+ // repair a broken song.
+ return &_module;
+ }
+
private:
void interrupt();
@@ -462,8 +470,12 @@ void ProtrackerStream::interrupt() {
namespace Audio {
-AudioStream *makeProtrackerStream(Common::SeekableReadStream *stream, int offs, int rate, bool stereo) {
- return new Modules::ProtrackerStream(stream, offs, rate, stereo);
+AudioStream *makeProtrackerStream(Common::SeekableReadStream *stream, int offs, int rate, bool stereo, Modules::Module **module) {
+ Modules::ProtrackerStream *protrackerStream = new Modules::ProtrackerStream(stream, offs, rate, stereo);
+ if (module) {
+ *module = protrackerStream->getModule();
+ }
+ return (AudioStream *)protrackerStream;
}
} // End of namespace Audio
diff --git a/audio/mods/protracker.h b/audio/mods/protracker.h
index 5f47c4453b..50528fc599 100644
--- a/audio/mods/protracker.h
+++ b/audio/mods/protracker.h
@@ -26,6 +26,7 @@
* - agos
* - parallaction
* - gob
+ * - hopkins
*/
#ifndef AUDIO_MODS_PROTRACKER_H
@@ -35,6 +36,10 @@ namespace Common {
class SeekableReadStream;
}
+namespace Modules {
+class Module;
+}
+
namespace Audio {
class AudioStream;
@@ -48,9 +53,10 @@ class AudioStream;
* @param stream the ReadStream from which to read the ProTracker data
* @param rate TODO
* @param stereo TODO
+ * @param module can be used to return the Module object (rarely useful)
* @return a new AudioStream, or NULL, if an error occurred
*/
-AudioStream *makeProtrackerStream(Common::SeekableReadStream *stream, int offs = 0, int rate = 44100, bool stereo = true);
+AudioStream *makeProtrackerStream(Common::SeekableReadStream *stream, int offs = 0, int rate = 44100, bool stereo = true, Modules::Module **module = 0);
} // End of namespace Audio
diff --git a/audio/mods/tfmx.cpp b/audio/mods/tfmx.cpp
index 2957529afc..5829ab5fda 100644
--- a/audio/mods/tfmx.cpp
+++ b/audio/mods/tfmx.cpp
@@ -1095,7 +1095,7 @@ int Tfmx::doSfx(uint16 sfxIndex, bool unlockChannel) {
return -1;
}
-} // End of namespace Audio
+} // End of namespace Audio
// some debugging functions
#if 0
diff --git a/audio/mods/tfmx.h b/audio/mods/tfmx.h
index ebe1172278..a8852d7963 100644
--- a/audio/mods/tfmx.h
+++ b/audio/mods/tfmx.h
@@ -273,6 +273,6 @@ private:
void noteCommand(uint8 note, uint8 param1, uint8 param2, uint8 param3);
};
-} // End of namespace Audio
+} // End of namespace Audio
#endif // !defined(AUDIO_MODS_TFMX_H)
diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp
index 2451336784..518e260175 100644
--- a/audio/softsynth/fluidsynth.cpp
+++ b/audio/softsynth/fluidsynth.cpp
@@ -127,12 +127,54 @@ int MidiDriver_FluidSynth::open() {
_synth = new_fluid_synth(_settings);
- // In theory, this ought to reduce CPU load... but it doesn't make any
- // noticeable difference for me, so disable it for now.
+ if (ConfMan.getBool("fluidsynth_chorus_activate")) {
+ fluid_synth_set_chorus_on(_synth, 1);
+
+ int chorusNr = ConfMan.getInt("fluidsynth_chorus_nr");
+ double chorusLevel = (double)ConfMan.getInt("fluidsynth_chorus_level") / 100.0;
+ double chorusSpeed = (double)ConfMan.getInt("fluidsynth_chorus_speed") / 100.0;
+ double chorusDepthMs = (double)ConfMan.getInt("fluidsynth_chorus_depth") / 10.0;
+
+ Common::String chorusWaveForm = ConfMan.get("fluidsynth_chorus_waveform");
+ int chorusType = FLUID_CHORUS_MOD_SINE;
+ if (chorusWaveForm == "sine") {
+ chorusType = FLUID_CHORUS_MOD_SINE;
+ } else {
+ chorusType = FLUID_CHORUS_MOD_TRIANGLE;
+ }
+
+ fluid_synth_set_chorus(_synth, chorusNr, chorusLevel, chorusSpeed, chorusDepthMs, chorusType);
+ } else {
+ fluid_synth_set_chorus_on(_synth, 0);
+ }
+
+ if (ConfMan.getBool("fluidsynth_reverb_activate")) {
+ fluid_synth_set_reverb_on(_synth, 1);
+
+ double reverbRoomSize = (double)ConfMan.getInt("fluidsynth_reverb_roomsize") / 100.0;
+ double reverbDamping = (double)ConfMan.getInt("fluidsynth_reverb_damping") / 100.0;
+ int reverbWidth = ConfMan.getInt("fluidsynth_reverb_width");
+ double reverbLevel = (double)ConfMan.getInt("fluidsynth_reverb_level") / 100.0;
+
+ fluid_synth_set_reverb(_synth, reverbRoomSize, reverbDamping, reverbWidth, reverbLevel);
+ } else {
+ fluid_synth_set_reverb_on(_synth, 0);
+ }
+
+ Common::String interpolation = ConfMan.get("fluidsynth_misc_interpolation");
+ int interpMethod = FLUID_INTERP_4THORDER;
+
+ if (interpolation == "none") {
+ interpMethod = FLUID_INTERP_NONE;
+ } else if (interpolation == "linear") {
+ interpMethod = FLUID_INTERP_LINEAR;
+ } else if (interpolation == "4th") {
+ interpMethod = FLUID_INTERP_4THORDER;
+ } else if (interpolation == "7th") {
+ interpMethod = FLUID_INTERP_7THORDER;
+ }
- // fluid_synth_set_interp_method(_synth, -1, FLUID_INTERP_LINEAR);
- // fluid_synth_set_reverb_on(_synth, 0);
- // fluid_synth_set_chorus_on(_synth, 0);
+ fluid_synth_set_interp_method(_synth, -1, interpMethod);
const char *soundfont = ConfMan.get("soundfont").c_str();
diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index 186118262f..d9744924aa 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -25,6 +25,7 @@
#ifdef USE_MT32EMU
#include "audio/softsynth/mt32/mt32emu.h"
+#include "audio/softsynth/mt32/ROMInfo.h"
#include "audio/softsynth/emumidi.h"
#include "audio/musicplugin.h"
@@ -47,6 +48,50 @@
#include "graphics/palette.h"
#include "graphics/font.h"
+#include "gui/message.h"
+
+namespace MT32Emu {
+
+class ReportHandlerScummVM : public ReportHandler {
+friend class Synth;
+
+public:
+ virtual ~ReportHandlerScummVM() {}
+
+protected:
+
+ // Callback for debug messages, in vprintf() format
+ void printDebug(const char *fmt, va_list list) {
+ debug(4, fmt, list);
+ }
+
+ // Callbacks for reporting various errors and information
+ void onErrorControlROM() {
+ GUI::MessageDialog dialog("MT32emu: Init Error - Missing or invalid Control ROM image", "OK");
+ dialog.runModal();
+ error("MT32emu: Init Error - Missing or invalid Control ROM image");
+ }
+ void onErrorPCMROM() {
+ GUI::MessageDialog dialog("MT32emu: Init Error - Missing PCM ROM image", "OK");
+ dialog.runModal();
+ error("MT32emu: Init Error - Missing PCM ROM image");
+ }
+ void showLCDMessage(const char *message) {
+ g_system->displayMessageOnOSD(message);
+ }
+ void onDeviceReset() {}
+ void onDeviceReconfig() {}
+ void onNewReverbMode(Bit8u /* mode */) {}
+ void onNewReverbTime(Bit8u /* time */) {}
+ void onNewReverbLevel(Bit8u /* level */) {}
+ void onPartStateChanged(int /* partNum */, bool /* isActive */) {}
+ void onPolyStateChanged(int /* partNum */) {}
+ void onPartialStateChanged(int /* partialNum */, int /* oldPartialPhase */, int /* newPartialPhase */) {}
+ void onProgramChanged(int /* partNum */, char * /* patchName */) {}
+};
+
+} // end of namespace MT32Emu
+
class MidiChannel_MT32 : public MidiChannel_MPU401 {
void effectLevel(byte value) { }
void chorusLevel(byte value) { }
@@ -57,6 +102,10 @@ private:
MidiChannel_MT32 _midiChannels[16];
uint16 _channelMask;
MT32Emu::Synth *_synth;
+ MT32Emu::ReportHandlerScummVM *_reportHandler;
+ const MT32Emu::ROMImage *_controlROM, *_pcmROM;
+ Common::File *_controlFile, *_pcmFile;
+ void deleteMuntStructures();
int _outputRate;
@@ -84,149 +133,6 @@ public:
int getRate() const { return _outputRate; }
};
-static int eatSystemEvents() {
- Common::Event event;
- Common::EventManager *eventMan = g_system->getEventManager();
- while (eventMan->pollEvent(event)) {
- switch (event.type) {
- case Common::EVENT_QUIT:
- return 1;
- default:
- break;
- }
- }
- return 0;
-}
-
-static void drawProgress(float progress) {
- const Graphics::Font &font(*FontMan.getFontByUsage(Graphics::FontManager::kGUIFont));
- Graphics::Surface *screen = g_system->lockScreen();
-
- assert(screen);
- assert(screen->pixels);
-
- Graphics::PixelFormat screenFormat = g_system->getScreenFormat();
-
- int16 w = g_system->getWidth() / 7 * 5;
- int16 h = font.getFontHeight();
- int16 x = g_system->getWidth() / 7;
- int16 y = g_system->getHeight() / 2 - h / 2;
-
- Common::Rect r(x, y, x + w, y + h);
-
- uint32 col;
-
- if (screenFormat.bytesPerPixel > 1)
- col = screenFormat.RGBToColor(0, 171, 0);
- else
- col = 1;
-
- screen->frameRect(r, col);
-
- r.grow(-1);
- r.setWidth(uint16(progress * w));
-
- if (screenFormat.bytesPerPixel > 1)
- col = screenFormat.RGBToColor(171, 0, 0);
- else
- col = 2;
-
- screen->fillRect(r, col);
-
- g_system->unlockScreen();
- g_system->updateScreen();
-}
-
-static void drawMessage(int offset, const Common::String &text) {
- const Graphics::Font &font(*FontMan.getFontByUsage(Graphics::FontManager::kGUIFont));
- Graphics::Surface *screen = g_system->lockScreen();
-
- assert(screen);
- assert(screen->pixels);
-
- Graphics::PixelFormat screenFormat = g_system->getScreenFormat();
-
- uint16 h = font.getFontHeight();
- uint16 y = g_system->getHeight() / 2 - h / 2 + offset * (h + 1);
-
- uint32 col;
-
- if (screenFormat.bytesPerPixel > 1)
- col = screenFormat.RGBToColor(0, 0, 0);
- else
- col = 0;
-
- Common::Rect r(0, y, screen->w, y + h);
- screen->fillRect(r, col);
-
- if (screenFormat.bytesPerPixel > 1)
- col = screenFormat.RGBToColor(0, 171, 0);
- else
- col = 1;
-
- font.drawString(screen, text, 0, y, screen->w, col, Graphics::kTextAlignCenter);
-
- g_system->unlockScreen();
- g_system->updateScreen();
-}
-
-static Common::File *MT32_OpenFile(void *userData, const char *filename) {
- Common::File *file = new Common::File();
- if (!file->open(filename)) {
- delete file;
- return NULL;
- }
- return file;
-}
-
-static void MT32_PrintDebug(void *userData, const char *fmt, va_list list) {
- if (((MidiDriver_MT32 *)userData)->_initializing) {
- char buf[512];
-
- vsnprintf(buf, 512, fmt, list);
- buf[70] = 0; // Truncate to a reasonable length
-
- drawMessage(1, buf);
- }
-
- //vdebug(0, fmt, list); // FIXME: Use a higher debug level
-}
-
-static int MT32_Report(void *userData, MT32Emu::ReportType type, const void *reportData) {
- switch (type) {
- case MT32Emu::ReportType_lcdMessage:
- g_system->displayMessageOnOSD((const char *)reportData);
- break;
- case MT32Emu::ReportType_errorControlROM:
- error("Failed to load MT32_CONTROL.ROM");
- break;
- case MT32Emu::ReportType_errorPCMROM:
- error("Failed to load MT32_PCM.ROM");
- break;
- case MT32Emu::ReportType_progressInit:
- if (((MidiDriver_MT32 *)userData)->_initializing) {
- drawProgress(*((const float *)reportData));
- return eatSystemEvents();
- }
- break;
- case MT32Emu::ReportType_availableSSE:
- debug(1, "MT32emu: SSE is available");
- break;
- case MT32Emu::ReportType_usingSSE:
- debug(1, "MT32emu: using SSE");
- break;
- case MT32Emu::ReportType_available3DNow:
- debug(1, "MT32emu: 3DNow! is available");
- break;
- case MT32Emu::ReportType_using3DNow:
- debug(1, "MT32emu: using 3DNow!");
- break;
- default:
- break;
- }
- return 0;
-}
-
////////////////////////////////////////
//
// MidiDriver_MT32
@@ -239,6 +145,7 @@ MidiDriver_MT32::MidiDriver_MT32(Audio::Mixer *mixer) : MidiDriver_Emulated(mixe
for (i = 0; i < ARRAYSIZE(_midiChannels); ++i) {
_midiChannels[i].init(this, i);
}
+ _reportHandler = NULL;
_synth = NULL;
// A higher baseFreq reduces the length used in generateSamples(),
// and means that the timer callback will be called more often.
@@ -252,30 +159,35 @@ MidiDriver_MT32::MidiDriver_MT32(Audio::Mixer *mixer) : MidiDriver_Emulated(mixe
}
MidiDriver_MT32::~MidiDriver_MT32() {
+ deleteMuntStructures();
+}
+
+void MidiDriver_MT32::deleteMuntStructures() {
delete _synth;
+ _synth = NULL;
+ delete _reportHandler;
+ _reportHandler = NULL;
+
+ if (_controlROM)
+ MT32Emu::ROMImage::freeROMImage(_controlROM);
+ _controlROM = NULL;
+ if (_pcmROM)
+ MT32Emu::ROMImage::freeROMImage(_pcmROM);
+ _pcmROM = NULL;
+
+ delete _controlFile;
+ _controlFile = NULL;
+ delete _pcmFile;
+ _pcmFile = NULL;
}
int MidiDriver_MT32::open() {
- MT32Emu::SynthProperties prop;
-
if (_isOpen)
return MERR_ALREADY_OPEN;
MidiDriver_Emulated::open();
-
- memset(&prop, 0, sizeof(prop));
- prop.sampleRate = getRate();
- prop.useReverb = true;
- prop.useDefaultReverb = false;
- prop.reverbType = 0;
- prop.reverbTime = 5;
- prop.reverbLevel = 3;
- prop.userData = this;
- prop.printDebug = MT32_PrintDebug;
- prop.report = MT32_Report;
- prop.openFile = MT32_OpenFile;
-
- _synth = new MT32Emu::Synth();
+ _reportHandler = new MT32Emu::ReportHandlerScummVM();
+ _synth = new MT32Emu::Synth(_reportHandler);
Graphics::PixelFormat screenFormat = g_system->getScreenFormat();
@@ -290,8 +202,16 @@ int MidiDriver_MT32::open() {
}
_initializing = true;
- drawMessage(-1, _s("Initializing MT-32 Emulator"));
- if (!_synth->open(prop))
+ debug(4, _s("Initializing MT-32 Emulator"));
+ _controlFile = new Common::File();
+ if (!_controlFile->open("MT32_CONTROL.ROM") && !_controlFile->open("CM32L_CONTROL.ROM"))
+ error("Error opening MT32_CONTROL.ROM / CM32L_CONTROL.ROM");
+ _pcmFile = new Common::File();
+ if (!_pcmFile->open("MT32_PCM.ROM") && !_pcmFile->open("CM32L_PCM.ROM"))
+ error("Error opening MT32_PCM.ROM / CM32L_PCM.ROM");
+ _controlROM = MT32Emu::ROMImage::makeROMImage(_controlFile);
+ _pcmROM = MT32Emu::ROMImage::makeROMImage(_pcmFile);
+ if (!_synth->open(*_controlROM, *_pcmROM))
return MERR_DEVICE_NOT_AVAILABLE;
double gain = (double)ConfMan.getInt("midi_gain") / 100.0;
@@ -352,8 +272,7 @@ void MidiDriver_MT32::close() {
_mixer->stopHandle(_mixerSoundHandle);
_synth->close();
- delete _synth;
- _synth = NULL;
+ deleteMuntStructures();
}
void MidiDriver_MT32::generateSamples(int16 *data, int len) {
diff --git a/audio/softsynth/mt32/AReverbModel.cpp b/audio/softsynth/mt32/AReverbModel.cpp
index 151f6c2c81..1d63832157 100644
--- a/audio/softsynth/mt32/AReverbModel.cpp
+++ b/audio/softsynth/mt32/AReverbModel.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -16,64 +16,97 @@
*/
#include "mt32emu.h"
-#include "AReverbModel.h"
-
-namespace MT32Emu {
-
-// Default reverb settings for modes 0-2
-static const unsigned int NUM_ALLPASSES = 6;
-static const unsigned int NUM_DELAYS = 5;
+#if MT32EMU_USE_REVERBMODEL == 1
-static const Bit32u MODE_0_ALLPASSES[] = {729, 78, 394, 994, 1250, 1889};
-static const Bit32u MODE_0_DELAYS[] = {846, 4, 1819, 778, 346};
-static const float MODE_0_TIMES[] = {0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.9f};
-static const float MODE_0_LEVELS[] = {0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 1.01575f};
-
-static const Bit32u MODE_1_ALLPASSES[] = {176, 809, 1324, 1258};
-static const Bit32u MODE_1_DELAYS[] = {2262, 124, 974, 2516, 356};
-static const float MODE_1_TIMES[] = {0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.95f};
-static const float MODE_1_LEVELS[] = {0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 1.01575f};
+#include "AReverbModel.h"
-static const Bit32u MODE_2_ALLPASSES[] = {78, 729, 994, 389};
-static const Bit32u MODE_2_DELAYS[] = {846, 4, 1819, 778, 346};
-static const float MODE_2_TIMES[] = {0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f};
-static const float MODE_2_LEVELS[] = {0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f};
+// Analysing of state of reverb RAM address lines gives exact sizes of the buffers of filters used. This also indicates that
+// the reverb model implemented in the real devices consists of three series allpass filters preceded by a non-feedback comb (or a delay with a LPF)
+// and followed by three parallel comb filters
-const AReverbSettings AReverbModel::REVERB_MODE_0_SETTINGS = {MODE_0_ALLPASSES, MODE_0_DELAYS, MODE_0_TIMES, MODE_0_LEVELS, 0.687770909f, 0.5f, 0.5f};
-const AReverbSettings AReverbModel::REVERB_MODE_1_SETTINGS = {MODE_1_ALLPASSES, MODE_1_DELAYS, MODE_1_TIMES, MODE_1_LEVELS, 0.712025098f, 0.375f, 0.625f};
-const AReverbSettings AReverbModel::REVERB_MODE_2_SETTINGS = {MODE_2_ALLPASSES, MODE_2_DELAYS, MODE_2_TIMES, MODE_2_LEVELS, 0.939522749f, 0.0f, 0.0f};
+namespace MT32Emu {
-RingBuffer::RingBuffer(Bit32u newsize) {
- index = 0;
- size = newsize;
+// Because LA-32 chip makes it's output available to process by the Boss chip with a significant delay,
+// the Boss chip puts to the buffer the LA32 dry output when it is ready and performs processing of the _previously_ latched data.
+// Of course, the right way would be to use a dedicated variable for this, but our reverb model is way higher level,
+// so we can simply increase the input buffer size.
+static const Bit32u PROCESS_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.
+// Found by tracing reverb RAM data lines (thanks go to Lord_Nightmare & balrog).
+
+static const Bit32u NUM_ALLPASSES = 3;
+static const Bit32u NUM_COMBS = 4; // Well, actually there are 3 comb filters, but the entrance LPF + delay can be perfectly processed via a comb here.
+
+static const Bit32u MODE_0_ALLPASSES[] = {994, 729, 78};
+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[] = {0x3C, 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_LEVELS[] = {10*1, 10*3, 10*5, 10*7, 11*9, 11*12, 11*15, 13*15};
+static const Bit32u MODE_0_LPF_AMP = 6;
+
+static const Bit32u MODE_1_ALLPASSES[] = {1324, 809, 176};
+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[] = {0x30, 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_LEVELS[] = {10*1, 10*3, 11*5, 11*7, 11*9, 11*12, 11*15, 14*15};
+static const Bit32u MODE_1_LPF_AMP = 6;
+
+static const Bit32u MODE_2_ALLPASSES[] = {969, 644, 157};
+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_LEVELS[] = {10*1, 10*3, 11*5, 11*7, 11*9, 11*12, 12*15, 14*15};
+static const Bit32u MODE_2_LPF_AMP = 8;
+
+static const AReverbSettings REVERB_MODE_0_SETTINGS = {MODE_0_ALLPASSES, MODE_0_COMBS, MODE_0_OUTL, MODE_0_OUTR, MODE_0_COMB_FACTOR, MODE_0_COMB_FEEDBACK, MODE_0_LEVELS, MODE_0_LPF_AMP};
+static const AReverbSettings REVERB_MODE_1_SETTINGS = {MODE_1_ALLPASSES, MODE_1_COMBS, MODE_1_OUTL, MODE_1_OUTR, MODE_1_COMB_FACTOR, MODE_1_COMB_FEEDBACK, MODE_1_LEVELS, MODE_1_LPF_AMP};
+static const AReverbSettings REVERB_MODE_2_SETTINGS = {MODE_2_ALLPASSES, MODE_2_COMBS, MODE_2_OUTL, MODE_2_OUTR, MODE_2_COMB_FACTOR, MODE_2_COMB_FEEDBACK, MODE_2_LEVELS, MODE_2_LPF_AMP};
+
+static const AReverbSettings * const REVERB_SETTINGS[] = {&REVERB_MODE_0_SETTINGS, &REVERB_MODE_1_SETTINGS, &REVERB_MODE_2_SETTINGS, &REVERB_MODE_0_SETTINGS};
+
+RingBuffer::RingBuffer(const Bit32u newsize) : size(newsize), index(0) {
buffer = new float[size];
}
RingBuffer::~RingBuffer() {
delete[] buffer;
buffer = NULL;
- size = 0;
}
float RingBuffer::next() {
- index++;
- if (index >= size) {
+ if (++index >= size) {
index = 0;
}
return buffer[index];
}
-bool RingBuffer::isEmpty() {
+bool RingBuffer::isEmpty() const {
if (buffer == NULL) return true;
float *buf = buffer;
- float total = 0;
+ float max = 0.001f;
for (Bit32u i = 0; i < size; i++) {
- total += (*buf < 0 ? -*buf : *buf);
+ if ((*buf < -max) || (*buf > max)) return false;
buf++;
}
- return ((total / size) < .0002 ? true : false);
+ return true;
}
void RingBuffer::mute() {
@@ -83,59 +116,66 @@ void RingBuffer::mute() {
}
}
-AllpassFilter::AllpassFilter(Bit32u useSize) : RingBuffer(useSize) {
-}
-
-Delay::Delay(Bit32u useSize) : RingBuffer(useSize) {
-}
+AllpassFilter::AllpassFilter(const Bit32u useSize) : RingBuffer(useSize) {}
-float AllpassFilter::process(float in) {
- // This model corresponds to the allpass filter implementation in the real CM-32L device
+float AllpassFilter::process(const float in) {
+ // This model corresponds to the allpass filter implementation of the real CM-32L device
// found from sample analysis
- float out;
-
- out = next();
+ const float bufferOut = next();
// store input - feedback / 2
- buffer[index] = in - 0.5f * out;
+ buffer[index] = in - 0.5f * bufferOut;
// return buffer output + feedforward / 2
- return out + 0.5f * buffer[index];
+ return bufferOut + 0.5f * buffer[index];
}
-float Delay::process(float in) {
- // Implements a very simple delay
+CombFilter::CombFilter(const Bit32u useSize) : RingBuffer(useSize) {}
- float out;
+void CombFilter::process(const float in) {
+ // This model corresponds to the comb filter implementation of the real CM-32L device
+ // found from sample analysis
- out = next();
+ // the previously stored value
+ float last = buffer[index];
- // store input
- buffer[index] = in;
+ // prepare input + feedback
+ float filterIn = in + next() * feedbackFactor;
- // return buffer output
- return out;
+ // store input + feedback processed by a low-pass filter
+ buffer[index] = filterFactor * last - filterIn;
}
-AReverbModel::AReverbModel(const AReverbSettings *useSettings) : allpasses(NULL), delays(NULL), currentSettings(useSettings) {
+float CombFilter::getOutputAt(const Bit32u outIndex) const {
+ return buffer[(size + index - outIndex) % size];
}
+void CombFilter::setFeedbackFactor(const float useFeedbackFactor) {
+ feedbackFactor = useFeedbackFactor;
+}
+
+void CombFilter::setFilterFactor(const float useFilterFactor) {
+ filterFactor = useFilterFactor;
+}
+
+AReverbModel::AReverbModel(const ReverbMode mode) : allpasses(NULL), combs(NULL), currentSettings(*REVERB_SETTINGS[mode]) {}
+
AReverbModel::~AReverbModel() {
close();
}
-void AReverbModel::open(unsigned int /*sampleRate*/) {
- // FIXME: filter sizes must be multiplied by sample rate to 32000Hz ratio
- // IIR filter values depend on sample rate as well
+void AReverbModel::open() {
allpasses = new AllpassFilter*[NUM_ALLPASSES];
for (Bit32u i = 0; i < NUM_ALLPASSES; i++) {
- allpasses[i] = new AllpassFilter(currentSettings->allpassSizes[i]);
+ allpasses[i] = new AllpassFilter(currentSettings.allpassSizes[i]);
}
- delays = new Delay*[NUM_DELAYS];
- for (Bit32u i = 0; i < NUM_DELAYS; i++) {
- delays[i] = new Delay(currentSettings->delaySizes[i]);
+ combs = new CombFilter*[NUM_COMBS];
+ for (Bit32u i = 0; i < NUM_COMBS; i++) {
+ combs[i] = new CombFilter(currentSettings.combSizes[i]);
+ combs[i]->setFilterFactor(currentSettings.filterFactor[i] / 256.0f);
}
+ lpfAmp = currentSettings.lpfAmp / 16.0f;
mute();
}
@@ -150,84 +190,80 @@ void AReverbModel::close() {
delete[] allpasses;
allpasses = NULL;
}
- if (delays != NULL) {
- for (Bit32u i = 0; i < NUM_DELAYS; i++) {
- if (delays[i] != NULL) {
- delete delays[i];
- delays[i] = NULL;
+ if (combs != NULL) {
+ for (Bit32u i = 0; i < NUM_COMBS; i++) {
+ if (combs[i] != NULL) {
+ delete combs[i];
+ combs[i] = NULL;
}
}
- delete[] delays;
- delays = NULL;
+ delete[] combs;
+ combs = NULL;
}
}
void AReverbModel::mute() {
+ if (allpasses == NULL || combs == NULL) return;
for (Bit32u i = 0; i < NUM_ALLPASSES; i++) {
allpasses[i]->mute();
}
- for (Bit32u i = 0; i < NUM_DELAYS; i++) {
- delays[i]->mute();
+ for (Bit32u i = 0; i < NUM_COMBS; i++) {
+ combs[i]->mute();
}
- filterhist1 = 0;
- filterhist2 = 0;
- combhist = 0;
}
void AReverbModel::setParameters(Bit8u time, Bit8u level) {
// FIXME: wetLevel definitely needs ramping when changed
// Although, most games don't set reverb level during MIDI playback
- decayTime = currentSettings->decayTimes[time];
- wetLevel = currentSettings->wetLevels[level];
+ if (combs == NULL) return;
+ level &= 7;
+ time &= 7;
+ for (Bit32u i = 0; i < NUM_COMBS; i++) {
+ combs[i]->setFeedbackFactor(currentSettings.decayTimes[(i << 3) + time] / 256.0f);
+ }
+ wetLevel = (level == 0 && time == 0) ? 0.0f : 0.5f * lpfAmp * currentSettings.wetLevels[level] / 256.0f;
}
bool AReverbModel::isActive() const {
- bool bActive = false;
for (Bit32u i = 0; i < NUM_ALLPASSES; i++) {
- bActive |= !allpasses[i]->isEmpty();
+ if (!allpasses[i]->isEmpty()) return true;
}
- for (Bit32u i = 0; i < NUM_DELAYS; i++) {
- bActive |= !delays[i]->isEmpty();
+ for (Bit32u i = 0; i < NUM_COMBS; i++) {
+ if (!combs[i]->isEmpty()) return true;
}
- return bActive;
+ return false;
}
void AReverbModel::process(const float *inLeft, const float *inRight, float *outLeft, float *outRight, unsigned long numSamples) {
-// Three series allpass filters followed by a delay, fourth allpass filter and another delay
- float dry, link, outL1, outL2, outR1, outR2;
+ float dry, link, outL1;
for (unsigned long i = 0; i < numSamples; i++) {
- dry = *inLeft + *inRight;
+ dry = wetLevel * (*inLeft + *inRight);
- // Implementation of 2-stage IIR single-pole low-pass filter
- // found at the entrance of reverb processing on real devices
- filterhist1 += (dry - filterhist1) * currentSettings->filtVal;
- filterhist2 += (filterhist1 - filterhist2) * currentSettings->filtVal;
+ // Get the last stored sample before processing in order not to loose it
+ link = combs[0]->getOutputAt(currentSettings.combSizes[0] - 1);
- link = allpasses[0]->process(-filterhist2);
- link = allpasses[1]->process(link);
+ combs[0]->process(-dry);
- // this implements a comb filter cross-linked with the fourth allpass filter
- link += combhist * decayTime;
+ link = allpasses[0]->process(link);
+ link = allpasses[1]->process(link);
link = allpasses[2]->process(link);
- link = delays[0]->process(link);
- outL1 = link;
- link = allpasses[3]->process(link);
- link = delays[1]->process(link);
- outR1 = link;
- link = allpasses[4]->process(link);
- link = delays[2]->process(link);
- outL2 = link;
- link = allpasses[5]->process(link);
- link = delays[3]->process(link);
- outR2 = link;
- link = delays[4]->process(link);
-
- // comb filter end point
- combhist = combhist * currentSettings->damp1 + link * currentSettings->damp2;
-
- *outLeft = (outL1 + outL2) * wetLevel;
- *outRight = (outR1 + outR2) * wetLevel;
+
+ // If the output position is equal to the comb size, get it now in order not to loose it
+ outL1 = 1.5f * combs[1]->getOutputAt(currentSettings.outLPositions[0] - 1);
+
+ combs[1]->process(link);
+ combs[2]->process(link);
+ combs[3]->process(link);
+
+ link = outL1 + 1.5f * combs[2]->getOutputAt(currentSettings.outLPositions[1]);
+ link += combs[3]->getOutputAt(currentSettings.outLPositions[2]);
+ *outLeft = link;
+
+ link = 1.5f * combs[1]->getOutputAt(currentSettings.outRPositions[0]);
+ link += 1.5f * combs[2]->getOutputAt(currentSettings.outRPositions[1]);
+ link += combs[3]->getOutputAt(currentSettings.outRPositions[2]);
+ *outRight = link;
inLeft++;
inRight++;
@@ -237,3 +273,5 @@ void AReverbModel::process(const float *inLeft, const float *inRight, float *out
}
}
+
+#endif
diff --git a/audio/softsynth/mt32/AReverbModel.h b/audio/softsynth/mt32/AReverbModel.h
index 3fae08c34c..c992478907 100644
--- a/audio/softsynth/mt32/AReverbModel.h
+++ b/audio/softsynth/mt32/AReverbModel.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -21,66 +21,67 @@
namespace MT32Emu {
struct AReverbSettings {
- const Bit32u *allpassSizes;
- const Bit32u *delaySizes;
- const float *decayTimes;
- const float *wetLevels;
- float filtVal;
- float damp1;
- float damp2;
+ const Bit32u * const allpassSizes;
+ const Bit32u * const combSizes;
+ const Bit32u * const outLPositions;
+ const Bit32u * const outRPositions;
+ const Bit32u * const filterFactor;
+ const Bit32u * const decayTimes;
+ const Bit32u * const wetLevels;
+ const Bit32u lpfAmp;
};
class RingBuffer {
protected:
float *buffer;
- Bit32u size;
+ const Bit32u size;
Bit32u index;
+
public:
- RingBuffer(Bit32u size);
+ RingBuffer(const Bit32u size);
virtual ~RingBuffer();
float next();
- bool isEmpty();
+ bool isEmpty() const;
void mute();
};
class AllpassFilter : public RingBuffer {
public:
- AllpassFilter(Bit32u size);
- float process(float in);
+ AllpassFilter(const Bit32u size);
+ float process(const float in);
};
-class Delay : public RingBuffer {
+class CombFilter : public RingBuffer {
+ float feedbackFactor;
+ float filterFactor;
+
public:
- Delay(Bit32u size);
- float process(float in);
+ CombFilter(const Bit32u size);
+ void process(const float in);
+ float getOutputAt(const Bit32u outIndex) const;
+ void setFeedbackFactor(const float useFeedbackFactor);
+ void setFilterFactor(const float useFilterFactor);
};
class AReverbModel : public ReverbModel {
AllpassFilter **allpasses;
- Delay **delays;
+ CombFilter **combs;
- const AReverbSettings *currentSettings;
- float decayTime;
+ const AReverbSettings &currentSettings;
+ float lpfAmp;
float wetLevel;
- float filterhist1, filterhist2;
- float combhist;
void mute();
+
public:
- AReverbModel(const AReverbSettings *newSettings);
+ AReverbModel(const ReverbMode mode);
~AReverbModel();
- void open(unsigned int sampleRate);
+ void open();
void close();
void setParameters(Bit8u time, Bit8u level);
void process(const float *inLeft, const float *inRight, float *outLeft, float *outRight, unsigned long numSamples);
bool isActive() const;
-
- static const AReverbSettings REVERB_MODE_0_SETTINGS;
- static const AReverbSettings REVERB_MODE_1_SETTINGS;
- static const AReverbSettings REVERB_MODE_2_SETTINGS;
};
-// Default reverb settings for modes 0-2
-
}
#endif
diff --git a/audio/softsynth/mt32/BReverbModel.cpp b/audio/softsynth/mt32/BReverbModel.cpp
new file mode 100644
index 0000000000..cc0219b741
--- /dev/null
+++ b/audio/softsynth/mt32/BReverbModel.cpp
@@ -0,0 +1,393 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "mt32emu.h"
+
+#if MT32EMU_USE_REVERBMODEL == 2
+
+#include "BReverbModel.h"
+
+// Analysing of state of reverb RAM address lines gives exact sizes of the buffers of filters used. This also indicates that
+// the reverb model implemented in the real devices consists of three series allpass filters preceded by a non-feedback comb (or a delay with a LPF)
+// and followed by three parallel comb filters
+
+namespace MT32Emu {
+
+// Because LA-32 chip makes it's output available to process by the Boss chip with a significant delay,
+// the Boss chip puts to the buffer the LA32 dry output when it is ready and performs processing of the _previously_ latched data.
+// Of course, the right way would be to use a dedicated variable for this, but our reverb model is way higher level,
+// so we can simply increase the input buffer size.
+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.
+// Found by tracing reverb RAM data lines (thanks go to Lord_Nightmare & balrog).
+
+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};
+
+// 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.
+static Bit32s weirdMul(Bit32s a, Bit8u addMask, Bit8u carryMask) {
+ Bit8u mask = 0x80;
+ Bit32s res = 0;
+ for (int i = 0; i < 8; i++) {
+ Bit32s carry = (a < 0) && (mask & carryMask) > 0 ? a & 1 : 0;
+ a >>= 1;
+ res += (mask & addMask) > 0 ? a + carry : 0;
+ mask >>= 1;
+ }
+ return res;
+}
+
+RingBuffer::RingBuffer(Bit32u newsize) : size(newsize), index(0) {
+ buffer = new Bit16s[size];
+}
+
+RingBuffer::~RingBuffer() {
+ delete[] buffer;
+ buffer = NULL;
+}
+
+Bit32s RingBuffer::next() {
+ if (++index >= size) {
+ index = 0;
+ }
+ return buffer[index];
+}
+
+bool RingBuffer::isEmpty() const {
+ if (buffer == NULL) return true;
+
+ Bit16s *buf = buffer;
+ for (Bit32u i = 0; i < size; i++) {
+ if (*buf < -8 || *buf > 8) return false;
+ buf++;
+ }
+ return true;
+}
+
+void RingBuffer::mute() {
+ Bit16s *buf = buffer;
+ for (Bit32u i = 0; i < size; i++) {
+ *buf++ = 0;
+ }
+}
+
+AllpassFilter::AllpassFilter(const Bit32u useSize) : RingBuffer(useSize) {}
+
+Bit32s AllpassFilter::process(const Bit32s in) {
+ // This model corresponds to the allpass filter implementation of the real CM-32L device
+ // found from sample analysis
+
+ Bit16s bufferOut = next();
+
+ // store input - feedback / 2
+ buffer[index] = in - (bufferOut >> 1);
+
+ // return buffer output + feedforward / 2
+ return bufferOut + (buffer[index] >> 1);
+}
+
+CombFilter::CombFilter(const Bit32u useSize, const Bit32u useFilterFactor) : RingBuffer(useSize), filterFactor(useFilterFactor) {}
+
+void CombFilter::process(const Bit32s in) {
+ // This model corresponds to the comb filter implementation of the real CM-32L device
+
+ // the previously stored value
+ Bit32s last = buffer[index];
+
+ // prepare input + feedback
+ Bit32s filterIn = in + weirdMul(next(), feedbackFactor, 0xF0 /* Maybe 0x80 ? */);
+
+ // store input + feedback processed by a low-pass filter
+ buffer[index] = weirdMul(last, filterFactor, 0x40) - filterIn;
+}
+
+Bit32s CombFilter::getOutputAt(const Bit32u outIndex) const {
+ return buffer[(size + index - outIndex) % size];
+}
+
+void CombFilter::setFeedbackFactor(const Bit32u useFeedbackFactor) {
+ feedbackFactor = useFeedbackFactor;
+}
+
+DelayWithLowPassFilter::DelayWithLowPassFilter(const Bit32u useSize, const Bit32u useFilterFactor, const Bit32u useAmp)
+ : CombFilter(useSize, useFilterFactor), amp(useAmp) {}
+
+void DelayWithLowPassFilter::process(const Bit32s in) {
+ // the previously stored value
+ Bit32s last = buffer[index];
+
+ // move to the next index
+ next();
+
+ // low-pass filter process
+ Bit32s lpfOut = weirdMul(last, filterFactor, 0xFF) + in;
+
+ // store lpfOut multiplied by LPF amp factor
+ buffer[index] = weirdMul(lpfOut, amp, 0xFF);
+}
+
+TapDelayCombFilter::TapDelayCombFilter(const Bit32u useSize, const Bit32u useFilterFactor) : CombFilter(useSize, useFilterFactor) {}
+
+void TapDelayCombFilter::process(const Bit32s in) {
+ // the previously stored value
+ Bit32s last = buffer[index];
+
+ // move to the next index
+ next();
+
+ // prepare input + feedback
+ // Actually, the size of the filter varies with the TIME parameter, the feedback sample is taken from the position just below the right output
+ Bit32s filterIn = in + weirdMul(getOutputAt(outR + MODE_3_FEEDBACK_DELAY), feedbackFactor, 0xF0);
+
+ // store input + feedback processed by a low-pass filter
+ buffer[index] = weirdMul(last, filterFactor, 0xF0) - filterIn;
+}
+
+Bit32s TapDelayCombFilter::getLeftOutput() const {
+ return getOutputAt(outL + PROCESS_DELAY + MODE_3_ADDITIONAL_DELAY);
+}
+
+Bit32s TapDelayCombFilter::getRightOutput() const {
+ return getOutputAt(outR + PROCESS_DELAY + MODE_3_ADDITIONAL_DELAY);
+}
+
+void TapDelayCombFilter::setOutputPositions(const Bit32u useOutL, const Bit32u useOutR) {
+ outL = useOutL;
+ outR = useOutR;
+}
+
+BReverbModel::BReverbModel(const ReverbMode mode)
+ : allpasses(NULL), combs(NULL), currentSettings(*REVERB_SETTINGS[mode]), tapDelayMode(mode == REVERB_MODE_TAP_DELAY) {}
+
+BReverbModel::~BReverbModel() {
+ close();
+}
+
+void BReverbModel::open() {
+ if (currentSettings.numberOfAllpasses > 0) {
+ allpasses = new AllpassFilter*[currentSettings.numberOfAllpasses];
+ for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) {
+ allpasses[i] = new AllpassFilter(currentSettings.allpassSizes[i]);
+ }
+ }
+ combs = new CombFilter*[currentSettings.numberOfCombs];
+ if (tapDelayMode) {
+ *combs = new TapDelayCombFilter(*currentSettings.combSizes, *currentSettings.filterFactors);
+ } else {
+ combs[0] = new DelayWithLowPassFilter(currentSettings.combSizes[0], currentSettings.filterFactors[0], currentSettings.lpfAmp);
+ for (Bit32u i = 1; i < currentSettings.numberOfCombs; i++) {
+ combs[i] = new CombFilter(currentSettings.combSizes[i], currentSettings.filterFactors[i]);
+ }
+ }
+ mute();
+}
+
+void BReverbModel::close() {
+ if (allpasses != NULL) {
+ for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) {
+ if (allpasses[i] != NULL) {
+ delete allpasses[i];
+ allpasses[i] = NULL;
+ }
+ }
+ delete[] allpasses;
+ allpasses = NULL;
+ }
+ if (combs != NULL) {
+ for (Bit32u i = 0; i < currentSettings.numberOfCombs; i++) {
+ if (combs[i] != NULL) {
+ delete combs[i];
+ combs[i] = NULL;
+ }
+ }
+ delete[] combs;
+ combs = NULL;
+ }
+}
+
+void BReverbModel::mute() {
+ if (allpasses != NULL) {
+ for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) {
+ allpasses[i]->mute();
+ }
+ }
+ if (combs != NULL) {
+ for (Bit32u i = 0; i < currentSettings.numberOfCombs; i++) {
+ combs[i]->mute();
+ }
+ }
+}
+
+void BReverbModel::setParameters(Bit8u time, Bit8u level) {
+ if (combs == NULL) return;
+ level &= 7;
+ time &= 7;
+ if (tapDelayMode) {
+ TapDelayCombFilter *comb = static_cast<TapDelayCombFilter *> (*combs);
+ comb->setOutputPositions(currentSettings.outLPositions[time], currentSettings.outRPositions[time & 7]);
+ comb->setFeedbackFactor(currentSettings.feedbackFactors[((level < 3) || (time < 6)) ? 0 : 1]);
+ } else {
+ for (Bit32u i = 0; i < currentSettings.numberOfCombs; i++) {
+ combs[i]->setFeedbackFactor(currentSettings.feedbackFactors[(i << 3) + time]);
+ }
+ }
+ if (time == 0 && level == 0) {
+ dryAmp = wetLevel = 0;
+ } else {
+ dryAmp = currentSettings.dryAmps[level];
+ wetLevel = currentSettings.wetLevels[level];
+ }
+}
+
+bool BReverbModel::isActive() const {
+ for (Bit32u i = 0; i < currentSettings.numberOfAllpasses; i++) {
+ if (!allpasses[i]->isEmpty()) return true;
+ }
+ for (Bit32u i = 0; i < currentSettings.numberOfCombs; i++) {
+ if (!combs[i]->isEmpty()) return true;
+ }
+ return false;
+}
+
+void BReverbModel::process(const float *inLeft, const float *inRight, float *outLeft, float *outRight, unsigned long numSamples) {
+ Bit32s dry, link, outL1, outR1;
+
+ for (unsigned long i = 0; i < numSamples; i++) {
+ if (tapDelayMode) {
+ dry = Bit32s(*inLeft * 8192.0f) + Bit32s(*inRight * 8192.0f);
+ } else {
+ dry = Bit32s(*inLeft * 8192.0f) / 2 + Bit32s(*inRight * 8192.0f) / 2;
+ }
+
+ // Looks like dryAmp doesn't change in MT-32 but it does in CM-32L / LAPC-I
+ dry = weirdMul(dry, dryAmp, 0xFF);
+
+ if (tapDelayMode) {
+ TapDelayCombFilter *comb = static_cast<TapDelayCombFilter *> (*combs);
+ comb->process(dry);
+ *outLeft = weirdMul(comb->getLeftOutput(), wetLevel, 0xFF) / 8192.0f;
+ *outRight = weirdMul(comb->getRightOutput(), wetLevel, 0xFF) / 8192.0f;
+ } else {
+ // Get the last stored sample before processing in order not to loose it
+ link = combs[0]->getOutputAt(currentSettings.combSizes[0] - 1);
+
+ // Entrance LPF. Note, comb.process() differs a bit here.
+ combs[0]->process(dry);
+
+ // This introduces reverb noise which actually makes output from the real Boss chip nondeterministic
+ link = link - 1;
+ link = allpasses[0]->process(link);
+ link = allpasses[1]->process(link);
+ link = allpasses[2]->process(link);
+
+ // If the output position is equal to the comb size, get it now in order not to loose it
+ outL1 = combs[1]->getOutputAt(currentSettings.outLPositions[0] - 1);
+ outL1 += outL1 >> 1;
+
+ combs[1]->process(link);
+ combs[2]->process(link);
+ combs[3]->process(link);
+
+ link = combs[2]->getOutputAt(currentSettings.outLPositions[1]);
+ link += link >> 1;
+ link += outL1;
+ link += combs[3]->getOutputAt(currentSettings.outLPositions[2]);
+ *outLeft = weirdMul(link, wetLevel, 0xFF) / 8192.0f;
+
+ outR1 = combs[1]->getOutputAt(currentSettings.outRPositions[0]);
+ outR1 += outR1 >> 1;
+ link = combs[2]->getOutputAt(currentSettings.outRPositions[1]);
+ link += link >> 1;
+ link += outR1;
+ link += combs[3]->getOutputAt(currentSettings.outRPositions[2]);
+ *outRight = weirdMul(link, wetLevel, 0xFF) / 8192.0f;
+ }
+
+ inLeft++;
+ inRight++;
+ outLeft++;
+ outRight++;
+ }
+}
+
+}
+
+#endif
diff --git a/audio/softsynth/mt32/BReverbModel.h b/audio/softsynth/mt32/BReverbModel.h
new file mode 100644
index 0000000000..d6fcb73c13
--- /dev/null
+++ b/audio/softsynth/mt32/BReverbModel.h
@@ -0,0 +1,112 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MT32EMU_B_REVERB_MODEL_H
+#define MT32EMU_B_REVERB_MODEL_H
+
+namespace MT32Emu {
+
+struct BReverbSettings {
+ const Bit32u numberOfAllpasses;
+ const Bit32u * const allpassSizes;
+ const Bit32u numberOfCombs;
+ const Bit32u * const combSizes;
+ const Bit32u * const outLPositions;
+ const Bit32u * const outRPositions;
+ const Bit32u * const filterFactors;
+ const Bit32u * const feedbackFactors;
+ const Bit32u * const dryAmps;
+ const Bit32u * const wetLevels;
+ const Bit32u lpfAmp;
+};
+
+class RingBuffer {
+protected:
+ Bit16s *buffer;
+ const Bit32u size;
+ Bit32u index;
+
+public:
+ RingBuffer(const Bit32u size);
+ virtual ~RingBuffer();
+ Bit32s next();
+ bool isEmpty() const;
+ void mute();
+};
+
+class AllpassFilter : public RingBuffer {
+public:
+ AllpassFilter(const Bit32u size);
+ Bit32s process(const Bit32s in);
+};
+
+class CombFilter : public RingBuffer {
+protected:
+ const Bit32u filterFactor;
+ Bit32u feedbackFactor;
+
+public:
+ CombFilter(const Bit32u size, const Bit32u useFilterFactor);
+ virtual void process(const Bit32s in); // Actually, no need to make it virtual, but for sure
+ Bit32s getOutputAt(const Bit32u outIndex) const;
+ void setFeedbackFactor(const Bit32u useFeedbackFactor);
+};
+
+class DelayWithLowPassFilter : public CombFilter {
+ Bit32u amp;
+
+public:
+ DelayWithLowPassFilter(const Bit32u useSize, const Bit32u useFilterFactor, const Bit32u useAmp);
+ void process(const Bit32s in);
+ void setFeedbackFactor(const Bit32u) {}
+};
+
+class TapDelayCombFilter : public CombFilter {
+ Bit32u outL;
+ Bit32u outR;
+
+public:
+ TapDelayCombFilter(const Bit32u useSize, const Bit32u useFilterFactor);
+ void process(const Bit32s in);
+ Bit32s getLeftOutput() const;
+ Bit32s getRightOutput() const;
+ void setOutputPositions(const Bit32u useOutL, const Bit32u useOutR);
+};
+
+class BReverbModel : public ReverbModel {
+ AllpassFilter **allpasses;
+ CombFilter **combs;
+
+ const BReverbSettings &currentSettings;
+ const bool tapDelayMode;
+ Bit32u dryAmp;
+ Bit32u wetLevel;
+ void mute();
+
+public:
+ BReverbModel(const ReverbMode mode);
+ ~BReverbModel();
+ void open();
+ void close();
+ void setParameters(Bit8u time, Bit8u level);
+ void process(const float *inLeft, const float *inRight, float *outLeft, float *outRight, unsigned long numSamples);
+ bool isActive() const;
+};
+
+}
+
+#endif
diff --git a/audio/softsynth/mt32/DelayReverb.cpp b/audio/softsynth/mt32/DelayReverb.cpp
index 23d25a596e..d80c98acbc 100644
--- a/audio/softsynth/mt32/DelayReverb.cpp
+++ b/audio/softsynth/mt32/DelayReverb.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -22,7 +22,7 @@
namespace MT32Emu {
-// CONFIRMED: The values below are found via analysis of digital samples. Checked with all time and level combinations.
+// CONFIRMED: The values below are found via analysis of digital samples and tracing reverb RAM address / data lines. Checked with all time and level combinations.
// Obviously:
// rightDelay = (leftDelay - 2) * 2 + 2
// echoDelay = rightDelay - 1
@@ -39,14 +39,16 @@ static const Bit32u REVERB_TIMINGS[8][3]= {
{8002, 16002, 16001}
};
-static const float REVERB_FADE[8] = {0.0f, -0.049400051f, -0.08220577f, -0.131861118f, -0.197344907f, -0.262956344f, -0.345162114f, -0.509508615f};
-const float REVERB_FEEDBACK67 = -0.629960524947437f; // = -EXP2F(-2 / 3)
-const float REVERB_FEEDBACK = -0.682034520443118f; // = -EXP2F(-53 / 96)
-const float LPF_VALUE = 0.594603558f; // = EXP2F(-0.75f)
+// Reverb amp is found as dryAmp * wetAmp
+static const Bit32u REVERB_AMP[8] = {0x20*0x18, 0x50*0x18, 0x50*0x28, 0x50*0x40, 0x50*0x60, 0x50*0x80, 0x50*0xA8, 0x50*0xF8};
+static const Bit32u REVERB_FEEDBACK67 = 0x60;
+static const Bit32u REVERB_FEEDBACK = 0x68;
+static const float LPF_VALUE = 0x68 / 256.0f;
+
+static const Bit32u BUFFER_SIZE = 16384;
DelayReverb::DelayReverb() {
buf = NULL;
- sampleRate = 0;
setParameters(0, 0);
}
@@ -54,27 +56,22 @@ DelayReverb::~DelayReverb() {
delete[] buf;
}
-void DelayReverb::open(unsigned int newSampleRate) {
- if (newSampleRate != sampleRate || buf == NULL) {
- sampleRate = newSampleRate;
-
+void DelayReverb::open() {
+ if (buf == NULL) {
delete[] buf;
- // If we ever need a speedup, set bufSize to EXP2F(ceil(log2(bufSize))) and use & instead of % to find buf indexes
- bufSize = 16384 * sampleRate / 32000;
- buf = new float[bufSize];
+ buf = new float[BUFFER_SIZE];
recalcParameters();
// mute buffer
bufIx = 0;
if (buf != NULL) {
- for (unsigned int i = 0; i < bufSize; i++) {
+ for (unsigned int i = 0; i < BUFFER_SIZE; i++) {
buf[i] = 0.0f;
}
}
}
- // FIXME: IIR filter value depends on sample rate as well
}
void DelayReverb::close() {
@@ -91,59 +88,53 @@ void DelayReverb::setParameters(Bit8u newTime, Bit8u newLevel) {
void DelayReverb::recalcParameters() {
// Number of samples between impulse and eventual appearance on the left channel
- delayLeft = REVERB_TIMINGS[time][0] * sampleRate / 32000;
+ delayLeft = REVERB_TIMINGS[time][0];
// Number of samples between impulse and eventual appearance on the right channel
- delayRight = REVERB_TIMINGS[time][1] * sampleRate / 32000;
+ delayRight = REVERB_TIMINGS[time][1];
// Number of samples between a response and that response feeding back/echoing
- delayFeedback = REVERB_TIMINGS[time][2] * sampleRate / 32000;
+ delayFeedback = REVERB_TIMINGS[time][2];
- if (time < 6) {
- feedback = REVERB_FEEDBACK;
+ if (level < 3 || time < 6) {
+ feedback = REVERB_FEEDBACK / 256.0f;
} else {
- feedback = REVERB_FEEDBACK67;
+ feedback = REVERB_FEEDBACK67 / 256.0f;
}
- // Fading speed, i.e. amplitude ratio of neighbor responses
- fade = REVERB_FADE[level];
+ // Overall output amp
+ amp = (level == 0 && time == 0) ? 0.0f : REVERB_AMP[level] / 65536.0f;
}
void DelayReverb::process(const float *inLeft, const float *inRight, float *outLeft, float *outRight, unsigned long numSamples) {
- if (buf == NULL) {
- return;
- }
+ if (buf == NULL) return;
for (unsigned int sampleIx = 0; sampleIx < numSamples; sampleIx++) {
// The ring buffer write index moves backwards; reads are all done with positive offsets.
- Bit32u bufIxPrev = (bufIx + 1) % bufSize;
- Bit32u bufIxLeft = (bufIx + delayLeft) % bufSize;
- Bit32u bufIxRight = (bufIx + delayRight) % bufSize;
- Bit32u bufIxFeedback = (bufIx + delayFeedback) % bufSize;
+ Bit32u bufIxPrev = (bufIx + 1) % BUFFER_SIZE;
+ Bit32u bufIxLeft = (bufIx + delayLeft) % BUFFER_SIZE;
+ Bit32u bufIxRight = (bufIx + delayRight) % BUFFER_SIZE;
+ Bit32u bufIxFeedback = (bufIx + delayFeedback) % BUFFER_SIZE;
// Attenuated input samples and feedback response are directly added to the current ring buffer location
- float sample = fade * (inLeft[sampleIx] + inRight[sampleIx]) + feedback * buf[bufIxFeedback];
+ float lpfIn = amp * (inLeft[sampleIx] + inRight[sampleIx]) + feedback * buf[bufIxFeedback];
// Single-pole IIR filter found on real devices
- buf[bufIx] = buf[bufIxPrev] + (sample - buf[bufIxPrev]) * LPF_VALUE;
+ buf[bufIx] = buf[bufIxPrev] * LPF_VALUE - lpfIn;
outLeft[sampleIx] = buf[bufIxLeft];
outRight[sampleIx] = buf[bufIxRight];
- bufIx = (bufSize + bufIx - 1) % bufSize;
+ bufIx = (BUFFER_SIZE + bufIx - 1) % BUFFER_SIZE;
}
}
bool DelayReverb::isActive() const {
- // Quick hack: Return true iff all samples in the left buffer are the same and
- // all samples in the right buffers are the same (within the sample output threshold).
- if (buf == NULL) {
- return false;
- }
- float last = buf[0] * 8192.0f;
- for (unsigned int i = 1; i < bufSize; i++) {
- float s = (buf[i] * 8192.0f);
- if (fabs(s - last) > 1.0f) {
- return true;
- }
+ if (buf == NULL) return false;
+
+ float *b = buf;
+ float max = 0.001f;
+ for (Bit32u i = 0; i < BUFFER_SIZE; i++) {
+ if ((*b < -max) || (*b > max)) return true;
+ b++;
}
return false;
}
diff --git a/audio/softsynth/mt32/DelayReverb.h b/audio/softsynth/mt32/DelayReverb.h
index 7c030fb839..c8003832b5 100644
--- a/audio/softsynth/mt32/DelayReverb.h
+++ b/audio/softsynth/mt32/DelayReverb.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -25,17 +25,14 @@ private:
Bit8u time;
Bit8u level;
- unsigned int sampleRate;
- Bit32u bufSize;
Bit32u bufIx;
-
float *buf;
Bit32u delayLeft;
Bit32u delayRight;
Bit32u delayFeedback;
- float fade;
+ float amp;
float feedback;
void recalcParameters();
@@ -43,7 +40,7 @@ private:
public:
DelayReverb();
~DelayReverb();
- void open(unsigned int sampleRate);
+ void open();
void close();
void setParameters(Bit8u time, Bit8u level);
void process(const float *inLeft, const float *inRight, float *outLeft, float *outRight, unsigned long numSamples);
diff --git a/audio/softsynth/mt32/FreeverbModel.cpp b/audio/softsynth/mt32/FreeverbModel.cpp
index d9bd17e62e..bd9c70b6f4 100644
--- a/audio/softsynth/mt32/FreeverbModel.cpp
+++ b/audio/softsynth/mt32/FreeverbModel.cpp
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -35,9 +35,7 @@ FreeverbModel::~FreeverbModel() {
delete freeverb;
}
-void FreeverbModel::open(unsigned int /*sampleRate*/) {
- // FIXME: scaleTuning must be multiplied by sample rate to 32000Hz ratio
- // IIR filter values depend on sample rate as well
+void FreeverbModel::open() {
if (freeverb == NULL) {
freeverb = new revmodel(scaleTuning);
}
diff --git a/audio/softsynth/mt32/FreeverbModel.h b/audio/softsynth/mt32/FreeverbModel.h
index 925b2dbf96..5ea11f1f40 100644
--- a/audio/softsynth/mt32/FreeverbModel.h
+++ b/audio/softsynth/mt32/FreeverbModel.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -32,7 +32,7 @@ class FreeverbModel : public ReverbModel {
public:
FreeverbModel(float useScaleTuning, float useFiltVal, float useWet, Bit8u useRoom, float useDamp);
~FreeverbModel();
- void open(unsigned int sampleRate);
+ void open();
void close();
void setParameters(Bit8u time, Bit8u level);
void process(const float *inLeft, const float *inRight, float *outLeft, float *outRight, unsigned long numSamples);
diff --git a/audio/softsynth/mt32/LA32Ramp.cpp b/audio/softsynth/mt32/LA32Ramp.cpp
index 4e4d6b4f30..b4ac6f1d46 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -82,9 +82,13 @@ void LA32Ramp::startRamp(Bit8u target, Bit8u increment) {
if (increment == 0) {
largeIncrement = 0;
} else {
- // Using integer argument here, no precision loss:
+ // Three bits in the fractional part, no need to interpolate
// (unsigned int)(EXP2F(((increment & 0x7F) + 24) / 8.0f) + 0.125f)
- largeIncrement = (unsigned int)(EXP2I(((increment & 0x7F) + 24) << 9) + 0.125f);
+ Bit32u expArg = increment & 0x7F;
+ largeIncrement = 8191 - Tables::getInstance().exp9[~(expArg << 6) & 511];
+ largeIncrement <<= expArg >> 3;
+ largeIncrement += 64;
+ largeIncrement >>= 9;
}
descending = (increment & 0x80) != 0;
if (descending) {
diff --git a/audio/softsynth/mt32/LA32Ramp.h b/audio/softsynth/mt32/LA32Ramp.h
index ae937eb7e1..8f55941a12 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
new file mode 100644
index 0000000000..80650699fb
--- /dev/null
+++ b/audio/softsynth/mt32/LA32WaveGenerator.cpp
@@ -0,0 +1,418 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+//#include <cmath>
+#include "mt32emu.h"
+#include "mmath.h"
+#include "LA32WaveGenerator.h"
+
+#if MT32EMU_ACCURATE_WG == 0
+
+namespace MT32Emu {
+
+static const Bit32u SINE_SEGMENT_RELATIVE_LENGTH = 1 << 18;
+static const Bit32u MIDDLE_CUTOFF_VALUE = 128 << 18;
+static const Bit32u RESONANCE_DECAY_THRESHOLD_CUTOFF_VALUE = 144 << 18;
+static const Bit32u MAX_CUTOFF_VALUE = 240 << 18;
+static const LogSample SILENCE = {65535, LogSample::POSITIVE};
+
+Bit16u LA32Utilites::interpolateExp(const Bit16u fract) {
+ Bit16u expTabIndex = fract >> 3;
+ Bit16u extraBits = ~fract & 7;
+ Bit16u expTabEntry2 = 8191 - Tables::getInstance().exp9[expTabIndex];
+ Bit16u expTabEntry1 = expTabIndex == 0 ? 8191 : (8191 - Tables::getInstance().exp9[expTabIndex - 1]);
+ return expTabEntry2 + (((expTabEntry1 - expTabEntry2) * extraBits) >> 3);
+}
+
+Bit16s LA32Utilites::unlog(const LogSample &logSample) {
+ //Bit16s sample = (Bit16s)EXP2F(13.0f - logSample.logValue / 1024.0f);
+ Bit32u intLogValue = logSample.logValue >> 12;
+ Bit16u fracLogValue = logSample.logValue & 4095;
+ Bit16s sample = interpolateExp(fracLogValue) >> intLogValue;
+ return logSample.sign == LogSample::POSITIVE ? sample : -sample;
+}
+
+void LA32Utilites::addLogSamples(LogSample &logSample1, const LogSample &logSample2) {
+ Bit32u logSampleValue = logSample1.logValue + logSample2.logValue;
+ logSample1.logValue = logSampleValue < 65536 ? (Bit16u)logSampleValue : 65535;
+ logSample1.sign = logSample1.sign == logSample2.sign ? LogSample::POSITIVE : LogSample::NEGATIVE;
+}
+
+Bit32u LA32WaveGenerator::getSampleStep() {
+ // sampleStep = EXP2F(pitch / 4096.0f + 4.0f)
+ Bit32u sampleStep = LA32Utilites::interpolateExp(~pitch & 4095);
+ sampleStep <<= pitch >> 12;
+ sampleStep >>= 8;
+ sampleStep &= ~1;
+ return sampleStep;
+}
+
+Bit32u LA32WaveGenerator::getResonanceWaveLengthFactor(Bit32u effectiveCutoffValue) {
+ // resonanceWaveLengthFactor = (Bit32u)EXP2F(12.0f + effectiveCutoffValue / 4096.0f);
+ Bit32u resonanceWaveLengthFactor = LA32Utilites::interpolateExp(~effectiveCutoffValue & 4095);
+ resonanceWaveLengthFactor <<= effectiveCutoffValue >> 12;
+ return resonanceWaveLengthFactor;
+}
+
+Bit32u LA32WaveGenerator::getHighLinearLength(Bit32u effectiveCutoffValue) {
+ // Ratio of positive segment to wave length
+ Bit32u effectivePulseWidthValue = 0;
+ if (pulseWidth > 128) {
+ effectivePulseWidthValue = (pulseWidth - 128) << 6;
+ }
+
+ Bit32u highLinearLength = 0;
+ // highLinearLength = EXP2F(19.0f - effectivePulseWidthValue / 4096.0f + effectiveCutoffValue / 4096.0f) - 2 * SINE_SEGMENT_RELATIVE_LENGTH;
+ if (effectivePulseWidthValue < effectiveCutoffValue) {
+ Bit32u expArg = effectiveCutoffValue - effectivePulseWidthValue;
+ highLinearLength = LA32Utilites::interpolateExp(~expArg & 4095);
+ highLinearLength <<= 7 + (expArg >> 12);
+ highLinearLength -= 2 * SINE_SEGMENT_RELATIVE_LENGTH;
+ }
+ return highLinearLength;
+}
+
+void LA32WaveGenerator::computePositions(Bit32u highLinearLength, Bit32u lowLinearLength, Bit32u resonanceWaveLengthFactor) {
+ // Assuming 12-bit multiplication used here
+ squareWavePosition = resonanceSinePosition = (wavePosition >> 8) * (resonanceWaveLengthFactor >> 4);
+ if (squareWavePosition < SINE_SEGMENT_RELATIVE_LENGTH) {
+ phase = POSITIVE_RISING_SINE_SEGMENT;
+ return;
+ }
+ squareWavePosition -= SINE_SEGMENT_RELATIVE_LENGTH;
+ if (squareWavePosition < highLinearLength) {
+ phase = POSITIVE_LINEAR_SEGMENT;
+ return;
+ }
+ squareWavePosition -= highLinearLength;
+ if (squareWavePosition < SINE_SEGMENT_RELATIVE_LENGTH) {
+ phase = POSITIVE_FALLING_SINE_SEGMENT;
+ return;
+ }
+ squareWavePosition -= SINE_SEGMENT_RELATIVE_LENGTH;
+ resonanceSinePosition = squareWavePosition;
+ if (squareWavePosition < SINE_SEGMENT_RELATIVE_LENGTH) {
+ phase = NEGATIVE_FALLING_SINE_SEGMENT;
+ return;
+ }
+ squareWavePosition -= SINE_SEGMENT_RELATIVE_LENGTH;
+ if (squareWavePosition < lowLinearLength) {
+ phase = NEGATIVE_LINEAR_SEGMENT;
+ return;
+ }
+ squareWavePosition -= lowLinearLength;
+ phase = NEGATIVE_RISING_SINE_SEGMENT;
+}
+
+void LA32WaveGenerator::advancePosition() {
+ wavePosition += getSampleStep();
+ wavePosition %= 4 * SINE_SEGMENT_RELATIVE_LENGTH;
+
+ Bit32u effectiveCutoffValue = (cutoffVal > MIDDLE_CUTOFF_VALUE) ? (cutoffVal - MIDDLE_CUTOFF_VALUE) >> 10 : 0;
+ Bit32u resonanceWaveLengthFactor = getResonanceWaveLengthFactor(effectiveCutoffValue);
+ Bit32u highLinearLength = getHighLinearLength(effectiveCutoffValue);
+ Bit32u lowLinearLength = (resonanceWaveLengthFactor << 8) - 4 * SINE_SEGMENT_RELATIVE_LENGTH - highLinearLength;
+ computePositions(highLinearLength, lowLinearLength, resonanceWaveLengthFactor);
+
+ // resonancePhase computation hack
+ *(int*)&resonancePhase = ((resonanceSinePosition >> 18) + (phase > POSITIVE_FALLING_SINE_SEGMENT ? 2 : 0)) & 3;
+}
+
+void LA32WaveGenerator::generateNextSquareWaveLogSample() {
+ Bit32u logSampleValue;
+ switch (phase) {
+ case POSITIVE_RISING_SINE_SEGMENT:
+ case NEGATIVE_FALLING_SINE_SEGMENT:
+ logSampleValue = Tables::getInstance().logsin9[(squareWavePosition >> 9) & 511];
+ break;
+ case POSITIVE_FALLING_SINE_SEGMENT:
+ case NEGATIVE_RISING_SINE_SEGMENT:
+ logSampleValue = Tables::getInstance().logsin9[~(squareWavePosition >> 9) & 511];
+ break;
+ case POSITIVE_LINEAR_SEGMENT:
+ case NEGATIVE_LINEAR_SEGMENT:
+ default:
+ logSampleValue = 0;
+ break;
+ }
+ logSampleValue <<= 2;
+ logSampleValue += amp >> 10;
+ if (cutoffVal < MIDDLE_CUTOFF_VALUE) {
+ logSampleValue += (MIDDLE_CUTOFF_VALUE - cutoffVal) >> 9;
+ }
+
+ squareLogSample.logValue = logSampleValue < 65536 ? (Bit16u)logSampleValue : 65535;
+ squareLogSample.sign = phase < NEGATIVE_FALLING_SINE_SEGMENT ? LogSample::POSITIVE : LogSample::NEGATIVE;
+}
+
+void LA32WaveGenerator::generateNextResonanceWaveLogSample() {
+ Bit32u logSampleValue;
+ if (resonancePhase == POSITIVE_FALLING_RESONANCE_SINE_SEGMENT || resonancePhase == NEGATIVE_RISING_RESONANCE_SINE_SEGMENT) {
+ logSampleValue = Tables::getInstance().logsin9[~(resonanceSinePosition >> 9) & 511];
+ } else {
+ logSampleValue = Tables::getInstance().logsin9[(resonanceSinePosition >> 9) & 511];
+ }
+ logSampleValue <<= 2;
+ logSampleValue += amp >> 10;
+
+ // From the digital captures, the decaying speed of the resonance sine is found a bit different for the positive and the negative segments
+ Bit32u decayFactor = phase < NEGATIVE_FALLING_SINE_SEGMENT ? resAmpDecayFactor : resAmpDecayFactor + 1;
+ // Unsure about resonanceSinePosition here. It's possible that dedicated counter & decrement are used. Although, cutoff is finely ramped, so maybe not.
+ logSampleValue += resonanceAmpSubtraction + (((resonanceSinePosition >> 4) * decayFactor) >> 8);
+
+ // To ensure the output wave has no breaks, two different windows are appied to the beginning and the ending of the resonance sine segment
+ if (phase == POSITIVE_RISING_SINE_SEGMENT || phase == NEGATIVE_FALLING_SINE_SEGMENT) {
+ // The window is synchronous sine here
+ logSampleValue += Tables::getInstance().logsin9[(squareWavePosition >> 9) & 511] << 2;
+ } else if (phase == POSITIVE_FALLING_SINE_SEGMENT || phase == NEGATIVE_RISING_SINE_SEGMENT) {
+ // The window is synchronous square sine here
+ logSampleValue += Tables::getInstance().logsin9[~(squareWavePosition >> 9) & 511] << 3;
+ }
+
+ if (cutoffVal < MIDDLE_CUTOFF_VALUE) {
+ // For the cutoff values below the cutoff middle point, it seems the amp of the resonance wave is expotentially decayed
+ logSampleValue += 31743 + ((MIDDLE_CUTOFF_VALUE - cutoffVal) >> 9);
+ } else if (cutoffVal < RESONANCE_DECAY_THRESHOLD_CUTOFF_VALUE) {
+ // For the cutoff values below this point, the amp of the resonance wave is sinusoidally decayed
+ Bit32u sineIx = (cutoffVal - MIDDLE_CUTOFF_VALUE) >> 13;
+ logSampleValue += Tables::getInstance().logsin9[sineIx] << 2;
+ }
+
+ // After all the amp decrements are added, it should be safe now to adjust the amp of the resonance wave to what we see on captures
+ logSampleValue -= 1 << 12;
+
+ resonanceLogSample.logValue = logSampleValue < 65536 ? (Bit16u)logSampleValue : 65535;
+ resonanceLogSample.sign = resonancePhase < NEGATIVE_FALLING_RESONANCE_SINE_SEGMENT ? LogSample::POSITIVE : LogSample::NEGATIVE;
+}
+
+void LA32WaveGenerator::generateNextSawtoothCosineLogSample(LogSample &logSample) const {
+ Bit32u sawtoothCosinePosition = wavePosition + (1 << 18);
+ if ((sawtoothCosinePosition & (1 << 18)) > 0) {
+ logSample.logValue = Tables::getInstance().logsin9[~(sawtoothCosinePosition >> 9) & 511];
+ } else {
+ logSample.logValue = Tables::getInstance().logsin9[(sawtoothCosinePosition >> 9) & 511];
+ }
+ logSample.logValue <<= 2;
+ logSample.sign = ((sawtoothCosinePosition & (1 << 19)) == 0) ? LogSample::POSITIVE : LogSample::NEGATIVE;
+}
+
+void LA32WaveGenerator::pcmSampleToLogSample(LogSample &logSample, const Bit16s pcmSample) const {
+ Bit32u logSampleValue = (32787 - (pcmSample & 32767)) << 1;
+ logSampleValue += amp >> 10;
+ logSample.logValue = logSampleValue < 65536 ? (Bit16u)logSampleValue : 65535;
+ logSample.sign = pcmSample < 0 ? LogSample::NEGATIVE : LogSample::POSITIVE;
+}
+
+void LA32WaveGenerator::generateNextPCMWaveLogSamples() {
+ // This should emulate the ladder we see in the PCM captures for pitches 01, 02, 07, etc.
+ // The most probable cause is the factor in the interpolation formula is one bit less
+ // accurate than the sample position counter
+ pcmInterpolationFactor = (wavePosition & 255) >> 1;
+ Bit32u pcmWaveTableIx = wavePosition >> 8;
+ pcmSampleToLogSample(firstPCMLogSample, pcmWaveAddress[pcmWaveTableIx]);
+ if (pcmWaveInterpolated) {
+ pcmWaveTableIx++;
+ if (pcmWaveTableIx < pcmWaveLength) {
+ pcmSampleToLogSample(secondPCMLogSample, pcmWaveAddress[pcmWaveTableIx]);
+ } else {
+ if (pcmWaveLooped) {
+ pcmWaveTableIx -= pcmWaveLength;
+ pcmSampleToLogSample(secondPCMLogSample, pcmWaveAddress[pcmWaveTableIx]);
+ } else {
+ secondPCMLogSample = SILENCE;
+ }
+ }
+ } else {
+ secondPCMLogSample = SILENCE;
+ }
+ // pcmSampleStep = (Bit32u)EXP2F(pitch / 4096.0f + 3.0f);
+ Bit32u pcmSampleStep = LA32Utilites::interpolateExp(~pitch & 4095);
+ pcmSampleStep <<= pitch >> 12;
+ // Seeing the actual lengths of the PCM wave for pitches 00..12,
+ // the pcmPosition counter can be assumed to have 8-bit fractions
+ pcmSampleStep >>= 9;
+ wavePosition += pcmSampleStep;
+ if (wavePosition >= (pcmWaveLength << 8)) {
+ if (pcmWaveLooped) {
+ wavePosition -= pcmWaveLength << 8;
+ } else {
+ deactivate();
+ }
+ }
+}
+
+void LA32WaveGenerator::initSynth(const bool useSawtoothWaveform, const Bit8u usePulseWidth, const Bit8u useResonance) {
+ sawtoothWaveform = useSawtoothWaveform;
+ pulseWidth = usePulseWidth;
+ resonance = useResonance;
+
+ wavePosition = 0;
+
+ squareWavePosition = 0;
+ phase = POSITIVE_RISING_SINE_SEGMENT;
+
+ resonanceSinePosition = 0;
+ resonancePhase = POSITIVE_RISING_RESONANCE_SINE_SEGMENT;
+ resonanceAmpSubtraction = (32 - resonance) << 10;
+ resAmpDecayFactor = Tables::getInstance().resAmpDecayFactor[resonance >> 2] << 2;
+
+ pcmWaveAddress = NULL;
+ active = true;
+}
+
+void LA32WaveGenerator::initPCM(const Bit16s * const usePCMWaveAddress, const Bit32u usePCMWaveLength, const bool usePCMWaveLooped, const bool usePCMWaveInterpolated) {
+ pcmWaveAddress = usePCMWaveAddress;
+ pcmWaveLength = usePCMWaveLength;
+ pcmWaveLooped = usePCMWaveLooped;
+ pcmWaveInterpolated = usePCMWaveInterpolated;
+
+ wavePosition = 0;
+ active = true;
+}
+
+void LA32WaveGenerator::generateNextSample(const Bit32u useAmp, const Bit16u usePitch, const Bit32u useCutoffVal) {
+ if (!active) {
+ return;
+ }
+
+ amp = useAmp;
+ pitch = usePitch;
+
+ if (isPCMWave()) {
+ generateNextPCMWaveLogSamples();
+ return;
+ }
+
+ // The 240 cutoffVal limit was determined via sample analysis (internal Munt capture IDs: glop3, glop4).
+ // More research is needed to be sure that this is correct, however.
+ cutoffVal = (useCutoffVal > MAX_CUTOFF_VALUE) ? MAX_CUTOFF_VALUE : useCutoffVal;
+
+ generateNextSquareWaveLogSample();
+ generateNextResonanceWaveLogSample();
+ if (sawtoothWaveform) {
+ LogSample cosineLogSample;
+ generateNextSawtoothCosineLogSample(cosineLogSample);
+ LA32Utilites::addLogSamples(squareLogSample, cosineLogSample);
+ LA32Utilites::addLogSamples(resonanceLogSample, cosineLogSample);
+ }
+ advancePosition();
+}
+
+LogSample LA32WaveGenerator::getOutputLogSample(const bool first) const {
+ if (!isActive()) {
+ return SILENCE;
+ }
+ if (isPCMWave()) {
+ return first ? firstPCMLogSample : secondPCMLogSample;
+ }
+ return first ? squareLogSample : resonanceLogSample;
+}
+
+void LA32WaveGenerator::deactivate() {
+ active = false;
+}
+
+bool LA32WaveGenerator::isActive() const {
+ return active;
+}
+
+bool LA32WaveGenerator::isPCMWave() const {
+ return pcmWaveAddress != NULL;
+}
+
+Bit32u LA32WaveGenerator::getPCMInterpolationFactor() const {
+ return pcmInterpolationFactor;
+}
+
+void LA32PartialPair::init(const bool useRingModulated, const bool useMixed) {
+ ringModulated = useRingModulated;
+ mixed = useMixed;
+}
+
+void LA32PartialPair::initSynth(const PairType useMaster, const bool sawtoothWaveform, const Bit8u pulseWidth, const Bit8u resonance) {
+ if (useMaster == MASTER) {
+ master.initSynth(sawtoothWaveform, pulseWidth, resonance);
+ } else {
+ slave.initSynth(sawtoothWaveform, pulseWidth, resonance);
+ }
+}
+
+void LA32PartialPair::initPCM(const PairType useMaster, const Bit16s *pcmWaveAddress, const Bit32u pcmWaveLength, const bool pcmWaveLooped) {
+ if (useMaster == MASTER) {
+ master.initPCM(pcmWaveAddress, pcmWaveLength, pcmWaveLooped, true);
+ } else {
+ slave.initPCM(pcmWaveAddress, pcmWaveLength, pcmWaveLooped, !ringModulated);
+ }
+}
+
+void LA32PartialPair::generateNextSample(const PairType useMaster, const Bit32u amp, const Bit16u pitch, const Bit32u cutoff) {
+ if (useMaster == MASTER) {
+ master.generateNextSample(amp, pitch, cutoff);
+ } else {
+ slave.generateNextSample(amp, pitch, cutoff);
+ }
+}
+
+Bit16s LA32PartialPair::unlogAndMixWGOutput(const LA32WaveGenerator &wg, const LogSample * const ringModulatingLogSample) {
+ if (!wg.isActive() || ((ringModulatingLogSample != NULL) && (ringModulatingLogSample->logValue == SILENCE.logValue))) {
+ return 0;
+ }
+ LogSample firstLogSample = wg.getOutputLogSample(true);
+ LogSample secondLogSample = wg.getOutputLogSample(false);
+ if (ringModulatingLogSample != NULL) {
+ LA32Utilites::addLogSamples(firstLogSample, *ringModulatingLogSample);
+ LA32Utilites::addLogSamples(secondLogSample, *ringModulatingLogSample);
+ }
+ Bit16s firstSample = LA32Utilites::unlog(firstLogSample);
+ Bit16s secondSample = LA32Utilites::unlog(secondLogSample);
+ if (wg.isPCMWave()) {
+ return Bit16s(firstSample + ((Bit32s(secondSample - firstSample) * wg.getPCMInterpolationFactor()) >> 7));
+ }
+ return firstSample + secondSample;
+}
+
+Bit16s LA32PartialPair::nextOutSample() {
+ if (ringModulated) {
+ LogSample slaveFirstLogSample = slave.getOutputLogSample(true);
+ LogSample slaveSecondLogSample = slave.getOutputLogSample(false);
+ Bit16s sample = unlogAndMixWGOutput(master, &slaveFirstLogSample);
+ if (!slave.isPCMWave()) {
+ sample += unlogAndMixWGOutput(master, &slaveSecondLogSample);
+ }
+ if (mixed) {
+ sample += unlogAndMixWGOutput(master, NULL);
+ }
+ return sample;
+ }
+ return unlogAndMixWGOutput(master, NULL) + unlogAndMixWGOutput(slave, NULL);
+}
+
+void LA32PartialPair::deactivate(const PairType useMaster) {
+ if (useMaster == MASTER) {
+ master.deactivate();
+ } else {
+ slave.deactivate();
+ }
+}
+
+bool LA32PartialPair::isActive(const PairType useMaster) const {
+ return useMaster == MASTER ? master.isActive() : slave.isActive();
+}
+
+}
+
+#endif // #if MT32EMU_ACCURATE_WG == 0
diff --git a/audio/softsynth/mt32/LA32WaveGenerator.h b/audio/softsynth/mt32/LA32WaveGenerator.h
new file mode 100644
index 0000000000..37a4aead85
--- /dev/null
+++ b/audio/softsynth/mt32/LA32WaveGenerator.h
@@ -0,0 +1,246 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#if MT32EMU_ACCURATE_WG == 0
+
+#ifndef MT32EMU_LA32_WAVE_GENERATOR_H
+#define MT32EMU_LA32_WAVE_GENERATOR_H
+
+namespace MT32Emu {
+
+/**
+ * LA32 performs wave generation in the log-space that allows replacing multiplications by cheap additions
+ * It's assumed that only low-bit multiplications occur in a few places which are unavoidable like these:
+ * - interpolation of exponent table (obvious, a delta value has 4 bits)
+ * - computation of resonance amp decay envelope (the table contains values with 1-2 "1" bits except the very first value 31 but this case can be found using inversion)
+ * - interpolation of PCM samples (obvious, the wave position counter is in the linear space, there is no log() table in the chip)
+ * and it seems to be implemented in the same way as in the Boss chip, i.e. right shifted additions which involved noticeable precision loss
+ * Subtraction is supposed to be replaced by simple inversion
+ * As the logarithmic sine is always negative, all the logarithmic values are treated as decrements
+ */
+struct LogSample {
+ // 16-bit fixed point value, includes 12-bit fractional part
+ // 4-bit integer part allows to present any 16-bit sample in the log-space
+ // Obviously, the log value doesn't contain the sign of the resulting sample
+ Bit16u logValue;
+ enum {
+ POSITIVE,
+ NEGATIVE
+ } sign;
+};
+
+class LA32Utilites {
+public:
+ static Bit16u interpolateExp(const Bit16u fract);
+ static Bit16s unlog(const LogSample &logSample);
+ static void addLogSamples(LogSample &logSample1, const LogSample &logSample2);
+};
+
+/**
+ * LA32WaveGenerator is aimed to represent the exact model of LA32 wave generator.
+ * The output square wave is created by adding high / low linear segments in-between
+ * the rising and falling cosine segments. Basically, it’s very similar to the phase distortion synthesis.
+ * Behaviour of a true resonance filter is emulated by adding decaying sine wave.
+ * The beginning and the ending of the resonant sine is multiplied by a cosine window.
+ * To synthesise sawtooth waves, the resulting square wave is multiplied by synchronous cosine wave.
+ */
+class LA32WaveGenerator {
+ //***************************************************************************
+ // The local copy of partial parameters below
+ //***************************************************************************
+
+ bool active;
+
+ // True means the resulting square wave is to be multiplied by the synchronous cosine
+ bool sawtoothWaveform;
+
+ // Logarithmic amp of the wave generator
+ Bit32u amp;
+
+ // Logarithmic frequency of the resulting wave
+ Bit16u pitch;
+
+ // Values in range [1..31]
+ // Value 1 correspong to the minimum resonance
+ Bit8u resonance;
+
+ // Processed value in range [0..255]
+ // Values in range [0..128] have no effect and the resulting wave remains symmetrical
+ // Value 255 corresponds to the maximum possible asymmetric of the resulting wave
+ Bit8u pulseWidth;
+
+ // Composed of the base cutoff in range [78..178] left-shifted by 18 bits and the TVF modifier
+ Bit32u cutoffVal;
+
+ // Logarithmic PCM sample start address
+ const Bit16s *pcmWaveAddress;
+
+ // Logarithmic PCM sample length
+ Bit32u pcmWaveLength;
+
+ // true for looped logarithmic PCM samples
+ bool pcmWaveLooped;
+
+ // false for slave PCM partials in the structures with the ring modulation
+ bool pcmWaveInterpolated;
+
+ //***************************************************************************
+ // Internal variables below
+ //***************************************************************************
+
+ // Relative position within either the synth wave or the PCM sampled wave
+ // 0 - start of the positive rising sine segment of the square wave or start of the PCM sample
+ // 1048576 (2^20) - end of the negative rising sine segment of the square wave
+ // For PCM waves, the address of the currently playing sample equals (wavePosition / 256)
+ Bit32u wavePosition;
+
+ // Relative position within a square wave phase:
+ // 0 - start of the phase
+ // 262144 (2^18) - end of a sine phase in the square wave
+ Bit32u squareWavePosition;
+
+ // Relative position within the positive or negative wave segment:
+ // 0 - start of the corresponding positive or negative segment of the square wave
+ // 262144 (2^18) - corresponds to end of the first sine phase in the square wave
+ // The same increment sampleStep is used to indicate the current position
+ // since the length of the resonance wave is always equal to four square wave sine segments.
+ Bit32u resonanceSinePosition;
+
+ // The amp of the resonance sine wave grows with the resonance value
+ // As the resonance value cannot change while the partial is active, it is initialised once
+ Bit32u resonanceAmpSubtraction;
+
+ // The decay speed of resonance sine wave, depends on the resonance value
+ Bit32u resAmpDecayFactor;
+
+ // Fractional part of the pcmPosition
+ Bit32u pcmInterpolationFactor;
+
+ // Current phase of the square wave
+ enum {
+ POSITIVE_RISING_SINE_SEGMENT,
+ POSITIVE_LINEAR_SEGMENT,
+ POSITIVE_FALLING_SINE_SEGMENT,
+ NEGATIVE_FALLING_SINE_SEGMENT,
+ NEGATIVE_LINEAR_SEGMENT,
+ NEGATIVE_RISING_SINE_SEGMENT
+ } phase;
+
+ // Current phase of the resonance wave
+ enum {
+ POSITIVE_RISING_RESONANCE_SINE_SEGMENT,
+ POSITIVE_FALLING_RESONANCE_SINE_SEGMENT,
+ NEGATIVE_FALLING_RESONANCE_SINE_SEGMENT,
+ NEGATIVE_RISING_RESONANCE_SINE_SEGMENT
+ } resonancePhase;
+
+ // Resulting log-space samples of the square and resonance waves
+ LogSample squareLogSample;
+ LogSample resonanceLogSample;
+
+ // Processed neighbour log-space samples of the PCM wave
+ LogSample firstPCMLogSample;
+ LogSample secondPCMLogSample;
+
+ //***************************************************************************
+ // Internal methods below
+ //***************************************************************************
+
+ Bit32u getSampleStep();
+ Bit32u getResonanceWaveLengthFactor(Bit32u effectiveCutoffValue);
+ Bit32u getHighLinearLength(Bit32u effectiveCutoffValue);
+
+ void computePositions(Bit32u highLinearLength, Bit32u lowLinearLength, Bit32u resonanceWaveLengthFactor);
+ void advancePosition();
+
+ void generateNextSquareWaveLogSample();
+ void generateNextResonanceWaveLogSample();
+ void generateNextSawtoothCosineLogSample(LogSample &logSample) const;
+
+ void pcmSampleToLogSample(LogSample &logSample, const Bit16s pcmSample) const;
+ void generateNextPCMWaveLogSamples();
+
+public:
+ // Initialise the WG engine for generation of synth partial samples and set up the invariant parameters
+ void initSynth(const bool sawtoothWaveform, const Bit8u pulseWidth, const Bit8u resonance);
+
+ // Initialise the WG engine for generation of PCM partial samples and set up the invariant parameters
+ void initPCM(const Bit16s * const pcmWaveAddress, const Bit32u pcmWaveLength, const bool pcmWaveLooped, const bool pcmWaveInterpolated);
+
+ // Update parameters with respect to TVP, TVA and TVF, and generate next sample
+ void generateNextSample(const Bit32u amp, const Bit16u pitch, const Bit32u cutoff);
+
+ // WG output in the log-space consists of two components which are to be added (or ring modulated) in the linear-space afterwards
+ LogSample getOutputLogSample(const bool first) const;
+
+ // Deactivate the WG engine
+ void deactivate();
+
+ // Return active state of the WG engine
+ bool isActive() const;
+
+ // Return true if the WG engine generates PCM wave samples
+ bool isPCMWave() const;
+
+ // Return current PCM interpolation factor
+ Bit32u getPCMInterpolationFactor() const;
+};
+
+// LA32PartialPair contains a structure of two partials being mixed / ring modulated
+class LA32PartialPair {
+ LA32WaveGenerator master;
+ LA32WaveGenerator slave;
+ bool ringModulated;
+ bool mixed;
+
+ static Bit16s unlogAndMixWGOutput(const LA32WaveGenerator &wg, const LogSample * const ringModulatingLogSample);
+
+public:
+ enum PairType {
+ MASTER,
+ SLAVE
+ };
+
+ // ringModulated should be set to false for the structures with mixing or stereo output
+ // ringModulated should be set to true for the structures with ring modulation
+ // mixed is used for the structures with ring modulation and indicates whether the master partial output is mixed to the ring modulator output
+ void init(const bool ringModulated, const bool mixed);
+
+ // Initialise the WG engine for generation of synth partial samples and set up the invariant parameters
+ void initSynth(const PairType master, const bool sawtoothWaveform, const Bit8u pulseWidth, const Bit8u resonance);
+
+ // Initialise the WG engine for generation of PCM partial samples and set up the invariant parameters
+ void initPCM(const PairType master, const Bit16s * const pcmWaveAddress, const Bit32u pcmWaveLength, const bool pcmWaveLooped);
+
+ // Update parameters with respect to TVP, TVA and TVF, and generate next sample
+ void generateNextSample(const PairType master, const Bit32u amp, const Bit16u pitch, const Bit32u cutoff);
+
+ // Perform mixing / ring modulation and return the result
+ Bit16s nextOutSample();
+
+ // Deactivate the WG engine
+ void deactivate(const PairType master);
+
+ // Return active state of the WG engine
+ bool isActive(const PairType master) const;
+};
+
+} // namespace MT32Emu
+
+#endif // #ifndef MT32EMU_LA32_WAVE_GENERATOR_H
+
+#endif // #if MT32EMU_ACCURATE_WG == 0
diff --git a/audio/softsynth/mt32/LegacyWaveGenerator.cpp b/audio/softsynth/mt32/LegacyWaveGenerator.cpp
new file mode 100644
index 0000000000..35ca975018
--- /dev/null
+++ b/audio/softsynth/mt32/LegacyWaveGenerator.cpp
@@ -0,0 +1,347 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+//#include <cmath>
+#include "mt32emu.h"
+#include "mmath.h"
+#include "LegacyWaveGenerator.h"
+
+#if MT32EMU_ACCURATE_WG == 1
+
+namespace MT32Emu {
+
+static const float MIDDLE_CUTOFF_VALUE = 128.0f;
+static const float RESONANCE_DECAY_THRESHOLD_CUTOFF_VALUE = 144.0f;
+static const float MAX_CUTOFF_VALUE = 240.0f;
+
+float LA32WaveGenerator::getPCMSample(unsigned int position) {
+ if (position >= pcmWaveLength) {
+ if (!pcmWaveLooped) {
+ return 0;
+ }
+ position = position % pcmWaveLength;
+ }
+ Bit16s pcmSample = pcmWaveAddress[position];
+ float sampleValue = EXP2F(((pcmSample & 32767) - 32787.0f) / 2048.0f);
+ return ((pcmSample & 32768) == 0) ? sampleValue : -sampleValue;
+}
+
+void LA32WaveGenerator::initSynth(const bool sawtoothWaveform, const Bit8u pulseWidth, const Bit8u resonance) {
+ this->sawtoothWaveform = sawtoothWaveform;
+ this->pulseWidth = pulseWidth;
+ this->resonance = resonance;
+
+ wavePos = 0.0f;
+ lastFreq = 0.0f;
+
+ pcmWaveAddress = NULL;
+ active = true;
+}
+
+void LA32WaveGenerator::initPCM(const Bit16s * const pcmWaveAddress, const Bit32u pcmWaveLength, const bool pcmWaveLooped, const bool pcmWaveInterpolated) {
+ this->pcmWaveAddress = pcmWaveAddress;
+ this->pcmWaveLength = pcmWaveLength;
+ this->pcmWaveLooped = pcmWaveLooped;
+ this->pcmWaveInterpolated = pcmWaveInterpolated;
+
+ pcmPosition = 0.0f;
+ active = true;
+}
+
+float LA32WaveGenerator::generateNextSample(const Bit32u ampVal, const Bit16u pitch, const Bit32u cutoffRampVal) {
+ if (!active) {
+ return 0.0f;
+ }
+
+ this->amp = amp;
+ this->pitch = pitch;
+
+ float sample = 0.0f;
+
+ // SEMI-CONFIRMED: From sample analysis:
+ // (1) Tested with a single partial playing PCM wave 77 with pitchCoarse 36 and no keyfollow, velocity follow, etc.
+ // This gives results within +/- 2 at the output (before any DAC bitshifting)
+ // when sustaining at levels 156 - 255 with no modifiers.
+ // (2) Tested with a special square wave partial (internal capture ID tva5) at TVA envelope levels 155-255.
+ // This gives deltas between -1 and 0 compared to the real output. Note that this special partial only produces
+ // positive amps, so negative still needs to be explored, as well as lower levels.
+ //
+ // Also still partially unconfirmed is the behaviour when ramping between levels, as well as the timing.
+
+ float amp = EXP2F(ampVal / -1024.0f / 4096.0f);
+ float freq = EXP2F(pitch / 4096.0f - 16.0f) * SAMPLE_RATE;
+
+ if (isPCMWave()) {
+ // Render PCM waveform
+ int len = pcmWaveLength;
+ int intPCMPosition = (int)pcmPosition;
+ if (intPCMPosition >= len && !pcmWaveLooped) {
+ // We're now past the end of a non-looping PCM waveform so it's time to die.
+ deactivate();
+ return 0.0f;
+ }
+ float positionDelta = freq * 2048.0f / SAMPLE_RATE;
+
+ // Linear interpolation
+ float firstSample = getPCMSample(intPCMPosition);
+ // We observe that for partial structures with ring modulation the interpolation is not applied to the slave PCM partial.
+ // It's assumed that the multiplication circuitry intended to perform the interpolation on the slave PCM partial
+ // is borrowed by the ring modulation circuit (or the LA32 chip has a similar lack of resources assigned to each partial pair).
+ if (pcmWaveInterpolated) {
+ sample = firstSample + (getPCMSample(intPCMPosition + 1) - firstSample) * (pcmPosition - intPCMPosition);
+ } else {
+ sample = firstSample;
+ }
+
+ float newPCMPosition = pcmPosition + positionDelta;
+ if (pcmWaveLooped) {
+ newPCMPosition = fmod(newPCMPosition, (float)pcmWaveLength);
+ }
+ pcmPosition = newPCMPosition;
+ } else {
+ // Render synthesised waveform
+ wavePos *= lastFreq / freq;
+ lastFreq = freq;
+
+ float resAmp = EXP2F(1.0f - (32 - resonance) / 4.0f);
+ {
+ //static const float resAmpFactor = EXP2F(-7);
+ //resAmp = EXP2I(resonance << 10) * resAmpFactor;
+ }
+
+ // The cutoffModifier may not be supposed to be directly added to the cutoff -
+ // it may for example need to be multiplied in some way.
+ // The 240 cutoffVal limit was determined via sample analysis (internal Munt capture IDs: glop3, glop4).
+ // More research is needed to be sure that this is correct, however.
+ float cutoffVal = cutoffRampVal / 262144.0f;
+ if (cutoffVal > MAX_CUTOFF_VALUE) {
+ cutoffVal = MAX_CUTOFF_VALUE;
+ }
+
+ // Wave length in samples
+ float waveLen = SAMPLE_RATE / freq;
+
+ // Init cosineLen
+ float cosineLen = 0.5f * waveLen;
+ if (cutoffVal > MIDDLE_CUTOFF_VALUE) {
+ cosineLen *= EXP2F((cutoffVal - MIDDLE_CUTOFF_VALUE) / -16.0f); // found from sample analysis
+ }
+
+ // Start playing in center of first cosine segment
+ // relWavePos is shifted by a half of cosineLen
+ float relWavePos = wavePos + 0.5f * cosineLen;
+ if (relWavePos > waveLen) {
+ relWavePos -= waveLen;
+ }
+
+ // Ratio of positive segment to wave length
+ float pulseLen = 0.5f;
+ if (pulseWidth > 128) {
+ pulseLen = EXP2F((64 - pulseWidth) / 64.0f);
+ //static const float pulseLenFactor = EXP2F(-192 / 64);
+ //pulseLen = EXP2I((256 - pulseWidthVal) << 6) * pulseLenFactor;
+ }
+ pulseLen *= waveLen;
+
+ float hLen = pulseLen - cosineLen;
+
+ // Ignore pulsewidths too high for given freq
+ if (hLen < 0.0f) {
+ hLen = 0.0f;
+ }
+
+ // Ignore pulsewidths too high for given freq and cutoff
+ float lLen = waveLen - hLen - 2 * cosineLen;
+ if (lLen < 0.0f) {
+ lLen = 0.0f;
+ }
+
+ // Correct resAmp for cutoff in range 50..66
+ if ((cutoffVal >= 128.0f) && (cutoffVal < 144.0f)) {
+ resAmp *= sin(FLOAT_PI * (cutoffVal - 128.0f) / 32.0f);
+ }
+
+ // Produce filtered square wave with 2 cosine waves on slopes
+
+ // 1st cosine segment
+ if (relWavePos < cosineLen) {
+ sample = -cos(FLOAT_PI * relWavePos / cosineLen);
+ } else
+
+ // high linear segment
+ if (relWavePos < (cosineLen + hLen)) {
+ sample = 1.f;
+ } else
+
+ // 2nd cosine segment
+ if (relWavePos < (2 * cosineLen + hLen)) {
+ sample = cos(FLOAT_PI * (relWavePos - (cosineLen + hLen)) / cosineLen);
+ } else {
+
+ // low linear segment
+ sample = -1.f;
+ }
+
+ if (cutoffVal < 128.0f) {
+
+ // Attenuate samples below cutoff 50
+ // Found by sample analysis
+ sample *= EXP2F(-0.125f * (128.0f - cutoffVal));
+ } else {
+
+ // Add resonance sine. Effective for cutoff > 50 only
+ float resSample = 1.0f;
+
+ // Resonance decay speed factor
+ float resAmpDecayFactor = Tables::getInstance().resAmpDecayFactor[resonance >> 2];
+
+ // Now relWavePos counts from the middle of first cosine
+ relWavePos = wavePos;
+
+ // negative segments
+ if (!(relWavePos < (cosineLen + hLen))) {
+ resSample = -resSample;
+ relWavePos -= cosineLen + hLen;
+
+ // From the digital captures, the decaying speed of the resonance sine is found a bit different for the positive and the negative segments
+ resAmpDecayFactor += 0.25f;
+ }
+
+ // Resonance sine WG
+ resSample *= sin(FLOAT_PI * relWavePos / cosineLen);
+
+ // Resonance sine amp
+ float resAmpFadeLog2 = -0.125f * resAmpDecayFactor * (relWavePos / cosineLen); // seems to be exact
+ float resAmpFade = EXP2F(resAmpFadeLog2);
+
+ // Now relWavePos set negative to the left from center of any cosine
+ relWavePos = wavePos;
+
+ // negative segment
+ if (!(wavePos < (waveLen - 0.5f * cosineLen))) {
+ relWavePos -= waveLen;
+ } else
+
+ // positive segment
+ if (!(wavePos < (hLen + 0.5f * cosineLen))) {
+ relWavePos -= cosineLen + hLen;
+ }
+
+ // To ensure the output wave has no breaks, two different windows are appied to the beginning and the ending of the resonance sine segment
+ if (relWavePos < 0.5f * cosineLen) {
+ float syncSine = sin(FLOAT_PI * relWavePos / cosineLen);
+ if (relWavePos < 0.0f) {
+ // The window is synchronous square sine here
+ resAmpFade *= syncSine * syncSine;
+ } else {
+ // The window is synchronous sine here
+ resAmpFade *= syncSine;
+ }
+ }
+
+ sample += resSample * resAmp * resAmpFade;
+ }
+
+ // sawtooth waves
+ if (sawtoothWaveform) {
+ sample *= cos(FLOAT_2PI * wavePos / waveLen);
+ }
+
+ wavePos++;
+
+ // wavePos isn't supposed to be > waveLen
+ if (wavePos > waveLen) {
+ wavePos -= waveLen;
+ }
+ }
+
+ // Multiply sample with current TVA value
+ sample *= amp;
+ return sample;
+}
+
+void LA32WaveGenerator::deactivate() {
+ active = false;
+}
+
+bool LA32WaveGenerator::isActive() const {
+ return active;
+}
+
+bool LA32WaveGenerator::isPCMWave() const {
+ return pcmWaveAddress != NULL;
+}
+
+void LA32PartialPair::init(const bool ringModulated, const bool mixed) {
+ this->ringModulated = ringModulated;
+ this->mixed = mixed;
+ masterOutputSample = 0.0f;
+ slaveOutputSample = 0.0f;
+}
+
+void LA32PartialPair::initSynth(const PairType useMaster, const bool sawtoothWaveform, const Bit8u pulseWidth, const Bit8u resonance) {
+ if (useMaster == MASTER) {
+ master.initSynth(sawtoothWaveform, pulseWidth, resonance);
+ } else {
+ slave.initSynth(sawtoothWaveform, pulseWidth, resonance);
+ }
+}
+
+void LA32PartialPair::initPCM(const PairType useMaster, const Bit16s *pcmWaveAddress, const Bit32u pcmWaveLength, const bool pcmWaveLooped) {
+ if (useMaster == MASTER) {
+ master.initPCM(pcmWaveAddress, pcmWaveLength, pcmWaveLooped, true);
+ } else {
+ slave.initPCM(pcmWaveAddress, pcmWaveLength, pcmWaveLooped, !ringModulated);
+ }
+}
+
+void LA32PartialPair::generateNextSample(const PairType useMaster, const Bit32u amp, const Bit16u pitch, const Bit32u cutoff) {
+ if (useMaster == MASTER) {
+ masterOutputSample = master.generateNextSample(amp, pitch, cutoff);
+ } else {
+ slaveOutputSample = slave.generateNextSample(amp, pitch, cutoff);
+ }
+}
+
+Bit16s LA32PartialPair::nextOutSample() {
+ float outputSample;
+ if (ringModulated) {
+ float ringModulatedSample = masterOutputSample * slaveOutputSample;
+ outputSample = mixed ? masterOutputSample + ringModulatedSample : ringModulatedSample;
+ } else {
+ outputSample = masterOutputSample + slaveOutputSample;
+ }
+ return Bit16s(outputSample * 8192.0f);
+}
+
+void LA32PartialPair::deactivate(const PairType useMaster) {
+ if (useMaster == MASTER) {
+ master.deactivate();
+ masterOutputSample = 0.0f;
+ } else {
+ slave.deactivate();
+ slaveOutputSample = 0.0f;
+ }
+}
+
+bool LA32PartialPair::isActive(const PairType useMaster) const {
+ return useMaster == MASTER ? master.isActive() : slave.isActive();
+}
+
+}
+
+#endif // #if MT32EMU_ACCURATE_WG == 1
diff --git a/audio/softsynth/mt32/LegacyWaveGenerator.h b/audio/softsynth/mt32/LegacyWaveGenerator.h
new file mode 100644
index 0000000000..81c1b9c713
--- /dev/null
+++ b/audio/softsynth/mt32/LegacyWaveGenerator.h
@@ -0,0 +1,146 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#if MT32EMU_ACCURATE_WG == 1
+
+#ifndef MT32EMU_LA32_WAVE_GENERATOR_H
+#define MT32EMU_LA32_WAVE_GENERATOR_H
+
+namespace MT32Emu {
+
+/**
+ * LA32WaveGenerator is aimed to represent the exact model of LA32 wave generator.
+ * The output square wave is created by adding high / low linear segments in-between
+ * the rising and falling cosine segments. Basically, it’s very similar to the phase distortion synthesis.
+ * Behaviour of a true resonance filter is emulated by adding decaying sine wave.
+ * The beginning and the ending of the resonant sine is multiplied by a cosine window.
+ * To synthesise sawtooth waves, the resulting square wave is multiplied by synchronous cosine wave.
+ */
+class LA32WaveGenerator {
+ //***************************************************************************
+ // The local copy of partial parameters below
+ //***************************************************************************
+
+ bool active;
+
+ // True means the resulting square wave is to be multiplied by the synchronous cosine
+ bool sawtoothWaveform;
+
+ // Logarithmic amp of the wave generator
+ Bit32u amp;
+
+ // Logarithmic frequency of the resulting wave
+ Bit16u pitch;
+
+ // Values in range [1..31]
+ // Value 1 correspong to the minimum resonance
+ Bit8u resonance;
+
+ // Processed value in range [0..255]
+ // Values in range [0..128] have no effect and the resulting wave remains symmetrical
+ // Value 255 corresponds to the maximum possible asymmetric of the resulting wave
+ Bit8u pulseWidth;
+
+ // Composed of the base cutoff in range [78..178] left-shifted by 18 bits and the TVF modifier
+ Bit32u cutoffVal;
+
+ // Logarithmic PCM sample start address
+ const Bit16s *pcmWaveAddress;
+
+ // Logarithmic PCM sample length
+ Bit32u pcmWaveLength;
+
+ // true for looped logarithmic PCM samples
+ bool pcmWaveLooped;
+
+ // false for slave PCM partials in the structures with the ring modulation
+ bool pcmWaveInterpolated;
+
+ //***************************************************************************
+ // Internal variables below
+ //***************************************************************************
+
+ float wavePos;
+ float lastFreq;
+ float pcmPosition;
+
+ float getPCMSample(unsigned int position);
+
+public:
+ // Initialise the WG engine for generation of synth partial samples and set up the invariant parameters
+ void initSynth(const bool sawtoothWaveform, const Bit8u pulseWidth, const Bit8u resonance);
+
+ // Initialise the WG engine for generation of PCM partial samples and set up the invariant parameters
+ void initPCM(const Bit16s * const pcmWaveAddress, const Bit32u pcmWaveLength, const bool pcmWaveLooped, const bool pcmWaveInterpolated);
+
+ // Update parameters with respect to TVP, TVA and TVF, and generate next sample
+ float generateNextSample(const Bit32u amp, const Bit16u pitch, const Bit32u cutoff);
+
+ // Deactivate the WG engine
+ void deactivate();
+
+ // Return active state of the WG engine
+ bool isActive() const;
+
+ // Return true if the WG engine generates PCM wave samples
+ bool isPCMWave() const;
+};
+
+// LA32PartialPair contains a structure of two partials being mixed / ring modulated
+class LA32PartialPair {
+ LA32WaveGenerator master;
+ LA32WaveGenerator slave;
+ bool ringModulated;
+ bool mixed;
+ float masterOutputSample;
+ float slaveOutputSample;
+
+public:
+ enum PairType {
+ MASTER,
+ SLAVE
+ };
+
+ // ringModulated should be set to false for the structures with mixing or stereo output
+ // ringModulated should be set to true for the structures with ring modulation
+ // mixed is used for the structures with ring modulation and indicates whether the master partial output is mixed to the ring modulator output
+ void init(const bool ringModulated, const bool mixed);
+
+ // Initialise the WG engine for generation of synth partial samples and set up the invariant parameters
+ void initSynth(const PairType master, const bool sawtoothWaveform, const Bit8u pulseWidth, const Bit8u resonance);
+
+ // Initialise the WG engine for generation of PCM partial samples and set up the invariant parameters
+ void initPCM(const PairType master, const Bit16s * const pcmWaveAddress, const Bit32u pcmWaveLength, const bool pcmWaveLooped);
+
+ // Update parameters with respect to TVP, TVA and TVF, and generate next sample
+ void generateNextSample(const PairType master, const Bit32u amp, const Bit16u pitch, const Bit32u cutoff);
+
+ // Perform mixing / ring modulation and return the result
+ Bit16s nextOutSample();
+
+ // Deactivate the WG engine
+ void deactivate(const PairType master);
+
+ // Return active state of the WG engine
+ bool isActive(const PairType master) const;
+};
+
+} // namespace MT32Emu
+
+#endif // #ifndef MT32EMU_LA32_WAVE_GENERATOR_H
+
+#endif // #if MT32EMU_ACCURATE_WG == 1
diff --git a/audio/softsynth/mt32/Part.cpp b/audio/softsynth/mt32/Part.cpp
index 88d42dbbd4..62ba346c35 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -68,18 +68,16 @@ Part::Part(Synth *useSynth, unsigned int usePartNum) {
activePartialCount = 0;
memset(patchCache, 0, sizeof(patchCache));
for (int i = 0; i < MT32EMU_MAX_POLY; i++) {
- freePolys.push_front(new Poly(this));
+ freePolys.prepend(new Poly(this));
}
}
Part::~Part() {
- while (!activePolys.empty()) {
- delete activePolys.front();
- activePolys.pop_front();
+ while (!activePolys.isEmpty()) {
+ delete activePolys.takeFirst();
}
- while (!freePolys.empty()) {
- delete freePolys.front();
- freePolys.pop_front();
+ while (!freePolys.isEmpty()) {
+ delete freePolys.takeFirst();
}
}
@@ -209,6 +207,7 @@ void RhythmPart::setTimbre(TimbreParam * /*timbre*/) {
void Part::setTimbre(TimbreParam *timbre) {
*timbreTemp = *timbre;
+ synth->newTimbreSet(partNum, timbre->common.name);
}
unsigned int RhythmPart::getAbsTimbreNum() const {
@@ -245,8 +244,8 @@ void Part::backupCacheToPartials(PatchCache cache[4]) {
// if so then duplicate the cached data from the part to the partial so that
// we can change the part's cache without affecting the partial.
// We delay this until now to avoid a copy operation with every note played
- for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
- (*polyIt)->backupCacheToPartials(cache);
+ for (Poly *poly = activePolys.getFirst(); poly != NULL; poly = poly->getNext()) {
+ poly->backupCacheToPartials(cache);
}
}
@@ -445,8 +444,7 @@ void Part::abortPoly(Poly *poly) {
}
bool Part::abortFirstPoly(unsigned int key) {
- for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
- Poly *poly = *polyIt;
+ for (Poly *poly = activePolys.getFirst(); poly != NULL; poly = poly->getNext()) {
if (poly->getKey() == key) {
abortPoly(poly);
return true;
@@ -456,8 +454,7 @@ bool Part::abortFirstPoly(unsigned int key) {
}
bool Part::abortFirstPoly(PolyState polyState) {
- for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
- Poly *poly = *polyIt;
+ for (Poly *poly = activePolys.getFirst(); poly != NULL; poly = poly->getNext()) {
if (poly->getState() == polyState) {
abortPoly(poly);
return true;
@@ -474,10 +471,10 @@ bool Part::abortFirstPolyPreferHeld() {
}
bool Part::abortFirstPoly() {
- if (activePolys.empty()) {
+ if (activePolys.isEmpty()) {
return false;
}
- abortPoly(activePolys.front());
+ abortPoly(activePolys.getFirst());
return true;
}
@@ -502,17 +499,16 @@ void Part::playPoly(const PatchCache cache[4], const MemParams::RhythmTemp *rhyt
return;
}
- if (freePolys.empty()) {
+ if (freePolys.isEmpty()) {
synth->printDebug("%s (%s): No free poly to play key %d (velocity %d)", name, currentInstr, midiKey, velocity);
return;
}
- Poly *poly = freePolys.front();
- freePolys.pop_front();
+ Poly *poly = freePolys.takeFirst();
if (patchTemp->patch.assignMode & 1) {
// Priority to data first received
- activePolys.push_front(poly);
+ activePolys.prepend(poly);
} else {
- activePolys.push_back(poly);
+ activePolys.append(poly);
}
Partial *partials[4];
@@ -537,13 +533,14 @@ void Part::playPoly(const PatchCache cache[4], const MemParams::RhythmTemp *rhyt
#if MT32EMU_MONITOR_PARTIALS > 1
synth->printPartialUsage();
#endif
+ synth->partStateChanged(partNum, true);
+ synth->polyStateChanged(partNum);
}
void Part::allNotesOff() {
// The MIDI specification states - and Mok confirms - that all notes off (0x7B)
// should treat the hold pedal as usual.
- for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
- Poly *poly = *polyIt;
+ for (Poly *poly = activePolys.getFirst(); poly != NULL; poly = poly->getNext()) {
// FIXME: This has special handling of key 0 in NoteOff that Mok has not yet confirmed applies to AllNotesOff.
// if (poly->canSustain() || poly->getKey() == 0) {
// FIXME: The real devices are found to be ignoring non-sustaining polys while processing AllNotesOff. Need to be confirmed.
@@ -557,15 +554,13 @@ void Part::allSoundOff() {
// MIDI "All sound off" (0x78) should release notes immediately regardless of the hold pedal.
// This controller is not actually implemented by the synths, though (according to the docs and Mok) -
// we're only using this method internally.
- for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
- Poly *poly = *polyIt;
+ for (Poly *poly = activePolys.getFirst(); poly != NULL; poly = poly->getNext()) {
poly->startDecay();
}
}
void Part::stopPedalHold() {
- for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
- Poly *poly = *polyIt;
+ for (Poly *poly = activePolys.getFirst(); poly != NULL; poly = poly->getNext()) {
poly->stopPedalHold();
}
}
@@ -583,8 +578,7 @@ void Part::stopNote(unsigned int key) {
synth->printDebug("%s (%s): stopping key %d", name, currentInstr, key);
#endif
- for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
- Poly *poly = *polyIt;
+ for (Poly *poly = activePolys.getFirst(); poly != NULL; poly = poly->getNext()) {
// Generally, non-sustaining instruments ignore note off. They die away eventually anyway.
// Key 0 (only used by special cases on rhythm part) reacts to note off even if non-sustaining or pedal held.
if (poly->getKey() == key && (poly->canSustain() || key == 0)) {
@@ -605,8 +599,7 @@ unsigned int Part::getActivePartialCount() const {
unsigned int Part::getActiveNonReleasingPartialCount() const {
unsigned int activeNonReleasingPartialCount = 0;
- for (Common::List<Poly *>::const_iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
- Poly *poly = *polyIt;
+ for (Poly *poly = activePolys.getFirst(); poly != NULL; poly = poly->getNext()) {
if (poly->getState() != POLY_Releasing) {
activeNonReleasingPartialCount += poly->getActivePartialCount();
}
@@ -618,7 +611,103 @@ void Part::partialDeactivated(Poly *poly) {
activePartialCount--;
if (!poly->isActive()) {
activePolys.remove(poly);
- freePolys.push_front(poly);
+ freePolys.prepend(poly);
+ synth->polyStateChanged(partNum);
+ }
+ if (activePartialCount == 0) {
+ synth->partStateChanged(partNum, false);
+ }
+}
+
+//#define POLY_LIST_DEBUG
+
+PolyList::PolyList() : firstPoly(NULL), lastPoly(NULL) {}
+
+bool PolyList::isEmpty() const {
+#ifdef POLY_LIST_DEBUG
+ if ((firstPoly == NULL || lastPoly == NULL) && firstPoly != lastPoly) {
+ printf("PolyList: desynchronised firstPoly & lastPoly pointers\n");
+ }
+#endif
+ return firstPoly == NULL && lastPoly == NULL;
+}
+
+Poly *PolyList::getFirst() const {
+ return firstPoly;
+}
+
+Poly *PolyList::getLast() const {
+ return lastPoly;
+}
+
+void PolyList::prepend(Poly *poly) {
+#ifdef POLY_LIST_DEBUG
+ if (poly->getNext() != NULL) {
+ printf("PolyList: Non-NULL next field in a Poly being prepended is ignored\n");
+ }
+#endif
+ poly->setNext(firstPoly);
+ firstPoly = poly;
+ if (lastPoly == NULL) {
+ lastPoly = poly;
+ }
+}
+
+void PolyList::append(Poly *poly) {
+#ifdef POLY_LIST_DEBUG
+ if (poly->getNext() != NULL) {
+ printf("PolyList: Non-NULL next field in a Poly being appended is ignored\n");
+ }
+#endif
+ poly->setNext(NULL);
+ if (lastPoly != NULL) {
+#ifdef POLY_LIST_DEBUG
+ if (lastPoly->getNext() != NULL) {
+ printf("PolyList: Non-NULL next field in the lastPoly\n");
+ }
+#endif
+ lastPoly->setNext(poly);
+ }
+ lastPoly = poly;
+ if (firstPoly == NULL) {
+ firstPoly = poly;
+ }
+}
+
+Poly *PolyList::takeFirst() {
+ Poly *oldFirst = firstPoly;
+ firstPoly = oldFirst->getNext();
+ if (firstPoly == NULL) {
+#ifdef POLY_LIST_DEBUG
+ if (lastPoly != oldFirst) {
+ printf("PolyList: firstPoly != lastPoly in a list with a single Poly\n");
+ }
+#endif
+ lastPoly = NULL;
+ }
+ oldFirst->setNext(NULL);
+ return oldFirst;
+}
+
+void PolyList::remove(Poly * const polyToRemove) {
+ if (polyToRemove == firstPoly) {
+ takeFirst();
+ return;
+ }
+ for (Poly *poly = firstPoly; poly != NULL; poly = poly->getNext()) {
+ if (poly->getNext() == polyToRemove) {
+ if (polyToRemove == lastPoly) {
+#ifdef POLY_LIST_DEBUG
+ if (lastPoly->getNext() != NULL) {
+ printf("PolyList: Non-NULL next field in the lastPoly\n");
+ }
+#endif
+ lastPoly = poly;
+ }
+ poly->setNext(polyToRemove->getNext());
+ polyToRemove->setNext(NULL);
+ break;
+ }
}
}
diff --git a/audio/softsynth/mt32/Part.h b/audio/softsynth/mt32/Part.h
index 5c59c6d61f..b6585880fe 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,13 +18,27 @@
#ifndef MT32EMU_PART_H
#define MT32EMU_PART_H
-#include <common/list.h>
-
namespace MT32Emu {
class PartialManager;
class Synth;
+class PolyList {
+private:
+ Poly *firstPoly;
+ Poly *lastPoly;
+
+public:
+ PolyList();
+ bool isEmpty() const;
+ Poly *getFirst() const;
+ Poly *getLast() const;
+ void prepend(Poly *poly);
+ void append(Poly *poly);
+ Poly *takeFirst();
+ void remove(Poly * const poly);
+};
+
class Part {
private:
// Direct pointer to sysex-addressable memory dedicated to this part (valid for parts 1-8, NULL for rhythm)
@@ -37,8 +51,8 @@ private:
unsigned int activePartialCount;
PatchCache patchCache[4];
- Common::List<Poly *> freePolys;
- Common::List<Poly *> activePolys;
+ PolyList freePolys;
+ PolyList activePolys;
void setPatch(const PatchParam *patch);
unsigned int midiKeyToKey(unsigned int midiKey);
diff --git a/audio/softsynth/mt32/Partial.cpp b/audio/softsynth/mt32/Partial.cpp
index a6d164f218..a0aec90ec4 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -35,7 +35,12 @@ static const float PAN_NUMERATOR_MASTER[] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
static const float PAN_NUMERATOR_SLAVE[] = {0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 7.0f, 7.0f, 7.0f, 7.0f, 7.0f, 7.0f, 7.0f};
Partial::Partial(Synth *useSynth, int useDebugPartialNum) :
- synth(useSynth), debugPartialNum(useDebugPartialNum), sampleNum(0), tva(new TVA(this, &ampRamp)), tvp(new TVP(this)), tvf(new TVF(this, &cutoffModifierRamp)) {
+ synth(useSynth), debugPartialNum(useDebugPartialNum), sampleNum(0) {
+ // Initialisation of tva, tvp and tvf uses 'this' pointer
+ // and thus should not be in the initializer list to avoid a compiler warning
+ tva = new TVA(this, &ampRamp);
+ tvp = new TVP(this);
+ tvf = new TVF(this, &cutoffModifierRamp);
ownerPart = -1;
poly = NULL;
pair = NULL;
@@ -81,26 +86,23 @@ void Partial::deactivate() {
ownerPart = -1;
if (poly != NULL) {
poly->partialDeactivated(this);
- if (pair != NULL) {
- pair->pair = NULL;
- }
}
+ synth->partialStateChanged(this, tva->getPhase(), TVA_PHASE_DEAD);
#if MT32EMU_MONITOR_PARTIALS > 2
synth->printDebug("[+%lu] [Partial %d] Deactivated", sampleNum, debugPartialNum);
synth->printPartialUsage(sampleNum);
#endif
-}
-
-// DEPRECATED: This should probably go away eventually, it's currently only used as a kludge to protect our old assumptions that
-// rhythm part notes were always played as key MIDDLEC.
-int Partial::getKey() const {
- if (poly == NULL) {
- return -1;
- } else if (ownerPart == 8) {
- // FIXME: Hack, should go away after new pitch stuff is committed (and possibly some TVF changes)
- return MIDDLEC;
+ if (isRingModulatingSlave()) {
+ pair->la32Pair.deactivate(LA32PartialPair::SLAVE);
} else {
- return poly->getKey();
+ la32Pair.deactivate(LA32PartialPair::MASTER);
+ if (hasRingModulatingSlave()) {
+ pair->deactivate();
+ pair = NULL;
+ }
+ }
+ if (pair != NULL) {
+ pair->pair = NULL;
}
}
@@ -163,8 +165,6 @@ void Partial::startPartial(const Part *part, Poly *usePoly, const PatchCache *us
pcmWave = &synth->pcmWaves[pcmNum];
} else {
pcmWave = NULL;
- wavePos = 0.0f;
- lastFreq = 0.0;
}
// CONFIRMED: pulseWidthVal calculation is based on information from Mok
@@ -175,26 +175,65 @@ void Partial::startPartial(const Part *part, Poly *usePoly, const PatchCache *us
pulseWidthVal = 255;
}
- pcmPosition = 0.0f;
pair = pairPartial;
alreadyOutputed = false;
tva->reset(part, patchCache->partialParam, rhythmTemp);
tvp->reset(part, patchCache->partialParam);
tvf->reset(patchCache->partialParam, tvp->getBasePitch());
+
+ LA32PartialPair::PairType pairType;
+ LA32PartialPair *useLA32Pair;
+ if (isRingModulatingSlave()) {
+ pairType = LA32PartialPair::SLAVE;
+ useLA32Pair = &pair->la32Pair;
+ } else {
+ pairType = LA32PartialPair::MASTER;
+ la32Pair.init(hasRingModulatingSlave(), mixType == 1);
+ useLA32Pair = &la32Pair;
+ }
+ if (isPCM()) {
+ useLA32Pair->initPCM(pairType, &synth->pcmROMData[pcmWave->addr], pcmWave->len, pcmWave->loop);
+ } else {
+ useLA32Pair->initSynth(pairType, (patchCache->waveform & 1) != 0, pulseWidthVal, patchCache->srcPartial.tvf.resonance + 1);
+ }
+ if (!hasRingModulatingSlave()) {
+ la32Pair.deactivate(LA32PartialPair::SLAVE);
+ }
+ // Temporary integration hack
+ stereoVolume.leftVol /= 8192.0f;
+ stereoVolume.rightVol /= 8192.0f;
}
-float Partial::getPCMSample(unsigned int position) {
- if (position >= pcmWave->len) {
- if (!pcmWave->loop) {
- return 0;
- }
- position = position % pcmWave->len;
+Bit32u Partial::getAmpValue() {
+ // SEMI-CONFIRMED: From sample analysis:
+ // (1) Tested with a single partial playing PCM wave 77 with pitchCoarse 36 and no keyfollow, velocity follow, etc.
+ // This gives results within +/- 2 at the output (before any DAC bitshifting)
+ // when sustaining at levels 156 - 255 with no modifiers.
+ // (2) Tested with a special square wave partial (internal capture ID tva5) at TVA envelope levels 155-255.
+ // This gives deltas between -1 and 0 compared to the real output. Note that this special partial only produces
+ // positive amps, so negative still needs to be explored, as well as lower levels.
+ //
+ // Also still partially unconfirmed is the behaviour when ramping between levels, as well as the timing.
+ // TODO: The tests above were performed using the float model, to be refined
+ Bit32u ampRampVal = 67117056 - ampRamp.nextValue();
+ if (ampRamp.checkInterrupt()) {
+ tva->handleInterrupt();
}
- return synth->pcmROMData[pcmWave->addr + position];
+ return ampRampVal;
}
-unsigned long Partial::generateSamples(float *partialBuf, unsigned long length) {
- const Tables &tables = Tables::getInstance();
+Bit32u Partial::getCutoffValue() {
+ if (isPCM()) {
+ return 0;
+ }
+ Bit32u cutoffModifierRampVal = cutoffModifierRamp.nextValue();
+ if (cutoffModifierRamp.checkInterrupt()) {
+ tvf->handleInterrupt();
+ }
+ return (tvf->getBaseCutoff() << 18) + cutoffModifierRampVal;
+}
+
+unsigned long Partial::generateSamples(Bit16s *partialBuf, unsigned long length) {
if (!isActive() || alreadyOutputed) {
return 0;
}
@@ -202,303 +241,31 @@ unsigned long Partial::generateSamples(float *partialBuf, unsigned long length)
synth->printDebug("[Partial %d] *** ERROR: poly is NULL at Partial::generateSamples()!", debugPartialNum);
return 0;
}
-
alreadyOutputed = true;
- // Generate samples
-
for (sampleNum = 0; sampleNum < length; sampleNum++) {
- float sample = 0;
- Bit32u ampRampVal = ampRamp.nextValue();
- if (ampRamp.checkInterrupt()) {
- tva->handleInterrupt();
- }
- if (!tva->isPlaying()) {
+ if (!tva->isPlaying() || !la32Pair.isActive(LA32PartialPair::MASTER)) {
deactivate();
break;
}
-
- Bit16u pitch = tvp->nextPitch();
-
- // SEMI-CONFIRMED: From sample analysis:
- // (1) Tested with a single partial playing PCM wave 77 with pitchCoarse 36 and no keyfollow, velocity follow, etc.
- // This gives results within +/- 2 at the output (before any DAC bitshifting)
- // when sustaining at levels 156 - 255 with no modifiers.
- // (2) Tested with a special square wave partial (internal capture ID tva5) at TVA envelope levels 155-255.
- // This gives deltas between -1 and 0 compared to the real output. Note that this special partial only produces
- // positive amps, so negative still needs to be explored, as well as lower levels.
- //
- // Also still partially unconfirmed is the behaviour when ramping between levels, as well as the timing.
-
-#if MT32EMU_ACCURATE_WG == 1
- float amp = EXP2F((32772 - ampRampVal / 2048) / -2048.0f);
- float freq = EXP2F(pitch / 4096.0f - 16.0f) * 32000.0f;
-#else
- static const float ampFactor = EXP2F(32772 / -2048.0f);
- float amp = EXP2I(ampRampVal >> 10) * ampFactor;
-
- static const float freqFactor = EXP2F(-16.0f) * 32000.0f;
- float freq = EXP2I(pitch) * freqFactor;
-#endif
-
- if (patchCache->PCMPartial) {
- // Render PCM waveform
- int len = pcmWave->len;
- int intPCMPosition = (int)pcmPosition;
- if (intPCMPosition >= len && !pcmWave->loop) {
- // We're now past the end of a non-looping PCM waveform so it's time to die.
- deactivate();
- break;
- }
- Bit32u pcmAddr = pcmWave->addr;
- float positionDelta = freq * 2048.0f / synth->myProp.sampleRate;
-
- // Linear interpolation
- float firstSample = synth->pcmROMData[pcmAddr + intPCMPosition];
- // We observe that for partial structures with ring modulation the interpolation is not applied to the slave PCM partial.
- // It's assumed that the multiplication circuitry intended to perform the interpolation on the slave PCM partial
- // is borrowed by the ring modulation circuit (or the LA32 chip has a similar lack of resources assigned to each partial pair).
- if (pair == NULL || mixType == 0 || structurePosition == 0) {
- sample = firstSample + (getPCMSample(intPCMPosition + 1) - firstSample) * (pcmPosition - intPCMPosition);
- } else {
- sample = firstSample;
- }
-
- float newPCMPosition = pcmPosition + positionDelta;
- if (pcmWave->loop) {
- newPCMPosition = fmod(newPCMPosition, (float)pcmWave->len);
- }
- pcmPosition = newPCMPosition;
- } else {
- // Render synthesised waveform
- wavePos *= lastFreq / freq;
- lastFreq = freq;
-
- Bit32u cutoffModifierRampVal = cutoffModifierRamp.nextValue();
- if (cutoffModifierRamp.checkInterrupt()) {
- tvf->handleInterrupt();
- }
- float cutoffModifier = cutoffModifierRampVal / 262144.0f;
-
- // res corresponds to a value set in an LA32 register
- Bit8u res = patchCache->srcPartial.tvf.resonance + 1;
-
- // Using tiny exact table for computation of EXP2F(1.0f - (32 - res) / 4.0f)
- float resAmp = tables.resAmpMax[res];
-
- // The cutoffModifier may not be supposed to be directly added to the cutoff -
- // it may for example need to be multiplied in some way.
- // The 240 cutoffVal limit was determined via sample analysis (internal Munt capture IDs: glop3, glop4).
- // More research is needed to be sure that this is correct, however.
- float cutoffVal = tvf->getBaseCutoff() + cutoffModifier;
- if (cutoffVal > 240.0f) {
- cutoffVal = 240.0f;
- }
-
- // Wave length in samples
- float waveLen = synth->myProp.sampleRate / freq;
-
- // Init cosineLen
- float cosineLen = 0.5f * waveLen;
- if (cutoffVal > 128.0f) {
-#if MT32EMU_ACCURATE_WG == 1
- cosineLen *= EXP2F((cutoffVal - 128.0f) / -16.0f); // found from sample analysis
-#else
- static const float cosineLenFactor = EXP2F(128.0f / -16.0f);
- cosineLen *= EXP2I(Bit32u((256.0f - cutoffVal) * 256.0f)) * cosineLenFactor;
-#endif
- }
-
- // Start playing in center of first cosine segment
- // relWavePos is shifted by a half of cosineLen
- float relWavePos = wavePos + 0.5f * cosineLen;
- if (relWavePos > waveLen) {
- relWavePos -= waveLen;
- }
-
- float pulseLen = 0.5f;
- if (pulseWidthVal > 128) {
- pulseLen += tables.pulseLenFactor[pulseWidthVal - 128];
- }
- pulseLen *= waveLen;
-
- float lLen = pulseLen - cosineLen;
-
- // Ignore pulsewidths too high for given freq
- if (lLen < 0.0f) {
- lLen = 0.0f;
- }
-
- // Ignore pulsewidths too high for given freq and cutoff
- float hLen = waveLen - lLen - 2 * cosineLen;
- if (hLen < 0.0f) {
- hLen = 0.0f;
- }
-
- // Correct resAmp for cutoff in range 50..66
- if ((cutoffVal >= 128.0f) && (cutoffVal < 144.0f)) {
-#if MT32EMU_ACCURATE_WG == 1
- resAmp *= sinf(FLOAT_PI * (cutoffVal - 128.0f) / 32.0f);
-#else
- resAmp *= tables.sinf10[Bit32u(64 * (cutoffVal - 128.0f))];
-#endif
- }
-
- // Produce filtered square wave with 2 cosine waves on slopes
-
- // 1st cosine segment
- if (relWavePos < cosineLen) {
-#if MT32EMU_ACCURATE_WG == 1
- sample = -cosf(FLOAT_PI * relWavePos / cosineLen);
-#else
- sample = -tables.sinf10[Bit32u(2048.0f * relWavePos / cosineLen) + 1024];
-#endif
- } else
-
- // high linear segment
- if (relWavePos < (cosineLen + hLen)) {
- sample = 1.f;
- } else
-
- // 2nd cosine segment
- if (relWavePos < (2 * cosineLen + hLen)) {
-#if MT32EMU_ACCURATE_WG == 1
- sample = cosf(FLOAT_PI * (relWavePos - (cosineLen + hLen)) / cosineLen);
-#else
- sample = tables.sinf10[Bit32u(2048.0f * (relWavePos - (cosineLen + hLen)) / cosineLen) + 1024];
-#endif
- } else {
-
- // low linear segment
- sample = -1.f;
- }
-
- if (cutoffVal < 128.0f) {
-
- // Attenuate samples below cutoff 50
- // Found by sample analysis
-#if MT32EMU_ACCURATE_WG == 1
- sample *= EXP2F(-0.125f * (128.0f - cutoffVal));
-#else
- static const float cutoffAttenuationFactor = EXP2F(-0.125f * 128.0f);
- sample *= EXP2I(Bit32u(512.0f * cutoffVal)) * cutoffAttenuationFactor;
-#endif
- } else {
-
- // Add resonance sine. Effective for cutoff > 50 only
- float resSample = 1.0f;
-
- // Now relWavePos counts from the middle of first cosine
- relWavePos = wavePos;
-
- // negative segments
- if (!(relWavePos < (cosineLen + hLen))) {
- resSample = -resSample;
- relWavePos -= cosineLen + hLen;
- }
-
- // Resonance sine WG
-#if MT32EMU_ACCURATE_WG == 1
- resSample *= sinf(FLOAT_PI * relWavePos / cosineLen);
-#else
- resSample *= tables.sinf10[Bit32u(2048.0f * relWavePos / cosineLen) & 4095];
-#endif
-
- // Resonance sine amp
- float resAmpFadeLog2 = -tables.resAmpFadeFactor[res >> 2] * (relWavePos / cosineLen); // seems to be exact
-#if MT32EMU_ACCURATE_WG == 1
- float resAmpFade = EXP2F(resAmpFadeLog2);
-#else
- static const float resAmpFadeFactor = EXP2F(-30.0f);
- float resAmpFade = (resAmpFadeLog2 < -30.0f) ? 0.0f : EXP2I(Bit32u((30.0f + resAmpFadeLog2) * 4096.0f)) * resAmpFadeFactor;
-#endif
-
- // Now relWavePos set negative to the left from center of any cosine
- relWavePos = wavePos;
-
- // negative segment
- if (!(wavePos < (waveLen - 0.5f * cosineLen))) {
- relWavePos -= waveLen;
- } else
-
- // positive segment
- if (!(wavePos < (hLen + 0.5f * cosineLen))) {
- relWavePos -= cosineLen + hLen;
+ la32Pair.generateNextSample(LA32PartialPair::MASTER, getAmpValue(), tvp->nextPitch(), getCutoffValue());
+ if (hasRingModulatingSlave()) {
+ la32Pair.generateNextSample(LA32PartialPair::SLAVE, pair->getAmpValue(), pair->tvp->nextPitch(), pair->getCutoffValue());
+ if (!pair->tva->isPlaying() || !la32Pair.isActive(LA32PartialPair::SLAVE)) {
+ pair->deactivate();
+ if (mixType == 2) {
+ deactivate();
+ break;
}
-
- // Fading to zero while within cosine segments to avoid jumps in the wave
- // Sample analysis suggests that this window is very close to cosine
- if (relWavePos < 0.5f * cosineLen) {
-#if MT32EMU_ACCURATE_WG == 1
- resAmpFade *= 0.5f * (1.0f - cosf(FLOAT_PI * relWavePos / (0.5f * cosineLen)));
-#else
- resAmpFade *= 0.5f * (1.0f + tables.sinf10[Bit32s(2048.0f * relWavePos / (0.5f * cosineLen)) + 3072]);
-#endif
- }
-
- sample += resSample * resAmp * resAmpFade;
- }
-
- // sawtooth waves
- if ((patchCache->waveform & 1) != 0) {
-#if MT32EMU_ACCURATE_WG == 1
- sample *= cosf(FLOAT_2PI * wavePos / waveLen);
-#else
- sample *= tables.sinf10[(Bit32u(4096.0f * wavePos / waveLen) & 4095) + 1024];
-#endif
- }
-
- wavePos++;
-
- // wavePos isn't supposed to be > waveLen
- if (wavePos > waveLen) {
- wavePos -= waveLen;
}
}
-
- // Multiply sample with current TVA value
- sample *= amp;
- *partialBuf++ = sample;
+ *partialBuf++ = la32Pair.nextOutSample();
}
unsigned long renderedSamples = sampleNum;
sampleNum = 0;
return renderedSamples;
}
-float *Partial::mixBuffersRingMix(float *buf1, float *buf2, unsigned long len) {
- if (buf1 == NULL) {
- return NULL;
- }
- if (buf2 == NULL) {
- return buf1;
- }
-
- while (len--) {
- // FIXME: At this point we have no idea whether this is remotely correct...
- *buf1 = *buf1 * *buf2 + *buf1;
- buf1++;
- buf2++;
- }
- return buf1;
-}
-
-float *Partial::mixBuffersRing(float *buf1, float *buf2, unsigned long len) {
- if (buf1 == NULL) {
- return NULL;
- }
- if (buf2 == NULL) {
- return NULL;
- }
-
- while (len--) {
- // FIXME: At this point we have no idea whether this is remotely correct...
- *buf1 = *buf1 * *buf2;
- buf1++;
- buf2++;
- }
- return buf1;
-}
-
bool Partial::hasRingModulatingSlave() const {
return pair != NULL && structurePosition == 0 && (mixType == 1 || mixType == 2);
}
@@ -530,53 +297,14 @@ bool Partial::produceOutput(float *leftBuf, float *rightBuf, unsigned long lengt
synth->printDebug("[Partial %d] *** ERROR: poly is NULL at Partial::produceOutput()!", debugPartialNum);
return false;
}
-
- float *partialBuf = &myBuffer[0];
- unsigned long numGenerated = generateSamples(partialBuf, length);
- if (mixType == 1 || mixType == 2) {
- float *pairBuf;
- unsigned long pairNumGenerated;
- if (pair == NULL) {
- pairBuf = NULL;
- pairNumGenerated = 0;
- } else {
- pairBuf = &pair->myBuffer[0];
- pairNumGenerated = pair->generateSamples(pairBuf, numGenerated);
- // pair will have been set to NULL if it deactivated within generateSamples()
- if (pair != NULL) {
- if (!isActive()) {
- pair->deactivate();
- pair = NULL;
- } else if (!pair->isActive()) {
- pair = NULL;
- }
- }
- }
- if (pairNumGenerated > 0) {
- if (mixType == 1) {
- mixBuffersRingMix(partialBuf, pairBuf, pairNumGenerated);
- } else {
- mixBuffersRing(partialBuf, pairBuf, pairNumGenerated);
- }
- }
- if (numGenerated > pairNumGenerated) {
- if (mixType == 2) {
- numGenerated = pairNumGenerated;
- deactivate();
- }
- }
- }
-
- for (unsigned int i = 0; i < numGenerated; i++) {
- *leftBuf++ = partialBuf[i] * stereoVolume.leftVol;
- }
+ unsigned long numGenerated = generateSamples(myBuffer, length);
for (unsigned int i = 0; i < numGenerated; i++) {
- *rightBuf++ = partialBuf[i] * stereoVolume.rightVol;
+ *leftBuf++ = myBuffer[i] * stereoVolume.leftVol;
+ *rightBuf++ = myBuffer[i] * stereoVolume.rightVol;
}
- while (numGenerated < length) {
+ for (; numGenerated < length; numGenerated++) {
*leftBuf++ = 0.0f;
*rightBuf++ = 0.0f;
- numGenerated++;
}
return true;
}
diff --git a/audio/softsynth/mt32/Partial.h b/audio/softsynth/mt32/Partial.h
index 5e250769ec..21b1bfe376 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -44,12 +44,7 @@ private:
int structurePosition; // 0 or 1 of a structure pair
StereoVolume stereoVolume;
- // Distance in (possibly fractional) samples from the start of the current pulse
- float wavePos;
-
- float lastFreq;
-
- float myBuffer[MAX_SAMPLES_PER_RUN];
+ Bit16s myBuffer[MAX_SAMPLES_PER_RUN];
// Only used for PCM partials
int pcmNum;
@@ -60,17 +55,16 @@ private:
// Range: 0-255
int pulseWidthVal;
- float pcmPosition;
-
Poly *poly;
LA32Ramp ampRamp;
LA32Ramp cutoffModifierRamp;
- float *mixBuffersRingMix(float *buf1, float *buf2, unsigned long len);
- float *mixBuffersRing(float *buf1, float *buf2, unsigned long len);
+ // TODO: This should be owned by PartialPair
+ LA32PartialPair la32Pair;
- float getPCMSample(unsigned int position);
+ Bit32u getAmpValue();
+ Bit32u getCutoffValue();
public:
const PatchCache *patchCache;
@@ -90,7 +84,6 @@ public:
unsigned long debugGetSampleNum() const;
int getOwnerPart() const;
- int getKey() const;
const Poly *getPoly() const;
bool isActive() const;
void activate(int part);
@@ -111,7 +104,7 @@ public:
bool produceOutput(float *leftBuf, float *rightBuf, unsigned long length);
// This function writes mono sample output to the provided buffer, and returns the number of samples written
- unsigned long generateSamples(float *partialBuf, unsigned long length);
+ unsigned long generateSamples(Bit16s *partialBuf, unsigned long length);
};
}
diff --git a/audio/softsynth/mt32/PartialManager.cpp b/audio/softsynth/mt32/PartialManager.cpp
index f8c2dbcd48..436e7a353e 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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 bb78672457..a1c9266ea1 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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 c45391f672..46574f8967 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -29,6 +29,7 @@ Poly::Poly(Part *usePart) {
partials[i] = NULL;
}
state = POLY_Inactive;
+ next = NULL;
}
void Poly::reset(unsigned int newKey, unsigned int newVelocity, bool newSustain, Partial **newPartials) {
@@ -174,4 +175,12 @@ void Poly::partialDeactivated(Partial *partial) {
part->partialDeactivated(this);
}
+Poly *Poly::getNext() {
+ return next;
+}
+
+void Poly::setNext(Poly *poly) {
+ next = poly;
+}
+
}
diff --git a/audio/softsynth/mt32/Poly.h b/audio/softsynth/mt32/Poly.h
index cd15a776f5..068cf73d35 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -41,6 +41,8 @@ private:
Partial *partials[4];
+ Poly *next;
+
public:
Poly(Part *part);
void reset(unsigned int key, unsigned int velocity, bool sustain, Partial **partials);
@@ -60,6 +62,9 @@ public:
bool isActive() const;
void partialDeactivated(Partial *partial);
+
+ Poly *getNext();
+ void setNext(Poly *poly);
};
}
diff --git a/audio/softsynth/mt32/ROMInfo.cpp b/audio/softsynth/mt32/ROMInfo.cpp
new file mode 100644
index 0000000000..9d05420874
--- /dev/null
+++ b/audio/softsynth/mt32/ROMInfo.cpp
@@ -0,0 +1,111 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+//#include <cstring>
+#include "ROMInfo.h"
+
+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 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};
+
+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,
+ &CTRL_MT32_V1_07,
+ &CTRL_MT32_BLUER,
+ &CTRL_CM32L_V1_00,
+ &CTRL_CM32L_V1_02,
+ &PCM_MT32,
+ &PCM_CM32L,
+ NULL};
+
+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];
+ if (fileSize == romInfo->fileSize /*&& !strcmp(fileDigest, romInfo->sha1Digest)*/) {
+ return romInfo;
+ }
+ }
+ return NULL;
+}
+
+void ROMInfo::freeROMInfo(const ROMInfo *romInfo) {
+ (void) romInfo;
+}
+
+static int getROMCount() {
+ int count;
+ for(count = 0; ROM_INFOS[count] != NULL; count++) {
+ }
+ return count;
+}
+
+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];
+ if ((types & (1 << romInfo->type)) && (pairTypes & (1 << romInfo->pairType))) {
+ *currentROMInList++ = romInfo;
+ }
+ }
+ *currentROMInList = NULL;
+ return romInfoList;
+}
+
+void ROMInfo::freeROMInfoList(const ROMInfo **romInfoList) {
+ delete[] romInfoList;
+}
+
+const ROMImage* ROMImage::makeROMImage(Common::File *file) {
+ ROMImage *romImage = new ROMImage;
+ romImage->file = file;
+ romImage->romInfo = ROMInfo::getROMInfo(romImage->file);
+ return romImage;
+}
+
+void ROMImage::freeROMImage(const ROMImage *romImage) {
+ ROMInfo::freeROMInfo(romImage->romInfo);
+ delete romImage;
+}
+
+
+Common::File* ROMImage::getFile() const {
+ return file;
+}
+
+const ROMInfo* ROMImage::getROMInfo() const {
+ return romInfo;
+}
+
+}
diff --git a/audio/softsynth/mt32/ROMInfo.h b/audio/softsynth/mt32/ROMInfo.h
new file mode 100644
index 0000000000..1d837dc5ee
--- /dev/null
+++ b/audio/softsynth/mt32/ROMInfo.h
@@ -0,0 +1,77 @@
+/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
+ * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MT32EMU_ROMINFO_H
+#define MT32EMU_ROMINFO_H
+
+//#include <cstddef>
+#include "common/file.h"
+
+namespace MT32Emu {
+
+// Defines vital info about ROM file to be used by synth and applications
+
+struct ROMInfo {
+public:
+ size_t fileSize;
+ const char *sha1Digest;
+ enum Type {PCM, Control, Reverb} type;
+ const char *shortName;
+ const char *description;
+ enum PairType {Full, FirstHalf, SecondHalf, Mux0, Mux1} pairType;
+ ROMInfo *pairROMInfo;
+ void *controlROMInfo;
+
+ // Returns a ROMInfo struct by inspecting the size and the SHA1 hash
+ static const ROMInfo* getROMInfo(Common::File *file);
+
+ // Currently no-op
+ static void freeROMInfo(const ROMInfo *romInfo);
+
+ // Allows retrieving a NULL-terminated list of ROMInfos for a range of types and pairTypes
+ // (specified by bitmasks)
+ // Useful for GUI/console app to output information on what ROMs it supports
+ static const ROMInfo** getROMInfoList(unsigned int types, unsigned int pairTypes);
+
+ // Frees the list of ROMInfos given
+ static void freeROMInfoList(const ROMInfo **romInfos);
+};
+
+// Synth::open() is to require a full control ROMImage and a full PCM ROMImage to work
+
+class ROMImage {
+private:
+ Common::File *file;
+ const ROMInfo *romInfo;
+
+public:
+
+ // Creates a ROMImage object given a ROMInfo and a File. Keeps a reference
+ // to the File and ROMInfo given, which must be freed separately by the user
+ // after the ROMImage is freed
+ static const ROMImage* makeROMImage(Common::File *file);
+
+ // Must only be done after all Synths using the ROMImage are deleted
+ static void freeROMImage(const ROMImage *romImage);
+
+ Common::File *getFile() const;
+ const ROMInfo *getROMInfo() const;
+};
+
+}
+
+#endif
diff --git a/audio/softsynth/mt32/Structures.h b/audio/softsynth/mt32/Structures.h
index cbce89ae18..43d2d1f226 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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 f37d76cd85..b7af992b99 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -27,8 +27,10 @@
#include "mmath.h"
#include "PartialManager.h"
-#if MT32EMU_USE_AREVERBMODEL == 1
+#if MT32EMU_USE_REVERBMODEL == 1
#include "AReverbModel.h"
+#elif MT32EMU_USE_REVERBMODEL == 2
+#include "BReverbModel.h"
#else
#include "FreeverbModel.h"
#endif
@@ -140,22 +142,36 @@ Bit8u Synth::calcSysexChecksum(const Bit8u *data, Bit32u len, Bit8u checksum) {
return checksum;
}
-Synth::Synth() {
+Synth::Synth(ReportHandler *useReportHandler) {
isOpen = false;
reverbEnabled = true;
reverbOverridden = false;
-#if MT32EMU_USE_AREVERBMODEL == 1
- reverbModels[0] = new AReverbModel(&AReverbModel::REVERB_MODE_0_SETTINGS);
- reverbModels[1] = new AReverbModel(&AReverbModel::REVERB_MODE_1_SETTINGS);
- reverbModels[2] = new AReverbModel(&AReverbModel::REVERB_MODE_2_SETTINGS);
+ if (useReportHandler == NULL) {
+ reportHandler = new ReportHandler;
+ isDefaultReportHandler = true;
+ } else {
+ reportHandler = useReportHandler;
+ isDefaultReportHandler = false;
+ }
+
+#if MT32EMU_USE_REVERBMODEL == 1
+ reverbModels[REVERB_MODE_ROOM] = new AReverbModel(REVERB_MODE_ROOM);
+ reverbModels[REVERB_MODE_HALL] = new AReverbModel(REVERB_MODE_HALL);
+ reverbModels[REVERB_MODE_PLATE] = new AReverbModel(REVERB_MODE_PLATE);
+ reverbModels[REVERB_MODE_TAP_DELAY] = new DelayReverb();
+#elif MT32EMU_USE_REVERBMODEL == 2
+ 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);
#else
- reverbModels[0] = new FreeverbModel(0.76f, 0.687770909f, 0.63f, 0, 0.5f);
- reverbModels[1] = new FreeverbModel(2.0f, 0.712025098f, 0.86f, 1, 0.5f);
- reverbModels[2] = new FreeverbModel(0.4f, 0.939522749f, 0.38f, 2, 0.05f);
+ reverbModels[REVERB_MODE_ROOM] = new FreeverbModel(0.76f, 0.687770909f, 0.63f, 0, 0.5f);
+ reverbModels[REVERB_MODE_HALL] = new FreeverbModel(2.0f, 0.712025098f, 0.86f, 1, 0.5f);
+ reverbModels[REVERB_MODE_PLATE] = new FreeverbModel(0.4f, 0.939522749f, 0.38f, 2, 0.05f);
+ reverbModels[REVERB_MODE_TAP_DELAY] = new DelayReverb();
#endif
- reverbModels[3] = new DelayReverb();
reverbModel = NULL;
setDACInputMode(DACInputMode_NICE);
setOutputGain(1.0f);
@@ -170,31 +186,49 @@ Synth::~Synth() {
for (int i = 0; i < 4; i++) {
delete reverbModels[i];
}
+ if (isDefaultReportHandler) {
+ delete reportHandler;
+ }
+}
+
+void ReportHandler::showLCDMessage(const char *data) {
+ printf("WRITE-LCD: %s", data);
+ printf("\n");
}
-int Synth::report(ReportType type, const void *data) {
- if (myProp.report != NULL) {
- return myProp.report(myProp.userData, type, data);
+void ReportHandler::printDebug(const char *fmt, va_list list) {
+ vprintf(fmt, list);
+ printf("\n");
+}
+
+void Synth::partStateChanged(int partNum, bool isPartActive) {
+ reportHandler->onPartStateChanged(partNum, isPartActive);
+}
+
+void Synth::polyStateChanged(int partNum) {
+ reportHandler->onPolyStateChanged(partNum);
+}
+
+void Synth::partialStateChanged(const Partial * const partial, int oldPartialPhase, int newPartialPhase) {
+ for (int i = 0; i < MT32EMU_MAX_PARTIALS; i++) {
+ if (getPartial(i) == partial) {
+ reportHandler->onPartialStateChanged(i, oldPartialPhase, newPartialPhase);
+ break;
+ }
}
- return 0;
}
-unsigned int Synth::getSampleRate() const {
- return myProp.sampleRate;
+void Synth::newTimbreSet(int partNum, char patchName[]) {
+ reportHandler->onProgramChanged(partNum, patchName);
}
void Synth::printDebug(const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
- if (myProp.printDebug != NULL) {
- myProp.printDebug(myProp.userData, fmt, ap);
- } else {
#if MT32EMU_DEBUG_SAMPLESTAMPS > 0
- printf("[%u] ", renderedSampleCount);
+ reportHandler->printDebug("[%u] ", renderedSampleCount);
#endif
- vprintf(fmt, ap);
- printf("\n");
- }
+ reportHandler->printDebug(fmt, ap);
va_end(ap);
}
@@ -244,80 +278,60 @@ void Synth::setReverbOutputGain(float newReverbOutputGain) {
reverbOutputGain = newReverbOutputGain;
}
-Common::File *Synth::openFile(const char *filename) {
- if (myProp.openFile != NULL) {
- return myProp.openFile(myProp.userData, filename);
- }
- char pathBuf[2048];
- if (myProp.baseDir != NULL) {
- strcpy(&pathBuf[0], myProp.baseDir);
- strcat(&pathBuf[0], filename);
- filename = pathBuf;
- }
- Common::File *file = new Common::File();
- if (!file->open(filename)) {
- delete file;
- return NULL;
- }
- return file;
-}
-
-void Synth::closeFile(Common::File *file) {
- if (myProp.closeFile != NULL) {
- myProp.closeFile(myProp.userData, file);
- } else {
- file->close();
- delete file;
- }
-}
-
-LoadResult Synth::loadControlROM(const char *filename) {
- Common::File *file = openFile(filename); // ROM File
- if (file == NULL) {
- return LoadResult_NotFound;
- }
- size_t fileSize = file->size();
- if (fileSize != CONTROL_ROM_SIZE) {
- printDebug("Control ROM file %s size mismatch: %i", filename, fileSize);
+bool Synth::loadControlROM(const ROMImage &controlROMImage) {
+ if (&controlROMImage == NULL) return false;
+ Common::File *file = controlROMImage.getFile();
+ const ROMInfo *controlROMInfo = controlROMImage.getROMInfo();
+ if ((controlROMInfo == NULL)
+ || (controlROMInfo->type != ROMInfo::Control)
+ || (controlROMInfo->pairType != ROMInfo::Full)) {
+ return false;
}
+#if MT32EMU_MONITOR_INIT
+ printDebug("Found Control ROM: %s, %s", controlROMInfo->shortName, controlROMInfo->description);
+#endif
file->read(controlROMData, CONTROL_ROM_SIZE);
- if (file->err()) {
- closeFile(file);
- return LoadResult_Unreadable;
- }
- closeFile(file);
// Control ROM successfully loaded, now check whether it's a known type
controlROMMap = NULL;
for (unsigned int i = 0; i < sizeof(ControlROMMaps) / sizeof(ControlROMMaps[0]); i++) {
if (memcmp(&controlROMData[ControlROMMaps[i].idPos], ControlROMMaps[i].idBytes, ControlROMMaps[i].idLen) == 0) {
controlROMMap = &ControlROMMaps[i];
- return LoadResult_OK;
+ return true;
}
}
- printDebug("%s does not match a known control ROM type", filename);
- return LoadResult_Invalid;
+#if MT32EMU_MONITOR_INIT
+ printDebug("Control ROM failed to load");
+#endif
+ return false;
}
-LoadResult Synth::loadPCMROM(const char *filename) {
- Common::File *file = openFile(filename); // ROM File
- if (file == NULL) {
- return LoadResult_NotFound;
+bool Synth::loadPCMROM(const ROMImage &pcmROMImage) {
+ if (&pcmROMImage == NULL) return false;
+ Common::File *file = pcmROMImage.getFile();
+ const ROMInfo *pcmROMInfo = pcmROMImage.getROMInfo();
+ if ((pcmROMInfo == NULL)
+ || (pcmROMInfo->type != ROMInfo::PCM)
+ || (pcmROMInfo->pairType != ROMInfo::Full)) {
+ return false;
}
+#if MT32EMU_MONITOR_INIT
+ printDebug("Found PCM ROM: %s, %s", pcmROMInfo->shortName, pcmROMInfo->description);
+#endif
size_t fileSize = file->size();
- if (fileSize < (size_t)(2 * pcmROMSize)) {
- printDebug("PCM ROM file is too short (expected %d, got %d)", 2 * pcmROMSize, fileSize);
- closeFile(file);
- return LoadResult_Invalid;
- }
- if (file->err()) {
- closeFile(file);
- return LoadResult_Unreadable;
+ if (fileSize != (2 * pcmROMSize)) {
+#if MT32EMU_MONITOR_INIT
+ printDebug("PCM ROM file has wrong size (expected %d, got %d)", 2 * pcmROMSize, fileSize);
+#endif
+ return false;
}
- LoadResult rc = LoadResult_OK;
- for (int i = 0; i < pcmROMSize; i++) {
- Bit8u s = file->readByte();
- Bit8u c = file->readByte();
+
+ byte *buffer = new byte[file->size()];
+ file->read(buffer, file->size());
+ const byte *fileData = buffer;
+ for (size_t i = 0; i < pcmROMSize; i++) {
+ Bit8u s = *(fileData++);
+ Bit8u c = *(fileData++);
int order[16] = {0, 9, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 8};
@@ -331,28 +345,20 @@ LoadResult Synth::loadPCMROM(const char *filename) {
}
log = log | (short)(bit << (15 - u));
}
- bool negative = log < 0;
- log &= 0x7FFF;
-
- // CONFIRMED from sample analysis to be 99.99%+ accurate with current TVA multiplier
- float lin = EXP2F((32787 - log) / -2048.0f);
+ pcmROMData[i] = log;
+ }
- if (negative) {
- lin = -lin;
- }
+ delete[] buffer;
- pcmROMData[i] = lin;
- }
- closeFile(file);
- return rc;
+ return true;
}
bool Synth::initPCMList(Bit16u mapAddress, Bit16u count) {
ControlROMPCMStruct *tps = (ControlROMPCMStruct *)&controlROMData[mapAddress];
for (int i = 0; i < count; i++) {
- int rAddr = tps[i].pos * 0x800;
- int rLenExp = (tps[i].len & 0x70) >> 4;
- int rLen = 0x800 << rLenExp;
+ size_t rAddr = tps[i].pos * 0x800;
+ size_t rLenExp = (tps[i].len & 0x70) >> 4;
+ size_t rLen = 0x800 << rLenExp;
if (rAddr + rLen > pcmROMSize) {
printDebug("Control ROM error: Wave map entry %d points to invalid PCM address 0x%04X, length 0x%04X", i, rAddr, rLen);
return false;
@@ -414,12 +420,11 @@ bool Synth::initTimbres(Bit16u mapAddress, Bit16u offset, int count, int startTi
return true;
}
-bool Synth::open(SynthProperties &useProp) {
+bool Synth::open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage) {
if (isOpen) {
return false;
}
prerenderReadIx = prerenderWriteIx = 0;
- myProp = useProp;
#if MT32EMU_MONITOR_INIT
printDebug("Initialising Constant Tables");
#endif
@@ -428,11 +433,6 @@ bool Synth::open(SynthProperties &useProp) {
reverbModels[i]->open(useProp.sampleRate);
}
#endif
- if (useProp.baseDir != NULL) {
- char *baseDirCopy = new char[strlen(useProp.baseDir) + 1];
- strcpy(baseDirCopy, useProp.baseDir);
- myProp.baseDir = baseDirCopy;
- }
// This is to help detect bugs
memset(&mt32ram, '?', sizeof(mt32ram));
@@ -440,12 +440,10 @@ bool Synth::open(SynthProperties &useProp) {
#if MT32EMU_MONITOR_INIT
printDebug("Loading Control ROM");
#endif
- if (loadControlROM("CM32L_CONTROL.ROM") != LoadResult_OK) {
- if (loadControlROM("MT32_CONTROL.ROM") != LoadResult_OK) {
- printDebug("Init Error - Missing or invalid MT32_CONTROL.ROM");
- //report(ReportType_errorControlROM, &errno);
- return false;
- }
+ if (!loadControlROM(controlROMImage)) {
+ printDebug("Init Error - Missing or invalid Control ROM image");
+ reportHandler->onErrorControlROM();
+ return false;
}
initMemoryRegions();
@@ -454,17 +452,15 @@ bool Synth::open(SynthProperties &useProp) {
// 1MB PCM ROM for CM-32L, LAPC-I, CM-64, CM-500
// Note that the size below is given in samples (16-bit), not bytes
pcmROMSize = controlROMMap->pcmCount == 256 ? 512 * 1024 : 256 * 1024;
- pcmROMData = new float[pcmROMSize];
+ pcmROMData = new Bit16s[pcmROMSize];
#if MT32EMU_MONITOR_INIT
printDebug("Loading PCM ROM");
#endif
- if (loadPCMROM("CM32L_PCM.ROM") != LoadResult_OK) {
- if (loadPCMROM("MT32_PCM.ROM") != LoadResult_OK) {
- printDebug("Init Error - Missing MT32_PCM.ROM");
- //report(ReportType_errorPCMROM, &errno);
- return false;
- }
+ if (!loadPCMROM(pcmROMImage)) {
+ printDebug("Init Error - Missing PCM ROM image");
+ reportHandler->onErrorPCMROM();
+ return false;
}
#if MT32EMU_MONITOR_INIT
@@ -593,9 +589,6 @@ void Synth::close() {
parts[i] = NULL;
}
- delete[] myProp.baseDir;
- myProp.baseDir = NULL;
-
delete[] pcmWaves;
delete[] pcmROMData;
@@ -1182,7 +1175,7 @@ void Synth::writeMemoryRegion(const MemoryRegion *region, Bit32u addr, Bit32u le
case MR_System:
region->write(0, off, data, len);
- report(ReportType_devReconfig, NULL);
+ reportHandler->onDeviceReconfig();
// FIXME: We haven't properly confirmed any of this behaviour
// In particular, we tend to reset things such as reverb even if the write contained
// the same parameters as were already set, which may be wrong.
@@ -1220,7 +1213,7 @@ void Synth::writeMemoryRegion(const MemoryRegion *region, Bit32u addr, Bit32u le
#if MT32EMU_MONITOR_SYSEX > 0
printDebug("WRITE-LCD: %s", buf);
#endif
- report(ReportType_lcdMessage, buf);
+ reportHandler->showLCDMessage(buf);
break;
case MR_Reset:
reset();
@@ -1248,9 +1241,9 @@ void Synth::refreshSystemReverbParameters() {
#endif
return;
}
- report(ReportType_newReverbMode, &mt32ram.system.reverbMode);
- report(ReportType_newReverbTime, &mt32ram.system.reverbTime);
- report(ReportType_newReverbLevel, &mt32ram.system.reverbLevel);
+ reportHandler->onNewReverbMode(mt32ram.system.reverbMode);
+ reportHandler->onNewReverbTime(mt32ram.system.reverbTime);
+ reportHandler->onNewReverbLevel(mt32ram.system.reverbLevel);
ReverbModel *newReverbModel = reverbModels[mt32ram.system.reverbMode];
#if MT32EMU_REDUCE_REVERB_MEMORY
@@ -1258,7 +1251,7 @@ void Synth::refreshSystemReverbParameters() {
if (reverbModel != NULL) {
reverbModel->close();
}
- newReverbModel->open(myProp.sampleRate);
+ newReverbModel->open();
}
#endif
reverbModel = newReverbModel;
@@ -1313,7 +1306,7 @@ void Synth::reset() {
#if MT32EMU_MONITOR_SYSEX > 0
printDebug("RESET");
#endif
- report(ReportType_devReset, NULL);
+ reportHandler->onDeviceReset();
partialManager->deactivateAll();
mt32ram = mt32default;
for (int i = 0; i < 9; i++) {
diff --git a/audio/softsynth/mt32/Synth.h b/audio/softsynth/mt32/Synth.h
index a30df62911..56e88e6156 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -26,6 +26,7 @@ class TableInitialiser;
class Partial;
class PartialManager;
class Part;
+class ROMImage;
/**
* Methods for emulating the connection between the LA32 and the DAC, which involves
@@ -57,71 +58,6 @@ enum DACInputMode {
DACInputMode_GENERATION2
};
-enum ReportType {
- // Errors
- ReportType_errorControlROM = 1,
- ReportType_errorPCMROM,
- ReportType_errorSampleRate,
-
- // Progress
- ReportType_progressInit,
-
- // HW spec
- ReportType_availableSSE,
- ReportType_available3DNow,
- ReportType_usingSSE,
- ReportType_using3DNow,
-
- // General info
- ReportType_lcdMessage,
- ReportType_devReset,
- ReportType_devReconfig,
- ReportType_newReverbMode,
- ReportType_newReverbTime,
- ReportType_newReverbLevel
-};
-
-enum LoadResult {
- LoadResult_OK,
- LoadResult_NotFound,
- LoadResult_Unreadable,
- LoadResult_Invalid
-};
-
-struct SynthProperties {
- // Sample rate to use in mixing
- unsigned int sampleRate;
-
- // Deprecated - ignored. Use Synth::setReverbEnabled() instead.
- bool useReverb;
- // Deprecated - ignored. Use Synth::setReverbOverridden() instead.
- bool useDefaultReverb;
- // Deprecated - ignored. Use Synth::playSysex*() to configure reverb instead.
- unsigned char reverbType;
- // Deprecated - ignored. Use Synth::playSysex*() to configure reverb instead.
- unsigned char reverbTime;
- // Deprecated - ignored. Use Synth::playSysex*() to configure reverb instead.
- unsigned char reverbLevel;
- // The name of the directory in which the ROM and data files are stored (with trailing slash/backslash)
- // Not used if "openFile" is set. May be NULL in any case.
- const char *baseDir;
- // This is used as the first argument to all callbacks
- void *userData;
- // Callback for reporting various errors and information. May be NULL
- int (*report)(void *userData, ReportType type, const void *reportData);
- // Callback for debug messages, in vprintf() format
- void (*printDebug)(void *userData, const char *fmt, va_list list);
- // Callback for providing an implementation of File, opened and ready for use
- // May be NULL, in which case a default implementation will be used.
- Common::File *(*openFile)(void *userData, const char *filename);
- // Callback for closing a File. May be NULL, in which case the File will automatically be close()d/deleted.
- void (*closeFile)(void *userData, Common::File *file);
-};
-
-// This is the specification of the Callback routine used when calling the RecalcWaveforms
-// function
-typedef void (*recalcStatusCallback)(int percDone);
-
typedef void (*FloatToBit16sFunc)(Bit16s *target, const float *source, Bit32u len, float outputGain);
const Bit8u SYSEX_MANUFACTURER_ROLAND = 0x41;
@@ -179,6 +115,13 @@ enum MemoryRegionType {
MR_PatchTemp, MR_RhythmTemp, MR_TimbreTemp, MR_Patches, MR_Timbres, MR_System, MR_Display, MR_Reset
};
+enum ReverbMode {
+ REVERB_MODE_ROOM,
+ REVERB_MODE_HALL,
+ REVERB_MODE_PLATE,
+ REVERB_MODE_TAP_DELAY
+};
+
class MemoryRegion {
private:
Synth *synth;
@@ -278,7 +221,7 @@ class ReverbModel {
public:
virtual ~ReverbModel() {}
// After construction or a close(), open() will be called at least once before any other call (with the exception of close()).
- virtual void open(unsigned int sampleRate) = 0;
+ virtual void open() = 0;
// May be called multiple times without an open() in between.
virtual void close() = 0;
virtual void setParameters(Bit8u time, Bit8u level) = 0;
@@ -286,6 +229,32 @@ public:
virtual bool isActive() const = 0;
};
+class ReportHandler {
+friend class Synth;
+
+public:
+ virtual ~ReportHandler() {}
+
+protected:
+
+ // Callback for debug messages, in vprintf() format
+ virtual void printDebug(const char *fmt, va_list list);
+
+ // Callbacks for reporting various errors and information
+ virtual void onErrorControlROM() {}
+ virtual void onErrorPCMROM() {}
+ virtual void showLCDMessage(const char *message);
+ virtual void onDeviceReset() {}
+ virtual void onDeviceReconfig() {}
+ virtual void onNewReverbMode(Bit8u /* mode */) {}
+ virtual void onNewReverbTime(Bit8u /* time */) {}
+ virtual void onNewReverbLevel(Bit8u /* level */) {}
+ virtual void onPartStateChanged(int /* partNum */, bool /* isActive */) {}
+ virtual void onPolyStateChanged(int /* partNum */) {}
+ virtual void onPartialStateChanged(int /* partialNum */, int /* oldPartialPhase */, int /* newPartialPhase */) {}
+ virtual void onProgramChanged(int /* partNum */, char * /* patchName */) {}
+};
+
class Synth {
friend class Part;
friend class RhythmPart;
@@ -314,8 +283,8 @@ private:
const ControlROMMap *controlROMMap;
Bit8u controlROMData[CONTROL_ROM_SIZE];
- float *pcmROMData;
- int pcmROMSize; // This is in 16-bit samples, therefore half the number of bytes in the ROM
+ Bit16s *pcmROMData;
+ size_t pcmROMSize; // This is in 16-bit samples, therefore half the number of bytes in the ROM
Bit8s chantable[32];
@@ -336,6 +305,9 @@ private:
bool isOpen;
+ bool isDefaultReportHandler;
+ ReportHandler *reportHandler;
+
PartialManager *partialManager;
Part *parts[9];
@@ -368,8 +340,6 @@ private:
int prerenderReadIx;
int prerenderWriteIx;
- SynthProperties myProp;
-
bool prerender();
void copyPrerender(Bit16s *nonReverbLeft, Bit16s *nonReverbRight, Bit16s *reverbDryLeft, Bit16s *reverbDryRight, Bit16s *reverbWetLeft, Bit16s *reverbWetRight, Bit32u pos, Bit32u len);
void checkPrerender(Bit16s *nonReverbLeft, Bit16s *nonReverbRight, Bit16s *reverbDryLeft, Bit16s *reverbDryRight, Bit16s *reverbWetLeft, Bit16s *reverbWetRight, Bit32u &pos, Bit32u &len);
@@ -383,8 +353,8 @@ private:
void writeMemoryRegion(const MemoryRegion *region, Bit32u addr, Bit32u len, const Bit8u *data);
void readMemoryRegion(const MemoryRegion *region, Bit32u addr, Bit32u len, Bit8u *data);
- LoadResult loadControlROM(const char *filename);
- LoadResult loadPCMROM(const char *filename);
+ bool loadControlROM(const ROMImage &controlROMImage);
+ bool loadPCMROM(const ROMImage &pcmROMImage);
bool initPCMList(Bit16u mapAddress, Bit16u count);
bool initTimbres(Bit16u mapAddress, Bit16u offset, int timbreCount, int startTimbre, bool compressed);
@@ -398,24 +368,25 @@ private:
void refreshSystem();
void reset();
- unsigned int getSampleRate() const;
-
void printPartialUsage(unsigned long sampleOffset = 0);
-protected:
- int report(ReportType type, const void *reportData);
- Common::File *openFile(const char *filename);
- void closeFile(Common::File *file);
+
+ void partStateChanged(int partNum, bool isPartActive);
+ void polyStateChanged(int partNum);
+ void partialStateChanged(const Partial * const partial, int oldPartialPhase, int newPartialPhase);
+ void newTimbreSet(int partNum, char patchName[]);
void printDebug(const char *fmt, ...);
public:
static Bit8u calcSysexChecksum(const Bit8u *data, Bit32u len, Bit8u checksum);
- Synth();
+ // Optionally sets callbacks for reporting various errors, information and debug messages
+ Synth(ReportHandler *useReportHandler = NULL);
~Synth();
// Used to initialise the MT-32. Must be called before any other function.
// Returns true if initialization was sucessful, otherwise returns false.
- bool open(SynthProperties &useProp);
+ // controlROMImage and pcmROMImage represent Control and PCM ROM images for use by synth.
+ bool open(const ROMImage &controlROMImage, const ROMImage &pcmROMImage);
// Closes the MT-32 and deallocates any memory used by the synthesizer
void close(void);
diff --git a/audio/softsynth/mt32/TVA.cpp b/audio/softsynth/mt32/TVA.cpp
index c581259a38..65e5256048 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -30,10 +30,13 @@ namespace MT32Emu {
static Bit8u biasLevelToAmpSubtractionCoeff[13] = {255, 187, 137, 100, 74, 54, 40, 29, 21, 15, 10, 5, 0};
TVA::TVA(const Partial *usePartial, LA32Ramp *useAmpRamp) :
- partial(usePartial), ampRamp(useAmpRamp), system_(&usePartial->getSynth()->mt32ram.system) {
+ partial(usePartial), ampRamp(useAmpRamp), system_(&usePartial->getSynth()->mt32ram.system), phase(TVA_PHASE_DEAD) {
}
void TVA::startRamp(Bit8u newTarget, Bit8u newIncrement, int newPhase) {
+ if (newPhase != phase) {
+ partial->getSynth()->partialStateChanged(partial, phase, newPhase);
+ }
target = newTarget;
phase = newPhase;
ampRamp->startRamp(newTarget, newIncrement);
@@ -43,6 +46,9 @@ void TVA::startRamp(Bit8u newTarget, Bit8u newIncrement, int newPhase) {
}
void TVA::end(int newPhase) {
+ if (newPhase != phase) {
+ partial->getSynth()->partialStateChanged(partial, phase, newPhase);
+ }
phase = newPhase;
playing = false;
#if MT32EMU_MONITOR_TVA >= 1
@@ -274,7 +280,7 @@ void TVA::nextPhase() {
}
int newTarget;
- int newIncrement = 0;
+ int newIncrement = 0; // Initialised to please compilers
int envPointIndex = phase;
if (!allLevelsZeroFromNowOn) {
diff --git a/audio/softsynth/mt32/TVA.h b/audio/softsynth/mt32/TVA.h
index a104fe4c1f..e6e5cc4bc7 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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 47c4917632..49a0d85c9e 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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 490d8de504..22d81da7b0 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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 32a6067841..c3e64c18d0 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -47,12 +47,11 @@ static Bit16u keyToPitchTable[] = {
TVP::TVP(const Partial *usePartial) :
partial(usePartial), system_(&usePartial->getSynth()->mt32ram.system) {
- unsigned int sampleRate = usePartial->getSynth()->myProp.sampleRate;
// We want to do processing 4000 times per second. FIXME: This is pretty arbitrary.
- maxCounter = sampleRate / 4000;
+ maxCounter = SAMPLE_RATE / 4000;
// The timer runs at 500kHz. We only need to bother updating it every maxCounter samples, before we do processing.
// This is how much to increment it by every maxCounter samples.
- processTimerIncrement = 500000 * maxCounter / sampleRate;
+ processTimerIncrement = 500000 * maxCounter / SAMPLE_RATE;
}
static Bit16s keyToPitch(unsigned int key) {
diff --git a/audio/softsynth/mt32/TVP.h b/audio/softsynth/mt32/TVP.h
index f6f62f8d39..cd5fb4cdc7 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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 b6e63840bc..743820b1f8 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -72,36 +72,25 @@ Tables::Tables() {
//synth->printDebug("%d: %d", i, pulseWidth100To255[i]);
}
- // Ratio of negative segment to wave length
- for (int i = 0; i < 128; i++) {
- // Formula determined from sample analysis.
- float pt = 0.5f / 127.0f * i;
- pulseLenFactor[i] = (1.241857812f - pt) * pt; // seems to be 2 ^ (5 / 16) = 1.241857812f
+ // The LA32 chip contains an exponent table inside. The table contains 12-bit integer values.
+ // The actual table size is 512 rows. The 9 higher bits of the fractional part of the argument are used as a lookup address.
+ // To improve the precision of computations, the lower bits are supposed to be used for interpolation as the LA32 chip also
+ // contains another 512-row table with inverted differences between the main table values.
+ for (int i = 0; i < 512; i++) {
+ exp9[i] = Bit16u(8191.5f - EXP2F(13.0f + ~i / 512.0f));
}
- // The LA32 chip presumably has such a table inside as the internal computaions seem to be performed using fixed point math with 12-bit fractions
- for (int i = 0; i < 4096; i++) {
- exp2[i] = EXP2F(i / 4096.0f);
+ // There is a logarithmic sine table inside the LA32 chip. The table contains 13-bit integer values.
+ for (int i = 1; i < 512; i++) {
+ logsin9[i] = Bit16u(0.5f - LOG2F(sin((i + 0.5f) / 1024.0f * FLOAT_PI)) * 1024.0f);
}
- // found from sample analysis
- for (int i = 0; i < 32; i++) {
- resAmpMax[i] = EXP2F(1.0f - (32 - i) / 4.0f);
- }
+ // The very first value is clamped to the maximum possible 13-bit integer
+ logsin9[0] = 8191;
// found from sample analysis
- resAmpFadeFactor[7] = 1.0f / 8.0f;
- resAmpFadeFactor[6] = 2.0f / 8.0f;
- resAmpFadeFactor[5] = 3.0f / 8.0f;
- resAmpFadeFactor[4] = 5.0f / 8.0f;
- resAmpFadeFactor[3] = 8.0f / 8.0f;
- resAmpFadeFactor[2] = 12.0f / 8.0f;
- resAmpFadeFactor[1] = 16.0f / 8.0f;
- resAmpFadeFactor[0] = 31.0f / 8.0f;
-
- for (int i = 0; i < 5120; i++) {
- sinf10[i] = sin(FLOAT_PI * i / 2048.0f);
- }
+ static const Bit8u resAmpDecayFactorTable[] = {31, 16, 12, 8, 5, 3, 2, 1};
+ resAmpDecayFactor = resAmpDecayFactorTable;
}
}
diff --git a/audio/softsynth/mt32/Tables.h b/audio/softsynth/mt32/Tables.h
index a63eaf6d26..8b4580df0e 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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,7 +20,9 @@
namespace MT32Emu {
-// Sample rate to use in mixing
+// Sample rate to use in mixing. With the progress of development, we've found way too many thing dependent.
+// In order to achieve further advance in emulation accuracy, sample rate made fixed throughout the emulator.
+// The output from the synth is supposed to be resampled to convert the sample rate.
const unsigned int SAMPLE_RATE = 32000;
const int MIDDLEC = 60;
@@ -54,11 +56,10 @@ public:
// CONFIRMED:
Bit8u pulseWidth100To255[101];
- float exp2[4096];
- float pulseLenFactor[128];
- float resAmpMax[32];
- float resAmpFadeFactor[8];
- float sinf10[5120];
+ Bit16u exp9[512];
+ Bit16u logsin9[512];
+
+ const Bit8u *resAmpDecayFactor;
};
}
diff --git a/audio/softsynth/mt32/mmath.h b/audio/softsynth/mt32/mmath.h
index 25c79d57a9..ee6a652c36 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -52,10 +52,6 @@ static inline float EXP2F(float x) {
#endif
}
-static inline float EXP2I(unsigned int i) {
- return float(1 << (i >> 12)) * Tables::getInstance().exp2[i & 0x0FFF];
-}
-
static inline float EXP10F(float x) {
return exp(FLOAT_LN_10 * x);
}
diff --git a/audio/softsynth/mt32/module.mk b/audio/softsynth/mt32/module.mk
index 995e450076..e7afdfd2b4 100644
--- a/audio/softsynth/mt32/module.mk
+++ b/audio/softsynth/mt32/module.mk
@@ -2,13 +2,17 @@ MODULE := audio/softsynth/mt32
MODULE_OBJS := \
AReverbModel.o \
+ BReverbModel.o \
DelayReverb.o \
FreeverbModel.o \
LA32Ramp.o \
+ LA32WaveGenerator.o \
+ LegacyWaveGenerator.o \
Part.o \
Partial.o \
PartialManager.o \
Poly.o \
+ ROMInfo.o \
Synth.o \
TVA.o \
TVF.o \
diff --git a/audio/softsynth/mt32/mt32emu.h b/audio/softsynth/mt32/mt32emu.h
index f10bc1faab..971a0886d5 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 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011, 2012, 2013 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
@@ -59,20 +59,6 @@
#define MT32EMU_MONITOR_TVA 0
#define MT32EMU_MONITOR_TVF 0
-// The WG algorithm involves dozens of transcendent maths, e.g. exponents and trigonometry.
-// Unfortunately, the majority of systems perform such computations inefficiently,
-// standard math libs and FPUs make no optimisations for single precision floats,
-// and use no LUTs to speedup computing internal taylor series. Though, there're rare exceptions,
-// and there's a hope it will become common soon.
-// So, this is the crucial point of speed optimisations. We have now eliminated all the transcendent maths
-// within the critical path and use LUTs instead.
-// Besides, since the LA32 chip is assumed to use similar LUTs inside, the overall emulation accuracy should be better.
-// 0: Use LUTs to speedup WG. Most common setting. You can expect about 50% performance boost.
-// 1: Use precise float math. Use this setting to achieve more accurate wave generator. If your system performs better with this setting, it is really notable. :)
-#define MT32EMU_ACCURATE_WG 0
-
-#define MT32EMU_USE_EXTINT 0
-
// Configuration
// The maximum number of partials playing simultaneously
#define MT32EMU_MAX_PARTIALS 32
@@ -84,9 +70,14 @@
// If zero, keeps reverb buffers for all modes around all the time to avoid allocating/freeing in the critical path.
#define MT32EMU_REDUCE_REVERB_MEMORY 1
-// 0: Use standard Freeverb
-// 1: Use AReverb (currently not properly tuned)
-#define MT32EMU_USE_AREVERBMODEL 0
+// 0: Use legacy Freeverb
+// 1: Use Accurate Reverb model aka AReverb
+// 2: Use Bit-perfect Boss Reverb model aka BReverb (for developers, not much practical use)
+#define MT32EMU_USE_REVERBMODEL 1
+
+// 0: Use refined wave generator based on logarithmic fixed-point computations and LUTs
+// 1: Use legacy accurate wave generator based on float computations
+#define MT32EMU_ACCURATE_WG 0
namespace MT32Emu
{
@@ -111,11 +102,14 @@ const unsigned int MAX_PRERENDER_SAMPLES = 1024;
#include "Tables.h"
#include "Poly.h"
#include "LA32Ramp.h"
+#include "LA32WaveGenerator.h"
+#include "LegacyWaveGenerator.h"
#include "TVA.h"
#include "TVP.h"
#include "TVF.h"
#include "Partial.h"
#include "Part.h"
+#include "ROMInfo.h"
#include "Synth.h"
#endif
diff --git a/audio/softsynth/opl/mame.cpp b/audio/softsynth/opl/mame.cpp
index c54f620a10..2db7d421b6 100644
--- a/audio/softsynth/opl/mame.cpp
+++ b/audio/softsynth/opl/mame.cpp
@@ -223,7 +223,7 @@ static int *ENV_CURVE;
/* multiple table */
-#define ML(a) (int)(a * 2)
+#define ML(a) (uint)(a * 2)
static const uint MUL_TABLE[16]= {
/* 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15 */
ML(0.50), ML(1.00), ML(2.00), ML(3.00), ML(4.00), ML(5.00), ML(6.00), ML(7.00),
diff --git a/audio/softsynth/sid.cpp b/audio/softsynth/sid.cpp
index 1ad822b86a..b6f1c87c4b 100644
--- a/audio/softsynth/sid.cpp
+++ b/audio/softsynth/sid.cpp
@@ -512,7 +512,7 @@ void Filter::enable_filter(bool enable) {
enabled = enable;
}
-void Filter::reset(){
+void Filter::reset() {
fc = 0;
res = 0;
diff --git a/backends/fs/ds/ds-fs.h b/backends/fs/ds/ds-fs.h
index a6a6b97870..862f4c39d2 100644
--- a/backends/fs/ds/ds-fs.h
+++ b/backends/fs/ds/ds-fs.h
@@ -226,6 +226,6 @@ void std_clearerr(FILE *handle);
int std_fflush(FILE *handle);
int std_ferror(FILE *handle);
-} // End of namespace DS
+} // End of namespace DS
#endif //_DS_FS_H
diff --git a/backends/graphics/opengl/gltexture.cpp b/backends/graphics/opengl/gltexture.cpp
index ce69dc4aab..ca674563df 100644
--- a/backends/graphics/opengl/gltexture.cpp
+++ b/backends/graphics/opengl/gltexture.cpp
@@ -108,9 +108,18 @@ void GLTexture::allocBuffer(GLuint w, GLuint h) {
_realWidth = w;
_realHeight = h;
- if (w <= _textureWidth && h <= _textureHeight && !_refresh)
- // Already allocated a sufficiently large buffer
- return;
+ if (!_refresh) {
+ if (npot_supported && _filter == GL_LINEAR) {
+ // Check if we already allocated a correctly-sized buffer
+ // This is so we don't need to duplicate the last row/column
+ if (w == _textureWidth && h == _textureHeight)
+ return;
+ } else {
+ // Check if we already have a large enough buffer
+ if (w <= _textureWidth && h <= _textureHeight)
+ return;
+ }
+ }
if (npot_supported) {
_textureWidth = w;
@@ -151,12 +160,37 @@ void GLTexture::updateBuffer(const void *buf, int pitch, GLuint x, GLuint y, GLu
} else {
// Update the texture row by row
const byte *src = (const byte *)buf;
+ GLuint curY = y;
+ GLuint height = h;
do {
- glTexSubImage2D(GL_TEXTURE_2D, 0, x, y,
+ glTexSubImage2D(GL_TEXTURE_2D, 0, x, curY,
w, 1, _glFormat, _glType, src); CHECK_GL_ERROR();
- ++y;
+ curY++;
src += pitch;
- } while (--h);
+ } while (--height);
+ }
+
+ // If we're in linear filter mode, repeat the last row/column if the real dimensions
+ // doesn't match the texture dimensions.
+ if (_filter == GL_LINEAR) {
+ if (_realWidth != _textureWidth && x + w == _realWidth) {
+ const byte *src = (const byte *)buf + (w - 1) * _bytesPerPixel;
+ GLuint curY = y;
+ GLuint height = h;
+
+ do {
+ glTexSubImage2D(GL_TEXTURE_2D, 0, x + w,
+ curY, 1, 1, _glFormat, _glType, src); CHECK_GL_ERROR();
+
+ curY++;
+ src += pitch;
+ } while (--height);
+ }
+
+ if (_realHeight != _textureHeight && y + h == _realHeight) {
+ glTexSubImage2D(GL_TEXTURE_2D, 0, x, y + h,
+ w, 1, _glFormat, _glType, (const byte *)buf + pitch * (h - 1)); CHECK_GL_ERROR();
+ }
}
}
@@ -177,10 +211,10 @@ void GLTexture::drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) {
// Calculate the screen rect where the texture will be drawn
const GLshort vertices[] = {
- x, y,
- x + w, y,
- x, y + h,
- x + w, y + h,
+ x, y,
+ (GLshort)(x + w), y,
+ x, (GLshort)(y + h),
+ (GLshort)(x + w), (GLshort)(y + h),
};
glVertexPointer(2, GL_SHORT, 0, vertices); CHECK_GL_ERROR();
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index fb964d6951..02e58ab319 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -968,7 +968,7 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
// If the shake position changed, fill the dirty area with blackness
if (_currentShakePos != _newShakePos ||
(_mouseNeedsRedraw && _mouseBackup.y <= _currentShakePos)) {
- SDL_Rect blackrect = {0, 0, _videoMode.screenWidth * _videoMode.scaleFactor, _newShakePos * _videoMode.scaleFactor};
+ SDL_Rect blackrect = {0, 0, (Uint16)(_videoMode.screenWidth * _videoMode.scaleFactor), (Uint16)(_newShakePos * _videoMode.scaleFactor)};
if (_videoMode.aspectRatioCorrection && !_overlayVisible)
blackrect.h = real2Aspect(blackrect.h - 1) + 1;
diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp
index 94262d0d92..e42b8ca313 100644
--- a/backends/midi/coreaudio.cpp
+++ b/backends/midi/coreaudio.cpp
@@ -102,6 +102,7 @@ public:
void sysEx(const byte *msg, uint16 length);
private:
+ void loadSoundFont(const char *soundfont);
AUGraph _auGraph;
AudioUnit _synth;
};
@@ -171,52 +172,8 @@ int MidiDriver_CORE::open() {
#endif
// Load custom soundfont, if specified
- if (ConfMan.hasKey("soundfont")) {
- const char *soundfont = ConfMan.get("soundfont").c_str();
-
- // TODO: We should really check whether the file contains an
- // actual soundfont...
-
-#if USE_DEPRECATED_COREAUDIO_API
- // Before 10.5, we need to use kMusicDeviceProperty_SoundBankFSSpec
- FSRef fsref;
- FSSpec fsSpec;
- err = FSPathMakeRef ((const byte *)soundfont, &fsref, NULL);
-
- if (err == noErr) {
- err = FSGetCatalogInfo (&fsref, kFSCatInfoNone, NULL, NULL, &fsSpec, NULL);
- }
-
- if (err == noErr) {
- err = AudioUnitSetProperty (
- _synth,
- kMusicDeviceProperty_SoundBankFSSpec, kAudioUnitScope_Global,
- 0,
- &fsSpec, sizeof(fsSpec)
- );
- }
-#else
- // kMusicDeviceProperty_SoundBankFSSpec is present on 10.6+, but broken
- // kMusicDeviceProperty_SoundBankURL was added in 10.5 as a replacement
- CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)soundfont, strlen(soundfont), false);
-
- if (url) {
- err = AudioUnitSetProperty (
- _synth,
- kMusicDeviceProperty_SoundBankURL, kAudioUnitScope_Global,
- 0,
- &url, sizeof(url)
- );
-
- CFRelease(url);
- } else {
- warning("Failed to allocate CFURLRef from '%s'", soundfont);
- }
-#endif
-
- if (err != noErr)
- error("Failed loading custom sound font '%s' (error %ld)", soundfont, (long)err);
- }
+ if (ConfMan.hasKey("soundfont"))
+ loadSoundFont(ConfMan.get("soundfont").c_str());
#ifdef COREAUDIO_DISABLE_REVERB
// Disable reverb mode, as that sucks up a lot of CPU power, which can
@@ -242,6 +199,74 @@ bail:
return MERR_CANNOT_CONNECT;
}
+void MidiDriver_CORE::loadSoundFont(const char *soundfont) {
+ // TODO: We should really check whether the file contains an
+ // actual soundfont...
+
+ OSStatus err = 0;
+
+#if USE_DEPRECATED_COREAUDIO_API
+ FSRef fsref;
+ err = FSPathMakeRef((const byte *)soundfont, &fsref, NULL);
+
+ SInt32 version;
+ err = Gestalt(gestaltSystemVersion, &version);
+
+ if (err == noErr) {
+ if (version >= 0x1030) {
+ // Use kMusicDeviceProperty_SoundBankFSRef in >= 10.3
+
+ // HACK HACK HACK HACK SUPER HACK: Using the value of 1012 instead of
+ // kMusicDeviceProperty_SoundBankFSRef so this compiles with the 10.2
+ // SDK (which does not have that symbol).
+ if (err == noErr) {
+ err = AudioUnitSetProperty(
+ _synth,
+ /*kMusicDeviceProperty_SoundBankFSRef*/ 1012, kAudioUnitScope_Global,
+ 0,
+ &fsref, sizeof(fsref)
+ );
+ }
+ } else {
+ // In 10.2, only kMusicDeviceProperty_SoundBankFSSpec is available
+ FSSpec fsSpec;
+
+ if (err == noErr)
+ err = FSGetCatalogInfo(&fsref, kFSCatInfoNone, NULL, NULL, &fsSpec, NULL);
+
+ if (err == noErr) {
+ err = AudioUnitSetProperty(
+ _synth,
+ kMusicDeviceProperty_SoundBankFSSpec, kAudioUnitScope_Global,
+ 0,
+ &fsSpec, sizeof(fsSpec)
+ );
+ }
+ }
+ }
+#else
+ // kMusicDeviceProperty_SoundBankURL was added in 10.5 as a replacement
+ // In addition, the File Manager API became deprecated starting in 10.8
+ CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)soundfont, strlen(soundfont), false);
+
+ if (url) {
+ err = AudioUnitSetProperty(
+ _synth,
+ kMusicDeviceProperty_SoundBankURL, kAudioUnitScope_Global,
+ 0,
+ &url, sizeof(url)
+ );
+
+ CFRelease(url);
+ } else {
+ warning("Failed to allocate CFURLRef from '%s'", soundfont);
+ }
+#endif // USE_DEPRECATED_COREAUDIO_API
+
+ if (err != noErr)
+ error("Failed loading custom sound font '%s' (error %ld)", soundfont, (long)err);
+}
+
void MidiDriver_CORE::close() {
MidiDriver_MPU401::close();
if (_auGraph) {
diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp
index 001309a777..3c79290b50 100644
--- a/backends/mixer/sdl/sdl-mixer.cpp
+++ b/backends/mixer/sdl/sdl-mixer.cpp
@@ -153,7 +153,7 @@ void SdlMixerManager::suspendAudio() {
int SdlMixerManager::resumeAudio() {
if (!_audioSuspended)
return -2;
- if (SDL_OpenAudio(&_obtained, NULL) < 0){
+ if (SDL_OpenAudio(&_obtained, NULL) < 0) {
return -1;
}
SDL_PauseAudio(0);
diff --git a/backends/platform/android/android.mk b/backends/platform/android/android.mk
index 0651fc796e..f498c671de 100644
--- a/backends/platform/android/android.mk
+++ b/backends/platform/android/android.mk
@@ -50,7 +50,7 @@ JAVACFLAGS = -source 1.5 -target 1.5
ANDROID_JAR = $(ANDROID_SDK)/platforms/android-14/android.jar
-PATH_BUILD = build.tmp
+PATH_BUILD = ./build.tmp
PATH_BUILD_ASSETS = $(PATH_BUILD)/assets
PATH_BUILD_CLASSES_MAIN_TOP = $(PATH_BUILD)/classes.main
PATH_BUILD_CLASSES_PLUGIN_TOP = $(PATH_BUILD)/classes.plugin
@@ -128,7 +128,7 @@ $(FILE_RESOURCES_MAIN): $(FILE_MANIFEST) $(RESOURCES) $(ANDROID_JAR) $(DIST_FILE
work_dir=`pwd`; \
for i in $(PATH_BUILD_ASSETS)/*.zip; do \
echo "recompress $$i"; \
- cd $$work_dir; \
+ cd "$$work_dir"; \
$(RM) -rf $(PATH_BUILD_ASSETS)/tmp; \
$(MKDIR) $(PATH_BUILD_ASSETS)/tmp; \
unzip -q $$i -d $(PATH_BUILD_ASSETS)/tmp; \
diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
index 34c6df3a3a..829a948435 100644
--- a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
+++ b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
@@ -160,7 +160,6 @@ public class ScummVMActivity extends Activity {
"ScummVM",
"--config=" + getFileStreamPath("scummvmrc").getPath(),
"--path=" + Environment.getExternalStorageDirectory().getPath(),
- "--gui-theme=scummmodern",
"--savepath=" + savePath
});
diff --git a/backends/platform/ds/arm9/source/blitters.cpp b/backends/platform/ds/arm9/source/blitters.cpp
index 1e8d56615d..ef2dc9c3b8 100644
--- a/backends/platform/ds/arm9/source/blitters.cpp
+++ b/backends/platform/ds/arm9/source/blitters.cpp
@@ -391,4 +391,4 @@ void Rescale_320x256x1555_To_256x256x1555(u16 *dest, const u16 *src, int destStr
}
}
-} // End of namespace DS
+} // End of namespace DS
diff --git a/backends/platform/ds/arm9/source/blitters.h b/backends/platform/ds/arm9/source/blitters.h
index 7700b4d68d..de6e218778 100644
--- a/backends/platform/ds/arm9/source/blitters.h
+++ b/backends/platform/ds/arm9/source/blitters.h
@@ -35,7 +35,7 @@ void asmCopy8Col(byte *dst, int dstPitch, const byte *src, int height);
void Rescale_320x256xPAL8_To_256x256x1555(u16 *dest, const u8 *src, int destStride, int srcStride, const u16 *palette);
void Rescale_320x256x1555_To_256x256x1555(u16 *dest, const u16 *src, int destStride, int srcStride);
-} // End of namespace DS
+} // End of namespace DS
#else
diff --git a/backends/platform/ds/arm9/source/cdaudio.cpp b/backends/platform/ds/arm9/source/cdaudio.cpp
index 6612e0f2da..277e1f4ae7 100644
--- a/backends/platform/ds/arm9/source/cdaudio.cpp
+++ b/backends/platform/ds/arm9/source/cdaudio.cpp
@@ -536,4 +536,4 @@ bool isPlaying() {
}
}
-} // End of namespace DS
+} // End of namespace DS
diff --git a/backends/platform/ds/arm9/source/cdaudio.h b/backends/platform/ds/arm9/source/cdaudio.h
index fc16f2f220..8a0e0c5174 100644
--- a/backends/platform/ds/arm9/source/cdaudio.h
+++ b/backends/platform/ds/arm9/source/cdaudio.h
@@ -38,6 +38,6 @@ bool isPlaying();
void update();
}
-} // End of namespace DS
+} // End of namespace DS
#endif
diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp
index cedbdcb167..830c782b90 100644
--- a/backends/platform/ds/arm9/source/dsmain.cpp
+++ b/backends/platform/ds/arm9/source/dsmain.cpp
@@ -3225,7 +3225,7 @@ int main(void) {
return 0;
}
-} // End of namespace DS
+} // End of namespace DS
int main() {
diff --git a/backends/platform/ds/arm9/source/dsmain.h b/backends/platform/ds/arm9/source/dsmain.h
index 9c0d326292..ad49ae276d 100644
--- a/backends/platform/ds/arm9/source/dsmain.h
+++ b/backends/platform/ds/arm9/source/dsmain.h
@@ -153,7 +153,7 @@ void* fastRamAlloc(int size);
void exitGame();
-} // End of namespace DS
+} // End of namespace DS
diff --git a/backends/platform/ds/arm9/source/dsoptions.cpp b/backends/platform/ds/arm9/source/dsoptions.cpp
index 7154d4ae3f..ac552bd826 100644
--- a/backends/platform/ds/arm9/source/dsoptions.cpp
+++ b/backends/platform/ds/arm9/source/dsoptions.cpp
@@ -432,4 +432,4 @@ void setOptions() {
firstLoad = false;
}
-} // End of namespace DS
+} // End of namespace DS
diff --git a/backends/platform/ds/arm9/source/dsoptions.h b/backends/platform/ds/arm9/source/dsoptions.h
index 9148060f4b..9949b8b7d2 100644
--- a/backends/platform/ds/arm9/source/dsoptions.h
+++ b/backends/platform/ds/arm9/source/dsoptions.h
@@ -78,6 +78,6 @@ protected:
extern void showOptionsDialog();
extern void setOptions();
-} // End of namespace DS
+} // End of namespace DS
#endif
diff --git a/backends/platform/ds/arm9/source/keys.cpp b/backends/platform/ds/arm9/source/keys.cpp
index aec7d57bda..fdb981dfe5 100644
--- a/backends/platform/ds/arm9/source/keys.cpp
+++ b/backends/platform/ds/arm9/source/keys.cpp
@@ -133,4 +133,4 @@ uint32 keysUp(void) {
}
-} // End of namespace DS
+} // End of namespace DS
diff --git a/backends/platform/ds/arm9/source/keys.h b/backends/platform/ds/arm9/source/keys.h
index 71c770dcd5..9d6b41c746 100644
--- a/backends/platform/ds/arm9/source/keys.h
+++ b/backends/platform/ds/arm9/source/keys.h
@@ -30,4 +30,4 @@ uint32 keysDownRepeat(void);
void keysSetRepeat(u8 setDelay, u8 setRepeat);
uint32 keysUp(void);
-} // End of namespace DS
+} // End of namespace DS
diff --git a/backends/platform/ds/arm9/source/scummhelp.cpp b/backends/platform/ds/arm9/source/scummhelp.cpp
index 112ba49d76..a3fdaacfaa 100644
--- a/backends/platform/ds/arm9/source/scummhelp.cpp
+++ b/backends/platform/ds/arm9/source/scummhelp.cpp
@@ -91,7 +91,7 @@ void updateStrings(byte gameId, byte version, Common::Platform platform,
}
-} // End of namespace DS
+} // End of namespace DS
diff --git a/backends/platform/ds/arm9/source/scummhelp.h b/backends/platform/ds/arm9/source/scummhelp.h
index 2735727560..41fc8f9c91 100644
--- a/backends/platform/ds/arm9/source/scummhelp.h
+++ b/backends/platform/ds/arm9/source/scummhelp.h
@@ -31,7 +31,7 @@ namespace DS {
void updateStrings(byte gameId, byte version, Common::Platform platform,
int page, Common::String &title, Common::String *&key, Common::String *&dsc);
-} // End of namespace DS
+} // End of namespace DS
#endif
diff --git a/backends/platform/ds/arm9/source/touchkeyboard.cpp b/backends/platform/ds/arm9/source/touchkeyboard.cpp
index 581509f939..77da9cc22a 100644
--- a/backends/platform/ds/arm9/source/touchkeyboard.cpp
+++ b/backends/platform/ds/arm9/source/touchkeyboard.cpp
@@ -585,4 +585,4 @@ void addKeyboardEvents() {
}
-} // End of namespace DS
+} // End of namespace DS
diff --git a/backends/platform/ds/arm9/source/touchkeyboard.h b/backends/platform/ds/arm9/source/touchkeyboard.h
index ae056e84da..dc20601023 100644
--- a/backends/platform/ds/arm9/source/touchkeyboard.h
+++ b/backends/platform/ds/arm9/source/touchkeyboard.h
@@ -46,6 +46,6 @@ void clearAutoComplete();
void setCharactersEntered(int count);
void releaseAllKeys();
-} // End of namespace DS
+} // End of namespace DS
#endif
diff --git a/backends/platform/ds/arm9/source/wordcompletion.cpp b/backends/platform/ds/arm9/source/wordcompletion.cpp
index 5f3b80c474..51f93df7ff 100644
--- a/backends/platform/ds/arm9/source/wordcompletion.cpp
+++ b/backends/platform/ds/arm9/source/wordcompletion.cpp
@@ -198,6 +198,6 @@ bool findWordCompletions(const char *input) {
}
-} // End of namespace DS
+} // End of namespace DS
#endif
diff --git a/backends/platform/ds/arm9/source/wordcompletion.h b/backends/platform/ds/arm9/source/wordcompletion.h
index 3d352f657a..c355d29293 100644
--- a/backends/platform/ds/arm9/source/wordcompletion.h
+++ b/backends/platform/ds/arm9/source/wordcompletion.h
@@ -27,4 +27,4 @@ extern bool findWordCompletions(const char *input);
extern void addAutoCompleteLine(const char *line);
extern void sortAutoCompleteWordList();
-} // End of namespace DS
+} // End of namespace DS
diff --git a/backends/platform/iphone/osys_main.cpp b/backends/platform/iphone/osys_main.cpp
index f9b2a81ce6..ed2c886213 100644
--- a/backends/platform/iphone/osys_main.cpp
+++ b/backends/platform/iphone/osys_main.cpp
@@ -65,6 +65,10 @@ OSystem_IPHONE::OSystem_IPHONE() :
_touchpadModeEnabled = !iPhone_isHighResDevice();
_fsFactory = new POSIXFilesystemFactory();
initVideoContext();
+
+ memset(_gamePalette, 0, sizeof(_gamePalette));
+ memset(_gamePaletteRGBA5551, 0, sizeof(_gamePaletteRGBA5551));
+ memset(_mouseCursorPalette, 0, sizeof(_mouseCursorPalette));
}
OSystem_IPHONE::~OSystem_IPHONE() {
diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm
index ebe435cb25..a11bf32c54 100644
--- a/backends/platform/iphone/osys_video.mm
+++ b/backends/platform/iphone/osys_video.mm
@@ -148,6 +148,11 @@ void OSystem_IPHONE::setPalette(const byte *colors, uint start, uint num) {
}
dirtyFullScreen();
+
+ // Automatically update the mouse texture when the palette changes while the
+ // cursor palette is disabled.
+ if (!_mouseCursorPaletteEnabled && _mouseBuffer.format.bytesPerPixel == 1)
+ _mouseDirty = _mouseNeedTextureUpdate = true;
}
void OSystem_IPHONE::grabPalette(byte *colors, uint start, uint num) {
diff --git a/backends/platform/symbian/AdaptAllMMPs.pl b/backends/platform/symbian/AdaptAllMMPs.pl
index dbced3126a..ffc4e88aff 100644
--- a/backends/platform/symbian/AdaptAllMMPs.pl
+++ b/backends/platform/symbian/AdaptAllMMPs.pl
@@ -10,7 +10,9 @@ chdir("../../../");
# Engine Project files
"mmp/scummvm_agi.mmp",
"mmp/scummvm_agos.mmp",
+ "mmp/scummvm_cge.mmp",
"mmp/scummvm_cine.mmp",
+ "mmp/scummvm_composer.mmp",
"mmp/scummvm_cruise.mmp",
"mmp/scummvm_drascula.mmp",
"mmp/scummvm_gob.mmp",
@@ -37,6 +39,11 @@ chdir("../../../");
"mmp/scummvm_toon.mmp",
"mmp/scummvm_lastexpress.mmp",
"mmp/scummvm_tsage.mmp",
+ "mmp/scummvm_tony.mmp",
+ "mmp/scummvm_hopkins.mmp",
+ "mmp/scummvm_toltecs.mmp",
+ "mmp/scummvm_pegasus.mmp",
+ "mmp/scummvm_wintermute.mmp",
# Target Platform Project Files
"S60/ScummVM_S60.mmp",
"S60v3/ScummVM_S60v3.mmp",
@@ -74,7 +81,7 @@ Preparing to update all the Symbian MMP project files with objects from module.m
my @section_empty = (""); # section standard: no #ifdef's in module.mk files
my @sections_scumm = ("", "ENABLE_SCUMM_7_8", "ENABLE_HE"); # special sections for engine SCUMM
my @sections_saga = ("", "ENABLE_IHNM", "ENABLE_SAGA2"); # special sections for engine SAGA
-my @sections_kyra = ("", "ENABLE_LOL"); # special sections for engine KYRA
+my @sections_kyra = ("", "ENABLE_LOL","ENABLE_EOB"); # special sections for engine KYRA
my @sections_agos = ("", "ENABLE_AGOS2"); # special sections for engine AGOS
# files excluded from build, case insensitive, will be matched in filename string only
@@ -86,13 +93,25 @@ my @excludes_snd = (
"tables.cpp",
"freeverb.cpp",
"synth.cpp",
+ "aReverbmodel.cpp",
+ "bReverbmodel.cpp",
+ "DelayReverb.cpp",
+ "LA32WaveGenerator.cpp",
+ "LegacyWaveGenerator.cpp",
+ "ROMInfo.cpp",
+ "FreeVerb.cpp",
+ "FreeVerbModel.cpp",
+ "La32Ramp.cpp",
+ "Poly.cpp",
+ "TVA.cpp",
+ "TVF.cpp",
+ "TVP.cpp",
"rate.*" # not really needed, USE_ARM_SOUND_ASM currently not parsed correctly,
# "rate[_arm|_arm_asm].(cpp|s)" will be added later based on WINS/ARM build!
# These #defines for compile time are set in portdefs.h
);
-my @excludes_graphics = (
- "iff.cpp"
+my @excludes_graphics = (
);
my @excludes_gui = (
@@ -127,6 +146,8 @@ ParseModule("_sword1", "sword1", \@section_empty);
ParseModule("_sword2", "sword2", \@section_empty);
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("_touche", "touche", \@section_empty);
ParseModule("_parallaction","parallaction",\@section_empty);
@@ -145,6 +166,11 @@ 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("_toltecs","toltecs", \@section_empty);
+ParseModule("_hopkins","hopkins", \@section_empty);
+ParseModule("_pegasus","pegasus", \@section_empty);
+ParseModule("_wintermute","wintermute", \@section_empty);
print "
=======================================================================================
Done. Enjoy :P
diff --git a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
index 82c15ec3db..ded4ef198f 100644
--- a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
+++ b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
@@ -4,20 +4,21 @@
@WorkingEngines = qw(
scumm agos sky queen gob groovie saga drascula
kyra lure agi touche parallaction cine
- cruise made m4 tinsel tucker sword1 sword2 draci sci teenagent mohawk hugo toon lastexpress tsage
+ cruise made tinsel tucker sword1 sword2 draci sci teenagent mohawk hugo toon lastexpress tsage cge
+ composer toltecs tony wintermute pegasus
);
@WorkingEngines_1st = qw(
scumm queen groovie saga drascula
touche parallaction cine
-? cruise made m4 tucker lastexpress
+? cruise made tucker lastexpress composer wintermute
);
@WorkingEngines_2nd = qw(
agos sky gob kyra lure
agi tinsel sword1 sword2
draci sci teenagent hugo toon
- tsage
+ tsage cge toltecs tony pegasus
);
@TestingEngines = qw(
@@ -32,6 +33,7 @@
ihnm
lol
agos2
+ eob
);
#disabled subengines lol saga2 personal nightmare
diff --git a/backends/platform/symbian/README b/backends/platform/symbian/README
index 31bc3d8fce..58cbc7814a 100644
--- a/backends/platform/symbian/README
+++ b/backends/platform/symbian/README
@@ -1,7 +1,7 @@
ScummVM - ScummVM ported to EPOC/SymbianOS
- Copyright (C) 2008-2012 ScummVM Team
+ Copyright (C) 2008-2013 ScummVM Team
Copyright (C) 2003-2008 Lars 'AnotherGuest' Persson
Copyright (C) 2002-2008 Jurgen 'SumthinWicked' Braam
diff --git a/backends/platform/symbian/S60/ScummVM_S60.mmp.in b/backends/platform/symbian/S60/ScummVM_S60.mmp.in
index 81068ba073..28bd11dec6 100644
--- a/backends/platform/symbian/S60/ScummVM_S60.mmp.in
+++ b/backends/platform/symbian/S60/ScummVM_S60.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/S60/ScummVM_S60_App.mmp b/backends/platform/symbian/S60/ScummVM_S60_App.mmp
index e00987e2ad..38d6f19590 100644
--- a/backends/platform/symbian/S60/ScummVM_S60_App.mmp
+++ b/backends/platform/symbian/S60/ScummVM_S60_App.mmp
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
index ccf38818dc..99b89efba8 100644
--- a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
+++ b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
@@ -112,7 +112,6 @@ SOURCEPATH ..\..\..\..\base
SOURCEPATH ..\..\..\..
// backend EPOC/SDL/ESDL specific includes
-SOURCE backends\platform\sdl\hardwarekeys.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\audiocd\sdl\sdl-audiocd.cpp
SOURCE backends\audiocd\default\default-audiocd.cpp
@@ -133,7 +132,6 @@ source common\error.cpp
source common\quicktime.cpp
// Special for graphics
-source graphics\iff.cpp
source backends\graphics\symbiansdl\symbiansdl-graphics.cpp
source backends\graphics\surfacesdl\surfacesdl-graphics.cpp
source engines\obsolete.cpp
@@ -144,7 +142,7 @@ 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
+library avkon.lib bafl.lib 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 0162061284..1e0f282bc4 100644
--- a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
+++ b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
@@ -112,7 +112,6 @@ SOURCEPATH ..\..\..\..\base
SOURCEPATH ..\..\..\..
// backend EPOC/SDL/ESDL specific includes
-SOURCE backends\platform\sdl\hardwarekeys.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\audiocd\sdl\sdl-audiocd.cpp
SOURCE backends\audiocd\default\default-audiocd.cpp
@@ -133,7 +132,6 @@ source common\error.cpp
source common\quicktime.cpp
// Special for graphics
-source graphics\iff.cpp
source backends\graphics\symbiansdl\symbiansdl-graphics.cpp
source backends\graphics\surfacesdl\surfacesdl-graphics.cpp
source engines\obsolete.cpp
@@ -144,7 +142,7 @@ 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
+library avkon.lib bafl.lib 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 efa1a3c50f..4c6b1b05f8 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,40,0
+#{"ScummVM S60v3"},(0xA0000657),1,60,0
;Supports Series 60 v 3.0
[0x101F7961], 0, 0, 0, {"Series60ProductID"}
@@ -63,9 +63,10 @@
"..\..\..\..\dists\engine-data\hugo.dat"-"c:\data\scummvm\hugo.dat"
"..\..\..\..\dists\engine-data\lure.dat"-"c:\data\scummvm\lure.dat"
"..\..\..\..\dists\engine-data\drascula.dat"-"c:\data\scummvm\drascula.dat"
-"..\..\..\..\dists\engine-data\m4.dat"-"c:\data\scummvm\m4.dat"
"..\..\..\..\dists\engine-data\teenagent.dat"-"c:\data\scummvm\teenagent.dat"
"..\..\..\..\dists\engine-data\toon.dat"-"c:\data\scummvm\toon.dat"
+"..\..\..\..\dists\engine-data\wintermute.zip"-"c:\data\scummvm\wintermute.zip"
+"..\..\..\..\dists\engine-data\tony.dat"-"c:\data\scummvm\tony.dat"
"..\..\..\vkeybd\packs\vkeybd_default.zip"-"c:\data\scummvm\vkeybd_default.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 aea6701709..d3fd0450fa 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,40,0
+#{"ScummVM S60v3"},(0xA0000657),1,60,0
;Supports Series 60 v 3.0
[0x101F7961], 0, 0, 0, {"Series60ProductID"}
@@ -71,9 +71,10 @@
"..\..\..\..\dists\engine-data\hugo.dat"-"c:\data\scummvm\hugo.dat"
"..\..\..\..\dists\engine-data\lure.dat"-"c:\data\scummvm\lure.dat"
"..\..\..\..\dists\engine-data\drascula.dat"-"c:\data\scummvm\drascula.dat"
-"..\..\..\..\dists\engine-data\m4.dat"-"c:\data\scummvm\m4.dat"
"..\..\..\..\dists\engine-data\teenagent.dat"-"c:\data\scummvm\teenagent.dat"
"..\..\..\..\dists\engine-data\toon.dat"-"c:\data\scummvm\toon.dat"
+"..\..\..\..\dists\engine-data\wintermute.zip-"c:\data\scummvm\wintermute.zip"
+"..\..\..\..\dists\engine-data\tony.dat-"c:\data\scummvm\tony.dat"
"..\..\..\vkeybd\packs\vkeybd_default.zip"-"c:\data\scummvm\vkeybd_default.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/S80/ScummVM_S80.mmp.in b/backends/platform/symbian/S80/ScummVM_S80.mmp.in
index 7987ccd639..d9b9a5c948 100644
--- a/backends/platform/symbian/S80/ScummVM_S80.mmp.in
+++ b/backends/platform/symbian/S80/ScummVM_S80.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/S80/ScummVM_S80_App.mmp b/backends/platform/symbian/S80/ScummVM_S80_App.mmp
index b66bef7518..30b1c3f58b 100644
--- a/backends/platform/symbian/S80/ScummVM_S80_App.mmp
+++ b/backends/platform/symbian/S80/ScummVM_S80_App.mmp
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/S90/Scummvm_S90.mmp.in b/backends/platform/symbian/S90/Scummvm_S90.mmp.in
index d803ce5647..790dca14f0 100644
--- a/backends/platform/symbian/S90/Scummvm_S90.mmp.in
+++ b/backends/platform/symbian/S90/Scummvm_S90.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/S90/Scummvm_S90_App.mmp b/backends/platform/symbian/S90/Scummvm_S90_App.mmp
index 0d8d2b8710..cf17f103ef 100644
--- a/backends/platform/symbian/S90/Scummvm_S90_App.mmp
+++ b/backends/platform/symbian/S90/Scummvm_S90_App.mmp
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/UIQ2/ScummVM.rss b/backends/platform/symbian/UIQ2/ScummVM.rss
index a6ba4021e4..bfdd07e898 100644
--- a/backends/platform/symbian/UIQ2/ScummVM.rss
+++ b/backends/platform/symbian/UIQ2/ScummVM.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * Copyright (C) 2005-2013 The ScummVM project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff --git a/backends/platform/symbian/UIQ3/ScummVM.rss b/backends/platform/symbian/UIQ3/ScummVM.rss
index 00ed4e3b5c..b7f0a17113 100644
--- a/backends/platform/symbian/UIQ3/ScummVM.rss
+++ b/backends/platform/symbian/UIQ3/ScummVM.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss b/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss
index 00ed4e3b5c..b7f0a17113 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss
+++ b/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
index 9e419ad6d9..fac178ad15 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
+++ b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2009 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2009 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
@@ -110,7 +110,6 @@ SOURCEPATH ..\..\..\..\base
SOURCEPATH ..\..\..\..
// backend EPOC/SDL/ESDL specific includes
-SOURCE backends\platform\sdl\hardwarekeys.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\audiocd\sdl\sdl-audiocd.cpp
SOURCE backends\audiocd\default\default-audiocd.cpp
@@ -131,7 +130,6 @@ source common\error.cpp
source common\quicktime.cpp
// Special for graphics
-source graphics\iff.cpp
source backends\graphics\symbiansdl\symbiansdl-graphics.cpp
source backends\graphics\surfacesdl\surfacesdl-graphics.cpp
source engines\obsolete.cpp
diff --git a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
index 41452127ca..0f1ec7f60f 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
+++ b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
@@ -110,7 +110,6 @@ SOURCEPATH ..\..\..\..\base
SOURCEPATH ..\..\..\..
// backend EPOC/SDL/ESDL specific includes
-SOURCE backends\platform\sdl\hardwarekeys.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\audiocd\sdl\sdl-audiocd.cpp
SOURCE backends\audiocd\default\default-audiocd.cpp
@@ -131,7 +130,6 @@ source common\error.cpp
source common\quicktime.cpp
// Special for graphics
-source graphics\iff.cpp
source backends\graphics\symbiansdl\symbiansdl-graphics.cpp
source backends\graphics\surfacesdl\surfacesdl-graphics.cpp
source engines\obsolete.cpp
diff --git a/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
index 47e0ebbd09..c62d25dafa 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,40,0
+#{"ScummVM UIQ3"},(0xA0000657),1,60,0
; ProductID for UIQ 3.0
; Product/platform version UID, Major, Minor, Build, Product ID
@@ -61,7 +61,6 @@
"..\..\..\..\dists\engine-data\hugo.dat"-"c:\shared\scummvm\hugo.dat"
"..\..\..\..\dists\engine-data\lure.dat"-"c:\shared\scummvm\lure.dat"
"..\..\..\..\dists\engine-data\drascula.dat"-"c:\shared\scummvm\drascula.dat"
-"..\..\..\..\dists\engine-data\m4.dat"-"c:\shared\scummvm\m4.dat"
"..\..\..\..\dists\engine-data\teenagent.dat"-"c:\shared\scummvm\teenagent.dat"
"..\..\..\..\dists\engine-data\toon.dat"-"c:\shared\scummvm\toon.dat"
"..\..\..\vkeybd\packs\vkeybd_default.zip"-"c:\shared\scummvm\vkeybd_default.zip"
diff --git a/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3_split.pkg b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3_split.pkg
index fb9923fae0..a37e0b0533 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,40,0
+#{"ScummVM UIQ3"},(0xA0000657),1,60,0
; ProductID for UIQ 3.0
; Product/platform version UID, Major, Minor, Build, Product ID
@@ -69,7 +69,6 @@
"..\..\..\..\dists\engine-data\hugo.dat"-"c:\shared\scummvm\hugo.dat"
"..\..\..\..\dists\engine-data\lure.dat"-"c:\shared\scummvm\lure.dat"
"..\..\..\..\dists\engine-data\drascula.dat"-"c:\shared\scummvm\drascula.dat"
-"..\..\..\..\dists\engine-data\m4.dat"-"c:\shared\scummvm\m4.dat"
"..\..\..\..\dists\engine-data\teenagent.dat"-"c:\shared\scummvm\teenagent.dat"
"..\..\..\..\dists\engine-data\toon.dat"-"c:\shared\scummvm\toon.dat"
"..\..\..\vkeybd\packs\vkeybd_default.zip"-"c:\shared\scummvm\vkeybd_default.zip"
diff --git a/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss b/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss
index 9af9a33a75..47e7c44642 100644
--- a/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss
+++ b/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_agi.mmp.in b/backends/platform/symbian/mmp/scummvm_agi.mmp.in
index 7d197f786f..892ed57732 100644
--- a/backends/platform/symbian/mmp/scummvm_agi.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_agi.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_agos.mmp.in b/backends/platform/symbian/mmp/scummvm_agos.mmp.in
index 587d1f0b69..d3bc84ed51 100644
--- a/backends/platform/symbian/mmp/scummvm_agos.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_agos.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_base.mmp.in b/backends/platform/symbian/mmp/scummvm_base.mmp.in
index 05cf526233..d6dfafd014 100644
--- a/backends/platform/symbian/mmp/scummvm_base.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_base.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_cge.mmp.in b/backends/platform/symbian/mmp/scummvm_cge.mmp.in
new file mode 100644
index 0000000000..66a689efd8
--- /dev/null
+++ b/backends/platform/symbian/mmp/scummvm_cge.mmp.in
@@ -0,0 +1,61 @@
+/* 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_cge.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\cge
+
+//START_AUTO_OBJECTS_CGE_//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_OBJECTS_CGE_//
+
+// *** Include paths
+
+USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
+SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
+SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\src
diff --git a/backends/platform/symbian/mmp/scummvm_cine.mmp.in b/backends/platform/symbian/mmp/scummvm_cine.mmp.in
index 79806eb8c2..cb7143b837 100644
--- a/backends/platform/symbian/mmp/scummvm_cine.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_cine.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_composer.mmp.in b/backends/platform/symbian/mmp/scummvm_composer.mmp.in
new file mode 100644
index 0000000000..19215f65a6
--- /dev/null
+++ b/backends/platform/symbian/mmp/scummvm_composer.mmp.in
@@ -0,0 +1,61 @@
+/* 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_COMPOSER.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\COMPOSER
+
+//START_AUTO_OBJECTS_COMPOSER_//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_OBJECTS_COMPOSER_//
+
+// *** Include paths
+
+USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
+SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
+SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\src
diff --git a/backends/platform/symbian/mmp/scummvm_cruise.mmp.in b/backends/platform/symbian/mmp/scummvm_cruise.mmp.in
index 53d52c80e7..c26e93dedc 100644
--- a/backends/platform/symbian/mmp/scummvm_cruise.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_cruise.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_draci.mmp.in b/backends/platform/symbian/mmp/scummvm_draci.mmp.in
index 9a7c87c963..52f862bc6f 100644
--- a/backends/platform/symbian/mmp/scummvm_draci.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_draci.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_drascula.mmp.in b/backends/platform/symbian/mmp/scummvm_drascula.mmp.in
index fcd7ce7585..9ea02fefe8 100644
--- a/backends/platform/symbian/mmp/scummvm_drascula.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_drascula.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_gob.mmp.in b/backends/platform/symbian/mmp/scummvm_gob.mmp.in
index 23f110bc7d..906d54b487 100644
--- a/backends/platform/symbian/mmp/scummvm_gob.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_gob.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_groovie.mmp.in b/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
index 6bdeb06b10..e7f70bc110 100644
--- a/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_hopkins.mmp.in b/backends/platform/symbian/mmp/scummvm_hopkins.mmp.in
new file mode 100644
index 0000000000..4509026b6c
--- /dev/null
+++ b/backends/platform/symbian/mmp/scummvm_hopkins.mmp.in
@@ -0,0 +1,61 @@
+/* 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_HOPKINS.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\HOPKINS
+
+//START_AUTO_OBJECTS_HOPKINS_//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_OBJECTS_HOPKINS_//
+
+// *** Include paths
+
+USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
+SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
+SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\src
diff --git a/backends/platform/symbian/mmp/scummvm_hugo.mmp.in b/backends/platform/symbian/mmp/scummvm_hugo.mmp.in
index 69888bb0ee..13dd7efa1e 100644
--- a/backends/platform/symbian/mmp/scummvm_hugo.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_hugo.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_kyra.mmp.in b/backends/platform/symbian/mmp/scummvm_kyra.mmp.in
index 4a2a87216e..5772bfaad0 100644
--- a/backends/platform/symbian/mmp/scummvm_kyra.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_kyra.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in b/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in
index 27ec0b2148..b8db95ea0c 100644
--- a/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_lure.mmp.in b/backends/platform/symbian/mmp/scummvm_lure.mmp.in
index 20b938a83f..84c3eecd5e 100644
--- a/backends/platform/symbian/mmp/scummvm_lure.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_lure.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_m4.mmp.in b/backends/platform/symbian/mmp/scummvm_m4.mmp.in
index fafd5e1e5f..e69b40ceb0 100644
--- a/backends/platform/symbian/mmp/scummvm_m4.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_m4.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_made.mmp.in b/backends/platform/symbian/mmp/scummvm_made.mmp.in
index 4d5ab6cc33..b52d9cc6cb 100644
--- a/backends/platform/symbian/mmp/scummvm_made.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_made.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in b/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in
index 3fc7c4ca5b..5f7bd4e144 100644
--- a/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in b/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in
index 05578b5994..f8ee389577 100644
--- a/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_pegasus.mmp.in b/backends/platform/symbian/mmp/scummvm_pegasus.mmp.in
new file mode 100644
index 0000000000..fefc63e936
--- /dev/null
+++ b/backends/platform/symbian/mmp/scummvm_pegasus.mmp.in
@@ -0,0 +1,61 @@
+/* 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_PEGASUS.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\PEGASUS
+
+//START_AUTO_OBJECTS_PEGASUS_//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_OBJECTS_PEGASUS_//
+
+// *** Include paths
+
+USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
+SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
+SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\src
diff --git a/backends/platform/symbian/mmp/scummvm_queen.mmp.in b/backends/platform/symbian/mmp/scummvm_queen.mmp.in
index bfc0a2f760..f507f482f9 100644
--- a/backends/platform/symbian/mmp/scummvm_queen.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_queen.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_saga.mmp.in b/backends/platform/symbian/mmp/scummvm_saga.mmp.in
index 831f02bdb6..cd158556dc 100644
--- a/backends/platform/symbian/mmp/scummvm_saga.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_saga.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_sci.mmp.in b/backends/platform/symbian/mmp/scummvm_sci.mmp.in
index 705f8d0c43..5749c66e10 100644
--- a/backends/platform/symbian/mmp/scummvm_sci.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sci.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
index 6b2ad35594..c07725e002 100644
--- a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_sky.mmp.in b/backends/platform/symbian/mmp/scummvm_sky.mmp.in
index 5fdfb56320..b5048106dc 100644
--- a/backends/platform/symbian/mmp/scummvm_sky.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sky.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_sword1.mmp.in b/backends/platform/symbian/mmp/scummvm_sword1.mmp.in
index 075968cf98..578839e8c4 100644
--- a/backends/platform/symbian/mmp/scummvm_sword1.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sword1.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_sword2.mmp.in b/backends/platform/symbian/mmp/scummvm_sword2.mmp.in
index 32ab259ee4..23a055c99c 100644
--- a/backends/platform/symbian/mmp/scummvm_sword2.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sword2.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in b/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in
index 61c50bd307..58bfa4c337 100644
--- a/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in b/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in
index 375d948190..4cdd0bd774 100644
--- a/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_toltecs.mmp.in b/backends/platform/symbian/mmp/scummvm_toltecs.mmp.in
new file mode 100644
index 0000000000..9f9d1c1dda
--- /dev/null
+++ b/backends/platform/symbian/mmp/scummvm_toltecs.mmp.in
@@ -0,0 +1,61 @@
+/* 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_TOLTECS.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\TOLTECS
+
+//START_AUTO_OBJECTS_TOLTECS_//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_OBJECTS_TOLTECS_//
+
+// *** Include paths
+
+USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
+SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
+SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\src
diff --git a/backends/platform/symbian/mmp/scummvm_tony.mmp.in b/backends/platform/symbian/mmp/scummvm_tony.mmp.in
new file mode 100644
index 0000000000..d80d82a9c5
--- /dev/null
+++ b/backends/platform/symbian/mmp/scummvm_tony.mmp.in
@@ -0,0 +1,61 @@
+/* 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_TONY.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\TONY
+
+//START_AUTO_OBJECTS_TONY_//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_OBJECTS_TONY_//
+
+// *** Include paths
+
+USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
+SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
+SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\src
diff --git a/backends/platform/symbian/mmp/scummvm_toon.mmp.in b/backends/platform/symbian/mmp/scummvm_toon.mmp.in
index d105156107..00f84d2bec 100644
--- a/backends/platform/symbian/mmp/scummvm_toon.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_toon.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_touche.mmp.in b/backends/platform/symbian/mmp/scummvm_touche.mmp.in
index 36588e051f..e59dd0cd00 100644
--- a/backends/platform/symbian/mmp/scummvm_touche.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_touche.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_tsage.mmp.in b/backends/platform/symbian/mmp/scummvm_tsage.mmp.in
index fb9b075435..cd4aa158dc 100644
--- a/backends/platform/symbian/mmp/scummvm_tsage.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_tsage.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_tucker.mmp.in b/backends/platform/symbian/mmp/scummvm_tucker.mmp.in
index f8954e6d21..0ff8eb9920 100644
--- a/backends/platform/symbian/mmp/scummvm_tucker.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_tucker.mmp.in
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in b/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in
new file mode 100644
index 0000000000..ebe762fe36
--- /dev/null
+++ b/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in
@@ -0,0 +1,61 @@
+/* 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_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
+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\wintermute
+
+//START_AUTO_OBJECTS_WINTERMUTE_//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_OBJECTS_WINTERMUTE_//
+
+// *** Include paths
+
+USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
+SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
+SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\src
diff --git a/backends/platform/symbian/res/ScummVmAif.rss b/backends/platform/symbian/res/ScummVmAif.rss
index 3e7a86a3bc..fab2cadbb8 100644
--- a/backends/platform/symbian/res/ScummVmAif.rss
+++ b/backends/platform/symbian/res/ScummVmAif.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/res/scummvm.rss b/backends/platform/symbian/res/scummvm.rss
index 361f831e3c..7e667f1cf3 100644
--- a/backends/platform/symbian/res/scummvm.rss
+++ b/backends/platform/symbian/res/scummvm.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/res/scummvm_A0000658.rss b/backends/platform/symbian/res/scummvm_A0000658.rss
index 14d591c990..3325d72249 100644
--- a/backends/platform/symbian/res/scummvm_A0000658.rss
+++ b/backends/platform/symbian/res/scummvm_A0000658.rss
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/backends/platform/symbian/src/ScummVm.hrh b/backends/platform/symbian/src/ScummVm.hrh
index a84664f995..c43a9da118 100644
--- a/backends/platform/symbian/src/ScummVm.hrh
+++ b/backends/platform/symbian/src/ScummVm.hrh
@@ -2,7 +2,7 @@
* Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
* Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
* Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
- * Copyright (C) 2005-2012 The ScummVM project
+ * 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
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 44007c494a..f6d1f1f702 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -145,7 +145,7 @@ static const char HELP_STRING[] =
static const char *s_appName = "scummvm";
-static void usage(const char *s, ...) GCC_PRINTF(1, 2);
+static void NORETURN_PRE usage(const char *s, ...) GCC_PRINTF(1, 2) NORETURN_POST;
static void usage(const char *s, ...) {
char buf[STRINGBUFLEN];
@@ -239,6 +239,28 @@ void registerDefaults() {
ConfMan.registerDefault("gui_saveload_chooser", "grid");
ConfMan.registerDefault("gui_saveload_last_pos", "0");
+
+ ConfMan.registerDefault("gui_browser_show_hidden", false);
+
+#ifdef USE_FLUIDSYNTH
+ // The settings are deliberately stored the same way as in Qsynth. The
+ // FluidSynth music driver is responsible for transforming them into
+ // their appropriate values.
+ ConfMan.registerDefault("fluidsynth_chorus_activate", true);
+ ConfMan.registerDefault("fluidsynth_chorus_nr", 3);
+ ConfMan.registerDefault("fluidsynth_chorus_level", 100);
+ ConfMan.registerDefault("fluidsynth_chorus_speed", 30);
+ ConfMan.registerDefault("fluidsynth_chorus_depth", 80);
+ ConfMan.registerDefault("fluidsynth_chorus_waveform", "sine");
+
+ ConfMan.registerDefault("fluidsynth_reverb_activate", true);
+ ConfMan.registerDefault("fluidsynth_reverb_roomsize", 20);
+ ConfMan.registerDefault("fluidsynth_reverb_damping", 0);
+ ConfMan.registerDefault("fluidsynth_reverb_width", 1);
+ ConfMan.registerDefault("fluidsynth_reverb_level", 90);
+
+ ConfMan.registerDefault("fluidsynth_misc_interpolation", "4th");
+#endif
}
//
@@ -314,8 +336,11 @@ void registerDefaults() {
Common::String parseCommandLine(Common::StringMap &settings, int argc, const char * const *argv) {
const char *s, *s2;
+ if (!argv)
+ return Common::String();
+
// argv[0] contains the name of the executable.
- if (argv && argv[0]) {
+ if (argv[0]) {
s = strrchr(argv[0], '/');
s_appName = s ? (s+1) : argv[0];
}
@@ -579,8 +604,7 @@ static void listGames() {
"-------------------- ------------------------------------------------------\n");
const EnginePlugin::List &plugins = EngineMan.getPlugins();
- EnginePlugin::List::const_iterator iter = plugins.begin();
- for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
+ for (EnginePlugin::List::const_iterator iter = plugins.begin(); iter != plugins.end(); ++iter) {
GameList list = (**iter)->getSupportedGames();
for (GameList::iterator v = list.begin(); v != list.end(); ++v) {
printf("%-20s %s\n", v->gameid().c_str(), v->description().c_str());
diff --git a/common/bufferedstream.h b/common/bufferedstream.h
index 55ea8dc13b..6c859c98fe 100644
--- a/common/bufferedstream.h
+++ b/common/bufferedstream.h
@@ -61,6 +61,6 @@ SeekableReadStream *wrapBufferedSeekableReadStream(SeekableReadStream *parentStr
*/
WriteStream *wrapBufferedWriteStream(WriteStream *parentStream, uint32 bufSize);
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/c++11-compat.h b/common/c++11-compat.h
new file mode 100644
index 0000000000..50d79bd79e
--- /dev/null
+++ b/common/c++11-compat.h
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef COMMON_CPP11_COMPAT_H
+#define COMMON_CPP11_COMPAT_H
+
+#if __cplusplus >= 201103L
+#error "c++11-compat.h included when C++11 is available"
+#endif
+
+//
+// Custom nullptr replacement. This is not type safe as the real C++11 nullptr
+// though.
+//
+#define nullptr 0
+
+//
+// Replacement for the override keyword. This allows compilation of code
+// which uses it, but does not feature any semantic.
+//
+#define override
+
+#endif
diff --git a/common/config-file.cpp b/common/config-file.cpp
index 4224d7491d..fe042e9eda 100644
--- a/common/config-file.cpp
+++ b/common/config-file.cpp
@@ -380,4 +380,4 @@ void ConfigFile::Section::removeKey(const String &key) {
}
}
-} // End of namespace Common
+} // End of namespace Common
diff --git a/common/config-file.h b/common/config-file.h
index 7bc5604b4c..8bd731c038 100644
--- a/common/config-file.h
+++ b/common/config-file.h
@@ -134,6 +134,6 @@ private:
*/
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/config-manager.h b/common/config-manager.h
index 02d4ec3438..d43a7bec51 100644
--- a/common/config-manager.h
+++ b/common/config-manager.h
@@ -175,7 +175,7 @@ private:
String _filename;
};
-} // End of namespace Common
+} // End of namespace Common
/** Shortcut for accessing the configuration manager. */
#define ConfMan Common::ConfigManager::instance()
diff --git a/common/debug-channels.h b/common/debug-channels.h
index 54de9d491e..40d1ea667e 100644
--- a/common/debug-channels.h
+++ b/common/debug-channels.h
@@ -124,6 +124,6 @@ private:
/** Shortcut for accessing the debug manager. */
#define DebugMan Common::DebugManager::instance()
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/debug.cpp b/common/debug.cpp
index 9c3a93e5a6..ba5479c34d 100644
--- a/common/debug.cpp
+++ b/common/debug.cpp
@@ -102,7 +102,7 @@ bool DebugManager::isDebugChannelEnabled(uint32 channel) {
return (gDebugChannelsEnabled & channel) != 0;
}
-} // End of namespace Common
+} // End of namespace Common
#ifndef DISABLE_TEXT_CONSOLE
diff --git a/common/file.cpp b/common/file.cpp
index 12d73c9973..7ad6bc2e81 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -202,4 +202,4 @@ bool DumpFile::flush() {
return _handle->flush();
}
-} // End of namespace Common
+} // End of namespace Common
diff --git a/common/fs.cpp b/common/fs.cpp
index 0143c936d4..19a01074ea 100644
--- a/common/fs.cpp
+++ b/common/fs.cpp
@@ -335,4 +335,4 @@ int FSDirectory::listMembers(ArchiveMemberList &list) const {
}
-} // End of namespace Common
+} // End of namespace Common
diff --git a/common/func.h b/common/func.h
index db57d73668..a4a80e5406 100644
--- a/common/func.h
+++ b/common/func.h
@@ -535,6 +535,6 @@ GENERATE_TRIVIAL_HASH_FUNCTOR(unsigned long);
#undef GENERATE_TRIVIAL_HASH_FUNCTOR
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/hash-str.h b/common/hash-str.h
index 08f0558bfd..190e6922eb 100644
--- a/common/hash-str.h
+++ b/common/hash-str.h
@@ -79,7 +79,7 @@ typedef HashMap<String, String, IgnoreCase_Hash, IgnoreCase_EqualTo> StringMap;
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/hashmap.cpp b/common/hashmap.cpp
index ff8f9db9ce..e505d1dd25 100644
--- a/common/hashmap.cpp
+++ b/common/hashmap.cpp
@@ -106,4 +106,4 @@ void updateHashCollisionStats(int collisions, int dummyHits, int lookups, int ar
}
#endif
-} // End of namespace Common
+} // End of namespace Common
diff --git a/common/hashmap.h b/common/hashmap.h
index 7cf54997e8..42509d67e5 100644
--- a/common/hashmap.h
+++ b/common/hashmap.h
@@ -632,6 +632,6 @@ void HashMap<Key, Val, HashFunc, EqualFunc>::erase(const Key &key) {
#undef HASHMAP_DUMMY_NODE
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/iff_container.cpp b/common/iff_container.cpp
index 7bcbf86e0f..9c6e5f124a 100644
--- a/common/iff_container.cpp
+++ b/common/iff_container.cpp
@@ -22,6 +22,7 @@
#include "common/iff_container.h"
#include "common/substream.h"
+#include "common/util.h"
namespace Common {
@@ -75,4 +76,50 @@ void IFFParser::parse(IFFCallback &callback) {
} while (!stop);
}
-} // End of namespace Common
+
+PackBitsReadStream::PackBitsReadStream(Common::ReadStream &input) : _input(&input) {
+}
+
+PackBitsReadStream::~PackBitsReadStream() {
+}
+
+bool PackBitsReadStream::eos() const {
+ return _input->eos();
+}
+
+uint32 PackBitsReadStream::read(void *dataPtr, uint32 dataSize) {
+ byte *out = (byte *)dataPtr;
+ uint32 left = dataSize;
+
+ uint32 lenR = 0, lenW = 0;
+ while (left > 0 && !_input->eos()) {
+ lenR = _input->readByte();
+
+ if (lenR == 128) {
+ // no-op
+ lenW = 0;
+ } else if (lenR <= 127) {
+ // literal run
+ lenR++;
+ lenW = MIN(lenR, left);
+ for (uint32 j = 0; j < lenW; j++) {
+ *out++ = _input->readByte();
+ }
+ for (; lenR > lenW; lenR--) {
+ _input->readByte();
+ }
+ } else { // len > 128
+ // expand run
+ lenW = MIN((256 - lenR) + 1, left);
+ byte val = _input->readByte();
+ memset(out, val, lenW);
+ out += lenW;
+ }
+
+ left -= lenW;
+ }
+
+ return dataSize - left;
+}
+
+} // End of namespace Common
diff --git a/common/iff_container.h b/common/iff_container.h
index 104ecf0f36..a730930b2c 100644
--- a/common/iff_container.h
+++ b/common/iff_container.h
@@ -77,22 +77,22 @@ page 376) */
#define ID_copy MKTAG('(','c',')',' ')
/* EA IFF 85 Generic Copyright text chunk */
-/* ILBM chunks */
+/* IFF chunks */
#define ID_BMHD MKTAG('B','M','H','D')
-/* ILBM BitmapHeader */
+/* IFF BitmapHeader */
#define ID_CMAP MKTAG('C','M','A','P')
-/* ILBM 8bit RGB colormap */
+/* IFF 8bit RGB colormap */
#define ID_GRAB MKTAG('G','R','A','B')
-/* ILBM "hotspot" coordiantes */
+/* IFF "hotspot" coordiantes */
#define ID_DEST MKTAG('D','E','S','T')
-/* ILBM destination image info */
+/* IFF destination image info */
#define ID_SPRT MKTAG('S','P','R','T')
-/* ILBM sprite identifier */
+/* IFF sprite identifier */
#define ID_CAMG MKTAG('C','A','M','G')
/* Amiga viewportmodes */
#define ID_BODY MKTAG('B','O','D','Y')
-/* ILBM image data */
+/* IFF image data */
#define ID_CRNG MKTAG('C','R','N','G')
/* color cycling */
#define ID_CCRT MKTAG('C','C','R','T')
@@ -114,7 +114,7 @@ page 376) */
#define ID_PCHG MKTAG('P','C','H','G')
/* Line by line palette control information (Sebastiano Vigna) */
#define ID_PRVW MKTAG('P','R','V','W')
-/* A mini duplicate ILBM used for preview (Gary Bonham) */
+/* A mini duplicate IFF used for preview (Gary Bonham) */
#define ID_XBMI MKTAG('X','B','M','I')
/* eXtended BitMap Information (Soft-Logik) */
#define ID_CTBL MKTAG('C','T','B','L')
@@ -239,6 +239,31 @@ public:
};
+/**
+ * Decode a given PackBits encoded stream.
+ *
+ * PackBits is an RLE compression algorithm introduced by Apple. It is also
+ * used to encode ILBM and PBM subtypes of IFF files, and some flavors of
+ * TIFF.
+ *
+ * As there is no compression across row boundaries in the above formats,
+ * read() will extract a *new* line on each call, discarding any alignment
+ * or padding.
+ */
+class PackBitsReadStream : public Common::ReadStream {
+
+protected:
+ Common::ReadStream *_input;
+
+public:
+ PackBitsReadStream(Common::ReadStream &input);
+ ~PackBitsReadStream();
+
+ virtual bool eos() const;
+
+ uint32 read(void *dataPtr, uint32 dataSize);
+};
+
} // namespace Common
#endif
diff --git a/common/language.h b/common/language.h
index db552fc9c4..03b9ebaf8e 100644
--- a/common/language.h
+++ b/common/language.h
@@ -81,6 +81,6 @@ const String getGameGUIOptionsDescriptionLanguage(Common::Language lang);
// TODO: Document this GUIO related function
bool checkGameGUIOptionLanguage(Common::Language lang, const String &str);
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/memorypool.h b/common/memorypool.h
index 9a4e523d53..1cd725b99d 100644
--- a/common/memorypool.h
+++ b/common/memorypool.h
@@ -141,7 +141,7 @@ public:
}
};
-} // End of namespace Common
+} // End of namespace Common
/**
* A custom placement new operator, using an arbitrary MemoryPool.
diff --git a/common/memstream.h b/common/memstream.h
index 497a178ab9..260fb64d84 100644
--- a/common/memstream.h
+++ b/common/memstream.h
@@ -173,6 +173,6 @@ public:
bool seek(int32 offset, int whence = SEEK_SET);
};
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/mutex.cpp b/common/mutex.cpp
index 4e6316528c..f912e79591 100644
--- a/common/mutex.cpp
+++ b/common/mutex.cpp
@@ -75,4 +75,4 @@ void StackLock::unlock() {
g_system->unlockMutex(_mutex);
}
-} // End of namespace Common
+} // End of namespace Common
diff --git a/common/platform.cpp b/common/platform.cpp
index 9986048b48..899e3f45ae 100644
--- a/common/platform.cpp
+++ b/common/platform.cpp
@@ -50,6 +50,8 @@ const PlatformDescription g_platforms[] = {
{ "playstation", "psx", "psx", "Sony PlayStation", kPlatformPSX },
{ "cdi", "cdi", "cdi", "Philips CD-i", kPlatformCDi },
{ "ios", "ios", "ios", "Apple iOS", kPlatformIOS },
+ { "os2", "os2", "os2", "OS/2", kPlatformOS2 },
+ { "beos", "beos", "beos", "BeOS", kPlatformBeOS },
{ 0, 0, 0, "Default", kPlatformUnknown }
};
diff --git a/common/platform.h b/common/platform.h
index 1891c7096d..72f0991409 100644
--- a/common/platform.h
+++ b/common/platform.h
@@ -55,6 +55,8 @@ enum Platform {
kPlatformPSX,
kPlatformCDi,
kPlatformIOS,
+ kPlatformOS2,
+ kPlatformBeOS,
kPlatformUnknown = -1
};
@@ -75,6 +77,6 @@ extern const char *getPlatformCode(Platform id);
extern const char *getPlatformAbbrev(Platform id);
extern const char *getPlatformDescription(Platform id);
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/quicktime.cpp b/common/quicktime.cpp
index 5b3659b0d5..a3efc2b443 100644
--- a/common/quicktime.cpp
+++ b/common/quicktime.cpp
@@ -444,7 +444,7 @@ int QuickTimeParser::readELST(Atom atom) {
uint32 offset = 0;
- for (uint32 i = 0; i < track->editCount; i++){
+ for (uint32 i = 0; i < track->editCount; i++) {
track->editList[i].trackDuration = _fd->readUint32BE();
track->editList[i].mediaTime = _fd->readSint32BE();
track->editList[i].mediaRate = Rational(_fd->readUint32BE(), 0x10000);
diff --git a/common/random.cpp b/common/random.cpp
index 55fa3cbd30..fd75534c44 100644
--- a/common/random.cpp
+++ b/common/random.cpp
@@ -59,4 +59,4 @@ uint RandomSource::getRandomNumberRng(uint min, uint max) {
return getRandomNumber(max - min) + min;
}
-} // End of namespace Common
+} // End of namespace Common
diff --git a/common/random.h b/common/random.h
index 90f2ed5cb0..c8aec58946 100644
--- a/common/random.h
+++ b/common/random.h
@@ -74,6 +74,6 @@ public:
uint getRandomNumberRng(uint min, uint max);
};
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/rect.h b/common/rect.h
index 8d1243f7e4..5790cf7c0f 100644
--- a/common/rect.h
+++ b/common/rect.h
@@ -266,6 +266,6 @@ struct Rect {
}
};
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/scummsys.h b/common/scummsys.h
index 2f4efe702f..291de87dc9 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -51,7 +51,7 @@
#include <stdio.h>
#include <stdarg.h>
- // MSVC's vsnprintf is either non-existant (2003) or bugged since it
+ // MSVC's vsnprintf is either non-existent (2003) or bugged since it
// does not always include a terminating NULL (2005+). To work around
// that we fix up the _vsnprintf included. Note that the return value
// will still not match C99's specs!
@@ -144,7 +144,10 @@
#endif
#endif
-
+// Include our C++11 compatability header for pre-C++11 compilers.
+#if __cplusplus < 201103L
+#include "common/c++11-compat.h"
+#endif
// Use config.h, generated by configure
#if defined(HAVE_CONFIG_H)
diff --git a/common/singleton.h b/common/singleton.h
index d7078360f3..6e47f119ba 100644
--- a/common/singleton.h
+++ b/common/singleton.h
@@ -97,6 +97,6 @@ protected:
#define DECLARE_SINGLETON(T) \
template<> T *Singleton<T>::_singleton = 0
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/str.cpp b/common/str.cpp
index 8210ca6bb8..5d647ee4f0 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -370,7 +370,7 @@ void String::clear() {
}
void String::setChar(char c, uint32 p) {
- assert(p <= _size);
+ assert(p < _size);
makeUnique();
_str[p] = c;
@@ -850,7 +850,7 @@ size_t strlcat(char *dst, const char *src, size_t size) {
return dstLength + (src - srcStart);
}
-} // End of namespace Common
+} // End of namespace Common
// Portable implementation of stricmp / strcasecmp / strcmpi.
// TODO: Rename this to Common::strcasecmp
diff --git a/common/stream.cpp b/common/stream.cpp
index 85647bfe3a..f49603c882 100644
--- a/common/stream.cpp
+++ b/common/stream.cpp
@@ -342,7 +342,7 @@ uint32 BufferedReadStream::read(void *dataPtr, uint32 dataSize) {
return alreadyRead + dataSize;
}
-} // End of nameless namespace
+} // End of anonymous namespace
ReadStream *wrapBufferedReadStream(ReadStream *parentStream, uint32 bufSize, DisposeAfterUse::Flag disposeParentStream) {
@@ -379,12 +379,25 @@ BufferedSeekableReadStream::BufferedSeekableReadStream(SeekableReadStream *paren
bool BufferedSeekableReadStream::seek(int32 offset, int whence) {
// If it is a "local" seek, we may get away with "seeking" around
// in the buffer only.
- // Note: We could try to handle SEEK_END and SEEK_SET, too, but
- // since they are rarely used, it seems not worth the effort.
_eos = false; // seeking always cancels EOS
- if (whence == SEEK_CUR && (int)_pos + offset >= 0 && _pos + offset <= _bufSize) {
- _pos += offset;
+ int relOffset = 0;
+ switch (whence) {
+ case SEEK_SET:
+ relOffset = offset - pos();
+ break;
+ case SEEK_CUR:
+ relOffset = offset;
+ break;
+ case SEEK_END:
+ relOffset = (size() + offset) - pos();
+ break;
+ default:
+ break;
+ }
+
+ if ((int)_pos + relOffset >= 0 && _pos + relOffset <= _bufSize) {
+ _pos += relOffset;
// Note: we do not need to reset parent's eos flag here. It is
// sufficient that it is reset when actually seeking in the parent.
@@ -393,14 +406,21 @@ bool BufferedSeekableReadStream::seek(int32 offset, int whence) {
// just seek normally in the parent stream.
if (whence == SEEK_CUR)
offset -= (_bufSize - _pos);
- _pos = _bufSize;
+ // We invalidate the buffer here. This assures that successive seeks
+ // do not have the chance to incorrectly think they seeked back into
+ // the buffer.
+ // Note: This does not take full advantage of the buffer. But it is
+ // a simple way to prevent nasty errors. It would be possible to take
+ // full advantage of the buffer by saving its actual start position.
+ // This seems not worth the effort for this seemingly uncommon use.
+ _pos = _bufSize = 0;
_parentStream->seek(offset, whence);
}
return true;
}
-} // End of nameless namespace
+} // End of anonymous namespace
SeekableReadStream *wrapBufferedSeekableReadStream(SeekableReadStream *parentStream, uint32 bufSize, DisposeAfterUse::Flag disposeParentStream) {
if (parentStream)
@@ -482,7 +502,7 @@ public:
};
-} // End of nameless namespace
+} // End of anonymous namespace
WriteStream *wrapBufferedWriteStream(WriteStream *parentStream, uint32 bufSize) {
if (parentStream)
@@ -490,4 +510,4 @@ WriteStream *wrapBufferedWriteStream(WriteStream *parentStream, uint32 bufSize)
return 0;
}
-} // End of namespace Common
+} // End of namespace Common
diff --git a/common/stream.h b/common/stream.h
index 26c04e5bf6..33ebc95a86 100644
--- a/common/stream.h
+++ b/common/stream.h
@@ -454,6 +454,6 @@ public:
};
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/taskbar.h b/common/taskbar.h
index 6f28028e74..b4ec673739 100644
--- a/common/taskbar.h
+++ b/common/taskbar.h
@@ -136,7 +136,7 @@ public:
virtual void clearError() {}
};
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/textconsole.cpp b/common/textconsole.cpp
index ffa42e63a0..a721c121d5 100644
--- a/common/textconsole.cpp
+++ b/common/textconsole.cpp
@@ -40,7 +40,7 @@ void setErrorHandler(ErrorHandler handler) {
}
-} // End of namespace Common
+} // End of namespace Common
#ifndef DISABLE_TEXT_CONSOLE
diff --git a/common/textconsole.h b/common/textconsole.h
index 364c49b2e9..12f15e5e4b 100644
--- a/common/textconsole.h
+++ b/common/textconsole.h
@@ -56,7 +56,7 @@ typedef void (*ErrorHandler)(const char *msg);
*/
void setErrorHandler(ErrorHandler handler);
-} // End of namespace Common
+} // End of namespace Common
void NORETURN_PRE error(const char *s, ...) GCC_PRINTF(1, 2) NORETURN_POST;
diff --git a/common/unzip.cpp b/common/unzip.cpp
index ab659343a2..69b9ff67cb 100644
--- a/common/unzip.cpp
+++ b/common/unzip.cpp
@@ -1534,4 +1534,4 @@ Archive *makeZipArchive(SeekableReadStream *stream) {
return new ZipArchive(zipFile);
}
-} // End of namespace Common
+} // End of namespace Common
diff --git a/common/unzip.h b/common/unzip.h
index 06480b0054..2e0dae831a 100644
--- a/common/unzip.h
+++ b/common/unzip.h
@@ -56,6 +56,6 @@ Archive *makeZipArchive(const FSNode &node);
*/
Archive *makeZipArchive(SeekableReadStream *stream);
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/updates.h b/common/updates.h
index 4d58a216fb..0012808a17 100644
--- a/common/updates.h
+++ b/common/updates.h
@@ -95,7 +95,7 @@ public:
virtual UpdateInterval getUpdateCheckInterval() { return kUpdateIntervalNotSupported; }
};
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/common/zlib.cpp b/common/zlib.cpp
index fc8f351054..920338e57e 100644
--- a/common/zlib.cpp
+++ b/common/zlib.cpp
@@ -392,17 +392,21 @@ public:
#endif // USE_ZLIB
SeekableReadStream *wrapCompressedReadStream(SeekableReadStream *toBeWrapped, uint32 knownSize) {
-#if defined(USE_ZLIB)
if (toBeWrapped) {
uint16 header = toBeWrapped->readUint16BE();
bool isCompressed = (header == 0x1F8B ||
((header & 0x0F00) == 0x0800 &&
header % 31 == 0));
toBeWrapped->seek(-2, SEEK_CUR);
- if (isCompressed)
+ if (isCompressed) {
+#if defined(USE_ZLIB)
return new GZipReadStream(toBeWrapped, knownSize);
- }
+#else
+ delete toBeWrapped;
+ return NULL;
#endif
+ }
+ }
return toBeWrapped;
}
@@ -415,4 +419,4 @@ WriteStream *wrapCompressedWriteStream(WriteStream *toBeWrapped) {
}
-} // End of namespace Common
+} // End of namespace Common
diff --git a/common/zlib.h b/common/zlib.h
index 6a840f5fdc..d940f3f3a1 100644
--- a/common/zlib.h
+++ b/common/zlib.h
@@ -103,7 +103,9 @@ bool inflateZlibInstallShield(byte *dst, uint dstLen, const byte *src, uint srcL
* provides transparent on-the-fly decompression. Assumes the data it
* retrieves from the wrapped stream to be either uncompressed or in gzip
* format. In the former case, the original stream is returned unmodified
- * (and in particular, not wrapped).
+ * (and in particular, not wrapped). In the latter case the stream is
+ * returned wrapped, unless there is no ZLIB support, then NULL is returned
+ * and the old stream is destroyed.
*
* Certain GZip-formats don't supply an easily readable length, if you
* still need the length carried along with the stream, and you know
@@ -129,6 +131,6 @@ SeekableReadStream *wrapCompressedReadStream(SeekableReadStream *toBeWrapped, ui
*/
WriteStream *wrapCompressedWriteStream(WriteStream *toBeWrapped);
-} // End of namespace Common
+} // End of namespace Common
#endif
diff --git a/configure b/configure
index f2d45c1305..d3dc71e44d 100755
--- a/configure
+++ b/configure
@@ -21,6 +21,12 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
# Save the current environment variables for next runs
SAVED_CONFIGFLAGS=$@
SAVED_LDFLAGS=$LDFLAGS
@@ -123,6 +129,7 @@ _libunity=auto
_debug_build=auto
_release_build=auto
_optimizations=auto
+_use_cxx11=no
_verbose_build=no
_text_console=no
_mt32emu=yes
@@ -870,6 +877,7 @@ Game engines:
The values of <engine name> for these options are as follows:
$engines_help
Optional Features:
+ --enable-c++11 build as C++11 if the compiler allows that
--disable-debug disable building with debugging symbols
--enable-Werror treat warnings as errors
--enable-release enable building in release mode (this activates
@@ -1109,6 +1117,12 @@ for ac_option in $@; do
--backend=*)
_backend=`echo $ac_option | cut -d '=' -f 2`
;;
+ --enable-c++11)
+ _use_cxx11=yes
+ ;;
+ --disable-c++11)
+ _use_cxx11=no
+ ;;
--enable-debug)
_debug_build=yes
;;
@@ -1417,15 +1431,10 @@ fi
case $_host in
caanoo | gp2x | gp2xwiz | openpandora | ps2)
if test "$_debug_build" = auto; then
- # If you want to debug one of these platforms, use '--disable-release --enable-debug'
+ # If you want to debug one of these platforms, use '--disable-optimizations --enable-debug'
_debug_build=no
fi
- if test "$_release_build" = auto; then
- # Enable release build by default.
- _release_build=yes
- fi
-
if test "$_optimizations" = auto; then
# Enable optimizations by default.
_optimizations=yes
@@ -1695,21 +1704,36 @@ if test "$cxx_verc_fail" = yes ; then
fi
#
+# Check whether the compiler supports C++11
+#
+have_cxx11=no
+cat > $TMPC << EOF
+int main(int argc, char *argv[]) { if (argv == nullptr) return -1; else return 0; }
+EOF
+cc_check -std=c++11 && have_cxx11=yes
+if test "$_use_cxx11" = "yes" ; then
+ _use_cxx11=$have_cxx11
+fi
+
+#
# Setup compiler specific CXXFLAGS now that we know the compiler version.
# Foremost, this means enabling various warnings.
# In addition, we set CXX_UPDATE_DEP_FLAG for GCC >= 3.0 and for ICC.
#
if test "$have_gcc" = yes ; then
if test "$_cxx_major" -ge "3" ; then
- case $_host_os in
- # newlib-based system include files suppress non-C89 function
- # declarations under __STRICT_ANSI__
- amigaos* | android | bada | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | ps3 | wii | wince )
- ;;
- *)
- CXXFLAGS="$CXXFLAGS -ansi"
- ;;
- esac
+ # Try to use ANSI mode when C++11 is disabled.
+ if test "$_use_cxx11" = "no" ; then
+ case $_host_os in
+ # newlib-based system include files suppress non-C89 function
+ # declarations under __STRICT_ANSI__
+ amigaos* | android | bada | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | ps3 | wii | wince )
+ ;;
+ *)
+ CXXFLAGS="$CXXFLAGS -ansi"
+ ;;
+ esac
+ fi
CXXFLAGS="$CXXFLAGS -W -Wno-unused-parameter"
add_line_to_config_mk 'HAVE_GCC3 = 1'
add_line_to_config_mk 'CXX_UPDATE_DEP_FLAG = -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP'
@@ -1725,6 +1749,15 @@ elif test "$have_icc" = yes ; then
add_line_to_config_mk 'CXX_UPDATE_DEP_FLAG = -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP'
fi;
+#
+# Update status about C++11 mode
+#
+echo_n "Building as C++11... "
+if test "$_use_cxx11" = "yes" ; then
+ CXXFLAGS="$CXXFLAGS -std=c++11"
+fi
+echo $_use_cxx11
+
# By default, we add -pedantic to the CXXFLAGS to catch some potentially
# non-portable constructs, like use of GNU extensions.
# However, some platforms use GNU extensions in system header files, so
@@ -1904,7 +1937,7 @@ cc_check_clean tmp_find_type_with_size.cpp
# for the smaller sizes.
echo_n "Alignment required... "
case $_host_cpu in
- i[3-6]86 | x86_64 | ppc*)
+ i[3-6]86 | amd64 | x86_64 | ppc*)
# Unaligned access should work
_need_memalign=no
;;
@@ -1951,7 +1984,7 @@ case $_host_cpu in
echo "PowerPC"
DEFINES="$DEFINES -DPPC_TARGET"
;;
- x86_64)
+ amd64 | x86_64)
echo "x86_64"
;;
*)
@@ -2521,10 +2554,13 @@ if test -n "$_host"; then
DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE"
if test "$_release_build" = no; then
DEFINES="$DEFINES -DOP_DEBUG"
- else
- # Use -O3 on the OpenPandora for non-debug builds.
+ fi
+
+ # Use -O3 on the OpenPandora for optimized builds.
+ if test "$_optimizations" = yes; then
_optimization_level=-O3
fi
+
define_in_config_if_yes yes 'USE_ARM_NEON_ASPECT_CORRECTOR'
CXXFLAGS="$CXXFLAGS -march=armv7-a"
CXXFLAGS="$CXXFLAGS -mtune=cortex-a8"
diff --git a/devtools/create_kyradat/create_kyradat.cpp b/devtools/create_kyradat/create_kyradat.cpp
index 3b90ad0d85..1a3d406af1 100644
--- a/devtools/create_kyradat/create_kyradat.cpp
+++ b/devtools/create_kyradat/create_kyradat.cpp
@@ -47,7 +47,7 @@
#include <map>
enum {
- kKyraDatVersion = 83
+ kKyraDatVersion = 84
};
const ExtractFilename extractFilenames[] = {
@@ -606,7 +606,7 @@ const ExtractFilename extractFilenames[] = {
// LANDS OF LORE
// Ingame
- { kLoLIngamePakFiles, kTypeStringList, false },
+ { kLoLIngamePakFiles, k2TypeSfxList, false },
{ kLoLCharacterDefs, kLoLTypeCharData, true },
{ kLoLIngameSfxFiles, k2TypeSfxList, false },
@@ -625,7 +625,10 @@ const ExtractFilename extractFilenames[] = {
{ kLoLCharDefsKieran, kLoLTypeRaw16, false },
{ kLoLCharDefsAkshel, kLoLTypeRaw16, false },
{ kLoLExpRequirements, kLoLTypeRaw32, false },
- { kLoLMonsterModifiers, kLoLTypeRaw16, false },
+ { kLoLMonsterModifiers1, kLoLTypeRaw16, false },
+ { kLoLMonsterModifiers2, kLoLTypeRaw16, false },
+ { kLoLMonsterModifiers3, kLoLTypeRaw16, false },
+ { kLoLMonsterModifiers4, kLoLTypeRaw16, false },
{ kLoLMonsterShiftOffsets, kTypeRawData, false },
{ kLoLMonsterDirFlags, kTypeRawData, false },
{ kLoLMonsterScaleY, kTypeRawData, false },
@@ -633,8 +636,8 @@ const ExtractFilename extractFilenames[] = {
{ kLoLMonsterScaleWH, kLoLTypeRaw16, false },
{ kLoLFlyingObjectShp, kLoLTypeFlightShpData, false },
{ kLoLInventoryDesc, kLoLTypeRaw16, false },
- { kLoLLevelShpList, kTypeStringList, false },
- { kLoLLevelDatList, kTypeStringList, false },
+ { kLoLLevelShpList, k2TypeSfxList, false },
+ { kLoLLevelDatList, k2TypeSfxList, false },
{ kLoLCompassDefs, kLoLTypeCompassData, false },
{ kLoLItemPrices, kLoLTypeRaw16, false },
{ kLoLStashSetup, kTypeRawData, false },
@@ -671,14 +674,14 @@ const ExtractFilename extractFilenames[] = {
{ kLoLScrollYBottom, k3TypeRaw16to8, false },
{ kLoLButtonDefs, kLoLTypeButtonDef, false },
- { kLoLButtonList1, kLoLTypeRaw16, false },
- { kLoLButtonList2, kLoLTypeRaw16, false },
- { kLoLButtonList3, kLoLTypeRaw16, false },
- { kLoLButtonList4, kLoLTypeRaw16, false },
- { kLoLButtonList5, kLoLTypeRaw16, false },
- { kLoLButtonList6, kLoLTypeRaw16, false },
- { kLoLButtonList7, kLoLTypeRaw16, false },
- { kLoLButtonList8, kLoLTypeRaw16, false },
+ { kLoLButtonList1, k3TypeRaw16to8, false },
+ { kLoLButtonList2, k3TypeRaw16to8, false },
+ { kLoLButtonList3, k3TypeRaw16to8, false },
+ { kLoLButtonList4, k3TypeRaw16to8, false },
+ { kLoLButtonList5, k3TypeRaw16to8, false },
+ { kLoLButtonList6, k3TypeRaw16to8, false },
+ { kLoLButtonList7, k3TypeRaw16to8, false },
+ { kLoLButtonList8, k3TypeRaw16to8, false },
{ kLoLLegendData, kTypeRawData, false },
{ kLoLMapCursorOvl, kTypeRawData, false },
@@ -2111,8 +2114,14 @@ const char *getIdString(const int id) {
return "kLoLCharDefsAkshel";
case kLoLExpRequirements:
return "kLoLExpRequirements";
- case kLoLMonsterModifiers:
- return "kLoLMonsterModifiers";
+ case kLoLMonsterModifiers1:
+ return "kLoLMonsterModifiers1";
+ case kLoLMonsterModifiers2:
+ return "kLoLMonsterModifiers2";
+ case kLoLMonsterModifiers3:
+ return "kLoLMonsterModifiers3";
+ case kLoLMonsterModifiers4:
+ return "kLoLMonsterModifiers4";
case kLoLMonsterShiftOffsets:
return "kLoLMonsterShiftOffsets";
case kLoLMonsterDirFlags:
@@ -2229,6 +2238,8 @@ const char *getIdString(const int id) {
return "kLoLLightningDefs";
case kLoLFireballCoords:
return "kLoLFireballCoords";
+ case kLoLCredits:
+ return "kLoLCredits";
case kLoLHistory:
return "kLoLHistory";
default:
diff --git a/devtools/create_kyradat/create_kyradat.h b/devtools/create_kyradat/create_kyradat.h
index c2a69cfd79..6d5059cabe 100644
--- a/devtools/create_kyradat/create_kyradat.h
+++ b/devtools/create_kyradat/create_kyradat.h
@@ -606,7 +606,10 @@ enum kExtractID {
kLoLCharDefsKieran,
kLoLCharDefsAkshel,
kLoLExpRequirements,
- kLoLMonsterModifiers,
+ kLoLMonsterModifiers1,
+ kLoLMonsterModifiers2,
+ kLoLMonsterModifiers3,
+ kLoLMonsterModifiers4,
kLoLMonsterShiftOffsets,
kLoLMonsterDirFlags,
kLoLMonsterScaleY,
diff --git a/devtools/create_kyradat/extract.cpp b/devtools/create_kyradat/extract.cpp
index 86244fce42..748bd36248 100644
--- a/devtools/create_kyradat/extract.cpp
+++ b/devtools/create_kyradat/extract.cpp
@@ -53,6 +53,7 @@ bool extractMrShapeAnimData(PAKFile &out, const ExtractInformation *info, const
bool extractRaw16(PAKFile &out, const ExtractInformation *info, const byte *data, const uint32 size, const char *filename, int id);
bool extractRaw32(PAKFile &out, const ExtractInformation *info, const byte *data, const uint32 size, const char *filename, int id);
bool extractLoLButtonDefs(PAKFile &out, const ExtractInformation *info, const byte *data, const uint32 size, const char *filename, int id);
+bool extractLoLFlyingShpDefs(PAKFile &out, const ExtractInformation *info, const byte *data, const uint32 size, const char *filename, int id);
bool extractEoB2SeqData(PAKFile &out, const ExtractInformation *info, const byte *data, const uint32 size, const char *filename, int id);
bool extractEoB2ShapeData(PAKFile &out, const ExtractInformation *info, const byte *data, const uint32 size, const char *filename, int id);
@@ -81,7 +82,7 @@ const ExtractType extractTypeTable[] = {
{ kLoLTypeCharData, extractRaw },
{ kLoLTypeSpellData, extractRaw },
{ kLoLTypeCompassData, extractRaw16to8 },
- { kLoLTypeFlightShpData, extractRaw16to8 },
+ { kLoLTypeFlightShpData, extractLoLFlyingShpDefs },
{ kLoLTypeRaw16, extractRaw16 },
{ kLoLTypeRaw32, extractRaw32 },
{ kLoLTypeButtonDef, extractLoLButtonDefs },
@@ -965,18 +966,23 @@ bool extractPaddedStrings(PAKFile &out, const ExtractInformation *info, const by
src++;
while (*src && src < fin)
*dst++ = *src++;
-
- *dst++ = '\0';
+ if (src < fin)
+ *dst++ = *src++;
entries++;
}
WRITE_BE_UINT32(buffer, entries);
+
outsize = dst - buffer;
return out.addFile(filename, buffer, outsize);
}
bool extractRaw16to8(PAKFile &out, const ExtractInformation *info, const byte *data, const uint32 size, const char *filename, int id) {
+ // Hack for some LOL FM-Towns entries
+ if (info->platform == Common::kPlatformFMTowns && ((id >= kLoLButtonList1 && id <= kLoLButtonList8) || id == kLoLCharInvIndex))
+ return extractRaw(out, info, data, size, filename, id);
+
int outsize = size >> 1;
uint8 *buffer = new uint8[outsize];
const uint8 *src = data;
@@ -1049,6 +1055,30 @@ bool extractLoLButtonDefs(PAKFile &out, const ExtractInformation *info, const by
return out.addFile(filename, buffer, outsize);
}
+bool extractLoLFlyingShpDefs(PAKFile &out, const ExtractInformation *info, const byte *data, const uint32 size, const char *filename, int id) {
+ if (info->platform != Common::kPlatformFMTowns)
+ return extractRaw16to8(out, info, data, size, filename, id);
+
+ int outsize = size / 9 * 5;
+ uint8 *buffer = new uint8[outsize];
+ const uint8 *src = data;
+ uint8 *dst = buffer;
+
+ for (int i = outsize / 5; i; --i) {
+ *dst++ = *src++;
+ src++;
+ *dst++ = *src++;
+ src++;
+ *dst++ = *src++;
+ src++;
+ *dst++ = *src++;
+ *dst++ = *src++;
+ src++;
+ }
+
+ return out.addFile(filename, buffer, outsize);
+}
+
bool extractEoB2SeqData(PAKFile &out, const ExtractInformation *info, const byte *data, const uint32 size, const char *filename, int id) {
int num = size / 11;
uint8 *buffer = new uint8[size];
diff --git a/devtools/create_kyradat/games.cpp b/devtools/create_kyradat/games.cpp
index 89229eb4f2..1b62155da0 100644
--- a/devtools/create_kyradat/games.cpp
+++ b/devtools/create_kyradat/games.cpp
@@ -124,6 +124,9 @@ const Game lolGames[] = {
// PC98 (no language specifc strings)
{ kLoL, { JA_JPN, -1, -1 }, kPlatformPC98, kNoSpecial, { "6d5bd4a2f5ce433365734ca6b7a8d984", "1b0a457c48ae6908da301b656fe0aab4" } },
+ // FM-Towns (no language specifc strings)
+ { kLoL, { JA_JPN, -1, -1 }, kPlatformFMTowns, kNoSpecial, { "a281c7143bf2b6c5d4daa107a4b0427e", "34b4cecce179990e3bcaaa2d31484a90"} },
+
// DOS CD (multi language version, with no language specific strings)
{ kLoL, { EN_ANY, FR_FRA, DE_DEU }, kPlatformPC, kTalkieVersion, { "9d1778314de80598c0b0d032e2a1a1cf", "263998ec600afca1cc7b935c473df670" } },
{ kLoL, { IT_ITA, FR_FRA, DE_DEU }, kPlatformPC, kTalkieVersion, { "9d1778314de80598c0b0d032e2a1a1cf", "f2af366e00f79dbf832fa19701d71ed9" } }, // Italian fan translation
@@ -800,7 +803,9 @@ const int lolFloppyNeed[] = {
kLoLCharDefsKieran,
kLoLCharDefsAkshel,
kLoLExpRequirements,
- kLoLMonsterModifiers,
+ kLoLMonsterModifiers1,
+ kLoLMonsterModifiers2,
+ kLoLMonsterModifiers3,
kLoLMonsterShiftOffsets,
kLoLMonsterDirFlags,
kLoLMonsterScaleY,
@@ -844,7 +849,6 @@ const int lolFloppyNeed[] = {
kLoLButtonDefs,
kLoLButtonList1,
- kLoLButtonList1,
kLoLButtonList2,
kLoLButtonList3,
kLoLButtonList4,
@@ -882,7 +886,9 @@ const int lolPC98Need[] = {
kLoLCharDefsKieran,
kLoLCharDefsAkshel,
kLoLExpRequirements,
- kLoLMonsterModifiers,
+ kLoLMonsterModifiers1,
+ kLoLMonsterModifiers2,
+ kLoLMonsterModifiers3,
kLoLMonsterShiftOffsets,
kLoLMonsterDirFlags,
kLoLMonsterScaleY,
@@ -926,6 +932,89 @@ const int lolPC98Need[] = {
kLoLButtonDefs,
kLoLButtonList1,
+ kLoLButtonList2,
+ kLoLButtonList3,
+ kLoLButtonList4,
+ kLoLButtonList5,
+ kLoLButtonList6,
+ kLoLButtonList7,
+ kLoLButtonList8,
+
+ kLoLLegendData,
+ kLoLMapStringId,
+
+ kLoLSpellbookAnim,
+ kLoLSpellbookCoords,
+ kLoLHealShapeFrames,
+ kLoLLightningDefs,
+ kLoLFireballCoords,
+
+ kLoLCredits,
+
+ -1
+};
+
+const int lolFMTownsNeed[] = {
+ kLoLIngamePakFiles,
+
+ kLoLCharacterDefs,
+ kLoLIngameSfxFiles,
+ kLoLIngameSfxIndex,
+ kLoLSpellProperties,
+ kLoLGameShapeMap,
+ kLoLSceneItemOffs,
+ kLoLCharInvIndex,
+ kLoLCharInvDefs,
+ kLoLCharDefsMan,
+ kLoLCharDefsWoman,
+ kLoLCharDefsKieran,
+ kLoLCharDefsAkshel,
+ kLoLExpRequirements,
+ kLoLMonsterModifiers1,
+ kLoLMonsterModifiers2,
+ kLoLMonsterModifiers3,
+ kLoLMonsterShiftOffsets,
+ kLoLMonsterDirFlags,
+ kLoLMonsterScaleY,
+ kLoLMonsterScaleX,
+ kLoLMonsterScaleWH,
+ kLoLFlyingObjectShp,
+ kLoLInventoryDesc,
+
+ kLoLLevelShpList,
+ kLoLLevelDatList,
+ kLoLCompassDefs,
+ kLoLStashSetup,
+ kLoLDscWalls,
+ kRpgCommonDscShapeIndex,
+ kLoLDscOvlMap,
+ kLoLDscScaleWidthData,
+ kLoLDscScaleHeightData,
+ kRpgCommonDscX,
+ kLoLDscY,
+ kRpgCommonDscTileIndex,
+ kRpgCommonDscUnk2,
+ kRpgCommonDscDoorShapeIndex,
+ kRpgCommonDscDimData1,
+ kRpgCommonDscDimData2,
+ kRpgCommonDscBlockMap,
+ kRpgCommonDscDimMap,
+ kLoLDscOvlIndex,
+ kRpgCommonDscBlockIndex,
+ kRpgCommonDscDoorY2,
+ kRpgCommonDscDoorFrameY1,
+ kRpgCommonDscDoorFrameY2,
+ kLoLDscDoorScale,
+ kLoLDscDoor4,
+ kLoLDscDoorX,
+ kLoLDscDoorY,
+
+ kLoLScrollXTop,
+ kLoLScrollYTop,
+ kLoLScrollXBottom,
+ kLoLScrollYBottom,
+
+ kLoLButtonDefs,
kLoLButtonList1,
kLoLButtonList2,
kLoLButtonList3,
@@ -968,7 +1057,10 @@ const int lolCDNeed[] = {
kLoLCharDefsKieran,
kLoLCharDefsAkshel,
kLoLExpRequirements,
- kLoLMonsterModifiers,
+ kLoLMonsterModifiers1,
+ kLoLMonsterModifiers2,
+ kLoLMonsterModifiers3,
+ kLoLMonsterModifiers4,
kLoLMonsterShiftOffsets,
kLoLMonsterDirFlags,
kLoLMonsterScaleY,
@@ -1013,7 +1105,6 @@ const int lolCDNeed[] = {
kLoLButtonDefs,
kLoLButtonList1,
- kLoLButtonList1,
kLoLButtonList2,
kLoLButtonList3,
kLoLButtonList4,
@@ -1695,6 +1786,7 @@ const GameNeed gameNeedTable[] = {
{ kLoL, kPlatformPC, kNoSpecial, lolFloppyNeed },
{ kLoL, kPlatformPC98, kNoSpecial, lolPC98Need },
+ { kLoL, kPlatformFMTowns, kNoSpecial, lolFMTownsNeed },
{ kLoL, kPlatformPC, kTalkieVersion, lolCDNeed },
diff --git a/devtools/create_kyradat/tables.cpp b/devtools/create_kyradat/tables.cpp
index 19b69d9410..09d70bc448 100644
--- a/devtools/create_kyradat/tables.cpp
+++ b/devtools/create_kyradat/tables.cpp
@@ -3341,7 +3341,7 @@ const ExtractEntrySearchData kEoB2WallOfForceShpIdProvider[] = {
const ExtractEntrySearchData kLoLIngamePakFilesProvider[] = {
{ UNK_LANG, kPlatformPC, { 0x00000088, 0x0000224F, { { 0xDA, 0x24, 0x18, 0xA3, 0xEF, 0x16, 0x70, 0x8F, 0xA8, 0xC2, 0x2E, 0xC2, 0xED, 0x39, 0x03, 0xD1 } } } },
{ UNK_LANG, kPlatformPC98, { 0x00000084, 0x00002125, { { 0x7A, 0x89, 0xE2, 0x36, 0xEC, 0x6F, 0x52, 0x2B, 0xEF, 0xBA, 0x3D, 0x28, 0x54, 0xDA, 0xFB, 0x72 } } } },
-
+ { UNK_LANG, kPlatformFMTowns, { 0x0000009D, 0x00002179, { { 0x7D, 0x7A, 0xE1, 0xD9, 0x69, 0x23, 0x9D, 0xFF, 0x83, 0x39, 0x73, 0xEC, 0xF4, 0x26, 0x20, 0x8E } } } },
EXTRACT_END_ENTRY
};
@@ -3356,6 +3356,7 @@ const ExtractEntrySearchData kLoLCharacterDefsProvider[] = {
{ RU_RUS, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
{ IT_ITA, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
{ JA_JPN, kPlatformPC98, { 0x00000492, 0x00005893, { { 0x7C, 0x7E, 0xFB, 0x80, 0xD9, 0xB6, 0x16, 0x87, 0x80, 0xB7, 0x46, 0x9B, 0x96, 0x1A, 0x6A, 0xBE } } } },
+ { JA_JPN, kPlatformFMTowns, { 0x00000492, 0x00005041, { { 0xAB, 0x07, 0x37, 0xFE, 0xC2, 0x4B, 0x5D, 0x16, 0xE4, 0xC4, 0x2C, 0x8C, 0xC3, 0x78, 0xCB, 0xCB } } } },
EXTRACT_END_ENTRY
};
@@ -3364,7 +3365,7 @@ const ExtractEntrySearchData kLoLIngameSfxFilesProvider[] = {
{ UNK_LANG, kPlatformPC, { 0x000008F2, 0x0001E5B6, { { 0x63, 0x5E, 0x37, 0xAA, 0x27, 0x80, 0x4C, 0x85, 0xB1, 0x9D, 0x7B, 0x1D, 0x64, 0xA3, 0xEB, 0x97 } } } }, // floppy
{ UNK_LANG, kPlatformPC, { 0x000008F2, 0x0001E5B7, { { 0x9E, 0xC8, 0xE8, 0x19, 0x2F, 0x58, 0x0B, 0xC7, 0x2D, 0x41, 0x72, 0xE7, 0xF4, 0x80, 0x03, 0xCB } } } }, // CD
{ UNK_LANG, kPlatformPC98, { 0x000008EF, 0x0001E585, { { 0x85, 0x81, 0x5C, 0xA4, 0x34, 0x44, 0xF4, 0x58, 0xF9, 0x82, 0xEE, 0x0F, 0x6A, 0x0D, 0xA2, 0x7F } } } },
-
+ { UNK_LANG, kPlatformFMTowns, { 0x000008F0, 0x0001E585, { { 0xB7, 0x82, 0xFF, 0xAB, 0x71, 0x54, 0xEB, 0x52, 0x8D, 0xAC, 0x9A, 0xB4, 0x9E, 0x33, 0x00, 0x95 } } } },
EXTRACT_END_ENTRY
};
@@ -3419,6 +3420,7 @@ const ExtractEntrySearchData kLoLSceneItemOffsProvider[] = {
const ExtractEntrySearchData kLoLCharInvIndexProvider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x0000000A, 0x00000006, { { 0x19, 0x79, 0x4E, 0xFC, 0x05, 0x14, 0x89, 0x23, 0xEB, 0xCA, 0x94, 0x50, 0xE8, 0xD3, 0x81, 0x24 } } } },
+ { UNK_LANG, kPlatformFMTowns, { 0x00000005, 0x00000006, { { 0x54, 0x11, 0x01, 0x79, 0x4D, 0xED, 0xF9, 0xEA, 0xDF, 0x03, 0x51, 0xAB, 0x8D, 0x9D, 0x2F, 0x34 } } } },
EXTRACT_END_ENTRY
};
@@ -3459,10 +3461,24 @@ const ExtractEntrySearchData kLoLExpRequirementsProvider[] = {
EXTRACT_END_ENTRY
};
-const ExtractEntrySearchData kLoLMonsterModifiersProvider[] = {
- { UNK_LANG, kPlatformUnknown, { 0x00000018, 0x000002C6, { { 0x38, 0x9A, 0x8B, 0x50, 0xD2, 0x9B, 0x95, 0x38, 0x91, 0x02, 0xA9, 0xBE, 0x78, 0xE5, 0x89, 0x65 } } } }, // floppy + PC98
- { UNK_LANG, kPlatformPC, { 0x00000018, 0x000002EE, { { 0x4E, 0x37, 0x56, 0xE3, 0x42, 0xB3, 0x15, 0x2C, 0x7E, 0x9B, 0x7E, 0x50, 0x32, 0x91, 0x55, 0xBE } } } }, // CD
+const ExtractEntrySearchData kLoLMonsterModifiers1Provider[] = {
+ { UNK_LANG, kPlatformUnknown, { 0x00000006, 0x00000142, { { 0x62, 0x4B, 0x5E, 0x46, 0x64, 0xA4, 0x3A, 0xB7, 0x11, 0x14, 0xA8, 0x41, 0xAF, 0x4E, 0xE6, 0x58 } } } }, // floppy + PC98 + FM-TOWNS
+ { UNK_LANG, kPlatformPC, { 0x00000006, 0x000000E8, { { 0x94, 0xCB, 0xD2, 0xE4, 0xF4, 0xA8, 0x4D, 0x46, 0x2E, 0x84, 0x8C, 0x6F, 0xF9, 0x75, 0xD7, 0x28 } } } }, // CD
+ EXTRACT_END_ENTRY
+};
+const ExtractEntrySearchData kLoLMonsterModifiers2Provider[] = {
+ { UNK_LANG, kPlatformUnknown, { 0x00000006, 0x000000C2, { { 0x89, 0x12, 0xA7, 0x0D, 0xD9, 0xC7, 0x5B, 0x03, 0xD4, 0x21, 0x6F, 0x0A, 0x1D, 0x83, 0x1B, 0x98 } } } },
+ EXTRACT_END_ENTRY
+};
+
+const ExtractEntrySearchData kLoLMonsterModifiers3Provider[] = {
+ { UNK_LANG, kPlatformUnknown, { 0x00000006, 0x000000C2, { { 0x56, 0x4D, 0x82, 0xCC, 0x2C, 0x00, 0x1E, 0x9D, 0xF7, 0x64, 0xB7, 0x60, 0x63, 0x0A, 0x03, 0xD7 } } } },
+ EXTRACT_END_ENTRY
+};
+
+const ExtractEntrySearchData kLoLMonsterModifiers4Provider[] = {
+ { UNK_LANG, kPlatformPC, { 0x00000006, 0x00000082, { { 0xA8, 0xFC, 0xBB, 0x1B, 0xC0, 0x85, 0x3B, 0xEF, 0xDB, 0xDE, 0xB0, 0x98, 0x58, 0x34, 0x75, 0xE9 } } } }, // CD
EXTRACT_END_ENTRY
};
@@ -3487,6 +3503,7 @@ const ExtractEntrySearchData kLoLMonsterScaleYProvider[] = {
const ExtractEntrySearchData kLoLMonsterScaleXProvider[] = {
{ UNK_LANG, kPlatformPC, { 0x00000020, 0x00000918, { { 0xF6, 0x14, 0xE6, 0x48, 0x4E, 0x5B, 0x43, 0xCC, 0xCE, 0x4E, 0x98, 0x71, 0x5A, 0xC2, 0x00, 0x1E } } } },
{ UNK_LANG, kPlatformPC98, { 0x0000001D, 0x000008D2, { { 0x1C, 0x25, 0x38, 0xE2, 0xBB, 0xB2, 0xDB, 0x93, 0x1B, 0x25, 0xB6, 0x89, 0xA9, 0x9B, 0x0A, 0xFE } } } },
+ { UNK_LANG, kPlatformFMTowns, { 0x0000001D, 0x000008D2, { { 0x1C, 0x25, 0x38, 0xE2, 0xBB, 0xB2, 0xDB, 0x93, 0x1B, 0x25, 0xB6, 0x89, 0xA9, 0x9B, 0x0A, 0xFE } } } },
EXTRACT_END_ENTRY
};
@@ -3499,6 +3516,7 @@ const ExtractEntrySearchData kLoLMonsterScaleWHProvider[] = {
const ExtractEntrySearchData kLoLFlyingObjectShpProvider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x00000082, 0x00000252, { { 0xDE, 0x9D, 0x89, 0xAF, 0x0F, 0x50, 0x14, 0x60, 0x68, 0xAF, 0x19, 0xD8, 0x54, 0x8A, 0x36, 0x27 } } } },
+ { UNK_LANG, kPlatformFMTowns, { 0x00000075, 0x00000252, { { 0xD7, 0xE5, 0x13, 0x67, 0xDB, 0x9C, 0xD4, 0x12, 0x0E, 0x99, 0x0D, 0x2A, 0x70, 0x17, 0x95, 0x89 } } } },
EXTRACT_END_ENTRY
};
@@ -3511,13 +3529,13 @@ const ExtractEntrySearchData kLoLInventoryDescProvider[] = {
const ExtractEntrySearchData kLoLLevelShpListProvider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x0000007F, 0x00002090, { { 0x17, 0x31, 0x8A, 0xB5, 0x9B, 0x3A, 0xDA, 0x16, 0x9E, 0xE3, 0xD1, 0x5F, 0xB4, 0x7B, 0xB2, 0x25 } } } },
-
+ { UNK_LANG, kPlatformFMTowns, { 0x00000091, 0x00002090, { { 0x51, 0x79, 0x1D, 0x60, 0xB0, 0x71, 0xB8, 0xF2, 0xDD, 0xD4, 0x36, 0x1B, 0xF8, 0x15, 0xBF, 0xB7 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kLoLLevelDatListProvider[] = {
- { UNK_LANG, kPlatformUnknown, { 0x0000007F, 0x00001FB8, { { 0xF6, 0xE9, 0x98, 0x79, 0x51, 0xCA, 0xA0, 0x35, 0xE4, 0xD0, 0xA1, 0xCD, 0x23, 0x89, 0x7D, 0x11 } } } }, // floppy + PC98
- { UNK_LANG, kPlatformPC, { 0x000000FF, 0x000047EC, { { 0x0D, 0xA5, 0xFD, 0x8A, 0x33, 0xDB, 0x93, 0x43, 0xE2, 0x57, 0x35, 0xEC, 0xA6, 0xCF, 0x7A, 0xA1 } } } }, // CD
+ { UNK_LANG, kPlatformUnknown, { 0x0000007F, 0x00001FB8, { { 0xF6, 0xE9, 0x98, 0x79, 0x51, 0xCA, 0xA0, 0x35, 0xE4, 0xD0, 0xA1, 0xCD, 0x23, 0x89, 0x7D, 0x11 } } } },
+ { UNK_LANG, kPlatformFMTowns, { 0x00000091, 0x00001FB8, { { 0x65, 0x1A, 0x3E, 0x96, 0x96, 0xA9, 0x94, 0xD6, 0xD5, 0x21, 0xBE, 0x60, 0xB5, 0x83, 0xF0, 0xE5 } } } },
EXTRACT_END_ENTRY
};
@@ -3680,7 +3698,7 @@ const ExtractEntrySearchData kLoLDscDoorScaleProvider[] = {
const ExtractEntrySearchData kLoLDscDoor4Provider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x00000008, 0x00000103, { { 0x29, 0xC0, 0x4B, 0x7F, 0x36, 0x23, 0xBB, 0x38, 0x4C, 0x83, 0xC6, 0x9D, 0xB4, 0x8F, 0x29, 0x2E } } } },
-
+ { UNK_LANG, kPlatformFMTowns, { 0x00000008, 0x0000000F, { { 0x9C, 0x6B, 0xAF, 0x69, 0x42, 0xC9, 0xC9, 0xA0, 0xD9, 0xF3, 0x54, 0xD9, 0x9A, 0xAF, 0xCF, 0xD8 } } } },
EXTRACT_END_ENTRY
};
@@ -3725,55 +3743,56 @@ const ExtractEntrySearchData kLoLButtonDefsProvider[] = {
{ UNK_LANG, kPlatformPC, { 0x0000082A, 0x0000C34E, { { 0x7F, 0x9A, 0x0F, 0x28, 0x1A, 0x8F, 0x03, 0x46, 0x48, 0xEB, 0xC9, 0xB9, 0x23, 0x29, 0x5E, 0x50 } } } }, // floppy
{ UNK_LANG, kPlatformPC, { 0x0000082A, 0x0000C47B, { { 0xDF, 0x1A, 0x18, 0x1F, 0x58, 0x05, 0x1F, 0x56, 0xD8, 0x6D, 0xBB, 0x93, 0xEC, 0x35, 0x9D, 0xA5 } } } }, // CD
{ UNK_LANG, kPlatformPC98, { 0x0000082A, 0x0000AB58, { { 0xDD, 0x2B, 0xA9, 0x54, 0x60, 0x25, 0x2C, 0x74, 0xF8, 0x5D, 0xC6, 0xD2, 0x2C, 0x1A, 0x24, 0x44 } } } },
-
+ { UNK_LANG, kPlatformFMTowns, { 0x0000082A, 0x0000D271, { { 0xAF, 0xAD, 0x11, 0xF9, 0xDC, 0x41, 0x94, 0xB3, 0x0E, 0x48, 0x69, 0xB3, 0x32, 0x89, 0x7C, 0xDD } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kLoLButtonList1Provider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x00000050, 0x00000A37, { { 0x0F, 0x73, 0xEC, 0xDD, 0xAB, 0xFF, 0x49, 0x46, 0x5E, 0x8F, 0x0D, 0xC3, 0xE7, 0x1B, 0x89, 0x51 } } } },
+ { UNK_LANG, kPlatformFMTowns, { 0x00000028, 0x00000938, { { 0x4B, 0xD9, 0x4A, 0x57, 0x58, 0xEC, 0x01, 0xE5, 0xA1, 0x25, 0x6A, 0x1A, 0x9C, 0x5D, 0x79, 0x19 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kLoLButtonList2Provider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x0000001E, 0x00000522, { { 0xEA, 0x41, 0x46, 0xE2, 0xFE, 0xAA, 0x7D, 0x5E, 0x89, 0x7F, 0xBF, 0x9B, 0x30, 0x60, 0x74, 0xF3 } } } },
-
+ { UNK_LANG, kPlatformFMTowns, { 0x0000000F, 0x00000423, { { 0xD3, 0xA8, 0xD4, 0xFB, 0x1A, 0x56, 0x21, 0x8C, 0x01, 0xED, 0xF8, 0x54, 0xA9, 0xC5, 0x97, 0x04 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kLoLButtonList3Provider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x00000004, 0x0000023E, { { 0x70, 0xAA, 0xCA, 0xAC, 0x5C, 0x21, 0xCF, 0xA5, 0xBF, 0x7F, 0x5F, 0xBC, 0xF1, 0x24, 0x8A, 0xAF } } } },
-
+ { UNK_LANG, kPlatformFMTowns, { 0x00000002, 0x0000013F, { { 0xDF, 0xE4, 0x3D, 0x18, 0x94, 0x18, 0xA5, 0x74, 0xBA, 0x26, 0x7B, 0x31, 0x87, 0xAE, 0xEE, 0x22 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kLoLButtonList4Provider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x0000001E, 0x0000054D, { { 0x19, 0x2A, 0xBE, 0x7F, 0x94, 0x10, 0xA0, 0x60, 0x2A, 0x33, 0xD6, 0x11, 0x85, 0xF0, 0xA4, 0xA9 } } } },
-
+ { UNK_LANG, kPlatformFMTowns, { 0x0000000F, 0x0000044E, { { 0x18, 0x1E, 0xBB, 0x7D, 0xAC, 0xA1, 0x87, 0x0F, 0x32, 0xA3, 0xBF, 0x5F, 0xBC, 0xBB, 0x90, 0xA4 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kLoLButtonList5Provider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x00000020, 0x0000045D, { { 0xE3, 0x7C, 0xC2, 0x36, 0x21, 0x46, 0xDB, 0xF3, 0xDD, 0x38, 0x4B, 0x40, 0xE0, 0x35, 0x09, 0xC3 } } } },
-
+ { UNK_LANG, kPlatformFMTowns, { 0x00000010, 0x0000035E, { { 0x4E, 0xE2, 0xD6, 0x93, 0xA3, 0xEF, 0xD0, 0xEA, 0x28, 0xE6, 0xE7, 0xDD, 0xFC, 0x44, 0xE2, 0xB9 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kLoLButtonList6Provider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x0000001C, 0x000004C4, { { 0x21, 0x7C, 0x29, 0x3F, 0x95, 0x6F, 0x91, 0x8C, 0xB2, 0x30, 0x09, 0xA6, 0x7B, 0x48, 0x44, 0x8F } } } },
-
+ { UNK_LANG, kPlatformFMTowns, { 0x0000000E, 0x000003C5, { { 0x05, 0x10, 0x83, 0x1E, 0x18, 0x11, 0xC4, 0x43, 0x01, 0xE3, 0xE0, 0xD7, 0x79, 0x29, 0xA5, 0x86 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kLoLButtonList7Provider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x00000006, 0x0000021D, { { 0xDC, 0xCE, 0x1B, 0xEB, 0x11, 0x6D, 0xDE, 0x37, 0x17, 0xC8, 0x06, 0x51, 0xC3, 0x0C, 0xCB, 0xA6 } } } },
-
+ { UNK_LANG, kPlatformFMTowns, { 0x00000003, 0x0000011E, { { 0xCF, 0x37, 0xEF, 0x83, 0xEC, 0x0D, 0x65, 0x41, 0xC8, 0x1D, 0xD1, 0x20, 0x82, 0x6B, 0xB5, 0x9B } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kLoLButtonList8Provider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x00000004, 0x00000253, { { 0x0C, 0x7B, 0x10, 0x99, 0x93, 0xD0, 0x33, 0xCA, 0xAB, 0x8D, 0x7E, 0x24, 0xE5, 0x7E, 0x6C, 0x91 } } } },
-
+ { UNK_LANG, kPlatformFMTowns, { 0x00000002, 0x00000154, { { 0xE9, 0x6B, 0x8A, 0xD7, 0x8E, 0xCF, 0x66, 0x07, 0xDC, 0xF1, 0xC0, 0xAA, 0x81, 0x88, 0xB8, 0xB9 } } } },
EXTRACT_END_ENTRY
};
@@ -3828,7 +3847,7 @@ const ExtractEntrySearchData kLoLFireballCoordsProvider[] = {
const ExtractEntrySearchData kLoLCreditsProvider[] = {
{ JA_JPN , kPlatformPC98, { 0x000005E7, 0x0001A1B0, { { 0x2A, 0xD0, 0x38, 0x84, 0x0C, 0x38, 0xCB, 0x52, 0x5D, 0x82, 0xBE, 0x03, 0x76, 0xFA, 0x0A, 0x4A } } } },
-
+ { JA_JPN , kPlatformFMTowns, { 0x000005EC, 0x0001A219, { { 0x03, 0xBC, 0x67, 0x19, 0xA1, 0x99, 0x70, 0x10, 0x7A, 0x73, 0x85, 0xDA, 0xB4, 0x59, 0x49, 0xB0 } } } },
EXTRACT_END_ENTRY
};
@@ -4377,7 +4396,10 @@ const ExtractEntry extractProviders[] = {
{ kLoLCharDefsKieran, kLoLCharDefsKieranProvider },
{ kLoLCharDefsAkshel, kLoLCharDefsAkshelProvider },
{ kLoLExpRequirements, kLoLExpRequirementsProvider },
- { kLoLMonsterModifiers, kLoLMonsterModifiersProvider },
+ { kLoLMonsterModifiers1, kLoLMonsterModifiers1Provider },
+ { kLoLMonsterModifiers2, kLoLMonsterModifiers2Provider },
+ { kLoLMonsterModifiers3, kLoLMonsterModifiers3Provider },
+ { kLoLMonsterModifiers4, kLoLMonsterModifiers4Provider },
{ kLoLMonsterShiftOffsets, kLoLMonsterShiftOffsetsProvider },
{ kLoLMonsterDirFlags, kLoLMonsterDirFlagsProvider },
{ kLoLMonsterScaleY, kLoLMonsterScaleYProvider },
diff --git a/devtools/credits.pl b/devtools/credits.pl
index 3c97e6ab0b..06df7fa50e 100755
--- a/devtools/credits.pl
+++ b/devtools/credits.pl
@@ -65,6 +65,7 @@ sub html_entities_to_ascii {
# &oslash; -> o
# &ouml; -> o / oe
# &auml; -> a
+ # &euml; -> e
# &uuml; -> ue
# &aring; -> aa
# &amp; -> &
@@ -82,6 +83,7 @@ sub html_entities_to_ascii {
$text =~ s/&aring;/aa/g;
$text =~ s/&auml;/a/g;
+ $text =~ s/&euml;/e/g;
$text =~ s/&uuml;/ue/g;
# HACK: Torbj*o*rn but G*oe*ffringmann and R*oe*ver and J*oe*rg
$text =~ s/Torbj&ouml;rn/Torbjorn/g;
@@ -108,6 +110,7 @@ sub html_entities_to_cpp {
$text =~ s/&aring;/\\345/g;
$text =~ s/&auml;/\\344/g;
+ $text =~ s/&euml;/\\353/g;
$text =~ s/&ouml;/\\366/g;
$text =~ s/&uuml;/\\374/g;
@@ -133,6 +136,7 @@ sub html_entities_to_rtf {
# Back to hex numbers
$text =~ s/&auml;/\\'8a/g;
+ $text =~ s/&euml;/\\'eb/g;
$text =~ s/&ouml;/\\'9a/g;
$text =~ s/&uuml;/\\'9f/g;
@@ -156,6 +160,7 @@ sub html_entities_to_tex {
$text =~ s/&auml;/\\"a/g;
$text =~ s/&ouml;/\\"o/g;
+ $text =~ s/&euml;/\\"e/g;
$text =~ s/&uuml;/\\"u/g;
$text =~ s/&amp;/\\&/g;
@@ -267,14 +272,22 @@ sub begin_section {
print '\f1\b0\fs24 \cf0 \\' . "\n";
} elsif ($mode eq "CPP") {
if ($section_level eq 0) {
- # TODO: Would be nice to have a 'fat' or 'large' mode for
- # headlines...
- $title = html_entities_to_cpp($title);
- print '"C1""'.$title.'",' . "\n";
- print '"",' . "\n";
+ # TODO: Would be nice to have a 'fat' or 'large' mode for
+ # headlines...
+ my $ascii_title = html_entities_to_ascii($title);
+ $title = html_entities_to_cpp($title);
+ if ($ascii_title ne $title) {
+ print '"A1""'.$ascii_title.'",' . "\n";
+ }
+ print '"C1""'.$title.'",' . "\n";
+ print '"",' . "\n";
} else {
- $title = html_entities_to_cpp($title);
- print '"C1""'.$title.'",' . "\n";
+ my $ascii_title = html_entities_to_ascii($title);
+ $title = html_entities_to_cpp($title);
+ if ($ascii_title ne $title) {
+ print '"A1""'.$ascii_title.'",' . "\n";
+ }
+ print '"C1""'.$title.'",' . "\n";
}
} elsif ($mode eq "XML-DOC") {
print " <row><entry namest='start' nameend='job'>";
@@ -392,13 +405,21 @@ sub add_person {
}
} elsif ($mode eq "CPP") {
$name = $nick if $name eq "";
+ my $ascii_name = html_entities_to_ascii($name);
$name = html_entities_to_cpp($name);
+ if ($ascii_name ne $name) {
+ print '"A0""'.$ascii_name.'",' . "\n";
+ }
print '"C0""'.$name.'",' . "\n";
# Print desc wrapped
if (length $desc > 0) {
+ my $ascii_desc = html_entities_to_ascii($desc);
$desc = html_entities_to_cpp($desc);
+ if ($ascii_desc ne $desc) {
+ print '"A2""'.$ascii_desc.'",' . "\n";
+ }
print '"C2""'.$desc.'",' . "\n";
}
} elsif ($mode eq "XML-DOC") {
@@ -574,6 +595,11 @@ begin_credits("Credits");
add_person("Jordi Vilalta Prat", "jvprat", "");
end_section();
+ begin_section("Hopkins");
+ add_person("Arnaud Boutonn&eacute;", "Strangerke", "");
+ add_person("Paul Gilbert", "dreammaster", "");
+ end_section();
+
begin_section("Hugo");
add_person("Arnaud Boutonn&eacute;", "Strangerke", "");
add_person("Oystein Eftevaag", "vinterstum", "");
@@ -687,6 +713,11 @@ begin_credits("Credits");
add_person("Joost Peters", "joostp", "");
end_section();
+ begin_section("Toltecs");
+ add_person("Benjamin Haisch", "john_doe", "");
+ add_person("Filippos Karapetis", "[md5]", "");
+ end_section();
+
begin_section("Tony");
add_person("Arnaud Boutonn&eacute;", "Strangerke", "");
add_person("Paul Gilbert", "dreammaster", "");
@@ -815,6 +846,7 @@ begin_credits("Credits");
add_person("Jerome Fisher", "KingGuppy", "MT-32 emulator");
add_person("Benjamin Haisch", "john_doe", "Heavily improved de-/encoder for DXA videos");
add_person("Jochen Hoenicke", "hoenicke", "Speaker &amp; PCjr sound support, AdLib work (retired)");
+ add_person("Dani&euml;l ter Laan", "NoiZe", "Restoring original Drascula tracks, and writing convert_dxa.bat");
add_person("Chris Page", "cp88", "Return to launcher, savestate improvements, leak fixes, ... (GSoC 2008 task) (retired)");
add_person("Robin Watts", "robinwatts", "ARM assembly routines for nice speedups on several ports; improvements to the sound mixer");
end_section();
diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt
index 42dcb27d1a..414a25e906 100644
--- a/devtools/scumm-md5.txt
+++ b/devtools/scumm-md5.txt
@@ -546,6 +546,7 @@ freddi4 Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch
a336134914eaab4892d35625aa15ad1d -1 ru Windows HE 99 - - George Kormendi
b5298a5c15ffbe8b381d51ea4e26d35c -1 de All HE 99 - - Joachim Eberhard
4f138ac6f9b2ac5a41bc68b2c3296064 -1 fr Windows HE 99 - - gist974
+ e9271b3d0694c7101f10d675ab7c0133 -1 it Windows HE 99 - - George Q. Greg
78bd5f036ea35a878b74e4f47941f784 -1 ru Windows HE 99 - - sev
7c2e76087027eeee9c8f8985f93a1cc5 13584 en All - Demo - khalek
@@ -560,6 +561,7 @@ freddi4 Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch
e03ed1474ec14de78359970e0457a820 -1 gb Windows HE 99 Demo - eriktorbjorn
d54622d31255619d207dd245d3f92327 -1 fr Windows HE 99 Demo - Mevi
dcf0119a90451a7d6e0f1920931ba130 -1 fr Windows HE 99 Demo - Mevi
+ 47e041521d35c7a801bb1c010d84da9d -1 it Windows HE 99 Demo - Kirben
freddicove Freddi Fish 5: The Case of the Creature of Coral Cove
590e6546aacd0d374b7f3a4f53013ab1 -1 All All - - - cyx
@@ -715,6 +717,7 @@ puttrace Putt-Putt Enters the Race
c8575e0b973ff1723aba6cd92c642db2 -1 fr Windows HE 99 Demo - Mevi
3769b56c9a22f5521d74525ee459f88d 13108 de Windows HE 99 Demo - George Kormendi
7c8100e360e8ef05f88069d4cfa0afd1 13108 gb Windows HE 99 Demo - eriktorbjorn
+ 9778341eefc6feb447ca07e7be21791c -1 it Windows HE 99 Demo - Kirben
6b27dbcd8d5697d5c918eeca0f68ef6a 3901484 All All HE CUP Preview - sev
puttmoon Putt-Putt Goes to the Moon
diff --git a/dists/bada/Res/scummmobile/scummmobile_layout.stx b/dists/bada/Res/scummmobile/scummmobile_layout.stx
index efb8ebc6b5..5da293a131 100644
--- a/dists/bada/Res/scummmobile/scummmobile_layout.stx
+++ b/dists/bada/Res/scummmobile/scummmobile_layout.stx
@@ -371,6 +371,10 @@
height = 'Globals.Line.Height'
/>
</layout>
+ <widget name = 'mcFluidSynthSettings'
+ width = '200'
+ height = 'Globals.Button.Height'
+ />
</layout>
</dialog>
@@ -786,6 +790,157 @@
</layout>
</dialog>
+ <dialog name = 'FluidSynthSettings' overlays = 'GlobalOptions' shading = 'dim'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'TabWidget'/>
+ <layout type = 'horizontal' padding = '16, 16, 16, 16'>
+ <space/>
+ <widget name = 'ResetSettings'
+ type = 'Button'
+ />
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Ok'
+ type = 'Button'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Chorus' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'VoiceCountText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'VoiceCountSlider'
+ type = 'Slider'
+ />
+ <widget name = 'VoiceCountLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'LevelText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'LevelSlider'
+ type = 'Slider'
+ />
+ <widget name = 'LevelLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'SpeedText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'SpeedSlider'
+ type = 'Slider'
+ />
+ <widget name = 'SpeedLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'DepthText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'DepthSlider'
+ type = 'Slider'
+ />
+ <widget name = 'DepthLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'WaveFormTypeText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'WaveFormType'
+ type = 'PopUp'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Reverb' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'RoomSizeText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'RoomSizeSlider'
+ type = 'Slider'
+ />
+ <widget name = 'RoomSizeLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'DampingText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'DampingSlider'
+ type = 'Slider'
+ />
+ <widget name = 'DampingLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'WidthText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'WidthSlider'
+ type = 'Slider'
+ />
+ <widget name = 'WidthLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'LevelText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'LevelSlider'
+ type = 'Slider'
+ />
+ <widget name = 'LevelLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Misc' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'InterpolationText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'Interpolation'
+ type = 'PopUp'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
<dialog name = 'SaveLoadChooser' overlays = 'screen' inset = '8' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 8, 32' center = 'true'>
<widget name = 'Title'
diff --git a/dists/debian/copyright b/dists/debian/copyright
index 318c06f62b..1cccd01a07 100644
--- a/dists/debian/copyright
+++ b/dists/debian/copyright
@@ -7,7 +7,7 @@ It was downloaded from <http://www.scummvm.org/>.
Upstream Authors: see `/usr/share/doc/scummvm/AUTHORS'.
-Scummvm is Copyright ТЉ 2002-2012 The ScummVM Project
+Scummvm is Copyright ТЉ 2002-2013 The ScummVM Project
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat
index 339b85664a..305c7e665c 100644
--- a/dists/engine-data/kyra.dat
+++ b/dists/engine-data/kyra.dat
Binary files differ
diff --git a/dists/engine-data/wintermute.zip b/dists/engine-data/wintermute.zip
new file mode 100644
index 0000000000..924429972b
--- /dev/null
+++ b/dists/engine-data/wintermute.zip
Binary files differ
diff --git a/dists/macosx/Info.plist b/dists/macosx/Info.plist
index d8c28f6a08..43d7c37bc5 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.6.0git, Copyright 2001-2012 The ScummVM team</string>
+ <string>1.6.0git, Copyright 2001-2013 The ScummVM team</string>
<key>CFBundleIconFile</key>
<string>scummvm.icns</string>
<key>CFBundleIdentifier</key>
@@ -46,7 +46,7 @@
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHumanReadableCopyright</key>
- <string>Copyright 2001-2012 The ScummVM team</string>
+ <string>Copyright 2001-2013 The ScummVM team</string>
<key>SUFeedURL</key>
<string>http://www.scummvm.org/appcasts/macosx/release.xml</string>
<key>SUPublicDSAKeyFile</key>
diff --git a/dists/macosx/Info.plist.in b/dists/macosx/Info.plist.in
index ff010bee07..b810b7ea5a 100644
--- a/dists/macosx/Info.plist.in
+++ b/dists/macosx/Info.plist.in
@@ -28,7 +28,7 @@
<key>CFBundleExecutable</key>
<string>scummvm</string>
<key>CFBundleGetInfoString</key>
- <string>@VERSION@, Copyright 2001-2012 The ScummVM team</string>
+ <string>@VERSION@, Copyright 2001-2013 The ScummVM team</string>
<key>CFBundleIconFile</key>
<string>scummvm.icns</string>
<key>CFBundleIdentifier</key>
@@ -46,7 +46,7 @@
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHumanReadableCopyright</key>
- <string>Copyright 2001-2012 The ScummVM team</string>
+ <string>Copyright 2001-2013 The ScummVM team</string>
<key>SUFeedURL</key>
<string>http://www.scummvm.org/appcasts/macosx/release.xml</string>
<key>SUPublicDSAKeyFile</key>
diff --git a/dists/scummvm.rc b/dists/scummvm.rc
index 8527c668c8..b9c001c1f1 100644
--- a/dists/scummvm.rc
+++ b/dists/scummvm.rc
@@ -20,34 +20,37 @@ scummmodern.zip FILE "gui/themes/scummmodern.zip"
translations.dat FILE "gui/themes/translations.dat"
#endif
-#if ENABLE_DRASCULA == STATIC_PLUGIN
+#if ENABLE_DRASCULA == STATIC_PLUGIN
drascula.dat FILE "dists/engine-data/drascula.dat"
#endif
-#if ENABLE_HUGO == STATIC_PLUGIN
+#if ENABLE_HUGO == STATIC_PLUGIN
hugo.dat FILE "dists/engine-data/hugo.dat"
#endif
-#if ENABLE_KYRA == STATIC_PLUGIN
+#if ENABLE_KYRA == STATIC_PLUGIN
kyra.dat FILE "dists/engine-data/kyra.dat"
#endif
-#if ENABLE_LURE == STATIC_PLUGIN
+#if ENABLE_LURE == STATIC_PLUGIN
lure.dat FILE "dists/engine-data/lure.dat"
#endif
-#if ENABLE_QUEEN == STATIC_PLUGIN
+#if ENABLE_QUEEN == STATIC_PLUGIN
queen.tbl FILE "dists/engine-data/queen.tbl"
#endif
-#if ENABLE_SKY == STATIC_PLUGIN
+#if ENABLE_SKY == STATIC_PLUGIN
sky.cpt FILE "dists/engine-data/sky.cpt"
#endif
-#if ENABLE_TEENAGENT == STATIC_PLUGIN
+#if ENABLE_TEENAGENT == STATIC_PLUGIN
teenagent.dat FILE "dists/engine-data/teenagent.dat"
#endif
-#if ENABLE_TOON == STATIC_PLUGIN
+#if ENABLE_TOON == STATIC_PLUGIN
toon.dat FILE "dists/engine-data/toon.dat"
#endif
-#if ENABLE_TONY == STATIC_PLUGIN
+#if ENABLE_TONY == STATIC_PLUGIN
tony.dat FILE "dists/engine-data/tony.dat"
#endif
-#if ENABLE_AGI == STATIC_PLUGIN
+#if ENABLE_WINTERMUTE == STATIC_PLUGIN
+wintermute.zip FILE "dists/engine-data/wintermute.zip"
+#endif
+#if ENABLE_AGI == STATIC_PLUGIN
pred.dic FILE "dists/pred.dic"
#endif
@@ -72,7 +75,7 @@ BEGIN
VALUE "FileDescription", "http://www.scummvm.org/\0"
VALUE "FileVersion", "1.6.0git\0"
VALUE "InternalName", "scummvm\0"
- VALUE "LegalCopyright", "Copyright Љ 2001-2012 The ScummVM Team\0"
+ VALUE "LegalCopyright", "Copyright Љ 2001-2013 The ScummVM Team\0"
VALUE "LegalTrademarks", "'SCUMM', and all SCUMM games are a TM of LucasArts. Simon The Sorcerer is a TM of AdventureSoft. Beneath a Steel Sky and Broken Sword are a TM of Revolution. Flight of the Amazon Queen is a TM of John Passfield and Steve Stamatiadis. \0"
VALUE "OriginalFilename", "scummvm.exe\0"
VALUE "ProductName", "ScummVM\0"
diff --git a/dists/scummvm.rc.in b/dists/scummvm.rc.in
index a874b98514..f986cc52e8 100644
--- a/dists/scummvm.rc.in
+++ b/dists/scummvm.rc.in
@@ -20,31 +20,34 @@ scummmodern.zip FILE "gui/themes/scummmodern.zip"
translations.dat FILE "gui/themes/translations.dat"
#endif
-#if ENABLE_DRASCULA == STATIC_PLUGIN
+#if ENABLE_DRASCULA == STATIC_PLUGIN
drascula.dat FILE "dists/engine-data/drascula.dat"
#endif
-#if ENABLE_HUGO == STATIC_PLUGIN
+#if ENABLE_HUGO == STATIC_PLUGIN
hugo.dat FILE "dists/engine-data/hugo.dat"
#endif
-#if ENABLE_KYRA == STATIC_PLUGIN
+#if ENABLE_KYRA == STATIC_PLUGIN
kyra.dat FILE "dists/engine-data/kyra.dat"
#endif
-#if ENABLE_LURE == STATIC_PLUGIN
+#if ENABLE_LURE == STATIC_PLUGIN
lure.dat FILE "dists/engine-data/lure.dat"
#endif
-#if ENABLE_QUEEN == STATIC_PLUGIN
+#if ENABLE_QUEEN == STATIC_PLUGIN
queen.tbl FILE "dists/engine-data/queen.tbl"
#endif
-#if ENABLE_SKY == STATIC_PLUGIN
+#if ENABLE_SKY == STATIC_PLUGIN
sky.cpt FILE "dists/engine-data/sky.cpt"
#endif
-#if ENABLE_TEENAGENT == STATIC_PLUGIN
+#if ENABLE_TEENAGENT == STATIC_PLUGIN
teenagent.dat FILE "dists/engine-data/teenagent.dat"
#endif
-#if ENABLE_TOON == STATIC_PLUGIN
+#if ENABLE_TOON == STATIC_PLUGIN
toon.dat FILE "dists/engine-data/toon.dat"
#endif
-#if ENABLE_AGI == STATIC_PLUGIN
+#if ENABLE_WINTERMUTE == STATIC_PLUGIN
+wintermute.zip FILE "dists/engine-data/wintermute.zip"
+#endif
+#if ENABLE_AGI == STATIC_PLUGIN
pred.dic FILE "dists/pred.dic"
#endif
@@ -69,7 +72,7 @@ BEGIN
VALUE "FileDescription", "http://www.scummvm.org/\0"
VALUE "FileVersion", "@VERSION@\0"
VALUE "InternalName", "scummvm\0"
- VALUE "LegalCopyright", "Copyright Љ 2001-2012 The ScummVM Team\0"
+ VALUE "LegalCopyright", "Copyright Љ 2001-2013 The ScummVM Team\0"
VALUE "LegalTrademarks", "'SCUMM', and all SCUMM games are a TM of LucasArts. Simon The Sorcerer is a TM of AdventureSoft. Beneath a Steel Sky and Broken Sword are a TM of Revolution. Flight of the Amazon Queen is a TM of John Passfield and Steve Stamatiadis. \0"
VALUE "OriginalFilename", "scummvm.exe\0"
VALUE "ProductName", "ScummVM\0"
diff --git a/dists/win32/ScummVM.iss b/dists/win32/ScummVM.iss
index adea759110..fa0f760f59 100644
--- a/dists/win32/ScummVM.iss
+++ b/dists/win32/ScummVM.iss
@@ -1,5 +1,5 @@
[Setup]
-AppCopyright=2012
+AppCopyright=2013
AppName=ScummVM
AppVerName=ScummVM Git
AppPublisher=The ScummVM Team
diff --git a/dists/win32/migration.bat b/dists/win32/migration.bat
index 2bba7baef4..b4b00c02cc 100644
--- a/dists/win32/migration.bat
+++ b/dists/win32/migration.bat
@@ -4,7 +4,7 @@
:: This script will copy any saved games located in the
:: old default location, to the new default location.
::
-:: (c) 2012 ScummVM Team
+:: (c) 2012-2013 ScummVM Team
::
@echo off
diff --git a/dists/win32/scummvm.nsi b/dists/win32/scummvm.nsi
index 795eb660b6..fb4787a172 100644
--- a/dists/win32/scummvm.nsi
+++ b/dists/win32/scummvm.nsi
@@ -76,7 +76,7 @@ Name ScummVM
!define COMPANY "ScummVM Team"
!define URL "http://scummvm.org/"
!define DESCRIPTION "ScummVM Installer. Look! A three headed monkey (TM)!"
-!define COPYRIGHT "Copyright Љ 2001-2012 The ScummVM Team"
+!define COPYRIGHT "Copyright Љ 2001-2013 The ScummVM Team"
#########################################################################################
# Installer configuration
diff --git a/dists/win32/scummvm.nsi.in b/dists/win32/scummvm.nsi.in
index 340024e6a1..9f8bd1dad2 100644
--- a/dists/win32/scummvm.nsi.in
+++ b/dists/win32/scummvm.nsi.in
@@ -76,7 +76,7 @@ Name ScummVM
!define COMPANY "ScummVM Team"
!define URL "http://scummvm.org/"
!define DESCRIPTION "ScummVM Installer. Look! A three headed monkey (TM)!"
-!define COPYRIGHT "Copyright Љ 2001-2012 The ScummVM Team"
+!define COPYRIGHT "Copyright Љ 2001-2013 The ScummVM Team"
#########################################################################################
# Installer configuration
diff --git a/doc/cz/PrectiMe b/doc/cz/PrectiMe
index 153ef09dcd..9f16eb2f96 100644
--- a/doc/cz/PrectiMe
+++ b/doc/cz/PrectiMe
@@ -1,7 +1,8 @@
P՘EФŒTIMФš ScummVM
------------------------------------------------------------------------
-Pro vУ­ce informacУ­, seznamy kompatibility, podrobnosti o dotacУ­ch, nejnovФ›jХЁУ­ verze, novinky o vУНvoji a dalХЁУ­, prosУ­m navХЁtivte domovskou strУЁnku ScummVM na: http://www.scummvm.org/
+Pro vУ­ce informacУ­, seznamy kompatibility, podrobnosti o dotacУ­ch, nejnovФ›jХЁУ­ verze,
+novinky o vУНvoji a dalХЁУ­, prosУ­m navХЁtivte domovskou strУЁnku ScummVM na: http://www.scummvm.org/
Obsah:
@@ -210,10 +211,14 @@ DalХЁУ­ hry:
Discworld 2: Missing Presumed ...!? [dw2]
Dragon History [draci]
Drascula: The Vampire Strikes Back [drascula]
+ Eye of the Beholder [eob]
+ Eye of the Beholder II: The Legend of
+ Darkmoon [eob2]
Flight of the Amazon Queen [queen]
Future Wars [fw]
Inherit the Earth: Quest for the Orb [ite]
Nippon Safes Inc. [nippon]
+ Lands of Lore: The Throne of Chaos [lol]
The Legend of Kyrandia [kyra1]
The Legend of Kyrandia: The Hand of Fate [kyra2]
The Legend of Kyrandia: Malcolm's Revenge [kyra3]
@@ -315,21 +320,24 @@ VТ nФ›kterУНch pХ™У­padech ScummVM pХ™esto zobrazУ­ obrazovku ochrany proti kopУ
ScummVM pХ™eskakuje ochranu vТ nУЁsledujУ­cУ­ch hrУЁch:
- * Maniac Mansion
- * Zak McKracken and the Alien Mindbenders
- * Loom (EGA)
- * The Secret of Monkey Island (VGA)
- * Monkey Island 2: LeChuck's Revenge
* Beneath a Steel Sky
-- potlaФeno sТ laskavУНm svolenУ­m Revolution Software.
+ * Dreamweb
+ -- seznam dostupnУНch pХ™У­kazХЏ v terminУЁlech ve hХ™e je nynУ­ zobrazen
+ kdyХО hrУЁФ pouХОije pХ™У­kaz 'help'
* Inherit the Earth: Quest for the Orb (Floppy version)
-- potlaФeno sТ laskavУНm svolenУ­m Wyrmkeep Entertainment,
protoХОe byla potlaФena ve vХЁech vydУЁnУ­ch hry na CD.
+ * Loom (EGA DOS)
+ * Maniac Mansion
+ * Monkey Island 2: LeChuck's Revenge
* Simon the Sorcerer 1 (Floppy version)
* Simon the Sorcerer 2 (Floppy version)
-- potlaФeno sТ laskavУНm svolenУ­m from Adventure Soft,
protoХОe byla potlaФena ve vХЁech vydУЁnУ­ch hry na CD.
+ * The Secret of Monkey Island (VGA)
* Waxworks
+ * Zak McKracken and the Alien Mindbenders
3.2) PoznУЁmky keТ hrУЁm Commodore64:
@@ -1513,7 +1521,7 @@ Jsou rozpoznУЁvУЁna nУЁsledujУ­cУ­ klУ­ФovУЁ slova:
output_rate ФУ­slo KterУН vУНstupnУ­ vzorkovacУ­ kmitoФet pouХОУ­t v Hz. RozumnУЉ hodnoty jsou 11025, 22050 a 44100.
alsa_port Х™etФ›zec KterУН port pouХОУ­t pro vУНstup pХ™i pouХОitУ­ hudebnУ­ho ovladaФe ALSA.
music_volume ФУ­slo NastavenУ­ hlasitosti hudby (0-255)
- multi_midi boolean Pokud true, je povoleno smУ­ХЁenУН AdLib a pХ™irozenУН MIDI.
+ multi_midi boolean Pokud true, jsou povoleny smУ­ХЁenУН AdLib a pХЏvodnУ­ MIDI.
soundfont Х™etФ›zec KterУН SoundFont pouХОУ­t pro pХ™ehrУЁvУЁnУ­ MIDI. (PodporovУЁno pouze nФ›kterУНmi ovladaФi MIDI.)
native_mt32 boolean Pokud true, zakУЁХОe emulaci GM a pХ™edpoklУЁdУЁ, ХОe je dostupnУН pravУН Roland MT-32.
enable_gs boolean Pokud true, povolУ­ funkce urФenУЉ pro Roland GS ke zlepХЁenУ­ emulace GM. Pokud je native_mt32 takУЉ nastaven na true, zaХ™У­zenУ­ GS zvolУ­ mapu MT-32 pro pХ™ehrУЁvУЁnУ­ sprУЁvnУНch instrumentХЏ.
@@ -1574,16 +1582,27 @@ Simon the Sorcerer 1 a 2 pХ™idУЁvУЁ nУЁsledujУ­cУ­ nestandardnУ­ klУ­ФovУЁ slov
The Legend of Kyrandia pХ™idУЁvУЁ nУЁsledujУ­cУ­ nestandardnУ­ klУ­ФovУЉ slovo:
walkspeed celУЉ ФУ­slo Rychlost chХЏze (0-4)
+
+The Legend of Kyrandia: The Hand of Fate pХ™idУЁvУЁ nУЁsledujУ­cУ­ nestandardnУ­ klУ­ФovУЉ slovo:
+
+ walkspeed ФУ­slo Rychlost chХЏze (3 nebo 5, coХО znamenУЁ
+ rychle nebo pomalu)
The Legend of Kyrandia: Malcolm's Revenge pХ™idУЁvУЁ nУЁsledujУ­cУ­ nestandardnУ­ klУ­ФovУЁ slova:
+ walkspeed ФУ­slo Rychlost chХЏze (3 nebo 5, coХО znamenУЁ
+ rychle nebo pomalu)
studio_audience boolean Pokud true, je slyХЁet potlesk a smУ­ch kdykoliv Malcolm provede nФ›co vtipnУЉho
skip_support boolean Pokud true, hrУЁФ mХЏХОe pХ™eskakovat text a scУЉny hry
helium_mode boolean Pokud true, lidУЉ znФ›jУ­ tak, jakoby se nadУНchali hУЉlia
The 7th Guest pХ™idУЁvУЁ nУЁsledujУ­cУ­ nestandardnУ­ klУ­ФovУЉ slovo:
- t7g_speed Х™etФ›zec Rychlost pХ™ehrУЁvУЁnУ­ videa (normal - normУЁlnУ­, tweaked - upravenУЁ, im_an_ios - jsem na ios)
+ fast_movie_speed boolean Pokud true, jsou videa pХ™ehrУЁvУЁna pХ™i zvУНХЁenУЉ
+ rychlosti, stejnУЉ jako ve verzi pro iOS.
+ Videa bez zvuku jsou stУЁle pХ™ehrУЁvУЁna pХ™i
+ normУЁlnУ­ rychlosti, aby nedoХЁlo k desynchronizaci
+ hudby
8.2) VlastnУ­ hernУ­ volby, kterУЉ mohou bУНt pХ™epУ­nУЁny pomoci grafickУЉho
---- ----------------------------------------------------------------
@@ -1665,3 +1684,4 @@ http://www.scummvm.org/
+
diff --git a/engines/agi/logic.h b/engines/agi/logic.h
index fecc2e3b8a..14137f01d2 100644
--- a/engines/agi/logic.h
+++ b/engines/agi/logic.h
@@ -37,6 +37,6 @@ struct AgiLogic {
const char **texts; /**< message list */
};
-} // End of namespace Agi
+} // End of namespace Agi
#endif /* AGI_LOGIC_H */
diff --git a/engines/agi/lzw.h b/engines/agi/lzw.h
index e3fbafe584..c732491e8e 100644
--- a/engines/agi/lzw.h
+++ b/engines/agi/lzw.h
@@ -27,6 +27,6 @@ namespace Agi {
void lzwExpand(uint8 *, uint8 *, int32);
-} // End of namespace Agi
+} // End of namespace Agi
#endif /* AGI_LZW_H */
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index 5334407eb8..9d899b1855 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -1399,7 +1399,7 @@ void cmdDistance(AgiGame *state, uint8 *p) {
// a zombie or the zombie getting turned away by the scarab) we make it appear the
// zombie is far away from Rosella if the zombie is not already up and chasing her.
enum zombieStates {ZOMBIE_SET_TO_RISE_UP, ZOMBIE_RISING_UP, ZOMBIE_CHASING_EGO};
- uint8 zombieStateVarNumList[] = {155, 156, (_v[vCurRoom] == 16) ? 162 : 158};
+ uint8 zombieStateVarNumList[] = {155, 156, (uint8)((_v[vCurRoom] == 16) ? 162 : 158)};
uint8 zombieNum = p2 - 221; // Zombie's number (In range 0-2)
uint8 zombieStateVarNum = zombieStateVarNumList[zombieNum]; // Number of the variable containing zombie's state
uint8 zombieState = _v[zombieStateVarNum]; // Zombie's state
diff --git a/engines/agi/preagi_winnie.h b/engines/agi/preagi_winnie.h
index 96ae65997e..f34c80cec1 100644
--- a/engines/agi/preagi_winnie.h
+++ b/engines/agi/preagi_winnie.h
@@ -355,6 +355,6 @@ private:
void printStrWinnie(char *szMsg);
};
-} // End of namespace Agi
+} // End of namespace Agi
#endif
diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp
index c26f68fa7b..4cd95a888e 100644
--- a/engines/cge/snail.cpp
+++ b/engines/cge/snail.cpp
@@ -493,7 +493,15 @@ void CGEEngine::snGame(Sprite *spr, int num) {
_sprK2->step(newRandom(6));
_sprK3->step(newRandom(6));
+ // check the ALT key as it's the solution of the puzzle
+ // the test has been restricted to some specific OSes
+ // in order to avoid some obvious issues (like Android, iOS, NDS, N64...)
+ // Not perfect, but at least better than nothing.
+#if defined(WIN32) || defined(UNIX) || defined(MACOSX) || defined(MOTOEZX) || defined(LINUPY) || defined(LINUXMOTO_SDL)
if (spr->_ref == 1 && _keyboard->_keyAlt) {
+#else
+ if (spr->_ref == 1 && _gameCase2Cpt > 1) {
+#endif
_sprK1->step(5);
_sprK2->step(5);
_sprK3->step(5);
diff --git a/engines/composer/resource.cpp b/engines/composer/resource.cpp
index 83e49971fb..fa29cc886b 100644
--- a/engines/composer/resource.cpp
+++ b/engines/composer/resource.cpp
@@ -400,4 +400,4 @@ void OldPipe::nextFrame() {
_currFrame++;
}
-} // End of namespace Composer
+} // End of namespace Composer
diff --git a/engines/configure.engines b/engines/configure.engines
index 3c2fc30dbb..db01777a62 100644
--- a/engines/configure.engines
+++ b/engines/configure.engines
@@ -16,6 +16,7 @@ add_engine dreamweb "Dreamweb" yes
add_engine gob "Gobli*ns" yes
add_engine groovie "Groovie" yes "groovie2" "7th Guest"
add_engine groovie2 "Groovie 2 games" no
+add_engine hopkins "Hopkins FBI" no "" "" "16bit"
add_engine hugo "Hugo Trilogy" yes
add_engine kyra "Kyra" yes "lol eob" "Legend of Kyrandia 1-3"
add_engine lol "Lands of Lore" yes
@@ -28,7 +29,7 @@ add_engine cstime "Where in Time is Carmen Sandiego?" no
add_engine riven "Riven: The Sequel to Myst" no "" "" "16bit"
add_engine myst "Myst" no "" "" "16bit"
add_engine parallaction "Parallaction" yes
-add_engine pegasus "The Journeyman Project: Pegasus Prime" no "" "" "16bit"
+add_engine pegasus "The Journeyman Project: Pegasus Prime" yes "" "" "16bit"
add_engine queen "Flight of the Amazon Queen" yes
add_engine saga "SAGA" yes "ihnm saga2" "ITE"
add_engine ihnm "IHNM" yes
@@ -42,7 +43,7 @@ add_engine sword25 "Broken Sword 2.5" no "" "" "png zlib 16bit"
add_engine teenagent "Teen Agent" yes
add_engine testbed "TestBed: the Testing framework" no
add_engine tinsel "Tinsel" yes
-add_engine toltecs "3 Skulls of the Toltecs" no
+add_engine toltecs "3 Skulls of the Toltecs" yes
add_engine toon "Toonstruck" yes
add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes
add_engine tony "Tony Tough and the Night of Roasted Moths" yes "" "" "16bit"
diff --git a/engines/cruise/linker.h b/engines/cruise/linker.h
index ce212f6cea..25f4a5cc2a 100644
--- a/engines/cruise/linker.h
+++ b/engines/cruise/linker.h
@@ -27,5 +27,5 @@ namespace Cruise {
void updateAllScriptsImports();
-} // End of namespace Cruise
+} // End of namespace Cruise
#endif
diff --git a/engines/cruise/volume.cpp b/engines/cruise/volume.cpp
index 4b64d4ff77..9fb6842882 100644
--- a/engines/cruise/volume.cpp
+++ b/engines/cruise/volume.cpp
@@ -447,7 +447,7 @@ int16 readVolCnf() {
///////////////////////////::
-// This code used to rely on "strupr", which is non existant on my system,
+// This code used to rely on "strupr", which is non existent on my system,
// thus I just implemented this function instead. - LordHoto
//
// TODO: This might be code duplication, please check this out.
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index 43799f7944..52cab6cd32 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -42,7 +42,6 @@ void DrasculaEngine::updateAnim(int y, int destX, int destY, int width, int heig
}
}
-// This is the game's introduction sequence
void DrasculaEngine::animation_1_1() {
debug(4, "animation_1_1()");
@@ -92,12 +91,8 @@ void DrasculaEngine::animation_1_1() {
playFLI("scrollb.bin", 9);
- if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit())
- break;
clearRoom();
playSound(5);
- if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit())
- break;
if (animate("scr2.bin", 17))
break;
stopSound();
@@ -194,8 +189,6 @@ void DrasculaEngine::animation_1_1() {
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit())
break;
talk_drascula(3);
- if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit())
- break;
if (animate("lib.bin", 16))
break;
if (animate("lib2.bin", 16))
@@ -211,8 +204,6 @@ void DrasculaEngine::animation_1_1() {
loadPic("plan1.alg", screenSurface, HALF_PAL);
updateScreen();
talk_solo(_textd[5], "d5.als");
- if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit())
- break;
if (animate("lib2.bin", 16))
break;
clearRoom();
@@ -220,8 +211,6 @@ void DrasculaEngine::animation_1_1() {
updateScreen();
pause(20);
talk_solo(_textd[6], "d6.als");
- if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit())
- break;
if (animate("lib2.bin", 16))
break;
clearRoom();
@@ -255,8 +244,6 @@ void DrasculaEngine::animation_1_1() {
break;
playMusic(11);
talk_drascula(10);
- if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit())
- break;
if (animate("rayo1.bin", 16))
break;
playSound(5);
@@ -372,7 +359,6 @@ void DrasculaEngine::animation_1_1() {
loadPic(99, backSurface);
}
-// John falls in love with BJ, who is then abducted by Drascula
void DrasculaEngine::animation_2_1() {
debug(4, "animation_2_1()");
@@ -384,9 +370,6 @@ void DrasculaEngine::animation_2_1() {
term_int = 0;
while (!shouldQuit()) {
- if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit())
- break;
-
if (animate("ag.bin", 14))
break;
@@ -456,13 +439,8 @@ void DrasculaEngine::animation_2_1() {
curY = 95;
trackProtagonist = 1;
hare_se_ve = 1;
- if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit())
- break;
loadPic("97g.alg", extraSurface);
- if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit())
- break;
-
if (animate("lev.bin", 15))
break;
@@ -520,8 +498,6 @@ void DrasculaEngine::animation_2_1() {
break;
talk_bj(12);
gotoObject(157, 98 + curHeight);
- if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit())
- break;
if (animate("bes.bin", 16))
break;
playMusic(11);
@@ -530,7 +506,7 @@ void DrasculaEngine::animation_2_1() {
trackProtagonist = 3;
// The room number was originally changed here to "no_bj.alg",
// which doesn't exist. In reality, this was just a hack to
- // set the room number to a non-existant one, so that BJ does
+ // set the room number to a non-existent one, so that BJ does
// not appear again when the room is refreshed after the
// animation where Count Drascula abducts her. We set the
// room number to -1 for the same purpose
@@ -563,7 +539,6 @@ void DrasculaEngine::animation_2_1() {
}
}
-// John Hacker talks with the bartender to book a room
void DrasculaEngine::animation_3_1() {
debug(4, "animation_3_1()");
@@ -574,7 +549,6 @@ void DrasculaEngine::animation_3_1() {
loadPic(97, extraSurface);
}
-// John Hacker talks with the pianist
void DrasculaEngine::animation_4_1() {
debug(4, "animation_4_1()");
@@ -676,26 +650,39 @@ void DrasculaEngine::animation_4_2() {
pause(5);
talk_hacker(57);
pause(6);
- talk_blind(2);
- pause(4);
- talk_hacker(58);
- talk_blind(3);
- delay(14);
- talk_hacker(59);
- talk_blind(4);
- talk_hacker(60);
- talk_blind(5);
- talk_hacker(61);
- talk_blind(6);
- talk_hacker(62);
- talk_blind(7);
- talk_hacker(63);
- talk_blind(8);
- copyBackground();
- updateScreen();
- _system->delayMillis(1000);
- talk_hacker(64);
- talk_blind(9);
+
+ if (flags[4] == 0) { // first time
+ talk_blind(2);
+ pause(4);
+ talk_hacker(58);
+ talk_blind(3);
+ delay(14);
+ talk_hacker(59);
+ talk_blind(4);
+ talk_hacker(60);
+ talk_blind(5);
+ talk_hacker(61);
+ talk_blind(6);
+ talk_hacker(62);
+ talk_blind(7);
+ talk_hacker(63);
+ talk_blind(8);
+ copyBackground();
+ updateScreen();
+ _system->delayMillis(1000);
+ talk_hacker(64);
+ talk_blind(9);
+
+ flags[4] = 1; // talked to the blind man
+ } else { // second time
+ _system->delayMillis(1000);
+ talk_blind(10);
+ talk_hacker(65);
+
+ flags[33] = 1;
+ }
+
+ flags[9] = 0;
copyBackground();
updateScreen();
@@ -711,9 +698,6 @@ void DrasculaEngine::animation_4_2() {
loadPic(97, extraSurface);
loadPic(99, backSurface);
selectVerb(kVerbNone);
-
- flags[9] = 0;
- flags[4] = 1;
}
void DrasculaEngine::animation_14_2() {
@@ -798,17 +782,22 @@ void DrasculaEngine::animation_16_2() {
return;
}
- delay(3000);
+ uint32 now = _system->getMillis();
+ while (_system->getMillis() - now < 3000 * 2) {
+ delay(50);
+ if (getScan() != 0) {
+ asco();
+ return;
+ }
+ }
if (i < 4) {
fadeToBlack(1);
-
+ clearRoom();
if (getScan() != 0) {
asco();
return;
}
-
- clearRoom();
}
}
@@ -818,6 +807,7 @@ void DrasculaEngine::animation_16_2() {
for (int l = 1; l < 200; l++) {
copyBackground(0, 0, 0, l, 320, 200 - l, drawSurface3, screenSurface);
copyBackground(0, 200 - l, 0, 0, 320, l, bgSurface, screenSurface);
+ delay(10);
updateScreen();
if (getScan() != 0) {
asco();
@@ -867,6 +857,20 @@ void DrasculaEngine::animation_20_2() {
void DrasculaEngine::animation_23_2() {
debug(4, "animation_23_2()");
+ int p_x, p_y;
+ int maxN;
+ int animX, animY;
+
+ // Animation offsets - without earplugs
+ int johnFrameX[] = {1, 38, 75, 112, 75, 112, 75, 112, 149, 112, 149, 112, 149, 186, 223, 260,
+ 1, 38, 75, 112, 149, 112, 149, 112, 149, 112, 149, 186, 223, 260, 260, 260, 260, 223};
+ int johnFrameY[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 76, 76, 76, 1, 1, 1, 1};
+
+ // Animation offsets - with earplugs
+ int john2FrameX[] = {1, 35, 69, 103, 137, 171, 205, 239, 273, 1, 35, 69, 103, 137};
+ int john2FrameY[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 73, 73, 73, 73};
+
loadPic("an24.alg", frontSurface);
flags[21] = 1;
@@ -893,10 +897,41 @@ void DrasculaEngine::animation_23_2() {
trackVonBraun = 1;
talk_vonBraun(18, kVonBraunNormal);
- if (flags[29] == 0)
- animation_23_joined();
- else
- animation_23_joined2();
+ if (flags[29] == 0) {
+ // John isn't wearing earplugs
+ p_x = curX + 2;
+ p_y = curY - 3;
+ maxN = 34;
+ animX = 36;
+ animY = 74;
+
+ loadPic("an23.alg", backSurface);
+ } else {
+ // John is wearing earplugs
+ p_x = curX + 4;
+ p_y = curY;
+ maxN = 14;
+ animX = 33;
+ animY = 71;
+
+ pause(50);
+
+ loadPic("an23_2.alg", backSurface);
+ }
+
+ for (int n = 0; n < maxN; n++) {
+ copyRect(p_x, p_y, p_x, p_y, animX, animY, bgSurface, screenSurface);
+ if (flags[29] == 0)
+ copyRect(johnFrameX[n], johnFrameY[n], p_x, p_y, animX, animY, backSurface, screenSurface);
+ else
+ copyRect(john2FrameX[n], john2FrameY[n], p_x, p_y, animX, animY, backSurface, screenSurface);
+ updateRefresh();
+ updateScreen(p_x, p_y, p_x, p_y, animX, animY, screenSurface);
+ updateEvents();
+ pause(5);
+ }
+
+ loadPic(99, backSurface);
trackVonBraun = 2;
animation_25_2();
@@ -921,52 +956,6 @@ void DrasculaEngine::animation_23_2() {
breakOut = 1;
}
-void DrasculaEngine::animation_23_joined() {
- debug(4, "animation_23_joined()");
-
- int p_x = curX + 2, p_y = curY - 3;
- int x[] = {1, 38, 75, 112, 75, 112, 75, 112, 149, 112, 149, 112, 149, 186, 223, 260,
- 1, 38, 75, 112, 149, 112, 149, 112, 149, 112, 149, 186, 223, 260, 260, 260, 260, 223};
- int y[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 76, 76, 76, 76, 76, 76,
- 76, 76, 76, 76, 76, 76, 76, 1, 1, 1, 1};
-
- loadPic("an23.alg", backSurface);
-
- for (int n = 0; n < 34; n++) {
- copyRect(p_x, p_y, p_x, p_y, 36, 74, bgSurface, screenSurface);
- copyRect(x[n], y[n], p_x, p_y, 36, 74, backSurface, screenSurface);
- updateRefresh();
- updateScreen(p_x, p_y, p_x, p_y, 36, 74, screenSurface);
- updateEvents();
- pause(5);
- }
-
- loadPic(99, backSurface);
-}
-
-void DrasculaEngine::animation_23_joined2() {
- debug(4, "animation_23_joined2()");
-
- int p_x = curX + 4, p_y = curY;
- int x[] = {1, 35, 69, 103, 137, 171, 205, 239, 273, 1, 35, 69, 103, 137};
- int y[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 73, 73, 73, 73};
-
- pause(50);
-
- loadPic("an23_2.alg", backSurface);
-
- for (int n = 0; n < 14; n++) {
- copyRect(p_x, p_y, p_x, p_y, 33, 71, bgSurface, screenSurface);
- copyRect(x[n], y[n], p_x, p_y, 33, 71, backSurface, screenSurface);
- updateRefresh();
- updateScreen(p_x,p_y, p_x,p_y, 33,71, screenSurface);
- updateEvents();
- pause(5);
- }
-
- loadPic(99, backSurface);
-}
-
void DrasculaEngine::animation_25_2() {
debug(4, "animation_25_2()");
@@ -1091,31 +1080,11 @@ void DrasculaEngine::animation_35_2() {
fadeToBlack(2);
}
-// Use cross on Yoda
void DrasculaEngine::animation_2_3() {
debug(4, "animation_2_3()");
flags[0] = 1;
playMusic(13);
- animation_3_3();
- playMusic(13);
- animation_4_3();
- flags[1] = 1;
- updateRoom();
- updateScreen(120, 0, 120, 0, 200, 200, screenSurface);
- animation_5_3();
- flags[0] = 0;
- flags[1] = 1;
-
- loadPic(96, frontSurface);
- loadPic(97, extraSurface);
- loadPic(99, backSurface);
-
- gotoObject(332, 127);
-}
-
-void DrasculaEngine::animation_3_3() {
- debug(4, "animation_3_3()");
int px = curX - 20, py = curY - 1;
@@ -1129,12 +1098,11 @@ void DrasculaEngine::animation_3_3() {
updateAnim(75, px, py, 71, 72, 4, extraSurface, 3, true);
updateAnim(2, px, py, 71, 72, 4, backSurface, 3, true);
updateAnim(75, px, py, 71, 72, 4, backSurface, 3, true);
-}
-void DrasculaEngine::animation_4_3() {
- debug(4, "animation_4_3()");
+ playMusic(13);
- int px = 120, py = 63;
+ px = 120;
+ py = 63;
loadPic("any_1.alg", frontSurface);
loadPic("any_2.alg", extraSurface);
@@ -1146,12 +1114,13 @@ void DrasculaEngine::animation_4_3() {
updateAnim(91, px, py, 77, 89, 4, extraSurface, 3, true);
updateAnim(1, px, py, 77, 89, 4, backSurface, 3, true);
updateAnim(91, px, py, 77, 89, 4, backSurface, 3, true);
-}
-void DrasculaEngine::animation_5_3() {
- debug(4, "animation_5_3()");
+ flags[1] = 1;
+ updateRoom();
+ updateScreen(120, 0, 120, 0, 200, 200, screenSurface);
- int px = curX - 20, py = curY - 1;
+ px = curX - 20;
+ py = curY - 1;
loadPic("an3y_1.alg", frontSurface);
loadPic("an3y_2.alg", extraSurface);
@@ -1163,6 +1132,15 @@ void DrasculaEngine::animation_5_3() {
updateAnim(75, px, py, 71, 72, 4, extraSurface, 3, true);
updateAnim(2, px, py, 71, 72, 4, backSurface, 3, true);
updateAnim(75, px, py, 71, 72, 4, backSurface, 3, true);
+
+ flags[0] = 0;
+ flags[1] = 1;
+
+ loadPic(96, frontSurface);
+ loadPic(97, extraSurface);
+ loadPic(99, backSurface);
+
+ gotoObject(332, 127);
}
void DrasculaEngine::animation_6_3() {
@@ -1197,8 +1175,8 @@ void DrasculaEngine::animation_6_3() {
updateScreen();
}
-void DrasculaEngine::animation_ray() {
- debug(4, "animation_ray()");
+void DrasculaEngine::animation_castle() {
+ debug(4, "animation_castle()");
loadPic("anr_1.alg", frontSurface, HALF_PAL);
loadPic("anr_2.alg", extraSurface);
@@ -1365,18 +1343,6 @@ void DrasculaEngine::animation_5_5(){
loadPic(49, bgSurface, HALF_PAL);
}
-void DrasculaEngine::animation_11_5() {
- debug(4, "animation_11_5()");
-
- flags[9] = 1;
- if (flags[2] == 1 && flags[3] == 1 && flags[4] == 1)
- animation_12_5();
- else {
- flags[9] = 0;
- talk(33);
- }
-}
-
void DrasculaEngine::animation_12_5() {
debug(4, "animation_12_5()");
@@ -1426,7 +1392,7 @@ void DrasculaEngine::animation_12_5() {
loadPic("3an11_1.alg", backSurface);
for (frame = 0; frame < 8; frame++) {
- if (frame == 2 || frame == 4 || frame == 8 || frame==10)
+ if (frame == 2 || frame == 4 || frame == 8 || frame == 10)
setPalette((byte *)&bgPalette1);
else if (frame == 1 || frame == 5 || frame == 7 || frame == 9)
setPalette((byte *)&bgPalette2);
@@ -1465,7 +1431,8 @@ void DrasculaEngine::animation_12_5() {
flags[1] = 1;
- animation_13_5();
+ animation_12_5_frankenstein();
+
playSound(1);
hiccup(12);
finishSound();
@@ -1487,13 +1454,11 @@ void DrasculaEngine::animation_12_5() {
enterRoom(57);
}
-void DrasculaEngine::animation_13_5() {
- debug(4, "animation_13_5()");
-
+void DrasculaEngine::animation_12_5_frankenstein() {
int frank_x = 199;
- int frame = 0;
int frus_x[] = {1, 46, 91, 136, 181, 226, 271};
int frus_y[] = {1, 1, 1, 1, 1, 1, 1, 89};
+ int frame = 0;
loadPic("auxfr.alg", backSurface);
@@ -1690,8 +1655,8 @@ void DrasculaEngine::animation_9_6() {
objExit = 108;
enterRoom(59);
// The room number was originally changed here to "nada.alg",
- // which is a non-existant file. In reality, this was just a
- // hack to set the room number to a non-existant one, so that
+ // which is a non-existent file. In reality, this was just a
+ // hack to set the room number to a non-existent one, so that
// room sprites do not appear again when the room is refreshed.
// We set the room number to -1 for the same purpose.
// Also check animation_2_1(), where the same hack was used
@@ -1898,27 +1863,6 @@ void DrasculaEngine::animation_24_2() {
loadPic("an24.alg", frontSurface);
- animation_32_2();
-
- flags[21] = 1;
-
- talk_vonBraun(22, kVonBraunNormal);
-
- if (flags[22] == 0)
- converse(4);
- else
- converse(5);
-
- exitRoom(0);
- flags[21] = 0;
- flags[24] = 0;
- trackVonBraun = 1;
- vonBraunX = 120;
-}
-
-void DrasculaEngine::animation_32_2() {
- debug(4, "animation_32_2()");
-
loadPic("an32_1.alg", drawSurface3);
loadPic("an32_2.alg", backSurface);
@@ -1939,6 +1883,21 @@ void DrasculaEngine::animation_32_2() {
}
loadPic("aux18.alg", drawSurface3);
+
+ flags[21] = 1;
+
+ talk_vonBraun(22, kVonBraunNormal);
+
+ if (flags[22] == 0)
+ converse(4);
+ else
+ converse(5);
+
+ exitRoom(0);
+ flags[21] = 0;
+ flags[24] = 0;
+ trackVonBraun = 1;
+ vonBraunX = 120;
}
void DrasculaEngine::animation_34_2() {
@@ -2126,55 +2085,6 @@ void DrasculaEngine::animation_6_2() {
flags[9] = 0;
}
-void DrasculaEngine::animation_33_2() {
- debug(4, "animation_33_2()");
-
- stopMusic();
- flags[9] = 1;
-
- pause(12);
- talk(60);
- pause(8);
-
- clearRoom();
- loadPic("ciego1.alg", bgSurface, HALF_PAL); // ciego = blind
- loadPic("ciego2.alg", drawSurface3);
- loadPic("ciego3.alg", extraSurface);
- loadPic("ciego4.alg", backSurface);
- loadPic("ciego5.alg", frontSurface);
-
- copyBackground();
- updateScreen();
-
- pause(10);
-
- talk_blind(1);
- pause(5);
- talk_hacker(57);
- pause(6);
- _system->delayMillis(1000);
- talk_blind(10);
- talk_hacker(65);
-
- copyBackground();
- updateScreen();
-
- pause(14);
-
- clearRoom();
-
- playMusic(roomMusic);
- loadPic(9, bgSurface, HALF_PAL);
- loadPic("aux9.alg", drawSurface3);
- loadPic(96, frontSurface);
- loadPic(97, extraSurface);
- loadPic(99, backSurface);
- selectVerb(kVerbNone);
-
- flags[33] = 1;
- flags[9] = 0;
-}
-
void DrasculaEngine::animation_1_4() {
debug(4, "animation_1_4()");
diff --git a/engines/drascula/console.cpp b/engines/drascula/console.cpp
index d2fd32f2e5..426b2ade67 100644
--- a/engines/drascula/console.cpp
+++ b/engines/drascula/console.cpp
@@ -46,7 +46,6 @@ bool Console::Cmd_Room(int argc, const char **argv) {
_vm->selectVerb(kVerbNone);
_vm->clearRoom();
_vm->loadPic(roomNum, _vm->bgSurface, HALF_PAL);
- _vm->selectionMade = 0;
return false;
}
diff --git a/engines/drascula/converse.cpp b/engines/drascula/converse.cpp
index 7abbb3214b..d045d683fc 100644
--- a/engines/drascula/converse.cpp
+++ b/engines/drascula/converse.cpp
@@ -167,7 +167,6 @@ void DrasculaEngine::converse(int index) {
// no need to delete the stream, since TextResourceParser takes ownership
// delete stream;
-
if (currentChapter == 2 && !strcmp(fileName, "op_5.cal") && flags[38] == 1 && flags[33] == 1) {
strcpy(phrase3, _text[405]);
strcpy(sound3, "405.als");
diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp
index 598af5acff..e1f69e2158 100644
--- a/engines/drascula/detection.cpp
+++ b/engines/drascula/detection.cpp
@@ -21,10 +21,13 @@
*/
#include "base/plugins.h"
+#include "common/file.h"
+#include "common/translation.h"
#include "engines/advancedDetector.h"
#include "engines/savestate.h"
-#include "common/file.h"
+
+#include "graphics/thumbnail.h"
#include "drascula/drascula.h"
@@ -263,81 +266,123 @@ static const DrasculaGameDescription gameDescriptions[] = {
{ AD_TABLE_END_MARKER }
};
-} // End of namespace Drascula
+static const ExtraGuiOption drasculaExtraGuiOption = {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens, instead of the ScummVM ones"),
+ "originalsaveload",
+ false
+};
+
+SaveStateDescriptor loadMetaData(Common::ReadStream *s, int slot, bool setPlayTime);
class DrasculaMetaEngine : public AdvancedMetaEngine {
public:
DrasculaMetaEngine() : AdvancedMetaEngine(Drascula::gameDescriptions, sizeof(Drascula::DrasculaGameDescription), drasculaGames) {
_singleid = "drascula";
- _guioptions = GUIO2(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD);
+ _guioptions = GUIO1(GUIO_NOMIDI);
+ }
+
+ virtual const char *getName() const {
+ return "Drascula";
}
- virtual bool hasFeature(MetaEngineFeature f) const {
- return (f == kSupportsListSaves);
+ virtual const char *getOriginalCopyright() const {
+ return "Drascula Engine (C) 2000 Alcachofa Soft, (C) 1996 Digital Dreams Multimedia, (C) 1994 Emilio de Paz";
}
- virtual SaveStateList listSaves(const char *target) const {
- Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::String pattern = Common::String::format("%s??", target);
+ virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const;
+ virtual bool hasFeature(MetaEngineFeature f) const;
+ virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const;
+ virtual SaveStateList listSaves(const char *target) const;
+ virtual int getMaximumSaveSlot() const;
+ virtual void removeSaveState(const char *target, int slot) const;
+ SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
+};
- // Get list of savefiles for target game
- Common::StringArray filenames = saveFileMan->listSavefiles(pattern);
- Common::Array<int> slots;
- for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+bool DrasculaMetaEngine::hasFeature(MetaEngineFeature f) const {
+ return
+ (f == kSupportsListSaves) ||
+ (f == kSupportsLoadingDuringStartup) ||
+ (f == kSupportsDeleteSave) ||
+ (f == kSavesSupportMetaInfo) ||
+ (f == kSavesSupportThumbnail) ||
+ (f == kSavesSupportCreationDate) ||
+ (f == kSavesSupportPlayTime);
+}
- // Obtain the last 2 digits of the filename, since they correspond to the save slot
- int slotNum = atoi(file->c_str() + file->size() - 2);
+const ExtraGuiOptions DrasculaMetaEngine::getExtraGuiOptions(const Common::String &target) const {
+ ExtraGuiOptions options;
+ options.push_back(drasculaExtraGuiOption);
+ return options;
+}
- // Ensure save slot is within valid range
- if (slotNum >= 1 && slotNum <= 10) {
- slots.push_back(slotNum);
+SaveStateList DrasculaMetaEngine::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;
+ int slotNum = 0;
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ // Obtain the last 3 digits of the filename, since they correspond to the save slot
+ slotNum = atoi(file->c_str() + file->size() - 3);
+
+ if (slotNum >= 0 && slotNum <= getMaximumSaveSlot()) {
+ Common::InSaveFile *in = saveFileMan->openForLoading(*file);
+ if (in) {
+ SaveStateDescriptor desc = loadMetaData(in, slotNum, false);
+ if (desc.getSaveSlot() != slotNum) {
+ // invalid
+ delete in;
+ continue;
+ }
+ saveList.push_back(desc);
+ delete in;
}
}
+ }
- // Sort save slot ids
- Common::sort<int>(slots.begin(), slots.end());
-
- // Load save index
- Common::String fileEpa = Common::String::format("%s.epa", target);
- Common::InSaveFile *epa = saveFileMan->openForLoading(fileEpa);
-
- // Get savegame names from index
- Common::String saveDesc;
- SaveStateList saveList;
- int line = 1;
- for (uint i = 0; i < slots.size(); i++) {
- // ignore lines corresponding to unused saveslots
- for (; line < slots[i]; line++)
- epa->readLine();
+ return saveList;
+}
- // copy the name in the line corresponding to the save slot and truncate to 22 characters
- saveDesc = Common::String(epa->readLine().c_str(), 22);
+SaveStateDescriptor DrasculaMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
+ char fileName[MAXPATHLEN];
+ sprintf(fileName, "%s.%03d", target, slot);
- // handle cases where the save directory and save index are detectably out of sync
- if (saveDesc == "*")
- saveDesc = "No name specified.";
+ Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(fileName);
- // increment line number to keep it in sync with slot number
- line++;
+ SaveStateDescriptor desc;
+ // Do not allow save slot 0 (used for auto-saving) to be deleted or
+ // overwritten.
+ desc.setDeletableFlag(slot != 0);
+ desc.setWriteProtectedFlag(slot == 0);
- // Insert savegame name into list
- saveList.push_back(SaveStateDescriptor(slots[i], saveDesc));
+ if (in) {
+ desc = Drascula::loadMetaData(in, slot, false);
+ if (desc.getSaveSlot() != slot) {
+ delete in;
+ return SaveStateDescriptor();
}
- delete epa;
- return saveList;
- }
+ Graphics::Surface *const thumbnail = Graphics::loadThumbnail(*in);
+ desc.setThumbnail(thumbnail);
- virtual const char *getName() const {
- return "Drascula";
+ delete in;
}
- virtual const char *getOriginalCopyright() const {
- return "Drascula Engine (C) 2000 Alcachofa Soft, (C) 1996 Digital Dreams Multimedia, (C) 1994 Emilio de Paz";
- }
+ return desc;
+}
- virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
-};
+int DrasculaMetaEngine::getMaximumSaveSlot() const { return 999; }
+
+void DrasculaMetaEngine::removeSaveState(const char *target, int slot) const {
+ Common::String fileName = Common::String::format("%s.%03d", target, slot);
+ g_system->getSavefileManager()->removeSavefile(fileName);
+}
bool DrasculaMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
const Drascula::DrasculaGameDescription *gd = (const Drascula::DrasculaGameDescription *)desc;
@@ -347,8 +392,10 @@ bool DrasculaMetaEngine::createInstance(OSystem *syst, Engine **engine, const AD
return gd != 0;
}
+} // End of namespace Drascula
+
#if PLUGIN_ENABLED_DYNAMIC(DRASCULA)
- REGISTER_PLUGIN_DYNAMIC(DRASCULA, PLUGIN_TYPE_ENGINE, DrasculaMetaEngine);
+ REGISTER_PLUGIN_DYNAMIC(DRASCULA, PLUGIN_TYPE_ENGINE, Drascula::DrasculaMetaEngine);
#else
- REGISTER_PLUGIN_STATIC(DRASCULA, PLUGIN_TYPE_ENGINE, DrasculaMetaEngine);
+ REGISTER_PLUGIN_STATIC(DRASCULA, PLUGIN_TYPE_ENGINE, Drascula::DrasculaMetaEngine);
#endif
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 1b3c4038f0..804881cf9a 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -87,6 +87,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam
_textmisc = 0;
_textd1 = 0;
_talkSequences = 0;
+ _currentSaveSlot = 0;
_color = 0;
blinking = 0;
@@ -187,6 +188,8 @@ Common::Error DrasculaEngine::run() {
if (!loadDrasculaDat())
return Common::kUnknownError;
+ checkForOldSaveGames();
+
setupRoomsTable();
loadArchives();
@@ -195,6 +198,13 @@ Common::Error DrasculaEngine::run() {
currentChapter = 1; // values from 1 to 6 will start each part of game
loadedDifferentChapter = 0;
+ setTotalPlayTime(0);
+
+ // Check if a save is loaded from the launcher
+ int directSaveSlotLoading = ConfMan.getInt("save_slot");
+ if (directSaveSlotLoading >= 0) {
+ loadGame(directSaveSlotLoading);
+ }
checkCD();
@@ -233,7 +243,6 @@ Common::Error DrasculaEngine::run() {
framesWithoutAction = 0;
term_int = 0;
musicStopped = 0;
- selectionMade = 0;
globalSpeed = 0;
curExcuseLook = 0;
curExcuseAction = 0;
@@ -246,7 +255,6 @@ Common::Error DrasculaEngine::run() {
allocMemory();
_subtitlesDisabled = !ConfMan.getBool("subtitles");
- selectionMade = 0;
if (currentChapter != 3)
loadPic(96, frontSurface, COMPLETE_PAL);
@@ -261,7 +269,7 @@ Common::Error DrasculaEngine::run() {
loadPic(96, frontSurface);
} else if (currentChapter == 4) {
if (loadedDifferentChapter == 0)
- animation_ray();
+ animation_castle();
loadPic(96, frontSurface);
clearRoom();
} else if (currentChapter == 5) {
@@ -295,6 +303,7 @@ Common::Error DrasculaEngine::run() {
strcpy(iconName[i + 1], _textverbs[i]);
assignPalette(defaultPalette);
+
if (!runCurrentChapter()) {
endChapter();
break;
@@ -359,7 +368,7 @@ bool DrasculaEngine::runCurrentChapter() {
trackProtagonist = 1;
objExit = 104;
if (loadedDifferentChapter != 0) {
- if (!loadGame(saveName)) {
+ if (!loadGame(_currentSaveSlot)) {
return true;
}
} else {
@@ -368,6 +377,8 @@ bool DrasculaEngine::runCurrentChapter() {
curY = 56;
gotoObject(65, 145);
}
+
+ // REMINDER: This is a good place to debug animations
} else if (currentChapter == 2) {
addObject(kItemPhone);
trackProtagonist = 3;
@@ -375,7 +386,7 @@ bool DrasculaEngine::runCurrentChapter() {
if (loadedDifferentChapter == 0)
enterRoom(14);
else {
- if (!loadGame(saveName)) {
+ if (!loadGame(_currentSaveSlot)) {
return true;
}
}
@@ -393,7 +404,7 @@ bool DrasculaEngine::runCurrentChapter() {
if (loadedDifferentChapter == 0)
enterRoom(20);
else {
- if (!loadGame(saveName)) {
+ if (!loadGame(_currentSaveSlot)) {
return true;
}
}
@@ -410,7 +421,7 @@ bool DrasculaEngine::runCurrentChapter() {
curX = 235;
curY = 164;
} else {
- if (!loadGame(saveName)) {
+ if (!loadGame(_currentSaveSlot)) {
return true;
}
}
@@ -429,7 +440,7 @@ bool DrasculaEngine::runCurrentChapter() {
if (loadedDifferentChapter == 0) {
enterRoom(45);
} else {
- if (!loadGame(saveName)) {
+ if (!loadGame(_currentSaveSlot)) {
return true;
}
}
@@ -443,7 +454,7 @@ bool DrasculaEngine::runCurrentChapter() {
enterRoom(58);
animation_1_6();
} else {
- if (!loadGame(saveName)) {
+ if (!loadGame(_currentSaveSlot)) {
return true;
}
loadPic("auxdr.alg", drawSurface2);
@@ -596,13 +607,23 @@ bool DrasculaEngine::runCurrentChapter() {
selectVerb(kVerbTalk);
} else if (key == Common::KEYCODE_F6 && !_menuScreen) {
selectVerb(kVerbMove);
- } else if (key == Common::KEYCODE_F9) {
- volumeControls();
- } else if (key == Common::KEYCODE_F10) {
- if (!saveLoadScreen())
+ } else if (key == Common::KEYCODE_F7) {
+ // ScummVM load screen
+ if (!scummVMSaveLoadDialog(false))
return true;
} else if (key == Common::KEYCODE_F8) {
selectVerb(kVerbNone);
+ } else if (key == Common::KEYCODE_F9) {
+ volumeControls();
+ } else if (key == Common::KEYCODE_F10) {
+ if (!ConfMan.getBool("originalsaveload")) {
+ // ScummVM save screen
+ scummVMSaveLoadDialog(true);
+ } else {
+ // Original save/load screen
+ if (!saveLoadScreen())
+ return true;
+ }
} else if (key == Common::KEYCODE_v) {
_subtitlesDisabled = true;
ConfMan.setBool("subtitles", !_subtitlesDisabled);
@@ -628,17 +649,14 @@ bool DrasculaEngine::runCurrentChapter() {
}
if (leftMouseButton != 0 || rightMouseButton != 0 || key != 0)
- if (currentChapter != 3)
- framesWithoutAction = 0;
+ framesWithoutAction = 0;
if (framesWithoutAction == 15000) {
screenSaver();
- if (currentChapter != 3)
- framesWithoutAction = 0;
+ framesWithoutAction = 0;
}
- if (currentChapter != 3)
- framesWithoutAction++;
+ framesWithoutAction++;
}
return false;
@@ -652,8 +670,8 @@ bool DrasculaEngine::verify1() {
removeObject();
else {
for (l = 0; l < numRoomObjs; l++) {
- if (mouseX >= x1[l] && mouseY >= y1[l]
- && mouseX <= x2[l] && mouseY <= y2[l] && doBreak == 0) {
+ if (mouseX >= _objectX1[l] && mouseY >= _objectY1[l]
+ && mouseX <= _objectX2[l] && mouseY <= _objectY2[l] && doBreak == 0) {
if (exitRoom(l))
return true;
if (doBreak == 1)
@@ -666,8 +684,8 @@ bool DrasculaEngine::verify1() {
doBreak = 1;
for (l = 0; l < numRoomObjs; l++) {
- if (mouseX > x1[l] && mouseY > y1[l]
- && mouseX < x2[l] && mouseY < y2[l] && doBreak == 0) {
+ if (mouseX > _objectX1[l] && mouseY > _objectY1[l]
+ && mouseX < _objectX2[l] && mouseY < _objectY2[l] && doBreak == 0) {
roomX = roomObjX[l];
roomY = roomObjY[l];
trackFinal = trackObj[l];
@@ -700,8 +718,8 @@ bool DrasculaEngine::verify2() {
return true;
} else {
for (l = 0; l < numRoomObjs; l++) {
- if (mouseX > x1[l] && mouseY > y1[l]
- && mouseX < x2[l] && mouseY < y2[l] && visible[l] == 1) {
+ if (mouseX > _objectX1[l] && mouseY > _objectY1[l]
+ && mouseX < _objectX2[l] && mouseY < _objectY2[l] && visible[l] == 1) {
trackFinal = trackObj[l];
walkToObject = 1;
gotoObject(roomObjX[l], roomObjY[l]);
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index 2d1954e3ca..e547503bee 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -36,6 +36,8 @@
#include "common/system.h"
#include "common/util.h"
+#include "engines/savestate.h"
+
#include "audio/mixer.h"
#include "engines/engine.h"
@@ -415,7 +417,7 @@ public:
int inventoryObjects[43];
char _targetSurface[40][20];
int _destX[40], _destY[40], trackCharacter_alkeva[40], roomExits[40];
- int x1[40], y1[40], x2[40], y2[40];
+ int _objectX1[40], _objectY1[40], _objectX2[40], _objectY2[40];
int takeObject, pickedObject;
bool _subtitlesDisabled;
bool _menuBar, _menuScreen, _hasName;
@@ -453,11 +455,9 @@ public:
int term_int;
int currentChapter;
int loadedDifferentChapter;
- char saveName[13];
+ int _currentSaveSlot;
int _color;
int musicStopped;
- char select[23];
- int selectionMade;
int mouseX;
int mouseY;
int leftMouseButton;
@@ -494,9 +494,16 @@ public:
void selectVerb(int);
void updateVolume(Audio::Mixer::SoundType soundType, int prevVolume);
void volumeControls();
+
bool saveLoadScreen();
+ bool scummVMSaveLoadDialog(bool isSave);
+ Common::String enterName(Common::String &selectedName);
void loadSaveNames();
- void saveSaveNames();
+ void saveGame(int slot, Common::String &desc);
+ bool loadGame(int slot);
+ void checkForOldSaveGames();
+ void convertSaveGame(int slot, Common::String &desc);
+
void print_abc(const char *, int, int);
void delay(int ms);
bool confirmExit();
@@ -550,7 +557,6 @@ public:
void updateMusic();
int musicStatus();
void updateRoom();
- bool loadGame(const char *);
void updateDoor(int);
void setPaletteBase(int darkness);
void updateVisible();
@@ -568,7 +574,6 @@ public:
void showCursor();
void hideCursor();
bool isCursorVisible();
- void enterName();
bool soundIsActive();
void waitFrameSSN();
void mixVideo(byte *OldScreen, byte *NewScreen, uint16 oldPitch);
@@ -589,7 +594,6 @@ public:
void quadrant_2();
void quadrant_3();
void quadrant_4();
- void saveGame(const char *gameName);
void increaseFrameNum();
int whichObject();
bool checkMenuFlags();
@@ -650,63 +654,56 @@ public:
bool room_62(int);
bool room_102(int);
- void animation_1_1();
- void animation_2_1();
- void animation_3_1();
- void animation_4_1();
- //
- void animation_2_2();
- void animation_4_2();
- void animation_5_2();
- void animation_6_2();
- void animation_7_2();
- void animation_11_2();
- void animation_12_2();
- void animation_13_2();
- void animation_14_2();
void asco();
- void animation_16_2();
- void animation_20_2();
- void animation_23_2();
- void animation_23_joined();
- void animation_23_joined2();
- void animation_24_2();
- void animation_25_2();
- void animation_26_2();
- void animation_27_2();
- void animation_29_2();
- void animation_31_2();
- void animation_32_2();
- void animation_33_2();
- void animation_34_2();
- void animation_35_2();
- void animation_36_2();
+
+ void animation_1_1(); // Game introduction
+ void animation_2_1(); // John falls in love with BJ, who is then abducted by Drascula
+ void animation_3_1(); // John talks with the bartender to book a room
+ void animation_4_1(); // John talks with the pianist
+ //
+ void animation_2_2(); // John enters the chapel via the window
+ void animation_4_2(); // John talks with the blind man (closeup)
+ void animation_5_2(); // John breaks the chapel window with the pike
+ void animation_6_2(); // The blind man (closeup) thanks John for giving him money and hands him the sickle
+ void animation_7_2(); // John uses the sickle
+ void animation_11_2(); // The drunk man says "they're all dead, thanks *hic*"
+ void animation_12_2(); // Conversation screen - John talks to the pianist after BJ is abducted by Drascula
+ void animation_13_2(); // ???
+ void animation_14_2(); // The glass box falls from the ceiling
+ void animation_16_2(); // The drunk tells us about Von Braun
+ void animation_20_2(); // Von Braun tells John that he needs to have special skills to fight vampires
+ void animation_23_2(); // Von Braun tests John's reactions to scratching noises
+ void animation_24_2(); // Conversation screen - John talks with Von Braun
+ void animation_25_2(); // The glass box is lifted back to the ceiling
+ void animation_26_2(); // John gives the book to the pianist and gets his earplugs in return
+ void animation_27_2(); // Von Braun admits that John is ready to fight vampires and gives him his money back
+ void animation_29_2(); // Von Braun tells John what ingredients he needs for the brew
+ void animation_31_2(); // Von Braun obtains the items needed for the brew from John and creates it
+ void animation_34_2(); // John kicks an object
+ void animation_35_2(); // John jumps into the well
+ void animation_36_2(); // John asks the bartender about the pianist
//
- void animation_2_3();
- void animation_3_3();
- void animation_4_3();
- void animation_5_3();
- void animation_6_3();
- void animation_ray();
+ void animation_2_3(); // John uses the cross with the Frankenstein-zombie ("yoda") and destroys him
+ void animation_6_3(); // Frankenstein is blocking John's path
//
- void animation_1_4();
- void animation_5_4();
- void animation_6_4();
- void animation_7_4();
- void animation_8_4();
+ void animation_castle(); // Chapter 4 start - Drascula's castle exterior, lightning strikes
+ void animation_1_4(); // Conversation screen - John talks with Igor
+ void animation_5_4(); // John enters Igor's room dressed as Drascula
+ void animation_6_4(); // Igor says that he's going for supper
+ void animation_7_4(); // John removes Drascula's disguise
+ void animation_8_4(); // Secret passage behind bookcase is revealed
//
- void animation_1_5();
- void animation_5_5();
- void animation_11_5();
- void animation_12_5();
- void animation_13_5();
- void animation_14_5();
+ void animation_1_5(); // John finds BJ
+ void animation_5_5(); // ???
+ void animation_12_5(); // Frankenstein comes to life
+ void animation_12_5_frankenstein();
+ void animation_14_5(); // John finds out that an object is empty
//
- void animation_1_6();
- void animation_5_6();
- void animation_6_6();
- void animation_9_6();
- void animation_19_6();
+ void animation_1_6(); // ???
+ void animation_5_6(); // John is tied to the table. Drascula and Igor lower the pendulum
+ void animation_6_6(); // John uses the pendulum to break free
+ void animation_9_6(); // Game ending - John uses the cross on Drascula and reads BJ's letter
+ void animation_19_6(); // Someone pops up from behind a door when trying to open it
void update_1_pre();
void update_2();
@@ -778,7 +775,7 @@ private:
RoomUpdate *_roomPreUpdates, *_roomUpdates;
RoomTalkAction *_roomActions;
TalkSequenceCommand *_talkSequences;
- char _saveNames[10][23];
+ Common::String _saveNames[10];
char **loadTexts(Common::File &in);
void freeTexts(char **ptr);
diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp
index 590561f0bd..3bdf724670 100644
--- a/engines/drascula/graphics.cpp
+++ b/engines/drascula/graphics.cpp
@@ -668,7 +668,7 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) {
}
delete stream;
- return ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE));
+ return ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE) || shouldQuit());
}
} // End of namespace Drascula
diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp
index 4b8db63bb7..70212db9e8 100644
--- a/engines/drascula/interface.cpp
+++ b/engines/drascula/interface.cpp
@@ -153,52 +153,6 @@ void DrasculaEngine::clearMenu() {
}
}
-void DrasculaEngine::enterName() {
- Common::KeyCode key;
- flushKeyBuffer();
- int v = 0, h = 0;
- char select2[23];
- strcpy(select2, " ");
- while (!shouldQuit()) {
- select2[v] = '-';
- copyBackground(115, 14, 115, 14, 176, 9, bgSurface, screenSurface);
- print_abc(select2, 117, 15);
- updateScreen();
-
- key = getScan();
-
- if (key != 0) {
- if (key >= 0 && key <= 0xFF && isAlpha(key))
- select2[v] = tolower(key);
- else if ((key >= Common::KEYCODE_0 && key <= Common::KEYCODE_9) || key == Common::KEYCODE_SPACE)
- select2[v] = key;
- else if (key == Common::KEYCODE_ESCAPE)
- break;
- else if (key == Common::KEYCODE_RETURN) {
- select2[v] = '\0';
- h = 1;
- break;
- } else if (key == Common::KEYCODE_BACKSPACE)
- select2[v] = '\0';
- else
- v--;
-
- if (key == Common::KEYCODE_BACKSPACE)
- v--;
- else
- v++;
- }
- if (v == 22)
- v = 21;
- else if (v == -1)
- v = 0;
- }
- if (h == 1) {
- strcpy(select, select2);
- selectionMade = 1;
- }
-}
-
bool DrasculaEngine::checkMenuFlags() {
int n = whichObject();
if (n != 0) {
@@ -213,8 +167,8 @@ void DrasculaEngine::showMap() {
_hasName = false;
for (int l = 0; l < numRoomObjs; l++) {
- if (mouseX > x1[l] && mouseY > y1[l]
- && mouseX < x2[l] && mouseY < y2[l]
+ if (mouseX > _objectX1[l] && mouseY > _objectY1[l]
+ && mouseX < _objectX2[l] && mouseY < _objectY2[l]
&& visible[l] == 1) {
strcpy(textName, objName[l]);
_hasName = true;
diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp
index 07b8464de4..f9f68c3317 100644
--- a/engines/drascula/objects.cpp
+++ b/engines/drascula/objects.cpp
@@ -100,8 +100,8 @@ void DrasculaEngine::checkObjects() {
int l, veo = 0;
for (l = 0; l < numRoomObjs; l++) {
- if (mouseX > x1[l] && mouseY > y1[l]
- && mouseX < x2[l] && mouseY < y2[l]
+ if (mouseX > _objectX1[l] && mouseY > _objectY1[l]
+ && mouseX < _objectX2[l] && mouseY < _objectY2[l]
&& visible[l] == 1 && isDoor[l] == 0) {
strcpy(textName, objName[l]);
_hasName = true;
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp
index 9f725b6d76..9f707eaa07 100644
--- a/engines/drascula/rooms.cpp
+++ b/engines/drascula/rooms.cpp
@@ -374,16 +374,16 @@ bool DrasculaEngine::room_8(int fl) {
}
bool DrasculaEngine::room_9(int fl) {
- if (pickedObject == kVerbTalk && fl == 51 && flags[4] == 0)
+ // Talking with the blind man
+ if (pickedObject == kVerbTalk && fl == 51) {
animation_4_2();
- else if (pickedObject == kVerbTalk && fl == 51 && flags[4] == 1)
- animation_33_2();
- else if (pickedObject == 7 && fl == 51) {
+ } else if (pickedObject == 7 && fl == 51) {
animation_6_2();
removeObject(kItemMoney);
- pickObject(14);}
- else
+ pickObject(14);
+ } else {
hasAnswer = 0;
+ }
return true;
}
@@ -837,9 +837,9 @@ bool DrasculaEngine::room_35(int fl) {
}
bool DrasculaEngine::room_49(int fl) {
- if (pickedObject == kVerbTalk && fl ==51)
+ if (pickedObject == kVerbTalk && fl == 51)
converse(9);
- else if ((pickedObject == 8 && fl == 51) || (pickedObject == 8 && fl == 203))
+ else if (pickedObject == 8 && (fl == 51 || fl == 203))
animation_5_5();
else
hasAnswer = 0;
@@ -852,7 +852,13 @@ bool DrasculaEngine::room_53(int fl) {
pickObject(16);
visible[3] = 0;
} else if (pickedObject == kVerbMove && fl == 123) {
- animation_11_5();
+ flags[9] = 1;
+ if (flags[2] == 1 && flags[3] == 1 && flags[4] == 1) {
+ animation_12_5();
+ } else {
+ flags[9] = 0;
+ talk(33);
+ }
} else if (pickedObject == 12 && fl == 52) {
flags[3] = 1;
talk(401);
@@ -1649,7 +1655,7 @@ bool DrasculaEngine::room(int rN, int fl) {
}
}
- // We did not find any parser, let default one work
+ // We did not find any parser, let the default one work
hasAnswer = 0;
}
@@ -1706,10 +1712,10 @@ void DrasculaEngine::enterRoom(int roomIndex) {
for (l = 0; l < numRoomObjs; l++) {
p.parseInt(objectNum[l]);
p.parseString(objName[l]);
- p.parseInt(x1[l]);
- p.parseInt(y1[l]);
- p.parseInt(x2[l]);
- p.parseInt(y2[l]);
+ p.parseInt(_objectX1[l]);
+ p.parseInt(_objectY1[l]);
+ p.parseInt(_objectX2[l]);
+ p.parseInt(_objectY2[l]);
p.parseInt(roomObjX[l]);
p.parseInt(roomObjY[l]);
p.parseInt(trackObj[l]);
diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp
index 35e3821dc4..ba4148fb76 100644
--- a/engines/drascula/saveload.cpp
+++ b/engines/drascula/saveload.cpp
@@ -21,218 +21,270 @@
*/
#include "common/textconsole.h"
+#include "common/translation.h"
+
+#include "engines/savestate.h"
+#include "graphics/thumbnail.h"
+#include "gui/message.h"
+#include "gui/saveload.h"
#include "drascula/drascula.h"
namespace Drascula {
-/**
- * Loads the save names from the EPA index file.
- *
- * TODO: We should move the save names in their respective save files and get
- * rid of this completely. A good example is the sword1 engine, which also used
- * to have an index file for its saves, that has been removed.
- * sword1 contains code that converts the old index-based saves into the new
- * format without the index file, so we could apply this idea to drascula as
- * well.
- */
-void DrasculaEngine::loadSaveNames() {
- Common::InSaveFile *sav;
- Common::String fileEpa = Common::String::format("%s.epa", _targetName.c_str());
-
- // Create and initialize the index file, if it doesn't exist
- if (!(sav = _saveFileMan->openForLoading(fileEpa))) {
- Common::OutSaveFile *epa;
- if (!(epa = _saveFileMan->openForSaving(fileEpa)))
- error("Can't open %s file", fileEpa.c_str());
- for (int n = 0; n < NUM_SAVES; n++)
- epa->writeString("*\n");
- epa->finalize();
- delete epa;
- if (!(sav = _saveFileMan->openForLoading(fileEpa))) {
- error("Can't open %s file", fileEpa.c_str());
- }
+#define MAGIC_HEADER 0xD6A55A57 // (D)rascula (GA)me (S)cummVM (SA)ve (ST)ate
+#define SAVEGAME_VERSION 1
+
+void DrasculaEngine::checkForOldSaveGames() {
+ Common::String indexFileName = Common::String::format("%s.epa", _targetName.c_str());
+ Common::InSaveFile *indexFile = _saveFileMan->openForLoading(indexFileName);
+
+ // Check for the existence of an old index file
+ if (!indexFile) {
+ delete indexFile;
+ return;
}
- // Load the index file
- for (int n = 0; n < NUM_SAVES; n++) {
- strncpy(_saveNames[n], sav->readLine().c_str(), 23);
- _saveNames[n][22] = '\0'; // make sure the savegame name is 0-terminated
+ GUI::MessageDialog dialog0(
+ _("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"), _("OK"), _("Cancel"));
+
+ int choice = dialog0.runModal();
+ if (choice == GUI::kMessageCancel)
+ return;
+
+ // Convert every save slot we find in the index file to the new format
+ Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
+ Common::String pattern = Common::String::format("%s??", _targetName.c_str());
+
+ // Get list of savefiles for target game
+ Common::StringArray filenames = saveFileMan->listSavefiles(pattern);
+ Common::Array<int> slots;
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ // Obtain the last 2 digits of the filename, since they correspond to the save slot
+ int slotNum = atoi(file->c_str() + file->size() - 2);
+
+ // Ensure save slot is within valid range
+ if (slotNum >= 1 && slotNum <= 10) {
+ slots.push_back(slotNum);
+ }
}
- delete sav;
-}
-/**
- * Saves the save names into the EPA index file.
- *
- * TODO: We should move the save names in their respective save files and get
- * rid of this completely. A good example is the sword1 engine, which also used
- * to have an index file for its saves, that has been removed.
- * sword1 contains code that converts the old index-based saves into the new
- * format without the index file, so we could apply this idea to drascula as
- * well.
- */
-void DrasculaEngine::saveSaveNames() {
- Common::OutSaveFile *tsav;
- Common::String fileEpa = Common::String::format("%s.epa", _targetName.c_str());
+ // Sort save slot ids
+ Common::sort<int>(slots.begin(), slots.end());
- if (!(tsav = _saveFileMan->openForSaving(fileEpa))) {
- error("Can't open %s file", fileEpa.c_str());
- }
- for (int n = 0; n < NUM_SAVES; n++) {
- tsav->writeString(_saveNames[n]);
- tsav->writeString("\n");
+ // Get savegame names from index
+ Common::String saveDesc;
+
+ int line = 1;
+ for (uint i = 0; i < slots.size(); i++) {
+ // Ignore lines corresponding to unused saveslots
+ for (; line < slots[i]; line++)
+ indexFile->readLine();
+
+ // Copy the name in the line corresponding to the save slot
+ saveDesc = indexFile->readLine();
+
+ // Handle cases where the save directory and save index are detectably out of sync
+ if (saveDesc == "*")
+ saveDesc = "No name specified.";
+
+ // Increment line number to keep it in sync with slot number
+ line++;
+
+ // Convert savegame
+ convertSaveGame(slots[i], saveDesc);
}
- tsav->finalize();
- delete tsav;
-}
-bool DrasculaEngine::saveLoadScreen() {
- Common::String file;
- int n, n2, num_sav = 0, y = 27;
+ delete indexFile;
- clearRoom();
+ // Remove index file
+ _saveFileMan->removeSavefile(indexFileName);
+}
- loadSaveNames();
+SaveStateDescriptor loadMetaData(Common::ReadStream *s, int slot, bool setPlayTime) {
+ uint32 sig = s->readUint32BE();
+ byte version = s->readByte();
- loadPic("savescr.alg", bgSurface, HALF_PAL);
+ SaveStateDescriptor desc(-1, ""); // init to an invalid save slot
- color_abc(kColorLightGreen);
+ if (sig != MAGIC_HEADER || version > SAVEGAME_VERSION)
+ return desc;
- select[0] = 0;
+ // Save is valid, set its slot number
+ desc.setSaveSlot(slot);
- _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
- setCursor(kCursorCrosshair);
+ Common::String name;
+ byte size = s->readByte();
+ for (int i = 0; i < size; ++i)
+ name += s->readByte();
+ desc.setDescription(name);
- while (!shouldQuit()) {
- y = 27;
- copyBackground();
- for (n = 0; n < NUM_SAVES; n++) {
- print_abc(_saveNames[n], 116, y);
- y = y + 9;
- }
- print_abc(select, 117, 15);
- updateScreen();
- y = 27;
+ uint32 saveDate = s->readUint32LE();
+ int day = (saveDate >> 24) & 0xFF;
+ int month = (saveDate >> 16) & 0xFF;
+ int year = saveDate & 0xFFFF;
+ desc.setSaveDate(year, month, day);
- updateEvents();
+ uint16 saveTime = s->readUint16LE();
+ int hour = (saveTime >> 8) & 0xFF;
+ int minutes = saveTime & 0xFF;
+ desc.setSaveTime(hour, minutes);
- if (leftMouseButton == 1) {
- delay(50);
- for (n = 0; n < NUM_SAVES; n++) {
- if (mouseX > 115 && mouseY > y + (9 * n) && mouseX < 115 + 175 && mouseY < y + 10 + (9 * n)) {
- strcpy(select, _saveNames[n]);
-
- if (strcmp(select, "*") != 0)
- selectionMade = 1;
- else {
- enterName();
- strcpy(_saveNames[n], select);
- if (selectionMade == 1) {
- file = Common::String::format("%s%02d", _targetName.c_str(), n + 1);
- saveGame(file.c_str());
- saveSaveNames();
- }
- }
+ uint32 playTime = s->readUint32LE();
+ desc.setPlayTime(playTime * 1000);
+ if (setPlayTime)
+ g_engine->setTotalPlayTime(playTime * 1000);
- print_abc(select, 117, 15);
- y = 27;
- for (n2 = 0; n2 < NUM_SAVES; n2++) {
- print_abc(_saveNames[n2], 116, y);
- y = y + 9;
- }
- if (selectionMade == 1) {
- file = Common::String::format("%s%02d", _targetName.c_str(), n + 1);
- }
- num_sav = n;
- }
- }
+ return desc;
+}
- if (mouseX > 117 && mouseY > 15 && mouseX < 295 && mouseY < 24 && selectionMade == 1) {
- enterName();
- strcpy(_saveNames[num_sav], select);
- print_abc(select, 117, 15);
- y = 27;
- for (n2 = 0; n2 < NUM_SAVES; n2++) {
- print_abc(_saveNames[n2], 116, y);
- y = y + 9;
- }
+void saveMetaData(Common::WriteStream *s, Common::String &desc) {
+ TimeDate curTime;
+ g_system->getTimeAndDate(curTime);
+
+ uint32 saveDate = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF);
+ uint16 saveTime = ((curTime.tm_hour & 0xFF) << 8) | ((curTime.tm_min) & 0xFF);
+ uint32 playTime = g_engine->getTotalPlayTime() / 1000;
+
+ s->writeUint32BE(MAGIC_HEADER);
+ s->writeByte(SAVEGAME_VERSION);
+ s->writeByte(desc.size());
+ s->writeString(desc);
+ s->writeUint32LE(saveDate);
+ s->writeUint16LE(saveTime);
+ s->writeUint32LE(playTime);
+}
- if (selectionMade == 1) {
- file = Common::String::format("%s%02d", _targetName.c_str(), n + 1);
- saveGame(file.c_str());
- saveSaveNames();
- }
- }
+void DrasculaEngine::convertSaveGame(int slot, Common::String &desc) {
+ Common::String oldFileName = Common::String::format("%s%02d", _targetName.c_str(), slot);
+ Common::String newFileName = Common::String::format("%s.%03d", _targetName.c_str(), slot);
+ Common::InSaveFile *oldFile = _saveFileMan->openForLoading(oldFileName);
+ if (!oldFile)
+ error("Can't open %s", oldFileName.c_str());
+ Common::OutSaveFile *newFile = _saveFileMan->openForSaving(newFileName);
+ if (!newFile)
+ error("Can't open %s", newFileName.c_str());
+
+ // Read data from old file
+ int32 dataSize = oldFile->size();
+ byte *buffer = new byte[dataSize];
+ oldFile->read(buffer, dataSize);
+
+ // First, write the appropriate meta data in the new file
+ saveMetaData(newFile, desc);
+ Graphics::saveThumbnail(*newFile); // basically, at this point this will capture a black screen
+
+ // And then attach the actual save data
+ newFile->write(buffer, dataSize);
+ newFile->finalize();
+ if (newFile->err())
+ warning("Can't write file '%s'. (Disk full?)", newFileName.c_str());
+
+ delete[] buffer;
+ delete newFile;
+ delete oldFile;
+
+ // Remove old save file
+ _saveFileMan->removeSavefile(oldFileName);
+}
- if (mouseX > 125 && mouseY > 123 && mouseX < 199 && mouseY < 149 && selectionMade == 1) {
- if (!loadGame(file.c_str())) {
- _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
- return false;
- }
- break;
- } else if (mouseX > 208 && mouseY > 123 && mouseX < 282 && mouseY < 149 && selectionMade == 1) {
- saveGame(file.c_str());
- saveSaveNames();
- } else if (mouseX > 168 && mouseY > 154 && mouseX < 242 && mouseY < 180)
- break;
- else if (selectionMade == 0) {
- print_abc("Please select a slot", 117, 15);
- }
- updateScreen();
- delay(200);
+/**
+ * Loads the first 10 save names, to be used in Drascula's save/load screen
+ */
+void DrasculaEngine::loadSaveNames() {
+ Common::String saveFileName;
+ Common::InSaveFile *in;
+
+ for (int n = 0; n < NUM_SAVES; n++) {
+ saveFileName = Common::String::format("%s.%03d", _targetName.c_str(), n + 1);
+ if ((in = _saveFileMan->openForLoading(saveFileName))) {
+ SaveStateDescriptor desc = loadMetaData(in, n + 1, false);
+ _saveNames[n] = desc.getDescription();
+ delete in;
}
- y = 26;
+ }
+}
+
+void DrasculaEngine::saveGame(int slot, Common::String &desc) {
+ Common::OutSaveFile *out;
+ int l;
- delay(5);
+ Common::String saveFileName = Common::String::format("%s.%03d", _targetName.c_str(), slot);
+ if (!(out = _saveFileMan->openForSaving(saveFileName))) {
+ error("Unable to open the file");
}
- selectVerb(kVerbNone);
+ saveMetaData(out, desc);
+ Graphics::saveThumbnail(*out);
- clearRoom();
- loadPic(roomNumber, bgSurface, HALF_PAL);
- selectionMade = 0;
+ // Actual save data follows
+ out->writeSint32LE(currentChapter);
+ out->write(currentData, 20);
+ out->writeSint32LE(curX);
+ out->writeSint32LE(curY);
+ out->writeSint32LE(trackProtagonist);
- _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
+ for (l = 1; l < ARRAYSIZE(inventoryObjects); l++) {
+ out->writeSint32LE(inventoryObjects[l]);
+ }
- return true;
+ for (l = 0; l < NUM_FLAGS; l++) {
+ out->writeSint32LE(flags[l]);
+ }
+
+ out->writeSint32LE(takeObject);
+ out->writeSint32LE(pickedObject);
+
+ out->finalize();
+ if (out->err())
+ warning("Can't write file '%s'. (Disk full?)", saveFileName.c_str());
+
+ delete out;
}
-bool DrasculaEngine::loadGame(const char *gameName) {
+bool DrasculaEngine::loadGame(int slot) {
int l, savedChapter, roomNum = 0;
- Common::InSaveFile *sav;
+ Common::InSaveFile *in;
previousMusic = roomMusic;
_menuScreen = false;
if (currentChapter != 1)
clearRoom();
- if (!(sav = _saveFileMan->openForLoading(gameName))) {
- error("missing savegame file");
+ Common::String saveFileName = Common::String::format("%s.%03d", _targetName.c_str(), slot);
+ if (!(in = _saveFileMan->openForLoading(saveFileName))) {
+ error("missing savegame file %s", saveFileName.c_str());
}
- savedChapter = sav->readSint32LE();
+ loadMetaData(in, slot, true);
+ Graphics::skipThumbnail(*in);
+
+ savedChapter = in->readSint32LE();
if (savedChapter != currentChapter) {
- strcpy(saveName, gameName);
+ _currentSaveSlot = slot;
currentChapter = savedChapter - 1;
loadedDifferentChapter = 1;
+ delete in;
return false;
}
- sav->read(currentData, 20);
- curX = sav->readSint32LE();
- curY = sav->readSint32LE();
- trackProtagonist = sav->readSint32LE();
+
+ in->read(currentData, 20);
+ curX = in->readSint32LE();
+ curY = in->readSint32LE();
+ trackProtagonist = in->readSint32LE();
for (l = 1; l < ARRAYSIZE(inventoryObjects); l++) {
- inventoryObjects[l] = sav->readSint32LE();
+ inventoryObjects[l] = in->readSint32LE();
}
for (l = 0; l < NUM_FLAGS; l++) {
- flags[l] = sav->readSint32LE();
+ flags[l] = in->readSint32LE();
}
- takeObject = sav->readSint32LE();
- pickedObject = sav->readSint32LE();
+ takeObject = in->readSint32LE();
+ pickedObject = in->readSint32LE();
loadedDifferentChapter = 0;
if (!sscanf(currentData, "%d.ald", &roomNum)) {
error("Bad save format");
@@ -243,35 +295,158 @@ bool DrasculaEngine::loadGame(const char *gameName) {
return true;
}
-void DrasculaEngine::saveGame(const char *gameName) {
- Common::OutSaveFile *out;
- int l;
+Common::String DrasculaEngine::enterName(Common::String &selectedName) {
+ Common::KeyCode key;
+ Common::String inputLine = selectedName;
- if (!(out = _saveFileMan->openForSaving(gameName))) {
- error("Unable to open the file");
+ flushKeyBuffer();
+ _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
+
+ while (!shouldQuit()) {
+ copyBackground(115, 14, 115, 14, 176, 9, bgSurface, screenSurface);
+ print_abc((inputLine + "-").c_str(), 117, 15);
+ updateScreen();
+
+ key = getScan();
+
+ if (key != 0) {
+ if (key >= 0 && key <= 0xFF && isAlpha(key)) {
+ inputLine += tolower(key);
+ } else if ((key >= Common::KEYCODE_0 && key <= Common::KEYCODE_9) || key == Common::KEYCODE_SPACE) {
+ inputLine += key;
+ } else if (key == Common::KEYCODE_ESCAPE) {
+ inputLine.clear();
+ break;
+ } else if (key == Common::KEYCODE_RETURN) {
+ break;
+ } else if (key == Common::KEYCODE_BACKSPACE) {
+ inputLine.deleteLastChar();
+ }
+ }
}
- out->writeSint32LE(currentChapter);
- out->write(currentData, 20);
- out->writeSint32LE(curX);
- out->writeSint32LE(curY);
- out->writeSint32LE(trackProtagonist);
- for (l = 1; l < ARRAYSIZE(inventoryObjects); l++) {
- out->writeSint32LE(inventoryObjects[l]);
+ _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
+ return inputLine;
+}
+
+bool DrasculaEngine::scummVMSaveLoadDialog(bool isSave) {
+ GUI::SaveLoadChooser *dialog;
+ Common::String desc;
+ int slot;
+
+ if (isSave) {
+ dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
+
+ slot = dialog->runModalWithCurrentTarget();
+ desc = dialog->getResultString();
+
+ if (desc.empty()) {
+ // create our own description for the saved game, the user didnt enter it
+ desc = dialog->createDefaultSaveDescription(slot);
+ }
+
+ if (desc.size() > 28)
+ desc = Common::String(desc.c_str(), 28);
+ } else {
+ dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
+ slot = dialog->runModalWithCurrentTarget();
}
- for (l = 0; l < NUM_FLAGS; l++) {
- out->writeSint32LE(flags[l]);
+ delete dialog;
+
+ if (slot < 0)
+ return true;
+
+ if (isSave) {
+ saveGame(slot, desc);
+ return true;
+ } else {
+ return loadGame(slot);
}
+}
- out->writeSint32LE(takeObject);
- out->writeSint32LE(pickedObject);
+bool DrasculaEngine::saveLoadScreen() {
+ int n, selectedSlot = 0;
+ Common::String selectedName;
- out->finalize();
- if (out->err())
- warning("Can't write file '%s'. (Disk full?)", gameName);
+ clearRoom();
+ loadPic("savescr.alg", bgSurface, HALF_PAL);
+ color_abc(kColorLightGreen);
+ setCursor(kCursorCrosshair);
+ loadSaveNames();
- delete out;
+ while (!shouldQuit()) {
+ copyBackground();
+ for (n = 0; n < NUM_SAVES; n++) {
+ print_abc(_saveNames[n].c_str(), 116, 27 + 9 * n);
+ }
+ print_abc(selectedName.c_str(), 117, 15);
+
+ updateScreen();
+ updateEvents();
+
+ if (leftMouseButton == 1) {
+ // Check if the user has clicked on a save slot
+ for (n = 0; n < NUM_SAVES; n++) {
+ if (mouseX > 115 && mouseY > 27 + (9 * n) && mouseX < 115 + 175 && mouseY < 27 + 10 + (9 * n)) {
+ selectedSlot = n;
+ selectedName = _saveNames[selectedSlot];
+ if (selectedName.empty()) {
+ selectedName = enterName(selectedName);
+ if (!selectedName.empty())
+ _saveNames[selectedSlot] = selectedName; // update save name
+ }
+ break;
+ }
+ }
+
+ // Check if the user has clicked in the text area above the save slots
+ if (mouseX > 117 && mouseY > 15 && mouseX < 295 && mouseY < 24 && !selectedName.empty()) {
+ selectedName = enterName(selectedName);
+ if (!selectedName.empty())
+ _saveNames[selectedSlot] = selectedName; // update save name
+ }
+
+ // Check if the user has clicked a button
+ if (mouseX > 208 && mouseY > 123 && mouseX < 282 && mouseY < 149) {
+ // "Save" button
+ if (selectedName.empty()) {
+ print_abc("Please select a slot", 117, 15);
+ updateScreen();
+ delay(200);
+ } else {
+ selectVerb(kVerbNone);
+ clearRoom();
+ loadPic(roomNumber, bgSurface, HALF_PAL);
+ updateRoom();
+ updateScreen();
+
+ saveGame(selectedSlot + 1, _saveNames[selectedSlot]);
+ return true;
+ }
+ } else if (mouseX > 125 && mouseY > 123 && mouseX < 199 && mouseY < 149) {
+ // "Load" button
+ if (selectedName.empty()) {
+ print_abc("Please select a slot", 117, 15);
+ updateScreen();
+ delay(200);
+ } else {
+ return loadGame(selectedSlot + 1);
+ }
+ } else if (mouseX > 168 && mouseY > 154 && mouseX < 242 && mouseY < 180) {
+ // "Play" button
+ break;
+ }
+ } // if (leftMouseButton == 1)
+
+ leftMouseButton = 0;
+ delay(10);
+ }
+
+ selectVerb(kVerbNone);
+ clearRoom();
+ loadPic(roomNumber, bgSurface, HALF_PAL);
+ return true;
}
} // End of namespace Drascula
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index eb35a73f66..5746568e4e 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -513,6 +513,7 @@ public:
void dirCom();
void useMon();
bool execCommand();
+ int findCommand(const char *const cmdList[]);
// from newplace.cpp
void getUnderCentre();
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index b6922cba51..b07fbf54fc 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -104,15 +104,66 @@ void DreamWebEngine::useMon() {
redrawMainScrn();
workToScreenM();
}
+
+int DreamWebEngine::findCommand(const char *const cmdList[]) {
+ // Loop over all commands in the list and see if we get a match
+ int cmd = 0;
+ while (cmdList[cmd] != NULL) {
+ const char *cmdStr = cmdList[cmd];
+ const char *inputStr = _inputLine;
+ // Compare the command, char by char, to see if we get a match.
+ // We only care about the prefix matching, though.
+ char inputChar, cmdChar;
+ do {
+ inputChar = *inputStr; inputStr += 2;
+ cmdChar = *cmdStr++;
+ if (cmdChar == 0)
+ return cmd;
+ } while (inputChar == cmdChar);
+ ++cmd;
+ }
+ return -1;
+}
bool DreamWebEngine::execCommand() {
- static const char *comlist[] = {
+ static const char *const comlist[] = {
"EXIT",
"HELP",
"LIST",
"READ",
"LOGON",
- "KEYS"
+ "KEYS",
+ NULL
+ };
+
+ static const char *const comlistFR[] = {
+ "SORTIR",
+ "AIDE",
+ "LISTE",
+ "LIRE",
+ "CONNEXION",
+ "TOUCHES", // should be CLES but it is translated as TOUCHES in the game...
+ NULL
+ };
+
+ static const char *const comlistDE[] = {
+ "ENDE",
+ "HILFE",
+ "LISTE",
+ "LIES",
+ "ZUGRIFF",
+ "DATEN",
+ NULL
+ };
+
+ static const char *const comlistIT[] = {
+ "ESCI",
+ "AIUTO",
+ "ELENCA",
+ "LEGGI",
+ "REGISTRA",
+ "CHIAVI",
+ NULL
};
if (_inputLine[0] == 0) {
@@ -121,26 +172,23 @@ bool DreamWebEngine::execCommand() {
return false;
}
- int cmd;
- bool done = false;
- // Loop over all commands in the list and see if we get a match
- for (cmd = 0; cmd < ARRAYSIZE(comlist); ++cmd) {
- const char *cmdStr = comlist[cmd];
- const char *inputStr = _inputLine;
- // Compare the command, char by char, to see if we get a match.
- // We only care about the prefix matching, though.
- char inputChar, cmdChar;
- do {
- inputChar = *inputStr; inputStr += 2;
- cmdChar = *cmdStr++;
- if (cmdChar == 0) {
- done = true;
- break;
- }
- } while (inputChar == cmdChar);
-
- if (done)
+ int cmd = findCommand(comlist);
+ if (cmd == -1) {
+ // This did not match an english command. Try to find a localized one.
+ switch (getLanguage()) {
+ case Common::FR_FRA:
+ cmd = findCommand(comlistFR);
+ break;
+ case Common::DE_DEU:
+ cmd = findCommand(comlistDE);
break;
+ case Common::IT_ITA:
+ cmd = findCommand(comlistIT);
+ break;
+ case Common::ES_ESP:
+ default:
+ break;
+ }
}
// Execute the selected command
@@ -154,7 +202,21 @@ bool DreamWebEngine::execCommand() {
// this extra text is wrapped around the common copy protection check,
// to keep it faithful to the original, if requested.
if (!_copyProtection) {
- monPrint("VALID COMMANDS ARE EXIT, HELP, LIST, READ, LOGON, KEYS");
+ switch (getLanguage()) {
+ case Common::FR_FRA:
+ monPrint("LES COMMANDES VALIDES SONT SORTIR, AIDE, LISTE, LIRE, CONNEXION, TOUCHES");
+ break;
+ case Common::DE_DEU:
+ monPrint("G\232LTIGE BEFEHLE SIND ENDE, HILFE, LISTE, LIES, ZUGRIFF, DATEN");
+ break;
+ case Common::IT_ITA:
+ monPrint("I COMANDI VALIDI SONO ESCI, AIUTO, ELENCA, LEGGI, REGISTRA, CHIAVI");
+ break;
+ case Common::ES_ESP:
+ default:
+ monPrint("VALID COMMANDS ARE EXIT, HELP, LIST, READ, LOGON, KEYS");
+ break;
+ }
}
break;
case 2:
@@ -177,7 +239,6 @@ bool DreamWebEngine::execCommand() {
}
-
void DreamWebEngine::monitorLogo() {
if (_logoNum != _oldLogoNum) {
_oldLogoNum = _logoNum;
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 2ef4ecab60..c84404cc68 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -179,7 +179,12 @@ void initCommonGFX(bool defaultTo1XScaler) {
} else {
// Override global scaler with any game-specific define
if (ConfMan.hasKey("gfx_mode")) {
- g_system->setGraphicsMode(ConfMan.get("gfx_mode").c_str());
+ Common::String gfxMode = ConfMan.get("gfx_mode");
+ g_system->setGraphicsMode(gfxMode.c_str());
+
+ // HACK: For OpenGL modes, we will still honor the graphics scale override
+ if (defaultTo1XScaler && (gfxMode.equalsIgnoreCase("gl1") || gfxMode.equalsIgnoreCase("gl2") || gfxMode.equalsIgnoreCase("gl4")))
+ g_system->resetGraphicsScale();
}
}
diff --git a/engines/engines.mk b/engines/engines.mk
index 61004463fe..bcf97df991 100644
--- a/engines/engines.mk
+++ b/engines/engines.mk
@@ -75,6 +75,11 @@ DEFINES += -DENABLE_GROOVIE2
endif
endif
+ifdef ENABLE_HOPKINS
+DEFINES += -DENABLE_HOPKINS=$(ENABLE_HOPKINS)
+MODULES += engines/hopkins
+endif
+
ifdef ENABLE_HUGO
DEFINES += -DENABLE_HUGO=$(ENABLE_HUGO)
MODULES += engines/hugo
diff --git a/engines/gob/anifile.cpp b/engines/gob/anifile.cpp
index 085ac800cd..3b6a7f61ed 100644
--- a/engines/gob/anifile.cpp
+++ b/engines/gob/anifile.cpp
@@ -159,7 +159,7 @@ void ANIFile::loadAnimation(Animation &animation, FrameArray &frames,
area.left = area.top = 0x7FFF;
area.right = area.bottom = -0x7FFF;
- for (ChunkList::const_iterator c = frame.begin(); c != frame.end(); c++) {
+ for (ChunkList::const_iterator c = frame.begin(); c != frame.end(); ++c) {
uint16 cL, cT, cR, cB;
if (!getCoordinates(c->layer, c->part, cL, cT, cR, cB))
diff --git a/engines/gob/cmpfile.cpp b/engines/gob/cmpfile.cpp
index d304958f76..0c650a917e 100644
--- a/engines/gob/cmpfile.cpp
+++ b/engines/gob/cmpfile.cpp
@@ -135,8 +135,11 @@ void CMPFile::loadCMP(Common::SeekableReadStream &cmp) {
uint32 size = cmp.size();
byte *data = new byte[size];
- if (cmp.read(data, size) != size)
+ if (cmp.read(data, size) != size) {
+ delete[] data;
+
return;
+ }
_vm->_video->drawPackedSprite(data, _surface->getWidth(), _surface->getHeight(), 0, 0, 0, *_surface);
diff --git a/engines/gob/detection/tables_geisha.h b/engines/gob/detection/tables_geisha.h
index a32d1ebf81..2c9a8842d0 100644
--- a/engines/gob/detection/tables_geisha.h
+++ b/engines/gob/detection/tables_geisha.h
@@ -97,6 +97,20 @@
kFeaturesEGA | kFeaturesAdLib,
"disk1.stk", "intro.tot", 0
},
+{ // Supplied by alestedx in bug report #3610207
+ {
+ "geisha",
+ "",
+ AD_ENTRY1s("disk1.stk", "49107ac897e7c00af6c4ecd78a74a710", 212164),
+ ES_ESP,
+ kPlatformPC,
+ ADGF_NO_FLAGS,
+ GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
+ },
+ kGameTypeGeisha,
+ kFeaturesEGA | kFeaturesAdLib,
+ "disk1.stk", "intro.tot", 0
+},
{
{
"geisha",
diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index 63bf3eb1c6..2aa837e777 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -693,7 +693,7 @@ protected:
void o7_zeroVar();
void o7_getINIValue();
void o7_setINIValue();
- void o7_loadLBMPalette();
+ void o7_loadIFFPalette();
void o7_opendBase();
void o7_closedBase();
void o7_getDBString();
diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
index 6cf69ed9df..1238c23e3b 100644
--- a/engines/gob/inter_v7.cpp
+++ b/engines/gob/inter_v7.cpp
@@ -27,6 +27,7 @@
#include "graphics/cursorman.h"
#include "graphics/wincursor.h"
+#include "graphics/decoders/iff.h"
#include "gob/gob.h"
#include "gob/global.h"
@@ -72,7 +73,7 @@ void Inter_v7::setupOpcodesDraw() {
OPCODEDRAW(0x95, o7_zeroVar);
OPCODEDRAW(0xA1, o7_getINIValue);
OPCODEDRAW(0xA2, o7_setINIValue);
- OPCODEDRAW(0xA4, o7_loadLBMPalette);
+ OPCODEDRAW(0xA4, o7_loadIFFPalette);
OPCODEDRAW(0xC4, o7_opendBase);
OPCODEDRAW(0xC5, o7_closedBase);
OPCODEDRAW(0xC6, o7_getDBString);
@@ -523,7 +524,7 @@ void Inter_v7::o7_setINIValue() {
_inis.setValue(file, section, key, value);
}
-void Inter_v7::o7_loadLBMPalette() {
+void Inter_v7::o7_loadIFFPalette() {
Common::String file = _vm->_game->_script->evalString();
if (!file.contains('.'))
file += ".LBM";
@@ -534,37 +535,46 @@ void Inter_v7::o7_loadLBMPalette() {
if (startIndex > stopIndex)
SWAP(startIndex, stopIndex);
- Common::SeekableReadStream *lbmFile = _vm->_dataIO->getFile(file);
- if (!lbmFile) {
- warning("o7_loadLBMPalette(): No such file \"%s\"", file.c_str());
+ Common::SeekableReadStream *iffFile = _vm->_dataIO->getFile(file);
+ if (!iffFile) {
+ warning("o7_loadIFFPalette(): No such file \"%s\"", file.c_str());
return;
}
- ImageType type = Surface::identifyImage(*lbmFile);
- if (type != kImageTypeLBM) {
- warning("o7_loadLBMPalette(): \"%s\" is no LBM", file.c_str());
+ ImageType type = Surface::identifyImage(*iffFile);
+ if (type != kImageTypeIFF) {
+ warning("o7_loadIFFPalette(): \"%s\" is no IFF", file.c_str());
return;
}
- byte palette[768];
-
- LBMLoader lbm(*lbmFile);
- if (!lbm.loadPalette(palette)) {
- warning("o7_loadLBMPalette(): Failed reading palette from LBM \"%s\"", file.c_str());
+ Graphics::IFFDecoder decoder;
+ decoder.loadStream(*iffFile);
+ if (!decoder.getPalette() || decoder.getPaletteColorCount() != 256) {
+ warning("o7_loadIFFPalette(): Failed reading palette from IFF \"%s\"", file.c_str());
return;
}
- memset(palette , 0x00, 3);
- memset(palette + 765, 0xFF, 3);
- for (int i = 0; i < 768; i++)
- palette[i] >>= 2;
-
- int16 count = stopIndex - startIndex + 1;
+ const byte *palette = decoder.getPalette();
startIndex *= 3;
- count *= 3;
+ stopIndex *= 3;
+
+ byte *dst = (byte *)_vm->_draw->_vgaPalette + startIndex;
+ const byte *src = palette + startIndex;
+ for (int i = startIndex; i <= stopIndex + 2; ++i) {
+ *dst++ = *src++ >> 2;
+ }
+
+ if (startIndex == 0) {
+ dst = (byte *)_vm->_draw->_vgaPalette;
+ dst[0] = dst[1] = dst[2] = 0x00 >> 2;
+ }
+
+ if (stopIndex == 765) {
+ dst = (byte *)_vm->_draw->_vgaPalette + 765;
+ dst[0] = dst[1] = dst[2] = 0xFF >> 2;
+ }
- memcpy((char *)_vm->_draw->_vgaPalette + startIndex, palette + startIndex, count);
_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
}
diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp
index afbb7c3bae..6b65eb6ab9 100644
--- a/engines/gob/surface.cpp
+++ b/engines/gob/surface.cpp
@@ -26,112 +26,15 @@
#include "common/stream.h"
#include "common/util.h"
#include "common/frac.h"
+#include "common/textconsole.h"
#include "graphics/primitives.h"
#include "graphics/pixelformat.h"
#include "graphics/surface.h"
+#include "graphics/decoders/iff.h"
namespace Gob {
-LBMLoader::LBMLoader(Common::SeekableReadStream &stream) : _parser(&stream),
- _hasHeader(false), _palette(0), _image(0) {
-
-}
-
-bool LBMLoader::loadHeader(Graphics::BMHD &header) {
- if (!readHeader())
- return false;
-
- header = _decoder._header;
- return true;
-}
-
-bool LBMLoader::loadPalette(byte *palette) {
- assert(!_palette);
- assert(palette);
-
- _palette = palette;
-
- Common::Functor1Mem<Common::IFFChunk&, bool, LBMLoader> c(this, &LBMLoader::callbackPalette);
- _parser.parse(c);
-
- if (!_palette)
- return false;
-
- _palette = 0;
- return true;
-}
-
-bool LBMLoader::loadImage(byte *image) {
- assert(!_image);
- assert(image);
-
- if (!readHeader())
- return false;
-
- _image = image;
-
- Common::Functor1Mem<Common::IFFChunk&, bool, LBMLoader> c(this, &LBMLoader::callbackImage);
- _parser.parse(c);
-
- if (!_image)
- return false;
-
- _image = 0;
- return true;
-}
-
-bool LBMLoader::callbackHeader(Common::IFFChunk &chunk) {
- if (chunk._type == ID_BMHD) {
- if (chunk._size == sizeof(Graphics::BMHD)) {
- _decoder.loadHeader(chunk._stream);
- _hasHeader = true;
- }
-
- return true; // Stop the IFF parser
- }
-
- return false;
-}
-
-bool LBMLoader::callbackPalette(Common::IFFChunk &chunk) {
- assert(_palette);
-
- if (chunk._type == ID_CMAP) {
- if (chunk._size == 768) {
- if (chunk._stream->read(_palette, chunk._size) != chunk._size)
- _palette = 0;
- } else
- _palette = 0;
-
- return true; // Stop the IFF parser
- }
-
- return false;
-}
-
-bool LBMLoader::callbackImage(Common::IFFChunk &chunk) {
- assert(_image);
-
- if (chunk._type == ID_BODY) {
- _decoder.loadBitmap(Graphics::ILBMDecoder::ILBM_UNPACK_PLANES, _image, chunk._stream);
- return true;
- }
-
- return false;
-}
-
-bool LBMLoader::readHeader() {
- if (_hasHeader)
- return true;
-
- Common::Functor1Mem<Common::IFFChunk&, bool, LBMLoader> c(this, &LBMLoader::callbackHeader);
- _parser.parse(c);
-
- return _hasHeader;
-}
-
-
static void plotPixel(int x, int y, int color, void *data) {
Surface *dest = (Surface *)data;
@@ -841,8 +744,8 @@ bool Surface::loadImage(Common::SeekableReadStream &stream, ImageType type) {
switch (type) {
case kImageTypeTGA:
return loadTGA(stream);
- case kImageTypeLBM:
- return loadLBM(stream);
+ case kImageTypeIFF:
+ return loadIFF(stream);
case kImageTypeBRC:
return loadBRC(stream);
case kImageTypeBMP:
@@ -871,7 +774,7 @@ ImageType Surface::identifyImage(Common::SeekableReadStream &stream) {
stream.seek(startPos);
if (!strncmp(buffer , "FORM", 4))
- return kImageTypeLBM;
+ return kImageTypeIFF;
if (!strncmp(buffer + 6, "JFIF", 4))
return kImageTypeJPEG;
if (!strncmp(buffer , "BRC" , 3))
@@ -904,20 +807,17 @@ bool Surface::loadTGA(Common::SeekableReadStream &stream) {
return false;
}
-bool Surface::loadLBM(Common::SeekableReadStream &stream) {
+bool Surface::loadIFF(Common::SeekableReadStream &stream) {
+ Graphics::IFFDecoder decoder;
+ decoder.loadStream(stream);
- LBMLoader loader(stream);
-
- Graphics::BMHD header;
- loader.loadHeader(header);
-
- if (header.depth != 8)
- // Only 8bpp LBMs supported for now
+ if (!decoder.getSurface())
return false;
- resize(header.width, header.height);
+ resize(decoder.getSurface()->w, decoder.getSurface()->h);
+ memcpy(_vidMem, decoder.getSurface()->pixels, decoder.getSurface()->w * decoder.getSurface()->h);
- return loader.loadImage(_vidMem);
+ return true;
}
bool Surface::loadBRC(Common::SeekableReadStream &stream) {
diff --git a/engines/gob/surface.h b/engines/gob/surface.h
index 8f895a7910..8a1b502a95 100644
--- a/engines/gob/surface.h
+++ b/engines/gob/surface.h
@@ -26,9 +26,6 @@
#include "common/scummsys.h"
#include "common/ptr.h"
#include "common/rational.h"
-#include "common/iff_container.h"
-
-#include "graphics/iff.h"
namespace Common {
class SeekableReadStream;
@@ -39,37 +36,12 @@ namespace Gob {
enum ImageType {
kImageTypeNone = -1,
kImageTypeTGA = 0,
- kImageTypeLBM,
+ kImageTypeIFF,
kImageTypeBRC,
kImageTypeBMP,
kImageTypeJPEG
};
-class LBMLoader {
-public:
- LBMLoader(Common::SeekableReadStream &stream);
-
- bool loadHeader (Graphics::BMHD &header);
- bool loadPalette(byte *palette);
- bool loadImage (byte *image);
-
-private:
- Common::IFFParser _parser;
-
- bool _hasHeader;
-
- Graphics::ILBMDecoder _decoder;
-
- byte *_palette;
- byte *_image;
-
- bool callbackHeader (Common::IFFChunk &chunk);
- bool callbackPalette(Common::IFFChunk &chunk);
- bool callbackImage (Common::IFFChunk &chunk);
-
- bool readHeader();
-};
-
/** An iterator over a surface's image data, automatically handles different color depths. */
class Pixel {
public:
@@ -182,7 +154,7 @@ private:
uint16 dWidth, uint16 dHeight, uint16 sWidth, uint16 sHeight);
bool loadTGA (Common::SeekableReadStream &stream);
- bool loadLBM (Common::SeekableReadStream &stream);
+ bool loadIFF (Common::SeekableReadStream &stream);
bool loadBRC (Common::SeekableReadStream &stream);
bool loadBMP (Common::SeekableReadStream &stream);
bool loadJPEG(Common::SeekableReadStream &stream);
diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp
index e06dace0d7..65452f5cf3 100644
--- a/engines/groovie/detection.cpp
+++ b/engines/groovie/detection.cpp
@@ -25,9 +25,12 @@
#include "groovie/saveload.h"
#include "common/system.h"
+#include "common/translation.h"
namespace Groovie {
+#define GAMEOPTION_T7G_FAST_MOVIE_SPEED GUIO_GAMEOPTIONS1
+
static const PlainGameDescriptor groovieGames[] = {
// Games
{"t7g", "The 7th Guest"},
@@ -52,7 +55,7 @@ static const GroovieGameDescription gameDescriptions[] = {
"t7g", "",
AD_ENTRY1s("script.grv", "d1b8033b40aa67c076039881eccce90d", 16659),
Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS,
- GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_T7G_FAST_MOVIE_SPEED)
},
kGroovieT7G, 0
},
@@ -63,7 +66,7 @@ static const GroovieGameDescription gameDescriptions[] = {
"t7g", "",
AD_ENTRY1s("T7GMac", "acdc4a58dd3f007f65e99b99d78e0bce", 1814029),
Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK,
- GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_T7G_FAST_MOVIE_SPEED)
},
kGroovieT7G, 0
},
@@ -79,7 +82,7 @@ static const GroovieGameDescription gameDescriptions[] = {
"t7g", "",
AD_ENTRY1s("T7GMac", "6bdee8d0f9eef6d58d02fcd7deec3fb2", 1830783),
Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK,
- GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_T7G_FAST_MOVIE_SPEED)
},
kGroovieT7G, 0
},
@@ -90,7 +93,7 @@ static const GroovieGameDescription gameDescriptions[] = {
"t7g", "",
AD_ENTRY1s("T7GMac", "0d595d4b44ae1814082938d051e5174e", 1830783),
Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK,
- GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_T7G_FAST_MOVIE_SPEED)
},
kGroovieT7G, 0
},
@@ -106,7 +109,7 @@ static const GroovieGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::RU_RUS, Common::kPlatformPC, ADGF_NO_FLAGS,
- GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_T7G_FAST_MOVIE_SPEED)
},
kGroovieT7G, 0
},
@@ -120,7 +123,7 @@ static const GroovieGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY, Common::kPlatformIOS, ADGF_NO_FLAGS,
- GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)
+ GUIO3(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_T7G_FAST_MOVIE_SPEED)
},
kGroovieT7G, 0
},
@@ -302,9 +305,23 @@ static const char *directoryGlobs[] = {
0
};
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_T7G_FAST_MOVIE_SPEED,
+ {
+ _s("Fast movie speed"),
+ _s("Play movies at an increased speed"),
+ "fast_movie_speed",
+ false
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
class GroovieMetaEngine : public AdvancedMetaEngine {
public:
- GroovieMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(GroovieGameDescription), groovieGames) {
+ GroovieMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(GroovieGameDescription), groovieGames, optionsList) {
_singleid = "groovie";
// Use kADFlagUseExtraAsHint in order to distinguish the 11th hour from
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 16358bfa28..5ade442742 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -60,13 +60,8 @@ GroovieEngine::GroovieEngine(OSystem *syst, const GroovieGameDescription *gd) :
SearchMan.addSubDirectoryMatching(gameDataDir, "MIDI");
_modeSpeed = kGroovieSpeedNormal;
- if (ConfMan.hasKey("t7g_speed")) {
- Common::String speed = ConfMan.get("t7g_speed");
- if (speed.equals("im_an_ios"))
- _modeSpeed = kGroovieSpeediOS;
- else if (speed.equals("tweaked"))
- _modeSpeed = kGroovieSpeedTweaked;
- }
+ if (ConfMan.hasKey("fast_movie_speed") && ConfMan.getBool("fast_movie_speed"))
+ _modeSpeed = kGroovieSpeedFast;
// Initialize the custom debug levels
DebugMan.addDebugChannel(kGroovieDebugAll, "All", "Debug everything");
diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h
index c66e54b500..79abc13b1c 100644
--- a/engines/groovie/groovie.h
+++ b/engines/groovie/groovie.h
@@ -74,15 +74,14 @@ enum DebugLevels {
/**
* This enum reflects the available movie speed settings:
- * - Normal: both movies and 'teeth' animations are played at a normal speed
- * - Tweaked: movies are played at a normal speed, 'teeth' animations at
- increased speed
- * - iOS: both movies and 'teeth' animations are played at increased speed
+ * - Normal: play videos at a normal speed
+ * - Fast: play videos with audio at a fast speed. Videos without audio,
+ * like teeth animations, are played at their regular speed to avoid
+ * audio sync issues
*/
enum GameSpeed {
kGroovieSpeedNormal,
- kGroovieSpeediOS,
- kGroovieSpeedTweaked
+ kGroovieSpeedFast
};
struct GroovieGameDescription;
diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp
index b3fcf462b2..8786e75488 100644
--- a/engines/groovie/vdx.cpp
+++ b/engines/groovie/vdx.cpp
@@ -88,7 +88,7 @@ uint16 VDXPlayer::loadInternal() {
// Enable highspeed if we're not obeying fps, and not marked as special
// This will be disabled in chunk audio if we're actually an audio vdx
- if ( _vm->_modeSpeed == kGroovieSpeediOS || (_vm->_modeSpeed == kGroovieSpeedTweaked && ((_flags & (1 << 15)) == 0)))
+ if (_vm->_modeSpeed == kGroovieSpeedFast && ((_flags & (1 << 15)) == 0))
setOverrideSpeed(true);
if (_flagOnePrev && !_flagOne && !_flagEight) {
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp
new file mode 100644
index 0000000000..3364429723
--- /dev/null
+++ b/engines/hopkins/anim.cpp
@@ -0,0 +1,804 @@
+/* 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 "hopkins/anim.h"
+
+#include "hopkins/files.h"
+#include "hopkins/globals.h"
+#include "hopkins/graphics.h"
+#include "hopkins/hopkins.h"
+
+#include "common/system.h"
+#include "graphics/palette.h"
+#include "common/file.h"
+#include "common/rect.h"
+#include "engines/util.h"
+
+namespace Hopkins {
+
+AnimationManager::AnimationManager(HopkinsEngine *vm) {
+ _vm = vm;
+ _clearAnimationFl = false;
+ for (int i = 0; i < 8; ++i)
+ Common::fill((byte *)&Bank[i], (byte *)&Bank[i] + sizeof(BankItem), 0);
+ for (int i = 0; i < 35; ++i)
+ Common::fill((byte *)&_animBqe[i], (byte *)&_animBqe[i] + sizeof(BqeAnimItem), 0);
+}
+
+void AnimationManager::clearAll() {
+ initAnimBqe();
+}
+
+/**
+ * Play Animation
+ * @param filename Filename of animation to play
+ * @param rate1 Delay amount before starting animation
+ * @param rate2 Delay amount between animation frames
+ * @param rate3 Delay amount after animation finishes
+ */
+void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, uint32 rate2, uint32 rate3, bool skipSeqFl) {
+ Common::File f;
+
+ if (_vm->shouldQuit())
+ return;
+
+ _vm->_events->mouseOff();
+
+ byte *screenP = _vm->_graphicsMan->_backBuffer;
+
+ Common::String tmpStr;
+ // The Windows 95 demo only contains the interlaced version of the BOMBE1 and BOMBE2 videos
+ if (_vm->getPlatform() == Common::kPlatformWindows && _vm->getIsDemo() && filename == "BOMBE1A.ANM")
+ tmpStr = "BOMBE1.ANM";
+ else if (_vm->getPlatform() == Common::kPlatformWindows && _vm->getIsDemo() && filename == "BOMBE2A.ANM")
+ tmpStr = "BOMBE2.ANM";
+ else
+ tmpStr = filename;
+ if (!f.open(tmpStr))
+ error("File not found - %s", tmpStr.c_str());
+
+ f.skip(6);
+ f.read(_vm->_graphicsMan->_palette, 800);
+ f.skip(4);
+ size_t nbytes = f.readUint32LE();
+ f.skip(14);
+ f.read(screenP, nbytes);
+
+ if (_clearAnimationFl)
+ _vm->_graphicsMan->clearScreen();
+
+ if (skipSeqFl) {
+ _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette);
+ } else {
+ _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette);
+ _vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ _vm->_graphicsMan->updateScreen();
+ }
+ _vm->_events->_rateCounter = 0;
+ _vm->_events->_escKeyFl = false;
+ _vm->_soundMan->loadAnimSound();
+
+ if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) {
+ // Do pre-animation delay
+ do {
+ if (_vm->_events->_escKeyFl)
+ break;
+
+ _vm->_events->refreshEvents();
+ } while (!_vm->shouldQuit() && _vm->_events->_rateCounter < rate1);
+ }
+
+ if (!_vm->_events->_escKeyFl) {
+ _vm->_events->_rateCounter = 0;
+ int frameNumber = 0;
+ while (!_vm->shouldQuit()) {
+ ++frameNumber;
+ _vm->_soundMan->playAnimSound(frameNumber);
+
+ byte imageStr[17];
+ // Read frame header
+ if (f.read(imageStr, 16) != 16)
+ break;
+ imageStr[16] = 0;
+ if (strncmp((const char *)imageStr, "IMAGE=", 6))
+ break;
+
+ f.read(screenP, READ_LE_UINT32(imageStr + 8));
+
+ if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) {
+ do {
+ if (_vm->_events->_escKeyFl)
+ break;
+
+ _vm->_events->refreshEvents();
+ _vm->_soundMan->checkSoundEnd();
+ } while (!_vm->shouldQuit() && _vm->_events->_rateCounter < rate2);
+ }
+
+ if (!_vm->_events->_escKeyFl) {
+ _vm->_events->_rateCounter = 0;
+ if (*screenP != kByteStop)
+ _vm->_graphicsMan->copyVideoVbe16(screenP);
+
+ _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ _vm->_graphicsMan->updateScreen();
+ _vm->_soundMan->checkSoundEnd();
+ }
+ }
+ }
+
+ if (_vm->_globals->_eventMode == EVENTMODE_IGNORE && !_vm->_events->_escKeyFl) {
+ // Do post-animation delay
+ do {
+ if (_vm->_events->_escKeyFl)
+ break;
+
+ _vm->_events->refreshEvents();
+ _vm->_soundMan->checkSoundEnd();
+ } while (_vm->_events->_rateCounter < rate3);
+ }
+
+ if (!_vm->_events->_escKeyFl) {
+ _vm->_events->_rateCounter = 0;
+ _vm->_soundMan->checkSoundEnd();
+ }
+
+ if (_vm->_graphicsMan->_fadingFl) {
+ byte *screenCopy = _vm->_globals->allocMemory(307200);
+
+ f.seek(6);
+ f.read(_vm->_graphicsMan->_palette, 800);
+ f.skip(4);
+ nbytes = f.readUint32LE();
+ f.skip(14);
+ f.read(screenP, nbytes);
+
+ memcpy(screenCopy, screenP, 307200);
+
+ for (;;) {
+ byte imageStr[17];
+ if (f.read(imageStr, 16) != 16)
+ break;
+ imageStr[16] = 0;
+
+ if (strncmp((const char *)imageStr, "IMAGE=", 6))
+ break;
+
+ f.read(screenP, READ_LE_UINT32(imageStr + 8));
+ if (*screenP != kByteStop)
+ _vm->_graphicsMan->copyWinscanVbe3(screenP, screenCopy);
+ }
+ _vm->_graphicsMan->fadeOutDefaultLength(screenCopy);
+ _vm->_globals->freeMemory(screenCopy);
+ }
+
+ _vm->_graphicsMan->_fadingFl = false;
+ f.close();
+ _vm->_graphicsMan->_skipVideoLockFl = false;
+
+ _vm->_events->mouseOn();
+}
+
+/**
+ * Play Animation, type 2
+ */
+void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, uint32 rate2, uint32 rate3) {
+ int oldScrollPosX = 0;
+ byte *screenP = NULL;
+ Common::File f;
+
+ if (_vm->shouldQuit())
+ return;
+
+ _vm->_events->mouseOff();
+
+ while (!_vm->shouldQuit()) {
+ memcpy(_vm->_graphicsMan->_oldPalette, _vm->_graphicsMan->_palette, 769);
+
+ _vm->_graphicsMan->backupScreen();
+
+ if (!_vm->_graphicsMan->_lineNbr)
+ _vm->_graphicsMan->_scrollOffset = 0;
+
+ screenP = _vm->_graphicsMan->_backBuffer;
+ if (!f.open(filename))
+ error("Error opening file - %s", filename.c_str());
+
+ f.skip(6);
+ f.read(_vm->_graphicsMan->_palette, 800);
+ f.skip(4);
+ size_t nbytes = f.readUint32LE();
+ f.skip(14);
+
+ f.read(screenP, nbytes);
+
+ _vm->_graphicsMan->clearPalette();
+ oldScrollPosX = _vm->_graphicsMan->_scrollPosX;
+ _vm->_graphicsMan->setScreenWidth(SCREEN_WIDTH);
+ _vm->_graphicsMan->scrollScreen(0);
+ _vm->_graphicsMan->clearScreen();
+ _vm->_graphicsMan->_maxX = SCREEN_WIDTH;
+
+ _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette);
+ _vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ _vm->_graphicsMan->updateScreen();
+
+ _vm->_events->_rateCounter = 0;
+ _vm->_events->_escKeyFl = false;
+ _vm->_soundMan->loadAnimSound();
+ if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) {
+ while (!_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate1) {
+ _vm->_events->refreshEvents();
+ }
+ }
+ break;
+ }
+
+ if (!_vm->_events->_escKeyFl) {
+ _vm->_events->_rateCounter = 0;
+ int frameNumber = 0;
+ for (;;) {
+ if (_vm->_events->_escKeyFl)
+ break;
+ ++frameNumber;
+ _vm->_soundMan->playAnimSound(frameNumber);
+ byte imageStr[17];
+ if (f.read(imageStr, 16) != 16)
+ break;
+ imageStr[16] = 0;
+
+ if (strncmp((const char *)imageStr, "IMAGE=", 6))
+ break;
+
+ f.read(screenP, READ_LE_UINT32(imageStr + 8));
+ if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) {
+ while (!_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate2) {
+ _vm->_events->refreshEvents();
+ _vm->_soundMan->checkSoundEnd();
+ }
+ }
+
+ _vm->_events->_rateCounter = 0;
+ if (*screenP != kByteStop)
+ _vm->_graphicsMan->copyVideoVbe16(screenP);
+
+ _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ _vm->_graphicsMan->updateScreen();
+ _vm->_soundMan->checkSoundEnd();
+ }
+
+ if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) {
+ while (!_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate3) {
+ _vm->_events->refreshEvents();
+ _vm->_soundMan->checkSoundEnd();
+ }
+ }
+ }
+
+ _vm->_graphicsMan->_skipVideoLockFl = false;
+ f.close();
+
+ if (_vm->_graphicsMan->_fadingFl) {
+ f.seek(6);
+ f.read(_vm->_graphicsMan->_palette, 800);
+ f.skip(4);
+ size_t nbytes = f.readUint32LE();
+ f.skip(14);
+ f.read(screenP, nbytes);
+ byte *ptra = _vm->_globals->allocMemory(307200);
+ memcpy(ptra, screenP, 307200);
+
+ for (;;) {
+ byte imageStr[17];
+ if (f.read(imageStr, 16) != 16)
+ break;
+ imageStr[16] = 0;
+
+ if (strncmp((const char *)imageStr, "IMAGE=", 6))
+ break;
+
+ f.read(screenP, READ_LE_UINT32(imageStr + 8));
+ if (*screenP != kByteStop)
+ _vm->_graphicsMan->copyWinscanVbe3(screenP, ptra);
+ }
+ _vm->_graphicsMan->fadeOutDefaultLength(ptra);
+ ptra = _vm->_globals->freeMemory(ptra);
+ }
+ _vm->_graphicsMan->_fadingFl = false;
+
+ _vm->_graphicsMan->restoreScreen();
+
+ memcpy(_vm->_graphicsMan->_palette, _vm->_graphicsMan->_oldPalette, 769);
+ _vm->_graphicsMan->clearPalette();
+ _vm->_graphicsMan->clearScreen();
+
+ _vm->_graphicsMan->_scrollPosX = oldScrollPosX;
+ _vm->_graphicsMan->scrollScreen(oldScrollPosX);
+ if (_vm->_graphicsMan->_largeScreenFl) {
+ _vm->_graphicsMan->setScreenWidth(2 * SCREEN_WIDTH);
+ _vm->_graphicsMan->_maxX = 2 * SCREEN_WIDTH;
+ _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_frontBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ } else {
+ _vm->_graphicsMan->setScreenWidth(SCREEN_WIDTH);
+ _vm->_graphicsMan->_maxX = SCREEN_WIDTH;
+ _vm->_graphicsMan->clearScreen();
+ _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_frontBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ }
+ _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+
+ _vm->_graphicsMan->fadeInShort();
+ _vm->_graphicsMan->updateScreen();
+
+ _vm->_events->mouseOn();
+}
+
+/**
+ * Load Animation
+ */
+void AnimationManager::loadAnim(const Common::String &animName) {
+ clearAnim();
+
+ Common::String filename = animName + ".ANI";
+ Common::File f;
+ if (!f.open(filename))
+ error("Failed to open %s", filename.c_str());
+
+ int filesize = f.size();
+ int nbytes = filesize - 115;
+
+ char header[10];
+ char dummyBuf[15];
+ char filename1[15];
+ char filename2[15];
+ char filename3[15];
+ char filename4[15];
+ char filename5[15];
+ char filename6[15];
+
+ f.read(header, 10);
+ f.read(dummyBuf, 15);
+ f.read(filename1, 15);
+ f.read(filename2, 15);
+ f.read(filename3, 15);
+ f.read(filename4, 15);
+ f.read(filename5, 15);
+ f.read(filename6, 15);
+
+ if (READ_BE_UINT32(header) != MKTAG('A', 'N', 'I', 'S'))
+ error("Invalid animation File: %s", filename.c_str());
+
+ const char *files[6] = { &filename1[0], &filename2[0], &filename3[0], &filename4[0],
+ &filename5[0], &filename6[0] };
+
+ for (int idx = 0; idx <= 5; ++idx) {
+ if (files[idx][0]) {
+ if (!f.exists(files[idx]))
+ error("Missing file %s in animation File: %s", files[idx], filename.c_str());
+ if (loadSpriteBank(idx + 1, files[idx]))
+ error("Invalid sprite bank in animation File: %s", filename.c_str());
+ }
+ }
+
+ byte *data = _vm->_globals->allocMemory(nbytes + 1);
+ f.read(data, nbytes);
+ f.close();
+
+ for (int idx = 1; idx <= 20; ++idx)
+ searchAnim(data, idx, nbytes);
+
+ _vm->_globals->freeMemory(data);
+}
+
+/**
+ * Clear animation
+ */
+void AnimationManager::clearAnim() {
+ for (int idx = 0; idx < 35; ++idx) {
+ _animBqe[idx]._data = _vm->_globals->freeMemory(_animBqe[idx]._data);
+ _animBqe[idx]._enabledFl = false;
+ }
+
+ for (int idx = 0; idx < 8; ++idx) {
+ Bank[idx]._data = _vm->_globals->freeMemory(Bank[idx]._data);
+ Bank[idx]._loadedFl = false;
+ Bank[idx]._filename = "";
+ Bank[idx]._fileHeader = 0;
+ }
+}
+
+/**
+ * Load Sprite Bank
+ */
+int AnimationManager::loadSpriteBank(int idx, const Common::String &filename) {
+ int result = 0;
+ Bank[idx]._loadedFl = true;
+ Bank[idx]._filename = filename;
+
+ byte *fileDataPtr = _vm->_fileIO->loadFile(filename);
+
+ Bank[idx]._fileHeader = 0;
+ if (fileDataPtr[1] == 'L' && fileDataPtr[2] == 'E')
+ Bank[idx]._fileHeader = 1;
+ else if (fileDataPtr[1] == 'O' && fileDataPtr[2] == 'R')
+ Bank[idx]._fileHeader = 2;
+
+ if (!Bank[idx]._fileHeader) {
+ _vm->_globals->freeMemory(fileDataPtr);
+ Bank[idx]._loadedFl = false;
+ result = -1;
+ }
+
+ Bank[idx]._data = fileDataPtr;
+
+ int objectDataIdx = 0;
+ for(objectDataIdx = 0; objectDataIdx <= 249; objectDataIdx++) {
+ int width = _vm->_objectsMan->getWidth(fileDataPtr, objectDataIdx);
+ int height = _vm->_objectsMan->getHeight(fileDataPtr, objectDataIdx);
+ if (!width && !height)
+ break;
+ }
+
+ if (objectDataIdx > 249) {
+ _vm->_globals->freeMemory(fileDataPtr);
+ Bank[idx]._loadedFl = false;
+ result = -2;
+ }
+ Bank[idx]._objDataIdx = objectDataIdx;
+
+ Common::String ofsFilename = Bank[idx]._filename;
+ char ch;
+ do {
+ ch = ofsFilename.lastChar();
+ ofsFilename.deleteLastChar();
+ } while (ch != '.');
+ ofsFilename += ".OFS";
+
+ Common::File f;
+ if (f.exists(ofsFilename)) {
+ byte *ofsData = _vm->_fileIO->loadFile(ofsFilename);
+ byte *curOfsData = ofsData;
+ for (int objIdx = 0; objIdx < Bank[idx]._objDataIdx; ++objIdx, curOfsData += 8) {
+ int x1 = READ_LE_INT16(curOfsData);
+ int y1 = READ_LE_INT16(curOfsData + 2);
+ int x2 = READ_LE_INT16(curOfsData + 4);
+ int y2 = READ_LE_INT16(curOfsData + 6);
+
+ _vm->_objectsMan->setOffsetXY(Bank[idx]._data, objIdx, x1, y1, 0);
+ if (Bank[idx]._fileHeader == 2)
+ _vm->_objectsMan->setOffsetXY(Bank[idx]._data, objIdx, x2, y2, 1);
+ }
+
+ _vm->_globals->freeMemory(ofsData);
+ result = 0;
+ }
+
+ return result;
+}
+
+/**
+ * Search Animation
+ */
+void AnimationManager::searchAnim(const byte *data, int animIndex, int bufSize) {
+ for (int dataIdx = 0; dataIdx <= bufSize; dataIdx++) {
+ if (READ_BE_UINT32(&data[dataIdx]) == MKTAG('A', 'N', 'I', 'M')) {
+ int entryIndex = data[dataIdx + 4];
+ if (animIndex == entryIndex) {
+ int curBufferPos = dataIdx + 5;
+ int count = 0;
+ bool innerLoopCond = false;
+ do {
+ if (READ_BE_UINT32(&data[curBufferPos]) == MKTAG('A', 'N', 'I', 'M') || READ_BE_UINT24(&data[curBufferPos]) == MKTAG24('F', 'I', 'N'))
+ innerLoopCond = true;
+ if (bufSize < curBufferPos) {
+ _animBqe[animIndex]._enabledFl = false;
+ _animBqe[animIndex]._data = NULL;
+ return;
+ }
+ ++curBufferPos;
+ ++count;
+ } while (!innerLoopCond);
+ _animBqe[animIndex]._data = _vm->_globals->allocMemory(count + 50);
+ _animBqe[animIndex]._enabledFl = true;
+ memcpy(_animBqe[animIndex]._data, data + dataIdx + 5, 20);
+
+ byte *dataP = _animBqe[animIndex]._data;
+ int curDestDataIndx = 20;
+ int curSrcDataIndx = dataIdx + 25;
+
+ for (int i = 0; i <= 4999; i++) {
+ memcpy(dataP + curDestDataIndx, data + curSrcDataIndx, 10);
+ if (!READ_LE_UINT16(data + curSrcDataIndx + 4))
+ break;
+ curDestDataIndx += 10;
+ curSrcDataIndx += 10;
+ }
+ break;
+ }
+ }
+ if (READ_BE_UINT24(&data[dataIdx]) == MKTAG24('F', 'I', 'N'))
+ break;
+ }
+}
+
+/**
+ * Play sequence
+ */
+void AnimationManager::playSequence(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipEscFl, bool skipSeqFl, bool noColFl) {
+ if (_vm->shouldQuit())
+ return;
+
+ _vm->_events->_mouseFl = false;
+ if (!noColFl) {
+ _vm->_events->refreshScreenAndEvents();
+
+ _vm->_graphicsMan->backupScreen();
+
+ if (!_vm->_graphicsMan->_lineNbr)
+ _vm->_graphicsMan->_scrollOffset = 0;
+ }
+ byte *screenP = _vm->_graphicsMan->_backBuffer;
+ Common::File f;
+ if (!f.open(file))
+ error("Error opening file - %s", file.c_str());
+
+ f.skip(6);
+ f.read(_vm->_graphicsMan->_palette, 800);
+ f.skip(4);
+ size_t nbytes = f.readUint32LE();
+ f.skip(14);
+ f.read(screenP, nbytes);
+
+ if (skipSeqFl) {
+ if (!_vm->getIsDemo()) {
+ _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0);
+ }
+ _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette);
+ } else {
+ _vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ _vm->_graphicsMan->updateScreen();
+ }
+ bool skipFl = false;
+ if (noColFl)
+ _vm->_graphicsMan->fadeInDefaultLength(screenP);
+ _vm->_events->_rateCounter = 0;
+ _vm->_events->_escKeyFl = false;
+ _vm->_soundMan->loadAnimSound();
+ if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) {
+ do {
+ if (_vm->shouldQuit() || (_vm->_events->_escKeyFl && !skipEscFl)) {
+ skipFl = true;
+ break;
+ }
+
+ _vm->_events->_escKeyFl = false;
+ _vm->_events->refreshEvents();
+ _vm->_soundMan->checkSoundEnd();
+ } while (_vm->_events->_rateCounter < rate1);
+ }
+ _vm->_events->_rateCounter = 0;
+ if (!skipFl) {
+ int soundNumber = 0;
+ for (;;) {
+ ++soundNumber;
+ _vm->_soundMan->playAnimSound(soundNumber);
+ byte imageStr[17];
+ if (f.read(imageStr, 16) != 16)
+ break;
+ imageStr[16] = 0;
+
+ if (strncmp((const char *)imageStr, "IMAGE=", 6))
+ break;
+
+ f.read(screenP, READ_LE_UINT32(imageStr + 8));
+ if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) {
+ do {
+ if (_vm->shouldQuit() || (_vm->_events->_escKeyFl && !skipEscFl)) {
+ skipFl = true;
+ break;
+ }
+
+ _vm->_events->_escKeyFl = false;
+ _vm->_events->refreshEvents();
+ _vm->_soundMan->checkSoundEnd();
+ } while (_vm->_events->_rateCounter < rate2);
+ }
+
+ if (skipFl)
+ break;
+
+ _vm->_events->_rateCounter = 0;
+ if (*screenP != kByteStop)
+ _vm->_graphicsMan->copyVideoVbe16a(screenP);
+
+ _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ _vm->_graphicsMan->updateScreen();
+ _vm->_soundMan->checkSoundEnd();
+ }
+ }
+
+ if (_vm->_globals->_eventMode == EVENTMODE_IGNORE && !skipFl) {
+ do {
+ if (_vm->shouldQuit() || (_vm->_events->_escKeyFl && !skipEscFl)) {
+ skipFl = true;
+ break;
+ }
+
+ _vm->_events->_escKeyFl = false;
+ _vm->_events->refreshEvents();
+ _vm->_soundMan->checkSoundEnd();
+ } while (_vm->_events->_rateCounter < rate3);
+ }
+
+ if (!skipFl)
+ _vm->_events->_rateCounter = 0;
+
+ _vm->_graphicsMan->_skipVideoLockFl = false;
+ f.close();
+
+ if (!noColFl) {
+ _vm->_graphicsMan->restoreScreen();
+
+ _vm->_events->_mouseFl = true;
+ }
+}
+
+/**
+ * Play Sequence type 2
+ */
+void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipSeqFl) {
+ byte *screenP;
+ int frameNumber;
+ Common::File f;
+
+ for (;;) {
+ if (_vm->shouldQuit())
+ return;
+
+ _vm->_events->_mouseFl = false;
+ screenP = _vm->_graphicsMan->_backBuffer;
+
+ if (!f.open(file))
+ error("File not found - %s", file.c_str());
+
+ f.skip(6);
+ f.read(_vm->_graphicsMan->_palette, 800);
+ f.skip(4);
+ size_t nbytes = f.readUint32LE();
+ f.skip(14);
+ f.read(screenP, nbytes);
+
+ if (skipSeqFl) {
+ _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette);
+ } else {
+ _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette);
+ _vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+
+ _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ _vm->_graphicsMan->updateScreen();
+ }
+ _vm->_events->_rateCounter = 0;
+ _vm->_events->_escKeyFl = false;
+ _vm->_soundMan->loadAnimSound();
+ if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) {
+ do {
+ _vm->_events->refreshEvents();
+ _vm->_soundMan->checkSoundEnd();
+ } while (!_vm->shouldQuit() && !_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate1);
+ }
+ break;
+ }
+
+ if (!_vm->_events->_escKeyFl) {
+ _vm->_events->_rateCounter = 0;
+ frameNumber = 0;
+ while (!_vm->shouldQuit()) {
+ _vm->_soundMan->playAnimSound(frameNumber++);
+
+ byte imageStr[17];
+ if (f.read(imageStr, 16) != 16)
+ break;
+ imageStr[16] = 0;
+
+ if (strncmp((const char *)imageStr, "IMAGE=", 6))
+ break;
+
+ f.read(screenP, READ_LE_UINT32(imageStr + 8));
+ if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) {
+ do {
+ _vm->_events->refreshEvents();
+ } while (!_vm->shouldQuit() && !_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate2);
+ }
+
+ _vm->_events->_rateCounter = 0;
+ if (*screenP != kByteStop)
+ _vm->_graphicsMan->copyVideoVbe16a(screenP);
+
+ _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ _vm->_graphicsMan->updateScreen();
+ _vm->_soundMan->checkSoundEnd();
+ }
+ }
+
+ if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) {
+ // Wait for third rate delay
+ do {
+ _vm->_events->refreshEvents();
+ _vm->_soundMan->checkSoundEnd();
+ } while (!_vm->shouldQuit() && !_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate3);
+ }
+
+ _vm->_events->_rateCounter = 0;
+
+ if (_vm->_graphicsMan->_fadingFl) {
+ byte *ptra = _vm->_globals->allocMemory(307200);
+
+ f.seek(6);
+ f.read(_vm->_graphicsMan->_palette, 800);
+ f.skip(4);
+ size_t nbytes = f.readUint32LE();
+ f.skip(14);
+ f.read(screenP, nbytes);
+
+ memcpy(ptra, screenP, 307200);
+ for (;;) {
+ byte imageStr[17];
+ if (f.read(imageStr, 16) != 16)
+ break;
+ imageStr[16] = 0;
+
+ if (strncmp((const char *)imageStr, "IMAGE=", 6))
+ break;
+
+ f.read(screenP, READ_LE_UINT32(imageStr + 8));
+ if (*screenP != kByteStop)
+ _vm->_graphicsMan->copyWinscanVbe(screenP, ptra);
+ }
+ _vm->_graphicsMan->fadeOutDefaultLength(ptra);
+ ptra = _vm->_globals->freeMemory(ptra);
+ }
+ _vm->_graphicsMan->_fadingFl = false;
+
+ f.close();
+ _vm->_events->_mouseFl = true;
+}
+
+void AnimationManager::initAnimBqe() {
+ for (int idx = 0; idx < 35; ++idx) {
+ _animBqe[idx]._data = NULL;
+ _animBqe[idx]._enabledFl = false;
+ }
+
+ for (int idx = 0; idx < 8; ++idx) {
+ Bank[idx]._data = NULL;
+ Bank[idx]._loadedFl = false;
+ Bank[idx]._filename = "";
+ Bank[idx]._fileHeader = 0;
+ }
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/anim.h b/engines/hopkins/anim.h
new file mode 100644
index 0000000000..22f725681a
--- /dev/null
+++ b/engines/hopkins/anim.h
@@ -0,0 +1,78 @@
+/* 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 HOPKINS_ANIM_H
+#define HOPKINS_ANIM_H
+
+#include "common/scummsys.h"
+#include "common/endian.h"
+#include "common/str.h"
+#include "graphics/surface.h"
+
+namespace Hopkins {
+
+struct BankItem {
+ byte *_data;
+ bool _loadedFl;
+ Common::String _filename;
+ int _fileHeader;
+ int _objDataIdx;
+};
+
+struct BqeAnimItem {
+ byte *_data;
+ bool _enabledFl;
+};
+
+class HopkinsEngine;
+
+class AnimationManager {
+private:
+ bool _clearAnimationFl;
+
+ HopkinsEngine *_vm;
+
+ void initAnimBqe();
+ int loadSpriteBank(int idx, const Common::String &filename);
+ void searchAnim(const byte *data, int animIndex, int count);
+
+public:
+ BqeAnimItem _animBqe[35];
+ BankItem Bank[8];
+
+ AnimationManager(HopkinsEngine *vm);
+ void clearAll();
+
+ void loadAnim(const Common::String &animName);
+ void clearAnim();
+ void playAnim(const Common::String &filename, uint32 rate1, uint32 rate2, uint32 rate3, bool skipSeqFl = false);
+ void playAnim2(const Common::String &filename, uint32 rate1, uint32 rate2, uint32 rate3);
+ void playSequence(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipEscFl, bool skipSeqFl, bool noColFl = false);
+ void playSequence2(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipSeqFl = false);
+
+ void setClearAnimFlag() { _clearAnimationFl = true; }
+ void unsetClearAnimFlag() { _clearAnimationFl = false; }
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_ANIM_H */
diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp
new file mode 100644
index 0000000000..f51e1be494
--- /dev/null
+++ b/engines/hopkins/computer.cpp
@@ -0,0 +1,1222 @@
+/* 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 "hopkins/computer.h"
+
+#include "hopkins/font.h"
+#include "hopkins/files.h"
+#include "hopkins/globals.h"
+#include "hopkins/graphics.h"
+#include "hopkins/hopkins.h"
+#include "hopkins/objects.h"
+
+#include "common/system.h"
+#include "common/file.h"
+#include "common/textconsole.h"
+
+namespace Hopkins {
+
+ComputerManager::ComputerManager(HopkinsEngine *vm) {
+ _vm = vm;
+
+ for (int i = 0; i < 50; i++) {
+ _menuText[i]._actvFl = false;
+ _menuText[i]._lineSize = 0;
+ memset(_menuText[i]._line, 0, 90);
+ }
+ Common::fill(&_inputBuf[0], &_inputBuf[200], '\0');
+ _breakoutSpr = NULL;
+ _textColor = 0;
+ _breakoutLevel = (int16 *)NULL;
+ _breakoutBrickNbr = 0;
+ _breakoutScore = 0;
+ _breakoutLives = 0;
+ _breakoutSpeed = 0;
+ _ballRightFl = false;
+ _ballUpFl = false;
+ _breakoutLevelNbr = 0;
+ _padPositionX = 0;
+ _minBreakoutMoveSpeed = 0;
+ _maxBreakoutMoveSpeed = 0;
+ _lastBreakoutMoveSpeed = 0;
+ _breakoutHiscore = 0;
+}
+
+/**
+ * Sets up textual entry mode. Used by the code for Hopkins computer.
+ */
+void ComputerManager::setVideoMode() {
+ setTextMode();
+}
+
+/**
+ * Sets up Textual entry mode
+ */
+void ComputerManager::setTextMode() {
+ _vm->_graphicsMan->clearPalette();
+ _vm->_graphicsMan->clearScreen();
+
+ _vm->_graphicsMan->_lineNbr = SCREEN_WIDTH;
+ _vm->_fontMan->_font = _vm->_globals->freeMemory(_vm->_fontMan->_font);
+
+ Common::String filename = "STFONT.SPR";
+ Common::File f;
+ if (!f.exists(filename))
+ filename = "FONTE.SPR"; // Used by the BeOS and OS/2 versions as an alternative
+ _vm->_fontMan->_font = _vm->_fileIO->loadFile(filename);
+ _vm->_fontMan->_fontFixedWidth = 8;
+ _vm->_fontMan->_fontFixedHeight = 8;
+
+ _vm->_graphicsMan->loadImage("WINTEXT");
+ _vm->_graphicsMan->fadeInLong();
+ loadMenu();
+ _vm->_events->_mouseFl = false;
+}
+
+/**
+ * Clear the screen
+ */
+void ComputerManager::clearScreen() {
+ _vm->_graphicsMan->loadImage("WINTEXT");
+ _vm->_graphicsMan->fadeInLong();
+}
+
+/**
+ * Sets the text mode color
+ */
+void ComputerManager::setTextColor(int col) {
+ _textColor = col;
+}
+
+/**
+ * Sets the text position.
+ * @param yp Y position
+ * @param xp X position
+ * @remarks Yes, the reverse co-ordinate pair is really like that in the original game.
+ */
+void ComputerManager::setTextPosition(int yp, int xp) {
+ _textPosition.x = xp << 3;
+ _textPosition.y = yp << 4;
+}
+
+/**
+ * Show a computer in the FBI office
+ * @param mode Which computer to display
+ */
+void ComputerManager::showComputer(ComputerEnum mode) {
+ _vm->_events->_escKeyFl = false;
+ _vm->_graphicsMan->resetDirtyRects();
+ setVideoMode();
+ setTextColor(4);
+ setTextPosition(2, 4);
+ if (mode == COMPUTER_HOPKINS)
+ outText(Common::String(_menuText[0]._line));
+ else if (mode == COMPUTER_SAMANTHA)
+ outText(Common::String(_menuText[1]._line));
+ else // COMPUTER_PUBLIC
+ outText(Common::String(_menuText[2]._line));
+
+ setTextColor(1);
+ if (mode == COMPUTER_PUBLIC) {
+ setTextPosition(10, 8);
+ outText(Common::String(_menuText[3]._line));
+ }
+ setTextPosition(12, 28);
+ outText(Common::String(_menuText[4]._line));
+ setTextPosition(14, 35);
+
+ displayMessage(280, 224, 8);
+ bool passwordMatch = false;
+ if ((mode == COMPUTER_HOPKINS) && !strcmp(_inputBuf, "HOPKINS"))
+ passwordMatch = true;
+ else if ((mode == COMPUTER_SAMANTHA) && !strcmp(_inputBuf, "328MHZA"))
+ passwordMatch = true;
+ else if ((mode == COMPUTER_PUBLIC) && !strcmp(_inputBuf, "ALLFREE"))
+ passwordMatch = true;
+
+ if (passwordMatch) {
+ while (!_vm->shouldQuit()) {
+ _vm->_events->_escKeyFl = false;
+ clearScreen();
+ setTextColor(4);
+ setTextPosition(2, 4);
+ if (mode == COMPUTER_HOPKINS)
+ outText(Common::String(_menuText[0]._line));
+ else if (mode == COMPUTER_SAMANTHA)
+ outText(Common::String(_menuText[1]._line));
+ else if (mode == COMPUTER_PUBLIC)
+ outText(Common::String(_menuText[2]._line));
+ setTextColor(15);
+ setTextPosition(8, 25);
+ setTextColor(15);
+ outText2(Common::String(_menuText[6]._line));
+ setTextPosition(20, 25);
+ outText2(Common::String(_menuText[7]._line));
+ if (mode == COMPUTER_HOPKINS) {
+ setTextPosition(10, 25);
+ outText2(Common::String(_menuText[8]._line));
+ setTextPosition(12, 25);
+ outText2(Common::String(_menuText[9]._line));
+ setTextPosition(14, 25);
+ outText2(Common::String(_menuText[10]._line));
+ setTextPosition(16, 25);
+ outText2(Common::String(_menuText[11]._line));
+ } else if (mode == COMPUTER_SAMANTHA) {
+ setTextPosition(10, 25);
+// outText2(Common::String(_menuText[0x95A])); <=== CHECKME: Unexpected value! replaced by the following line, for consistancy
+ outText2(Common::String(_menuText[12]._line));
+ setTextPosition(12, 25);
+ outText2(Common::String(_menuText[13]._line));
+ setTextPosition(14, 25);
+ outText2(Common::String(_menuText[14]._line));
+ setTextPosition(16, 25);
+ outText2(Common::String(_menuText[15]._line));
+ setTextPosition(18, 25);
+ outText2(Common::String(_menuText[16]._line));
+ }
+
+ bool numericFlag = false;
+ char keyPressed;
+ do {
+ keyPressed = _vm->_events->waitKeyPress();
+ if (_vm->shouldQuit())
+ return;
+
+ if ((keyPressed >= '0') && (keyPressed <= '9'))
+ numericFlag = true;
+ } while (!numericFlag);
+
+ // 0 - Quit
+ if (keyPressed == '0')
+ break;
+ // 1 - Games
+ if (keyPressed == '1') {
+ displayGamesSubMenu();
+ } else if (mode == COMPUTER_HOPKINS) {
+ clearScreen();
+ setTextColor(4);
+ setTextPosition(2, 4);
+ outText(Common::String(_menuText[0]._line));
+ setTextColor(15);
+ switch (keyPressed) {
+ case '2':
+ readText(1);
+ break;
+ case '3':
+ readText(2);
+ break;
+ case '4':
+ readText(3);
+ break;
+ case '5':
+ readText(4);
+ break;
+ }
+ } else if (mode == COMPUTER_SAMANTHA) {
+ clearScreen();
+ setTextColor(4);
+ setTextPosition(2, 4);
+ outText(Common::String(_menuText[1]._line));
+ setTextColor(15);
+ switch (keyPressed) {
+ case '2':
+ readText(6);
+ break;
+ case '3':
+ readText(7);
+ break;
+ case '4':
+ readText(8);
+ break;
+ case '5':
+ readText(9);
+ break;
+ case '6':
+ readText(10);
+ _vm->_globals->_saveData->_data[svField270] = 4;
+ break;
+ }
+ }
+ }
+ _vm->_graphicsMan->clearScreen();
+ _vm->_graphicsMan->updateScreen();
+ restoreFBIRoom();
+ } else {
+ // Password doesn't match - Access Denied
+ setTextColor(4);
+ setTextPosition(16, 25);
+ outText(Common::String(_menuText[5]._line));
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_events->delay(1000);
+
+ memset(_vm->_graphicsMan->_frontBuffer, 0, 307199);
+ _vm->_graphicsMan->clearScreen();
+ _vm->_graphicsMan->updateScreen();
+ restoreFBIRoom();
+ _vm->_events->mouseOff();
+ }
+
+ if (mode == COMPUTER_HOPKINS)
+ _vm->_globals->_exitId = 13;
+ else // Free access or Samantha
+ _vm->_globals->_exitId = 14;
+
+ _vm->_graphicsMan->resetDirtyRects();
+}
+
+static const char _englishText[] =
+"% ****** FBI COMPUTER NUMBER 4985 ****** J.HOPKINS COMPUTER ******\n"
+"% ****** FBI COMPUTER NUMBER 4998 ****** S.COLLINS COMPUTER ******\n"
+"% ****** FBI COMPUTER NUMBER 4997 ****** ACCES FREE COMPUTER ******\n"
+"% PASSWORD IS: ALLFREE\n% ENTER CURRENT PASSWORD\n"
+"% ****** ACCES DENIED ******\n"
+"% 1) *** GAME ***\n"
+"% 0) QUIT COMPUTER\n"
+"% 2) STRANGE CADAVER\n"
+"% 3) STRANGE CADAVER\n"
+"% 4) SENATOR FERGUSSON\n"
+"% 5) DOG KILLER\n"
+"% 2) SCIENTIST KIDNAPPED.\n"
+"% 3) SCIENTIST KIDNAPPED (next).\n"
+"% 4) SCIENTIST KIDNAPPED (next).\n"
+"% 5) SCIENTIST KIDNAPPED (next).\n"
+"% 6) SCIENTIST KIDNAPPED (next).\n"
+"%% fin\n";
+
+static const char _frenchText[] =
+"% ****** FBI COMPUTER NUMBER 4985 ****** J.HOPKINS COMPUTER ******\n"
+"% ****** FBI COMPUTER NUMBER 4998 ****** S.COLLINS COMPUTER ******\n"
+"% ****** FBI COMPUTER NUMBER 4997 ****** ACCES FREE COMPUTER ******\n"
+"% PASSWORD IS: ALLFREE\n"
+"% ENTER CURRENT PASSWORD\n"
+"% ****** ACCES DENIED ******\n"
+"% 1) *** CASSE BRIQUE ***\n"
+"% 0) QUITTER L'ORDINATEUR\n"
+"% 2) CADAVRE SANS TETE\n"
+"% 3) CADAVRE SANS TETE\n"
+"% 4) AGRESSION DU SENATEUR\n"
+"% 5) LES CHIENS TUEURS\n"
+"% 2) DISPARITIONS DE CHERCHEURS.\n"
+"% 3) DISPARITIONS (suite).\n"
+"% 4) DISPARITIONS (suite).\n"
+"% 5) DISPARITIONS (suite).\n"
+"% 6) DISPARITIONS (suite).\n"
+"%% fin\n";
+
+static const char _spanishText[] =
+"% **** ORDENADOR DEL FBI NUMERO 4985 **** ORDENADOR J.HOPKINS *****\n"
+"% **** ORDENADOR DEL FBI NUMERO 4998 **** ORDENADOR S.COLLINS *****\n"
+"% *** ORDENADOR DEL FBI NUMERO 4997 *** ORDENADOR DE ACCESO LIBRE ***\n"
+"% LA CONTRASEЅA ES: ALLFREE\n"
+"% ESCRIBE CONTRASEЅA ACTUAL\n"
+"% **** ACCESO DENEGADO ****\n"
+"% 1) *** JUEGO ***\n"
+"% 0) SALIR DEL ORDENADOR\n"
+"% 2) CADAVER EXTRAЅO\n"
+"% 3) CADAVER EXTRAЅO\n"
+"% 4) SENADOR FERGUSSON\n"
+"% 5) MATAPERROS\n"
+"% 2) CIENTIFICO SECUESTRADO.\n"
+"% 3) CIENTIFICO SECUESTRADO (siguiente).\n"
+"% 4) CIENTIFICO SECUESTRADO (siguiente).\n"
+"% 5) CIENTIFICO SECUESTRADO (siguiente).\n"
+"% 6) CIENTIFICO SECUESTRADO (siguiente).\n"
+"%% fin\n";
+
+/**
+ * Load Menu data
+ */
+void ComputerManager::loadMenu() {
+ char *ptr;
+ if (_vm->_fileIO->fileExists("COMPUTAN.TXT")) {
+ ptr = (char *)_vm->_fileIO->loadFile("COMPUTAN.TXT");
+ } else if (_vm->_globals->_language == LANG_FR) {
+ ptr = (char *)_vm->_globals->allocMemory(sizeof(_frenchText));
+ strcpy(ptr, _frenchText);
+ } else if (_vm->_globals->_language == LANG_SP) {
+ ptr = (char *)_vm->_globals->allocMemory(sizeof(_spanishText));
+ strcpy(ptr, _spanishText);
+ } else {
+ ptr = (char *)_vm->_globals->allocMemory(sizeof(_englishText));
+ strcpy(ptr, _englishText);
+ }
+
+ char *tmpPtr = ptr;
+ int lineNum = 0;
+ int strPos;
+ bool loopCond = false;
+
+ do {
+ if (tmpPtr[0] == '%') {
+ if (tmpPtr[1] == '%') {
+ loopCond = true;
+ break;
+ }
+ _menuText[lineNum]._actvFl = 1;
+ strPos = 0;
+ while (strPos <= 89) {
+ char curChar = tmpPtr[strPos + 2];
+ if (curChar == '%' || curChar == 10)
+ break;
+ _menuText[lineNum]._line[strPos++] = curChar;
+ }
+ if (strPos <= 89) {
+ _menuText[lineNum]._line[strPos] = 0;
+ _menuText[lineNum]._lineSize = strPos - 1;
+ }
+ ++lineNum;
+ }
+ ++tmpPtr;
+ } while (!loopCond);
+ _vm->_globals->freeMemory((byte *)ptr);
+}
+
+void ComputerManager::displayMessage(int xp, int yp, int textIdx) {
+ char curChar;
+
+ int x1 = xp;
+ int x2 = 0;
+
+ int textIndex = 0;
+ bool oldMouseFlag = _vm->_events->_mouseFl;
+ _vm->_events->_mouseFl = false;
+
+ _vm->_fontMan->displayTextVesa(xp, yp, "_", 252);
+ do {
+ curChar = _vm->_events->waitKeyPress();
+ if (_vm->shouldQuit())
+ return;
+
+ char mappedChar = '*';
+
+ if ((curChar == '-') || ((curChar >= '0') && (curChar <= '9')) || ((curChar >= 'A') && (curChar <= 'Z')))
+ mappedChar = curChar;
+ else if ((curChar >= 'a') && (curChar <= 'z'))
+ mappedChar = curChar - 32;
+
+ // BackSpace
+ if (curChar == 8 && textIndex > 0) {
+ _inputBuf[textIndex--] = 0;
+ x1 -= _vm->_fontMan->_fontFixedWidth;
+ x2 = x1 + 2 * _vm->_fontMan->_fontFixedWidth;
+ _vm->_graphicsMan->copyRect(_vm->_graphicsMan->_backBuffer, x1, yp, 3 * _vm->_fontMan->_fontFixedWidth, 12, _vm->_graphicsMan->_frontBuffer, x1, yp);
+ _vm->_graphicsMan->addDirtyRect(x1, yp, x2, yp + 12);
+ _vm->_fontMan->displayTextVesa(x1, yp, "_", 252);
+ }
+ if (mappedChar != '*') {
+ char newChar = mappedChar;
+ _vm->_graphicsMan->copyRect(_vm->_graphicsMan->_backBuffer, x1, yp, _vm->_fontMan->_fontFixedWidth, 12, _vm->_graphicsMan->_frontBuffer, x1, yp);
+ _vm->_graphicsMan->addDirtyRect(x1, yp, _vm->_fontMan->_fontFixedWidth + x1, yp + 12);
+ _inputBuf[textIndex] = newChar;
+
+ Common::String charString = Common::String::format("%c_", newChar);
+ _vm->_fontMan->displayTextVesa(x1, yp, charString, 252);
+ ++textIndex;
+ x1 += _vm->_fontMan->_fontFixedWidth;
+ }
+ _vm->_events->refreshScreenAndEvents();
+ } while (textIndex != textIdx && curChar != 13);
+
+ _vm->_graphicsMan->copyRect(_vm->_graphicsMan->_backBuffer, x1, yp, _vm->_fontMan->_fontFixedWidth, 12, _vm->_graphicsMan->_frontBuffer, x1, yp);
+ _vm->_graphicsMan->addDirtyRect(x1, yp, _vm->_fontMan->_fontFixedWidth + x1, yp + 12);
+
+ _vm->_events->refreshScreenAndEvents();
+ _inputBuf[textIndex] = 0;
+ _vm->_events->_mouseFl = oldMouseFlag;
+}
+
+/**
+ * Outputs a text string
+ */
+void ComputerManager::outText(const Common::String &msg) {
+ _vm->_fontMan->renderTextDisplay(_textPosition.x, _textPosition.y, msg, _textColor);
+}
+
+/**
+ * Outputs a text string
+ */
+void ComputerManager::outText2(const Common::String &msg) {
+ _vm->_fontMan->displayTextVesa(_textPosition.x, _textPosition.y, msg, _textColor);
+}
+
+/**
+ * Restores the scene for the FBI headquarters room
+ */
+void ComputerManager::restoreFBIRoom() {
+ _vm->_graphicsMan->fadeOutShort();
+
+ _vm->_globals->freeMemory(_vm->_fontMan->_font);
+ _vm->_fontMan->_font = _vm->_fileIO->loadFile("FONTE3.SPR");
+ _vm->_fontMan->_fontFixedWidth = 12;
+ _vm->_fontMan->_fontFixedHeight = 21;
+
+ _vm->_events->_mouseFl = true;
+}
+
+/**
+ * Display texts for the given menu entry
+ */
+void ComputerManager::readText(int idx) {
+ _vm->_events->_escKeyFl = false;
+
+ Common::String filename;
+ if (_vm->_globals->_language == LANG_EN)
+ filename = "THOPKAN.TXT";
+ else if (_vm->_globals->_language == LANG_FR)
+ filename = "THOPK.TXT";
+ else if (_vm->_globals->_language == LANG_SP)
+ filename = "THOPKES.TXT";
+
+ byte *ptr = _vm->_fileIO->loadFile(filename);
+ uint16 fileSize = _vm->_fileIO->fileSize(filename);
+ int pos;
+ for (pos = 0; pos < fileSize; pos++) {
+ if (ptr[pos] == '%') {
+ Common::String numStr = Common::String::format("%c%c", ptr[pos + 1], ptr[pos + 2]);
+ if (idx == atol(numStr.c_str()))
+ break;
+ }
+ }
+ if (pos > fileSize - 3)
+ error("Error with Hopkins computer file");
+
+ pos += 3;
+ int lineNum = 5;
+ Common::String curStr = "";
+ byte curChar;
+ do {
+ curChar = ptr[pos];
+ if (curChar == 13) {
+ setTextPosition(lineNum, 1);
+ outText(curStr);
+
+ ++lineNum;
+ _vm->_events->refreshScreenAndEvents();
+ curStr = "";
+ } else if (curChar != '%') {
+ curStr += curChar;
+ }
+ ++pos;
+ assert(pos <= fileSize);
+ } while (curChar != '%');
+
+ _vm->_events->waitKeyPress();
+ ptr = _vm->_globals->freeMemory(ptr);
+}
+
+/**
+ * Display breakout when Games sub-menu is selected
+ */
+void ComputerManager::displayGamesSubMenu() {
+ const byte *oldSpriteData = _vm->_objectsMan->_sprite[0]._spriteData;
+ uint oldSpeed = _vm->_globals->_speed;
+
+ _vm->_globals->_speed = 1;
+ _vm->_events->changeMouseCursor(0);
+ _breakoutSpr = NULL;
+ _vm->_events->_breakoutFl = true;
+ _breakoutLevel = (int16 *)NULL;
+ _breakoutBrickNbr = 0;
+ _breakoutScore = 0;
+ _breakoutLives = 5;
+ _breakoutSpeed = 1;
+ _ballRightFl = false;
+ _ballUpFl = false;
+ _breakoutLevelNbr = 0;
+ _vm->_graphicsMan->_minY = 0;
+ _vm->_graphicsMan->_maxX = 320;
+ _vm->_graphicsMan->_maxY = 200;
+ _vm->_soundMan->loadSample(1, "SOUND37.WAV");
+ _vm->_soundMan->loadSample(2, "SOUND38.WAV");
+ _vm->_soundMan->loadSample(3, "SOUND39.WAV");
+ _breakoutSpr = _vm->_fileIO->loadFile("CASSE.SPR");
+ loadHiscore();
+ setModeVGA256();
+
+ newLevel();
+ _vm->_graphicsMan->updateScreen();
+
+ playBreakout();
+ _vm->_graphicsMan->resetDirtyRects();
+ _breakoutSpr = _vm->_globals->freeMemory(_breakoutSpr);
+ _breakoutLevel = (int16 *)_vm->_globals->freeMemory((byte *)_breakoutLevel);
+ _vm->_objectsMan->_sprite[0]._spriteData = oldSpriteData;
+
+ _vm->_soundMan->removeSample(1);
+ _vm->_soundMan->removeSample(2);
+ _vm->_soundMan->removeSample(3);
+ _vm->_globals->_speed = oldSpeed;
+ _vm->_events->_breakoutFl = false;
+ setVideoMode();
+ setTextColor(15);
+ clearScreen();
+ _vm->_graphicsMan->_maxX = 680;
+ _vm->_graphicsMan->_minY = 0;
+ _vm->_graphicsMan->_maxY = 460;
+}
+
+/**
+ * Load Highscore from file
+ */
+void ComputerManager::loadHiscore() {
+ byte *ptr = _vm->_globals->allocMemory(100);
+ _vm->_saveLoad->load("HISCORE.DAT", ptr);
+
+ for (int scoreIndex = 0; scoreIndex < 6; ++scoreIndex) {
+ for (int i = 0; i < 5; ++i) {
+ char nextChar = ptr[(16 * scoreIndex) + i];
+ if (!nextChar)
+ nextChar = ' ';
+ _score[scoreIndex]._name += nextChar;
+ }
+
+ for (int i = 0; i < 9; ++i) {
+ char nextChar = ptr[(scoreIndex * 16) + 6 + i];
+ if (!nextChar)
+ nextChar = '0';
+ _score[scoreIndex]._score += nextChar;
+ }
+ }
+
+ _vm->_globals->freeMemory(ptr);
+ _breakoutHiscore = atol(_score[5]._score.c_str());
+}
+
+/**
+ * VGA 256 col
+ */
+void ComputerManager::setModeVGA256() {
+ _vm->_graphicsMan->clearScreen();
+ _vm->_graphicsMan->clearPalette();
+ _vm->_graphicsMan->setScreenWidth(320);
+}
+
+/**
+ * Load new level
+ */
+void ComputerManager::newLevel() {
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->removeSprite(1);
+ ++_breakoutLives;
+ if (_breakoutLives > 11)
+ _breakoutLives = 11;
+ _vm->_graphicsMan->loadVgaImage("CASSEF.PCX");
+ displayLives();
+ _breakoutLevel = (int16 *)_vm->_globals->freeMemory((byte *)_breakoutLevel);
+
+ ++_breakoutLevelNbr;
+ Common::String file;
+ Common::File f;
+ while (!_vm->shouldQuit()) {
+ file = Common::String::format("TAB%d.TAB", _breakoutLevelNbr);
+ if (f.open(file))
+ break;
+
+ _breakoutLevelNbr = 1;
+ }
+ f.close();
+
+ _breakoutLevel = (int16 *)_vm->_fileIO->loadFile(file);
+ displayBricks();
+
+ _vm->_objectsMan->addStaticSprite(_breakoutSpr, Common::Point(150, 192), 0, 13, 0, false, 0, 0);
+ _vm->_objectsMan->addStaticSprite(_breakoutSpr, Common::Point(164, 187), 1, 14, 0, false, 0, 0);
+
+ _ballPosition = Common::Point(164, 187);
+ _padPositionX = 150;
+ _vm->_objectsMan->animateSprite(0);
+ _vm->_objectsMan->animateSprite(1);
+
+ _vm->_events->mouseOn();
+ _vm->_soundMan->playSample(3, 5);
+}
+
+/**
+ * Display bricks in breakout game
+ */
+void ComputerManager::displayBricks() {
+ _breakoutBrickNbr = 0;
+ _breakoutSpeed = 1;
+ int16 *level = _breakoutLevel;
+
+ int cellLeft;
+ int cellTop;
+ int cellType;
+ for (int levelIdx = 0; ; levelIdx += 6) {
+ cellLeft = (int16)FROM_LE_16(level[levelIdx]);
+ if (cellLeft == -1)
+ break;
+ cellTop = FROM_LE_16(level[levelIdx + 1]);
+ cellType = FROM_LE_16(level[levelIdx + 4]);
+
+ if (cellType <= 6)
+ ++_breakoutBrickNbr;
+
+ switch (cellType) {
+ case 1:
+ _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 21);
+ break;
+ case 2:
+ _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 22);
+ break;
+ case 3:
+ _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 17);
+ break;
+ case 4:
+ _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 20);
+ break;
+ case 5:
+ _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 19);
+ break;
+ case 6:
+ _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 18);
+ break;
+ case 31:
+ _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 23);
+ break;
+ }
+ }
+
+ displayScore();
+}
+
+/**
+ * Display Lives in breakout game
+ */
+void ComputerManager::displayLives() {
+ for (int i = 0, xp = 10; i <= 11; i++, xp += 7)
+ _vm->_graphicsMan->fastDisplay2(_breakoutSpr, xp, 10, 15);
+
+ for (int i = 0, xp = 10; i < _breakoutLives - 1; i++, xp += 7)
+ _vm->_graphicsMan->fastDisplay2(_breakoutSpr, xp, 10, 14);
+
+ _vm->_graphicsMan->updateScreen();
+}
+
+/**
+ * Main function for breakout game
+ */
+void ComputerManager::playBreakout() {
+ int lastBreakoutEvent = 0;
+ while (!_vm->shouldQuit()) {
+ while (!_vm->shouldQuit()) {
+ // Set up the racket and ball
+ _vm->_events->mouseOff();
+ _ballPosition = Common::Point(_padPositionX + 14, 187);
+ _vm->_objectsMan->setSpriteY(1, 187);
+ _vm->_objectsMan->setSpriteX(1, _ballPosition.x);
+
+ _vm->_graphicsMan->resetDirtyRects();
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_graphicsMan->fadeInBreakout();
+
+ // Wait for mouse press to start playing
+ do {
+ _padPositionX = _vm->_events->getMouseX();
+ if (_vm->_events->_mousePos.x <= 4)
+ _padPositionX = 5;
+ if (_padPositionX > 282)
+ _padPositionX = 282;
+ _vm->_objectsMan->setSpriteX(0, _padPositionX);
+ _vm->_objectsMan->setSpriteX(1, _padPositionX + 14);
+ _vm->_objectsMan->setSpriteY(1, 187);
+ _vm->_events->refreshScreenAndEvents();
+ } while (!_vm->shouldQuit() && _vm->_events->getMouseButton() != 1);
+
+ _breakoutSpeed = 1;
+ _ballPosition = Common::Point(_padPositionX + 14, 187);
+ _ballRightFl = (_padPositionX > 135);
+ _ballUpFl = false;
+
+ // Play loop
+ do {
+ _vm->_soundMan->checkSounds();
+
+ _padPositionX = _vm->_events->getMouseX();
+ if (_vm->_events->_mousePos.x <= 4)
+ _padPositionX = 5;
+ if (_padPositionX > 282)
+ _padPositionX = 282;
+ _vm->_objectsMan->setSpriteX(0, _padPositionX);
+ lastBreakoutEvent = moveBall();
+ _vm->_events->refreshScreenAndEvents();
+ } while (!_vm->shouldQuit() && !lastBreakoutEvent);
+ if (lastBreakoutEvent != 1)
+ break;
+
+ --_breakoutLives;
+
+ if (_breakoutLives) {
+ displayLives();
+ if (_breakoutLives)
+ continue;
+ }
+
+ _vm->_graphicsMan->fadeOutBreakout();
+ _vm->_events->mouseOn();
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->removeSprite(1);
+ if (_breakoutScore > _breakoutHiscore)
+ getScoreName();
+ if (displayHiscores() != 1)
+ break;
+
+ _breakoutBrickNbr = 0;
+ _breakoutScore = 0;
+ _breakoutLives = 4;
+ _breakoutSpeed = 1;
+ _ballRightFl = false;
+ _ballUpFl = false;
+ _breakoutLevelNbr = 0;
+ loadHiscore();
+ newLevel();
+ }
+ if (lastBreakoutEvent != 2)
+ return;
+ _vm->_graphicsMan->fadeOutBreakout();
+ newLevel();
+ }
+}
+
+/**
+ * Show the high scores for the Breakout game
+ * @return The selected button index: 1 = Game, 2 = Quit
+ */
+int ComputerManager::displayHiscores() {
+ _vm->_graphicsMan->resetDirtyRects();
+ loadHiscore();
+ _vm->_graphicsMan->loadVgaImage("HISCORE.PCX");
+ byte *ptr = _vm->_fileIO->loadFile("ALPHA.SPR");
+ _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0);
+
+ int yp;
+ int xp;
+ // Loop for displaying the scores
+ for (int scoreIndex = 0; scoreIndex <= 5; scoreIndex++) {
+ yp = 19 * scoreIndex;
+ yp += 46;
+
+ // Display the characters of the name
+ for (int i = 0; i <= 5; i++)
+ displayHiscoreLine(ptr, 9 * i + 69, yp, _score[scoreIndex]._name[i]);
+
+ // Display the digits of the score
+ for (int i = 0; i <= 8; i++)
+ displayHiscoreLine(ptr, 9 * i + 199, yp, _score[scoreIndex]._score[i]);
+ }
+
+ _vm->_graphicsMan->fadeInBreakout();
+ _vm->_graphicsMan->resetDirtyRects();
+ int buttonIndex = 0;
+ do {
+ _vm->_events->refreshEvents();
+ xp = _vm->_events->getMouseX();
+ yp = _vm->_events->getMouseY();
+
+ if (_vm->_events->getMouseButton() == 1 && ABS(xp - 79) <= 33 && ABS(yp - 396) <= 13)
+ buttonIndex = 1;
+ else if (_vm->_events->getMouseButton() == 1 && ABS(xp - 583) <= 32 && ABS(yp - 396) <= 13)
+ buttonIndex = 2;
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (!buttonIndex && !_vm->shouldQuit());
+
+ _vm->_events->mouseOff();
+ _vm->_graphicsMan->fadeOutBreakout();
+ _vm->_globals->freeMemory(ptr);
+ return buttonIndex;
+}
+
+/**
+ * Display a screen to enter player name in the case of a new hiscore
+ */
+void ComputerManager::getScoreName() {
+ _vm->_graphicsMan->loadVgaImage("NAME.PCX");
+ _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0);
+ byte *ptr = _vm->_fileIO->loadFile("ALPHA.SPR");
+ _vm->_graphicsMan->fadeInBreakout();
+ for (int strPos = 0; strPos <= 4; strPos++) {
+ displayHiscoreLine(ptr, 9 * strPos + 140, 78, 1);
+
+ char curChar = toupper(_vm->_events->waitKeyPress());
+ if ((curChar < '0') && (curChar > 'Z'))
+ curChar = ' ';
+ if ((curChar > '9') && (curChar < 'A'))
+ curChar = ' ';
+
+ _score[5]._name.setChar(curChar, strPos);
+ displayHiscoreLine(ptr, 9 * strPos + 140, 78, curChar);
+
+ for (int idx = 0; idx < 12; ++idx)
+ _vm->_events->refreshScreenAndEvents();
+ }
+ _score[5]._score = " ";
+
+ char score[16];
+ sprintf(score, "%d", _breakoutScore);
+ int scoreLen = 0;
+ do
+ ++scoreLen;
+ while (score[scoreLen]);
+
+ for (int i = scoreLen, scorePos = 8; i >= 0; i--) {
+ _score[5]._score.setChar(score[i], scorePos--);
+ }
+ _vm->_graphicsMan->fadeOutBreakout();
+ _vm->_globals->freeMemory(ptr);
+ saveScore();
+}
+
+/**
+ * Display current score
+ */
+void ComputerManager::displayScore() {
+ Common::String scoreStr = Common::String::format("%d", _breakoutScore);
+ int strSize = scoreStr.size();
+ for (int i = strSize - 1, idx = 0; i >= 0; i--) {
+ displayScoreChar(idx++, scoreStr[i]);
+ }
+}
+
+/**
+ * Display a character of the score
+ */
+void ComputerManager::displayScoreChar(int charPos, int charDisp) {
+ int xp;
+ switch (charPos) {
+ case 1:
+ xp = 190;
+ break;
+ case 2:
+ xp = 180;
+ break;
+ case 3:
+ xp = 167;
+ break;
+ case 4:
+ xp = 157;
+ break;
+ case 5:
+ xp = 147;
+ break;
+ case 9:
+ xp = 134;
+ break;
+ default:
+ xp = 200;
+ break;
+ }
+
+ int idx = 3;
+ if (charDisp >= '0' && charDisp <= '9')
+ idx = charDisp - 45;
+
+ _vm->_graphicsMan->fastDisplay2(_breakoutSpr, xp, 11, idx);
+}
+
+/**
+ * Save Hiscore in file
+ */
+void ComputerManager::saveScore() {
+ int scores[6];
+ // Load high scores in an array
+ for (int i = 0; i <= 5; i++) {
+ scores[i] = atol(_score[i]._score.c_str());
+ if (!scores[i])
+ scores[i] = 5;
+ }
+
+ int scorePlace[6];
+ // order high scores
+ for (int scorePlaceIdx = 0; scorePlaceIdx <= 5; scorePlaceIdx++) {
+ for(int i = 0;;i++) {
+ int curScore = scores[i];
+ if (curScore && scores[0] <= curScore && scores[1] <= curScore && scores[2] <= curScore && scores[3] <= curScore
+ && scores[4] <= curScore && scores[5] <= curScore) {
+ scorePlace[scorePlaceIdx] = i;
+ scores[i] = 0;
+ break;
+ }
+ }
+ }
+
+ byte *ptr = _vm->_globals->allocMemory(100);
+ memset(ptr, 0, 99);
+ for (int scorePlaceIdx = 0; scorePlaceIdx <= 5; scorePlaceIdx++) {
+ int curBufPtr = 16 * scorePlaceIdx;
+ for (int namePos = 0; namePos <= 4; namePos++) {
+ char curChar = _score[scorePlace[scorePlaceIdx]]._name[namePos];
+ if (!curChar)
+ curChar = ' ';
+ ptr[curBufPtr + namePos] = curChar;
+ };
+
+ ptr[curBufPtr + 5] = 0;
+
+ for (int scorePos = 0; scorePos <= 8; scorePos++) {
+ char curChar = _score[scorePlace[scorePlaceIdx]]._score[scorePos];
+ if (!curChar)
+ curChar = '0';
+ ptr[curBufPtr + 6 + scorePos] = curChar;
+ };
+ ptr[curBufPtr + 15] = 0;
+ }
+
+ _vm->_saveLoad->saveFile("HISCORE.DAT", ptr, 100);
+ _vm->_globals->freeMemory(ptr);
+}
+
+/**
+ * Display parts of the hiscore line
+ */
+void ComputerManager::displayHiscoreLine(const byte *objectData, int x, int y, int curChar) {
+ int idx = 36;
+
+ if (curChar == 100)
+ idx = 0;
+ else if (curChar >= '0' && curChar <= '9')
+ idx = curChar - '0';
+ else if (curChar >= 'A' && curChar <= 'Z')
+ idx = curChar - 'A' + 10;
+ else if (curChar == 1)
+ idx = 37;
+ _vm->_graphicsMan->fastDisplay2(objectData, x, y, idx);
+}
+
+/**
+ * Handle ball moves
+ */
+int ComputerManager::moveBall() {
+ //(signed int)(6.0 * (long double)_vm->getRandomNumber( rand() / 2147483648.0) + 1;
+ // TODO: Figure out random number
+ int randVal = _vm->getRandomNumber(6);
+ switch (_breakoutSpeed) {
+ case 1:
+ _minBreakoutMoveSpeed = 1;
+ _maxBreakoutMoveSpeed = 1;
+ break;
+ case 2:
+ _minBreakoutMoveSpeed = 1;
+ _maxBreakoutMoveSpeed = 2;
+ break;
+ case 3:
+ _minBreakoutMoveSpeed = 2;
+ _maxBreakoutMoveSpeed = 2;
+ break;
+ case 4:
+ _minBreakoutMoveSpeed = 3;
+ _maxBreakoutMoveSpeed = 2;
+ break;
+ }
+
+ int moveSpeed = _minBreakoutMoveSpeed;
+ if (_lastBreakoutMoveSpeed == _minBreakoutMoveSpeed)
+ moveSpeed = _maxBreakoutMoveSpeed;
+
+ if (_ballUpFl)
+ _ballPosition.y += moveSpeed;
+ else
+ _ballPosition.y -= moveSpeed;
+
+ if (_ballRightFl)
+ _ballPosition.x += moveSpeed;
+ else
+ _ballPosition.x -= moveSpeed;
+
+ _lastBreakoutMoveSpeed = moveSpeed;
+ if (_ballPosition.x <= 6) {
+ _vm->_soundMan->playSample(2, 6);
+ _ballPosition.x = randVal + 6;
+ _ballRightFl = !_ballRightFl;
+ } else if (_ballPosition.x > 307) {
+ _vm->_soundMan->playSample(2, 6);
+ _ballPosition.x = 307 - randVal;
+ _ballRightFl = !_ballRightFl;
+ }
+
+ if (_ballPosition.y <= 6) {
+ _vm->_soundMan->playSample(2, 6);
+ _ballPosition.y = randVal + 7;
+ _ballUpFl = !_ballUpFl;
+ } else if (_ballPosition.y >= 186 && _ballPosition.y <= 194) {
+ _vm->_soundMan->playSample(2, 6);
+ int ballPosXRight = _ballPosition.x + 6;
+ if ((_ballPosition.x > _padPositionX - 2) && (ballPosXRight < _padPositionX + 36)) {
+ _ballUpFl = false;
+ if (ballPosXRight <= _padPositionX + 15) {
+ _ballRightFl = false;
+ if (_ballPosition.x >= _padPositionX && ballPosXRight <= _padPositionX + 5)
+ _ballPosition.x -= 4;
+ if (_ballPosition.x >= _padPositionX + 5 && _ballPosition.x + 6 <= _padPositionX + 10)
+ _ballPosition.x -= 2;
+ }
+ if (_ballPosition.x >= _padPositionX + 19 && _ballPosition.x + 6 <= _padPositionX + 36) {
+ _ballRightFl = true;
+ if (_ballPosition.x >= _padPositionX + 29)
+ _ballPosition.x += 4;
+ if (_ballPosition.x >= _padPositionX + 24 && _ballPosition.x + 6 <= _padPositionX + 29)
+ _ballPosition.x += 2;
+ }
+ }
+ }
+
+ int retVal = 0;
+ if (_ballPosition.y > 194)
+ retVal = 1;
+ checkBallCollisions();
+ _vm->_objectsMan->setSpriteX(1, _ballPosition.x);
+ _vm->_objectsMan->setSpriteY(1, _ballPosition.y);
+ if (!_breakoutBrickNbr)
+ retVal = 2;
+ return retVal;
+}
+
+/**
+ * Check ball collision with bricks
+ */
+void ComputerManager::checkBallCollisions() {
+ int cellLeft;
+
+ bool brickDestroyedFl = false;
+ // TODO: Check if correct
+ int randVal = _vm->getRandomNumber(6) + 1;
+ int ballLeft = _ballPosition.x;
+ int ballTop = _ballPosition.y;
+ int ballRight = _ballPosition.x + 6;
+ int ballBottom = _ballPosition.y + 6;
+ int16 *level = _breakoutLevel;
+ uint16 levelIdx = 0;
+ do {
+ cellLeft = level[levelIdx];
+ int cellUp = level[levelIdx + 1];
+ int cellRight = level[levelIdx + 2];
+ int cellBottom = level[levelIdx + 3];
+ int cellType = level[levelIdx + 4];
+ if (level[levelIdx + 5] == 1 && cellLeft != -1) {
+ bool collisionFl = false;
+ if (ballTop <= cellBottom && ballBottom >= cellBottom) {
+ if (ballLeft >= cellLeft && ballRight <= cellRight) {
+ collisionFl = true;
+ _ballUpFl = true;
+ }
+ if ((ballRight >= cellLeft) && (ballLeft <= cellLeft)) {
+ collisionFl = true;
+ _ballUpFl = true;
+ _ballRightFl = false;
+ if (cellType == 31)
+ _ballPosition.x -= randVal;
+ }
+ if ((ballLeft <= cellRight) && (ballRight >= cellRight)) {
+ collisionFl = true;
+ _ballUpFl = true;
+ _ballRightFl = true;
+ if (cellType == 31)
+ _ballPosition.x += randVal;
+ }
+ }
+ if (ballBottom >= cellUp && ballTop <= cellUp) {
+ if (ballLeft >= cellLeft && ballRight <= cellRight) {
+ collisionFl = true;
+ _ballUpFl = false;
+ }
+ if ((ballRight >= cellLeft) && (ballLeft <= cellLeft)) {
+ collisionFl = true;
+ _ballUpFl = false;
+ _ballRightFl = false;
+ if (cellType == 31)
+ _ballPosition.x -= 2;
+ }
+ if ((ballLeft <= cellRight) && (ballRight >= cellRight)) {
+ collisionFl = true;
+ _ballUpFl = false;
+ _ballRightFl = true;
+ if (cellType == 31)
+ _ballPosition.x += randVal;
+ }
+ }
+ if ((ballTop >= cellUp) && (ballBottom <= cellBottom)) {
+ if ((ballRight >= cellLeft) && (ballLeft <= cellLeft)) {
+ collisionFl = true;
+ _ballRightFl = false;
+ if (cellType == 31)
+ _ballPosition.x -= randVal;
+ }
+ if ((ballLeft <= cellRight) && (ballRight >= cellRight)) {
+ collisionFl = true;
+ _ballRightFl = true;
+ if (cellType == 31)
+ _ballPosition.x += randVal;
+ }
+ }
+ if (collisionFl) {
+ if (cellType == 31) {
+ _vm->_soundMan->playSample(2, 6);
+ } else {
+ _vm->_soundMan->playSample(1, 5);
+ _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellUp, 16);
+ switch (cellType) {
+ case 1:
+ _breakoutScore += 10;
+ break;
+ case 2:
+ _breakoutScore += 5;
+ break;
+ case 3:
+ _breakoutScore += 50;
+ if (_breakoutSpeed <= 1)
+ _breakoutSpeed = 2;
+ if (_breakoutBrickNbr <= 19)
+ _breakoutSpeed = 3;
+ break;
+ case 4:
+ _breakoutScore += 20;
+ break;
+ case 5:
+ _breakoutScore += 30;
+ if (_breakoutSpeed <= 1)
+ _breakoutSpeed = 2;
+ break;
+ case 6:
+ _breakoutScore += 40;
+ break;
+ }
+ displayScore();
+ --_breakoutBrickNbr;
+ level[levelIdx + 5] = 0;
+ brickDestroyedFl = true;
+ }
+ }
+ }
+
+ if (brickDestroyedFl)
+ cellLeft = -1;
+ levelIdx += 6;
+ } while (cellLeft != -1);
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/computer.h b/engines/hopkins/computer.h
new file mode 100644
index 0000000000..cdd653f793
--- /dev/null
+++ b/engines/hopkins/computer.h
@@ -0,0 +1,106 @@
+/* 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 HOPKINS_COMPUTER_H
+#define HOPKINS_COMPUTER_H
+
+#include "common/scummsys.h"
+#include "common/str.h"
+#include "common/rect.h"
+
+namespace Hopkins {
+
+class HopkinsEngine;
+
+struct MenuItem {
+ bool _actvFl;
+ int _lineSize;
+ char _line[90];
+};
+
+struct ScoreItem {
+ Common::String _name;
+ Common::String _score;
+};
+
+enum ComputerEnum { COMPUTER_HOPKINS = 1, COMPUTER_SAMANTHA = 2, COMPUTER_PUBLIC = 3 };
+
+class ComputerManager {
+private:
+ HopkinsEngine *_vm;
+ MenuItem _menuText[50];
+ char _inputBuf[200];
+ ScoreItem _score[6];
+ int _textColor;
+ Common::Point _textPosition;
+ Common::Point _ballPosition;
+ byte *_breakoutSpr;
+ int16 *_breakoutLevel;
+ int _breakoutBrickNbr;
+ int _breakoutScore;
+ int _breakoutLives;
+ int _breakoutSpeed;
+ bool _ballRightFl;
+ bool _ballUpFl;
+ int _breakoutLevelNbr;
+ int _padPositionX;
+ int _breakoutHiscore;
+ int _minBreakoutMoveSpeed;
+ int _maxBreakoutMoveSpeed;
+ int _lastBreakoutMoveSpeed;
+
+ void loadMenu();
+ void restoreFBIRoom();
+ void setVideoMode();
+ void setTextMode();
+ void clearScreen();
+ void setTextColor(int col);
+ void setTextPosition(int yp, int xp);
+ void outText(const Common::String &msg);
+ void outText2(const Common::String &msg);
+ void readText(int idx);
+ void loadHiscore();
+ void newLevel();
+ void setModeVGA256();
+ void displayLives();
+ void displayBricks();
+ void displayGamesSubMenu();
+ int displayHiscores();
+ void displayHiscoreLine(const byte *objectData, int x, int y, int curChar);
+ void displayMessage(int xp, int yp, int textIdx);
+ void displayScore();
+ void displayScoreChar(int charPos, int charDisp);
+ void getScoreName();
+ void playBreakout();
+ int moveBall();
+ void saveScore();
+ void checkBallCollisions();
+
+public:
+ ComputerManager(HopkinsEngine *vm);
+
+ void showComputer(ComputerEnum mode);
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_COMPUTER_H */
diff --git a/engines/hopkins/debugger.cpp b/engines/hopkins/debugger.cpp
new file mode 100644
index 0000000000..246270c1c2
--- /dev/null
+++ b/engines/hopkins/debugger.cpp
@@ -0,0 +1,67 @@
+/* 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 "hopkins/debugger.h"
+
+#include "hopkins/globals.h"
+#include "hopkins/graphics.h"
+#include "hopkins/hopkins.h"
+
+namespace Hopkins {
+
+Debugger::Debugger(HopkinsEngine *vm) : GUI::Debugger() {
+ _vm = vm;
+ DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ DCmd_Register("rects", WRAP_METHOD(Debugger, cmd_DirtyRects));
+ DCmd_Register("teleport", WRAP_METHOD(Debugger, cmd_Teleport));
+ DCmd_Register("show_room", WRAP_METHOD(Debugger, cmd_ShowCurrentRoom));
+}
+
+// Turns dirty rects on or off
+bool Debugger::cmd_DirtyRects(int argc, const char **argv) {
+ if (argc != 2) {
+ DebugPrintf("%s: [on | off]\n", argv[0]);
+ return true;
+ } else {
+ _vm->_graphicsMan->_showDirtyRects = !strcmp(argv[1], "on");
+ return false;
+ }
+}
+
+// Change room number
+bool Debugger::cmd_Teleport(int argc, const char **argv) {
+ if (argc != 2) {
+ DebugPrintf("%s: [Room number]\n", argv[0]);
+ return true;
+ } else {
+ _vm->_globals->_exitId = atoi(argv[1]);
+ return false;
+ }
+}
+
+// Display room number
+bool Debugger::cmd_ShowCurrentRoom(int argc, const char **argv) {
+ DebugPrintf("Current room: %d\n", _vm->_globals->_curRoomNum);
+ return true;
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/debugger.h b/engines/hopkins/debugger.h
new file mode 100644
index 0000000000..7f7bffd755
--- /dev/null
+++ b/engines/hopkins/debugger.h
@@ -0,0 +1,48 @@
+/* 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 HOPKINS_DEBUGGER_H
+#define HOPKINS_DEBUGGER_H
+
+#include "common/scummsys.h"
+#include "gui/debugger.h"
+
+namespace Hopkins {
+
+class HopkinsEngine;
+
+class Debugger : public GUI::Debugger {
+private:
+ HopkinsEngine *_vm;
+
+public:
+ Debugger(HopkinsEngine *vm);
+ virtual ~Debugger() {}
+
+ bool cmd_DirtyRects(int argc, const char **argv);
+ bool cmd_Teleport(int argc, const char **argv);
+ bool cmd_ShowCurrentRoom(int argc, const char **argv);
+};
+
+} // End of namespace Hopkins
+
+#endif
diff --git a/engines/hopkins/detection.cpp b/engines/hopkins/detection.cpp
new file mode 100644
index 0000000000..a42597415b
--- /dev/null
+++ b/engines/hopkins/detection.cpp
@@ -0,0 +1,191 @@
+/* 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 "hopkins/hopkins.h"
+
+#include "base/plugins.h"
+#include "common/savefile.h"
+#include "common/str-array.h"
+#include "common/memstream.h"
+#include "engines/advancedDetector.h"
+#include "common/system.h"
+#include "graphics/colormasks.h"
+#include "graphics/surface.h"
+
+#define MAX_SAVES 99
+
+namespace Hopkins {
+
+struct HopkinsGameDescription {
+ ADGameDescription desc;
+};
+
+uint32 HopkinsEngine::getFeatures() const {
+ return _gameDescription->desc.flags;
+}
+
+Common::Language HopkinsEngine::getLanguage() const {
+ return _gameDescription->desc.language;
+}
+
+Common::Platform HopkinsEngine::getPlatform() const {
+ return _gameDescription->desc.platform;
+}
+
+bool HopkinsEngine::getIsDemo() const {
+ return _gameDescription->desc.flags & ADGF_DEMO;
+}
+
+} // End of namespace Hopkins
+
+static const PlainGameDescriptor hopkinsGames[] = {
+ {"hopkins", "Hopkins FBI"},
+ {0, 0}
+};
+
+#include "hopkins/detection_tables.h"
+
+const static char *directoryGlobs[] = {
+ "voice",
+ 0
+};
+
+class HopkinsMetaEngine : public AdvancedMetaEngine {
+public:
+ HopkinsMetaEngine() : AdvancedMetaEngine(Hopkins::gameDescriptions, sizeof(Hopkins::HopkinsGameDescription), hopkinsGames) {
+ _maxScanDepth = 3;
+ _directoryGlobs = directoryGlobs;
+ }
+
+ virtual const char *getName() const {
+ return "Hopkins Engine";
+ }
+
+ virtual const char *getOriginalCopyright() const {
+ return "Hopkins FBI (c)1997-2003 MP Entertainment";
+ }
+
+ virtual bool hasFeature(MetaEngineFeature f) const;
+ virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
+ virtual SaveStateList listSaves(const char *target) const;
+ virtual int getMaximumSaveSlot() const;
+ virtual void removeSaveState(const char *target, int slot) const;
+ SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
+};
+
+bool HopkinsMetaEngine::hasFeature(MetaEngineFeature f) const {
+ return
+ (f == kSupportsListSaves) ||
+ (f == kSupportsLoadingDuringStartup) ||
+ (f == kSupportsDeleteSave) ||
+ (f == kSavesSupportMetaInfo) ||
+ (f == kSavesSupportThumbnail);
+}
+
+bool Hopkins::HopkinsEngine::hasFeature(EngineFeature f) const {
+ return
+ (f == kSupportsRTL) ||
+ (f == kSupportsLoadingDuringRuntime) ||
+ (f == kSupportsSavingDuringRuntime);
+}
+
+bool HopkinsMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
+ const Hopkins::HopkinsGameDescription *gd = (const Hopkins::HopkinsGameDescription *)desc;
+ if (gd) {
+ *engine = new Hopkins::HopkinsEngine(syst, gd);
+ }
+ return gd != 0;
+}
+
+SaveStateList HopkinsMetaEngine::listSaves(const char *target) const {
+ Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
+ Common::StringArray filenames;
+ Common::String saveDesc;
+ Common::String pattern = Common::String::format("%s.0??", target);
+
+ filenames = saveFileMan->listSavefiles(pattern);
+ sort(filenames.begin(), filenames.end()); // Sort to get the files in numerical order
+
+ Hopkins::hopkinsSavegameHeader header;
+
+ SaveStateList saveList;
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ const char *ext = strrchr(file->c_str(), '.');
+ int slot = ext ? atoi(ext + 1) : -1;
+
+ if (slot >= 0 && slot < MAX_SAVES) {
+ Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(*file);
+
+ if (in) {
+ if (Hopkins::SaveLoadManager::readSavegameHeader(in, header)) {
+ saveList.push_back(SaveStateDescriptor(slot, header._saveName));
+
+ header._thumbnail->free();
+ delete header._thumbnail;
+ }
+
+ delete in;
+ }
+ }
+ }
+
+ return saveList;
+}
+
+int HopkinsMetaEngine::getMaximumSaveSlot() const {
+ return MAX_SAVES;
+}
+
+void HopkinsMetaEngine::removeSaveState(const char *target, int slot) const {
+ Common::String filename = Common::String::format("%s.%03d", target, slot);
+ g_system->getSavefileManager()->removeSavefile(filename);
+}
+
+SaveStateDescriptor HopkinsMetaEngine::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) {
+ Hopkins::hopkinsSavegameHeader header;
+ Hopkins::SaveLoadManager::readSavegameHeader(f, header);
+ delete f;
+
+ // Create the return descriptor
+ SaveStateDescriptor desc(slot, header._saveName);
+ desc.setThumbnail(header._thumbnail);
+ desc.setSaveDate(header._year, header._month, header._day);
+ desc.setSaveTime(header._hour, header._minute);
+ desc.setPlayTime(header._totalFrames * GAME_FRAME_TIME);
+
+ return desc;
+ }
+
+ return SaveStateDescriptor();
+}
+
+
+#if PLUGIN_ENABLED_DYNAMIC(HOPKINS)
+REGISTER_PLUGIN_DYNAMIC(HOPKINS, PLUGIN_TYPE_ENGINE, HopkinsMetaEngine);
+#else
+REGISTER_PLUGIN_STATIC(HOPKINS, PLUGIN_TYPE_ENGINE, HopkinsMetaEngine);
+#endif
diff --git a/engines/hopkins/detection_tables.h b/engines/hopkins/detection_tables.h
new file mode 100644
index 0000000000..e1937372d2
--- /dev/null
+++ b/engines/hopkins/detection_tables.h
@@ -0,0 +1,247 @@
+/* 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.
+ *
+ */
+
+namespace Hopkins {
+
+static const HopkinsGameDescription gameDescriptions[] = {
+ {
+ // Hopkins FBI Linux Demo 1.00
+ {
+ "hopkins",
+ "Linux Demo v1.00",
+ {
+ {"Hopkins-PDemo.bin", 0, "88b4d6e14b9b1407083cb3d1213c0fa7", 272027},
+ {"RES_VAN.RES", 0, "29414c05be8f9fe794c61572a65def12", 16060544},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformLinux,
+ ADGF_DEMO,
+ GUIO1(GUIO_NONE)
+ },
+ },
+
+ {
+ // Hopkins FBI Linux Demo 1.02
+ {
+ "hopkins",
+ "Linux Demo v1.02",
+ {
+ {"Hopkins-PDemo.bin", 0, "f82f4e698f3a189419351be0de2b2f8e", 273760},
+ {"RES_VAN.RES", 0, "29414c05be8f9fe794c61572a65def12", 16060544},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformLinux,
+ ADGF_DEMO,
+ GUIO1(GUIO_NONE)
+ },
+ },
+
+ {
+ // Hopkins FBI OS/2, provided by Strangerke
+ {
+ "hopkins",
+ 0,
+ {
+ {"Hopkins.exe", 0, "63d45f882278e5a9fa1027066223e5d9", 292864},
+ {"ENG_VOI.RES", 0, "fa5789d1d8c19d160bce44a33e742fdf", 66860711},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformOS2,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+ {
+ // Hopkins FBI Win95 Demo, provided by Strangerke
+ // CHECKME: No voice! a second file is required though... Also, it has multi-language support
+ {
+ "hopkins",
+ "Win95 Demo",
+ {
+ {"Hopkins.exe", 0, "0c9ebfe371f4dcf84a49f333f04839a0", 376897},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_DEMO,
+ GUIO1(GUIO_NONE)
+ },
+ },
+ {
+ // Hopkins FBI Win95 Polish Demo, provided by Strangerke
+ {
+ "hopkins",
+ "Win95 Demo",
+ {
+ {"Hopkins.exe", 0, "7595c0b9374739b212ee9f8f412ac716", 307200},
+ {"RES_VAN.RES", 0, "8262cfba261c200af4451902689dffe0", 12233202},
+ AD_LISTEND
+ },
+ Common::PL_POL,
+ Common::kPlatformWindows,
+ ADGF_DEMO,
+ GUIO1(GUIO_NONE)
+ },
+ },
+ {
+ // Hopkins FBI Win95 Spanish
+ {
+ "hopkins",
+ 0,
+ {
+ {"Hopkins.exe", 0, "31c837378bb2e0b2573befea44956d3f", 421386},
+ {"RES_VES.RES", 0, "77ee08896466ae88cc1af3bf1a0bf78c", 32882302},
+ AD_LISTEND
+ },
+ Common::ES_ESP,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+ {
+ // Hopkins FBI Win95, provided by Strangerke
+ {
+ "hopkins",
+ 0,
+ {
+ {"Hopkins.exe", 0, "277a5c144bf9ec7d8450ae37afb85090", 419281},
+ {"RES_VAN.RES", 0, "f1693ac0b0859c8ecd8cb30ff43cf55f", 38296346},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+ {
+ // Hopkins FBI Win95, provided by alexbevi
+ // Dec 15 1998 hopkins.exe
+ {
+ "hopkins",
+ 0,
+ {
+ {"Hopkins.exe", 0, "a587762dd50d5933e1c89f9975180764", 378694},
+ {"RES_VAN.RES", 0, "f1693ac0b0859c8ecd8cb30ff43cf55f", 38296346},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+ {
+ // Hopkins FBI Linux, provided by Strangerke
+ {
+ "hopkins",
+ 0,
+ {
+ {"Hopkins.bin", 0, "71611380cb31744bf909b8319a65e6e6", 275844},
+ {"RES_VFR.RES", 0, "0490d4d1aa71075ebf71cc79e5dc7894", 39817945},
+ AD_LISTEND
+ },
+ Common::FR_FRA,
+ Common::kPlatformLinux,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+ {
+ // Hopkins FBI Linux, provided by Strangerke
+ {
+ "hopkins",
+ 0,
+ {
+ {"Hopkins.bin", 0, "71611380cb31744bf909b8319a65e6e6", 275844},
+ {"RES_VAN.RES", 0, "29414c05be8f9fe794c61572a65def12", 38832455},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformLinux,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+
+ {
+ // Hopkins FBI BeOS, provided by Strangerke
+ {
+ "hopkins",
+ 0,
+ {
+ {"ENG_VOI.RES", 0, "fa5789d1d8c19d160bce44a33e742fdf", 66860711},
+ {"Hopkins_ FBI", 0, "8940ce2e618c42691b66aad5d6c223b0", 757936},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformBeOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+
+ {
+ // Hopkins FBI BeOS, uninstalled, provided by eriktorbjorn
+ {
+ "hopkins",
+ 0,
+ {
+ {"ENG_VOI.RES", 0, "fa5789d1d8c19d160bce44a33e742fdf", 66860711},
+ {"Hopkins.pkg", 0, "72f97806dd3d5fc0c0eb24196f180618", 285017},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformBeOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+
+ },
+
+ {
+ // Hopkins FBI Win32, French uninstalled, provided by SylvainTV
+ {
+ "hopkins",
+ 0,
+ {
+ {"Hopkins.exe", 0, "277a5c144bf9ec7d8450ae37afb85090", 419281},
+ {"RES_VFR.RES", 0, "b8a3849063c9eeefe80e82cfce1ad3cd", 39269361},
+ AD_LISTEND
+ },
+ Common::FR_FRA,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+
+ },
+
+
+ { AD_TABLE_END_MARKER }
+};
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp
new file mode 100644
index 0000000000..5b9fb8afc2
--- /dev/null
+++ b/engines/hopkins/dialogs.cpp
@@ -0,0 +1,781 @@
+/* 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 "hopkins/dialogs.h"
+
+#include "hopkins/events.h"
+#include "hopkins/files.h"
+#include "hopkins/globals.h"
+#include "hopkins/graphics.h"
+#include "hopkins/hopkins.h"
+#include "hopkins/sound.h"
+
+#include "common/scummsys.h"
+#include "common/config-manager.h"
+#include "common/events.h"
+#include "common/file.h"
+#include "common/util.h"
+
+namespace Hopkins {
+
+DialogsManager::DialogsManager(HopkinsEngine *vm) {
+ _vm = vm;
+ _inventFl = false;
+ _inventDisplayedFl = false;
+ _removeInventFl = false;
+ _inventX = _inventY = 0;
+ _oldInventX = 0;
+ _inventWidth = _inventHeight = 0;
+ _inventWin1 = NULL;
+ _inventBuf2 = NULL;
+ _inventoryIcons = NULL;
+}
+
+DialogsManager::~DialogsManager() {
+ _vm->_globals->freeMemory(_inventWin1);
+ _vm->_globals->freeMemory(_inventBuf2);
+ _vm->_globals->freeMemory(_inventoryIcons);
+}
+
+void DialogsManager::clearAll() {
+ _inventWin1 = NULL;
+ _inventBuf2 = NULL;
+}
+
+void DialogsManager::loadIcons() {
+ _inventoryIcons = _vm->_fileIO->loadFile("ICONE.SPR");
+}
+
+void DialogsManager::drawInvent(Common::Point oldBorder, int oldBorderSpriteIndex, Common::Point newBorder, int newBorderSpriteIndex) {
+ if (!_inventDisplayedFl)
+ return;
+
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight);
+ if (oldBorder.x && oldBorder.y)
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _inventBuf2, oldBorder.x + 300, oldBorder.y + 300, oldBorderSpriteIndex + 1);
+ if (newBorder.x && newBorder.y)
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _inventBuf2, newBorder.x + 300, newBorder.y + 300, newBorderSpriteIndex);
+ _vm->_graphicsMan->addDirtyRect(_inventX, _inventY, _inventX + _inventWidth, _inventY + _inventHeight);
+}
+
+void DialogsManager::showOptionsDialog() {
+ _vm->_events->changeMouseCursor(0);
+ _vm->_events->refreshScreenAndEvents();
+ Common::String filename;
+ if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS)
+ filename = "OPTION.SPR";
+ else {
+ if (_vm->_globals->_language == LANG_FR)
+ filename = "OPTIFR.SPR";
+ else if (_vm->_globals->_language == LANG_EN)
+ filename = "OPTIAN.SPR";
+ else if (_vm->_globals->_language == LANG_SP)
+ filename = "OPTIES.SPR";
+ }
+
+ _vm->_globals->_optionDialogSpr = _vm->_fileIO->loadFile(filename);
+ _vm->_globals->_optionDialogFl = true;
+
+ int scrollOffset = _vm->_graphicsMan->_scrollOffset;
+ bool doneFlag = false;
+ do {
+ if (_vm->_events->getMouseButton()) {
+ Common::Point mousePos(_vm->_events->getMouseX(), _vm->_events->getMouseY());
+
+ if (!_vm->_soundMan->_musicOffFl) {
+ if (mousePos.x >= scrollOffset + 300 && mousePos.y > 113 && mousePos.x <= scrollOffset + 327 && mousePos.y <= 138) {
+ // Change the music volume
+ ++_vm->_soundMan->_musicVolume;
+
+ if (_vm->_soundMan->_musicVolume <= 12)
+ _vm->_soundMan->playSoundFile("bruit2.wav");
+ else
+ _vm->_soundMan->_musicVolume = 12;
+ _vm->_soundMan->setMODMusicVolume(_vm->_soundMan->_musicVolume);
+
+ _vm->_soundMan->updateScummVMSoundSettings();
+ }
+
+ if (!_vm->_soundMan->_musicOffFl && mousePos.x >= scrollOffset + 331 && mousePos.y > 113 && mousePos.x <= scrollOffset + 358 && mousePos.y <= 138) {
+ --_vm->_soundMan->_musicVolume;
+ if (_vm->_soundMan->_musicVolume >= 0)
+ _vm->_soundMan->playSoundFile("bruit2.wav");
+ else
+ _vm->_soundMan->_musicVolume = 0;
+
+ _vm->_soundMan->setMODMusicVolume(_vm->_soundMan->_musicVolume);
+
+ _vm->_soundMan->updateScummVMSoundSettings();
+ }
+ }
+ if (!_vm->_soundMan->_soundOffFl) {
+ // increase volume
+ if (mousePos.x >= scrollOffset + 300 && mousePos.y > 140 && mousePos.x <= scrollOffset + 327 && mousePos.y <= 165) {
+ ++_vm->_soundMan->_soundVolume;
+ if (_vm->_soundMan->_soundVolume <= 16)
+ _vm->_soundMan->playSoundFile("bruit2.wav");
+ else
+ _vm->_soundMan->_soundVolume = 16;
+ _vm->_soundMan->setMODSampleVolume();
+
+ _vm->_soundMan->updateScummVMSoundSettings();
+ }
+
+ // Decrease volume
+ if (!_vm->_soundMan->_soundOffFl && mousePos.x >= scrollOffset + 331 && mousePos.y > 140 && mousePos.x <= scrollOffset + 358 && mousePos.y <= 165) {
+ --_vm->_soundMan->_soundVolume;
+ if (_vm->_soundMan->_soundVolume >= 0)
+ _vm->_soundMan->playSoundFile("bruit2.wav");
+ else
+ _vm->_soundMan->_soundVolume = 0;
+ _vm->_soundMan->setMODSampleVolume();
+
+ _vm->_soundMan->updateScummVMSoundSettings();
+ }
+ }
+
+ if (!_vm->_soundMan->_voiceOffFl) {
+ if (mousePos.x >= scrollOffset + 300 && mousePos.y > 167 && mousePos.x <= scrollOffset + 327 && mousePos.y <= 192) {
+ ++_vm->_soundMan->_voiceVolume;
+
+ if (_vm->_soundMan->_voiceVolume <= 16)
+ _vm->_soundMan->playSoundFile("bruit2.wav");
+ else
+ _vm->_soundMan->_voiceVolume = 16;
+ _vm->_soundMan->setMODVoiceVolume();
+
+ _vm->_soundMan->updateScummVMSoundSettings();
+ }
+
+ if (!_vm->_soundMan->_voiceOffFl && mousePos.x >= scrollOffset + 331 && mousePos.y > 167 && mousePos.x <= scrollOffset + 358 && mousePos.y <= 192) {
+ --_vm->_soundMan->_voiceVolume;
+ if (_vm->_soundMan->_voiceVolume >= 0)
+ _vm->_soundMan->playSoundFile("bruit2.wav");
+ else
+ _vm->_soundMan->_voiceVolume = 0;
+ _vm->_soundMan->setMODVoiceVolume();
+
+ _vm->_soundMan->updateScummVMSoundSettings();
+ }
+ }
+
+ if (mousePos.x >= scrollOffset + 431) {
+ if (mousePos.y > 194 && mousePos.x <= scrollOffset + 489 && mousePos.y <= 219)
+ _vm->_soundMan->_textOffFl = !_vm->_soundMan->_textOffFl;
+
+ if (mousePos.x >= scrollOffset + 431) {
+ if (mousePos.y > 167 && mousePos.x <= scrollOffset + 489 && mousePos.y <= 192) {
+ _vm->_soundMan->_voiceOffFl = !_vm->_soundMan->_voiceOffFl;
+
+ _vm->_soundMan->updateScummVMSoundSettings();
+ }
+ if (mousePos.x >= scrollOffset + 431) {
+ if (mousePos.y > 113 && mousePos.x <= scrollOffset + 489 && mousePos.y <= 138) {
+ if (_vm->_soundMan->_musicOffFl) {
+ _vm->_soundMan->_musicOffFl = false;
+ _vm->_soundMan->setMODMusicVolume(_vm->_soundMan->_musicVolume);
+ } else {
+ _vm->_soundMan->_musicOffFl = true;
+ _vm->_soundMan->setMODMusicVolume(0);
+ }
+
+ _vm->_soundMan->updateScummVMSoundSettings();
+ }
+
+ if (mousePos.x >= scrollOffset + 431 && mousePos.y > 140 && mousePos.x <= scrollOffset + 489 && mousePos.y <= 165) {
+ _vm->_soundMan->_soundOffFl = !_vm->_soundMan->_soundOffFl;
+
+ _vm->_soundMan->updateScummVMSoundSettings();
+ }
+ }
+ }
+ }
+
+ if (mousePos.x >= scrollOffset + 175 && mousePos.y > 285 && mousePos.x <= scrollOffset + 281 && mousePos.y <= 310) {
+ _vm->_globals->_exitId = 300;
+ doneFlag = true;
+ }
+ if (mousePos.x >= scrollOffset + 355 && mousePos.y > 285 && mousePos.x <= scrollOffset + 490 && mousePos.y <= 310)
+ doneFlag = true;
+ if (mousePos.x >= scrollOffset + 300 && mousePos.y > 194 && mousePos.x <= scrollOffset + 358 && mousePos.y <= 219) {
+ switch (_vm->_graphicsMan->_scrollSpeed) {
+ case 1:
+ _vm->_graphicsMan->_scrollSpeed = 2;
+ break;
+ case 2:
+ _vm->_graphicsMan->_scrollSpeed = 4;
+ break;
+ case 4:
+ _vm->_graphicsMan->_scrollSpeed = 8;
+ break;
+ case 8:
+ _vm->_graphicsMan->_scrollSpeed = 16;
+ break;
+ case 16:
+ _vm->_graphicsMan->_scrollSpeed = 32;
+ break;
+ case 32:
+ _vm->_graphicsMan->_scrollSpeed = 48;
+ break;
+ case 48:
+ _vm->_graphicsMan->_scrollSpeed = 64;
+ break;
+ case 64:
+ _vm->_graphicsMan->_scrollSpeed = 128;
+ break;
+ case 128:
+ _vm->_graphicsMan->_scrollSpeed = 160;
+ break;
+ case 160:
+ _vm->_graphicsMan->_scrollSpeed = 320;
+ break;
+ case 320:
+ _vm->_graphicsMan->_scrollSpeed = 1;
+ break;
+ }
+ }
+
+ // Values are blocked, thus handling the zone is useless
+ //if (mousePos.x >= _vm->_graphicsManager->ofscroll + 348 && mousePos.y > 248 && mousePos.x <= _vm->_graphicsManager->ofscroll + 394 && mousePos.y <= 273)
+ // _vm->_globals->_speed = 2;
+
+ if ( mousePos.x < scrollOffset + 165 || mousePos.x > scrollOffset + 496
+ || mousePos.y < 107 || mousePos.y > 318)
+ doneFlag = true;
+ }
+
+ if (_vm->_globals->_speed == 1)
+ _vm->_globals->_menuSpeed = 6;
+ else if (_vm->_globals->_speed == 2)
+ _vm->_globals->_menuSpeed = 5;
+ else if (_vm->_globals->_speed == 3)
+ _vm->_globals->_menuSpeed = 4;
+
+ _vm->_globals->_menuTextOff = !_vm->_soundMan->_textOffFl ? 7 : 8;
+ _vm->_globals->_menuVoiceOff = !_vm->_soundMan->_voiceOffFl ? 7 : 8;
+ _vm->_globals->_menuSoundOff = !_vm->_soundMan->_soundOffFl ? 7 : 8;
+ _vm->_globals->_menuMusicOff = !_vm->_soundMan->_musicOffFl ? 7 : 8;
+
+ _vm->_globals->_menuDisplayType = 9;
+
+ switch (_vm->_graphicsMan->_scrollSpeed) {
+ case 1:
+ _vm->_globals->_menuScrollSpeed = 12;
+ break;
+ case 2:
+ _vm->_globals->_menuScrollSpeed = 13;
+ break;
+ case 4:
+ _vm->_globals->_menuScrollSpeed = 14;
+ break;
+ case 8:
+ _vm->_globals->_menuScrollSpeed = 15;
+ break;
+ case 16:
+ _vm->_globals->_menuScrollSpeed = 16;
+ break;
+ case 32:
+ _vm->_globals->_menuScrollSpeed = 17;
+ break;
+ case 48:
+ _vm->_globals->_menuScrollSpeed = 18;
+ break;
+ case 64:
+ _vm->_globals->_menuScrollSpeed = 19;
+ break;
+ case 128:
+ _vm->_globals->_menuScrollSpeed = 20;
+ break;
+ case 160:
+ _vm->_globals->_menuScrollSpeed = 21;
+ break;
+ case 320:
+ _vm->_globals->_menuScrollSpeed = 22;
+ break;
+ case 640:
+ _vm->_globals->_menuScrollSpeed = 23;
+ break;
+ }
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (!doneFlag);
+
+ _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, scrollOffset + 164,
+ 107, 335, 215, _vm->_graphicsMan->_frontBuffer, scrollOffset + 164, 107);
+ _vm->_graphicsMan->addDirtyRect(scrollOffset + 164, 107, scrollOffset + 498, 320);
+
+ _vm->_globals->_optionDialogSpr = _vm->_globals->freeMemory(_vm->_globals->_optionDialogSpr);
+ _vm->_globals->_optionDialogFl = false;
+}
+
+void DialogsManager::showInventory() {
+ if (_removeInventFl || _inventDisplayedFl || _vm->_globals->_disableInventFl)
+ return;
+
+ _vm->_graphicsMan->_scrollStatus = 1;
+ _vm->_objectsMan->_eraseVisibleCounter = 4;
+ _vm->_objectsMan->_visibleFl = false;
+ for (int i = 0; i <= 1; i++) {
+ inventAnim();
+ _vm->_events->getMouseX();
+ _vm->_events->getMouseY();
+ _vm->_events->refreshScreenAndEvents();
+ }
+ _inventWin1 = NULL;
+
+ bool loopFl;
+ do {
+ loopFl = false;
+ _vm->_events->_curMouseButton = 0;
+ _vm->_events->_mouseButton = 0;
+ _vm->_globals->_disableInventFl = true;
+ _vm->_graphicsMan->setColorPercentage2(251, 100, 100, 100);
+
+ Common::String filename;
+ if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS)
+ filename = "INVENT.SPR";
+ else {
+ switch (_vm->_globals->_language) {
+ case LANG_EN:
+ filename = "INVENTAN.SPR";
+ break;
+ case LANG_FR:
+ filename = "INVENTFR.SPR";
+ break;
+ case LANG_SP:
+ filename = "INVENTES.SPR";
+ break;
+ }
+ }
+
+ Common::File f;
+ if (!f.open(filename))
+ error("Error opening file - %s", filename.c_str());
+
+ size_t filesize = f.size();
+ _inventWin1 = _vm->_globals->allocMemory(filesize);
+ _vm->_fileIO->readStream(f, _inventWin1, filesize);
+ f.close();
+
+ _inventBuf2 = _vm->_fileIO->loadFile("INVENT2.SPR");
+
+ _inventX = _vm->_graphicsMan->_scrollOffset + 152;
+ _inventY = 114;
+ _inventWidth = _vm->_objectsMan->getWidth(_inventWin1, 0);
+ _inventHeight = _vm->_objectsMan->getHeight(_inventWin1, 0);
+
+ _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, _inventWin1, _inventX + 300, 414, 0, 0, 0, false);
+ int curPosY = 0;
+ int inventCount = 0;
+ for (int inventLine = 1; inventLine <= 5; inventLine++) {
+ int curPosX = 0;
+ for (int inventCol = 1; inventCol <= 6; inventCol++) {
+ ++inventCount;
+ int inventIdx = _vm->_globals->_inventory[inventCount];
+ // The last two zones are not reserved for the inventory: Options and Save/Load
+ if (inventIdx && inventCount <= 29) {
+ byte *obj = _vm->_objectsMan->loadObjectFromFile(inventIdx, false);
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, obj, _inventX + curPosX + 6,
+ curPosY + 120, _vm->_objectsMan->getObjectWidth(), _vm->_objectsMan->getObjectHeight());
+ _vm->_globals->freeMemory(obj);
+ }
+ curPosX += 54;
+ };
+ curPosY += 38;
+ }
+ _vm->_graphicsMan->copySurfaceRect(_vm->_graphicsMan->_frontBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight);
+ _vm->_events->_curMouseButton = 0;
+ int newInventoryItem = 0;
+
+ // Main loop to select an inventory item
+ while (!_vm->shouldQuit()) {
+ // Turn on drawing the inventory dialog in the event manager
+ _inventDisplayedFl = true;
+
+ int mousePosX = _vm->_events->getMouseX();
+ int mousePosY = _vm->_events->getMouseY();
+ int mouseButton = _vm->_events->getMouseButton();
+ int oldInventoryItem = newInventoryItem;
+ newInventoryItem = _vm->_linesMan->checkInventoryHotspots(mousePosX, mousePosY);
+ if (newInventoryItem != oldInventoryItem)
+ _vm->_objectsMan->initBorder(newInventoryItem);
+ int cursorId = _vm->_events->_mouseCursorId;
+ if (cursorId != 1 && cursorId != 2 && cursorId != 3 && cursorId != 16) {
+ if (mouseButton == 2) {
+ _vm->_objectsMan->nextObjectIcon(newInventoryItem);
+ if (cursorId != 23)
+ _vm->_events->changeMouseCursor(cursorId);
+ }
+ }
+ cursorId = _vm->_events->_mouseCursorId;
+ if (mouseButton == 1) {
+ if (cursorId == 1 || cursorId == 2 || cursorId == 3 || cursorId == 16 || !cursorId)
+ break;
+ _vm->_objectsMan->takeInventoryObject(_vm->_globals->_inventory[newInventoryItem]);
+ if (_vm->_events->_mouseCursorId == 8)
+ break;
+
+ _vm->_script->_tempObjectFl = true;
+ _vm->_globals->_saveData->_data[svLastObjectIndex] = _vm->_objectsMan->_curObjectIndex;
+ _vm->_globals->_saveData->_data[svLastInventoryItem] = _vm->_globals->_inventory[newInventoryItem];
+ _vm->_globals->_saveData->_data[svLastInvMouseCursor] = _vm->_events->_mouseCursorId;
+ _vm->_objectsMan->loadObjectIniFile();
+ _vm->_script->_tempObjectFl = false;
+
+ if (_vm->_soundMan->_voiceOffFl) {
+ do
+ _vm->_events->refreshScreenAndEvents();
+ while (!_vm->_globals->_exitId && _vm->_events->getMouseButton() != 1);
+ _vm->_fontMan->hideText(9);
+ }
+ if (_vm->_globals->_exitId) {
+ if (_vm->_globals->_exitId == 2) {
+ _vm->_globals->_exitId = 0;
+ break;
+ }
+
+ _vm->_globals->_exitId = 0;
+ _inventBuf2 = _vm->_globals->freeMemory(_inventBuf2);
+ _inventWin1 = _vm->_globals->freeMemory(_inventWin1);
+ loopFl = true;
+ break;
+ } else
+ _inventDisplayedFl = true;
+ }
+ if (_removeInventFl)
+ break;
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_globals->_screenId >= 35 && _vm->_globals->_screenId <= 40)
+ _vm->_objectsMan->handleSpecialGames();
+ }
+ } while (loopFl);
+
+ _vm->_fontMan->hideText(9);
+ if (_inventDisplayedFl) {
+ _inventDisplayedFl = false;
+ _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, _inventX, 114, _inventWidth, _inventHeight, _vm->_graphicsMan->_frontBuffer, _inventX, 114);
+ _vm->_graphicsMan->addDirtyRect(_inventX, 114, _inventX + _inventWidth, _inventWidth + 114);
+ _vm->_objectsMan->_refreshBobMode10Fl = true;
+ }
+
+ _inventWin1 = _vm->_globals->freeMemory(_inventWin1);
+ _inventBuf2 = _vm->_globals->freeMemory(_inventBuf2);
+
+ int cursorId = _vm->_events->_mouseCursorId;
+ if (cursorId == 1)
+ showOptionsDialog();
+ else if (cursorId == 3)
+ showLoadGame();
+ else if (cursorId == 2)
+ showSaveGame();
+
+ _vm->_events->_mouseCursorId = 4;
+ _vm->_events->changeMouseCursor(4);
+ _vm->_objectsMan->_oldBorderPos = Common::Point(0, 0);
+ _vm->_objectsMan->_borderPos = Common::Point(0, 0);
+ _vm->_globals->_disableInventFl = false;
+ _vm->_graphicsMan->_scrollStatus = 0;
+}
+
+/**
+ * Inventory Animations
+ */
+void DialogsManager::inventAnim() {
+ if (_vm->_globals->_disableInventFl)
+ return;
+
+ if (_vm->_objectsMan->_eraseVisibleCounter && !_vm->_objectsMan->_visibleFl) {
+ _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, _oldInventX, 27, 48, 38,
+ _vm->_graphicsMan->_frontBuffer, _oldInventX, 27);
+ _vm->_graphicsMan->addDirtyRect(_oldInventX, 27, _oldInventX + 48, 65);
+ --_vm->_objectsMan->_eraseVisibleCounter;
+ }
+
+ if (_vm->_objectsMan->_visibleFl) {
+ if (_oldInventX <= 1)
+ _oldInventX = 2;
+ _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, _oldInventX, 27, 48, 38,
+ _vm->_graphicsMan->_frontBuffer, _oldInventX, 27);
+
+ _vm->_graphicsMan->addDirtyRect(_oldInventX, 27, _oldInventX + 48, 65);
+ int newOffset = _vm->_graphicsMan->_scrollOffset + 2;
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _inventoryIcons, newOffset + 300, 327, 0);
+ _vm->_graphicsMan->addDirtyRect(newOffset, 27, newOffset + 45, 62);
+ _oldInventX = newOffset;
+ }
+
+ if (_vm->_globals->_saveData->_data[svField357] == 1) {
+ if (_vm->_globals->_saveData->_data[svField353] == 1)
+ _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_headSprites, 832, 325, 0, 0, 0, false);
+ if (_vm->_globals->_saveData->_data[svField355] == 1)
+ _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_headSprites, 866, 325, 1, 0, 0, false);
+ _vm->_graphicsMan->addDirtyRect(532, 25, 560, 60);
+ _vm->_graphicsMan->addDirtyRect(566, 25, 594, 60);
+ }
+ if (_vm->_globals->_saveData->_data[svField356] == 1) {
+ _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_headSprites, 832, 325, 0, 0, 0, false);
+ _vm->_graphicsMan->addDirtyRect(532, 25, 560, 60);
+ }
+
+ if (_vm->_globals->_saveData->_data[svField354] == 1) {
+ _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_headSprites, 832, 325, 0, 0, 0, false);
+ _vm->_graphicsMan->addDirtyRect(532, 25, 560, 60);
+ }
+}
+
+/**
+ * Test dialog opening
+ */
+void DialogsManager::testDialogOpening() {
+ if (_vm->_globals->_cityMapEnabledFl)
+ _vm->_events->_gameKey = KEY_NONE;
+
+ if ((_vm->_events->_gameKey == KEY_NONE) || _inventFl)
+ return;
+
+ DIALOG_KEY key = _vm->_events->_gameKey;
+ _vm->_events->_gameKey = KEY_NONE;
+ _inventFl = true;
+
+ switch (key) {
+ case KEY_INVENTORY:
+ showInventory();
+ break;
+ case KEY_OPTIONS:
+ _vm->_graphicsMan->_scrollStatus = 1;
+ showOptionsDialog();
+ _vm->_graphicsMan->_scrollStatus = 0;
+ break;
+ case KEY_LOAD:
+ _vm->_graphicsMan->_scrollStatus = 1;
+ showLoadGame();
+ _vm->_graphicsMan->_scrollStatus = 0;
+ break;
+ case KEY_SAVE:
+ _vm->_graphicsMan->_scrollStatus = 1;
+ showSaveGame();
+ _vm->_graphicsMan->_scrollStatus = 0;
+ break;
+ default:
+ break;
+ }
+
+ _inventFl = false;
+ _vm->_events->_gameKey = KEY_NONE;
+}
+
+/**
+ * Load Game dialog
+ */
+void DialogsManager::showLoadGame() {
+ _vm->_events->refreshScreenAndEvents();
+ showSaveLoad(MODE_LOAD);
+
+ int slotNumber;
+ do {
+ slotNumber = searchSavegames();
+ _vm->_events->refreshScreenAndEvents();
+ } while (!_vm->shouldQuit() && (!slotNumber || _vm->_events->getMouseButton() != 1));
+ _vm->_objectsMan->_saveLoadFl = false;
+ int16 startPosX = _vm->_events->_startPos.x + 183;
+ _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, startPosX, 60, 274, 353, _vm->_graphicsMan->_frontBuffer, startPosX, 60);
+ _vm->_graphicsMan->addDirtyRect(startPosX, 60, startPosX + 274, 413);
+ _vm->_objectsMan->_refreshBobMode10Fl = true;
+ _vm->_objectsMan->_saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsMan->_saveLoadSprite);
+ _vm->_objectsMan->_saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsMan->_saveLoadSprite2);
+ _vm->_objectsMan->_saveLoadX = 0;
+ _vm->_objectsMan->_saveLoadY = 0;
+
+ if (slotNumber != 7) {
+ _vm->_saveLoad->loadGame(slotNumber);
+ }
+
+ _vm->_objectsMan->changeObject(14);
+}
+
+/**
+ * Save Game dialog
+ */
+void DialogsManager::showSaveGame() {
+ _vm->_events->refreshScreenAndEvents();
+
+ showSaveLoad(MODE_SAVE);
+ int slotNumber;
+ do {
+ slotNumber = searchSavegames();
+ _vm->_events->refreshScreenAndEvents();
+ } while (!_vm->shouldQuit() && (!slotNumber || _vm->_events->getMouseButton() != 1));
+
+ _vm->_objectsMan->_saveLoadFl = false;
+ int16 startPosX = _vm->_events->_startPos.x + 183;
+ _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, startPosX, 60, 274, 353, _vm->_graphicsMan->_frontBuffer, startPosX, 60);
+ _vm->_graphicsMan->addDirtyRect(startPosX, 60, startPosX + 274, 413);
+ _vm->_objectsMan->_refreshBobMode10Fl = true;
+ _vm->_objectsMan->_saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsMan->_saveLoadSprite);
+ _vm->_objectsMan->_saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsMan->_saveLoadSprite2);
+ _vm->_objectsMan->_saveLoadX = 0;
+ _vm->_objectsMan->_saveLoadY = 0;
+
+ if (slotNumber != 7) {
+ // Since the original GUI doesn't support save names, use a default name
+ Common::String saveName = Common::String::format("Save #%d", slotNumber);
+
+ // Save the game
+ _vm->_saveLoad->saveGame(slotNumber, saveName);
+ }
+}
+
+/**
+ * Load/Save dialog
+ */
+void DialogsManager::showSaveLoad(SaveLoadMode mode) {
+ Common::String filename;
+
+ if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS)
+ filename = "SAVE.SPR";
+ else {
+ switch (_vm->_globals->_language) {
+ case LANG_EN:
+ filename = "SAVEAN.SPR";
+ break;
+ case LANG_FR:
+ filename = "SAVEFR.SPR";
+ break;
+ case LANG_SP:
+ filename = "SAVEES.SPR";
+ break;
+ }
+ }
+
+ _vm->_objectsMan->_saveLoadSprite = _vm->_objectsMan->loadSprite(filename);
+ _vm->_objectsMan->_saveLoadSprite2 = _vm->_objectsMan->loadSprite("SAVE2.SPR");
+ int16 startPosX = _vm->_events->_startPos.x;
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_saveLoadSprite, startPosX + 483, 360, 0);
+
+ if (_vm->_globals->_language == LANG_FR) {
+ if (mode == MODE_SAVE)
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_saveLoadSprite, startPosX + 525, 375, 1);
+ else if (mode == MODE_LOAD)
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_saveLoadSprite, startPosX + 515, 375, 2);
+ } else {
+ if (mode == MODE_SAVE)
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_saveLoadSprite, startPosX + 535, 372, 1);
+ else if (mode == MODE_LOAD)
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_saveLoadSprite, startPosX + 539, 372, 2);
+ }
+
+ for (int slotNumber = 1; slotNumber <= 6; ++slotNumber) {
+ hopkinsSavegameHeader header;
+ if (_vm->_saveLoad->readSavegameHeader(slotNumber, header)) {
+ Graphics::Surface thumb8;
+ _vm->_saveLoad->convertThumb16To8(header._thumbnail, &thumb8);
+
+ byte *thumb = (byte *)thumb8.pixels;
+
+ int16 startPosX_ = _vm->_events->_startPos.x;
+ switch (slotNumber) {
+ case 1:
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, thumb, startPosX_ + 190, 112, 128, 87);
+ break;
+ case 2:
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, thumb, startPosX_ + 323, 112, 128, 87);
+ break;
+ case 3:
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, thumb, startPosX_ + 190, 203, 128, 87);
+ break;
+ case 4:
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, thumb, startPosX_ + 323, 203, 128, 87);
+ break;
+ case 5:
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, thumb, startPosX_ + 190, 294, 128, 87);
+ break;
+ case 6:
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, thumb, startPosX_ + 323, 294, 128, 87);
+ break;
+ }
+
+ thumb8.free();
+ header._thumbnail->free();
+ delete header._thumbnail;
+ }
+ }
+
+ _vm->_graphicsMan->copySurfaceRect(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_saveLoadSprite, _vm->_events->_startPos.x + 183, 60, 274, 353);
+ _vm->_objectsMan->_saveLoadFl = true;
+ _vm->_objectsMan->_saveLoadX = 0;
+ _vm->_objectsMan->_saveLoadY = 0;
+}
+
+/**
+ * Search savegames
+ */
+int DialogsManager::searchSavegames() {
+ int xp = _vm->_events->getMouseX();
+ int yp = _vm->_events->getMouseY();
+
+ int16 startPosX = _vm->_graphicsMan->_scrollOffset = _vm->_events->_startPos.x;
+
+ int slotNumber = 0;
+ if (yp >= 112 && yp <= 198) {
+ if (xp > startPosX + 189 && xp < startPosX + 318) {
+ slotNumber = 1;
+ _vm->_objectsMan->_saveLoadX = 189;
+ _vm->_objectsMan->_saveLoadY = 111;
+ } else if (xp > startPosX + 322 && xp < startPosX + 452) {
+ slotNumber = 2;
+ _vm->_objectsMan->_saveLoadX = 322;
+ _vm->_objectsMan->_saveLoadY = 111;
+ }
+ } else if (yp >= 203 && yp <= 289) {
+ if (xp > startPosX + 189 && xp < startPosX + 318) {
+ slotNumber = 3;
+ _vm->_objectsMan->_saveLoadX = 189;
+ _vm->_objectsMan->_saveLoadY = 202;
+ } else if (xp > startPosX + 322 && xp < startPosX + 452) {
+ slotNumber = 4;
+ _vm->_objectsMan->_saveLoadX = 322;
+ _vm->_objectsMan->_saveLoadY = 202;
+ }
+ } else if (yp >= 294 && yp <= 380) {
+ if (xp > startPosX + 189 && xp < startPosX + 318) {
+ slotNumber = 5;
+ _vm->_objectsMan->_saveLoadX = 189;
+ _vm->_objectsMan->_saveLoadY = 293;
+ } else if (xp > startPosX + 322 && xp < startPosX + 452) {
+ slotNumber = 6;
+ _vm->_objectsMan->_saveLoadX = 322;
+ _vm->_objectsMan->_saveLoadY = 293;
+ }
+ } else if (yp >= 388 && yp <= 404 && xp > startPosX + 273 && xp < startPosX + 355) {
+ slotNumber = 7;
+ _vm->_objectsMan->_saveLoadX = 0;
+ _vm->_objectsMan->_saveLoadY = 0;
+ } else {
+ slotNumber = 0;
+ _vm->_objectsMan->_saveLoadX = 0;
+ _vm->_objectsMan->_saveLoadY = 0;
+ }
+
+ return slotNumber;
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/dialogs.h b/engines/hopkins/dialogs.h
new file mode 100644
index 0000000000..246b80cd3e
--- /dev/null
+++ b/engines/hopkins/dialogs.h
@@ -0,0 +1,77 @@
+/* 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 HOPKINS_DIALOGS_H
+#define HOPKINS_DIALOGS_H
+
+#include "common/scummsys.h"
+#include "common/system.h"
+#include "common/error.h"
+#include "common/rect.h"
+
+namespace Hopkins {
+
+class HopkinsEngine;
+
+enum SaveLoadMode { MODE_SAVE = 1, MODE_LOAD = 2 };
+
+/**
+ * Class for manging game dialogs
+ */
+class DialogsManager {
+private:
+ byte *_inventWin1;
+ byte *_inventBuf2;
+ byte *_inventoryIcons;
+ bool _inventDisplayedFl;
+ bool _removeInventFl;
+ int _inventX, _inventY;
+ int _inventWidth, _inventHeight;
+ int _oldInventX;
+
+ HopkinsEngine *_vm;
+
+ void showSaveLoad(SaveLoadMode mode);
+ int searchSavegames();
+public:
+ bool _inventFl;
+
+ DialogsManager(HopkinsEngine *vm);
+ ~DialogsManager();
+ void inventAnim();
+ void showInventory();
+ void showLoadGame();
+ void showSaveGame();
+ void showOptionsDialog();
+ void testDialogOpening();
+ void clearAll();
+
+ void drawInvent(Common::Point oldBorder, int oldBorderSpriteIndex, Common::Point newBorder, int newBorderSpriteIndex);
+ void loadIcons();
+
+ void disableInvent() { _removeInventFl = true; }
+ void enableInvent() { _removeInventFl = false; }
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_MENU_H */
diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp
new file mode 100644
index 0000000000..c266f6b105
--- /dev/null
+++ b/engines/hopkins/events.cpp
@@ -0,0 +1,542 @@
+/* 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 "hopkins/events.h"
+
+#include "hopkins/files.h"
+#include "hopkins/globals.h"
+#include "hopkins/hopkins.h"
+#include "hopkins/sound.h"
+
+#include "common/system.h"
+#include "common/textconsole.h"
+#include "graphics/cursorman.h"
+
+namespace Hopkins {
+
+EventsManager::EventsManager(HopkinsEngine *vm) {
+ _vm = vm;
+ _mouseFl = false;
+ _mouseLinuxFl = false;
+ _mouseSizeX = _mouseSizeY = 0;
+ _mouseOffset.x = _mouseOffset.y = 0;
+ _startPos.x = _startPos.y = 0;
+ _breakoutFl = false;
+ _mouseSpriteId = 0;
+ _curMouseButton = 0;
+ _mouseButton = 0;
+ _mouseCursor = NULL;
+ _gameCounter = 0;
+ _rateCounter = 0;
+ _escKeyFl = false;
+ _gameKey = KEY_NONE;
+ _mouseCursorId = 0;
+ _oldIconId = 0;
+ _objectBuf = NULL;
+
+ Common::fill(&_keyState[0], &_keyState[256], false);
+ _priorCounterTime = _priorFrameTime = g_system->getMillis();
+}
+
+EventsManager::~EventsManager() {
+ _vm->_globals->freeMemory(_objectBuf);
+ _vm->_globals->freeMemory(_mouseCursor);
+}
+
+void EventsManager::clearAll() {
+ _vm->_globals->freeMemory(_objectBuf);
+ _objectBuf = _vm->_globals->allocMemory(2500);
+}
+
+void EventsManager::initMouseData() {
+ if (_vm->getPlatform() == Common::kPlatformLinux)
+ _mouseLinuxFl = true;
+ else
+ _mouseLinuxFl = false;
+
+ if (_mouseLinuxFl) {
+ _mouseSizeX = 52;
+ _mouseSizeY = 32;
+ } else {
+ _mouseSizeX = 34;
+ _mouseSizeY = 20;
+ }
+
+ switch (_vm->_globals->_language) {
+ case LANG_EN:
+ if (!_mouseLinuxFl)
+ _mouseCursor = _vm->_fileIO->loadFile("SOUAN.SPR");
+ else
+ _mouseCursor = _vm->_fileIO->loadFile("LSOUAN.SPR");
+ break;
+ case LANG_FR:
+ if (!_mouseLinuxFl)
+ _mouseCursor = _vm->_fileIO->loadFile("SOUFR.SPR");
+ else
+ _mouseCursor = _vm->_fileIO->loadFile("LSOUFR.SPR");
+ break;
+ case LANG_SP:
+ _mouseCursor = _vm->_fileIO->loadFile("SOUES.SPR");
+ break;
+ }
+}
+
+// Mouse On
+void EventsManager::setMouseOn() {
+ _mouseFl = true;
+
+ if (_mouseLinuxFl) {
+ _mouseSizeX = 52;
+ _mouseSizeY = 32;
+ } else {
+ _mouseSizeX = 34;
+ _mouseSizeY = 20;
+ }
+
+ _mouseOffset.x = 0;
+ _mouseOffset.y = 0;
+
+ if (!_breakoutFl)
+ setMouseXY(300, 200);
+ else
+ setMouseXY(150, 100);
+}
+
+/**
+ * Set Mouse position
+ */
+void EventsManager::setMouseXY(Common::Point pos) {
+ g_system->warpMouse(pos.x, pos.y);
+}
+
+/**
+ * Set Mouse position
+ */
+void EventsManager::setMouseXY(int xp, int yp) {
+ g_system->warpMouse(xp, yp);
+}
+
+/**
+ * Get Mouse X
+ */
+int EventsManager::getMouseX() {
+ _mousePos.x = _startPos.x + g_system->getEventManager()->getMousePos().x;
+ _mousePos.y = g_system->getEventManager()->getMousePos().y;
+
+ return _mousePos.x + _mouseOffset.x;
+}
+
+/**
+ * Get Mouse Y
+ */
+int EventsManager::getMouseY() {
+ _mousePos.x = _startPos.x + g_system->getEventManager()->getMousePos().x;
+ _mousePos.y = g_system->getEventManager()->getMousePos().y;
+
+ return _mousePos.y + _mouseOffset.y;
+}
+
+/**
+ * Get Mouse Button
+ */
+int EventsManager::getMouseButton() {
+ refreshEvents();
+ return _curMouseButton;
+}
+
+/**
+ * Mouse Off
+ */
+void EventsManager::mouseOff() {
+ _mouseFl = false;
+ CursorMan.showMouse(false);
+}
+
+/**
+ * Mouse On
+ */
+void EventsManager::mouseOn() {
+ setMouseOn();
+ _mouseFl = true;
+ CursorMan.showMouse(true);
+}
+
+/**
+ * Change Mouse Cursor
+ */
+void EventsManager::changeMouseCursor(int id) {
+ int cursorId = id;
+
+ if (_mouseCursorId == 23)
+ return;
+
+ if (id == 4 && _mouseCursorId == 4 && _vm->_globals->_freezeCharacterFl)
+ cursorId = 0;
+ if (cursorId == 25)
+ cursorId = 5;
+
+ if (_oldIconId != cursorId || !cursorId) {
+ _oldIconId = cursorId;
+ _mouseSpriteId = cursorId;
+
+ updateCursor();
+ }
+}
+
+/**
+ * Check Events
+ */
+void EventsManager::refreshEvents() {
+ _vm->_soundMan->checkSounds();
+
+ pollEvents();
+}
+
+void EventsManager::checkForNextFrameCounter() {
+ int32 delayAmount = 10 - (g_system->getMillis() - _priorCounterTime);
+ if (delayAmount > 0)
+ _vm->_system->delayMillis(delayAmount);
+
+ // Check for whether to increment the game counter
+ uint32 milli = g_system->getMillis();
+ while ((milli - _priorCounterTime) >= 10) {
+ _priorCounterTime += 10;
+ _rateCounter += 3;
+ }
+
+ // Check for next game frame
+ if ((milli - _priorFrameTime) >= GAME_FRAME_TIME) {
+ ++_gameCounter;
+ _priorFrameTime = milli;
+ _vm->_graphicsMan->updateScreen();
+
+ // Signal the ScummVM debugger
+ _vm->_debug->onFrame();
+ }
+}
+
+void EventsManager::delay(int totalMilli) {
+ uint32 delayEnd = g_system->getMillis() + totalMilli;
+
+ while (!g_system->getEventManager()->shouldQuit() && g_system->getMillis() < delayEnd) {
+ g_system->delayMillis(10);
+ }
+}
+
+void EventsManager::pollEvents() {
+ checkForNextFrameCounter();
+
+ Common::Event event;
+ while (g_system->getEventManager()->pollEvent(event)) {
+ // Handle keypress
+ switch (event.type) {
+ case Common::EVENT_QUIT:
+ case Common::EVENT_RTL:
+ return;
+
+ case Common::EVENT_KEYDOWN:
+ _keyState[(byte)toupper(event.kbd.ascii)] = true;
+ handleKey(event);
+ return;
+ case Common::EVENT_KEYUP:
+ _keyState[(byte)toupper(event.kbd.ascii)] = false;
+ return;
+ case Common::EVENT_LBUTTONDOWN:
+ _mouseButton = 1;
+ return;
+ case Common::EVENT_RBUTTONDOWN:
+ _mouseButton = 2;
+ return;
+ case Common::EVENT_LBUTTONUP:
+ case Common::EVENT_RBUTTONUP:
+ _mouseButton = 0;
+ return;
+ default:
+ break;
+ }
+ }
+
+ for (char chr = 'A'; chr <= 'Z'; chr++)
+ _keyState[(byte)chr] = false;
+
+ for (char chr = '0'; chr <= '9'; chr++)
+ _keyState[(byte)chr] = false;
+}
+
+void EventsManager::handleKey(const Common::Event &event) {
+ _escKeyFl = (event.kbd.keycode == Common::KEYCODE_ESCAPE);
+
+ if (event.kbd.keycode == Common::KEYCODE_i || event.kbd.keycode == Common::KEYCODE_TAB)
+ _gameKey = KEY_INVENTORY;
+ else if (event.kbd.keycode == Common::KEYCODE_F5)
+ _gameKey = KEY_SAVE;
+ else if (event.kbd.keycode == Common::KEYCODE_F7)
+ _gameKey = KEY_LOAD;
+ else if (event.kbd.keycode == Common::KEYCODE_F1 || event.kbd.keycode == Common::KEYCODE_o)
+ _gameKey = KEY_OPTIONS;
+
+ // Check for debugger
+ if ((event.kbd.keycode == Common::KEYCODE_d) && (event.kbd.flags & Common::KBD_CTRL)) {
+ // Attach to the debugger
+ _vm->_debug->attach();
+ _vm->_debug->onFrame();
+ }
+
+}
+
+/**
+ * Waits for a keypress, ignoring mouse events
+ * @return Keypress, or -1 if game quit was requested
+ */
+int EventsManager::waitKeyPress() {
+ char foundChar = '\0';
+
+ while (!foundChar) {
+ if (_vm->shouldQuit())
+ return -1;
+
+ for (char ch = 'A'; ch <= 'Z'; ++ch) {
+ if (_keyState[(byte)ch]) {
+ foundChar = ch;
+ break;
+ }
+ }
+
+ for (char ch = '0'; ch <= '9'; ++ch) {
+ if (_keyState[(byte)ch]) {
+ foundChar = ch;
+ break;
+ }
+ }
+
+ if (_keyState[(byte)'.'])
+ foundChar = '.';
+ else if (_keyState[8])
+ // BACKSPACE
+ foundChar = 8;
+ else if (_keyState[13])
+ // ENTER
+ foundChar = 13;
+ else if (_keyState[(byte)' '])
+ foundChar = ' ';
+
+ refreshScreenAndEvents();
+ }
+
+ // Wait for keypress release
+ while (_keyState[(byte)foundChar] && !_vm->shouldQuit()) {
+ refreshScreenAndEvents();
+ g_system->delayMillis(10);
+ }
+
+ // Return character
+ return foundChar;
+}
+
+void EventsManager::refreshScreenAndEvents() {
+ int bottom = 0;
+ int right = 0;
+ int height = 0;
+ int width = 0;
+ int xp = 0;
+ int yp = 0;
+
+ if (_mouseFl) {
+ int mouseWidth = 20;
+ if (!_mouseLinuxFl)
+ mouseWidth = 10;
+ int mouseHeight = 20;
+ if (!_mouseLinuxFl)
+ mouseHeight = 15;
+ xp = _mousePos.x - mouseWidth;
+ yp = _mousePos.y;
+ width = _mouseSizeX;
+ height = _mouseSizeY;
+ if (_mouseCursorId == 23) {
+ width = _vm->_objectsMan->getObjectWidth();
+ height = _vm->_objectsMan->getObjectHeight();
+ } else {
+ if (_breakoutFl) {
+ if (xp < _vm->_graphicsMan->_minX)
+ xp = _vm->_graphicsMan->_minX;
+ if (_mousePos.y < _vm->_graphicsMan->_minY)
+ yp = _vm->_graphicsMan->_minY;
+ if (_mouseSizeX + xp >= _vm->_graphicsMan->_maxX)
+ width = _mouseSizeX - (_mouseSizeX + xp - _vm->_graphicsMan->_maxX);
+ if (yp + _mouseSizeY >= _vm->_graphicsMan->_maxY)
+ height = _vm->_graphicsMan->_maxY - yp;
+ } else {
+ if (xp < _vm->_graphicsMan->_minX)
+ xp = _vm->_graphicsMan->_minX - mouseWidth;
+ mouseHeight = (int16)mouseHeight;
+ if (_mousePos.y < _vm->_graphicsMan->_minY - mouseHeight)
+ yp = _vm->_graphicsMan->_minY - mouseHeight;
+ if (_mouseSizeX + xp >= _vm->_graphicsMan->_maxX)
+ width = _mouseSizeX - (_mouseSizeX + xp - _vm->_graphicsMan->_maxX - mouseWidth);
+ if (yp + _mouseSizeY >= mouseHeight + _vm->_graphicsMan->_maxY)
+ height = _vm->_graphicsMan->_maxY - mouseHeight - yp;
+ }
+ right = xp + width;
+ bottom = yp + height;
+ }
+ }
+
+ if (!_vm->_globals->_linuxEndDemoFl)
+ _vm->_objectsMan->displaySprite();
+ if (!_mouseFl) {
+ updateCursor();
+ } else if (_mouseCursorId == 23) {
+ if (yp < _vm->_graphicsMan->_maxY && xp < _vm->_graphicsMan->_maxX) {
+ if (width + xp > _vm->_graphicsMan->_maxX)
+ width = _vm->_graphicsMan->_maxX - xp;
+ if (yp + height > _vm->_graphicsMan->_maxY)
+ height = _vm->_graphicsMan->_maxY - yp;
+ if (width > 1 && height > 1) {
+ updateCursor();
+ }
+ }
+ } else if (yp < _vm->_graphicsMan->_maxY && xp < _vm->_graphicsMan->_maxX && width > 1 && height > 1) {
+ updateCursor();
+ _vm->_graphicsMan->addDirtyRect(xp, yp, right, bottom);
+ }
+
+ _vm->_globals->_speed = 2;
+ bool externalLoopFl = false;
+ do {
+ while (!_vm->shouldQuit()) {
+ checkForNextFrameCounter();
+ bool innerLoopFl = false;
+
+ while (!_vm->shouldQuit() && (_breakoutFl || _vm->_globals->_eventMode != EVENTMODE_IGNORE)) {
+ checkForNextFrameCounter();
+
+ if (!_breakoutFl) {
+ innerLoopFl = true;
+ break;
+ }
+ if (_rateCounter > 1) {
+ externalLoopFl = true;
+ break;
+ }
+ }
+ if (innerLoopFl || _vm->_globals->_speed != 2)
+ break;
+ if (externalLoopFl ||_rateCounter > 9) {
+ externalLoopFl = true;
+ break;
+ }
+ }
+ if (externalLoopFl)
+ break;
+ } while (!_vm->shouldQuit() && _vm->_globals->_eventMode == EVENTMODE_CREDITS && _rateCounter <= 15);
+ _vm->_globals->_speed = 2;
+ _rateCounter = 0;
+ if (!_vm->_graphicsMan->_largeScreenFl || _vm->_graphicsMan->_scrollStatus == 1) {
+ _vm->_graphicsMan->displayDirtyRects();
+ } else {
+ if (_vm->_graphicsMan->_scrollStatus != 2) {
+ if (getMouseX() > _vm->_graphicsMan->_scrollPosX + 620)
+ _vm->_graphicsMan->_scrollPosX += _vm->_graphicsMan->_scrollSpeed;
+ if (getMouseX() < _vm->_graphicsMan->_scrollPosX + 10)
+ _vm->_graphicsMan->_scrollPosX -= _vm->_graphicsMan->_scrollSpeed;
+ }
+ _vm->_graphicsMan->_scrollPosX = CLIP(_vm->_graphicsMan->_scrollPosX, 0, SCREEN_WIDTH);
+ if (_vm->_graphicsMan->_oldScrollPosX == _vm->_graphicsMan->_scrollPosX) {
+ _vm->_graphicsMan->displayDirtyRects();
+ } else {
+ _vm->_fontMan->hideText(9);
+ _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_frontBuffer, _vm->_graphicsMan->_scrollPosX, 20, SCREEN_WIDTH, 440, 0, 20);
+ _vm->_graphicsMan->resetRefreshRects();
+ _vm->_graphicsMan->addRefreshRect(0, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 20);
+
+ _vm->_graphicsMan->resetDirtyRects();
+
+ _startPos.x = _vm->_graphicsMan->_scrollPosX;
+ _vm->_graphicsMan->_scrollOffset = _vm->_graphicsMan->_scrollPosX;
+ }
+ _vm->_graphicsMan->_oldScrollPosX = _vm->_graphicsMan->_scrollPosX;
+ _startPos.x = _vm->_graphicsMan->_scrollPosX;
+ _vm->_graphicsMan->_scrollOffset = _vm->_graphicsMan->_scrollPosX;
+ }
+ _curMouseButton = _mouseButton;
+ _mouseButton = 0;
+ _vm->_soundMan->checkSoundEnd();
+ refreshEvents();
+}
+
+void EventsManager::updateCursor() {
+ // Backup the current sprite clipping bounds and reset them
+ Common::Rect clipBounds(_vm->_graphicsMan->_minX, _vm->_graphicsMan->_minY,
+ _vm->_graphicsMan->_maxX, _vm->_graphicsMan->_maxY);
+ _vm->_graphicsMan->_minX = _vm->_graphicsMan->_minY = 0;
+ _vm->_graphicsMan->_maxX = _vm->_objectsMan->getObjectWidth();
+ _vm->_graphicsMan->_maxY = _vm->_objectsMan->getObjectHeight();
+ int pitch = _vm->_graphicsMan->_lineNbr2;
+ _vm->_graphicsMan->_lineNbr2 = _vm->_objectsMan->getObjectWidth();
+
+ // Create the temporary cursor surface
+ byte *cursorSurface = new byte[_vm->_objectsMan->getObjectHeight() * _vm->_objectsMan->getObjectWidth()];
+ Common::fill(cursorSurface, cursorSurface + _vm->_objectsMan->getObjectHeight() * _vm->_objectsMan->getObjectWidth(), 0);
+
+ if (_mouseCursorId != 23) {
+ // Draw standard cursor
+ _vm->_graphicsMan->drawVesaSprite(cursorSurface, _mouseCursor, 300, 300, _mouseSpriteId);
+ } else {
+ // Draw the active inventory object
+ _vm->_graphicsMan->drawCompressedSprite(cursorSurface, _objectBuf, 300, 300, 0, 0, 0, false);
+ }
+
+ // Reset the clipping bounds
+ _vm->_graphicsMan->_minX = clipBounds.left;
+ _vm->_graphicsMan->_minY = clipBounds.top;
+ _vm->_graphicsMan->_maxX = clipBounds.right;
+ _vm->_graphicsMan->_maxY = clipBounds.bottom;
+ _vm->_graphicsMan->_lineNbr2 = pitch;
+
+ // Create a cursor palette
+ Graphics::PixelFormat pixelFormat = g_system->getScreenFormat();
+
+ byte *cursorPalette = new byte[3 * PALETTE_SIZE];
+ uint16 *paletteColors = (uint16 *)_vm->_graphicsMan->_palettePixels;
+
+ for (int i = 0; i < PALETTE_SIZE; i++) {
+ uint8 r, g, b;
+ pixelFormat.colorToRGB(READ_LE_UINT16(&paletteColors[i]), r, g, b);
+ cursorPalette[3 * i] = r;
+ cursorPalette[3 * i + 1] = g;
+ cursorPalette[3 * i + 2] = b;
+ }
+
+ // Calculate the X offset within the pointer image to the actual cursor data
+ int xOffset = !_mouseLinuxFl ? 10 : 20;
+
+ // Set the ScummVM cursor from the surface
+ CursorMan.replaceCursorPalette(cursorPalette, 0, PALETTE_SIZE - 1);
+ CursorMan.replaceCursor(cursorSurface, _vm->_objectsMan->getObjectWidth(), _vm->_objectsMan->getObjectHeight(),
+ xOffset, 0, 0, true);
+
+ // Delete the cursor surface and palette
+ delete[] cursorPalette;
+ delete[] cursorSurface;
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/events.h b/engines/hopkins/events.h
new file mode 100644
index 0000000000..f4dedce1c5
--- /dev/null
+++ b/engines/hopkins/events.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.
+ *
+ */
+
+#ifndef HOPKINS_EVENTS_H
+#define HOPKINS_EVENTS_H
+
+#include "common/scummsys.h"
+#include "common/events.h"
+#include "common/str.h"
+
+namespace Hopkins {
+
+#define GAME_FRAME_RATE 50
+#define GAME_FRAME_TIME (1000 / GAME_FRAME_RATE)
+
+class HopkinsEngine;
+
+enum DIALOG_KEY { KEY_NONE = 0, KEY_INVENTORY = 1, KEY_OPTIONS = 2, KEY_SAVE = 3, KEY_LOAD = 4 };
+
+class EventsManager {
+private:
+ int _oldIconId;
+ uint32 _priorCounterTime;
+ uint32 _priorFrameTime;
+ bool _keyState[256];
+ bool _mouseLinuxFl;
+ int _mouseSizeX, _mouseSizeY;
+
+ HopkinsEngine *_vm;
+
+ void pollEvents();
+ void handleKey(const Common::Event &event);
+ void checkForNextFrameCounter();
+ void updateCursor();
+
+public:
+ DIALOG_KEY _gameKey;
+ uint32 _rateCounter;
+ uint32 _gameCounter;
+ bool _escKeyFl;
+ bool _mouseFl;
+ bool _breakoutFl;
+ Common::Point _startPos;
+ Common::Point _mousePos;
+ Common::Point _mouseOffset;
+ int _mouseSpriteId;
+ int _curMouseButton;
+ int _mouseButton;
+ int _mouseCursorId;
+ byte *_objectBuf;
+ byte *_mouseCursor;
+
+ EventsManager(HopkinsEngine *vm);
+ ~EventsManager();
+ void clearAll();
+ void initMouseData();
+
+ void delay(int totalMilli);
+ void changeMouseCursor(int id);
+ void refreshEvents();
+ int waitKeyPress();
+ int getMouseX();
+ int getMouseY();
+ int getMouseButton();
+ void setMouseXY(Common::Point pos);
+ void setMouseXY(int xp, int yp);
+ void mouseOn();
+ void mouseOff();
+ void setMouseOn();
+ void refreshScreenAndEvents();
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_EVENTS_H */
diff --git a/engines/hopkins/files.cpp b/engines/hopkins/files.cpp
new file mode 100644
index 0000000000..2390ebbdf8
--- /dev/null
+++ b/engines/hopkins/files.cpp
@@ -0,0 +1,271 @@
+/* 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 "hopkins/files.h"
+
+#include "hopkins/hopkins.h"
+#include "hopkins/globals.h"
+
+#include "common/system.h"
+#include "common/debug.h"
+#include "common/file.h"
+#include "common/str.h"
+#include "common/savefile.h"
+
+namespace Hopkins {
+
+FileManager::FileManager(HopkinsEngine *vm) {
+ _vm = vm;
+
+ _catalogPos = 0;
+ _catalogSize = 0;
+}
+
+/**
+ * Load a file
+ */
+byte *FileManager::loadFile(const Common::String &file) {
+ Common::File f;
+ if (!f.open(file))
+ error("Error opening %s", file.c_str());
+
+ // Allocate space for the file contents
+ size_t filesize = f.size();
+ byte *data = _vm->_globals->allocMemory(filesize);
+ if (!data)
+ error("Error allocating space for file being loaded - %s", file.c_str());
+
+ readStream(f, data, filesize);
+ f.close();
+
+ return data;
+}
+
+/**
+ * Read a given number of bytes from a Stream into a pre-allocated buffer
+ */
+int FileManager::readStream(Common::ReadStream &stream, void *buf, size_t nbytes) {
+ return stream.read(buf, nbytes);
+}
+
+/**
+ * Initialize censorship based on blood.dat file
+ */
+void FileManager::initCensorship() {
+ _vm->_globals->_censorshipFl = false;
+
+ // If file doesn't exist, fallback to uncensored
+ if (fileExists("BLOOD.DAT")) {
+ char *data = (char *)loadFile("BLOOD.DAT");
+
+ if ((data[6] == 'u' && data[7] == 'k') || (data[6] == 'U' && data[7] == 'K'))
+ _vm->_globals->_censorshipFl = true;
+
+ _vm->_globals->freeMemory((byte *)data);
+ }
+}
+
+/**
+ * Check if a file is present
+ */
+bool FileManager::fileExists(const Common::String &file) {
+ Common::File f;
+
+ return f.exists(file);
+}
+
+/**
+ * Search file in Cat file
+ */
+byte *FileManager::searchCat(const Common::String &file, CatMode mode, bool &fileFoundFl) {
+ byte *ptr = NULL;
+ fileFoundFl = true;
+ Common::File f;
+
+ Common::String filename = file;
+ Common::String secondaryFilename = "";
+ filename.toUppercase();
+
+ switch (mode) {
+ case RES_INI:
+ if (!f.exists("RES_INI.CAT")) {
+ fileFoundFl = false;
+ return NULL;
+ }
+
+ ptr = loadFile("RES_INI.CAT");
+ secondaryFilename = "RES_INI.RES";
+ break;
+
+ case RES_REP:
+ if (!f.exists("RES_REP.CAT")) {
+ fileFoundFl = false;
+ return NULL;
+ }
+
+ ptr = loadFile("RES_REP.CAT");
+ secondaryFilename = "RES_REP.RES";
+ break;
+
+ case RES_LIN:
+ if (!f.exists("RES_LIN.CAT")) {
+ fileFoundFl = false;
+ return NULL;
+ }
+
+ ptr = loadFile("RES_LIN.CAT");
+ secondaryFilename = "RES_LIN.RES";
+ break;
+
+ case RES_PER:
+ if (!f.exists("RES_PER.CAT")) {
+ fileFoundFl = false;
+ return NULL;
+ }
+
+ ptr = loadFile("RES_PER.CAT");
+ secondaryFilename = "RES_PER.RES";
+ break;
+
+ case RES_PIC:
+ if (!f.exists("PIC.CAT")) {
+ fileFoundFl = false;
+ return NULL;
+ }
+
+ ptr = loadFile("PIC.CAT");
+ break;
+
+ case RES_SAN:
+ if (!f.exists("RES_SAN.CAT")) {
+ fileFoundFl = false;
+ return NULL;
+ }
+
+ ptr = loadFile("RES_SAN.CAT");
+ break;
+
+ case RES_SLI:
+ if (!f.exists("RES_SLI.CAT")) {
+ fileFoundFl = false;
+ return NULL;
+ }
+
+ ptr = loadFile("RES_SLI.CAT");
+ break;
+
+ case RES_VOI: {
+ Common::String tmpFilename;
+ if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS)
+ tmpFilename = "ENG_VOI.CAT";
+ // Win95 and Linux versions uses another set of names
+ else {
+ switch (_vm->_globals->_language) {
+ case LANG_EN:
+ tmpFilename = "RES_VAN.CAT";
+ break;
+ case LANG_FR:
+ tmpFilename = "RES_VFR.CAT";
+ break;
+ case LANG_SP:
+ tmpFilename = "RES_VES.CAT";
+ break;
+ }
+ }
+
+ if (!f.exists(tmpFilename)) {
+ fileFoundFl = false;
+ return NULL;
+ }
+
+ ptr = loadFile(tmpFilename);
+ break;
+ }
+
+ default:
+ break;
+ }
+
+ // Scan for an entry in the catalogue
+ byte *result;
+ bool matchFlag = false;
+ int offsetVal = 0;
+
+ while (!matchFlag) {
+ Common::String name = (const char *)ptr + offsetVal;
+
+ if (name == filename) {
+ // Found entry for file, so get it's details from the catalogue entry
+ const byte *pData = ptr + offsetVal;
+ _catalogPos = READ_LE_UINT32(pData + 15);
+ _catalogSize = READ_LE_UINT32(pData + 19);
+ matchFlag = true;
+ }
+
+ if (name == "FINIS") {
+ _vm->_globals->freeMemory(ptr);
+ fileFoundFl = false;
+ return NULL;
+ }
+
+ offsetVal += 23;
+ }
+
+ _vm->_globals->freeMemory(ptr);
+
+ if (secondaryFilename != "") {
+ if (!f.open(secondaryFilename))
+ error("CHARGE_FICHIER");
+
+ f.seek(_catalogPos);
+
+ byte *catData = _vm->_globals->allocMemory(_catalogSize);
+ if (catData == NULL)
+ error("CHARGE_FICHIER");
+
+ readStream(f, catData, _catalogSize);
+ f.close();
+ result = catData;
+ } else {
+ result = NULL;
+ }
+
+ return result;
+}
+
+/**
+ * Returns the size of a file. Throws an error if the file can't be found
+ */
+uint32 FileManager::fileSize(const Common::String &filename) {
+ Common::File f;
+ uint32 size;
+
+ if (!f.open(filename))
+ error("Could not find file %s", filename.c_str());
+
+ size = f.size();
+ f.close();
+
+ return size;
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/files.h b/engines/hopkins/files.h
new file mode 100644
index 0000000000..5e5eaa755c
--- /dev/null
+++ b/engines/hopkins/files.h
@@ -0,0 +1,58 @@
+/* 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 HOPKINS_FILES_H
+#define HOPKINS_FILES_H
+
+#include "common/scummsys.h"
+#include "common/hash-str.h"
+#include "common/str.h"
+#include "common/stream.h"
+
+namespace Hopkins {
+
+class HopkinsEngine;
+
+// RES_ANI = 4 has been removed because it's not used
+enum CatMode { RES_INI = 1, RES_REP = 2, RES_LIN = 3, RES_PER = 5,
+ RES_PIC = 6, RES_SAN = 7, RES_SLI = 8, RES_VOI = 9 };
+
+class FileManager {
+public:
+ uint32 _catalogPos;
+ uint32 _catalogSize;
+
+ HopkinsEngine *_vm;
+
+ FileManager(HopkinsEngine *vm);
+
+ bool fileExists(const Common::String &file);
+ byte *loadFile(const Common::String &file);
+ int readStream(Common::ReadStream &stream, void *buf, size_t nbytes);
+ void initCensorship();
+ byte *searchCat(const Common::String &file, CatMode mode, bool &fileFoundFl);
+ uint32 fileSize(const Common::String &filename);
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_GLOBALS_H */
diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp
new file mode 100644
index 0000000000..611327e9a8
--- /dev/null
+++ b/engines/hopkins/font.cpp
@@ -0,0 +1,495 @@
+/* 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 "hopkins/font.h"
+
+#include "hopkins/files.h"
+#include "hopkins/globals.h"
+#include "hopkins/graphics.h"
+#include "hopkins/hopkins.h"
+#include "hopkins/objects.h"
+
+#include "common/system.h"
+#include "common/file.h"
+#include "common/textconsole.h"
+
+namespace Hopkins {
+
+FontManager::FontManager(HopkinsEngine *vm) {
+ _vm = vm;
+ clearAll();
+}
+
+FontManager::~FontManager() {
+ _vm->_globals->freeMemory(_font);
+ _vm->_globals->freeMemory(_zoneText);
+}
+
+void FontManager::loadZoneText() {
+ switch (_vm->_globals->_language) {
+ case LANG_EN:
+ _zoneText = _vm->_fileIO->loadFile("ZONEAN.TXT");
+ break;
+ case LANG_FR:
+ _zoneText = _vm->_fileIO->loadFile("ZONE01.TXT");
+ break;
+ case LANG_SP:
+ _zoneText = _vm->_fileIO->loadFile("ZONEES.TXT");
+ break;
+ }
+}
+
+void FontManager::clearAll() {
+ _font = NULL;
+ _fontFixedHeight = 0;
+ _fontFixedWidth = 0;
+
+ for (int idx = 0; idx < 12; ++idx) {
+ Common::fill((byte *)&_text[idx], (byte *)&_text[idx] + sizeof(TxtItem), 0);
+
+ _textList[idx]._enabledFl = false;
+ _textList[idx]._height = 0;
+ _textList[idx]._width = 0;
+ _textList[idx]._pos.x = 0;
+ _textList[idx]._pos.y = 0;
+ }
+
+ for (int idx = 0; idx < 21; idx++)
+ _textSortArray[idx] = 0;
+
+ _oldName = Common::String("");
+ _indexName = Common::String("");
+
+ for (int idx = 0; idx < 4048; idx++)
+ _index[idx] = 0;
+
+ _tempText = NULL;
+ _zoneText = NULL;
+
+ _boxWidth = 240;
+}
+
+void FontManager::initData() {
+ _font = _vm->_fileIO->loadFile("FONTE3.SPR");
+ _fontFixedWidth = 12;
+ _fontFixedHeight = 21;
+ loadZoneText();
+}
+/**
+ * Display Text
+ */
+void FontManager::showText(int idx) {
+ if ((idx - 5) > MAX_TEXT)
+ error("Attempted to display text > MAX_TEXT.");
+
+ TxtItem &txt = _text[idx - 5];
+ txt._textOnFl = true;
+ txt._textLoadedFl = false;
+
+ txt._textBlock = _vm->_globals->freeMemory(txt._textBlock);
+}
+
+/**
+ * Hide text
+ */
+void FontManager::hideText(int idx) {
+ if ((idx - 5) > MAX_TEXT)
+ error("Attempted to display text > MAX_TEXT.");
+
+ TxtItem &txt = _text[idx - 5];
+ txt._textOnFl = false;
+ txt._textLoadedFl = false;
+ txt._textBlock = _vm->_globals->freeMemory(txt._textBlock);
+}
+
+/**
+ * Set Text Color
+ */
+void FontManager::setTextColor(int idx, byte colByte) {
+ _text[idx - 5]._color = colByte;
+}
+
+/**
+ * Set Text Optimal Color
+ */
+void FontManager::setOptimalColor(int idx1, int idx2, int idx3, int idx4) {
+ setTextColor(idx1, 255);
+ setTextColor(idx2, 255);
+ setTextColor(idx3, 255);
+ setTextColor(idx4, 253);
+}
+
+/**
+ * Init text structure
+ */
+void FontManager::initTextBuffers(int idx, int messageId, const Common::String &filename, int xp, int yp, int textType, int length, int color) {
+ assert(idx - 5 >= 0 && (idx - 5) <= MAX_TEXT);
+
+ TxtItem &txt = _text[idx - 5];
+ txt._textOnFl = false;
+ txt._filename = filename;
+ txt._pos.x = xp;
+ txt._pos.y = yp;
+ txt._messageId = messageId;
+ txt._textType = textType;
+ txt._length = length;
+ txt._color = color;
+}
+
+// Box
+void FontManager::box(int idx, int messageId, const Common::String &filename, int xp, int yp) {
+ int textPosX = xp;
+ if (idx < 0)
+ error("Bad number for text");
+ _fontFixedWidth = 11;
+
+ _boxWidth = 11 * _text[idx]._length;
+ if (_text[idx]._textLoadedFl) {
+ int textType = _text[idx]._textType;
+ if (textType != 6 && textType != 1 && textType != 3 && textType != 5) {
+ int yCurrent = yp + 5;
+ for (int lineNum = 0; lineNum < _text[idx]._lineCount; ++lineNum) {
+ displayText(xp + 5, yCurrent, _text[idx]._lines[lineNum], _text[idx]._color);
+ yCurrent += _fontFixedHeight + 1;
+ }
+ } else {
+ int height = _text[idx]._height;
+ int width = _text[idx]._width;
+ _vm->_graphicsMan->restoreSurfaceRect(
+ _vm->_graphicsMan->_frontBuffer,
+ _text[idx]._textBlock,
+ xp,
+ yp,
+ _text[idx]._width,
+ _text[idx]._height);
+ _vm->_graphicsMan->addDirtyRect(xp, yp, xp + width, yp + height);
+ }
+ } else {
+ int lineCount = 0;
+ for (int i = 0; i <= 19; i++)
+ _textSortArray[i] = 0;
+
+ _text[idx]._textLoadedFl = true;
+ Common::String file = filename;
+ if (strncmp(file.c_str(), _oldName.c_str(), strlen(file.c_str())) != 0) {
+ // Starting to access a new file, so read in the index file for the file
+ _oldName = file;
+ _indexName = Common::String(file.c_str(), file.size() - 3);
+ _indexName += "IND";
+
+ Common::File f;
+ if (!f.open(_indexName))
+ error("Error opening file - %s", _indexName.c_str());
+ int filesize = f.size();
+ for (int i = 0; i < (filesize / 4); ++i)
+ _index[i] = f.readUint32LE();
+ f.close();
+ }
+ int bufSize;
+ if (filename[0] != 'Z' || filename[1] != 'O') {
+ Common::File f;
+ if (!f.open(file))
+ error("Error opening file - %s", _indexName.c_str());
+
+ bufSize = 2048;
+ f.seek(_index[messageId]);
+
+ _tempText = _vm->_globals->allocMemory(2058);
+ if (_tempText == NULL)
+ error("Error allocating text");
+
+ Common::fill(&_tempText[0], &_tempText[2058], 0);
+ f.read(_tempText, 2048);
+ f.close();
+ } else {
+ bufSize = 100;
+ _tempText = _vm->_globals->allocMemory(110);
+ Common::fill(&_tempText[0], &_tempText[110], 0);
+ memcpy(_tempText, _zoneText + _index[messageId], 96);
+ WRITE_LE_UINT16((uint16 *)_tempText + 48, READ_LE_INT16(_zoneText + _index[messageId] + 96));
+ }
+ byte *curTempTextPtr = _tempText;
+ for (int i = 0; i < bufSize; i++) {
+ byte curChar = *curTempTextPtr;
+ if ((byte)(*curTempTextPtr + 46) > 27) {
+ if ((byte)(curChar + 80) > 27) {
+ if ((byte)(curChar - 65) <= 25 || (byte)(curChar - 97) <= 25)
+ curChar = 32;
+ } else {
+ curChar -= 79;
+ }
+ } else {
+ curChar += 111;
+ }
+ *curTempTextPtr = curChar;
+ curTempTextPtr++;
+ };
+
+ int textLength;
+ for (textLength = 0; textLength < bufSize; textLength++) {
+ byte curChar = _tempText[textLength];
+ if (curChar == '\r' || curChar == '\n') {
+ _tempText[textLength] = 0;
+ if (!_text[idx]._length)
+ break;
+ }
+ }
+
+ if (bufSize && bufSize > textLength) {
+ _text[idx]._length = textLength;
+ _boxWidth = 0;
+
+ for (int curStrIdx = 0; curStrIdx < textLength + 1; curStrIdx++) {
+ byte curChar = _tempText[curStrIdx];
+ if (curChar <= 31)
+ curChar = ' ';
+ _boxWidth += _vm->_objectsMan->getWidth(_font, curChar - 32);
+ }
+
+ _boxWidth += 2;
+ _text[idx]._pos.x = 320 - abs(_boxWidth / 2);
+ textPosX = _vm->_events->_startPos.x + _text[idx]._pos.x;
+ lineCount = 1;
+ _text[idx]._lines[0] = Common::String((const char *)_tempText, textLength);
+ } else {
+ if (!_boxWidth)
+ _boxWidth = 240;
+ int tempTextIdx = 0;
+ int lineSize;
+ byte curChar;
+ do {
+ int curLineSize = 0;
+ int ptrb = _boxWidth - 4;
+ for (;;) {
+ lineSize = curLineSize;
+ do
+ curChar = _tempText[tempTextIdx + curLineSize++];
+ while (curChar != ' ' && curChar != '%');
+ if (curLineSize >= ptrb / _fontFixedWidth) {
+ if (curChar == '%')
+ curChar = ' ';
+ break;
+ }
+ if (curChar == '%') {
+ lineSize = curLineSize;
+ break;
+ }
+ }
+
+ // WORKAROUND: Perhaps due to the usage of ScummVM strings here, recalculate what the
+ // actual length of the line to be copied will be. Otherwise, you can see artifacts,
+ // such as a single character beyond the end of string NULL.
+ int actualSize = 0;
+ while (actualSize < lineSize && _tempText[tempTextIdx + actualSize])
+ ++actualSize;
+
+ _text[idx]._lines[lineCount] = Common::String((const char *)_tempText + tempTextIdx, actualSize);
+ _textSortArray[lineCount++] = lineSize;
+
+ tempTextIdx += lineSize;
+ } while (curChar != '%');
+
+ for (int i = 0; i <= 19; i++) {
+ if (_textSortArray[i] <= 0) {
+ _textSortArray[i] = 0;
+ } else {
+ int ptrc = 0;
+ for (int curIdx = 0; curIdx < _textSortArray[i] - 1; curIdx++) {
+ Common::String &line = _text[idx]._lines[i];
+ byte curChar2 = (curIdx >= (int)line.size()) ? '\0' : line.c_str()[curIdx];
+ if (curChar2 <= 31)
+ curChar2 = ' ';
+ ptrc += _vm->_objectsMan->getWidth(_font, (byte)curChar2 - 32);
+ }
+ _textSortArray[i] = ptrc;
+ }
+ }
+ for (int i = 0; i <= 19; i++) {
+ for (int j = i + 1; j != i; j = (j + 1) % 20) {
+ if (_textSortArray[i] < _textSortArray[j])
+ _textSortArray[i] = 0;
+ }
+ };
+
+ for (int i = 0; i <= 19; i++) {
+ if (_textSortArray[i])
+ _boxWidth = _textSortArray[i];
+ }
+
+ if ((_text[idx]._textType < 2) || (_text[idx]._textType > 3)) {
+ int i;
+ for (i = xp - _vm->_events->_startPos.x; _boxWidth + i > 638 && i > -2 && _text[idx]._textType; i -= 2)
+ ;
+ _text[idx]._pos.x = i;
+ textPosX = _vm->_events->_startPos.x + i;
+ } else {
+ _text[idx]._pos.x = textPosX;
+ }
+ }
+ int posX = textPosX;
+ int posY = yp;
+ int saveWidth = _boxWidth + 10;
+ int saveHeight = (_fontFixedHeight + 1) * lineCount + 12;
+ if (_text[idx]._textType == 6) {
+ _text[idx]._pos.x = 315 - abs(saveWidth / 2);
+ textPosX = posX = _vm->_events->_startPos.x + _text[idx]._pos.x;
+ _text[idx]._pos.y = posY = 50;
+ }
+ int textType = _text[idx]._textType;
+ if (textType == 1 || textType == 3 || textType == 5 || textType == 6) {
+ int size = saveHeight * saveWidth;
+ byte *ptrd = _vm->_globals->allocMemory(size);
+ if (ptrd == NULL)
+ error("Cutting a block for text box (%d)", size);
+
+ _vm->_graphicsMan->copySurfaceRect(_vm->_graphicsMan->_frontBuffer, ptrd, posX, posY, saveWidth, saveHeight);
+ _vm->_graphicsMan->fillSurface(ptrd, _vm->_graphicsMan->_colorTable, size);
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, ptrd, posX, posY, saveWidth, saveHeight);
+ _vm->_globals->freeMemory(ptrd);
+
+ _vm->_graphicsMan->drawHorizontalLine(_vm->_graphicsMan->_frontBuffer, posX, posY, saveWidth, (byte)-2);
+ _vm->_graphicsMan->drawHorizontalLine(_vm->_graphicsMan->_frontBuffer, posX, saveHeight + posY, saveWidth, (byte)-2);
+ _vm->_graphicsMan->drawVerticalLine(_vm->_graphicsMan->_frontBuffer, posX, posY, saveHeight, (byte)-2);
+ _vm->_graphicsMan->drawVerticalLine(_vm->_graphicsMan->_frontBuffer, saveWidth + posX, posY, saveHeight, (byte)-2);
+ }
+ _text[idx]._lineCount = lineCount;
+ int textPosY = posY + 5;
+
+ for (int lineNum = 0; lineNum < lineCount; ++lineNum) {
+ displayText(textPosX + 5, textPosY, _text[idx]._lines[lineNum], _text[idx]._color);
+ textPosY += _fontFixedHeight + 1;
+ }
+
+ int blockWidth = saveWidth + 1;
+ int blockHeight = saveHeight + 1;
+
+ _text[idx]._width = blockWidth;
+ _text[idx]._height = blockHeight;
+ textType = _text[idx]._textType;
+ if (textType == 6 || textType == 1 || textType == 3 || textType == 5) {
+ _text[idx]._textBlock = _vm->_globals->freeMemory(_text[idx]._textBlock);
+ int blockSize = blockHeight * blockWidth;
+ byte *ptre = _vm->_globals->allocMemory(blockSize + 20);
+ if (ptre == NULL)
+ error("Cutting a block for text box (%d)", blockSize);
+
+ _text[idx]._textBlock = ptre;
+ _text[idx]._width = blockWidth;
+ _text[idx]._height = blockHeight;
+ _vm->_graphicsMan->copySurfaceRect(_vm->_graphicsMan->_frontBuffer, _text[idx]._textBlock, posX, posY, _text[idx]._width, blockHeight);
+ }
+ _tempText = _vm->_globals->freeMemory(_tempText);
+ }
+}
+
+/**
+ * Directly display text (using a VESA segment)
+ */
+void FontManager::displayTextVesa(int xp, int yp, const Common::String &message, int col) {
+ int charIndex;
+ int currentX = xp;
+
+ const char *srcP = message.c_str();
+ for (;;) {
+ byte currChar = *srcP++;
+ if (!currChar)
+ break;
+ if (currChar >= 32) {
+ charIndex = currChar - 32;
+ _vm->_graphicsMan->displayFont(_vm->_graphicsMan->_frontBuffer, _font, currentX, yp, currChar - 32, col);
+ currentX += _vm->_objectsMan->getWidth(_font, charIndex);
+ }
+ }
+
+ _vm->_graphicsMan->addDirtyRect(xp, yp, currentX, yp + 12);
+}
+
+/**
+ * Directly display text
+ */
+void FontManager::displayText(int xp, int yp, const Common::String &message, int col) {
+ for (uint idx = 0; idx < message.size(); ++idx) {
+ byte currentChar = (byte)message[idx];
+
+ if (currentChar > 31) {
+ int characterIndex = currentChar - 32;
+ _vm->_graphicsMan->displayFont(_vm->_graphicsMan->_frontBuffer, _font, xp, yp, characterIndex, col);
+ xp += _vm->_objectsMan->getWidth(_font, characterIndex);
+ }
+ }
+}
+
+/**
+ * Compute character width and render text using variable width fonts
+ */
+void FontManager::renderTextDisplay(int xp, int yp, const Common::String &msg, int col) {
+ const char *srcP = msg.c_str();
+ int charEndPosX = xp;
+ int fontCol = col;
+ byte curChar = *srcP++;
+ while (curChar) {
+ if (curChar == '&') {
+ fontCol = 2;
+ curChar = *srcP++;
+ }
+ if (curChar == '$') {
+ fontCol = 4;
+ curChar = *srcP++;
+ }
+ if (!curChar)
+ break;
+ if (curChar >= 32) {
+ byte printChar = curChar - 32;
+ _vm->_graphicsMan->displayFont(_vm->_graphicsMan->_frontBuffer, _font, charEndPosX, yp, printChar, fontCol);
+
+ // UGLY HACK: For some obscure reason, the BeOS and OS/2 versions use another font file, which doesn't have variable width.
+ // All the fonts have a length of 9, which results in completely broken text in the computer.
+ // This horrible workaround fixes the English versions of the game. So far, no other languages are known for those platforms.
+ // Just in case, all the accentuated characters are handled properly, which *should* be OK for the other languages too.
+ int charWidth;
+ if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) {
+ if ((curChar >= 'A' && curChar <= 'Z') || (curChar >= 'a' && curChar <= 'z' && curChar != 'm' && curChar != 'w') || (curChar >= '0' && curChar <= '9') || curChar == '*' || (curChar >= 128 && curChar <= 168))
+ charWidth = _vm->_objectsMan->getWidth(_font, printChar) - 1;
+ else if (curChar == 'm' || curChar == 'w')
+ charWidth = _vm->_objectsMan->getWidth(_font, printChar);
+ else
+ charWidth = 6;
+ } else
+ charWidth = _vm->_objectsMan->getWidth(_font, printChar);
+
+ int charStartPosX = charEndPosX;
+ charEndPosX += charWidth;
+ _vm->_graphicsMan->addDirtyRect(charStartPosX, yp, charEndPosX, yp + 12);
+ if (_vm->_events->_escKeyFl) {
+ _vm->_globals->_eventMode = EVENTMODE_IGNORE;
+ _vm->_events->refreshScreenAndEvents();
+ } else {
+ _vm->_globals->_eventMode = EVENTMODE_ALT;
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_globals->_eventMode = EVENTMODE_IGNORE;
+ }
+ }
+ curChar = *srcP++;
+ }
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/font.h b/engines/hopkins/font.h
new file mode 100644
index 0000000000..93e807ea4b
--- /dev/null
+++ b/engines/hopkins/font.h
@@ -0,0 +1,98 @@
+/* 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 HOPKINS_FONT_H
+#define HOPKINS_FONT_H
+
+#include "common/scummsys.h"
+#include "common/events.h"
+#include "common/str.h"
+
+namespace Hopkins {
+
+#define MAX_TEXT 11
+
+class HopkinsEngine;
+
+struct TxtItem {
+ bool _textOnFl;
+ Common::String _filename;
+ Common::Point _pos;
+ int _messageId;
+ int _lineCount;
+ Common::String _lines[10];
+ int _textType;
+ int _length;
+ byte *_textBlock;
+ int16 _width;
+ int16 _height;
+ bool _textLoadedFl;
+ int _color;
+};
+
+struct TxtItemList {
+ bool _enabledFl;
+ Common::Point _pos;
+ int16 _width;
+ int16 _height;
+};
+
+class FontManager {
+private:
+ HopkinsEngine *_vm;
+
+ void setTextColor(int idx, byte colByte);
+
+ int _textSortArray[21];
+ Common::String _oldName;
+ Common::String _indexName;
+ int _index[4048];
+ byte *_tempText;
+ byte *_zoneText;
+ int _boxWidth;
+
+ void loadZoneText();
+public:
+ byte *_font;
+ int _fontFixedWidth;
+ int _fontFixedHeight;
+ TxtItem _text[12];
+ TxtItemList _textList[12];
+
+ FontManager(HopkinsEngine *vm);
+ ~FontManager();
+ void clearAll();
+ void initData();
+
+ void showText(int idx);
+ void hideText(int idx);
+ void initTextBuffers(int idx, int messageId, const Common::String &filename, int xp, int yp, int textType, int length, int color);
+ void displayText(int xp, int yp, const Common::String &message, int col);
+ void displayTextVesa(int xp, int yp, const Common::String &message, int col);
+ void renderTextDisplay(int xp, int yp, const Common::String &msg, int col);
+ void setOptimalColor(int idx1, int idx2, int idx3, int idx4);
+ void box(int idx, int messageId, const Common::String &filename, int xp, int yp);
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_FONT_H */
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp
new file mode 100644
index 0000000000..2e7a2195d1
--- /dev/null
+++ b/engines/hopkins/globals.cpp
@@ -0,0 +1,215 @@
+/* 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 "hopkins/globals.h"
+
+#include "hopkins/files.h"
+#include "hopkins/font.h"
+#include "hopkins/graphics.h"
+#include "hopkins/hopkins.h"
+
+#include "common/textconsole.h"
+#include "common/file.h"
+
+namespace Hopkins {
+
+// Default data for the Hopkins array
+
+const int HOPKINS_PERSO_0[] = {
+ 0, -2, 0, -3, 0, -6, 0, -1, 0, -3, 0, -3, 0, -5, 0, -3, 0, -6, 0, -3, 0, -3, 0, -3,
+ 9, -4, 8, -4, 6, -2, 9, -2, 9, -3, 9, -3, 9, -4, 9, -2, 9, -2, 8, -2, 9, -3, 9, -2,
+ 13, 0, 13, 0, 13, 0, 13, 0, 14, 0, 13, 0, 13, 0, 12, 0, 12, 0, 14, 0, 13, 0, 14, 0,
+ 10, 3, 9, 3, 10, 4, 8, 2, 7, 1, 10, 2, 9, 2, 7, 4, 7, 3, 8, 0, 9, 1, 9, 1, 0, 4, 0,
+ 4, 0, 6, 0, 3, 0, 4, 0, 3, 0, 4, 0, 4, 0, 6, 0, 3, 0, 3, 0, 3
+};
+
+const int HOPKINS_PERSO_1[] = {
+ 0, -2, 0, -2, 0, -5, 0, -1, 0, -2, 0, -2, 0, -4, 0, -2, 0, -5, 0, -2, 0, -2, 0, -2,
+ 11, 0, 10, 0, 11, 0, 11, 0, 11, 0, 11, 0, 12, 0, 11, 0, 9, 0, 10, 0, 11, 0, 11, 0,
+ 11, 0, 10, 0, 11, 0, 11, 0, 11, 0, 11, 0, 12, 0, 11, 0, 9, 0, 10, 0, 11, 0, 11, 0,
+ 11, 0, 10, 0, 11, 0, 11, 0, 11, 0, 11, 0, 12, 0, 11, 0, 9, 0, 10, 0, 11, 0, 11, 0,
+ 0, 3, 0, 3, 0, 5, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 5, 0, 3, 0, 3, 0, 3
+};
+
+const int HOPKINS_PERSO_2[] = {
+ 0, -2, 0, 0, 0, -3, 0, -2, 0, -2, 0, -1, 0, -2, 0, -1, 0, -3, 0, -2, 0, -2, 0, -2,
+ 8, 0, 9, 0, 5, 0, 9, 0, 7, 0, 7, 0, 7, 0, 7, 0, 6, 0, 7, 0, 6, 0, 9, 0, 8, 0, 9, 0,
+ 5, 0, 9, 0, 7, 0, 7, 0, 7, 0, 7, 0, 6, 0, 7, 0, 6, 0, 9, 0, 8, 0, 9, 0, 5, 0, 9, 0,
+ 7, 0, 7, 0, 7, 0, 7, 0, 6, 0, 7, 0, 6, 0, 9, 0, 0, 2, 0, 0, 0, 2, 0, 1, 0, 2, 0, 2,
+ 0, 2, 0, 2, 0, 2, 0, 1, 0, 2, 0, 2
+};
+
+Globals::Globals(HopkinsEngine *vm) {
+ _vm = vm;
+
+ // Initialize array properties
+ for (int i = 0; i < 500; ++i)
+ _spriteSize[i] = 0;
+ for (int i = 0; i < 70; ++i)
+ Common::fill((byte *)&_hopkinsItem[i], (byte *)&_hopkinsItem[i] + sizeof(HopkinsItem), 0);
+
+ for (int i = 0; i < 36; ++i)
+ _inventory[i] = 0;
+
+ // Initialize fields
+ _language = LANG_EN;
+
+ _linuxEndDemoFl = false;
+ _speed = 1;
+ _eventMode = EVENTMODE_DEFAULT;
+ _exitId = 0;
+ _characterSpriteBuf = 0;
+ _screenId = 0;
+ _prevScreenId = 0;
+ _characterMaxPosY = 0;
+ _menuScrollSpeed = 0;
+ _menuSpeed = 0;
+ _menuSoundOff = 0;
+ _menuVoiceOff = 0;
+ _menuMusicOff = 0;
+ _menuTextOff = 0;
+ _menuDisplayType = 0;
+ _checkDistanceFl = false;
+ _characterType = 0;
+ _actionMoveTo = false;
+ _actionDirection = DIR_NONE;
+
+ _creditsStartX = -1;
+ _creditsEndX = -1;
+ _creditsStartY = -1;
+ _creditsEndY = -1;
+ _creditsPosY = 0;
+ _creditsLineNumb = 0;
+ memset(_creditsItem, 0, 12000);
+ _creditsStep = 0;
+
+ _oceanDirection = DIR_NONE;
+
+ // Initialize pointers
+ _levelSpriteBuf = NULL;
+ _saveData = NULL;
+ _answerBuffer = NULL;
+ _characterSpriteBuf = NULL;
+ _optionDialogSpr = NULL;
+
+ // Reset flags
+ _censorshipFl = false;
+ _disableInventFl = false;
+ _freezeCharacterFl = false;
+ _optionDialogFl = false;
+ _introSpeechOffFl = false;
+ _cityMapEnabledFl = false;
+
+ _baseMapColor = 50;
+ _curRoomNum = 0;
+}
+
+Globals::~Globals() {
+ freeMemory(_levelSpriteBuf);
+ freeMemory((byte *)_saveData);
+ freeMemory(_answerBuffer);
+ freeMemory(_characterSpriteBuf);
+ free(NULL);
+}
+
+void Globals::setConfig() {
+ // CHECKME: Should be in Globals() but it doesn't work
+ // The Polish version is a translation of the English version. The filenames are the same.
+ switch (_vm->getLanguage()) {
+ case Common::EN_ANY:
+ case Common::PL_POL:
+ _language = LANG_EN;
+ break;
+ case Common::FR_FRA:
+ _language = LANG_FR;
+ break;
+ case Common::ES_ESP:
+ _language = LANG_SP;
+ break;
+ default:
+ warning("Unknown language in internal language mapping");
+ break;
+ }
+ // End of CHECKME
+
+ switch (_language) {
+ case LANG_EN:
+ _zoneFilename = "ZONEAN.TXT";
+ _textFilename = "TEXTEAN.TXT";
+ break;
+ case LANG_FR:
+ _zoneFilename = "ZONE01.TXT";
+ _textFilename = "TEXTE01.TXT";
+ break;
+ case LANG_SP:
+ _zoneFilename = "ZONEES.TXT";
+ _textFilename = "TEXTEES.TXT";
+ break;
+ }
+}
+
+void Globals::clearAll() {
+ _vm->_fontMan->clearAll();
+ _vm->_dialog->clearAll();
+ _answerBuffer = NULL;
+ _levelSpriteBuf = NULL;
+ _saveData = NULL;
+ _vm->_objectsMan->_curObjectIndex = 0;
+
+ _vm->_linesMan->clearAll();
+ _vm->_objectsMan->clearAll();
+
+ _saveData = (Savegame *)malloc(sizeof(Savegame));
+ memset(_saveData, 0, sizeof(Savegame));
+
+ _vm->_events->clearAll();
+}
+
+void Globals::loadCharacterData() {
+ assert(_characterType >= 0 && _characterType <= 2);
+
+ const int *srcList[] = { HOPKINS_PERSO_0, HOPKINS_PERSO_1, HOPKINS_PERSO_2 };
+ const int *srcP = srcList[_characterType];
+
+ for (int idx = 0; idx < 240 / 4; ++idx) {
+ _hopkinsItem[idx]._speedX = *srcP++;
+ _hopkinsItem[idx]._speedY = *srcP++;
+ }
+
+ _vm->_objectsMan->resetOldFrameIndex();
+ _vm->_objectsMan->resetOldDirection();
+}
+
+byte *Globals::allocMemory(int count) {
+ byte *result = (byte *)malloc(count);
+ if (!result)
+ result = NULL;
+ return result;
+}
+
+byte *Globals::freeMemory(byte *p) {
+ if (p)
+ free(p);
+ return NULL;
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h
new file mode 100644
index 0000000000..f86a810c28
--- /dev/null
+++ b/engines/hopkins/globals.h
@@ -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.
+ *
+ */
+
+#ifndef HOPKINS_GLOBALS_H
+#define HOPKINS_GLOBALS_H
+
+#include "common/scummsys.h"
+#include "common/str.h"
+#include "common/events.h"
+
+namespace Hopkins {
+
+struct HopkinsItem {
+ int _speedX;
+ int _speedY;
+};
+
+struct CharacterLocation {
+ Common::Point _pos;
+ int _startSpriteIndex;
+ int _location;
+ int _zoomFactor;
+};
+
+enum SauvegardeOffset {
+ svLastMouseCursor = 1
+ , svLastZoneNum = 2
+ , svLastObjectIndex = 3
+ , svDialogField4 = 4
+ , svLastScreenId = 5
+ , svLastPrevScreenId = 6
+ , svLastInventoryItem = 8
+ , svLastInvMouseCursor = 9
+ , svLastSavegameSlot = 10
+ , svFreedHostageFl = 80
+ , svField94 = 94
+ , svField95 = 95
+ , svForestAvailableFl = 113
+ , svHutBurningFl = 117
+ , svHopkinsCloneFl = 121
+ , svAlternateSpriteFl = 122
+ , svHeavenGuardGoneFl = 123
+ , svField132 = 132
+ , svField133 = 133
+ , svGameWonFl = 135
+ , svCinemaCurtainCond1 = 166
+ , svCinemaCurtainCond2 = 167
+ , svBankAttackAnimPlayedFl = 170
+ , svCopCall1PlayedFl = 171
+ , svCopCall2PlayedFl = 172
+ , svField173 = 173
+ , svField176 = 176
+ , svPoolDogGoneFl = 177
+ , svCinemaDogGoneFl = 181
+ , svField183 = 183
+ , svField184 = 184
+ , svField186 = 186
+ , svField188 = 188
+ , svField200 = 200
+ , svField214 = 214
+ , svBombBoxOpenedFl = 220
+ , svBombDisarmedFl = 225
+ , svField228 = 228
+ , svField231 = 231
+ , svField253 = 253
+ , svField261 = 261
+ , svField270 = 270
+ , svField300 = 300
+ , svBaseElevatorCond1 = 311
+ , svBaseFireFl = 312
+ , svSecondElevatorAvailableFl = 318
+ , svField320 = 320
+ , svEscapeLeftJailFl = 330
+ , svField333 = 333
+ , svField338 = 338
+ , svField339 = 339
+ , svField340 = 340
+ , svField341 = 341
+ , svField352 = 352
+ , svField353 = 353
+ , svField354 = 354
+ , svField355 = 355
+ , svField356 = 356
+ , svField357 = 357
+ , svField399 = 399
+ , svField401 = 401
+};
+
+// As Script engine directly access savegame fields,
+// refactoring it in separated fields properly named is impossible
+struct Savegame {
+ byte _data[2050];
+ CharacterLocation _cloneHopkins;
+ CharacterLocation _realHopkins;
+ CharacterLocation _samantha;
+ int16 _inventory[35]; // Originally at offset 1300 of data array
+ int16 _mapCarPosX;
+ int16 _mapCarPosY;
+};
+
+struct CreditItem {
+ bool _actvFl;
+ int _color;
+ int _linePosY;
+ int _lineSize;
+ byte _line[50];
+};
+
+enum Language { LANG_EN = 0, LANG_FR = 1, LANG_SP = 2};
+
+enum PlayerCharacter { CHARACTER_HOPKINS = 0, CHARACTER_HOPKINS_CLONE = 1, CHARACTER_SAMANTHA = 2 };
+
+enum Directions {
+ DIR_NONE = -1,
+ DIR_UP = 1,
+ DIR_UP_RIGHT = 2,
+ DIR_RIGHT = 3,
+ DIR_DOWN_RIGHT = 4,
+ DIR_DOWN = 5,
+ DIR_DOWN_LEFT = 6,
+ DIR_LEFT = 7,
+ DIR_UP_LEFT = 8
+};
+
+enum EventMode {
+ EVENTMODE_DEFAULT = 0,
+ EVENTMODE_IGNORE = 1,
+ EVENTMODE_CREDITS = 3,
+ EVENTMODE_ALT = 4
+};
+
+class HopkinsEngine;
+
+/**
+ * Engine Globals
+ */
+class Globals {
+private:
+ HopkinsEngine *_vm;
+
+public:
+ bool _disableInventFl;
+ bool _cityMapEnabledFl;
+ bool _linuxEndDemoFl;
+ bool _censorshipFl;
+ bool _introSpeechOffFl;
+ int _exitId;
+ Directions _oceanDirection;
+ int _actionDirection;
+ int _inventory[36];
+ int _screenId;
+ int _prevScreenId;
+ int _characterMaxPosY;
+ int _baseMapColor;
+ int _spriteSize[500];
+ int _characterType;
+ uint _speed;
+ byte *_answerBuffer;
+ Savegame *_saveData;
+ Language _language;
+ HopkinsItem _hopkinsItem[70];
+
+ CreditItem _creditsItem[200];
+ int _creditsLineNumb;
+ int _creditsStep;
+ int _creditsPosY;
+ int _creditsStartX;
+ int _creditsEndX;
+ int _creditsStartY;
+ int _creditsEndY;
+
+ int _menuSpeed;
+ int _menuSoundOff;
+ int _menuTextOff;
+ int _menuVoiceOff;
+ int _menuMusicOff;
+ int _menuDisplayType;
+ int _menuScrollSpeed;
+
+ byte *_optionDialogSpr;
+ bool _optionDialogFl;
+
+ bool _actionMoveTo;
+ bool _freezeCharacterFl;
+ bool _checkDistanceFl;
+ byte *_characterSpriteBuf;
+ Common::String _zoneFilename;
+ Common::String _textFilename;
+ byte *_levelSpriteBuf;
+
+ EventMode _eventMode;
+
+ Globals(HopkinsEngine *vm);
+ ~Globals();
+ byte *allocMemory(int count);
+ byte *freeMemory(byte *p);
+ void setConfig();
+ void clearAll();
+ void loadCharacterData();
+
+ int _curRoomNum;
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_GLOBALS_H */
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
new file mode 100644
index 0000000000..f7d69ff1f2
--- /dev/null
+++ b/engines/hopkins/graphics.cpp
@@ -0,0 +1,1855 @@
+/* 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 "hopkins/graphics.h"
+
+#include "hopkins/files.h"
+#include "hopkins/globals.h"
+#include "hopkins/hopkins.h"
+
+#include "common/system.h"
+#include "graphics/palette.h"
+#include "graphics/decoders/pcx.h"
+#include "common/file.h"
+#include "common/rect.h"
+#include "engines/util.h"
+
+namespace Hopkins {
+
+GraphicsManager::GraphicsManager(HopkinsEngine *vm) {
+ _vm = vm;
+
+ _lockCounter = 0;
+ _initGraphicsFl = false;
+ _screenWidth = _screenHeight = 0;
+ _screenLineSize = 0;
+ _palettePixels = NULL;
+ _lineNbr = 0;
+ _videoPtr = NULL;
+ _scrollOffset = 0;
+ _scrollPosX = 0;
+ _largeScreenFl = false;
+ _oldScrollPosX = 0;
+ _backBuffer = NULL;
+ _frontBuffer = NULL;
+ _screenBuffer = NULL;
+ _backupScreen = NULL;
+ _showDirtyRects = false;
+
+ _lineNbr2 = 0;
+ _enlargedX = _enlargedY = 0;
+ _enlargedXFl = _enlargedYFl = false;
+ _fadeDefaultSpeed = 15;
+ _fadingFl = false;
+ _skipVideoLockFl = false;
+ _scrollStatus = 0;
+ _minX = 0;
+ _minY = 20;
+ _maxX = SCREEN_WIDTH * 2;
+ _maxY = SCREEN_HEIGHT - 20;
+ _posXClipped = _posYClipped = 0;
+ clip_x1 = clip_y1 = 0;
+ _clipFl = false;
+ _reduceX = _reducedY = 0;
+ _zoomOutFactor = 0;
+ _width = 0;
+ _specialWidth = 0;
+
+ Common::fill(&SD_PIXELS[0], &SD_PIXELS[PALETTE_SIZE * 2], 0);
+ Common::fill(&_colorTable[0], &_colorTable[PALETTE_EXT_BLOCK_SIZE], 0);
+ Common::fill(&_palette[0], &_palette[PALETTE_EXT_BLOCK_SIZE], 0);
+ Common::fill(&_oldPalette[0], &_oldPalette[PALETTE_EXT_BLOCK_SIZE], 0);
+
+ if (_vm->getIsDemo()) {
+ if (_vm->getPlatform() == Common::kPlatformLinux)
+ // CHECKME: Should be false?
+ MANU_SCROLL = true;
+ else
+ MANU_SCROLL = false;
+ _scrollSpeed = 16;
+ } else {
+ MANU_SCROLL = false;
+ _scrollSpeed = 32;
+ }
+
+ _noFadingFl = false;
+}
+
+GraphicsManager::~GraphicsManager() {
+ _vm->_globals->freeMemory(_backBuffer);
+ _vm->_globals->freeMemory(_frontBuffer);
+ _vm->_globals->freeMemory(_screenBuffer);
+ _vm->_globals->freeMemory(_backupScreen);
+}
+
+void GraphicsManager::setGraphicalMode(int width, int height) {
+ if (!_initGraphicsFl) {
+ Graphics::PixelFormat pixelFormat16(2, 5, 6, 5, 0, 11, 5, 0, 0);
+ initGraphics(width, height, true, &pixelFormat16);
+
+ // Init surfaces
+ _backBuffer = _vm->_globals->allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
+ _frontBuffer = _vm->_globals->allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
+ _screenBuffer = _vm->_globals->allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
+
+ _videoPtr = NULL;
+ _screenWidth = width;
+ _screenHeight = height;
+
+ _screenLineSize = SCREEN_WIDTH * 2;
+ _palettePixels = SD_PIXELS;
+ _lineNbr = width;
+
+ _initGraphicsFl = true;
+ } else {
+ error("setGraphicalMode called multiple times");
+ }
+}
+
+/**
+ * (try to) Lock Screen
+ */
+void GraphicsManager::lockScreen() {
+ if (!_skipVideoLockFl) {
+ if (_lockCounter++ == 0) {
+ _videoPtr = _screenBuffer;
+ _screenLineSize = SCREEN_WIDTH * 2;
+ }
+ }
+}
+
+/**
+ * (try to) Unlock Screen
+ */
+void GraphicsManager::unlockScreen() {
+ assert(_videoPtr);
+ if (--_lockCounter == 0) {
+ _videoPtr = NULL;
+ }
+}
+
+/**
+ * Clear Screen
+ */
+void GraphicsManager::clearScreen() {
+ lockScreen();
+ assert(_videoPtr);
+
+ Common::fill(_screenBuffer, _screenBuffer + _screenLineSize * _screenHeight, 0);
+ addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ unlockScreen();
+}
+
+void GraphicsManager::clearVesaScreen() {
+ Common::fill(_backBuffer, _backBuffer + _screenLineSize * _screenHeight, 0);
+ Common::fill(_frontBuffer, _frontBuffer + _screenLineSize * _screenHeight, 0);
+ addDirtyRect(Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
+}
+
+/**
+ * Load Image
+ */
+void GraphicsManager::loadImage(const Common::String &file) {
+ Common::String filename = Common::String::format("%s.PCX", file.c_str());
+ loadScreen(filename);
+ initColorTable(165, 170, _palette);
+}
+
+/**
+ * Load VGA Image
+ */
+void GraphicsManager::loadVgaImage(const Common::String &file) {
+ setScreenWidth(SCREEN_WIDTH);
+ clearScreen();
+ loadPCX320(_backBuffer, file, _palette);
+ memcpy(_frontBuffer, _backBuffer, 64000);
+ setScreenWidth(320);
+ _maxX = 320;
+
+ copy16bFromSurfaceScaleX2(_frontBuffer);
+ addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+
+ fadeInBreakout();
+}
+
+/**
+ * Load Screen
+ */
+void GraphicsManager::loadScreen(const Common::String &file) {
+ Common::File f;
+ assert(!_videoPtr);
+
+ bool flag = true;
+ bool fileFoundFl = false;
+ _vm->_fileIO->searchCat(file, RES_PIC, fileFoundFl);
+ if (!fileFoundFl) {
+ if (!f.open(file))
+ error("loadScreen - %s", file.c_str());
+
+ f.seek(0, SEEK_END);
+ f.close();
+ flag = false;
+ }
+
+ scrollScreen(0);
+ loadPCX640(_backBuffer, file, _palette, flag);
+
+ _scrollPosX = 0;
+ _oldScrollPosX = 0;
+ clearPalette();
+
+ if (!_largeScreenFl) {
+ setScreenWidth(SCREEN_WIDTH);
+ _maxX = SCREEN_WIDTH;
+ clearScreen();
+
+ copy16BitRect(_backBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ } else {
+ setScreenWidth(SCREEN_WIDTH * 2);
+ _maxX = SCREEN_WIDTH * 2;
+ clearScreen();
+
+ if (MANU_SCROLL)
+ copy16BitRect(_backBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ }
+
+ memcpy(_frontBuffer, _backBuffer, SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
+}
+
+void GraphicsManager::initColorTable(int minIndex, int maxIndex, byte *palette) {
+ for (int idx = 0; idx < 256; ++idx)
+ _colorTable[idx] = idx;
+
+ translateSurface(_colorTable, palette, 256, minIndex, maxIndex);
+
+ for (int idx = 0; idx < 256; ++idx) {
+ byte v = _colorTable[idx];
+ if (v > 27 || !v)
+ _colorTable[idx] = 0;
+ }
+
+ _colorTable[0] = 1;
+}
+
+/**
+ * Scroll Screen
+ */
+void GraphicsManager::scrollScreen(int amount) {
+ int result = CLIP(amount, 0, SCREEN_WIDTH);
+ _vm->_events->_startPos.x = result;
+ _scrollOffset = result;
+ _scrollPosX = result;
+}
+
+void GraphicsManager::translateSurface(byte *destP, const byte *srcP, int count, int minThreshold, int maxThreshold) {
+ byte *destPosP = destP;
+ for (int idx = 0; idx < count; ++idx) {
+ int palIndex = *destPosP;
+ int srcOffset = 3 * palIndex;
+ int col1 = srcP[srcOffset] + srcP[srcOffset + 1] + srcP[srcOffset + 2];
+
+ for (int idx2 = 0; idx2 < 38; ++idx2) {
+ srcOffset = 3 * idx2;
+ int col2 = srcP[srcOffset] + srcP[srcOffset + 1] + srcP[srcOffset + 2];
+
+ col2 += minThreshold;
+ if (col2 < col1)
+ continue;
+
+ col2 -= maxThreshold;
+ if (col2 > col1)
+ continue;
+
+ *destPosP = (idx2 == 0) ? 1 : idx2;
+ break;
+ }
+ destPosP++;
+ }
+}
+
+void GraphicsManager::fillSurface(byte *surface, byte *col, int size) {
+ byte dataVal;
+
+ byte *dataP = surface;
+ for (int count = size - 1; count; count--){
+ dataVal = *dataP;
+ *dataP = col[dataVal];
+ dataP++;
+ }
+}
+
+void GraphicsManager::loadPCX640(byte *surface, const Common::String &file, byte *palette, bool typeFlag) {
+ Common::File f;
+ Graphics::PCXDecoder pcxDecoder;
+
+ // Clear the passed surface
+ memset(surface, 0, SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
+
+ if (typeFlag) {
+ // Load PCX from within the PIC resource
+ if (!f.open("PIC.RES"))
+ error("Error opening PIC.RES.");
+ f.seek(_vm->_fileIO->_catalogPos);
+ } else {
+ // Load stand alone PCX file
+ if (!f.open(file))
+ error("Error opening PCX %s.", file.c_str());
+ }
+
+ // Decode the PCX
+ if (!pcxDecoder.loadStream(f))
+ error("Error decoding PCX %s", file.c_str());
+
+ const Graphics::Surface *s = pcxDecoder.getSurface();
+
+ // Copy out the dimensions and pixels of the decoded surface
+ _largeScreenFl = s->w > SCREEN_WIDTH;
+ Common::copy((byte *)s->pixels, (byte *)s->pixels + (s->pitch * s->h), surface);
+
+ // Copy out the palette
+ const byte *palSrc = pcxDecoder.getPalette();
+ Common::copy((const byte *)palSrc, (const byte *)palSrc + PALETTE_BLOCK_SIZE, palette);
+
+ f.close();
+}
+
+void GraphicsManager::loadPCX320(byte *surface, const Common::String &file, byte *palette) {
+ Common::File f;
+ if (!f.open(file))
+ error("File not found - %s", file.c_str());
+
+ size_t filesize = f.size();
+
+ f.read(surface, 128);
+ int imageSize = filesize - 896;
+ byte *ptr = _vm->_globals->allocMemory(65024);
+ size_t curBufSize;
+ int imageNumb;
+ int imageDataSize;
+ if (imageSize >= 64000) {
+ imageNumb = imageSize / 64000 + 1;
+ imageDataSize = abs(64000 * (imageSize / 64000) - imageSize);
+ f.read(ptr, 64000);
+ curBufSize = 64000;
+ } else {
+ imageNumb = 1;
+ imageDataSize = imageSize;
+ f.read(ptr, imageSize);
+ curBufSize = imageSize;
+ }
+ imageNumb--;
+ size_t curByteIdx = 0;
+ for (int i = 0; i < 64000; i++) {
+ if (curByteIdx == curBufSize) {
+ curByteIdx = 0;
+ --imageNumb;
+ curBufSize = 64000;
+ if (!imageNumb)
+ curBufSize = imageDataSize;
+ f.read(ptr, curBufSize);
+ }
+ byte curByte = ptr[curByteIdx++];
+ if (curByte > 192) {
+ int repeatCount = curByte - 192;
+ if (curByteIdx == curBufSize) {
+ curByteIdx = 0;
+ --imageNumb;
+ curBufSize = 64000;
+ if (imageNumb == 1)
+ curBufSize = imageDataSize;
+ f.read(ptr, curBufSize);
+ }
+ curByte = ptr[curByteIdx++];
+ for (; repeatCount; repeatCount--)
+ surface[i++] = curByte;
+
+ --i;
+ } else {
+ surface[i] = curByte;
+ }
+ }
+
+ f.seek(filesize - 768);
+ f.read(palette, 768);
+ f.close();
+
+ _vm->_globals->freeMemory(ptr);
+}
+
+// Clear Palette
+void GraphicsManager::clearPalette() {
+ // As weird as it sounds, this is what the original Linux executable does,
+ // and not a full array clear.
+ SD_PIXELS[0] = 0;
+}
+
+void GraphicsManager::setScreenWidth(int pitch) {
+ _lineNbr = _lineNbr2 = pitch;
+}
+
+/**
+ * Copies data from a 8-bit palette surface into the 16-bit screen
+ */
+void GraphicsManager::copy16BitRect(const byte *surface, int xs, int ys, int width, int height, int destX, int destY) {
+ lockScreen();
+
+ assert(_videoPtr);
+ const byte *srcP = xs + _lineNbr2 * ys + surface;
+ byte *destP = (byte *)_videoPtr + destX * 2 + _screenLineSize * destY;
+
+ for (int yp = 0; yp < height; ++yp) {
+ // Copy over the line, using the source pixels as lookups into the pixels palette
+ const byte *lineSrcP = srcP;
+ byte *lineDestP = destP;
+
+ for (int xp = 0; xp < width; ++xp) {
+ lineDestP[0] = _palettePixels[lineSrcP[0] * 2];
+ lineDestP[1] = _palettePixels[(lineSrcP[0] * 2) + 1];
+ lineDestP += 2;
+ lineSrcP++;
+ }
+ // Move to the start of the next line
+ srcP += _lineNbr2;
+ destP += _screenLineSize;
+ }
+
+ unlockScreen();
+ addRefreshRect(destX, destY, destX + width, destY + height);
+}
+
+void GraphicsManager::copy8BitRect(const byte *surface, int xp, int yp, int width, int height, int destX, int destY) {
+ int xCtr;
+ const byte *palette;
+ int savedXCount;
+ byte *loopDestP;
+ const byte *loopSrcP;
+ int yCtr;
+
+ assert(_videoPtr);
+ const byte *srcP = surface + xp + 320 * yp;
+ byte *destP = (byte *)_videoPtr + 30 * _screenLineSize + destX + destX + destX + destX + _screenLineSize * 2 * destY;
+ int yCount = height;
+ int xCount = width;
+
+ do {
+ yCtr = yCount;
+ xCtr = xCount;
+ loopSrcP = srcP;
+ loopDestP = destP;
+ savedXCount = xCount;
+ palette = _palettePixels;
+
+ do {
+ destP[0] = destP[2] = destP[_screenLineSize] = destP[_screenLineSize + 2] = palette[2 * srcP[0]];
+ destP[1] = destP[3] = destP[_screenLineSize + 1] = destP[_screenLineSize + 3] = palette[(2 * srcP[0]) + 1];
+ ++srcP;
+ destP += 4;
+ --xCtr;
+ } while (xCtr);
+
+ xCount = savedXCount;
+ destP = loopDestP + _screenLineSize * 2;
+ srcP = loopSrcP + 320;
+ yCount = yCtr - 1;
+ } while (yCtr != 1);
+
+ addRefreshRect(destX, destY, destX + width, destY + width);
+}
+
+/**
+ * Fade in. the step number is determine by parameter.
+ */
+void GraphicsManager::fadeIn(const byte *palette, int step, const byte *surface) {
+ byte palData2[PALETTE_BLOCK_SIZE];
+ int fadeStep;
+ if (step > 1)
+ fadeStep = step;
+ else
+ fadeStep = 2;
+ // Initialize temporary palette
+ Common::fill(&palData2[0], &palData2[PALETTE_BLOCK_SIZE], 0);
+
+ // Set current palette to black
+ setPaletteVGA256(palData2);
+
+ // Loop through fading in the palette
+ for (int fadeIndex = 0; fadeIndex < fadeStep; ++fadeIndex) {
+ for (int palOffset = 0; palOffset < PALETTE_BLOCK_SIZE; palOffset += 3) {
+ palData2[palOffset + 0] = fadeIndex * palette[palOffset + 0] / (fadeStep - 1);
+ palData2[palOffset + 1] = fadeIndex * palette[palOffset + 1] / (fadeStep - 1);
+ palData2[palOffset + 2] = fadeIndex * palette[palOffset + 2] / (fadeStep - 1);
+ }
+
+ // Set the transition palette and refresh the screen
+ setPaletteVGA256(palData2);
+ copy16BitRect(surface, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ updateScreen();
+
+ // Added a delay in order to see the fading
+ _vm->_events->delay(20);
+ }
+
+ // Set the final palette
+ setPaletteVGA256(palette);
+
+ // Refresh the screen
+ copy16BitRect(surface, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ updateScreen();
+}
+
+/**
+ * Fade out. the step number is determine by parameter.
+ */
+void GraphicsManager::fadeOut(const byte *palette, int step, const byte *surface) {
+ byte palData[PALETTE_BLOCK_SIZE];
+ if ((step > 1) && (palette) && (!_vm->_events->_escKeyFl)) {
+ int fadeStep = step;
+ for (int fadeIndex = 0; fadeIndex < fadeStep; fadeIndex++) {
+ for (int palOffset = 0; palOffset < PALETTE_BLOCK_SIZE; palOffset += 3) {
+ palData[palOffset + 0] = (fadeStep - fadeIndex - 1) * palette[palOffset + 0] / (fadeStep - 1);
+ palData[palOffset + 1] = (fadeStep - fadeIndex - 1) * palette[palOffset + 1] / (fadeStep - 1);
+ palData[palOffset + 2] = (fadeStep - fadeIndex - 1) * palette[palOffset + 2] / (fadeStep - 1);
+ }
+
+ setPaletteVGA256(palData);
+ copy16BitRect(surface, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ updateScreen();
+
+ _vm->_events->delay(20);
+ }
+ }
+
+ // No initial palette, or end of fading
+ for (int i = 0; i < PALETTE_BLOCK_SIZE; i++)
+ palData[i] = 0;
+
+ setPaletteVGA256(palData);
+ copy16BitRect(surface, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+
+ updateScreen();
+}
+
+/**
+ * Short fade in. The step number is 1, the default step number is also set to 1.
+ */
+void GraphicsManager::fadeInShort() {
+ _fadeDefaultSpeed = 1;
+ fadeIn(_palette, 1, (const byte *)_frontBuffer);
+}
+
+/**
+ * Short fade out. The step number is 1, the default step number is also set to 1.
+ */
+void GraphicsManager::fadeOutShort() {
+ _fadeDefaultSpeed = 1;
+ fadeOut(_palette, 1, (const byte *)_frontBuffer);
+}
+
+/**
+ * Long fade in. The step number is 20, the default step number is also set to 15.
+ */
+void GraphicsManager::fadeInLong() {
+ _fadeDefaultSpeed = 15;
+ fadeIn(_palette, 20, (const byte *)_frontBuffer);
+}
+
+/**
+ * Long fade out. The step number is 20, the default step number is also set to 15.
+ */
+void GraphicsManager::fadeOutLong() {
+ _fadeDefaultSpeed = 15;
+ fadeOut(_palette, 20, (const byte *)_frontBuffer);
+}
+
+/**
+ * Fade in. The step number used is the default step number.
+ */
+void GraphicsManager::fadeInDefaultLength(const byte *surface) {
+ assert(surface);
+ fadeIn(_palette, _fadeDefaultSpeed, surface);
+}
+
+/**
+ * Fade out. The step number used is the default step number.
+ */
+void GraphicsManager::fadeOutDefaultLength(const byte *surface) {
+ assert(surface);
+ fadeOut(_palette, _fadeDefaultSpeed, surface);
+}
+
+/**
+ * Fade in used by for the breakout mini-game
+ */
+void GraphicsManager::fadeInBreakout() {
+ setPaletteVGA256(_palette);
+ copy16bFromSurfaceScaleX2(_frontBuffer);
+ updateScreen();
+}
+
+/**
+ * Fade out used by for the breakout mini-game
+ */
+void GraphicsManager::fadeOutBreakout() {
+ byte palette[PALETTE_EXT_BLOCK_SIZE];
+
+ memset(palette, 0, PALETTE_EXT_BLOCK_SIZE);
+ setPaletteVGA256(palette);
+ copy16bFromSurfaceScaleX2(_frontBuffer);
+ updateScreen();
+}
+
+void GraphicsManager::setPaletteVGA256(const byte *palette) {
+ changePalette(palette);
+}
+
+void GraphicsManager::setPaletteVGA256WithRefresh(const byte *palette, const byte *surface) {
+ changePalette(palette);
+ copy16BitRect(surface, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ updateScreen();
+}
+
+void GraphicsManager::setColorPercentage(int palIndex, int r, int g, int b) {
+ int palOffset = 3 * palIndex;
+ _palette[palOffset] = 255 * r / 100;
+ _palette[palOffset + 1] = 255 * g / 100;
+ _palette[palOffset + 2] = 255 * b / 100;
+}
+
+void GraphicsManager::setColorPercentage2(int palIndex, int r, int g, int b) {
+ int rv = 255 * r / 100;
+ int gv = 255 * g / 100;
+ int bv = 255 * b / 100;
+
+ int palOffset = 3 * palIndex;
+ _palette[palOffset] = rv;
+ _palette[palOffset + 1] = gv;
+ _palette[palOffset + 2] = bv;
+
+ WRITE_LE_UINT16(&SD_PIXELS[2 * palIndex], mapRGB(rv, gv, bv));
+}
+
+void GraphicsManager::changePalette(const byte *palette) {
+ const byte *srcP = &palette[0];
+ for (int idx = 0; idx < PALETTE_SIZE; ++idx, srcP += 3) {
+ WRITE_LE_UINT16(&SD_PIXELS[2 * idx], mapRGB(srcP[0], srcP[1], srcP[2]));
+ }
+}
+
+uint16 GraphicsManager::mapRGB(byte r, byte g, byte b) {
+ Graphics::PixelFormat format = g_system->getScreenFormat();
+
+ return (r >> format.rLoss) << format.rShift
+ | (g >> format.gLoss) << format.gShift
+ | (b >> format.bLoss) << format.bShift;
+}
+
+void GraphicsManager::updateScreen() {
+ // TODO: Is this okay here?
+ // Display any aras of the screen that need refreshing
+ displayDirtyRects();
+ displayRefreshRects();
+
+ // Update the screen
+ g_system->updateScreen();
+}
+
+void GraphicsManager::copyWinscanVbe3(const byte *srcData, byte *destSurface) {
+ byte srcByte;
+ byte destLen1;
+ byte *destSlice1P;
+ byte destLen2;
+ byte *destSlice2P;
+
+ int rleValue = 0;
+ int destOffset = 0;
+ const byte *srcP = srcData;
+ for (;;) {
+ srcByte = srcP[0];
+ if (srcByte == kByteStop)
+ return;
+ if (srcByte == 211) {
+ destLen1 = srcP[1];
+ rleValue = srcP[2];
+ destSlice1P = destOffset + destSurface;
+ destOffset += destLen1;
+ memset(destSlice1P, rleValue, destLen1);
+ srcP += 3;
+ } else if (srcByte < 222) {
+ if (srcByte > 211) {
+ destLen2 = (byte)(srcP[0] + 45);
+ rleValue = srcP[1];
+ destSlice2P = destOffset + destSurface;
+ destOffset += destLen2;
+ memset(destSlice2P, rleValue, destLen2);
+ srcP += 2;
+ } else {
+ destSurface[destOffset] = srcByte;
+ ++srcP;
+ ++destOffset;
+ }
+ } else if (srcByte < kSetOffset) {
+ destOffset += (byte)(srcP[0] + 35);
+ srcP++;
+ } else if (srcByte == k8bVal) {
+ destOffset += srcP[1];
+ srcP += 2;
+ } else if (srcByte == k16bVal) {
+ destOffset += READ_LE_UINT16(srcP + 1);
+ srcP += 3;
+ } else {
+ destOffset += READ_LE_UINT32(srcP + 1);
+ srcP += 5;
+ }
+ }
+}
+
+void GraphicsManager::copyVideoVbe16(const byte *srcData) {
+ const byte *srcP = srcData;
+ int destOffset = 0;
+
+ lockScreen();
+ assert(_videoPtr);
+
+ for (;;) {
+ byte srcByte = srcP[0];
+ if (srcByte >= 222) {
+ if (srcByte == kByteStop)
+ break;
+
+ if (srcByte < kSetOffset) {
+ destOffset += srcByte - 221;
+ srcByte = *++srcP;
+ } else if (srcByte == k8bVal) {
+ destOffset += srcP[1];
+ srcByte = srcP[2];
+ srcP += 2;
+ } else if (srcByte == k16bVal) {
+ destOffset += READ_LE_UINT16(srcP + 1);
+ srcByte = srcP[3];
+ srcP += 3;
+ } else {
+ destOffset += READ_LE_UINT32(srcP + 1);
+ srcByte = srcP[5];
+ srcP += 5;
+ }
+ }
+
+ if (destOffset > SCREEN_WIDTH * SCREEN_HEIGHT) {
+ warning("HACK: Stopping anim, out of bounds - 0x%x %d", srcByte, destOffset);
+ break;
+ }
+
+ if (srcByte > 210) {
+ if (srcByte == 211) {
+ int pixelCount = srcP[1];
+ int pixelIndex = srcP[2];
+ byte *destP = (byte *)_videoPtr + destOffset * 2;
+ destOffset += pixelCount;
+
+ while (pixelCount--) {
+ destP[0] = _palettePixels[2 * pixelIndex];
+ destP[1] = _palettePixels[(2 * pixelIndex) + 1];
+ destP += 2;
+ }
+
+ srcP += 3;
+ } else {
+ int pixelCount = srcByte - 211;
+ int pixelIndex = srcP[1];
+ byte *destP = (byte *)_videoPtr + destOffset * 2;
+ destOffset += pixelCount;
+
+ while (pixelCount--) {
+ destP[0] = _palettePixels[2 * pixelIndex];
+ destP[1] = _palettePixels[(2 * pixelIndex) + 1];
+ destP += 2;
+ }
+
+ srcP += 2;
+ }
+ } else {
+ byte *destP = (byte *)_videoPtr + destOffset * 2;
+ destP[0] = _palettePixels[2 * srcByte];
+ destP[1] = _palettePixels[(2 * srcByte) + 1];
+ ++srcP;
+ ++destOffset;
+ }
+ }
+ unlockScreen();
+}
+
+void GraphicsManager::copyVideoVbe16a(const byte *srcData) {
+ byte srcByte;
+ int destOffset = 0;
+ const byte *srcP = srcData;
+
+ lockScreen();
+ for (;;) {
+ srcByte = srcP[0];
+ if (srcByte == kByteStop)
+ break;
+ if (srcP[0] > kByteStop) {
+ if (srcByte == k8bVal) {
+ destOffset += srcP[1];
+ srcByte = srcP[2];
+ srcP += 2;
+ } else if (srcByte == k16bVal) {
+ destOffset += READ_LE_UINT16(srcP + 1);
+ srcByte = srcP[3];
+ srcP += 3;
+ } else {
+ destOffset += READ_LE_UINT32(srcP + 1);
+ srcByte = srcP[5];
+ srcP += 5;
+ }
+ }
+
+ WRITE_LE_UINT16((byte *)_videoPtr + destOffset * 2, READ_LE_UINT16(_palettePixels + 2 * srcByte));
+ ++srcP;
+ ++destOffset;
+ }
+ unlockScreen();
+}
+
+void GraphicsManager::copySurfaceRect(const byte *srcSurface, byte *destSurface, int xs, int ys, int width, int height) {
+ const byte *srcP;
+ byte *destP;
+ int rowCount;
+ int rowCount2;
+
+ // TODO: This code in the original is potentially dangerous, as it doesn't clip the area to within
+ // the screen, and so thus can read areas outside of the allocated surface buffer
+ srcP = xs + _lineNbr2 * ys + srcSurface;
+ destP = destSurface;
+ rowCount = height;
+ do {
+ rowCount2 = rowCount;
+ if (width & 1) {
+ memcpy(destP, srcP, width);
+ srcP += width;
+ destP += width;
+ } else if (width & 2) {
+ for (int i = width >> 1; i; --i) {
+ destP[0] = srcP[0];
+ destP[1] = srcP[1];
+ srcP += 2;
+ destP += 2;
+ }
+ } else {
+ memcpy(destP, srcP, 4 * (width >> 2));
+ srcP += 4 * (width >> 2);
+ destP += 4 * (width >> 2);
+ }
+ srcP = _lineNbr2 + srcP - width;
+ rowCount = rowCount2 - 1;
+ } while (rowCount2 != 1);
+}
+
+/**
+ * Draws a sprite onto the screen
+ * @param surface Destination surface
+ * @param spriteData The raw data for a sprite set
+ * @param xp X co-ordinate. For some reason, starts from 300 = first column
+ * @param yp Y co-ordinate. FOr some reason, starts from 300 = top row
+ * @param spriteIndex Index of the sprite to draw
+ */
+void GraphicsManager::drawVesaSprite(byte *surface, const byte *spriteData, int xp, int yp, int spriteIndex) {
+ // Get a pointer to the start of the desired sprite
+ const byte *spriteP = spriteData + 3;
+ for (int i = spriteIndex; i; --i)
+ spriteP += READ_LE_UINT32(spriteP) + 16;
+
+ _posXClipped = 0;
+ _posYClipped = 0;
+ _clipFl = false;
+
+ spriteP += 4;
+ int width = READ_LE_UINT16(spriteP);
+ spriteP += 2;
+ int height = READ_LE_UINT16(spriteP);
+
+ // Clip X
+ clip_x1 = width;
+ if ((xp + width) <= _minX + 300)
+ return;
+ if (xp < _minX + 300) {
+ _posXClipped = _minX + 300 - xp;
+ _clipFl = true;
+ }
+
+ // Clip Y
+ clip_y1 = height;
+ if (yp <= 0)
+ return;
+ if (yp < _minY + 300) {
+ _posYClipped = _minY + 300 - yp;
+ _clipFl = true;
+ }
+
+ // Clip X1
+ if (xp >= _maxX + 300)
+ return;
+ if (xp + width > _maxX + 300) {
+ int xAmount = width + 10 - (xp + width - (_maxX + 300));
+ if (xAmount <= 10)
+ return;
+
+ clip_x1 = xAmount - 10;
+ _clipFl = true;
+ }
+
+ // Clip Y1
+ if (yp >= _maxY + 300)
+ return;
+ if (yp + height > _maxY + 300) {
+ int yAmount = height + 10 - (yp + height - (_maxY + 300));
+ if (yAmount <= 10)
+ return;
+
+ // clip_y1 is always positive thanks to the previous check
+ clip_y1 = yAmount - 10;
+ _clipFl = true;
+ }
+
+ // Sprite display
+
+ // Set up source
+ spriteP += 6;
+ int srcOffset = READ_LE_UINT16(spriteP);
+ spriteP += 4;
+ const byte *srcP = spriteP;
+ spriteP += srcOffset;
+
+ // Set up surface destination
+ byte *destP = surface + (yp - 300) * _lineNbr2 + (xp - 300);
+
+ // Handling for clipped versus non-clipped
+ if (_clipFl) {
+ // Clipped version
+ for (int yc = 0; yc < clip_y1; ++yc, destP += _lineNbr2) {
+ byte *tempDestP = destP;
+ byte byteVal;
+ int xc = 0;
+
+ while ((byteVal = *srcP) != 253) {
+ ++srcP;
+ width = READ_LE_UINT16(srcP);
+ srcP += 2;
+
+ if (byteVal == 254) {
+ // Copy pixel range
+ for (int xv = 0; xv < width; ++xv, ++xc, ++spriteP, ++tempDestP) {
+ if (_posYClipped == 0 && xc >= _posXClipped && xc < clip_x1)
+ *tempDestP = *spriteP;
+ }
+ } else {
+ // Skip over bytes
+ tempDestP += width;
+ xc += width;
+ }
+ }
+
+ if (_posYClipped > 0)
+ --_posYClipped;
+ srcP += 3;
+ }
+ } else {
+ // Non-clipped
+ for (int yc = 0; yc < height; ++yc, destP += _lineNbr2) {
+ byte *tempDestP = destP;
+ byte byteVal;
+
+ while ((byteVal = *srcP) != 253) {
+ ++srcP;
+ width = READ_LE_UINT16(srcP);
+ srcP += 2;
+
+ if (byteVal == 254) {
+ // Copy pixel range
+ Common::copy(spriteP, spriteP + width, tempDestP);
+ spriteP += width;
+ }
+
+ tempDestP += width;
+ }
+
+ // Skip over control byte and width
+ srcP += 3;
+ }
+ }
+}
+
+void GraphicsManager::endDisplayBob() {
+ for (int idx = 1; idx <= 20; ++idx) {
+ if (_vm->_animMan->_animBqe[idx]._enabledFl)
+ _vm->_objectsMan->hideBob(idx);
+ }
+
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_events->refreshScreenAndEvents();
+
+ for (int idx = 1; idx <= 20; ++idx) {
+ if (_vm->_animMan->_animBqe[idx]._enabledFl)
+ _vm->_objectsMan->resetBob(idx);
+ }
+
+ for (int idx = 1; idx <= 29; ++idx) {
+ _vm->_objectsMan->_lockedAnims[idx]._enableFl = false;
+ }
+
+ for (int idx = 1; idx <= 20; ++idx) {
+ _vm->_animMan->_animBqe[idx]._enabledFl = false;
+ }
+}
+
+void GraphicsManager::displayAllBob() {
+ for (int idx = 1; idx <= 20; ++idx) {
+ if (_vm->_animMan->_animBqe[idx]._enabledFl)
+ _vm->_objectsMan->displayBob(idx);
+ }
+}
+
+void GraphicsManager::resetDirtyRects() {
+ _dirtyRects.clear();
+}
+
+void GraphicsManager::resetRefreshRects() {
+ _refreshRects.clear();
+}
+
+// Add a game area dirty rectangle
+void GraphicsManager::addDirtyRect(int x1, int y1, int x2, int y2) {
+ x1 = CLIP(x1, _minX, _maxX);
+ y1 = CLIP(y1, _minY, _maxY);
+ x2 = CLIP(x2, _minX, _maxX);
+ y2 = CLIP(y2, _minY, _maxY);
+
+ if ((x2 > x1) && (y2 > y1))
+ addRectToArray(_dirtyRects, Common::Rect(x1, y1, x2, y2));
+}
+
+// Add a refresh rect
+void GraphicsManager::addRefreshRect(int x1, int y1, int x2, int y2) {
+ x1 = MAX(x1, 0);
+ y1 = MAX(y1, 0);
+ x2 = MIN(x2, SCREEN_WIDTH);
+ y2 = MIN(y2, SCREEN_HEIGHT);
+
+ if ((x2 > x1) && (y2 > y1))
+ addRectToArray(_refreshRects, Common::Rect(x1, y1, x2, y2));
+}
+
+void GraphicsManager::addRectToArray(Common::Array<Common::Rect> &rects, const Common::Rect &newRect) {
+ // Scan for an intersection with existing rects
+ uint rectIndex;
+ for (rectIndex = 0; rectIndex < rects.size(); ++rectIndex) {
+ Common::Rect &r = rects[rectIndex];
+
+ if (r.intersects(newRect)) {
+ // Rect either intersects or is completely inside existing one, so extend existing one as necessary
+ r.extend(newRect);
+ break;
+ }
+ }
+ if (rectIndex == rects.size()) {
+ // Rect not intersecting any existing one, so add it in
+ assert(rects.size() < DIRTY_RECTS_SIZE);
+ rects.push_back(newRect);
+ }
+
+ // Take care of merging the existing rect list. This is done as a separate check even if
+ // a previous extending above has been done, since the merging of the new rect above may
+ // result in further rects now able to be merged
+
+ for (int srcIndex = rects.size() - 1; srcIndex > 0; --srcIndex) {
+ const Common::Rect &srcRect = rects[srcIndex];
+
+ // Loop through all the other rects to see if it intersects them
+ for (int destIndex = srcIndex - 1; destIndex >= 0; --destIndex) {
+ if (rects[destIndex].intersects(srcRect)) {
+ // Found an intersection, so extend the found one, and delete the original
+ rects[destIndex].extend(srcRect);
+ rects.remove_at(srcIndex);
+ break;
+ }
+ }
+ }
+}
+
+// Draw any game dirty rects onto the screen intermediate surface
+void GraphicsManager::displayDirtyRects() {
+ if (_dirtyRects.size() == 0)
+ return;
+
+ lockScreen();
+
+ // Refresh the entire screen
+ for (uint idx = 0; idx < _dirtyRects.size(); ++idx) {
+ Common::Rect &r = _dirtyRects[idx];
+ Common::Rect dstRect;
+
+ if (_vm->_events->_breakoutFl) {
+ copy8BitRect(_frontBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left, r.top);
+ dstRect.left = r.left * 2;
+ dstRect.top = r.top * 2 + 30;
+ dstRect.setWidth((r.right - r.left) * 2);
+ dstRect.setHeight((r.bottom - r.top) * 2);
+ } else if (r.right > _vm->_events->_startPos.x && r.left < _vm->_events->_startPos.x + SCREEN_WIDTH) {
+ r.left = MAX<int16>(r.left, _vm->_events->_startPos.x);
+ r.right = MIN<int16>(r.right, (int16)_vm->_events->_startPos.x + SCREEN_WIDTH);
+
+ copy16BitRect(_frontBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left - _vm->_events->_startPos.x, r.top);
+
+ dstRect.left = r.left - _vm->_events->_startPos.x;
+ dstRect.top = r.top;
+ dstRect.setWidth(r.right - r.left);
+ dstRect.setHeight(r.bottom - r.top);
+ }
+
+ // If it's a valid rect, then add it to the list of areas to refresh on the screen
+ if (dstRect.isValidRect() && dstRect.width() > 0 && dstRect.height() > 0)
+ addRectToArray(_refreshRects, dstRect);
+ }
+
+ unlockScreen();
+ resetDirtyRects();
+}
+
+void GraphicsManager::displayRefreshRects() {
+ Graphics::Surface *screenSurface = NULL;
+ if (_showDirtyRects) {
+ screenSurface = g_system->lockScreen();
+ g_system->copyRectToScreen(_screenBuffer, _screenLineSize, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ }
+ // Loop through copying over any specified rects to the screen
+ for (uint idx = 0; idx < _refreshRects.size(); ++idx) {
+ const Common::Rect &r = _refreshRects[idx];
+
+ byte *srcP = _screenBuffer + _screenLineSize * r.top + (r.left * 2);
+ g_system->copyRectToScreen(srcP, _screenLineSize, r.left, r.top, r.width(), r.height());
+
+ if (_showDirtyRects)
+ screenSurface->frameRect(r, 0xffffff);
+ }
+
+ if (_showDirtyRects)
+ g_system->unlockScreen();
+
+ resetRefreshRects();
+}
+
+
+/**
+ * Fast Display of either a compressed or vesa sprite
+ */
+void GraphicsManager::fastDisplay(const byte *spriteData, int xp, int yp, int spriteIndex, bool addSegment) {
+ int width = _vm->_objectsMan->getWidth(spriteData, spriteIndex);
+ int height = _vm->_objectsMan->getHeight(spriteData, spriteIndex);
+
+ if (*spriteData == 78) {
+ drawCompressedSprite(_backBuffer, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false);
+ drawCompressedSprite(_frontBuffer, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false);
+ } else {
+ drawVesaSprite(_frontBuffer, spriteData, xp + 300, yp + 300, spriteIndex);
+ drawVesaSprite(_backBuffer, spriteData, xp + 300, yp + 300, spriteIndex);
+ }
+ if (addSegment)
+ addDirtyRect(xp, yp, xp + width, yp + height);
+}
+
+void GraphicsManager::fastDisplay2(const byte *objectData, int xp, int yp, int idx, bool addSegment) {
+ int width = _vm->_objectsMan->getWidth(objectData, idx);
+ int height = _vm->_objectsMan->getHeight(objectData, idx);
+ if (*objectData == 78) {
+ drawCompressedSprite(_backBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, false);
+ drawCompressedSprite(_frontBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, false);
+ } else {
+ drawVesaSprite(_frontBuffer, objectData, xp + 300, yp + 300, idx);
+ drawVesaSprite(_backBuffer, objectData, xp + 300, yp + 300, idx);
+ }
+ if (addSegment)
+ addDirtyRect(xp, yp, xp + width, yp + height);
+}
+
+/**
+ * Copy from surface to video buffer, scale 2x.
+ */
+void GraphicsManager::copy16bFromSurfaceScaleX2(const byte *surface) {
+ byte *palPtr;
+ int curPixel;
+
+ lockScreen();
+
+ assert(_videoPtr);
+ const byte *curSurface = surface;
+ byte *destPtr = 30 * _screenLineSize + (byte *)_videoPtr;
+ for (int y = 200; y; y--) {
+ byte *oldDestPtr = destPtr;
+ for (int x = 320; x; x--) {
+ curPixel = 2 * *curSurface;
+ palPtr = _palettePixels + curPixel;
+ destPtr[0] = destPtr[2] = destPtr[_screenLineSize] = destPtr[_screenLineSize + 2] = palPtr[0];
+ destPtr[1] = destPtr[3] = destPtr[_screenLineSize + 1] = destPtr[_screenLineSize + 3] = palPtr[1];
+ ++curSurface;
+ destPtr += 4;
+ }
+ destPtr = _screenLineSize * 2 + oldDestPtr;
+ }
+
+ unlockScreen();
+}
+
+void GraphicsManager::restoreSurfaceRect(byte *destSurface, const byte *src, int xp, int yp, int width, int height) {
+ int yCtr;
+
+ byte *destP = xp + _lineNbr2 * yp + destSurface;
+ int yNext = height;
+ const byte *srcP = src;
+ do {
+ yCtr = yNext;
+ if (width & 1) {
+ memcpy(destP, srcP, width);
+ srcP += width;
+ destP += width;
+ } else if (width & 2) {
+ for (int i = width >> 1; i; --i) {
+ destP[0] = srcP[0];
+ destP[1] = srcP[1];
+ srcP += 2;
+ destP += 2;
+ }
+ } else {
+ memcpy(destP, srcP, 4 * (width >> 2));
+ srcP += 4 * (width >> 2);
+ destP += 4 * (width >> 2);
+ }
+ destP = _lineNbr2 + destP - width;
+ yNext = yCtr - 1;
+ } while (yCtr != 1);
+}
+
+/**
+ * Compute the value of a parameter plus a given percentage
+ */
+int GraphicsManager::zoomIn(int val, int percentage) {
+ if (val)
+ val += percentage * (long int)val / 100;
+
+ return val;
+}
+
+/**
+ * Compute the value of a parameter minus a given percentage
+ */
+int GraphicsManager::zoomOut(int val, int percentage) {
+ if (val)
+ val -= percentage * (long int)val / 100;
+
+ return val;
+}
+
+// Display 'Perfect?'
+void GraphicsManager::drawCompressedSprite(byte *surface, const byte *srcData, int xp300, int yp300, int frameIndex, int zoom1, int zoom2, bool flipFl) {
+ const byte *spriteStartP = srcData + 3;
+ for (int i = frameIndex; i; --i)
+ spriteStartP += READ_LE_UINT32(spriteStartP) + 16;
+
+ const byte *spriteSizeP = spriteStartP + 4;
+ int spriteWidth = READ_LE_INT16(spriteSizeP);
+ spriteSizeP += 2;
+ int spriteHeight2 = READ_LE_INT16(spriteSizeP);
+ int spriteHeight1 = spriteHeight2;
+ const byte *spritePixelsP = spriteSizeP + 10;
+ _posXClipped = 0;
+ _posYClipped = 0;
+ clip_x1 = 0;
+ clip_y1 = 0;
+ if ((xp300 <= _minX) || (yp300 <= _minY) || (xp300 >= _maxX + 300) || (yp300 >= _maxY + 300))
+ return;
+
+ // Clipped values are greater or equal to zero, thanks to the previous test
+ clip_x1 = _maxX + 300 - xp300;
+ clip_y1 = _maxY + 300 - yp300;
+
+ // _minX is never negative, and should be always 0
+ // The previous check insures that xp300 it's always greater to it
+ // After this check, posXClipped is always positive
+ if (xp300 < _minX + 300)
+ _posXClipped = _minX + 300 - xp300;
+
+ // Ditto.
+ if (yp300 < _minY + 300)
+ _posYClipped = _minY + 300 - yp300;
+
+ byte *dest1P = xp300 + _lineNbr2 * (yp300 - 300) - 300 + surface;
+ if (zoom2) {
+ _enlargedX = 0;
+ _enlargedY = 0;
+ _enlargedYFl = false;
+ _enlargedXFl = false;
+ _width = spriteWidth;
+ int zoomedWidth = zoomIn(spriteWidth, zoom2);
+ int zoomedHeight = zoomIn(spriteHeight1, zoom2);
+ if (flipFl) {
+ byte *clippedDestP = zoomedWidth + dest1P;
+ if (_posYClipped) {
+ if (_posYClipped < 0 || _posYClipped >= zoomedHeight)
+ return;
+ int hiddenHeight = 0;
+ while (zoomIn(++hiddenHeight, zoom2) < _posYClipped)
+ ;
+ spritePixelsP += _width * hiddenHeight;
+ clippedDestP += _lineNbr2 * _posYClipped;
+ zoomedHeight -= _posYClipped;
+ }
+ if (zoomedHeight > clip_y1)
+ zoomedHeight = clip_y1;
+ if (_posXClipped) {
+ if (_posXClipped >= zoomedWidth)
+ return;
+ zoomedWidth -= _posXClipped;
+ }
+ if (zoomedWidth > clip_x1) {
+ int clippedZoomedWidth = zoomedWidth - clip_x1;
+ clippedDestP -= clippedZoomedWidth;
+ int closestWidth = 0;
+ while (zoomIn(++closestWidth, zoom2) < clippedZoomedWidth)
+ ;
+ spritePixelsP += closestWidth;
+ zoomedWidth = clip_x1;
+ }
+ int curHeight;
+ do {
+ for (;;) {
+ curHeight = zoomedHeight;
+ byte *oldDestP = clippedDestP;
+ const byte *oldSpritePixelsP = spritePixelsP;
+ _enlargedXFl = false;
+ _enlargedX = 0;
+ for (int i = zoomedWidth; i; _enlargedXFl = false, i--) {
+ for (;;) {
+ if (*spritePixelsP)
+ *clippedDestP = *spritePixelsP;
+ --clippedDestP;
+ ++spritePixelsP;
+ if (!_enlargedXFl)
+ _enlargedX += zoom2;
+ if (_enlargedX >= 0 && _enlargedX < 100)
+ break;
+ _enlargedX -= 100;
+ --spritePixelsP;
+ _enlargedXFl = true;
+ --i;
+ if (!i)
+ break;
+ }
+ }
+ spritePixelsP = _width + oldSpritePixelsP;
+ clippedDestP = _lineNbr2 + oldDestP;
+ if (!_enlargedYFl)
+ _enlargedY += zoom2;
+ if (_enlargedY >= 0 && _enlargedY < 100)
+ break;
+ _enlargedY -= 100;
+ spritePixelsP = oldSpritePixelsP;
+ _enlargedYFl = true;
+ zoomedHeight = curHeight - 1;
+ if (curHeight == 1)
+ return;
+ }
+ _enlargedYFl = false;
+ zoomedHeight = curHeight - 1;
+ } while (curHeight != 1);
+ } else {
+ if (_posYClipped) {
+ if (_posYClipped >= zoomedHeight)
+ return;
+ int closerHeight = 0;
+ while (zoomIn(++closerHeight, zoom2) < _posYClipped)
+ ;
+ spritePixelsP += _width * closerHeight;
+ dest1P += _lineNbr2 * _posYClipped;
+ zoomedHeight -= _posYClipped;
+ }
+ if (zoomedHeight > clip_y1)
+ zoomedHeight = clip_y1;
+ if (_posXClipped) {
+ if (_posXClipped >= zoomedWidth)
+ return;
+ int closerWidth = 0;
+ while (zoomIn(++closerWidth, zoom2) < _posXClipped)
+ ;
+ spritePixelsP += closerWidth;
+ dest1P += _posXClipped;
+ zoomedWidth = zoomedWidth - _posXClipped;
+ }
+ if (zoomedWidth > clip_x1)
+ zoomedWidth = clip_x1;
+
+ int curHeight;
+ do {
+ for (;;) {
+ curHeight = zoomedHeight;
+ byte *oldDest1P = dest1P;
+ const byte *oldSpritePixelsP = spritePixelsP;
+ _enlargedXFl = false;
+ _enlargedX = 0;
+ for (int i = zoomedWidth; i; _enlargedXFl = false, i--) {
+ for (;;) {
+ if (*spritePixelsP)
+ *dest1P = *spritePixelsP;
+ ++dest1P;
+ ++spritePixelsP;
+ if (!_enlargedXFl)
+ _enlargedX += zoom2;
+ if (_enlargedX >= 0 && _enlargedX < 100)
+ break;
+ _enlargedX -= 100;
+ --spritePixelsP;
+ _enlargedXFl = true;
+ --i;
+ if (!i)
+ break;
+ }
+ }
+ spritePixelsP = _width + oldSpritePixelsP;
+ dest1P = _lineNbr2 + oldDest1P;
+ if (!_enlargedYFl)
+ _enlargedY += zoom2;
+ if (_enlargedY >= 0 && _enlargedY < 100)
+ break;
+ _enlargedY -= 100;
+ spritePixelsP = oldSpritePixelsP;
+ _enlargedYFl = true;
+ zoomedHeight = curHeight - 1;
+ if (curHeight == 1)
+ return;
+ }
+ _enlargedYFl = false;
+ zoomedHeight = curHeight - 1;
+ } while (curHeight != 1);
+ }
+ } else if (zoom1) {
+ _reduceX = 0;
+ _reducedY = 0;
+ _width = spriteWidth;
+ _zoomOutFactor = zoom1;
+ if (zoom1 < 100) {
+ int zoomedSpriteWidth = zoomOut(spriteWidth, _zoomOutFactor);
+ if (flipFl) {
+ byte *curDestP = zoomedSpriteWidth + dest1P;
+ do {
+ byte *oldDestP = curDestP;
+ _reducedY += _zoomOutFactor;
+ if (_reducedY >= 0 && _reducedY < 100) {
+ _reduceX = 0;
+ int curWidth = zoomedSpriteWidth;
+ for (int i = _width; i; i--) {
+ _reduceX += _zoomOutFactor;
+ if (_reduceX >= 0 && _reduceX < 100) {
+ if (curWidth >= _posXClipped && curWidth < clip_x1 && *spritePixelsP)
+ *curDestP = *spritePixelsP;
+ --curDestP;
+ ++spritePixelsP;
+ --curWidth;
+ } else {
+ _reduceX -= 100;
+ ++spritePixelsP;
+ }
+ }
+ curDestP = _lineNbr2 + oldDestP;
+ } else {
+ _reducedY -= 100;
+ spritePixelsP += _width;
+ }
+ --spriteHeight2;
+ } while (spriteHeight2);
+ } else {
+ do {
+ int oldSpriteHeight = spriteHeight2;
+ byte *oldDest1P = dest1P;
+ _reducedY += _zoomOutFactor;
+ if (_reducedY >= 0 && _reducedY < 100) {
+ _reduceX = 0;
+ int curX = 0;
+ for (int i = _width; i; i--) {
+ _reduceX += _zoomOutFactor;
+ if (_reduceX >= 0 && _reduceX < 100) {
+ if (curX >= _posXClipped && curX < clip_x1 && *spritePixelsP)
+ *dest1P = *spritePixelsP;
+ ++dest1P;
+ ++spritePixelsP;
+ ++curX;
+ } else {
+ _reduceX -= 100;
+ ++spritePixelsP;
+ }
+ }
+ spriteHeight2 = oldSpriteHeight;
+ dest1P = _lineNbr2 + oldDest1P;
+ } else {
+ _reducedY -= 100;
+ spritePixelsP += _width;
+ }
+ --spriteHeight2;
+ } while (spriteHeight2);
+ }
+ }
+ } else {
+ _width = spriteWidth;
+ if (flipFl) {
+ byte *dest2P = spriteWidth + dest1P;
+ _specialWidth = spriteWidth;
+ if (_posYClipped) {
+ if (_posYClipped >= spriteHeight1 || spriteHeight1 < 0)
+ return;
+ spritePixelsP += spriteWidth * _posYClipped;
+ dest2P += _lineNbr2 * _posYClipped;
+ spriteHeight1 -= _posYClipped;
+ }
+ if (spriteHeight1 > clip_y1)
+ spriteHeight1 = clip_y1;
+
+ if (_posXClipped >= spriteWidth)
+ return;
+ spriteWidth -= _posXClipped;
+
+ if (spriteWidth > clip_x1) {
+ int clippedWidth = spriteWidth - clip_x1;
+ spritePixelsP += clippedWidth;
+ dest2P -= clippedWidth;
+ spriteWidth = clip_x1;
+ }
+ int yCtr2;
+ do {
+ yCtr2 = spriteHeight1;
+ byte *destCopy2P = dest2P;
+ const byte *spritePixelsCopy2P = spritePixelsP;
+ for (int xCtr2 = spriteWidth; xCtr2; xCtr2--) {
+ if (*spritePixelsP)
+ *dest2P = *spritePixelsP;
+ ++spritePixelsP;
+ --dest2P;
+ }
+ spritePixelsP = _specialWidth + spritePixelsCopy2P;
+ dest2P = _lineNbr2 + destCopy2P;
+ spriteHeight1 = yCtr2 - 1;
+ } while (yCtr2 != 1);
+ } else {
+ _specialWidth = spriteWidth;
+ if (_posYClipped) {
+ if (_posYClipped >= spriteHeight1 || spriteHeight1 < 0)
+ return;
+ spritePixelsP += spriteWidth * _posYClipped;
+ dest1P += _lineNbr2 * _posYClipped;
+ spriteHeight1 -= _posYClipped;
+ }
+ if (spriteHeight1 > clip_y1)
+ spriteHeight1 = clip_y1;
+ if (_posXClipped) {
+ if (_posXClipped >= spriteWidth)
+ return;
+ spritePixelsP += _posXClipped;
+ dest1P += _posXClipped;
+ spriteWidth -= _posXClipped;
+ }
+ if (spriteWidth > clip_x1)
+ spriteWidth = clip_x1;
+ int yCtr1;
+ do {
+ yCtr1 = spriteHeight1;
+ byte *dest1CopyP = dest1P;
+ const byte *spritePixelsCopyP = spritePixelsP;
+ for (int xCtr1 = spriteWidth; xCtr1; xCtr1--) {
+ if (*spritePixelsP)
+ *dest1P = *spritePixelsP;
+ ++dest1P;
+ ++spritePixelsP;
+ }
+ spritePixelsP = _specialWidth + spritePixelsCopyP;
+ dest1P = _lineNbr2 + dest1CopyP;
+ spriteHeight1 = yCtr1 - 1;
+ } while (yCtr1 != 1);
+ }
+ }
+}
+
+void GraphicsManager::copySurface(const byte *surface, int x1, int y1, int width, int height, byte *destSurface, int destX, int destY) {
+ int left = x1;
+ int top = y1;
+ int croppedWidth = width;
+ int croppedHeight = height;
+
+ if (x1 < _minX) {
+ croppedWidth = width - (_minX - x1);
+ left = _minX;
+ }
+ if (y1 < _minY) {
+ croppedHeight = height - (_minY - y1);
+ top = _minY;
+ }
+
+ if (top + croppedHeight > _maxY)
+ croppedHeight = _maxY - top;
+ if (left + croppedWidth > _maxX)
+ croppedWidth = _maxX - left;
+
+ if (croppedWidth > 0 && croppedHeight > 0) {
+ int height2 = croppedHeight;
+ copyRect(surface, left, top, croppedWidth, croppedHeight, destSurface, destX, destY);
+ addDirtyRect(left, top, left + croppedWidth, top + height2);
+ }
+}
+
+void GraphicsManager::copyRect(const byte *srcSurface, int x1, int y1, uint16 width, int height, byte *destSurface, int destX, int destY) {
+ const byte *srcP = x1 + _lineNbr2 * y1 + srcSurface;
+ byte *destP = destX + _lineNbr2 * destY + destSurface;
+ int yp = height;
+ int yCurrent;
+ do {
+ yCurrent = yp;
+ memcpy(destP, srcP, 4 * (width >> 2));
+ const byte *src2P = (srcP + 4 * (width >> 2));
+ byte *dest2P = (destP + 4 * (width >> 2));
+ int pitch = width - 4 * (width >> 2);
+ memcpy(dest2P, src2P, pitch);
+ destP = (dest2P + pitch + _lineNbr2 - width);
+ srcP = (src2P + pitch + _lineNbr2 - width);
+ yp = yCurrent - 1;
+ } while (yCurrent != 1);
+}
+
+// Display Font
+void GraphicsManager::displayFont(byte *surface, const byte *spriteData, int xp, int yp, int characterIndex, int color) {
+ const byte *spriteDataP = spriteData + 3;
+ for (int i = characterIndex; i; --i)
+ spriteDataP += READ_LE_UINT32(spriteDataP) + 16;
+
+ int spriteWidth = 0;
+ int spriteHeight = 0;
+ const byte *spriteSizeP = spriteDataP + 4;
+ spriteWidth = READ_LE_INT16(spriteSizeP);
+ spriteSizeP += 2;
+ spriteHeight = READ_LE_INT16(spriteSizeP);
+ const byte *spritePixelsP = spriteSizeP + 10;
+ byte *destP = surface + xp + _lineNbr2 * yp;
+ _width = spriteWidth;
+
+ int yCtr;
+ do {
+ yCtr = spriteHeight;
+ byte *destLineP = destP;
+ for (int xCtr = spriteWidth; xCtr; xCtr--) {
+ byte destByte = *spritePixelsP;
+ if (*spritePixelsP) {
+ if (destByte == 252)
+ destByte = color;
+ *destP = destByte;
+ }
+
+ ++destP;
+ ++spritePixelsP;
+ }
+ destP = _lineNbr2 + destLineP;
+ spriteHeight = yCtr - 1;
+ } while (yCtr != 1);
+}
+
+void GraphicsManager::initScreen(const Common::String &file, int mode, bool initializeScreen) {
+ Common::String filename = file + ".ini";
+ bool fileFoundFl = false;
+
+ byte *ptr = _vm->_fileIO->searchCat(filename, RES_INI, fileFoundFl);
+
+ if (!fileFoundFl) {
+ ptr = _vm->_fileIO->loadFile(filename);
+ }
+
+ if (!mode) {
+ filename = file + ".spr";
+ _vm->_globals->_levelSpriteBuf = _vm->_globals->freeMemory(_vm->_globals->_levelSpriteBuf);
+ if (initializeScreen) {
+ fileFoundFl = false;
+ _vm->_globals->_levelSpriteBuf = _vm->_fileIO->searchCat(filename, RES_SLI, fileFoundFl);
+ if (!fileFoundFl) {
+ _vm->_globals->_levelSpriteBuf = _vm->_fileIO->loadFile(filename);
+ } else {
+ _vm->_globals->_levelSpriteBuf = _vm->_fileIO->loadFile("RES_SLI.RES");
+ }
+ }
+ }
+ if (READ_BE_UINT24(ptr) != MKTAG24('I', 'N', 'I')) {
+ error("Invalid INI File %s", file.c_str());
+ } else {
+ bool doneFlag = false;
+ int dataOffset = 1;
+
+ do {
+ int dataVal1 = _vm->_script->handleOpcode(ptr + 20 * dataOffset);
+ if (_vm->shouldQuit())
+ return;
+
+ if (dataVal1 == 2)
+ dataOffset = _vm->_script->handleGoto((ptr + 20 * dataOffset));
+ if (dataVal1 == 3)
+ dataOffset = _vm->_script->handleIf(ptr, dataOffset);
+ if (dataOffset == -1)
+ error("Error, defective IFF");
+ if (dataVal1 == 1 || dataVal1 == 4)
+ ++dataOffset;
+ if (!dataVal1 || dataVal1 == 5)
+ doneFlag = true;
+ } while (!doneFlag);
+ }
+ _vm->_globals->freeMemory(ptr);
+ _vm->_globals->_answerBuffer = _vm->_globals->freeMemory(_vm->_globals->_answerBuffer);
+
+ filename = file + ".rep";
+ fileFoundFl = false;
+ byte *dataP = _vm->_fileIO->searchCat(filename, RES_REP, fileFoundFl);
+ if (!fileFoundFl)
+ dataP = _vm->_fileIO->loadFile(filename);
+
+ _vm->_globals->_answerBuffer = dataP;
+ _vm->_objectsMan->_forceZoneFl = true;
+ _vm->_objectsMan->_changeVerbFl = false;
+}
+
+void GraphicsManager::displayScreen(bool initPalette) {
+ if (initPalette)
+ initColorTable(50, 65, _palette);
+
+ if (_lineNbr == SCREEN_WIDTH)
+ fillSurface(_frontBuffer, _colorTable, SCREEN_WIDTH * SCREEN_HEIGHT);
+ else if (_lineNbr == (SCREEN_WIDTH * 2))
+ fillSurface(_frontBuffer, _colorTable, SCREEN_WIDTH * SCREEN_HEIGHT * 2);
+
+ copy16BitRect(_frontBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ memcpy(_backBuffer, _frontBuffer, 614399);
+ updateScreen();
+}
+
+void GraphicsManager::copyWinscanVbe(const byte *src, byte *dest) {
+ int destOffset = 0;
+ const byte *srcPtr = src;
+ for (;;) {
+ byte byteVal = *srcPtr;
+ if (byteVal == kByteStop)
+ return;
+ if (*srcPtr > kByteStop) {
+ if (byteVal == k8bVal) {
+ destOffset += srcPtr[1];
+ byteVal = srcPtr[2];
+ srcPtr += 2;
+ } else if (byteVal == k16bVal) {
+ destOffset += READ_LE_UINT16(srcPtr + 1);
+ byteVal = srcPtr[3];
+ srcPtr += 3;
+ } else {
+ destOffset += READ_LE_UINT32(srcPtr + 1);
+ byteVal = srcPtr[5];
+ srcPtr += 5;
+ }
+ }
+ dest[destOffset] = byteVal;
+ ++srcPtr;
+ ++destOffset;
+ }
+}
+
+// Reduce Screen
+void GraphicsManager::reduceScreenPart(const byte *srcSurface, byte *destSurface, int xp, int yp, int width, int height, int zoom) {
+ const byte *srcP = xp + _lineNbr2 * yp + srcSurface;
+ byte *destP = destSurface;
+ _zoomOutFactor = zoom;
+ _width = width;
+ _reduceX = 0;
+ _reducedY = 0;
+ if (zoom < 100) {
+ for (int yCtr = 0; yCtr < height; ++yCtr, srcP += _lineNbr2) {
+ _reducedY += _zoomOutFactor;
+ if (_reducedY < 100) {
+ _reduceX = 0;
+ const byte *lineSrcP = srcP;
+
+ for (int xCtr = 0; xCtr < _width; ++xCtr) {
+ _reduceX += _zoomOutFactor;
+ if (_reduceX < 100) {
+ *destP++ = *lineSrcP++;
+ } else {
+ _reduceX -= 100;
+ ++lineSrcP;
+ }
+ }
+ } else {
+ _reducedY -= 100;
+ }
+ }
+ }
+}
+
+/**
+ * Draw horizontal line
+ */
+void GraphicsManager::drawHorizontalLine(byte *surface, int xp, int yp, uint16 width, byte col) {
+ memset(surface + xp + _lineNbr2 * yp, col, width);
+}
+
+/**
+ * Draw vertical line
+ */
+void GraphicsManager::drawVerticalLine(byte *surface, int xp, int yp, int height, byte col) {
+ byte *destP = surface + xp + _lineNbr2 * yp;
+
+ for (int yCtr = height; yCtr; yCtr--) {
+ *destP = col;
+ destP += _lineNbr2;
+ }
+}
+
+/**
+ * Backup the current screen
+ */
+void GraphicsManager::backupScreen() {
+ // Allocate a new data block for the screen, if necessary
+ if (_vm->_graphicsMan->_backupScreen == NULL)
+ _vm->_graphicsMan->_backupScreen = _vm->_globals->allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
+
+ // Backup the screen
+ Common::copy(_vm->_graphicsMan->_backBuffer, _vm->_graphicsMan->_backBuffer +
+ SCREEN_WIDTH * 2 * SCREEN_HEIGHT, _vm->_graphicsMan->_backupScreen);
+}
+
+/**
+ * Restore a previously backed up screen
+ */
+void GraphicsManager::restoreScreen() {
+ assert(_vm->_graphicsMan->_backupScreen);
+
+ // Restore the screen and free the buffer
+ Common::copy(_vm->_graphicsMan->_backupScreen, _vm->_graphicsMan->_backupScreen +
+ SCREEN_WIDTH * 2 * SCREEN_HEIGHT, _vm->_graphicsMan->_backBuffer);
+ _vm->_globals->freeMemory(_vm->_graphicsMan->_backupScreen);
+ _backupScreen = NULL;
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h
new file mode 100644
index 0000000000..25a8197817
--- /dev/null
+++ b/engines/hopkins/graphics.h
@@ -0,0 +1,188 @@
+/* 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 HOPKINS_GRAPHICS_H
+#define HOPKINS_GRAPHICS_H
+
+#include "common/scummsys.h"
+#include "common/array.h"
+#include "common/endian.h"
+#include "common/rect.h"
+#include "common/str.h"
+#include "graphics/surface.h"
+
+namespace Hopkins {
+
+#define DIRTY_RECTS_SIZE 250
+#define PALETTE_SIZE 256
+#define PALETTE_BLOCK_SIZE (PALETTE_SIZE * 3)
+#define PALETTE_EXT_BLOCK_SIZE 800
+static const byte kSetOffset = 251;
+static const byte kByteStop = 252;
+static const byte k8bVal = 253;
+static const byte k16bVal = 254;
+
+struct RGB8 {
+ byte r;
+ byte g;
+ byte b;
+};
+
+class HopkinsEngine;
+
+class GraphicsManager {
+private:
+ HopkinsEngine *_vm;
+
+ int _lockCounter;
+ bool _initGraphicsFl;
+ int _screenWidth;
+ int _screenHeight;
+ byte *_videoPtr;
+ int _width;
+ int _posXClipped, _posYClipped;
+ bool _clipFl;
+ int _specialWidth;
+
+ int _enlargedX, _enlargedY;
+ bool _enlargedXFl, _enlargedYFl;
+ int clip_x1, clip_y1;
+ int _reduceX, _reducedY;
+ int _zoomOutFactor;
+
+ byte SD_PIXELS[PALETTE_SIZE * 2];
+ bool MANU_SCROLL;
+
+ void loadScreen(const Common::String &file);
+ void loadPCX640(byte *surface, const Common::String &file, byte *palette, bool typeFlag);
+ void loadPCX320(byte *surface, const Common::String &file, byte *palette);
+ void fadeIn(const byte *palette, int step, const byte *surface);
+ void fadeOut(const byte *palette, int step, const byte *surface);
+ void changePalette(const byte *palette);
+ uint16 mapRGB(byte r, byte g, byte b);
+ void copy16bFromSurfaceScaleX2(const byte *surface);
+
+ void translateSurface(byte *destP, const byte *srcP, int count, int minThreshold, int maxThreshold);
+ void copy8BitRect(const byte *surface, int xp, int yp, int width, int height, int destX, int destY);
+
+ void lockScreen();
+ void unlockScreen();
+public:
+ byte _colorTable[PALETTE_EXT_BLOCK_SIZE];
+ byte _palette[PALETTE_EXT_BLOCK_SIZE];
+ byte _oldPalette[PALETTE_EXT_BLOCK_SIZE];
+ byte *_backBuffer;
+ byte *_frontBuffer;
+ byte *_screenBuffer;
+ byte *_backupScreen;
+ bool _largeScreenFl;
+ bool _noFadingFl;
+ bool _fadingFl;
+ bool _skipVideoLockFl;
+ int _scrollOffset;
+ int _scrollPosX;
+ int _oldScrollPosX;
+ int _scrollSpeed;
+ int _lineNbr;
+ int _lineNbr2;
+ int _minX, _minY;
+ int _maxX, _maxY;
+ int _scrollStatus;
+ int _fadeDefaultSpeed;
+ int _screenLineSize;
+
+ /**
+ * The _dirtyRects list contains paletted game areas that need to be redrawn.
+ * The _dstrect array is the list of areas of the screen that ScummVM needs to be redrawn.
+ * Some areas, such as the animation managers, skip the _dirtyRects and use _dstrec directly.
+ */
+ Common::Array<Common::Rect> _dirtyRects;
+ Common::Array<Common::Rect> _refreshRects;
+ bool _showDirtyRects;
+
+ byte *_palettePixels;
+public:
+ GraphicsManager(HopkinsEngine *vm);
+ ~GraphicsManager();
+
+ void clearPalette();
+ void clearScreen();
+ void clearVesaScreen();
+ void resetDirtyRects();
+ void resetRefreshRects();
+ void addDirtyRect(int x1, int y1, int x2, int y2);
+ void addDirtyRect(const Common::Rect &r) { addDirtyRect(r.left, r.top, r.right, r.bottom); }
+ void addRefreshRect(int x1, int y1, int x2, int y2);
+ void addRectToArray(Common::Array<Common::Rect> &rects, const Common::Rect &newRect);
+ void displayDirtyRects();
+ void displayRefreshRects();
+ void copySurface(const byte *surface, int x1, int y1, int width, int height, byte *destSurface, int destX, int destY);
+ void loadImage(const Common::String &file);
+ void loadVgaImage(const Common::String &file);
+ void fadeInLong();
+ void fadeInBreakout();
+ void fadeInDefaultLength(const byte *surface);
+ void fadeInShort();
+ void fadeOutDefaultLength(const byte *surface);
+ void fadeOutBreakout();
+ void fadeOutLong();
+ void fadeOutShort();
+ void copyWinscanVbe3(const byte *srcData, byte *destSurface);
+ void copyWinscanVbe(const byte *srcP, byte *destP);
+ void copyVideoVbe16(const byte *srcData);
+ void copyVideoVbe16a(const byte *srcData);
+ void copySurfaceRect(const byte *srcSurface, byte *destSurface, int xs, int ys, int width, int height);
+ void restoreSurfaceRect(byte *destSurface, const byte *src, int xp, int yp, int width, int height);
+ void displayFont(byte *surface, const byte *spriteData, int xp, int yp, int characterIndex, int color);
+ void drawHorizontalLine(byte *surface, int xp, int yp, uint16 width, byte col);
+ void drawVerticalLine(byte *surface, int xp, int yp, int height, byte col);
+ void initColorTable(int minIndex, int maxIndex, byte *palette);
+ void setGraphicalMode(int width, int height);
+ void setPaletteVGA256(const byte *palette);
+ void setPaletteVGA256WithRefresh(const byte *palette, const byte *surface);
+ void scrollScreen(int amount);
+ int zoomIn(int v, int percentage);
+ int zoomOut(int v, int percentage);
+ void initScreen(const Common::String &file, int mode, bool initializeScreen);
+ void displayAllBob();
+ void endDisplayBob();
+ void updateScreen();
+ void reduceScreenPart(const byte *srcSruface, byte *destSurface, int xp, int yp, int width, int height, int zoom);
+ void setScreenWidth(int pitch);
+
+ void setColorPercentage(int palIndex, int r, int g, int b);
+ void setColorPercentage2(int palIndex, int r, int g, int b);
+ void fastDisplay(const byte *spriteData, int xp, int yp, int spriteIndex, bool addSegment = true);
+ void fastDisplay2(const byte *objectData, int xp, int yp, int idx, bool addSegment = true);
+ void drawCompressedSprite(byte *surface, const byte *srcData, int xp300, int yp300, int frameIndex, int zoom1, int zoom2, bool flipFl);
+ void copyRect(const byte *srcSurface, int x1, int y1, uint16 width, int height, byte *destSurface, int destX, int destY);
+ void drawVesaSprite(byte *surface, const byte *spriteData, int xp, int yp, int spriteIndex);
+ void copy16BitRect(const byte *surface, int xs, int ys, int width, int height, int destX, int destY);
+ void fillSurface(byte *surface, byte *col, int size);
+ void displayScreen(bool initPalette);
+ void backupScreen();
+ void restoreScreen();
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_GRAPHICS_H */
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
new file mode 100644
index 0000000000..ea772304ed
--- /dev/null
+++ b/engines/hopkins/hopkins.cpp
@@ -0,0 +1,2861 @@
+/* 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 "hopkins/hopkins.h"
+#include "hopkins/graphics.h"
+#include "hopkins/files.h"
+#include "hopkins/saveload.h"
+#include "hopkins/sound.h"
+#include "hopkins/talk.h"
+
+#include "common/scummsys.h"
+#include "common/config-manager.h"
+#include "common/debug-channels.h"
+#include "common/events.h"
+#include "common/file.h"
+
+namespace Hopkins {
+
+HopkinsEngine *g_vm;
+
+HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDesc) : Engine(syst),
+ _gameDescription(gameDesc), _randomSource("Hopkins") {
+ g_vm = this;
+ _animMan = new AnimationManager(this);
+ _computer = new ComputerManager(this);
+ _dialog = new DialogsManager(this);
+ _debug = new Debugger(this);
+ _events = new EventsManager(this);
+ _fileIO = new FileManager(this);
+ _fontMan = new FontManager(this);
+ _globals = new Globals(this);
+ _graphicsMan = new GraphicsManager(this);
+ _linesMan = new LinesManager(this);
+ _menuMan = new MenuManager(this);
+ _objectsMan = new ObjectsManager(this);
+ _saveLoad = new SaveLoadManager(this);
+ _script = new ScriptManager(this);
+ _soundMan = new SoundManager(this);
+ _talkMan = new TalkManager(this);
+
+ _startGameSlot = ConfMan.hasKey("save_slot") ? ConfMan.getInt("save_slot") : -1;
+}
+
+HopkinsEngine::~HopkinsEngine() {
+ delete _talkMan;
+ delete _soundMan;
+ delete _script;
+ delete _saveLoad;
+ delete _objectsMan;
+ delete _menuMan;
+ delete _linesMan;
+ delete _graphicsMan;
+ delete _globals;
+ delete _fontMan;
+ delete _fileIO;
+ delete _events;
+ delete _debug;
+ delete _dialog;
+ delete _computer;
+ delete _animMan;
+}
+
+Common::String HopkinsEngine::generateSaveName(int slot) {
+ return Common::String::format("%s.%03d", _targetName.c_str(), slot);
+}
+
+/**
+ * Returns true if it is currently okay to restore a game
+ */
+bool HopkinsEngine::canLoadGameStateCurrently() {
+ return !_globals->_exitId && !_globals->_cityMapEnabledFl && _events->_mouseFl;
+}
+
+/**
+ * Returns true if it is currently okay to save the game
+ */
+bool HopkinsEngine::canSaveGameStateCurrently() {
+ return !_globals->_exitId && !_globals->_cityMapEnabledFl && _events->_mouseFl;
+}
+
+/**
+ * Load the savegame at the specified slot index
+ */
+Common::Error HopkinsEngine::loadGameState(int slot) {
+ return _saveLoad->loadGame(slot);
+}
+
+/**
+ * Save the game to the given slot index, and with the given name
+ */
+Common::Error HopkinsEngine::saveGameState(int slot, const Common::String &desc) {
+ return _saveLoad->saveGame(slot, desc);
+}
+
+Common::Error HopkinsEngine::run() {
+ _saveLoad->initSaves();
+
+ _globals->setConfig();
+ _fileIO->initCensorship();
+ initializeSystem();
+
+ if (!getIsDemo())
+ runFull();
+ else if (getPlatform() == Common::kPlatformLinux)
+ runLinuxDemo();
+ else if (getPlatform() == Common::kPlatformWindows)
+ runWin95Demo();
+ else {
+ warning("Unhandled version, switching to Linux demo. Please report this version to ScummVM developers");
+ runLinuxDemo();
+ }
+
+ return Common::kNoError;
+}
+
+bool HopkinsEngine::runWin95Demo() {
+ _objectsMan->loadObjects();
+ _objectsMan->changeObject(14);
+ _objectsMan->addObject(14);
+ _objectsMan->_helicopterFl = false;
+
+ _globals->_eventMode = EVENTMODE_IGNORE;
+
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+
+ if (_startGameSlot == -1) {
+ _graphicsMan->loadImage("H2");
+ _graphicsMan->fadeInLong();
+
+ if (!_events->_escKeyFl)
+ playIntro();
+ }
+
+ _events->_rateCounter = 0;
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _globals->_speed = 1;
+
+ for (int i = 1; i < 50; i++) {
+ _graphicsMan->copySurface(_graphicsMan->_backBuffer, 0, 0, 640, 440, _graphicsMan->_frontBuffer, 0, 0);
+ _events->refreshScreenAndEvents();
+ }
+
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ if (_events->_rateCounter > 475)
+ _globals->_speed = 2;
+ if (_events->_rateCounter > 700)
+ _globals->_speed = 3;
+
+ if (_startGameSlot == -1) {
+ _graphicsMan->fadeOutLong();
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR");
+ }
+
+ _globals->_characterType = 0;
+ _objectsMan->_mapCarPosX = _objectsMan->_mapCarPosY = 0;
+ memset(_globals->_saveData, 0, 2000);
+ _globals->_exitId = 0;
+
+ if (_startGameSlot != -1)
+ _saveLoad->loadGame(_startGameSlot);
+
+ if (getLanguage() != Common::PL_POL)
+ if (!displayAdultDisclaimer())
+ return Common::kNoError;
+
+ for (;;) {
+ if (_globals->_exitId == 300)
+ _globals->_exitId = 0;
+
+ if (!_globals->_exitId) {
+ _globals->_exitId = _menuMan->menu();
+ if (_globals->_exitId == -1) {
+ _globals->_characterSpriteBuf = _globals->freeMemory(_globals->_characterSpriteBuf);
+ restoreSystem();
+ return false;
+ }
+ }
+
+ if (shouldQuit())
+ return false;
+
+ _globals->_curRoomNum = _globals->_exitId;
+
+ switch (_globals->_exitId) {
+ case 1:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 2, true);
+ break;
+
+ case 3:
+ if (!_globals->_saveData->_data[svBankAttackAnimPlayedFl]) {
+ _soundMan->playSound(3);
+ if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS)
+ _graphicsMan->loadImage("fond");
+ else {
+ if (_globals->_language == LANG_FR)
+ _graphicsMan->loadImage("fondfr");
+ else if (_globals->_language == LANG_EN)
+ _graphicsMan->loadImage("fondan");
+ else if (_globals->_language == LANG_SP)
+ _graphicsMan->loadImage("fondes");
+ }
+ _graphicsMan->fadeInLong();
+ _events->delay(500);
+ _graphicsMan->fadeOutLong();
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _soundMan->_specialSoundNum = 2;
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ if (!_globals->_censorshipFl)
+ _animMan->playAnim("BANQUE.ANM", 200, 28, 200);
+ else
+ _animMan->playAnim("BANKUK.ANM", 200, 28, 200);
+ _soundMan->_specialSoundNum = 0;
+ _soundMan->removeSample(1);
+ _soundMan->removeSample(2);
+ _soundMan->removeSample(3);
+ _soundMan->removeSample(4);
+ _graphicsMan->fadeOutLong();
+ _globals->_saveData->_data[svBankAttackAnimPlayedFl] = 1;
+ }
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false);
+ break;
+
+ case 4:
+ _globals->_disableInventFl = true;
+ _objectsMan->handleCityMap();
+ _globals->_disableInventFl = false;
+ break;
+
+ case 5:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 455;
+
+ if (_globals->_saveData->_data[svFreedHostageFl]) {
+ if (_globals->_saveData->_data[svFreedHostageFl] == 1)
+ _objectsMan->PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false);
+ } else {
+ _objectsMan->PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false);
+ }
+ break;
+
+ case 6:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 460;
+ _objectsMan->PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true);
+ break;
+
+ case 7:
+ if (_globals->_saveData->_data[svBombBoxOpenedFl])
+ _objectsMan->PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true);
+ else
+ _objectsMan->PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true);
+ break;
+
+ case 8:
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true);
+ break;
+
+ case 9:
+ _globals->_characterMaxPosY = 440;
+ _linesMan->setMaxLineIdx(20);
+ if (_globals->_saveData->_data[svBombDisarmedFl])
+ _objectsMan->PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true);
+ else
+ bombExplosion();
+ break;
+
+ case 10:
+ _objectsMan->PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false);
+ break;
+
+ case 11:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false);
+ break;
+
+ case 12:
+ _globals->_characterMaxPosY = 450;
+ _linesMan->setMaxLineIdx(20);
+ if (_globals->_saveData->_data[svBombDisarmedFl]) {
+ if (_globals->_language == LANG_FR)
+ _graphicsMan->loadImage("ENDFR");
+ else
+ _graphicsMan->loadImage("ENDUK");
+ _graphicsMan->fadeInLong();
+ _events->mouseOn();
+ do
+ _events->refreshScreenAndEvents();
+ while (_events->getMouseButton() != 1);
+ _graphicsMan->fadeOutLong();
+ restoreSystem();
+ } else
+ bombExplosion();
+ break;
+
+ case 13:
+ case 14:
+ case 15:
+ handleNotAvailable(11);
+ break;
+
+ case 16:
+ case 24:
+ case 25:
+ case 26:
+ case 27:
+ case 28:
+ case 29:
+ case 30:
+ case 31:
+ case 33:
+ case 32:
+ case 34:
+ handleNotAvailable(4);
+ break;
+
+ case 17:
+ handleNotAvailable(1);
+ break;
+
+ case 111:
+ _objectsMan->PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false);
+ break;
+
+ case 112:
+ _objectsMan->PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false);
+ break;
+
+ case 113:
+ _globals->_exitId = 0;
+ _globals->_prevScreenId = _globals->_screenId;
+ _globals->_saveData->_data[svLastPrevScreenId] = _globals->_screenId;
+ _globals->_screenId = 113;
+ _globals->_saveData->_data[svLastScreenId] = _globals->_screenId;
+ _computer->showComputer(COMPUTER_HOPKINS);
+ _graphicsMan->clearScreen();
+ _graphicsMan->updateScreen();
+ memset(_graphicsMan->_frontBuffer, 0, 307200);
+ memset(_graphicsMan->_backBuffer, 0, 307200);
+ _graphicsMan->clearPalette();
+ _graphicsMan->resetDirtyRects();
+ break;
+
+ case 114:
+ _globals->_prevScreenId = _globals->_screenId;
+ _globals->_saveData->_data[svLastPrevScreenId] = _globals->_screenId;
+ _globals->_screenId = 114;
+ _globals->_saveData->_data[svLastScreenId] = _globals->_screenId;
+ _globals->_exitId = 0;
+ _computer->showComputer(COMPUTER_SAMANTHA);
+ _graphicsMan->clearScreen();
+ break;
+
+ case 115:
+ _globals->_exitId = 0;
+ _globals->_prevScreenId = _globals->_screenId;
+ _globals->_saveData->_data[svLastPrevScreenId] = _globals->_screenId;
+ _globals->_screenId = 115;
+ _globals->_saveData->_data[svLastScreenId] = _globals->_screenId;
+ _computer->showComputer(COMPUTER_PUBLIC);
+ _graphicsMan->clearScreen();
+ break;
+
+ case 150:
+ _soundMan->playSound(28);
+ _globals->_eventMode = EVENTMODE_ALT; // CHECKME!
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _animMan->playAnim("JOUR1A.anm", 12, 12, 2000);
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 300;
+ break;
+
+ case 151:
+ _soundMan->playSound(28);
+ _globals->_eventMode = EVENTMODE_ALT; // CHECKME!
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _graphicsMan->loadImage("njour3a");
+ _graphicsMan->fadeInLong();
+ _events->delay(5000);
+ _graphicsMan->fadeOutLong();
+ _globals->_exitId = 300;
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ break;
+
+ case 152:
+ _soundMan->playSound(28);
+ _globals->_eventMode = EVENTMODE_ALT; // CHECKME!
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _animMan->playAnim("JOUR4A.anm", 12, 12, 2000);
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 300;
+ break;
+ }
+ }
+ return true;
+}
+
+bool HopkinsEngine::runLinuxDemo() {
+ _objectsMan->loadObjects();
+ _objectsMan->changeObject(14);
+ _objectsMan->addObject(14);
+ _objectsMan->_helicopterFl = false;
+
+ _events->mouseOff();
+
+ _graphicsMan->clearScreen();
+
+ if (_startGameSlot == -1) {
+ _graphicsMan->loadImage("LINUX");
+ _graphicsMan->fadeInLong();
+ _events->delay(1500);
+ _graphicsMan->fadeOutLong();
+
+ _graphicsMan->loadImage("H2");
+ _graphicsMan->fadeInLong();
+ _events->delay(500);
+ _graphicsMan->fadeOutLong();
+
+ if (!_events->_escKeyFl)
+ playIntro();
+ }
+
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR");
+ _globals->_characterType = 0;
+ _objectsMan->_mapCarPosX = _objectsMan->_mapCarPosY = 0;
+ memset(_globals->_saveData, 0, 2000);
+ _globals->_exitId = 0;
+
+ if (_startGameSlot != -1)
+ _saveLoad->loadGame(_startGameSlot);
+
+ for (;;) {
+ if (_globals->_exitId == 300)
+ _globals->_exitId = 0;
+
+ if (!_globals->_exitId) {
+ _globals->_exitId = _menuMan->menu();
+ if (_globals->_exitId == -1) {
+ if (!shouldQuit())
+ endLinuxDemo();
+ _globals->_characterSpriteBuf = _globals->freeMemory(_globals->_characterSpriteBuf);
+ restoreSystem();
+ }
+ }
+
+ if (shouldQuit())
+ return false;
+
+ _globals->_curRoomNum = _globals->_exitId;
+
+ switch (_globals->_exitId) {
+ case 17:
+ case 18:
+ case 19:
+ case 20:
+ case 22:
+ case 23:
+ case 24:
+ case 27:
+ case 28:
+ case 29:
+ case 30:
+ case 31:
+ case 32:
+ case 34:
+ case 38:
+ displayNotAvailable();
+ break;
+
+ case 1:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true);
+ break;
+
+ case 3:
+ if (!_globals->_saveData->_data[svBankAttackAnimPlayedFl]) {
+ _soundMan->playSound(3);
+ if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS)
+ _graphicsMan->loadImage("fond");
+ else {
+ if (_globals->_language == LANG_FR)
+ _graphicsMan->loadImage("fondfr");
+ else if (_globals->_language == LANG_EN)
+ _graphicsMan->loadImage("fondan");
+ else if (_globals->_language == LANG_SP)
+ _graphicsMan->loadImage("fondes");
+ }
+ _graphicsMan->fadeInLong();
+ _events->delay(500);
+ _graphicsMan->fadeOutLong();
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _soundMan->_specialSoundNum = 2;
+
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _graphicsMan->_fadingFl = true;
+
+ if (!_globals->_censorshipFl)
+ _animMan->playAnim("BANQUE.ANM", 200, 28, 200);
+ else
+ _animMan->playAnim("BANKUK.ANM", 200, 28, 200);
+ _soundMan->_specialSoundNum = 0;
+ _soundMan->removeSample(1);
+ _soundMan->removeSample(2);
+ _soundMan->removeSample(3);
+ _soundMan->removeSample(4);
+ _globals->_saveData->_data[svBankAttackAnimPlayedFl] = 1;
+ }
+
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false);
+ break;
+
+ case 4:
+ _globals->_disableInventFl = true;
+ _objectsMan->handleCityMap();
+ _globals->_disableInventFl = false;
+ break;
+
+ case 5:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 455;
+ if (_globals->_saveData->_data[svFreedHostageFl] == 1)
+ _objectsMan->PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false);
+ else
+ _objectsMan->PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false);
+ break;
+
+ case 6:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 460;
+ _objectsMan->PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true);
+ break;
+
+ case 7:
+ if (_globals->_saveData->_data[svBombBoxOpenedFl])
+ _objectsMan->PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true);
+ else
+ _objectsMan->PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true);
+ break;
+
+ case 8:
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true);
+ break;
+
+ case 9:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 440;
+
+ if (!_globals->_saveData->_data[svBombDisarmedFl])
+ bombExplosion();
+ else
+ _objectsMan->PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true);
+ break;
+
+ case 10:
+ _objectsMan->PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false);
+ break;
+
+ case 11:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false);
+ break;
+
+ case 12:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 450;
+ if (_globals->_saveData->_data[svBombDisarmedFl])
+ _objectsMan->PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false);
+ else
+ bombExplosion();
+ break;
+
+ case 13:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true);
+ break;
+
+ case 14:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM14", "IM14", "ANIM14", "IM14", 1, true);
+ break;
+
+ case 15:
+ _objectsMan->PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 29, false);
+ break;
+
+ case 16:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 450;
+
+ if (_globals->_saveData->_data[svForestAvailableFl] == 1) {
+ _objectsMan->PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true);
+ } else if (!_globals->_saveData->_data[svForestAvailableFl]) {
+ _objectsMan->PERSONAGE2("IM16", "IM16", "ANIM16", "IM16", 7, true);
+ }
+ break;
+
+ case 25:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true);
+ break;
+
+ case 26:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true);
+
+ case 33:
+ _objectsMan->PERSONAGE("IM33", "IM33", "ANIM33", "IM33", 8, false);
+ break;
+
+ case 35:
+ displayEndDemo();
+ break;
+
+ case 111:
+ _objectsMan->PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false);
+ break;
+
+ case 112:
+ _objectsMan->PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false);
+ break;
+
+ case 113:
+ _globals->_exitId = 0;
+ _globals->_prevScreenId = _globals->_screenId;
+ _globals->_saveData->_data[svLastPrevScreenId] = _globals->_screenId;
+ _globals->_screenId = 113;
+ _globals->_saveData->_data[svLastScreenId] = 113;
+ _computer->showComputer(COMPUTER_HOPKINS);
+
+ _graphicsMan->clearScreen();
+ _graphicsMan->updateScreen();
+ memset(_graphicsMan->_frontBuffer, 0, 307200);
+ memset(_graphicsMan->_backBuffer, 0, 307200);
+ _graphicsMan->clearPalette();
+ _graphicsMan->resetDirtyRects();
+ break;
+
+ case 114:
+ _globals->_exitId = 0;
+ _globals->_prevScreenId = _globals->_screenId;
+ _globals->_saveData->_data[svLastPrevScreenId] = _globals->_screenId;
+ _globals->_screenId = 114;
+ _globals->_saveData->_data[svLastScreenId] = 114;
+ _computer->showComputer(COMPUTER_SAMANTHA);
+ _graphicsMan->clearScreen();
+ break;
+
+ case 115:
+ _globals->_exitId = 0;
+ _globals->_prevScreenId = _globals->_screenId;
+ _globals->_saveData->_data[svLastPrevScreenId] = _globals->_screenId;
+ _globals->_screenId = 115;
+ _globals->_saveData->_data[svLastScreenId] = 115;
+ _computer->showComputer(COMPUTER_PUBLIC);
+ _graphicsMan->clearScreen();
+ break;
+
+ case 150:
+ _soundMan->playSound(16);
+ _globals->_eventMode = EVENTMODE_IGNORE;
+
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("JOUR1A.anm", 12, 12, 2000);
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 300;
+ break;
+
+ case 151:
+ _soundMan->playSound(16);
+ _globals->_eventMode = EVENTMODE_IGNORE;
+
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("JOUR3A.anm", 12, 12, 2000);
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 300;
+ break;
+
+ case 152:
+ _soundMan->playSound(16);
+ _globals->_eventMode = EVENTMODE_IGNORE;
+
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("JOUR4A.anm", 12, 12, 2000);
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 300;
+ break;
+ }
+ }
+ return true;
+}
+
+bool HopkinsEngine::runFull() {
+ if (_startGameSlot == -1 && getPlatform() == Common::kPlatformLinux)
+ _soundMan->playSound(16);
+
+ _objectsMan->loadObjects();
+ _objectsMan->changeObject(14);
+ _objectsMan->addObject(14);
+
+ if (getPlatform() == Common::kPlatformLinux) {
+ _objectsMan->_helicopterFl = false;
+ _events->mouseOff();
+ // No code has been added to display the version as it's wrong
+ // in my copy: it mentions a Win95 version v4 using DirectDraw (Strangerke)
+ } else if (getPlatform() == Common::kPlatformWindows) {
+ _objectsMan->_helicopterFl = false;
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ // This code displays the game version.
+ // It wasn't present in the original and could be put in the debugger
+ // It has been added there for debug purposes
+ if (_startGameSlot == -1) {
+ _graphicsMan->loadImage("VERSW");
+ _graphicsMan->fadeInLong();
+ _events->delay(500);
+ _graphicsMan->fadeOutLong();
+ }
+ _graphicsMan->clearVesaScreen();
+ } else {
+ // This piece of code, though named "display_version" in the original,
+ // displays a "loading please wait" screen.
+ if (_startGameSlot == -1) {
+ _graphicsMan->loadImage("VERSW");
+ _graphicsMan->fadeInLong();
+ _events->delay(500);
+ _graphicsMan->fadeOutLong();
+ }
+ _graphicsMan->clearVesaScreen();
+
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ }
+
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+
+ if (_startGameSlot == -1) {
+ if (getPlatform() == Common::kPlatformLinux) {
+ _graphicsMan->loadImage("H2");
+ _graphicsMan->fadeInLong();
+ _events->delay(500);
+ _graphicsMan->fadeOutLong();
+ _globals->_speed = 2;
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("MP.ANM", 10, 16, 200);
+ } else {
+ _animMan->playAnim("MP.ANM", 10, 16, 200);
+ _graphicsMan->fadeOutLong();
+ }
+ }
+
+ if (!_events->_escKeyFl && _startGameSlot == -1) {
+ playIntro();
+ if (shouldQuit())
+ return false;
+ }
+ if (getPlatform() != Common::kPlatformLinux && _startGameSlot == -1) {
+ _graphicsMan->fadeOutShort();
+ _graphicsMan->loadImage("H2");
+ _graphicsMan->fadeInLong();
+ _events->delay(500);
+ _graphicsMan->fadeOutLong();
+ }
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR");
+ _globals->_characterType = 0;
+ _objectsMan->_mapCarPosX = _objectsMan->_mapCarPosY = 0;
+ memset(_globals->_saveData, 0, 2000);
+
+ _globals->_exitId = 0;
+
+ if (_startGameSlot != -1)
+ _saveLoad->loadGame(_startGameSlot);
+
+ for (;;) {
+ if (_globals->_exitId == 300)
+ _globals->_exitId = 0;
+ if (!_globals->_exitId) {
+ _globals->_exitId = _menuMan->menu();
+ if (_globals->_exitId == -1) {
+ _globals->_characterSpriteBuf = _globals->freeMemory(_globals->_characterSpriteBuf);
+ restoreSystem();
+ return false;
+ }
+ }
+
+ if (shouldQuit())
+ return false;
+
+ _globals->_curRoomNum = _globals->_exitId;
+
+ switch (_globals->_exitId) {
+ case 1:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true);
+ break;
+
+ case 3:
+ if (!_globals->_saveData->_data[svBankAttackAnimPlayedFl]) {
+ // Play the bank attack animation
+ _soundMan->playSound(3);
+ if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS)
+ _graphicsMan->loadImage("fond");
+ else {
+ if (_globals->_language == LANG_FR)
+ _graphicsMan->loadImage("fondfr");
+ else if (_globals->_language == LANG_EN)
+ _graphicsMan->loadImage("fondan");
+ else if (_globals->_language == LANG_SP)
+ _graphicsMan->loadImage("fondes");
+ }
+ _graphicsMan->fadeInLong();
+ _events->delay(500);
+ _graphicsMan->fadeOutLong();
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _soundMan->_specialSoundNum = 2;
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) {
+ if (getPlatform() == Common::kPlatformLinux)
+ _graphicsMan->_fadingFl = true;
+
+ if (!_globals->_censorshipFl)
+ _animMan->playAnim("BANQUE.ANM", 200, 28, 200);
+ else
+ _animMan->playAnim("BANKUK.ANM", 200, 28, 200);
+ } else {
+ _animMan->playAnim("BANQUE.ANM", 200, 28, 200);
+ }
+
+ _soundMan->_specialSoundNum = 0;
+ _soundMan->removeSample(1);
+ _soundMan->removeSample(2);
+ _soundMan->removeSample(3);
+ _soundMan->removeSample(4);
+
+ if (getPlatform() != Common::kPlatformLinux) {
+ // Copy the end of the animation into the secondary buffer and fade out the screen
+ Common::fill(_graphicsMan->_frontBuffer, _graphicsMan->_frontBuffer +
+ SCREEN_WIDTH * 2 * SCREEN_HEIGHT, 0);
+ _graphicsMan->fadeOutLong();
+ }
+
+ _globals->_saveData->_data[svBankAttackAnimPlayedFl] = 1;
+ }
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false);
+ break;
+
+ case 4:
+ _globals->_disableInventFl = true;
+ _objectsMan->handleCityMap();
+ _globals->_disableInventFl = false;
+ break;
+
+ case 5:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 455;
+ if (_globals->_saveData->_data[svFreedHostageFl] == 1)
+ _objectsMan->PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false);
+ else
+ _objectsMan->PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false);
+ break;
+
+ case 6:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 460;
+ _objectsMan->PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true);
+ break;
+
+ case 7:
+ if (_globals->_saveData->_data[svBombBoxOpenedFl])
+ _objectsMan->PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true);
+ else
+ _objectsMan->PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true);
+ break;
+
+ case 8:
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true);
+ break;
+
+ case 9:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 440;
+ if (_globals->_saveData->_data[svBombDisarmedFl])
+ _objectsMan->PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true);
+ else
+ bombExplosion();
+ break;
+
+ case 10:
+ _objectsMan->PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false);
+ break;
+
+ case 11:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false);
+ break;
+
+ case 12:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 450;
+ if (_globals->_saveData->_data[svBombDisarmedFl])
+ _objectsMan->PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false);
+ else
+ bombExplosion();
+ break;
+
+ case 13:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true);
+ break;
+
+ case 14:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM14", "IM14", "ANIM14", "IM14", 1, true);
+ break;
+
+ case 15:
+ if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
+ _objectsMan->PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 29, false);
+ else
+ _objectsMan->PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 18, false);
+ break;
+
+ case 16:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 450;
+ if (_globals->_saveData->_data[svForestAvailableFl] == 1)
+ _objectsMan->PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true);
+ else
+ _objectsMan->PERSONAGE2("IM16", "IM16", "ANIM16", "IM16", 7, true);
+ break;
+
+ case 17:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 440;
+ if (_globals->_saveData->_data[svHutBurningFl] == 1)
+ _objectsMan->PERSONAGE2("IM17", "IM17A", "ANIM17", "IM17", 11, true);
+ else if (!_globals->_saveData->_data[svHutBurningFl])
+ _objectsMan->PERSONAGE2("IM17", "IM17", "ANIM17", "IM17", 11, true);
+ if (_globals->_exitId == 18) {
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _soundMan->stopSound();
+ if (getPlatform() == Common::kPlatformLinux) {
+ _soundMan->playSound(29);
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("PURG1A.ANM", 12, 18, 50);
+ } else if (getPlatform() == Common::kPlatformWindows) {
+ _soundMan->playSound(29);
+ _animMan->playAnim("PURG1A.ANM", 12, 18, 50);
+ _graphicsMan->fadeOutShort();
+ } else {
+ _soundMan->playSound(6);
+ _animMan->playAnim("PURG1A.ANM", 12, 18, 50);
+ _graphicsMan->fadeOutShort();
+ }
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ }
+ break;
+
+ case 18:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 450;
+ if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
+ _objectsMan->PERSONAGE2("IM18", "IM18", "ANIM18", "IM18", 29, false);
+ else
+ _objectsMan->PERSONAGE2("IM18", "IM18", "ANIM18", "IM18", 6, false);
+ break;
+
+ case 19:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 440;
+ if (_globals->_saveData->_data[svHeavenGuardGoneFl])
+ _objectsMan->PERSONAGE2("IM19", "IM19A", "ANIM19", "IM19", 6, true);
+ else
+ _objectsMan->PERSONAGE2("IM19", "IM19", "ANIM19", "IM19", 6, true);
+ break;
+
+ case 20:
+ _linesMan->setMaxLineIdx(10);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM20", "IM20", "ANIM20", "IM20", 6, true);
+ if (_globals->_exitId == 17) {
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _soundMan->stopSound();
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _soundMan->playSound(6);
+ if (getPlatform() == Common::kPlatformLinux)
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("PURG2A.ANM", 12, 18, 50);
+ if (getPlatform() != Common::kPlatformLinux)
+ _graphicsMan->fadeOutShort();
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ }
+ break;
+
+ case 22:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->PERSONAGE2("IM22", "IM22", "ANIM22", "IM22", 6, true);
+ break;
+
+ case 23:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM23", "IM23", "ANIM23", "IM23", 6, true);
+ break;
+
+ case 24:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 450;
+ if (_globals->_saveData->_data[svCinemaDogGoneFl] == 1)
+ _objectsMan->PERSONAGE2("IM24", "IM24A", "ANIM24", "IM24", 1, true);
+ else
+ _objectsMan->PERSONAGE2("IM24", "IM24", "ANIM24", "IM24", 1, true);
+ break;
+
+ case 25:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 445;
+ if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
+ _objectsMan->PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true);
+ else
+ _objectsMan->PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 8, true);
+ break;
+
+ case 26:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 435;
+ if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
+ _objectsMan->PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true);
+ else
+ _objectsMan->PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 8, true);
+ break;
+
+ case 27:
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 440;
+ if (_globals->_saveData->_data[svPoolDogGoneFl] == 1)
+ _objectsMan->PERSONAGE2("IM27", "IM27A", "ANIM27", "IM27", 27, true);
+ else
+ _objectsMan->PERSONAGE2("IM27", "IM27", "ANIM27", "IM27", 27, true);
+ break;
+
+ case 28:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 450;
+ if (_globals->_saveData->_data[svCinemaCurtainCond1] != 1 || _globals->_saveData->_data[svCinemaCurtainCond2] != 1)
+ _objectsMan->PERSONAGE2("IM28", "IM28", "ANIM28", "IM28", 1, false);
+ else
+ _objectsMan->PERSONAGE2("IM28A", "IM28", "ANIM28", "IM28", 1, false);
+ break;
+
+ case 29:
+ _linesMan->setMaxLineIdx(50);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->PERSONAGE2("IM29", "IM29", "ANIM29", "IM29", 1, true);
+ break;
+
+ case 30:
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM30", "IM30", "ANIM30", "IM30", 24, false);
+ break;
+
+ case 31:
+ _objectsMan->PERSONAGE("IM31", "IM31", "ANIM31", "IM31", 10, true);
+ break;
+
+ case 32:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->PERSONAGE2("IM32", "IM32", "ANIM32", "IM32", 2, true);
+ break;
+
+ case 33:
+ _objectsMan->PERSONAGE("IM33", "IM33", "ANIM33", "IM33", 8, false);
+ break;
+
+ case 34:
+ _objectsMan->PERSONAGE("IM34", "IM34", "ANIM34", "IM34", 2, false);
+ break;
+
+ case 35:
+ case 36:
+ case 37:
+ case 38:
+ case 39:
+ case 40:
+ case 41: {
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 435;
+ _globals->_disableInventFl = false;
+ _objectsMan->_forestFl = true;
+ Common::String im = Common::String::format("IM%d", _globals->_exitId);
+ _soundMan->playSound(13);
+ if (_objectsMan->_forestSprite == NULL) {
+ _objectsMan->_forestSprite = _objectsMan->loadSprite("HOPDEG.SPR");
+ _soundMan->loadSample(1, "SOUND41.WAV");
+ }
+ _objectsMan->PERSONAGE2(im, im, "BANDIT", im, 13, false);
+ if (_globals->_exitId < 35 || _globals->_exitId > 49) {
+ _objectsMan->_forestSprite = _globals->freeMemory(_objectsMan->_forestSprite);
+ _objectsMan->_forestFl = false;
+ _soundMan->removeSample(1);
+ }
+ break;
+ }
+
+ case 50:
+ playPlaneCutscene();
+ _globals->_exitId = 51;
+ break;
+
+ case 51:
+ _linesMan->setMaxLineIdx(10);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM51", "IM51", "ANIM51", "IM51", 14, true);
+ break;
+
+ case 52:
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->PERSONAGE2("IM52", "IM52", "ANIM52", "IM52", 14, true);
+ break;
+
+ case 54:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM54", "IM54", "ANIM54", "IM54", 14, true);
+ break;
+
+ case 55:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 460;
+ _objectsMan->PERSONAGE2("IM55", "IM55", "ANIM55", "IM55", 14, false);
+ break;
+
+ case 56:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM56", "IM56", "ANIM56", "IM56", 14, false);
+ break;
+
+ case 57:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM57", "IM57", "ANIM57", "IM57", 14, true);
+ break;
+
+ case 58:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM58", "IM58", "ANIM58", "IM58", 14, false);
+ break;
+
+ case 59:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->PERSONAGE2("IM59", "IM59", "ANIM59", "IM59", 21, false);
+ break;
+
+ case 60:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM60", "IM60", "ANIM60", "IM60", 21, false);
+ break;
+
+ case 61:
+ if (_globals->_saveData->_data[svBaseElevatorCond1] == 1 && !_globals->_saveData->_data[svBaseFireFl])
+ handleConflagration();
+ _objectsMan->PERSONAGE("IM61", "IM61", "ANIM61", "IM61", 21, false);
+ break;
+
+ case 62:
+ _linesMan->setMaxLineIdx(8);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM62", "IM62", NULL, "IM62", 21, false);
+ break;
+
+ case 63:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM63", "IM63", "ANIM63", "IM63", 21, false);
+ break;
+
+ case 64:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM64", "IM64", "ANIM64", "IM64", 21, true);
+ break;
+
+ case 65:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM65", "IM65", "ANIM65", "IM65", 21, false);
+ break;
+
+ case 66:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->PERSONAGE2("IM66", "IM66", "ANIM66", "IM66", 21, false);
+ break;
+
+ case 67:
+ _linesMan->setMaxLineIdx(8);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM67", "IM67", NULL, "IM67", 21, false);
+ break;
+
+ case 68:
+ _linesMan->setMaxLineIdx(8);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM68", "IM68", "ANIM68", "IM68", 21, true);
+ break;
+
+ case 69:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->PERSONAGE2("IM69", "IM69", "ANIM69", "IM69", 21, false);
+ break;
+
+ case 70:
+ _linesMan->setMaxLineIdx(8);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM70", "IM70", NULL, "IM70", 21, false);
+ break;
+
+ case 71:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->PERSONAGE2("IM71", "IM71", "ANIM71", "IM71", 21, false);
+ break;
+
+ case 73:
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 445;
+ if (_globals->_saveData->_data[svSecondElevatorAvailableFl] == 1)
+ _objectsMan->PERSONAGE2("IM73", "IM73A", "ANIM73", "IM73", 21, true);
+ else
+ _objectsMan->PERSONAGE2("IM73", "IM73", "ANIM73", "IM73", 21, true);
+ break;
+
+ case 75:
+ playSubmarineCutscene();
+ break;
+
+ case 77:
+ handleOceanMaze(77, "OCEAN01", DIR_RIGHT, 0, 84, 0, 0, 25);
+ break;
+
+ case 78:
+ handleOceanMaze(78, "OCEAN02", DIR_UP, 0, 91, 84, 0, 25);
+ break;
+
+ case 79:
+ handleOceanMaze(79, "OCEAN03", DIR_LEFT, 87, 0, 0, 83, 25);
+ break;
+
+ case 80:
+ handleOceanMaze(80, "OCEAN04", DIR_UP, 86, 88, 0, 81, 25);
+ break;
+
+ case 81:
+ handleOceanMaze(81, "OCEAN05", DIR_UP, 91, 82, 80, 85, 25);
+ break;
+
+ case 82:
+ handleOceanMaze(82, "OCEAN06", DIR_LEFT, 81, 0, 88, 0, 25);
+ break;
+
+ case 83:
+ handleOceanMaze(83, "OCEAN07", DIR_UP, 89, 0, 79, 88, 25);
+ break;
+
+ case 84:
+ handleOceanMaze(84, "OCEAN08", DIR_UP, 77, 0, 0, 78, 25);
+ break;
+
+ case 85:
+ handleOceanMaze(85, "OCEAN09", DIR_UP, 0, 0, 81, 0, 25);
+ break;
+
+ case 86:
+ handleOceanMaze(86, "OCEAN10", DIR_UP, 0, 80, 0, 91, 25);
+ break;
+
+ case 87:
+ handleOceanMaze(87, "OCEAN11", DIR_RIGHT, 0, 79, 90, 0, 25);
+ break;
+
+ case 88:
+ handleOceanMaze(88, "OCEAN12", DIR_UP, 80, 0, 83, 82, 25);
+ break;
+
+ case 89:
+ handleOceanMaze(89, "OCEAN13", DIR_RIGHT, 0, 83, 0, 0, 25);
+ break;
+
+ case 90:
+ playUnderwaterBaseCutscene();
+ break;
+
+ case 91:
+ handleOceanMaze(91, "OCEAN15", DIR_RIGHT, 78, 81, 86, 0, 25);
+ break;
+
+ case 93:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 445;
+ if (_globals->_saveData->_data[svEscapeLeftJailFl]) {
+ if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
+ _objectsMan->PERSONAGE2("IM93", "IM93C", "ANIM93", "IM93", 29, true);
+ else
+ _objectsMan->PERSONAGE2("IM93", "IM93C", "ANIM93", "IM93", 26, true);
+ } else {
+ if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
+ _objectsMan->PERSONAGE2("IM93", "IM93", "ANIM93", "IM93", 29, true);
+ else
+ _objectsMan->PERSONAGE2("IM93", "IM93", "ANIM93", "IM93", 26, true);
+ }
+ break;
+
+ case 94:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->PERSONAGE2("IM94", "IM94", "ANIM94", "IM94", 19, true);
+ break;
+
+ case 95:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM95", "IM95", "ANIM95", "IM95", 19, false);
+ break;
+
+ case 96:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM96", "IM96", "ANIM96", "IM96", 19, false);
+ break;
+
+ case 97:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM97", "IM97", "ANIM97", "IM97", 19, false);
+ if (_globals->_exitId == 18) {
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _soundMan->stopSound();
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _soundMan->playSound(6);
+ _animMan->playAnim("PURG1A.ANM", 12, 18, 50);
+ _graphicsMan->fadeOutShort();
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ }
+ break;
+
+ case 98:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM98", "IM98", "ANIM98", "IM98", 19, true);
+ break;
+
+ case 99:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->PERSONAGE2("IM99", "IM99", "ANIM99", "IM99", 19, true);
+ break;
+
+ case 100:
+ playEnding();
+ break;
+
+ case 111:
+ _objectsMan->PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false);
+ break;
+
+ case 112:
+ _objectsMan->PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false);
+ break;
+
+ case 113:
+ _globals->_prevScreenId = _globals->_screenId;
+ _globals->_screenId = 113;
+ _globals->_saveData->_data[svLastPrevScreenId] = _globals->_prevScreenId;
+ _globals->_saveData->_data[svLastScreenId] = _globals->_screenId;
+ _globals->_exitId = 0;
+ _computer->showComputer(COMPUTER_HOPKINS);
+ _graphicsMan->clearScreen();
+ _graphicsMan->updateScreen();
+ memset(_graphicsMan->_frontBuffer, 0, 307200);
+ memset(_graphicsMan->_backBuffer, 0, 307200);
+ _graphicsMan->clearPalette();
+ _graphicsMan->resetDirtyRects();
+ break;
+
+ case 114:
+ _globals->_exitId = 0;
+ _globals->_prevScreenId = _globals->_screenId;
+ _globals->_screenId = 114;
+ _globals->_saveData->_data[svLastPrevScreenId] = _globals->_prevScreenId;
+ _globals->_saveData->_data[svLastScreenId] = _globals->_screenId;
+ _computer->showComputer(COMPUTER_SAMANTHA);
+ _graphicsMan->clearScreen();
+ break;
+
+ case 115:
+ _globals->_prevScreenId = _globals->_screenId;
+ _globals->_screenId = 115;
+ _globals->_saveData->_data[svLastPrevScreenId] = _globals->_prevScreenId;
+ _globals->_saveData->_data[svLastScreenId] = _globals->_screenId;
+ _globals->_exitId = 0;
+ _computer->showComputer(COMPUTER_PUBLIC);
+ _graphicsMan->clearScreen();
+ break;
+
+ case 150:
+ _soundMan->playSound(16);
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ if (getPlatform() == Common::kPlatformLinux)
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("JOUR1A.ANM", 12, 12, 2000);
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 300;
+ break;
+
+ case 151:
+ _soundMan->playSound(16);
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ if (getPlatform() == Common::kPlatformLinux)
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("JOUR3A.ANM", 12, 12, 2000);
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 300;
+ break;
+
+ case 152:
+ _soundMan->playSound(16);
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ if (getPlatform() == Common::kPlatformLinux)
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("JOUR4A.ANM", 12, 12, 2000);
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 300;
+ break;
+
+ case 194:
+ case 195:
+ case 196:
+ case 197:
+ case 198:
+ case 199:
+ _globals->_characterSpriteBuf = _globals->freeMemory(_globals->_characterSpriteBuf);
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _soundMan->stopSound();
+ _soundMan->playSound(23);
+ _globals->_exitId = handleBaseMap(); // Handles the base map (non-Windows)
+ //_globals->_exitId = WBASE(); // Handles the 3D Doom level (Windows)
+ _soundMan->stopSound();
+ _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR");
+ _globals->_characterType = 0;
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _graphicsMan->_lineNbr = SCREEN_WIDTH;
+ break;
+ }
+ }
+ _globals->_characterSpriteBuf = _globals->freeMemory(_globals->_characterSpriteBuf);
+ restoreSystem();
+ return true;
+}
+
+bool HopkinsEngine::shouldQuit() const {
+ return g_system->getEventManager()->shouldQuit();
+}
+
+int HopkinsEngine::getRandomNumber(int maxNumber) {
+ return _randomSource.getRandomNumber(maxNumber);
+}
+
+void HopkinsEngine::initializeSystem() {
+ // Set graphics mode
+ _graphicsMan->setGraphicalMode(SCREEN_WIDTH, SCREEN_HEIGHT);
+
+ // Synchronize the sound settings from ScummVM
+ _soundMan->syncSoundSettings();
+
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "SYSTEM");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "LINK");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "BUFFER");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "ANIM");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "ANM");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "BASE");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "MUSIC");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "SEQ");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "SAVE");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "SOUND");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "SVGA");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "VOICE");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "TSVGA");
+
+ _globals->clearAll();
+
+ _events->initMouseData();
+ _fontMan->initData();
+
+ _dialog->loadIcons();
+ _objectsMan->_headSprites = _fileIO->loadFile("TETE.SPR");
+
+ _events->setMouseOn();
+ _events->_mouseFl = false;
+
+ _globals->loadCharacterData();
+
+ _events->_mouseOffset.x = 0;
+ _events->_mouseOffset.y = 0;
+}
+
+/**
+ * Play the intro of the game
+ */
+void HopkinsEngine::playIntro() {
+ // Win95 EN demo doesn't include the intro
+ if ((getLanguage() == Common::EN_ANY) && (getPlatform() == Common::kPlatformWindows) && (getIsDemo()))
+ return;
+
+ byte paletteData[PALETTE_EXT_BLOCK_SIZE];
+ byte paletteData2[PALETTE_EXT_BLOCK_SIZE];
+
+ memset(&paletteData, 0, PALETTE_EXT_BLOCK_SIZE);
+ _events->refreshScreenAndEvents();
+ _events->_mouseFl = false;
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _events->refreshScreenAndEvents();
+ _soundMan->playSound(16);
+ _animMan->setClearAnimFlag();
+ _animMan->playAnim("J1.anm", 12, 12, 50);
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+
+ _soundMan->mixVoice(1, 3);
+ _animMan->playAnim("J2.anm", 12, 12, 50);
+
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+
+ _soundMan->mixVoice(2, 3);
+ _animMan->playAnim("J3.anm", 12, 12, 50);
+
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+
+ _soundMan->mixVoice(3, 3);
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _graphicsMan->updateScreen();
+ _soundMan->playSound(11);
+ _graphicsMan->loadImage("intro1");
+ _graphicsMan->scrollScreen(0);
+ _graphicsMan->_scrollOffset = 0;
+ _graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _graphicsMan->setColorPercentage(254, 0, 0, 0);
+ for (int i = 0; i <= 4; i++)
+ _events->refreshScreenAndEvents();
+
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _graphicsMan->fadeInLong();
+ if (_graphicsMan->_largeScreenFl) {
+ _graphicsMan->_scrollStatus = 2;
+ _graphicsMan->_scrollPosX = 0;
+
+ bool loopCond = false;
+ do {
+ _graphicsMan->_scrollPosX += 2;
+ if (_graphicsMan->_scrollPosX > (SCREEN_WIDTH - 2)) {
+ _graphicsMan->_scrollPosX = SCREEN_WIDTH;
+ loopCond = true;
+ }
+
+ if (_events->getMouseX() < _graphicsMan->_scrollPosX + 10)
+ _events->setMouseXY(_events->_mousePos.x + 4, _events->getMouseY());
+ _events->refreshScreenAndEvents();
+ } while (!shouldQuit() && !loopCond && _graphicsMan->_scrollPosX != SCREEN_WIDTH);
+
+ _events->refreshScreenAndEvents();
+ _graphicsMan->_scrollStatus = 0;
+
+ if (shouldQuit())
+ return;
+ }
+
+ _soundMan->mixVoice(4, 3);
+ _graphicsMan->fadeOutLong();
+ _graphicsMan->_scrollStatus = 0;
+ _graphicsMan->loadImage("intro2");
+ _graphicsMan->scrollScreen(0);
+ _animMan->loadAnim("INTRO2");
+ _graphicsMan->displayAllBob();
+ _soundMan->playSound(23);
+ _objectsMan->stopBobAnimation(3);
+ _objectsMan->stopBobAnimation(5);
+ _graphicsMan->_scrollOffset = 0;
+ _graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _graphicsMan->setColorPercentage(254, 0, 0, 0);
+
+ for (int i = 0; i <= 4; i++)
+ _events->refreshScreenAndEvents();
+
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _graphicsMan->fadeInLong();
+ for (uint i = 0; i < 200 / _globals->_speed; ++i)
+ _events->refreshScreenAndEvents();
+
+ _objectsMan->setBobAnimation(3);
+ _soundMan->mixVoice(5, 3);
+ _objectsMan->stopBobAnimation(3);
+ _events->refreshScreenAndEvents();
+ memcpy(&paletteData2, _graphicsMan->_palette, 796);
+
+ _graphicsMan->setPaletteVGA256WithRefresh(paletteData, _graphicsMan->_frontBuffer);
+ _graphicsMan->endDisplayBob();
+
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+
+ _soundMan->_specialSoundNum = 5;
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("ELEC.ANM", 10, 26, 200);
+ _soundMan->_specialSoundNum = 0;
+
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+
+ _graphicsMan->loadImage("intro2");
+ _graphicsMan->scrollScreen(0);
+ _animMan->loadAnim("INTRO2");
+ _graphicsMan->displayAllBob();
+ _soundMan->playSound(23);
+ _objectsMan->stopBobAnimation(3);
+ _objectsMan->stopBobAnimation(5);
+ _objectsMan->stopBobAnimation(1);
+ _graphicsMan->_scrollOffset = 0;
+ _graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _graphicsMan->setColorPercentage(254, 0, 0, 0);
+
+ for (int i = 0; i <= 3; i++)
+ _events->refreshScreenAndEvents();
+
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _graphicsMan->setPaletteVGA256WithRefresh(paletteData2, _graphicsMan->_frontBuffer);
+
+ int introIndex = 0;
+ while (!shouldQuit() && !_events->_escKeyFl) {
+ if (introIndex == 12) {
+ _objectsMan->setBobAnimation(3);
+ _events->refreshScreenAndEvents();
+ _soundMan->mixVoice(6, 3);
+ _events->refreshScreenAndEvents();
+ _objectsMan->stopBobAnimation(3);
+ }
+
+ Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsMan->_palette[0]);
+
+ for (int i = 1, maxPalVal = 4 * introIndex; i <= PALETTE_BLOCK_SIZE; i++) {
+ if (_graphicsMan->_palette[i] > maxPalVal)
+ _graphicsMan->_palette[i] -= maxPalVal;
+ }
+
+ _graphicsMan->setPaletteVGA256WithRefresh(_graphicsMan->_palette, _graphicsMan->_frontBuffer);
+
+ for (int i = 1; i < 2 * introIndex; i++)
+ _events->refreshScreenAndEvents();
+
+ _graphicsMan->setPaletteVGA256WithRefresh(paletteData2, _graphicsMan->_frontBuffer);
+
+ for (int i = 1; i < 20 - introIndex; i++)
+ _events->refreshScreenAndEvents();
+
+ introIndex += 2;
+ if (introIndex > 15) {
+ _graphicsMan->setPaletteVGA256WithRefresh(paletteData, _graphicsMan->_frontBuffer);
+ for (uint j = 1; j < 100 / _globals->_speed; ++j)
+ _events->refreshScreenAndEvents();
+
+ _objectsMan->setBobAnimation(3);
+ _soundMan->mixVoice(7, 3);
+ _objectsMan->stopBobAnimation(3);
+
+ for (uint k = 1; k < 60 / _globals->_speed; ++k)
+ _events->refreshScreenAndEvents();
+ _objectsMan->setBobAnimation(5);
+ for (uint l = 0; l < 20 / _globals->_speed; ++l)
+ _events->refreshScreenAndEvents();
+
+ Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsMan->_palette[0]);
+ _graphicsMan->setPaletteVGA256WithRefresh(_graphicsMan->_palette, _graphicsMan->_frontBuffer);
+
+ for (uint m = 0; m < 50 / _globals->_speed; ++m) {
+ if (m == 30 / _globals->_speed) {
+ _objectsMan->setBobAnimation(3);
+ _soundMan->mixVoice(8, 3);
+ _objectsMan->stopBobAnimation(3);
+ }
+
+ _events->refreshScreenAndEvents();
+ }
+
+ _graphicsMan->fadeOutLong();
+ _graphicsMan->endDisplayBob();
+ _soundMan->playSound(3);
+ _soundMan->_specialSoundNum = 1;
+ _animMan->setClearAnimFlag();
+ _animMan->playAnim("INTRO1.anm", 10, 24, 18);
+ _soundMan->_specialSoundNum = 0;
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+
+ _animMan->playAnim("INTRO2.anm", 10, 24, 18);
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+
+ _animMan->playAnim("INTRO3.anm", 10, 24, 200);
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+
+ _graphicsMan->_fadingFl = true;
+ _animMan->unsetClearAnimFlag();
+ _animMan->playAnim("J4.anm", 12, 12, 1000);
+ break;
+ }
+ }
+
+ _events->_escKeyFl = false;
+}
+
+/**
+ * If in demo, displays a 'not available' screen and returns to the city map
+ */
+void HopkinsEngine::displayNotAvailable() {
+ if (!getIsDemo())
+ return;
+
+ if (_globals->_language == LANG_FR)
+ _graphicsMan->loadImage("ndfr");
+ else
+ _graphicsMan->loadImage("nduk");
+
+ _graphicsMan->fadeInLong();
+ if (_soundMan->_voiceOffFl)
+ _events->delay(500);
+ else
+ _soundMan->mixVoice(628, 4);
+
+ _graphicsMan->fadeOutLong();
+ _globals->_exitId = 4;
+}
+
+void HopkinsEngine::handleNotAvailable(int nextScreen) {
+ // Use the code of the Linux demo instead of the code of the Windows demo.
+ // The behavior is somewhat better, and common code is easier to maintain.
+ displayNotAvailable();
+ _globals->_exitId = nextScreen;
+}
+
+void HopkinsEngine::displayEndDemo() {
+ _soundMan->playSound(28);
+ if (_globals->_language == LANG_FR)
+ _graphicsMan->loadImage("endfr");
+ else
+ _graphicsMan->loadImage("enduk");
+
+ _graphicsMan->fadeInLong();
+ _events->delay(1500);
+ _graphicsMan->fadeOutLong();
+ _globals->_exitId = 0;
+}
+
+void HopkinsEngine::bombExplosion() {
+ _graphicsMan->_lineNbr = SCREEN_WIDTH;
+ _graphicsMan->setScreenWidth(SCREEN_WIDTH);
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _soundMan->_specialSoundNum = 199;
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("BOMBE2A.ANM", 50, 14, 500);
+ _soundMan->_specialSoundNum = 0;
+ _graphicsMan->loadImage("IM15");
+ _animMan->loadAnim("ANIM15");
+ _graphicsMan->displayAllBob();
+ _objectsMan->stopBobAnimation(7);
+
+ for (int idx = 0; idx < 5; ++idx) {
+ _events->refreshScreenAndEvents();
+ }
+
+ _graphicsMan->fadeInLong();
+ _events->mouseOff();
+
+ for (int idx = 0; idx < 20; ++idx) {
+ _events->refreshScreenAndEvents();
+ }
+
+ _globals->_introSpeechOffFl = true;
+ _talkMan->startStaticCharacterDialogue("vire.pe2");
+ _globals->_introSpeechOffFl = false;
+ _objectsMan->setBobAnimation(7);
+
+ for (int idx = 0; idx < 100; ++idx) {
+ _events->refreshScreenAndEvents();
+ }
+
+ _graphicsMan->fadeOutLong();
+ _graphicsMan->endDisplayBob();
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 151;
+}
+
+void HopkinsEngine::restoreSystem() {
+ quitGame();
+ _events->refreshEvents();
+}
+
+void HopkinsEngine::endLinuxDemo() {
+ _globals->_linuxEndDemoFl = true;
+ _graphicsMan->resetDirtyRects();
+ _objectsMan->_forestFl = false;
+ _events->_breakoutFl = false;
+ _globals->_disableInventFl = true;
+ _graphicsMan->loadImage("BOX");
+ _soundMan->playSound(28);
+ _graphicsMan->fadeInLong();
+ _events->mouseOn();
+ _events->changeMouseCursor(0);
+ _events->_mouseCursorId = 0;
+ _events->_mouseSpriteId = 0;
+
+ bool mouseClicked = false;
+
+ do {
+ _events->refreshScreenAndEvents();
+
+ if (_events->getMouseButton() == 1)
+ mouseClicked = true;
+ } while (!mouseClicked && !shouldQuit());
+
+ // Original tried to open a web browser link here. Since ScummVM doesn't support
+ // that, it's being skipped in favor of simply exiting
+
+ _graphicsMan->fadeOutLong();
+}
+
+void HopkinsEngine::handleConflagration() {
+ _globals->_disableInventFl = true;
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _graphicsMan->loadImage("IM71");
+ _animMan->loadAnim("ANIM71");
+ _graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _graphicsMan->setColorPercentage(254, 0, 0, 0);
+ _graphicsMan->displayAllBob();
+
+ for (int cpt = 0; cpt <= 4; cpt++)
+ _events->refreshScreenAndEvents();
+
+ _graphicsMan->fadeInLong();
+ _globals->_eventMode = EVENTMODE_IGNORE;
+
+ for (int cpt = 0; cpt <= 249; cpt++)
+ _events->refreshScreenAndEvents();
+
+ _globals->_introSpeechOffFl = true;
+ _talkMan->startAnimatedCharacterDialogue("SVGARD1.pe2");
+ _globals->_introSpeechOffFl = false;
+
+ for (int cpt = 0; cpt <= 49; cpt++)
+ _events->refreshScreenAndEvents();
+
+ _graphicsMan->fadeOutLong();
+ _graphicsMan->endDisplayBob();
+ _globals->_saveData->_data[svBaseFireFl] = 1;
+ _globals->_disableInventFl = false;
+}
+
+void HopkinsEngine::playSubmarineCutscene() {
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _graphicsMan->_lineNbr = SCREEN_WIDTH;
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _soundMan->playSound(25);
+ _animMan->setClearAnimFlag();
+ _animMan->playAnim("base00a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("base05a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("base10a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("base20a.anm", 10, 18, 18);
+ // CHECKME: The original code was doing the opposite test, which was a bug.
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("base30a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("base40a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("base50a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("OC00a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("OC05a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("OC10a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("OC20a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl) {
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("OC30a.anm", 10, 18, 18);
+ }
+
+ _events->_escKeyFl = false;
+ _animMan->unsetClearAnimFlag();
+ _globals->_exitId = 85;
+}
+
+void HopkinsEngine::playUnderwaterBaseCutscene() {
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _soundMan->playSound(26);
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _globals->_disableInventFl = true;
+ _graphicsMan->_fadingFl = true;
+ _animMan->playSequence("abase.seq", 50, 15, 50, false, false, true);
+ _graphicsMan->loadImage("IM92");
+ _animMan->loadAnim("ANIM92");
+ _graphicsMan->displayAllBob();
+ _objectsMan->loadLinkFile("IM92");
+/*
+ for (int cpt = 0; cpt <= 4 && !shouldQuit(); cpt++)
+ _eventsManager->refreshScreenAndEvents();
+*/
+ _graphicsMan->fadeInLong();
+ _objectsMan->enableHidingBehavior();
+
+ do
+ _events->refreshScreenAndEvents();
+ while (!shouldQuit() && _objectsMan->getBobAnimDataIdx(8) != 22);
+
+ if (!shouldQuit()) {
+ _graphicsMan->fadeOutLong();
+ _graphicsMan->endDisplayBob();
+ _objectsMan->resetHidingItems();
+ _globals->_disableInventFl = false;
+ _globals->_exitId = 93;
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ }
+}
+
+void HopkinsEngine::playEnding() {
+ _globals->_characterSpriteBuf = _globals->freeMemory(_globals->_characterSpriteBuf);
+ _dialog->disableInvent();
+ _globals->_disableInventFl = true;
+ _graphicsMan->_scrollOffset = 0;
+ _globals->_cityMapEnabledFl = false;
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _soundMan->playSound(26);
+ _linesMan->_route = NULL;
+ _globals->_freezeCharacterFl = true;
+ _globals->_exitId = 0;
+ _soundMan->loadSample(1, "SOUND90.WAV");
+ _graphicsMan->loadImage("IM100");
+ _animMan->loadAnim("ANIM100");
+ _graphicsMan->displayAllBob();
+ _events->mouseOn();
+ _objectsMan->stopBobAnimation(7);
+ _objectsMan->stopBobAnimation(8);
+ _objectsMan->stopBobAnimation(9);
+ _graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _graphicsMan->setColorPercentage(254, 0, 0, 0);
+ _events->changeMouseCursor(0);
+
+ for (int cpt = 0; cpt <= 4; cpt++)
+ _events->refreshScreenAndEvents();
+
+ _graphicsMan->fadeInLong();
+ _globals->_eventMode = EVENTMODE_IGNORE;
+
+ do
+ _events->refreshScreenAndEvents();
+ while (_objectsMan->getBobAnimDataIdx(6) != 54);
+
+ _globals->_introSpeechOffFl = true;
+ _talkMan->startAnimatedCharacterDialogue("GM4.PE2");
+ _globals->_disableInventFl = true;
+ _objectsMan->stopBobAnimation(6);
+ _objectsMan->stopBobAnimation(10);
+ _objectsMan->setBobAnimation(9);
+ _objectsMan->setBobAnimation(7);
+
+ do
+ _events->refreshScreenAndEvents();
+ while (_objectsMan->getBobAnimDataIdx(7) != 54);
+
+ _soundMan->playSample(1);
+
+ do
+ _events->refreshScreenAndEvents();
+ while (_objectsMan->getBobAnimDataIdx(7) != 65);
+
+ _globals->_introSpeechOffFl = true;
+ _talkMan->startAnimatedCharacterDialogue("DUELB4.PE2");
+ _events->mouseOff();
+ _globals->_disableInventFl = true;
+
+ do
+ _events->refreshScreenAndEvents();
+ while (_objectsMan->getBobAnimDataIdx(7) != 72);
+
+ _globals->_introSpeechOffFl = true;
+ _talkMan->startAnimatedCharacterDialogue("DUELH1.PE2");
+
+ do
+ _events->refreshScreenAndEvents();
+ while (_objectsMan->getBobAnimDataIdx(7) != 81);
+
+ _globals->_introSpeechOffFl = true;
+ _talkMan->startAnimatedCharacterDialogue("DUELB5.PE2");
+
+ do
+ _events->refreshScreenAndEvents();
+ while (_objectsMan->getBobAnimDataIdx(7) != 120);
+
+ _objectsMan->stopBobAnimation(7);
+ if (_globals->_saveData->_data[svGameWonFl] == 1) {
+ _soundMan->_specialSoundNum = 200;
+ _soundMan->_skipRefreshFl = true;
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("BERM.ANM", 100, 24, 300);
+ _graphicsMan->endDisplayBob();
+ _soundMan->removeSample(1);
+ _graphicsMan->loadImage("PLAN3");
+ _graphicsMan->fadeInLong();
+
+ _events->_rateCounter = 0;
+ if (!_events->_escKeyFl) {
+ do
+ _events->refreshEvents();
+ while (_events->_rateCounter < 2000 / _globals->_speed && !_events->_escKeyFl);
+ }
+ _events->_escKeyFl = false;
+ _graphicsMan->fadeOutLong();
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _soundMan->_specialSoundNum = 0;
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("JOUR2A.anm", 12, 12, 1000);
+ _soundMan->playSound(11);
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _animMan->playAnim("FF1a.anm", 18, 18, 9);
+ _animMan->playAnim("FF1a.anm", 9, 18, 9);
+ _animMan->playAnim("FF1a.anm", 9, 18, 18);
+ _animMan->playAnim("FF1a.anm", 9, 18, 9);
+ _animMan->playAnim("FF2a.anm", 24, 24, 100);
+ displayCredits();
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 300;
+ _dialog->enableInvent();
+ _globals->_disableInventFl = false;
+ } else {
+ _soundMan->_specialSoundNum = 200;
+ _soundMan->_skipRefreshFl = true;
+ _animMan->playAnim2("BERM.ANM", 100, 24, 300);
+ _objectsMan->stopBobAnimation(7);
+ _objectsMan->setBobAnimation(8);
+ _globals->_introSpeechOffFl = true;
+ _talkMan->startAnimatedCharacterDialogue("GM5.PE2");
+ _globals->_disableInventFl = true;
+
+ do
+ _events->refreshScreenAndEvents();
+ while (_objectsMan->getBobAnimDataIdx(8) != 5);
+
+ _soundMan->directPlayWav("SOUND41.WAV");
+
+ do
+ _events->refreshScreenAndEvents();
+ while (_objectsMan->getBobAnimDataIdx(8) != 21);
+
+ _graphicsMan->fadeOutLong();
+ _graphicsMan->endDisplayBob();
+ _soundMan->removeSample(1);
+ _soundMan->playSound(16);
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _soundMan->_specialSoundNum = 0;
+ _dialog->enableInvent();
+ _globals->_disableInventFl = false;
+ _animMan->playAnim("JOUR4A.anm", 12, 12, 1000);
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 300;
+ }
+ _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR");
+ _globals->_characterType = 0;
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+}
+
+void HopkinsEngine::playPlaneCutscene() {
+ _soundMan->playSound(28);
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+
+ _animMan->unsetClearAnimFlag();
+ _animMan->playAnim("aerop00a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("serop10a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("aerop20a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("aerop30a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("aerop40a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("aerop50a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("aerop60a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("aerop70a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("trans00a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("trans10a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("trans15a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("trans20a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("trans30a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("trans40a.anm", 10, 18, 18);
+ if (!_events->_escKeyFl) {
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("PARA00a.anm", 9, 9, 9);
+ }
+
+ _events->_escKeyFl = false;
+ _animMan->unsetClearAnimFlag();
+}
+
+void HopkinsEngine::loadBaseMap() {
+ Common::String filename = Common::String::format("%s.PCX", "PBASE");
+ Common::File f;
+
+ if (f.exists(filename)) {
+ // PBASE file exists, so go ahead and load it
+ _graphicsMan->loadImage("PBASE");
+ } else {
+ // PBASE file doesn't exist, so draw a substitute screen
+ drawBaseMap();
+ }
+}
+
+void HopkinsEngine::drawBaseMap() {
+ memset(_graphicsMan->_backBuffer, 0, SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
+
+ // List of rectangle areas to draw for exit points
+ const int rects[] = {
+ 181, 66, 181 + 16, 66 + 22,
+ 353, 116, 353 + 22, 116 + 16,
+ 483, 250, 483 + 20, 250 + 25,
+ 471, 326, 471 + 27, 326 + 20,
+ 162, 365, 162 + 21, 365 + 23,
+ 106, 267, 106 + 20, 267 + 26
+ };
+
+ // Loop through displaying
+ const int *rectP = &rects[0];
+ for (int rectIndex = 0; rectIndex < 6; ++rectIndex, rectP += 4) {
+ Common::Rect r(rectP[0], rectP[1], rectP[2], rectP[3]);
+
+ for (int yp = r.top; yp <= r.bottom; ++yp) {
+ byte *pDest = _graphicsMan->_backBuffer + yp * SCREEN_WIDTH + r.left;
+ Common::fill(pDest, pDest + r.width(), 0xff);
+ }
+ }
+
+ // Copy the calculated screen
+ memcpy(_graphicsMan->_frontBuffer, _graphicsMan->_backBuffer, SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
+
+ // Write some explanatory text
+ _fontMan->displayText(40, 200, "ScummVM base map - select a square for different rooms", 255);
+}
+
+int HopkinsEngine::handleBaseMap() {
+ _globals->_disableInventFl = true;
+
+ // Load the map image
+ loadBaseMap();
+
+ // Set needed colors
+ _graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _graphicsMan->setColorPercentage(254, 0, 0, 0);
+ _events->changeMouseCursor(0);
+ _graphicsMan->fadeInLong();
+ bool loopCond = false;
+ int zone;
+ do {
+ if (shouldQuit())
+ return 0;
+
+ int mouseButton = _events->getMouseButton();
+ int posX = _events->getMouseX();
+ int posY = _events->getMouseY();
+ zone = 0;
+ if ((posX - 181 <= 16) && (posY - 66 <= 22) &&
+ (posX - 181 >= 0) && (posY - 66 >= 0))
+ zone = 1;
+ if ((posX - 353 <= 22) && (posY - 116 <= 19) &&
+ (posX - 353 >= 0) && (posY - 116 >= 0))
+ zone = 2;
+ if ((posX - 483 <= 20) && (posY - 250 <= 25) &&
+ (posX - 483 >= 0) && (posY - 250 >= 0))
+ zone = 3;
+ if ((posX - 471 <= 27) && (posY - 326 <= 20) &&
+ (posX - 471 >= 0) && (posY - 326 >= 0))
+ zone = 4;
+ if ((posX - 162 <= 21) && (posY - 365 <= 23) &&
+ (posX - 162 >= 0) && (posY - 365 >= 0))
+ zone = 5;
+ if ((posX - 106 <= 20) && (posY - 267 <= 26) &&
+ (posX - 106 >= 0) && (posY - 267 >= 0))
+ zone = 6;
+ if (zone) {
+ _events->changeMouseCursor(4);
+ _globals->_baseMapColor += 25;
+ if (_globals->_baseMapColor > 100)
+ _globals->_baseMapColor = 0;
+ _graphicsMan->setColorPercentage2(251, _globals->_baseMapColor, _globals->_baseMapColor, _globals->_baseMapColor);
+ } else {
+ _events->changeMouseCursor(0);
+ _graphicsMan->setColorPercentage2(251, 100, 100, 100);
+ }
+ _events->refreshScreenAndEvents();
+ if ((mouseButton == 1) && zone)
+ loopCond = true;
+ } while (!loopCond);
+
+ _globals->_disableInventFl = false;
+ _graphicsMan->fadeOutLong();
+
+ int result;
+ switch (zone) {
+ case 1:
+ result = 94;
+ break;
+ case 2:
+ result = 95;
+ break;
+ case 3:
+ result = 96;
+ break;
+ case 4:
+ result = 97;
+ break;
+ case 5:
+ result = 98;
+ break;
+ case 6:
+ result = 99;
+ break;
+ default:
+ result = 0;
+ break;
+ }
+ return result;
+}
+
+void HopkinsEngine::loadCredits() {
+ _globals->_creditsPosY = 440;
+ _globals->_creditsStep = 45;
+ byte *bufPtr;
+ switch (_globals->_language) {
+ case LANG_EN:
+ bufPtr = _fileIO->loadFile("CREAN.TXT");
+ break;
+ case LANG_FR:
+ bufPtr = _fileIO->loadFile("CREFR.TXT");
+ break;
+ case LANG_SP:
+ bufPtr = _fileIO->loadFile("CREES.TXT");
+ break;
+ default:
+ error("Unhandled language");
+ break;
+ }
+
+ byte *curPtr = bufPtr;
+ int idxLines = 0;
+ bool loopCond = false;
+ do {
+ if (*curPtr == '%') {
+ if (curPtr[1] == '%') {
+ loopCond = true;
+ break;
+ }
+ _globals->_creditsItem[idxLines]._color = curPtr[1];
+ _globals->_creditsItem[idxLines]._actvFl = true;
+ _globals->_creditsItem[idxLines]._linePosY = _globals->_creditsPosY + idxLines * _globals->_creditsStep;
+
+ int idxBuf = 0;
+ for(; idxBuf < 49; idxBuf++) {
+ byte curChar = curPtr[idxBuf + 3];
+ if (curChar == '%' || curChar == 10)
+ break;
+ _globals->_creditsItem[idxLines]._line[idxBuf] = curChar;
+ }
+ _globals->_creditsItem[idxLines]._line[idxBuf] = 0;
+ _globals->_creditsItem[idxLines]._lineSize = idxBuf - 1;
+ curPtr = curPtr + idxBuf + 2;
+ ++idxLines;
+ } else {
+ curPtr++;
+ }
+ _globals->_creditsLineNumb = idxLines;
+ } while (!loopCond);
+
+ _globals->freeMemory(bufPtr);
+}
+
+void HopkinsEngine::displayCredits(int startPosY, byte *buffer, char color) {
+ byte *bufPtr = buffer;
+ int strWidth = 0;
+ byte curChar;
+ for (;;) {
+ curChar = *bufPtr++;
+ if (!curChar)
+ break;
+ if (curChar > 31)
+ strWidth += _objectsMan->getWidth(_fontMan->_font, curChar - 32);
+ }
+ int startPosX = 320 - strWidth / 2;
+ int endPosX = strWidth + startPosX;
+ int endPosY = startPosY + 12;
+ if ((_globals->_creditsStartX == -1) && (_globals->_creditsEndX == -1) && (_globals->_creditsStartY == -1) && (_globals->_creditsEndY == -1)) {
+ _globals->_creditsStartX = startPosX;
+ _globals->_creditsEndX = endPosX;
+ _globals->_creditsStartY = startPosY;
+ _globals->_creditsEndY = endPosY;
+ }
+
+ _globals->_creditsStartX = MIN(_globals->_creditsStartX, startPosX);
+ _globals->_creditsEndX = MAX(_globals->_creditsEndX, endPosX);
+ _globals->_creditsStartY = MIN(_globals->_creditsStartY, startPosY);
+ _globals->_creditsEndY = MAX(_globals->_creditsEndY, endPosY);
+
+ Common::String message = Common::String((char *)buffer);
+ _fontMan->displayText(startPosX, startPosY, message, color);
+}
+
+void HopkinsEngine::displayCredits() {
+ loadCredits();
+ _globals->_creditsPosY = 436;
+ _graphicsMan->loadImage("GENERIC");
+ _graphicsMan->fadeInLong();
+ _soundMan->playSound(28);
+ _events->_mouseFl = false;
+ _globals->_eventMode = EVENTMODE_CREDITS;
+ _globals->_creditsStartX = _globals->_creditsEndX = _globals->_creditsStartY = _globals->_creditsEndY = -1;
+ int soundId = 28;
+ do {
+ for (int i = 0; i < _globals->_creditsLineNumb; ++i) {
+ if (_globals->_creditsItem[i]._actvFl) {
+ int nextY = _globals->_creditsPosY + i * _globals->_creditsStep;
+ _globals->_creditsItem[i]._linePosY = nextY;
+
+ if ((nextY - 21 >= 0) && (nextY - 21 <= 418)) {
+ int col = 0;
+ switch (_globals->_creditsItem[i]._color) {
+ case '1':
+ col = 163;
+ break;
+ case '2':
+ col = 161;
+ break;
+ case '3':
+ col = 162;
+ break;
+ default:
+ warning("Unknown color, default to col #1");
+ col = 163;
+ break;
+ }
+ if (_globals->_creditsItem[i]._lineSize != -1)
+ displayCredits(nextY, _globals->_creditsItem[i]._line, col);
+ }
+ }
+ }
+ --_globals->_creditsPosY;
+ if (_globals->_creditsStartX != -1 || _globals->_creditsEndX != -1 || _globals->_creditsStartY != -1 || _globals->_creditsEndY != -1) {
+ _events->refreshScreenAndEvents();
+ _graphicsMan->copySurface(_graphicsMan->_backBuffer, 60, 50, 520, 380, _graphicsMan->_frontBuffer, 60, 50);
+ } else {
+ _events->refreshScreenAndEvents();
+ }
+ if (_globals->_creditsItem[_globals->_creditsLineNumb - 1]._linePosY <= 39) {
+ _globals->_creditsPosY = 440;
+ ++soundId;
+ if (soundId > 31)
+ soundId = 28;
+ _soundMan->playSound(soundId);
+ }
+ _globals->_creditsStartX = -1;
+ _globals->_creditsEndX = -1;
+ _globals->_creditsStartY = -1;
+ _globals->_creditsEndY = -1;
+ } while ((_events->getMouseButton() != 1) && (!shouldQuit()));
+ _graphicsMan->fadeOutLong();
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _events->_mouseFl = true;
+}
+
+void HopkinsEngine::handleOceanMouseEvents() {
+ _fontMan->hideText(9);
+ if (_events->_mouseCursorId != 16)
+ return;
+
+ _events->getMouseX();
+ if (_objectsMan->_zoneNum <= 0)
+ return;
+
+ int oldPosX = _events->getMouseX();
+ int oldPosY = _events->getMouseY();
+ bool displAnim = false;
+ int oldX;
+ switch (_objectsMan->_zoneNum) {
+ case 1:
+ switch (_globals->_oceanDirection) {
+ case DIR_UP:
+ _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "27,26,25,24,23,22,21,20,19,18,-1,", 6, false);
+ break;
+ case DIR_RIGHT:
+ _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,-1,", 6, false);
+ break;
+ case DIR_DOWN:
+ _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "9,10,11,12,13,14,15,16,17,18,-1,", 6, false);
+ break;
+ default:
+ break;
+ }
+
+ _globals->_oceanDirection = DIR_LEFT;
+ _globals->_exitId = 1;
+ oldX = _objectsMan->getSpriteX(0);
+ for (;;) {
+ if (_globals->_speed == 1)
+ oldX -= 2;
+ else if (_globals->_speed == 2)
+ oldX -= 4;
+ else if (_globals->_speed == 3)
+ oldX -= 6;
+ _objectsMan->setSpriteX(0, oldX);
+ setSubmarineSprites();
+ _events->refreshScreenAndEvents();
+ if (_events->getMouseButton() == 1 && oldPosX == _events->getMouseX() && _events->getMouseY() == oldPosY) {
+ displAnim = true;
+ break;
+ }
+
+ if (oldX <= -100)
+ break;
+ }
+ break;
+ case 2:
+ switch (_globals->_oceanDirection) {
+ case DIR_UP:
+ _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "27,28,29,30,31,32,33,34,35,36,-1,", 6, false);
+ break;
+ case DIR_DOWN:
+ _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "9,8,7,6,5,4,3,2,1,0,-1,", 6, false);
+ break;
+ case DIR_LEFT:
+ _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,-1,", 6, false);
+ break;
+ default:
+ break;
+ }
+ _globals->_oceanDirection = DIR_RIGHT;
+ _globals->_exitId = 2;
+ oldX = _objectsMan->getSpriteX(0);
+ for (;;) {
+ if (_globals->_speed == 1)
+ oldX += 2;
+ else if (_globals->_speed == 2)
+ oldX += 4;
+ else if (_globals->_speed == 3)
+ oldX += 6;
+ _objectsMan->setSpriteX(0, oldX);
+ setSubmarineSprites();
+ _events->refreshScreenAndEvents();
+ if (_events->getMouseButton() == 1 && oldPosX == _events->getMouseX() && _events->getMouseY() == oldPosY) {
+ displAnim = true;
+ break;
+ }
+ if (oldX > 499)
+ break;
+ }
+ break;
+ case 3:
+ switch (_globals->_oceanDirection) {
+ case DIR_RIGHT:
+ oldX = _objectsMan->getSpriteX(0);
+ do {
+ if (_globals->_speed == 1)
+ oldX += 2;
+ else if (_globals->_speed == 2)
+ oldX += 4;
+ else if (_globals->_speed == 3)
+ oldX += 6;
+ _objectsMan->setSpriteX(0, oldX);
+ setSubmarineSprites();
+ _events->refreshScreenAndEvents();
+ if (_events->getMouseButton() == 1 && oldPosX == _events->getMouseX() && _events->getMouseY() == oldPosY) {
+ displAnim = true;
+ break;
+ }
+ } while (oldX <= 235);
+ if (!displAnim)
+ _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "36,35,34,33,32,31,30,29,28,27,-1,", 6, false);
+ break;
+ case DIR_DOWN:
+ _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,", 6, false);
+ break;
+ case DIR_LEFT:
+ oldX = _objectsMan->getSpriteX(0);
+ do {
+ if (_globals->_speed == 1)
+ oldX -= 2;
+ else if (_globals->_speed == 2)
+ oldX -= 4;
+ else if (_globals->_speed == 3)
+ oldX -= 6;
+ _objectsMan->setSpriteX(0, oldX);
+ setSubmarineSprites();
+ _events->refreshScreenAndEvents();
+ if (_events->getMouseButton() == 1 && oldPosX == _events->getMouseX() && _events->getMouseY() == oldPosY) {
+ displAnim = true;
+ break;
+ }
+ } while (oldX > 236);
+ if (!displAnim)
+ _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "18,19,20,21,22,23,24,25,26,27,-1,", 6, false);
+ break;
+ default:
+ break;
+ }
+ _globals->_oceanDirection = DIR_UP;
+ _globals->_exitId = 3;
+ break;
+ case 4:
+ switch (_globals->_oceanDirection) {
+ case DIR_UP:
+ _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,-1,", 6, false);
+ break;
+ case DIR_RIGHT:
+ oldX = _objectsMan->getSpriteX(0);
+ do {
+ if (_globals->_speed == 1)
+ oldX += 2;
+ else if (_globals->_speed == 2)
+ oldX += 4;
+ else if (_globals->_speed == 3)
+ oldX += 6;
+ _objectsMan->setSpriteX(0, oldX);
+ setSubmarineSprites();
+ _events->refreshScreenAndEvents();
+ if (_events->getMouseButton() == 1 && oldPosX == _events->getMouseX() && _events->getMouseY() == oldPosY) {
+ displAnim = true;
+ break;
+ }
+ } while (oldX <= 235);
+ if (!displAnim)
+ _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "0,1,2,3,4,5,6,7,8,9,-1,", 6, false);
+ break;
+ case DIR_LEFT:
+ oldX = _objectsMan->getSpriteX(0);
+ for (;;) {
+ if (_globals->_speed == 1)
+ oldX -= 2;
+ else if (_globals->_speed == 2)
+ oldX -= 4;
+ else if (_globals->_speed == 3)
+ oldX -= 6;
+ _objectsMan->setSpriteX(0, oldX);
+ setSubmarineSprites();
+ _events->refreshScreenAndEvents();
+ if (_events->getMouseButton() == 1 && oldPosX == _events->getMouseX() && _events->getMouseY() == oldPosY)
+ break;
+
+ if (oldX <= 236) {
+ if (!displAnim)
+ _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "18,17,16,15,14,13,12,11,10,9,-1,", 6, false);
+ break;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ _globals->_oceanDirection = DIR_DOWN;
+ _globals->_exitId = 4;
+ break;
+ }
+}
+
+void HopkinsEngine::setSubmarineSprites() {
+ switch (_globals->_oceanDirection) {
+ case DIR_UP:
+ _objectsMan->setSpriteIndex(0, 27);
+ break;
+ case DIR_RIGHT:
+ _objectsMan->setSpriteIndex(0, 0);
+ break;
+ case DIR_DOWN:
+ _objectsMan->setSpriteIndex(0, 9);
+ break;
+ case DIR_LEFT:
+ _objectsMan->setSpriteIndex(0, 18);
+ break;
+ default:
+ break;
+ }
+}
+
+void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFilename, Directions defaultDirection, int16 exit1, int16 exit2, int16 exit3, int16 exit4, int16 soundId) {
+ _globals->_cityMapEnabledFl = false;
+ _graphicsMan->_noFadingFl = false;
+ _globals->_freezeCharacterFl = false;
+ _globals->_exitId = 0;
+ _globals->_disableInventFl = true;
+ _soundMan->playSound(soundId);
+ _globals->_characterSpriteBuf = _fileIO->loadFile("VAISSEAU.SPR");
+ if (backgroundFilename.size())
+ _graphicsMan->loadImage(backgroundFilename);
+
+ if (curExitId == 77)
+ _objectsMan->loadLinkFile("IM77");
+ else if (curExitId == 84)
+ _objectsMan->loadLinkFile("IM84");
+ else if (curExitId == 91)
+ _objectsMan->loadLinkFile("IM91");
+ else
+ _objectsMan->loadLinkFile("ocean");
+
+ if (!exit1)
+ _linesMan->disableZone(1);
+ if (!exit2)
+ _linesMan->disableZone(2);
+ if (!exit3)
+ _linesMan->disableZone(3);
+ if (!exit4)
+ _linesMan->disableZone(4);
+
+ if (_globals->_oceanDirection == DIR_NONE)
+ _globals->_oceanDirection = defaultDirection;
+
+ switch (_globals->_oceanDirection) {
+ case DIR_UP:
+ _objectsMan->_characterPos.x = 236;
+ _objectsMan->_startSpriteIndex = 27;
+ break;
+ case DIR_RIGHT:
+ _objectsMan->_characterPos.x = -20;
+ _objectsMan->_startSpriteIndex = 0;
+ break;
+ case DIR_DOWN:
+ _objectsMan->_characterPos.x = 236;
+ _objectsMan->_startSpriteIndex = 9;
+ break;
+ case DIR_LEFT:
+ _objectsMan->_characterPos.x = 415;
+ _objectsMan->_startSpriteIndex = 18;
+ break;
+ default:
+ break;
+ }
+
+ _objectsMan->addStaticSprite(_globals->_characterSpriteBuf, Common::Point(_objectsMan->_characterPos.x, 110), 0, _objectsMan->_startSpriteIndex, 0, false, 0, 0);
+ _graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _graphicsMan->setColorPercentage(254, 0, 0, 0);
+ _objectsMan->animateSprite(0);
+ _linesMan->_route = NULL;
+ _events->mouseOn();
+ _events->changeMouseCursor(4);
+
+ for (int cpt = 0; cpt <= 4; cpt++)
+ _events->refreshScreenAndEvents();
+
+ if (!_graphicsMan->_noFadingFl)
+ _graphicsMan->fadeInLong();
+ _graphicsMan->_noFadingFl = false;
+ _globals->_eventMode = EVENTMODE_IGNORE;
+
+ for (;;) {
+ int mouseButton = _events->getMouseButton();
+ if (mouseButton && mouseButton == 1)
+ handleOceanMouseEvents();
+ _linesMan->checkZone();
+ setSubmarineSprites();
+
+ _events->refreshScreenAndEvents();
+ if (_globals->_exitId || shouldQuit())
+ break;
+ }
+
+ if (_globals->_exitId == 1)
+ _globals->_exitId = exit1;
+ else if (_globals->_exitId == 2)
+ _globals->_exitId = exit2;
+ else if (_globals->_exitId == 3)
+ _globals->_exitId = exit3;
+ else if (_globals->_exitId == 4)
+ _globals->_exitId = exit4;
+ _graphicsMan->fadeOutLong();
+ _objectsMan->removeSprite(0);
+ _objectsMan->clearScreen();
+ _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR");
+ _globals->_characterType = 0;
+}
+
+void HopkinsEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
+ _soundMan->syncSoundSettings();
+}
+
+bool HopkinsEngine::displayAdultDisclaimer() {
+ int xp, yp;
+ int buttonIndex;
+
+ _graphicsMan->_minX = 0;
+ _graphicsMan->_minY = 0;
+ _graphicsMan->_maxX = SCREEN_WIDTH;
+ _graphicsMan->_maxY = SCREEN_HEIGHT - 1;
+ _events->_breakoutFl = false;
+ _objectsMan->_forestFl = false;
+ _globals->_disableInventFl = true;
+ _globals->_exitId = 0;
+
+ _graphicsMan->loadImage("ADULT");
+ _graphicsMan->fadeInLong();
+ _events->mouseOn();
+ _events->changeMouseCursor(0);
+ _events->_mouseCursorId = 0;
+ _events->_mouseSpriteId = 0;
+
+ do {
+ xp = _events->getMouseX();
+ yp = _events->getMouseY();
+
+ buttonIndex = 0;
+ if (xp >= 37 && xp <= 169 && yp >= 406 && yp <= 445)
+ buttonIndex = 2;
+ else if (xp >= 424 && xp <= 602 && yp >= 406 && yp <= 445)
+ buttonIndex = 1;
+
+ _events->refreshScreenAndEvents();
+ } while (!shouldQuit() && (buttonIndex == 0 || _events->getMouseButton() != 1));
+
+ _globals->_disableInventFl = false;
+ _graphicsMan->fadeOutLong();
+
+ if (buttonIndex != 2) {
+ // Quit game
+ return false;
+ } else {
+ // Continue
+ _graphicsMan->_minX = 0;
+ _graphicsMan->_maxY = 20;
+ _graphicsMan->_maxX = SCREEN_WIDTH;
+ _graphicsMan->_maxY = SCREEN_HEIGHT - 20;
+ return true;
+ }
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h
new file mode 100644
index 0000000000..499f0c466d
--- /dev/null
+++ b/engines/hopkins/hopkins.h
@@ -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.
+ *
+ */
+
+#ifndef HOPKINS_HOPKINS_H
+#define HOPKINS_HOPKINS_H
+
+#include "hopkins/anim.h"
+#include "hopkins/computer.h"
+#include "hopkins/debugger.h"
+#include "hopkins/dialogs.h"
+#include "hopkins/events.h"
+#include "hopkins/files.h"
+#include "hopkins/font.h"
+#include "hopkins/globals.h"
+#include "hopkins/graphics.h"
+#include "hopkins/lines.h"
+#include "hopkins/menu.h"
+#include "hopkins/objects.h"
+#include "hopkins/saveload.h"
+#include "hopkins/script.h"
+#include "hopkins/sound.h"
+#include "hopkins/talk.h"
+
+#include "common/scummsys.h"
+#include "common/system.h"
+#include "common/error.h"
+#include "common/random.h"
+#include "common/hash-str.h"
+#include "common/util.h"
+#include "engines/engine.h"
+#include "graphics/surface.h"
+
+/**
+ * This is the namespace of the Hopkins engine.
+ *
+ * Status of this engine: In Development
+ *
+ * Games using this engine:
+ * - Hopkins FBI
+ */
+namespace Hopkins {
+
+enum {
+ kHopkinsDebugAnimations = 1 << 0,
+ kHopkinsDebugActions = 1 << 1,
+ kHopkinsDebugSound = 1 << 2,
+ kHopkinsDebugMusic = 1 << 3,
+ kHopkinsDebugScripts = 1 << 4
+};
+
+#define DEBUG_BASIC 1
+#define DEBUG_INTERMEDIATE 2
+#define DEBUG_DETAILED 3
+
+#define SCREEN_WIDTH 640
+#define SCREEN_HEIGHT 480
+
+#define MAX_LINES 400
+
+/**
+ * A wrapper macro used around three character constants, like 'END', to
+ * ensure portability. Typical usage: MKTAG24('E','N','D').
+ */
+#define MKTAG24(a0,a1,a2) ((uint32)((a2) | (a1) << 8 | ((a0) << 16)))
+
+#define READ_LE_INT16(x) (int16) READ_LE_UINT16(x)
+
+struct HopkinsGameDescription;
+
+class HopkinsEngine : public Engine {
+private:
+ const HopkinsGameDescription *_gameDescription;
+ Common::RandomSource _randomSource;
+
+ void initializeSystem();
+
+ void displayNotAvailable();
+ void restoreSystem();
+ void endLinuxDemo();
+ void displayEndDemo();
+ void bombExplosion();
+ void handleConflagration();
+ void playSubmarineCutscene();
+ void playUnderwaterBaseCutscene();
+ void playPlaneCutscene();
+ void playEnding();
+
+ /**
+ * Displays the map screen in the underground base.
+ */
+ int handleBaseMap();
+
+ /**
+ * Loads the base map from the PBASE file
+ */
+ void loadBaseMap();
+
+ /**
+ * Draws a simple base map for the Windows version, which implemented a 'Wolfenstein 3D'
+ * style shooter for the base, rather than having a map
+ */
+ void drawBaseMap();
+
+ void handleOceanMouseEvents();
+ void setSubmarineSprites();
+ void handleOceanMaze(int16 curExitId, Common::String backgroundFilename, Directions defaultDirection, int16 exit1, int16 exit2, int16 exit3, int16 exit4, int16 soundId);
+ void loadCredits();
+ void displayCredits(int startPosY, byte *buffer, char color);
+ void displayCredits();
+ void handleNotAvailable(int nextScreen);
+
+ bool runWin95Demo();
+ bool runLinuxDemo();
+ bool runFull();
+
+ /**
+ * Show warning screen about the game being adults only.
+ */
+ bool displayAdultDisclaimer();
+protected:
+ // Engine APIs
+ virtual Common::Error run();
+ virtual bool hasFeature(EngineFeature f) const;
+
+public:
+ AnimationManager *_animMan;
+ ComputerManager *_computer;
+ DialogsManager *_dialog;
+ Debugger *_debug;
+ EventsManager *_events;
+ FileManager *_fileIO;
+ FontManager *_fontMan;
+ Globals *_globals;
+ GraphicsManager *_graphicsMan;
+ LinesManager *_linesMan;
+ MenuManager *_menuMan;
+ ObjectsManager *_objectsMan;
+ SaveLoadManager *_saveLoad;
+ ScriptManager *_script;
+ SoundManager *_soundMan;
+ TalkManager *_talkMan;
+
+public:
+ HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDesc);
+ virtual ~HopkinsEngine();
+ void GUIError(const Common::String &msg);
+
+ uint32 getFeatures() const;
+ Common::Language getLanguage() const;
+ Common::Platform getPlatform() const;
+ uint16 getVersion() const;
+ bool getIsDemo() const;
+ bool shouldQuit() const;
+
+ int getRandomNumber(int maxNumber);
+ Common::String generateSaveName(int slotNumber);
+ virtual bool canLoadGameStateCurrently();
+ virtual bool canSaveGameStateCurrently();
+ virtual Common::Error loadGameState(int slot);
+ virtual Common::Error saveGameState(int slot, const Common::String &desc);
+ int _startGameSlot;
+ /**
+ * Run the introduction sequence
+ */
+ void playIntro();
+
+ /**
+ * Synchronizes the sound settings from ScummVM into the engine
+ */
+ virtual void syncSoundSettings();
+};
+
+// Global reference to the HopkinsEngine object
+extern HopkinsEngine *g_vm;
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_HOPKINS_H */
diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp
new file mode 100644
index 0000000000..6603708449
--- /dev/null
+++ b/engines/hopkins/lines.cpp
@@ -0,0 +1,2914 @@
+/* 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 "hopkins/lines.h"
+
+#include "hopkins/graphics.h"
+#include "hopkins/hopkins.h"
+
+#include "common/system.h"
+#include "common/textconsole.h"
+
+namespace Hopkins {
+
+LinesManager::LinesManager(HopkinsEngine *vm) {
+ _vm = vm;
+
+ for (int i = 0; i < MAX_LINES; ++i) {
+ Common::fill((byte *)&_zoneLine[i], (byte *)&_zoneLine[i] + sizeof(LigneZoneItem), 0);
+ Common::fill((byte *)&_lineItem[i], (byte *)&_lineItem[i] + sizeof(LigneItem), 0);
+ }
+
+ for (int i = 0; i < 4000; ++i)
+ Common::fill((byte *)&_smoothRoute[i], (byte *)&_smoothRoute[i] + sizeof(SmoothItem), 0);
+
+ for (int i = 0; i < 8001; ++i)
+ _bestRoute[i].set(0, 0, DIR_NONE);
+
+ for (int i = 0; i < 101; ++i) {
+ Common::fill((byte *)&_segment[i], (byte *)&_segment[i] + sizeof(SegmentItem), 0);
+ Common::fill((byte *)&_squareZone[i], (byte *)&_squareZone[i] + sizeof(SquareZoneItem), 0);
+ }
+
+ for (int i = 0; i < 105; ++i) {
+ _bobZone[i] = 0;
+ _bobZoneFl[i] = false;
+ }
+
+ for (int i = 0; i < 106; ++i)
+ Common::fill((byte *)&_zone[i], (byte *)&_zone[i] + sizeof(ZoneItem), 0);
+
+ _linesNumb = 0;
+ _newLineIdx = 0;
+ _newLineDataIdx = 0;
+ _newRouteIdx = 0;
+ _newPosX = 0;
+ _newPosY = 0;
+ _smoothMoveDirection = DIR_NONE;
+ _lastLine = 0;
+ _maxLineIdx = 0;
+ _pathFindingMaxDepth = 0;
+ _testRoute0 = NULL;
+ _testRoute1 = NULL;
+ _testRoute2 = NULL;
+ _lineBuf = NULL;
+ _route = NULL;
+ _currentSegmentId = 0;
+ _largeBuf = NULL;
+ _zoneSkipCount = 0;
+ _hotspotTextColor = 0;
+ _forceHideText = false;
+ _oldMouseZoneId = 0;
+ _oldMouseX = 0;
+ _oldMouseY = 0;
+ _oldRouteFromX = 0;
+ _oldRouteFromY = 0;
+ _oldRouteDestX = 0;
+ _oldRouteDestY = 0;
+ _oldZoneNum = 0;
+}
+
+LinesManager::~LinesManager() {
+ _vm->_globals->freeMemory(_largeBuf);
+ if (_testRoute0)
+ delete[] _testRoute0;
+ if (_testRoute1)
+ delete[] _testRoute1;
+ if (_testRoute2)
+ delete[] _testRoute2;
+}
+
+int LigneItem::appendToRouteInc(int from, int to, RouteItem *route, int index) {
+ if (to == -1)
+ to = _lineDataEndIdx;
+
+ for (int i = from; i < to; ++i)
+ route[index++].set(_lineData[2*i], _lineData[2*i+1], _directionRouteInc);
+ return index;
+}
+int LigneItem::appendToRouteDec(int from, int to, RouteItem *route, int index) {
+ if (from == -1)
+ from = _lineDataEndIdx - 1;
+
+ for (int i = from; i > to; --i)
+ route[index++].set(_lineData[2*i], _lineData[2*i+1], _directionRouteDec);
+ return index;
+}
+
+/**
+ * Load lines
+ */
+void LinesManager::loadLines(const Common::String &file) {
+ resetLines();
+ _linesNumb = 0;
+ _lastLine = 0;
+ byte *ptr = _vm->_fileIO->loadFile(file);
+ for (int idx = 0; READ_LE_INT16((uint16 *)ptr + (idx * 5)) != -1; idx++) {
+ addLine(idx,
+ (Directions)READ_LE_INT16((uint16 *)ptr + (idx * 5)),
+ READ_LE_INT16((uint16 *)ptr + (idx * 5) + 1),
+ READ_LE_INT16((uint16 *)ptr + (idx * 5) + 2),
+ READ_LE_INT16((uint16 *)ptr + (idx * 5) + 3),
+ READ_LE_INT16((uint16 *)ptr + (idx * 5) + 4));
+ }
+ initRoute();
+ _vm->_globals->freeMemory(ptr);
+}
+
+/**
+ * Check Hotspots in Inventory screen
+ * Returns the ID of the hotspot under mouse
+ */
+int LinesManager::checkInventoryHotspots(int posX, int posY) {
+ int hotspotId = 0;
+ if (posY >= 120 && posY <= 153)
+ hotspotId = checkInventoryHotspotsRow(posX, 1, false);
+ if (posY >= 154 && posY <= 191)
+ hotspotId = checkInventoryHotspotsRow(posX, 7, false);
+ if (posY >= 192 && posY <= 229)
+ hotspotId = checkInventoryHotspotsRow(posX, 13, false);
+ if (posY >= 230 && posY <= 267)
+ hotspotId = checkInventoryHotspotsRow(posX, 19, false);
+ if (posY >= 268 && posY <= 306)
+ hotspotId = checkInventoryHotspotsRow(posX, 25, true);
+ if (posY >= 268 && posY <= 288 && posX >= _vm->_graphicsMan->_scrollOffset + 424 && posX <= _vm->_graphicsMan->_scrollOffset + 478)
+ hotspotId = 30;
+ if (posY >= 290 && posY <= 306 && posX >= _vm->_graphicsMan->_scrollOffset + 424 && posX <= _vm->_graphicsMan->_scrollOffset + 478)
+ hotspotId = 31;
+ if (posY < 114 || posY > 306 || posX < _vm->_graphicsMan->_scrollOffset + 152 || posX > _vm->_graphicsMan->_scrollOffset + 484)
+ hotspotId = 32;
+
+ return hotspotId;
+}
+
+/**
+ * Check the hotspots in an inventory line
+ * Returns the hotspot Id under the mouse, if any.
+ */
+int LinesManager::checkInventoryHotspotsRow(int posX, int minZoneNum, bool lastRow) {
+ int result = minZoneNum;
+
+ if (posX >= _vm->_graphicsMan->_scrollOffset + 158 && posX < _vm->_graphicsMan->_scrollOffset + 208)
+ return result;
+
+ if (posX >= _vm->_graphicsMan->_scrollOffset + 208 && posX < _vm->_graphicsMan->_scrollOffset + 266) {
+ result += 1;
+ return result;
+ }
+
+ if (posX >= _vm->_graphicsMan->_scrollOffset + 266 && posX < _vm->_graphicsMan->_scrollOffset + 320) {
+ result += 2;
+ return result;
+ }
+
+ if (posX >= _vm->_graphicsMan->_scrollOffset + 320 && posX < _vm->_graphicsMan->_scrollOffset + 370) {
+ result += 3;
+ return result;
+ }
+
+ if (posX >= _vm->_graphicsMan->_scrollOffset + 370 && posX < _vm->_graphicsMan->_scrollOffset + 424) {
+ result += 4;
+ return result;
+ }
+
+ if (!lastRow && posX >= _vm->_graphicsMan->_scrollOffset + 424 && posX <= _vm->_graphicsMan->_scrollOffset + 478) {
+ result += 5;
+ return result;
+ }
+
+ return 0;
+}
+
+/**
+ * Add Zone Line
+ */
+void LinesManager::addZoneLine(int idx, int fromX, int fromY, int destX, int destY, int bobZoneIdx) {
+ int16 *zoneData;
+
+ if (fromX == fromY && fromY == destX && fromY == destY) {
+ _bobZoneFl[bobZoneIdx] = true;
+ _bobZone[bobZoneIdx] = fromY;
+ } else {
+ assert (idx <= MAX_LINES);
+ _zoneLine[idx]._zoneData = (int16 *)_vm->_globals->freeMemory((byte *)_zoneLine[idx]._zoneData);
+
+ int distX = abs(fromX - destX);
+ int distY = abs(fromY - destY);
+ int maxDist = 1;
+ if (distX <= distY)
+ maxDist += distY;
+ else
+ maxDist += distX;
+
+ zoneData = (int16 *)_vm->_globals->allocMemory(2 * sizeof(int16) * maxDist + (4 * sizeof(int16)));
+ assert(zoneData);
+
+ _zoneLine[idx]._zoneData = zoneData;
+
+ int16 *dataP = zoneData;
+ int stepX = 1000 * distX / maxDist;
+ int stepY = 1000 * distY / maxDist;
+ if (destX < fromX)
+ stepX = -stepX;
+ if (destY < fromY)
+ stepY = -stepY;
+ int smoothPosX = 1000 * fromX;
+ int smoothPosY = 1000 * fromY;
+ for (int i = 0; i < maxDist; i++) {
+ *dataP++ = smoothPosX / 1000;
+ *dataP++ = smoothPosY / 1000;
+
+ smoothPosX += stepX;
+ smoothPosY += stepY;
+ }
+ *dataP++ = -1;
+ *dataP++ = -1;
+
+ _zoneLine[idx]._count = maxDist;
+ _zoneLine[idx]._bobZoneIdx = bobZoneIdx;
+ }
+}
+
+/**
+ * Add Line
+ */
+void LinesManager::addLine(int lineIdx, Directions direction, int fromX, int fromY, int destX, int destY) {
+ assert (lineIdx <= MAX_LINES);
+
+ if (_linesNumb < lineIdx)
+ _linesNumb = lineIdx;
+
+ _lineItem[lineIdx]._lineData = (int16 *)_vm->_globals->freeMemory((byte *)_lineItem[lineIdx]._lineData);
+ int distX = abs(fromX - destX) + 1;
+ int distY = abs(fromY - destY) + 1;
+ int maxDist = distY;
+ if (distX > maxDist)
+ maxDist = distX;
+
+ byte *zoneData = _vm->_globals->allocMemory(4 * maxDist + 8);
+ assert (zoneData);
+
+ Common::fill(zoneData, zoneData + 4 * maxDist + 8, 0);
+ _lineItem[lineIdx]._lineData = (int16 *)zoneData;
+
+ int16 *curLineData = _lineItem[lineIdx]._lineData;
+ int stepX = 1000 * distX / (maxDist - 1);
+ int stepY = 1000 * distY / (maxDist - 1);
+ if (destX < fromX)
+ stepX = -stepX;
+ if (destY < fromY)
+ stepY = -stepY;
+ int dirX = (int)stepX / 1000; // -1: Left, 0: None, 1: Right
+ int dirY = (int)stepY / 1000; // -1: Up, 0: None, 1: Right
+ if (!dirX) {
+ if (dirY == -1) {
+ _lineItem[lineIdx]._directionRouteInc = DIR_UP;
+ _lineItem[lineIdx]._directionRouteDec = DIR_DOWN;
+ } else if (dirY == 1) {
+ _lineItem[lineIdx]._directionRouteInc = DIR_DOWN;
+ _lineItem[lineIdx]._directionRouteDec = DIR_UP;
+ }
+ // If dirY == 0, no move
+ } else if (dirX == 1) {
+ if (dirY == -1) {
+ _lineItem[lineIdx]._directionRouteInc = DIR_UP_RIGHT;
+ _lineItem[lineIdx]._directionRouteDec = DIR_DOWN_LEFT;
+ } else if (!dirY) {
+ _lineItem[lineIdx]._directionRouteInc = DIR_RIGHT;
+ _lineItem[lineIdx]._directionRouteDec = DIR_LEFT;
+ } else if (dirY == 1) {
+ _lineItem[lineIdx]._directionRouteInc = DIR_DOWN_RIGHT;
+ _lineItem[lineIdx]._directionRouteDec = DIR_UP_LEFT;
+ }
+ } else if (dirX == -1) {
+ if (dirY == 1) {
+ _lineItem[lineIdx]._directionRouteInc = DIR_DOWN_LEFT;
+ _lineItem[lineIdx]._directionRouteDec = DIR_UP_RIGHT;
+ } else if (!dirY) {
+ _lineItem[lineIdx]._directionRouteInc = DIR_LEFT;
+ _lineItem[lineIdx]._directionRouteDec = DIR_RIGHT;
+ } else if (dirY == -1) {
+ _lineItem[lineIdx]._directionRouteInc = DIR_UP_LEFT;
+ _lineItem[lineIdx]._directionRouteDec = DIR_DOWN_RIGHT;
+ }
+ }
+
+ // Second pass to soften cases where dirY == 0
+ if (dirX == 1) {
+ if (stepY > 250 && stepY <= 999) {
+ _lineItem[lineIdx]._directionRouteInc = DIR_DOWN_RIGHT;
+ _lineItem[lineIdx]._directionRouteDec = DIR_UP_LEFT;
+ } else if (stepY < -250 && stepY > -1000) {
+ _lineItem[lineIdx]._directionRouteInc = DIR_UP_RIGHT;
+ _lineItem[lineIdx]._directionRouteDec = DIR_DOWN_LEFT;
+ }
+ } else if (dirX == -1) {
+ if (stepY > 250 && stepY <= 999) {
+ _lineItem[lineIdx]._directionRouteInc = DIR_DOWN_LEFT;
+ _lineItem[lineIdx]._directionRouteDec = DIR_UP_RIGHT;
+ } else if (stepY < -250 && stepY > -1000) {
+ // In the original code, the test was on positive values and
+ // was impossible to meet.
+ _lineItem[lineIdx]._directionRouteInc = DIR_UP_LEFT;
+ _lineItem[lineIdx]._directionRouteDec = DIR_DOWN_RIGHT;
+ }
+ }
+
+ stepX = 1000 * distX / maxDist;
+ stepY = 1000 * distY / maxDist;
+ if (destX < fromX)
+ stepX = -stepX;
+ if (destY < fromY)
+ stepY = -stepY;
+ int smoothPosX = 1000 * fromX;
+ int smoothPosY = 1000 * fromY;
+ for (int i = 0; i < maxDist - 1; i++) {
+ curLineData[0] = smoothPosX / 1000;
+ curLineData[1] = smoothPosY / 1000;
+ curLineData += 2;
+
+ smoothPosX += stepX;
+ smoothPosY += stepY;
+ }
+ curLineData[0] = destX;
+ curLineData[1] = destY;
+
+ curLineData += 2;
+ curLineData[0] = -1;
+ curLineData[1] = -1;
+
+ _lineItem[lineIdx]._lineDataEndIdx = maxDist;
+ _lineItem[lineIdx]._direction = direction;
+
+ ++_linesNumb;
+}
+
+/**
+ * Check collision line
+ */
+bool LinesManager::checkCollisionLine(int xp, int yp, int *foundDataIdx, int *foundLineIdx, int startLineIdx, int endLineIdx) {
+ int16 *lineData;
+
+ int left = xp + 4;
+ int right = xp - 4;
+ int top = yp + 4;
+ int bottom = yp - 4;
+
+ *foundDataIdx = -1;
+ *foundLineIdx = -1;
+
+ for (int curLineIdx = startLineIdx; curLineIdx <= endLineIdx; curLineIdx++) {
+ lineData = _lineItem[curLineIdx]._lineData;
+
+ if (lineData == NULL)
+ continue;
+
+ bool collisionFl = true;
+ int lineStartX = lineData[0];
+ int lineStartY = lineData[1];
+ int lineDataIdx = 2 * _lineItem[curLineIdx]._lineDataEndIdx;
+ int lineEndX = lineData[lineDataIdx - 2];
+ int lineEndY = lineData[lineDataIdx - 1];
+ if (lineStartX >= lineEndX) {
+ if (right > lineStartX || left < lineEndX)
+ collisionFl = false;
+ } else { // lineStartX < lineEndX
+ if (left < lineStartX || right > lineEndX)
+ collisionFl = false;
+ }
+ if (lineStartY >= lineEndY) {
+ if (bottom > lineStartY || top < lineEndY)
+ collisionFl = false;
+ } else { // lineStartY < lineEndY
+ if (top < lineStartY || bottom > lineEndY)
+ collisionFl = false;
+ }
+
+ if (!collisionFl)
+ continue;
+
+ for (int idx = 0; idx < _lineItem[curLineIdx]._lineDataEndIdx; idx++) {
+ int lineX = lineData[0];
+ int lineY = lineData[1];
+ lineData += 2;
+
+ if ((xp == lineX || xp + 1 == lineX) && (yp == lineY || yp + 1 == lineY)) {
+ *foundDataIdx = idx;
+ *foundLineIdx = curLineIdx;
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+/**
+ * Init route
+ */
+void LinesManager::initRoute() {
+ int lineX = _lineItem[0]._lineData[0];
+ int lineY = _lineItem[0]._lineData[1];
+
+ int lineIdx = 1;
+ for (;;) {
+ int curDataIdx = _lineItem[lineIdx]._lineDataEndIdx;
+ int16 *curLineData = _lineItem[lineIdx]._lineData;
+
+ int curLineX = curLineData[2 * curDataIdx - 2];
+ int curLineY = curLineData[2 * curDataIdx - 1];
+ if (_vm->_graphicsMan->_maxX == curLineX || _vm->_graphicsMan->_maxY == curLineY ||
+ _vm->_graphicsMan->_minX == curLineX || _vm->_graphicsMan->_minY == curLineY ||
+ (lineX == curLineX && lineY == curLineY))
+ break;
+ if (lineIdx == MAX_LINES)
+ error("ERROR - LAST LINE NOT FOUND");
+
+ int16 *nextLineData = _lineItem[lineIdx + 1]._lineData;
+ if (!nextLineData)
+ break;
+ if (nextLineData[0] != curLineX && nextLineData[1] != curLineY)
+ break;
+ ++lineIdx;
+ }
+
+ _lastLine = lineIdx;
+ for (int idx = 1; idx < MAX_LINES; idx++) {
+ if ((_lineItem[idx]._lineDataEndIdx < _maxLineIdx) && (idx != _lastLine + 1)) {
+ _lineItem[idx]._directionRouteInc = _lineItem[idx - 1]._directionRouteInc;
+ _lineItem[idx]._directionRouteDec = _lineItem[idx - 1]._directionRouteDec;
+ }
+ }
+}
+
+// Avoid obstacle
+int LinesManager::avoidObstacle(int lineIdx, int lineDataIdx, int routeIdx, int destLineIdx, int destLineDataIdx, RouteItem *route) {
+ int curLineIdx = lineIdx;
+ int curLineDataIdx = lineDataIdx;
+ int curRouteIdx = routeIdx;
+ if (lineIdx < destLineIdx) {
+ curRouteIdx = _lineItem[lineIdx].appendToRouteInc(lineDataIdx, -1, route, curRouteIdx);
+
+ for (int i = lineIdx + 1; i < destLineIdx; i++)
+ curRouteIdx = _lineItem[i].appendToRouteInc(0, -1, route, curRouteIdx);
+
+ curLineDataIdx = 0;
+ curLineIdx = destLineIdx;
+ }
+ if (curLineIdx > destLineIdx) {
+ curRouteIdx = _lineItem[curLineIdx].appendToRouteDec(curLineDataIdx, 0, route, curRouteIdx);
+ for (int i = curLineIdx - 1; i > destLineIdx; i--)
+ curRouteIdx = _lineItem[i].appendToRouteDec(-1, 0, route, curRouteIdx);
+ curLineDataIdx = _lineItem[destLineIdx]._lineDataEndIdx - 1;
+ curLineIdx = destLineIdx;
+ }
+ if (curLineIdx == destLineIdx) {
+ if (destLineDataIdx >= curLineDataIdx) {
+ curRouteIdx = _lineItem[destLineIdx].appendToRouteInc(curLineDataIdx, destLineDataIdx, route, curRouteIdx);
+ } else {
+ curRouteIdx = _lineItem[destLineIdx].appendToRouteDec(curLineDataIdx, destLineDataIdx, route, curRouteIdx);
+ }
+ }
+ return curRouteIdx;
+}
+
+// Avoid Obstacle, taking into account start/End lind Idx
+int LinesManager::avoidObstacleOnSegment(int lineIdx, int lineDataIdx, int routeIdx, int destLineIdx, int destLineDataIdx, RouteItem *route, int startLineIdx, int endLineIdx) {
+ int curLineIdx = lineIdx;
+ int curLineDataIdx = lineDataIdx;
+ int curRouteIdx = routeIdx;
+ if (destLineIdx < lineIdx) {
+ curRouteIdx = _lineItem[lineIdx].appendToRouteInc(lineDataIdx, -1, route, curRouteIdx);
+ int wrkLineIdx = lineIdx + 1;
+ if (wrkLineIdx == endLineIdx + 1)
+ wrkLineIdx = startLineIdx;
+ while (destLineIdx != wrkLineIdx) {
+ curRouteIdx = _lineItem[wrkLineIdx].appendToRouteInc(0, -1, route, curRouteIdx);
+ ++wrkLineIdx;
+ if (endLineIdx + 1 == wrkLineIdx)
+ wrkLineIdx = startLineIdx;
+ }
+ curLineDataIdx = 0;
+ curLineIdx = destLineIdx;
+ }
+ if (destLineIdx > curLineIdx) {
+ curRouteIdx = _lineItem[curLineIdx].appendToRouteDec(curLineDataIdx, 0, route, curRouteIdx);
+ int wrkLineIdx = curLineIdx - 1;
+ if (wrkLineIdx == startLineIdx - 1)
+ wrkLineIdx = endLineIdx;
+ while (destLineIdx != wrkLineIdx) {
+ curRouteIdx = _lineItem[wrkLineIdx].appendToRouteDec(-1, 0, route, curRouteIdx);
+ --wrkLineIdx;
+ if (startLineIdx - 1 == wrkLineIdx)
+ wrkLineIdx = endLineIdx;
+ }
+ curLineDataIdx = _lineItem[destLineIdx]._lineDataEndIdx - 1;
+ curLineIdx = destLineIdx;
+ }
+ if (destLineIdx == curLineIdx) {
+ if (destLineDataIdx >= curLineDataIdx) {
+ curRouteIdx = _lineItem[destLineIdx].appendToRouteInc(curLineDataIdx, destLineDataIdx, route, curRouteIdx);
+ } else {
+ curRouteIdx = _lineItem[destLineIdx].appendToRouteDec(curLineDataIdx, destLineDataIdx, route, curRouteIdx);
+ }
+ }
+ return curRouteIdx;
+}
+
+bool LinesManager::MIRACLE(int fromX, int fromY, int lineIdx, int destLineIdx, int routeIdx) {
+ int newLinesDataIdx = 0;
+ int newLinesIdx = 0;
+ int lineIdxLeft = 0;
+ int lineDataIdxLeft = 0;
+ int lineIdxRight = 0;
+ int lineDataIdxRight = 0;
+ int linesIdxUp = 0;
+ int linesDataIdxUp = 0;
+ int lineIdxDown = 0;
+ int lineDataIdxDown = 0;
+
+ int curX = fromX;
+ int curY = fromY;
+ int curLineIdx = lineIdx;
+ int tmpRouteIdx = routeIdx;
+ int dummyDataIdx;
+ if (checkCollisionLine(fromX, fromY, &dummyDataIdx, &curLineIdx, 0, _linesNumb)) {
+ switch (_lineItem[curLineIdx]._direction) {
+ case DIR_UP:
+ curY -= 2;
+ break;
+ case DIR_UP_RIGHT:
+ curY -= 2;
+ curX += 2;
+ break;
+ case DIR_RIGHT:
+ curX += 2;
+ break;
+ case DIR_DOWN_RIGHT:
+ curY += 2;
+ curX += 2;
+ break;
+ case DIR_DOWN:
+ curY += 2;
+ break;
+ case DIR_DOWN_LEFT:
+ curY += 2;
+ curX -= 2;
+ break;
+ case DIR_LEFT:
+ curX -= 2;
+ break;
+ case DIR_UP_LEFT:
+ curY -= 2;
+ curX -= 2;
+ break;
+ default:
+ break;
+ }
+ }
+
+ int stepVertIncCount = 0;
+ for (int i = curY; curY + 200 > i; i++) {
+ if (checkCollisionLine(curX, i, &lineDataIdxDown, &lineIdxDown, 0, _lastLine) == 1 && lineIdxDown <= _lastLine)
+ break;
+ lineDataIdxDown = 0;
+ lineIdxDown = -1;
+ ++stepVertIncCount;
+ }
+
+ int stepVertDecCount = 0;
+ for (int i = curY; curY - 200 < i; i--) {
+ if (checkCollisionLine(curX, i, &linesDataIdxUp, &linesIdxUp, 0, _lastLine) == 1 && linesIdxUp <= _lastLine)
+ break;
+ linesDataIdxUp = 0;
+ linesIdxUp = -1;
+ ++stepVertDecCount;
+ }
+
+ int stepHoriIncCount = 0;
+ for (int i = curX; curX + 200 > i; i++) {
+ if (checkCollisionLine(i, curY, &lineDataIdxRight, &lineIdxRight, 0, _lastLine) == 1 && lineIdxRight <= _lastLine)
+ break;
+ lineDataIdxRight = 0;
+ lineIdxRight = -1;
+ ++stepHoriIncCount;
+ }
+
+ int stepHoriDecCount = 0;
+ for (int i = curX; curX - 200 < i; i--) {
+ if (checkCollisionLine(i, curY, &lineDataIdxLeft, &lineIdxLeft, 0, _lastLine) == 1 && lineIdxLeft <= _lastLine)
+ break;
+ lineDataIdxLeft = 0;
+ lineIdxLeft = -1;
+ ++stepHoriDecCount;
+ }
+
+ if (destLineIdx > curLineIdx) {
+ if (linesIdxUp != -1 && linesIdxUp <= curLineIdx)
+ linesIdxUp = -1;
+ if (lineIdxRight != -1 && curLineIdx >= lineIdxRight)
+ lineIdxRight = -1;
+ if (lineIdxDown != -1 && curLineIdx >= lineIdxDown)
+ lineIdxDown = -1;
+ if (lineIdxLeft != -1 && curLineIdx >= lineIdxLeft)
+ lineIdxLeft = -1;
+ if (linesIdxUp != -1 && destLineIdx < linesIdxUp)
+ linesIdxUp = -1;
+ if (lineIdxRight != -1 && destLineIdx < lineIdxRight)
+ lineIdxRight = -1;
+ if (lineIdxDown != -1 && destLineIdx < lineIdxDown)
+ lineIdxDown = -1;
+ if (lineIdxLeft != -1 && destLineIdx < lineIdxLeft)
+ lineIdxLeft = -1;
+ } else if (destLineIdx < curLineIdx) {
+ if (linesIdxUp != -1 && linesIdxUp >= curLineIdx)
+ linesIdxUp = -1;
+ if (lineIdxRight != -1 && curLineIdx <= lineIdxRight)
+ lineIdxRight = -1;
+ if (lineIdxDown != -1 && curLineIdx <= lineIdxDown)
+ lineIdxDown = -1;
+ if (lineIdxLeft != -1 && curLineIdx <= lineIdxLeft)
+ lineIdxLeft = -1;
+ if (linesIdxUp != -1 && destLineIdx > linesIdxUp)
+ linesIdxUp = -1;
+ if (lineIdxRight != -1 && destLineIdx > lineIdxRight)
+ lineIdxRight = -1;
+ if (lineIdxDown != -1 && destLineIdx > lineIdxDown)
+ lineIdxDown = -1;
+ if (lineIdxLeft != -1 && destLineIdx > lineIdxLeft)
+ lineIdxLeft = -1;
+ }
+ if (linesIdxUp != -1 || lineIdxRight != -1 || lineIdxDown != -1 || lineIdxLeft != -1) {
+ Directions newDir = DIR_NONE;
+ if (destLineIdx > curLineIdx) {
+ if (lineIdxDown <= linesIdxUp && lineIdxRight <= linesIdxUp && lineIdxLeft <= linesIdxUp && linesIdxUp > curLineIdx)
+ newDir = DIR_UP;
+ if (lineIdxDown <= lineIdxRight && linesIdxUp <= lineIdxRight && lineIdxLeft <= lineIdxRight && curLineIdx < lineIdxRight)
+ newDir = DIR_RIGHT;
+ if (linesIdxUp <= lineIdxDown && lineIdxRight <= lineIdxDown && lineIdxLeft <= lineIdxDown && curLineIdx < lineIdxDown)
+ newDir = DIR_DOWN;
+ if (lineIdxDown <= lineIdxLeft && lineIdxRight <= lineIdxLeft && linesIdxUp <= lineIdxLeft && curLineIdx < lineIdxLeft)
+ newDir = DIR_LEFT;
+ } else if (destLineIdx < curLineIdx) {
+ if (linesIdxUp == -1)
+ linesIdxUp = INVALID_LINE_VALUE;
+ if (lineIdxRight == -1)
+ lineIdxRight = INVALID_LINE_VALUE;
+ if (lineIdxDown == -1)
+ lineIdxDown = INVALID_LINE_VALUE;
+ if (lineIdxLeft == -1)
+ lineIdxLeft = INVALID_LINE_VALUE;
+ if (linesIdxUp != INVALID_LINE_VALUE && lineIdxDown >= linesIdxUp && lineIdxRight >= linesIdxUp && lineIdxLeft >= linesIdxUp && linesIdxUp < curLineIdx)
+ newDir = DIR_UP;
+ if (lineIdxRight != INVALID_LINE_VALUE && lineIdxDown >= lineIdxRight && linesIdxUp >= lineIdxRight && lineIdxLeft >= lineIdxRight && curLineIdx > lineIdxRight)
+ newDir = DIR_RIGHT;
+ if (lineIdxDown != INVALID_LINE_VALUE && linesIdxUp >= lineIdxDown && lineIdxRight >= lineIdxDown && lineIdxLeft >= lineIdxDown && curLineIdx > lineIdxDown)
+ newDir = DIR_DOWN;
+ if (lineIdxLeft != INVALID_LINE_VALUE && lineIdxDown >= lineIdxLeft && lineIdxRight >= lineIdxLeft && linesIdxUp >= lineIdxLeft && curLineIdx > lineIdxLeft)
+ newDir = DIR_LEFT;
+ }
+
+ switch(newDir) {
+ case DIR_UP:
+ newLinesIdx = linesIdxUp;
+ newLinesDataIdx = linesDataIdxUp;
+ for (int i = 0; i < stepVertDecCount; i++) {
+ if (checkCollisionLine(curX, curY - i, &linesDataIdxUp, &linesIdxUp, _lastLine + 1, _linesNumb) && _lastLine < linesIdxUp) {
+ int tmpRouteIdxUp = computeRouteIdx(linesIdxUp, linesDataIdxUp, curX, curY - i, curX, curY - stepVertDecCount, tmpRouteIdx, &_bestRoute[0]);
+ if (tmpRouteIdxUp == -1)
+ return false;
+ tmpRouteIdx = tmpRouteIdxUp;
+ if (_newPosY != -1)
+ i = _newPosY - curY;
+ }
+ _bestRoute[tmpRouteIdx].set(curX, curY - i, DIR_UP);
+ tmpRouteIdx++;
+ }
+ _newLineIdx = newLinesIdx;
+ _newLineDataIdx = newLinesDataIdx;
+ _newRouteIdx = tmpRouteIdx;
+ return true;
+ break;
+ case DIR_RIGHT:
+ newLinesIdx = lineIdxRight;
+ newLinesDataIdx = lineDataIdxRight;
+ for (int i = 0; i < stepHoriIncCount; i++) {
+ if (checkCollisionLine(i + curX, curY, &linesDataIdxUp, &linesIdxUp, _lastLine + 1, _linesNumb) && _lastLine < linesIdxUp) {
+ int tmpRouteIdxRight = computeRouteIdx(linesIdxUp, linesDataIdxUp, i + curX, curY, stepHoriIncCount + curX, curY, tmpRouteIdx, &_bestRoute[0]);
+ if (tmpRouteIdxRight == -1)
+ return false;
+ tmpRouteIdx = tmpRouteIdxRight;
+ if (_newPosX != -1)
+ i = _newPosX - curX;
+ }
+ _bestRoute[tmpRouteIdx].set(i + curX, curY, DIR_RIGHT);
+ tmpRouteIdx++;
+ }
+ _newLineIdx = newLinesIdx;
+ _newLineDataIdx = newLinesDataIdx;
+ _newRouteIdx = tmpRouteIdx;
+ return true;
+ break;
+ case DIR_DOWN:
+ newLinesIdx = lineIdxDown;
+ newLinesDataIdx = lineDataIdxDown;
+ for (int i = 0; i < stepVertIncCount; i++) {
+ if (checkCollisionLine(curX, i + curY, &linesDataIdxUp, &linesIdxUp, _lastLine + 1, _linesNumb) && _lastLine < linesIdxUp) {
+ int tmpRouteIdxDown = computeRouteIdx(linesIdxUp, linesDataIdxUp, curX, i + curY, curX, stepVertIncCount + curY, tmpRouteIdx, &_bestRoute[0]);
+ if (tmpRouteIdxDown == -1)
+ return false;
+ tmpRouteIdx = tmpRouteIdxDown;
+ if (_newPosY != -1)
+ i = curY - _newPosY;
+ }
+ _bestRoute[tmpRouteIdx].set(curX, i + curY, DIR_DOWN);
+ tmpRouteIdx++;
+ }
+ _newLineIdx = newLinesIdx;
+ _newLineDataIdx = newLinesDataIdx;
+ _newRouteIdx = tmpRouteIdx;
+ return true;
+ break;
+ case DIR_LEFT:
+ newLinesIdx = lineIdxLeft;
+ newLinesDataIdx = lineDataIdxLeft;
+ for (int i = 0; i < stepHoriDecCount; i++) {
+ if (checkCollisionLine(curX - i, curY, &linesDataIdxUp, &linesIdxUp, _lastLine + 1, _linesNumb) && _lastLine < linesIdxUp) {
+ int tmpRouteIdxLeft = computeRouteIdx(linesIdxUp, linesDataIdxUp, curX - i, curY, curX - stepHoriDecCount, curY, tmpRouteIdx, &_bestRoute[0]);
+ if (tmpRouteIdxLeft == -1)
+ return false;
+ tmpRouteIdx = tmpRouteIdxLeft;
+ if (_newPosX != -1)
+ i = curX - _newPosX;
+ }
+ _bestRoute[tmpRouteIdx].set(curX - i, curY, DIR_LEFT);
+ tmpRouteIdx++;
+ }
+ _newLineIdx = newLinesIdx;
+ _newLineDataIdx = newLinesDataIdx;
+ _newRouteIdx = tmpRouteIdx;
+ return true;
+ break;
+ default:
+ break;
+ }
+ }
+ return false;
+}
+
+int LinesManager::computeRouteIdx(int lineIdx, int dataIdx, int fromX, int fromY, int destX, int destY, int routerIdx, RouteItem *route) {
+ int result = routerIdx;
+ ++_pathFindingMaxDepth;
+ if (_pathFindingMaxDepth > 10) {
+ warning("PathFinding - Max depth reached");
+ route[routerIdx].invalidate();
+ return -1;
+ }
+ int lineX = _lineItem[lineIdx]._lineData[0];
+ int lineY = _lineItem[lineIdx]._lineData[1];
+ int startLineIdx = lineIdx;
+
+ int curLineDataEndIdx;
+ bool loopCond = false;
+ for (;;) {
+ int curLineIdx = startLineIdx - 1;
+ int endLineIdx = 2 * _lineItem[startLineIdx - 1]._lineDataEndIdx;
+
+ int16 *lineData = _lineItem[startLineIdx - 1]._lineData;
+ if (lineData == NULL)
+ break;
+ while (lineData[endLineIdx - 2] != lineX || lineY != lineData[endLineIdx - 1]) {
+ --curLineIdx;
+ if (_lastLine - 1 != curLineIdx) {
+ endLineIdx = 2 * _lineItem[curLineIdx]._lineDataEndIdx;
+ lineData = _lineItem[curLineIdx]._lineData;
+ if (lineData)
+ continue;
+ }
+ loopCond = true;
+ break;
+ }
+ if (loopCond)
+ break;
+
+ startLineIdx = curLineIdx;
+ lineX = lineData[0];
+ lineY = lineData[1];
+ }
+
+ int lastIdx = _lineItem[lineIdx]._lineDataEndIdx - 1;
+ int lastPosX = _lineItem[lineIdx]._lineData[(2 * lastIdx)];
+ int lastPosY = _lineItem[lineIdx]._lineData[(2 * lastIdx) + 1];
+ int endLineIdx = lineIdx;
+ int foundLineIdx, foundDataIdx;
+ loopCond = false;
+ for (;;) {
+ int curLineIdx = endLineIdx + 1;
+ int nextLineDataEndIdx = 2 * _lineItem[curLineIdx]._lineDataEndIdx;
+ int16 *lineData = _lineItem[curLineIdx]._lineData;
+ if (lineData == NULL)
+ break;
+ for (;;) {
+ curLineDataEndIdx = nextLineDataEndIdx;
+ if (lineData[0] == lastPosX && lastPosY == lineData[1])
+ break;
+
+ ++curLineIdx;
+ if (curLineIdx != _linesNumb + 1) {
+ nextLineDataEndIdx = 2 * _lineItem[curLineIdx]._lineDataEndIdx;
+ lineData = _lineItem[curLineIdx]._lineData;
+ if (lineData)
+ continue;
+ }
+ loopCond = true;
+ break;
+ }
+ if (loopCond)
+ break;
+
+ endLineIdx = curLineIdx;
+ lastPosX = lineData[curLineDataEndIdx - 2];
+ lastPosY = lineData[curLineDataEndIdx - 1];
+ }
+
+ int distX = abs(fromX - destX) + 1;
+ int distY = abs(fromY - destY) + 1;
+ int maxDist = distY;
+ if (distX > distY)
+ maxDist = distX;
+ int stepX = 1000 * distX / maxDist;
+ int stepY = 1000 * distY / maxDist;
+ int smoothPosX = 1000 * fromX;
+ int smoothPosY = 1000 * fromY;
+ if (destX < fromX)
+ stepX = -stepX;
+ if (destY < fromY)
+ stepY = -stepY;
+ if (maxDist > 800)
+ maxDist = 800;
+
+ Common::fill(&_lineBuf[0], &_lineBuf[1000], 0);
+ int bugLigIdx = 0;
+ for (int i = 0; i < maxDist + 1; i++) {
+ _lineBuf[bugLigIdx] = smoothPosX / 1000;
+ _lineBuf[bugLigIdx + 1] = smoothPosY / 1000;
+ smoothPosX += stepX;
+ smoothPosY += stepY;
+ bugLigIdx += 2;
+ }
+ bugLigIdx -= 2;
+ int destDataIdx = 0;
+ int destLineIdx = -1;
+ int bufX = 0;
+ int bufY = 0;
+ for (int i = maxDist + 1; i > 0; i--) {
+ if (checkCollisionLine(_lineBuf[bugLigIdx], _lineBuf[bugLigIdx + 1], &foundDataIdx, &foundLineIdx, startLineIdx, endLineIdx) && _lastLine < foundLineIdx) {
+ destLineIdx = foundLineIdx;
+ destDataIdx = foundDataIdx;
+ bufX = _lineBuf[bugLigIdx];
+ bufY = _lineBuf[bugLigIdx + 1];
+ break;
+ }
+ bugLigIdx -= 2;
+ }
+ int maxLineX = 0;
+ int minLineX = 0;
+ int maxLineY = 0;
+ int minLineY = 0;
+ for (int i = startLineIdx; i <= endLineIdx; ++i) {
+ int16 *lineData = _lineItem[i]._lineData;
+ if (lineData == NULL)
+ error("error in genial routine");
+ if (i == startLineIdx) {
+ minLineY = MIN(lineData[1], lineData[2 * _lineItem[i]._lineDataEndIdx - 1]);
+ maxLineY = MAX(lineData[1], lineData[2 * _lineItem[i]._lineDataEndIdx - 1]);
+
+ minLineX = MIN(lineData[0], lineData[2 * _lineItem[i]._lineDataEndIdx - 2]);
+ maxLineX = MAX(lineData[0], lineData[2 * _lineItem[i]._lineDataEndIdx - 2]);
+ } else {
+ if (lineData[1] < lineData[2 * _lineItem[i]._lineDataEndIdx - 1] && lineData[1] < minLineY)
+ minLineY = lineData[1];
+ if (lineData[2 * _lineItem[i]._lineDataEndIdx - 1] < lineData[1] && lineData[2 * _lineItem[i]._lineDataEndIdx - 1] < minLineY)
+ minLineY = lineData[2 * _lineItem[i]._lineDataEndIdx - 1];
+ if (lineData[1] > lineData[2 * _lineItem[i]._lineDataEndIdx - 1] && lineData[1] > maxLineY)
+ maxLineY = lineData[1];
+ if (lineData[2 * _lineItem[i]._lineDataEndIdx - 1] > lineData[1] && lineData[2 * _lineItem[i]._lineDataEndIdx - 1] > maxLineY)
+ maxLineY = lineData[2 * _lineItem[i]._lineDataEndIdx - 1];
+ if (lineData[0] < lineData[2 * _lineItem[i]._lineDataEndIdx - 2] && minLineX > lineData[0])
+ minLineX = lineData[0];
+ if (lineData[2 * _lineItem[i]._lineDataEndIdx - 2] < lineData[0] && minLineX > lineData[2 * _lineItem[i]._lineDataEndIdx - 2])
+ minLineX = lineData[2 * _lineItem[i]._lineDataEndIdx - 2];
+ if (lineData[0] > lineData[2 * _lineItem[i]._lineDataEndIdx - 2] && maxLineX < lineData[0])
+ maxLineX = lineData[0];
+ if (lineData[2 * _lineItem[i]._lineDataEndIdx - 2] > lineData[0] && maxLineX < lineData[2 * _lineItem[i]._lineDataEndIdx - 2])
+ maxLineX = lineData[2 * _lineItem[i]._lineDataEndIdx - 2];
+ }
+ }
+
+ minLineX -= 2;
+ minLineY -= 2;
+ maxLineX += 2;
+ maxLineY += 2;
+ if (destX >= minLineX && destX <= maxLineX && destY >= minLineY && destY <= maxLineY) {
+ int curY = destY;
+ int linesIdxUp = -1;
+ for (;;) {
+ --curY;
+ if (!checkCollisionLine(destX, curY, &foundDataIdx, &foundLineIdx, startLineIdx, endLineIdx))
+ break;
+
+ linesIdxUp = foundLineIdx;
+ if (!curY || minLineY > curY)
+ break;
+ }
+ curY = destY;
+ int lineIdxDown = -1;
+ for (;;) {
+ ++curY;
+ if (!checkCollisionLine(destX, curY, &foundDataIdx, &foundLineIdx, startLineIdx, endLineIdx))
+ break;
+
+ lineIdxDown = foundLineIdx;
+ if (_vm->_globals->_characterMaxPosY <= curY || maxLineY <= curY)
+ break;
+ }
+ int curX = destX;
+ int lineIdxRight = -1;
+ for (;;) {
+ ++curX;
+ if (!checkCollisionLine(curX, destY, &foundDataIdx, &foundLineIdx, startLineIdx, endLineIdx))
+ break;
+
+ lineIdxRight = foundLineIdx;
+
+ if (_vm->_graphicsMan->_maxX <= curX || maxLineX <= curX)
+ break;
+ }
+ curX = destX;
+ int lineIdxLeft = -1;
+ for(;;) {
+ --curX;
+ if (!checkCollisionLine(curX, destY, &foundDataIdx, &foundLineIdx, startLineIdx, endLineIdx))
+ break;
+ lineIdxLeft = foundLineIdx;
+ if (curX <= 0 || minLineX >= curX)
+ break;
+ }
+ if (lineIdxRight != -1 && lineIdxLeft != -1 && linesIdxUp != -1 && lineIdxDown != -1) {
+ route[routerIdx].invalidate();
+ return -1;
+ }
+ }
+ if (bufX < fromX - 1 || bufX > fromX + 1 || bufY < fromY - 1 || bufY > fromY + 1) {
+ _newPosX = bufX;
+ _newPosY = bufY;
+ if (lineIdx < destLineIdx) {
+ int stepCount = 0;
+ int curLineIdx = lineIdx;
+ do {
+ if (curLineIdx == startLineIdx - 1)
+ curLineIdx = endLineIdx;
+ ++stepCount;
+ --curLineIdx;
+ if (curLineIdx == startLineIdx - 1)
+ curLineIdx = endLineIdx;
+ } while (destLineIdx != curLineIdx);
+ if (abs(destLineIdx - lineIdx) == stepCount) {
+ if (dataIdx > abs(_lineItem[lineIdx]._lineDataEndIdx / 2)) {
+ result = avoidObstacle(lineIdx, dataIdx, routerIdx, destLineIdx, destDataIdx, route);
+ } else {
+ result = avoidObstacleOnSegment(lineIdx, dataIdx, routerIdx, destLineIdx, destDataIdx, route, startLineIdx, endLineIdx);
+ }
+ }
+ if (abs(destLineIdx - lineIdx) < stepCount)
+ result = avoidObstacle(lineIdx, dataIdx, result, destLineIdx, destDataIdx, route);
+ if (stepCount < abs(destLineIdx - lineIdx))
+ result = avoidObstacleOnSegment(lineIdx, dataIdx, result, destLineIdx, destDataIdx, route, startLineIdx, endLineIdx);
+ }
+ if (lineIdx > destLineIdx) {
+ int destStepCount = abs(lineIdx - destLineIdx);
+ int curLineIdx = lineIdx;
+ int curStepCount = 0;
+ do {
+ if (curLineIdx == endLineIdx + 1)
+ curLineIdx = startLineIdx;
+ ++curStepCount;
+ ++curLineIdx;
+ if (curLineIdx == endLineIdx + 1)
+ curLineIdx = startLineIdx;
+ } while (destLineIdx != curLineIdx);
+ if (destStepCount == curStepCount) {
+ if (dataIdx > abs(_lineItem[lineIdx]._lineDataEndIdx / 2)) {
+ result = avoidObstacleOnSegment(lineIdx, dataIdx, result, destLineIdx, destDataIdx, route, startLineIdx, endLineIdx);
+ } else {
+ result = avoidObstacle(lineIdx, dataIdx, result, destLineIdx, destDataIdx, route);
+ }
+ }
+ if (destStepCount < curStepCount)
+ result = avoidObstacle(lineIdx, dataIdx, result, destLineIdx, destDataIdx, route);
+ if (curStepCount < destStepCount)
+ result = avoidObstacleOnSegment(lineIdx, dataIdx, result, destLineIdx, destDataIdx, route, startLineIdx, endLineIdx);
+ }
+ if (lineIdx == destLineIdx)
+ result = avoidObstacle(lineIdx, dataIdx, result, lineIdx, destDataIdx, route);
+ for(;;) {
+ if (!checkCollisionLine(_newPosX, _newPosY, &foundDataIdx, &foundLineIdx, _lastLine + 1, _linesNumb))
+ break;
+
+ switch (_lineItem[foundLineIdx]._direction) {
+ case DIR_UP:
+ --_newPosY;
+ break;
+ case DIR_UP_RIGHT:
+ --_newPosY;
+ ++_newPosX;
+ break;
+ case DIR_RIGHT:
+ ++_newPosX;
+ break;
+ case DIR_DOWN_RIGHT:
+ ++_newPosY;
+ ++_newPosX;
+ break;
+ case DIR_DOWN:
+ ++_newPosY;
+ break;
+ case DIR_DOWN_LEFT:
+ ++_newPosY;
+ --_newPosX;
+ break;
+ case DIR_LEFT:
+ --_newPosX;
+ break;
+ case DIR_UP_LEFT:
+ --_newPosY;
+ --_newPosX;
+ break;
+ default:
+ break;
+ }
+ }
+ } else {
+ _newPosX = -1;
+ _newPosY = -1;
+ }
+ return result;
+}
+
+// Find Route from a point to the other
+RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) {
+ int foundLineIdx;
+ int foundDataIdx;
+ int curLineY = 0;
+ int curLineX = 0;
+ int stepArr[9];
+ int deltaArr[9];
+ int collLineDataIdxArr[9];
+ int collLineIdxArr[9];
+
+ int clipDestX = destX;
+ int clipDestY = destY;
+ int curLineIdx = 0;
+ int curLineDataIdx = 0;
+ int lineIdx = 0;
+ int lineDataIdx = 0;
+ Directions newDir = DIR_NONE;
+ if (destY <= 24)
+ clipDestY = 25;
+ if (!_vm->_globals->_checkDistanceFl) {
+ if (abs(fromX - _oldRouteFromX) <= 4 && abs(fromY - _oldRouteFromY) <= 4 &&
+ abs(_oldRouteDestX - destX) <= 4 && abs(_oldRouteDestY - clipDestY) <= 4)
+ return NULL;
+
+ if (abs(fromX - destX) <= 4 && abs(fromY - clipDestY) <= 4)
+ return NULL;
+
+ if (_oldZoneNum > 0 && _vm->_objectsMan->_zoneNum > 0 && _oldZoneNum == _vm->_objectsMan->_zoneNum)
+ return NULL;
+ }
+ _vm->_globals->_checkDistanceFl = false;
+ _oldZoneNum = _vm->_objectsMan->_zoneNum;
+ _oldRouteFromX = fromX;
+ _oldRouteDestX = destX;
+ _oldRouteFromY = fromY;
+ _oldRouteDestY = clipDestY;
+ _pathFindingMaxDepth = 0;
+ int routeIdx = 0;
+ if (destX <= 19)
+ clipDestX = 20;
+ if (clipDestY <= 19)
+ clipDestY = 20;
+ if (clipDestX > _vm->_graphicsMan->_maxX - 10)
+ clipDestX = _vm->_graphicsMan->_maxX - 10;
+ if (clipDestY > _vm->_globals->_characterMaxPosY)
+ clipDestY = _vm->_globals->_characterMaxPosY;
+
+ if (abs(fromX - clipDestX) <= 3 && abs(fromY - clipDestY) <= 3)
+ return NULL;
+
+ for (int i = 0; i <= 8; ++i) {
+ collLineIdxArr[i] = -1;
+ collLineDataIdxArr[i] = 0;
+ deltaArr[i] = INVALID_LINE_VALUE;
+ stepArr[i] = INVALID_LINE_VALUE;
+ }
+
+ if (characterRoute(fromX, fromY, clipDestX, clipDestY, -1, -1, 0) == 1)
+ return _bestRoute;
+
+ int tmpDelta = 0;
+ for (int tmpY = clipDestY; tmpY < _vm->_graphicsMan->_maxY; tmpY++, tmpDelta++) {
+ if (checkCollisionLine(clipDestX, tmpY, &collLineDataIdxArr[DIR_DOWN], &collLineIdxArr[DIR_DOWN], 0, _lastLine) && collLineIdxArr[DIR_DOWN] <= _lastLine)
+ break;
+ collLineDataIdxArr[DIR_DOWN] = 0;
+ collLineIdxArr[DIR_DOWN] = -1;
+ }
+ deltaArr[DIR_DOWN] = tmpDelta;
+
+ tmpDelta = 0;
+ for (int tmpY = clipDestY; tmpY > _vm->_graphicsMan->_minY; tmpY--, tmpDelta++) {
+ if (checkCollisionLine(clipDestX, tmpY, &collLineDataIdxArr[DIR_UP], &collLineIdxArr[DIR_UP], 0, _lastLine) && collLineIdxArr[DIR_UP] <= _lastLine)
+ break;
+ collLineDataIdxArr[DIR_UP] = 0;
+ collLineIdxArr[DIR_UP] = -1;
+ if (deltaArr[DIR_DOWN] < tmpDelta && collLineIdxArr[DIR_DOWN] != -1)
+ break;
+ }
+ deltaArr[DIR_UP] = tmpDelta;
+
+ tmpDelta = 0;
+ for (int tmpX = clipDestX; tmpX < _vm->_graphicsMan->_maxX; tmpX++) {
+ if (checkCollisionLine(tmpX, clipDestY, &collLineDataIdxArr[DIR_RIGHT], &collLineIdxArr[DIR_RIGHT], 0, _lastLine) && collLineIdxArr[DIR_RIGHT] <= _lastLine)
+ break;
+ collLineDataIdxArr[DIR_RIGHT] = 0;
+ collLineIdxArr[DIR_RIGHT] = -1;
+ ++tmpDelta;
+ if (deltaArr[DIR_UP] < tmpDelta && collLineIdxArr[DIR_UP] != -1)
+ break;
+ if (deltaArr[DIR_DOWN] < tmpDelta && collLineIdxArr[DIR_DOWN] != -1)
+ break;
+ }
+ deltaArr[DIR_RIGHT] = tmpDelta;
+
+ tmpDelta = 0;
+ for (int tmpX = clipDestX; tmpX > _vm->_graphicsMan->_minX; tmpX--) {
+ if (checkCollisionLine(tmpX, clipDestY, &collLineDataIdxArr[DIR_LEFT], &collLineIdxArr[DIR_LEFT], 0, _lastLine) && collLineIdxArr[DIR_LEFT] <= _lastLine)
+ break;
+ collLineDataIdxArr[DIR_LEFT] = 0;
+ collLineIdxArr[DIR_LEFT] = -1;
+ ++tmpDelta;
+ if (deltaArr[DIR_UP] < tmpDelta && collLineIdxArr[DIR_UP] != -1)
+ break;
+ if (deltaArr[DIR_DOWN] < tmpDelta && collLineIdxArr[DIR_DOWN] != -1)
+ break;
+ if (deltaArr[DIR_RIGHT] < tmpDelta && collLineIdxArr[DIR_RIGHT] != -1)
+ break;
+ }
+ deltaArr[DIR_LEFT] = tmpDelta;
+
+ if (collLineIdxArr[DIR_UP] < 0 || _lastLine < collLineIdxArr[DIR_UP])
+ collLineIdxArr[DIR_UP] = -1;
+ if (collLineIdxArr[DIR_RIGHT] < 0 || _lastLine < collLineIdxArr[DIR_RIGHT])
+ collLineIdxArr[DIR_RIGHT] = -1;
+ if (collLineIdxArr[DIR_DOWN] < 0 || _lastLine < collLineIdxArr[DIR_DOWN])
+ collLineIdxArr[DIR_DOWN] = -1;
+ if (collLineIdxArr[DIR_LEFT] < 0 || _lastLine < collLineIdxArr[DIR_LEFT])
+ collLineIdxArr[DIR_LEFT] = -1;
+ if (collLineIdxArr[DIR_UP] < 0)
+ deltaArr[DIR_UP] = INVALID_LINE_VALUE;
+ if (collLineIdxArr[DIR_RIGHT] < 0)
+ deltaArr[DIR_RIGHT] = INVALID_LINE_VALUE;
+ if (collLineIdxArr[DIR_DOWN] < 0)
+ deltaArr[DIR_DOWN] = INVALID_LINE_VALUE;
+ if (collLineIdxArr[DIR_LEFT] < 0)
+ deltaArr[DIR_LEFT] = INVALID_LINE_VALUE;
+ if (collLineIdxArr[DIR_UP] == -1 && collLineIdxArr[DIR_RIGHT] == -1 && collLineIdxArr[DIR_DOWN] == -1 && collLineIdxArr[DIR_LEFT] == -1)
+ return NULL;
+
+ if (collLineIdxArr[DIR_DOWN] != -1 && deltaArr[DIR_UP] >= deltaArr[DIR_DOWN] && deltaArr[DIR_RIGHT] >= deltaArr[DIR_DOWN] && deltaArr[DIR_LEFT] >= deltaArr[DIR_DOWN]) {
+ curLineIdx = collLineIdxArr[DIR_DOWN];
+ curLineDataIdx = collLineDataIdxArr[DIR_DOWN];
+ } else if (collLineIdxArr[DIR_UP] != -1 && deltaArr[DIR_DOWN] >= deltaArr[DIR_UP] && deltaArr[DIR_RIGHT] >= deltaArr[DIR_UP] && deltaArr[DIR_LEFT] >= deltaArr[DIR_UP]) {
+ curLineIdx = collLineIdxArr[DIR_UP];
+ curLineDataIdx = collLineDataIdxArr[DIR_UP];
+ } else if (collLineIdxArr[DIR_RIGHT] != -1 && deltaArr[DIR_UP] >= deltaArr[DIR_RIGHT] && deltaArr[DIR_DOWN] >= deltaArr[DIR_RIGHT] && deltaArr[DIR_LEFT] >= deltaArr[DIR_RIGHT]) {
+ curLineIdx = collLineIdxArr[DIR_RIGHT];
+ curLineDataIdx = collLineDataIdxArr[DIR_RIGHT];
+ } else if (collLineIdxArr[DIR_LEFT] != -1 && deltaArr[DIR_DOWN] >= deltaArr[DIR_LEFT] && deltaArr[DIR_RIGHT] >= deltaArr[DIR_LEFT] && deltaArr[DIR_UP] >= deltaArr[DIR_LEFT]) {
+ curLineIdx = collLineIdxArr[DIR_LEFT];
+ curLineDataIdx = collLineDataIdxArr[DIR_LEFT];
+ }
+
+ for (int i = 0; i <= 8; ++i) {
+ collLineIdxArr[i] = -1;
+ collLineDataIdxArr[i] = 0;
+ deltaArr[i] = INVALID_LINE_VALUE;
+ stepArr[i] = INVALID_LINE_VALUE;
+ }
+
+ tmpDelta = 0;
+ for (int tmpY = fromY; tmpY < _vm->_graphicsMan->_maxY; tmpY++, tmpDelta++) {
+ if (checkCollisionLine(fromX, tmpY, &collLineDataIdxArr[DIR_DOWN], &collLineIdxArr[DIR_DOWN], 0, _lastLine) && collLineIdxArr[DIR_DOWN] <= _lastLine)
+ break;
+ collLineDataIdxArr[DIR_DOWN] = 0;
+ collLineIdxArr[DIR_DOWN] = -1;
+ }
+ deltaArr[DIR_DOWN] = tmpDelta + 1;
+
+ tmpDelta = 0;
+ for (int tmpY = fromY; tmpY > _vm->_graphicsMan->_minY; tmpY--) {
+ if (checkCollisionLine(fromX, tmpY, &collLineDataIdxArr[DIR_UP], &collLineIdxArr[DIR_UP], 0, _lastLine) && collLineIdxArr[DIR_UP] <= _lastLine)
+ break;
+ collLineDataIdxArr[DIR_UP] = 0;
+ collLineIdxArr[DIR_UP] = -1;
+ ++tmpDelta;
+ if (collLineIdxArr[DIR_DOWN] != -1 && tmpDelta > 80)
+ break;
+ }
+ deltaArr[DIR_UP] = tmpDelta + 1;
+
+ tmpDelta = 0;
+ for (int tmpX = fromX; tmpX < _vm->_graphicsMan->_maxX; tmpX++) {
+ if (checkCollisionLine(tmpX, fromY, &collLineDataIdxArr[DIR_RIGHT], &collLineIdxArr[DIR_RIGHT], 0, _lastLine) && collLineIdxArr[DIR_RIGHT] <= _lastLine)
+ break;
+ collLineDataIdxArr[DIR_RIGHT] = 0;
+ collLineIdxArr[DIR_RIGHT] = -1;
+ ++tmpDelta;
+ if ((collLineIdxArr[DIR_DOWN] != -1 || collLineIdxArr[DIR_UP] != -1) && (tmpDelta > 100))
+ break;
+ }
+ deltaArr[DIR_RIGHT] = tmpDelta + 1;
+
+ tmpDelta = 0;
+ for (int tmpX = fromX; tmpX > _vm->_graphicsMan->_minX; tmpX--) {
+ if (checkCollisionLine(tmpX, fromY, &collLineDataIdxArr[DIR_LEFT], &collLineIdxArr[DIR_LEFT], 0, _lastLine) && collLineIdxArr[DIR_LEFT] <= _lastLine)
+ break;
+ collLineDataIdxArr[DIR_LEFT] = 0;
+ collLineIdxArr[DIR_LEFT] = -1;
+ ++tmpDelta;
+ if ((collLineIdxArr[DIR_DOWN] != -1 || collLineIdxArr[DIR_UP] != -1 || collLineIdxArr[DIR_RIGHT] != -1) && (tmpDelta > 100))
+ break;
+ }
+ deltaArr[DIR_LEFT] = tmpDelta + 1;
+
+ if (collLineIdxArr[DIR_UP] != -1)
+ stepArr[DIR_UP] = abs(collLineIdxArr[DIR_UP] - curLineIdx);
+
+ if (collLineIdxArr[DIR_RIGHT] != -1)
+ stepArr[DIR_RIGHT] = abs(collLineIdxArr[DIR_RIGHT] - curLineIdx);
+
+ if (collLineIdxArr[DIR_DOWN] != -1)
+ stepArr[DIR_DOWN] = abs(collLineIdxArr[DIR_DOWN] - curLineIdx);
+
+ if (collLineIdxArr[DIR_LEFT] != -1)
+ stepArr[DIR_LEFT] = abs(collLineIdxArr[DIR_LEFT] - curLineIdx);
+
+ if (collLineIdxArr[DIR_UP] == -1 && collLineIdxArr[DIR_RIGHT] == -1 && collLineIdxArr[DIR_DOWN] == -1 && collLineIdxArr[DIR_LEFT] == -1)
+ error("Nearest point not found");
+
+ int delta = 0;
+ if (collLineIdxArr[DIR_UP] != -1 && stepArr[DIR_RIGHT] >= stepArr[DIR_UP] && stepArr[DIR_DOWN] >= stepArr[DIR_UP] && stepArr[DIR_LEFT] >= stepArr[DIR_UP]) {
+ lineIdx = collLineIdxArr[DIR_UP];
+ delta = deltaArr[DIR_UP];
+ newDir = DIR_UP;
+ lineDataIdx = collLineDataIdxArr[DIR_UP];
+ } else if (collLineIdxArr[DIR_DOWN] != -1 && stepArr[DIR_RIGHT] >= stepArr[DIR_DOWN] && stepArr[DIR_UP] >= stepArr[DIR_DOWN] && stepArr[DIR_LEFT] >= stepArr[DIR_DOWN]) {
+ lineIdx = collLineIdxArr[DIR_DOWN];
+ delta = deltaArr[DIR_DOWN];
+ newDir = DIR_DOWN;
+ lineDataIdx = collLineDataIdxArr[DIR_DOWN];
+ } else if (collLineIdxArr[DIR_RIGHT] != -1 && stepArr[DIR_UP] >= stepArr[DIR_RIGHT] && stepArr[DIR_DOWN] >= stepArr[DIR_RIGHT] && stepArr[DIR_LEFT] >= stepArr[DIR_RIGHT]) {
+ lineIdx = collLineIdxArr[DIR_RIGHT];
+ delta = deltaArr[DIR_RIGHT];
+ newDir = DIR_RIGHT;
+ lineDataIdx = collLineDataIdxArr[DIR_RIGHT];
+ } else if (collLineIdxArr[DIR_LEFT] != -1 && stepArr[DIR_UP] >= stepArr[DIR_LEFT] && stepArr[DIR_DOWN] >= stepArr[DIR_LEFT] && stepArr[DIR_RIGHT] >= stepArr[DIR_LEFT]) {
+ lineIdx = collLineIdxArr[DIR_LEFT];
+ delta = deltaArr[DIR_LEFT];
+ newDir = DIR_LEFT;
+ lineDataIdx = collLineDataIdxArr[DIR_LEFT];
+ }
+
+ int bestRouteNum = characterRoute(fromX, fromY, clipDestX, clipDestY, lineIdx, curLineIdx, 0);
+
+ if (bestRouteNum == 1)
+ return _bestRoute;
+
+ if (bestRouteNum == 2) {
+ lineIdx = _newLineIdx;
+ lineDataIdx = _newLineDataIdx;
+ routeIdx = _newRouteIdx;
+ } else {
+ switch (newDir) {
+ case DIR_UP:
+ for (int deltaY = 0; deltaY < delta; deltaY++) {
+ if (checkCollisionLine(fromX, fromY - deltaY, &foundDataIdx, &foundLineIdx, _lastLine + 1, _linesNumb) && _lastLine < foundLineIdx) {
+ int tmpRouteIdx = computeRouteIdx(foundLineIdx, foundDataIdx, fromX, fromY - deltaY, fromX, fromY - delta, routeIdx, _bestRoute);
+ if (tmpRouteIdx == -1) {
+ _bestRoute[routeIdx].invalidate();
+ return &_bestRoute[0];
+ }
+ routeIdx = tmpRouteIdx;
+ if (_newPosY != -1)
+ deltaY = fromY - _newPosY;
+ }
+ _bestRoute[routeIdx].set(fromX, fromY - deltaY, DIR_UP);
+ routeIdx++;
+ }
+ break;
+ case DIR_DOWN:
+ for (int deltaY = 0; deltaY < delta; deltaY++) {
+ if (checkCollisionLine(fromX, deltaY + fromY, &foundDataIdx, &foundLineIdx, _lastLine + 1, _linesNumb)
+ && _lastLine < foundLineIdx) {
+ int tmpRouteIdx = computeRouteIdx(foundLineIdx, foundDataIdx, fromX, deltaY + fromY, fromX, delta + fromY, routeIdx, &_bestRoute[0]);
+ if (tmpRouteIdx == -1) {
+ _bestRoute[routeIdx].invalidate();
+ return &_bestRoute[0];
+ }
+ routeIdx = tmpRouteIdx;
+ if (_newPosY != -1)
+ deltaY = _newPosY - fromY;
+ }
+ _bestRoute[routeIdx].set(fromX, fromY + deltaY, DIR_DOWN);
+ routeIdx++;
+ }
+ break;
+ case DIR_LEFT:
+ for (int deltaX = 0; deltaX < delta; deltaX++) {
+ if (checkCollisionLine(fromX - deltaX, fromY, &foundDataIdx, &foundLineIdx, _lastLine + 1, _linesNumb) && _lastLine < foundLineIdx) {
+ int tmpRouteIdx = computeRouteIdx(foundLineIdx, foundDataIdx, fromX - deltaX, fromY, fromX - delta, fromY, routeIdx, &_bestRoute[0]);
+ if (tmpRouteIdx == -1) {
+ _bestRoute[routeIdx].invalidate();
+ return &_bestRoute[0];
+ }
+ routeIdx = tmpRouteIdx;
+ if (_newPosX != -1)
+ deltaX = fromX - _newPosX;
+ }
+ _bestRoute[routeIdx].set(fromX - deltaX, fromY, DIR_LEFT);
+ routeIdx++;
+ }
+ break;
+ case DIR_RIGHT:
+ for (int deltaX = 0; deltaX < delta; deltaX++) {
+ if (checkCollisionLine(deltaX + fromX, fromY, &foundDataIdx, &foundLineIdx, _lastLine + 1, _linesNumb) && _lastLine < foundLineIdx) {
+ int tmpRouteIdx = computeRouteIdx(foundLineIdx, foundDataIdx, deltaX + fromX, fromY, delta + fromX, fromY, routeIdx, &_bestRoute[0]);
+ if (tmpRouteIdx == -1) {
+ _bestRoute[routeIdx].invalidate();
+ return &_bestRoute[0];
+ }
+ routeIdx = tmpRouteIdx;
+ if (_newPosX != -1)
+ deltaX = _newPosX - fromX;
+ }
+ _bestRoute[routeIdx].set(fromX + deltaX, fromY, DIR_RIGHT);
+ routeIdx++;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ bool loopCond;
+ do {
+ loopCond = false;
+ if (lineIdx < curLineIdx) {
+ for (int i = lineDataIdx; _lineItem[lineIdx]._lineDataEndIdx > i; ++i) {
+ curLineX = _lineItem[lineIdx]._lineData[2 * i];
+ curLineY = _lineItem[lineIdx]._lineData[2 * i + 1];
+ _bestRoute[routeIdx].set(_lineItem[lineIdx]._lineData[2 * i], _lineItem[lineIdx]._lineData[2 * i + 1], _lineItem[lineIdx]._directionRouteInc);
+ routeIdx++;
+ }
+ for (int idx = lineIdx + 1; idx < curLineIdx; idx++) {
+ for (int dataIdx = 0; _lineItem[idx]._lineDataEndIdx > dataIdx; dataIdx++) {
+ curLineX = _lineItem[idx]._lineData[2 * dataIdx];
+ curLineY = _lineItem[idx]._lineData[2 * dataIdx + 1];
+ _bestRoute[routeIdx].set(_lineItem[idx]._lineData[2 * dataIdx], _lineItem[idx]._lineData[2 * dataIdx + 1], _lineItem[idx]._directionRouteInc);
+ routeIdx++;
+ if (_lineItem[idx]._lineDataEndIdx > 30 && dataIdx == _lineItem[idx]._lineDataEndIdx / 2) {
+ bestRouteNum = characterRoute(_lineItem[idx]._lineData[2 * dataIdx], _lineItem[idx]._lineData[2 * dataIdx + 1], clipDestX, clipDestY, idx, curLineIdx, routeIdx);
+ if (bestRouteNum == 1)
+ return &_bestRoute[0];
+ if (bestRouteNum == 2 || MIRACLE(curLineX, curLineY, idx, curLineIdx, routeIdx)) {
+ lineIdx = _newLineIdx;
+ lineDataIdx = _newLineDataIdx;
+ routeIdx = _newRouteIdx;
+ loopCond = true;
+ break;
+ }
+ }
+ }
+
+ if (loopCond)
+ break;
+
+ bestRouteNum = characterRoute(curLineX, curLineY, clipDestX, clipDestY, idx, curLineIdx, routeIdx);
+ if (bestRouteNum == 1)
+ return &_bestRoute[0];
+ if (bestRouteNum == 2 || MIRACLE(curLineX, curLineY, idx, curLineIdx, routeIdx)) {
+ lineIdx = _newLineIdx;
+ lineDataIdx = _newLineDataIdx;
+ routeIdx = _newRouteIdx;
+ loopCond = true;
+ break;
+ }
+ }
+ if (loopCond)
+ continue;
+
+ lineDataIdx = 0;
+ lineIdx = curLineIdx;
+ }
+ if (lineIdx > curLineIdx) {
+ for (int dataIdx = lineDataIdx; dataIdx > 0; dataIdx--) {
+ curLineX = _lineItem[lineIdx]._lineData[2 * dataIdx];
+ curLineY = _lineItem[lineIdx]._lineData[2 * dataIdx + 1];
+
+ _bestRoute[routeIdx].set(_lineItem[lineIdx]._lineData[2 * dataIdx], _lineItem[lineIdx]._lineData[2 * dataIdx + 1], _lineItem[lineIdx]._directionRouteDec);
+ routeIdx++;
+ }
+ for (int i = lineIdx - 1; i > curLineIdx; i--) {
+ for (int dataIdx = _lineItem[i]._lineDataEndIdx - 1; dataIdx > -1; dataIdx--) {
+ curLineX = _lineItem[i]._lineData[2 * dataIdx];
+ curLineY = _lineItem[i]._lineData[2 * dataIdx + 1];
+ _bestRoute[routeIdx].set(_lineItem[i]._lineData[2 * dataIdx], _lineItem[i]._lineData[2 * dataIdx + 1], _lineItem[i]._directionRouteDec);
+ routeIdx++;
+ if (_lineItem[i]._lineDataEndIdx > 30 && dataIdx == _lineItem[i]._lineDataEndIdx / 2) {
+ bestRouteNum = characterRoute(curLineX, curLineY, clipDestX, clipDestY, i, curLineIdx, routeIdx);
+ if (bestRouteNum == 1)
+ return &_bestRoute[0];
+ if (bestRouteNum == 2 || MIRACLE(curLineX, curLineY, i, curLineIdx, routeIdx)) {
+ lineIdx = _newLineIdx;
+ lineDataIdx = _newLineDataIdx;
+ routeIdx = _newRouteIdx;
+ loopCond = true;
+ break;
+ }
+ }
+ }
+
+ if (loopCond)
+ break;
+
+ bestRouteNum = characterRoute(curLineX, curLineY, clipDestX, clipDestY, i, curLineIdx, routeIdx);
+ if (bestRouteNum == 1)
+ return &_bestRoute[0];
+ if (bestRouteNum == 2 || MIRACLE(curLineX, curLineY, i, curLineIdx, routeIdx)) {
+ lineIdx = _newLineIdx;
+ lineDataIdx = _newLineDataIdx;
+ routeIdx = _newRouteIdx;
+ loopCond = true;
+ break;
+ }
+ }
+
+ if (!loopCond) {
+ lineDataIdx = _lineItem[curLineIdx]._lineDataEndIdx - 1;
+ lineIdx = curLineIdx;
+ }
+ }
+ } while (loopCond);
+
+ if (lineIdx == curLineIdx) {
+ if (lineDataIdx <= curLineDataIdx)
+ routeIdx = _lineItem[curLineIdx].appendToRouteInc(lineDataIdx, curLineDataIdx, _bestRoute, routeIdx);
+ else
+ routeIdx = _lineItem[curLineIdx].appendToRouteDec(lineDataIdx, curLineDataIdx, _bestRoute, routeIdx);
+ }
+ if (characterRoute(_bestRoute[routeIdx - 1]._x, _bestRoute[routeIdx - 1]._y, clipDestX, clipDestY, -1, -1, routeIdx) != 1) {
+ _bestRoute[routeIdx].invalidate();
+ }
+
+ return &_bestRoute[0];
+}
+
+void LinesManager::useRoute0(int idx, int curRouteIdx) {
+ if (idx) {
+ int i = 0;
+ do {
+ assert(curRouteIdx <= 8000);
+ _bestRoute[curRouteIdx++] = _testRoute0[i++];
+ } while (_testRoute0[i].isValid());
+ }
+ _bestRoute[curRouteIdx].invalidate();
+}
+
+void LinesManager::useRoute1(int idx, int curRouteIdx) {
+ if (idx) {
+ int i = 0;
+ do {
+ assert(curRouteIdx <= 8000);
+ _bestRoute[curRouteIdx++] = _testRoute1[i++];
+ } while (_testRoute1[i].isValid());
+ }
+ _bestRoute[curRouteIdx].invalidate();
+}
+
+void LinesManager::useRoute2(int idx, int curRouteIdx) {
+ if (idx) {
+ int i = 0;
+ do {
+ assert(curRouteIdx <= 8000);
+ _bestRoute[curRouteIdx++] = _testRoute2[i++];
+ } while (_testRoute2[i].isValid());
+ }
+ _bestRoute[curRouteIdx].invalidate();
+}
+
+int LinesManager::characterRoute(int fromX, int fromY, int destX, int destY, int startLineIdx, int endLineIdx, int routeIdx) {
+ int collDataIdxRoute2 = 0;
+ bool colResult = false;
+
+ int curX = fromX;
+ int curY = fromY;
+ int curRouteIdx = routeIdx;
+ bool dummyLineFl = false;
+ if (startLineIdx == -1 && endLineIdx == -1)
+ dummyLineFl = true;
+ int foundDataIdx;
+ int foundLineIdx = startLineIdx;
+ if (checkCollisionLine(fromX, fromY, &foundDataIdx, &foundLineIdx, 0, _linesNumb)) {
+ switch (_lineItem[foundLineIdx]._direction) {
+ case DIR_UP:
+ curY -= 2;
+ break;
+ case DIR_UP_RIGHT:
+ curY -= 2;
+ curX += 2;
+ break;
+ case DIR_RIGHT:
+ curX += 2;
+ break;
+ case DIR_DOWN_RIGHT:
+ curY += 2;
+ curX += 2;
+ case DIR_DOWN:
+ curY += 2;
+ break;
+ case DIR_DOWN_LEFT:
+ curY += 2;
+ curX -= 2;
+ break;
+ case DIR_LEFT:
+ curX -= 2;
+ break;
+ case DIR_UP_LEFT:
+ curY -= 2;
+ curX -= 2;
+ break;
+ default:
+ break;
+ }
+ }
+ int oldX = curX;
+ int oldY = curY;
+ int idxRoute0 = 0;
+ int collLineIdxRoute0 = -1;
+ int collLineIdxRoute1 = -1;
+ int collLineIdxRoute2 = -1;
+
+ int distX, distY;
+ int repeatFlag = 0;
+ int collDataIdxRoute0 = 0;
+ int collDataIdxRoute1 = 0;
+ for (;;) {
+ int newX = curX;
+ int newY = curY;
+ if (destX >= curX - 2 && destX <= curX + 2 && destY >= curY - 2 && destY <= curY + 2) {
+ _testRoute0[idxRoute0].invalidate();
+ useRoute0(idxRoute0, curRouteIdx);
+ return 1;
+ }
+ distX = abs(curX - destX) + 1;
+ distY = abs(curY - destY) + 1;
+ int maxDist;
+ if (distX > distY)
+ maxDist = distX;
+ else
+ maxDist = distY;
+ maxDist--;
+ assert(maxDist != 0);
+ int stepX = 1000 * distX / maxDist;
+ int stepY = 1000 * distY / maxDist;
+ if (destX < curX)
+ stepX = -stepX;
+ if (destY < curY)
+ stepY = -stepY;
+ int vertDirection = (int16)stepX / 1000;
+ int horzDirection = (int16)stepY / 1000;
+ Directions newDirection = DIR_NONE;
+ if (horzDirection == -1 && (stepX >= 0 && stepX <= 150))
+ newDirection = DIR_UP;
+ if (vertDirection == 1 && (stepY >= -1 && stepY <= 150))
+ newDirection = DIR_RIGHT;
+ if (horzDirection == 1 && (stepX >= -150 && stepX <= 150))
+ newDirection = DIR_DOWN;
+ if (vertDirection == -1 && (stepY >= -150 && stepY <= 150))
+ newDirection = DIR_LEFT;
+ if (horzDirection == -1 && (stepX >= -150 && stepX <= 0))
+ newDirection = DIR_UP;
+
+ if (newDirection == DIR_NONE && !checkSmoothMove(curX, newY, destX, destY) && !makeSmoothMove(curX, newY, destX, destY)) {
+ newDirection = _smoothMoveDirection;
+ int smoothRouteIdx = 0;
+ for (smoothRouteIdx = 0; _smoothRoute[smoothRouteIdx]._posX != -1 && _smoothRoute[smoothRouteIdx]._posY != -1; ++smoothRouteIdx) {
+ if (checkCollisionLine(_smoothRoute[smoothRouteIdx]._posX, _smoothRoute[smoothRouteIdx]._posY, &collDataIdxRoute0, &collLineIdxRoute0, 0, _linesNumb)) {
+ if (collLineIdxRoute0 > _lastLine)
+ collLineIdxRoute0 = -1;
+ break;
+ }
+
+ _testRoute0[idxRoute0].set(_smoothRoute[smoothRouteIdx]._posX, _smoothRoute[smoothRouteIdx]._posY, newDirection);
+ idxRoute0++;
+
+ if (repeatFlag == 1) {
+ repeatFlag = 2;
+ break;
+ }
+ }
+
+ if (repeatFlag != 2 && _smoothRoute[smoothRouteIdx]._posX != -1 && _smoothRoute[smoothRouteIdx]._posY != -1)
+ break;
+
+ repeatFlag = 1;
+ newX = _smoothRoute[smoothRouteIdx - 1]._posX;
+ newY = _smoothRoute[smoothRouteIdx - 1]._posY;
+ }
+ int newDistX = abs(newX - destX) + 1;
+ int newDistY = abs(newY - destY) + 1;
+ int newMaxDist = newDistY;
+ if (newDistX > newDistY)
+ newMaxDist = newDistX;
+ if (newMaxDist <= 10) {
+ _testRoute0[idxRoute0].invalidate();
+ useRoute0(idxRoute0, curRouteIdx);
+ return 1;
+ }
+ int newStepX = 1000 * newDistX / (newMaxDist - 1);
+ int newStepY = 1000 * newDistY / (newMaxDist - 1);
+ if (destX < newX)
+ newStepX = -newStepX;
+ if (destY < newY)
+ newStepY = -newStepY;
+ int newVertDirection = newStepX / 1000;
+ int newHorzDirection = newStepY / 1000;
+ int newSmoothX = 1000 * newX;
+ int newSmoothY = 1000 * newY;
+ int curPosX = newSmoothX / 1000;
+ int curPosY = newSmoothY / 1000;
+ if (!(newStepX / 1000) && newHorzDirection == -1)
+ newDirection = DIR_UP;
+ if (newVertDirection == 1) {
+ if (newHorzDirection == -1)
+ newDirection = DIR_UP_RIGHT;
+ if (!newHorzDirection)
+ newDirection = DIR_RIGHT;
+ if (newHorzDirection == 1)
+ newDirection = DIR_DOWN_RIGHT;
+ }
+ if (!newVertDirection && newHorzDirection == 1)
+ newDirection = DIR_DOWN;
+ if ((newVertDirection != -1) && (newHorzDirection == -1)) {
+ if (newStepX >= 0 && newStepX < 510)
+ newDirection = DIR_UP;
+ else if (newStepX >= 510 && newStepX <= 1000)
+ newDirection = DIR_UP_RIGHT;
+ } else {
+ if (newHorzDirection == 1)
+ newDirection = DIR_DOWN_LEFT;
+ else if (!newHorzDirection)
+ newDirection = DIR_LEFT;
+ else if (newHorzDirection == -1) {
+ if (newStepX >= 0 && newStepX < 510)
+ newDirection = DIR_UP;
+ else if (newStepX >= 510 && newStepX <= 1000)
+ newDirection = DIR_UP_RIGHT;
+ else
+ newDirection = DIR_UP_LEFT;
+ }
+ }
+ if (newVertDirection == 1) {
+ if (newStepY >= -1000 && newStepY <= -510)
+ newDirection = DIR_UP_RIGHT;
+ if (newStepY >= -510 && newStepY <= 510)
+ newDirection = DIR_RIGHT;
+ if (newStepY >= 510 && newStepY <= 1000)
+ newDirection = DIR_DOWN_RIGHT;
+ }
+ if (newHorzDirection == 1) {
+ if (newStepX >= 510 && newStepX <= 1000)
+ newDirection = DIR_DOWN_RIGHT;
+ if (newStepX >= -510 && newStepX <= 510)
+ newDirection = DIR_DOWN;
+ if (newStepX >= -1000 && newStepX <= -510)
+ newDirection = DIR_DOWN_LEFT;
+ }
+ if (newVertDirection == -1) {
+ if (newStepY >= 510 && newStepY <= 1000)
+ newDirection = DIR_DOWN_LEFT;
+ if (newStepY >= -510 && newStepY <= 510)
+ newDirection = DIR_LEFT;
+ if (newStepY >= -1000 && newStepY <= -510)
+ newDirection = DIR_UP_LEFT;
+ }
+ if (newHorzDirection == -1) {
+ if (newStepX >= -1000 && newStepX <= -510)
+ newDirection = DIR_UP_LEFT;
+ if (newStepX >= -510 && newStepX <= 0)
+ newDirection = DIR_UP;
+ }
+ if (newMaxDist + 1 <= 0) {
+ _testRoute0[idxRoute0].invalidate();
+ useRoute0(idxRoute0, curRouteIdx);
+ return 1;
+ }
+ int curDist = 0;
+ while (!checkCollisionLine(curPosX, curPosY, &collDataIdxRoute0, &collLineIdxRoute0, 0, _linesNumb)) {
+ _testRoute0[idxRoute0].set(curPosX, curPosY, newDirection);
+ newSmoothX += newStepX;
+ newSmoothY += newStepY;
+ curPosX = newSmoothX / 1000;
+ curPosY = newSmoothY / 1000;
+ idxRoute0++;
+ ++curDist;
+ if (curDist >= newMaxDist + 1) {
+ _testRoute0[idxRoute0].invalidate();
+ useRoute0(idxRoute0, curRouteIdx);
+ return 1;
+ }
+ }
+ if (_lastLine >= collLineIdxRoute0)
+ break;
+ int tmpRouteIdx = computeRouteIdx(collLineIdxRoute0, collDataIdxRoute0, curPosX, curPosY, destX, destY, idxRoute0, _testRoute0);
+ if (tmpRouteIdx == -1) {
+ useRoute0(idxRoute0, curRouteIdx);
+ return 1;
+ }
+ idxRoute0 = tmpRouteIdx;
+ if (_newPosX != -1 || _newPosY != -1) {
+ collLineIdxRoute0 = -1;
+ break;
+ }
+ curX = -1;
+ curY = -1;
+ }
+
+ _testRoute0[idxRoute0].invalidate();
+
+ int idxRoute1 = 0;
+ int posXRoute1 = oldX;
+ int posYRoute1 = oldY;
+
+ while (true) {
+
+ if (destX >= posXRoute1 - 2 && destX <= posXRoute1 + 2 && destY >= posYRoute1 - 2 && destY <= posYRoute1 + 2) {
+ _testRoute1[idxRoute1].invalidate();
+ useRoute1(idxRoute1, curRouteIdx);
+ return 1;
+ }
+ while (posXRoute1 != destX) {
+ if (checkCollisionLine(posXRoute1, posYRoute1, &collDataIdxRoute1, &collLineIdxRoute1, 0, _linesNumb)) {
+ if (collLineIdxRoute1 > _lastLine)
+ collLineIdxRoute1 = -1;
+ break;
+ }
+
+ if (posXRoute1 < destX)
+ _testRoute1[idxRoute1++].set(posXRoute1++, posYRoute1, DIR_RIGHT);
+ else
+ _testRoute1[idxRoute1++].set(posXRoute1--, posYRoute1, DIR_LEFT);
+ }
+ if (posXRoute1 != destX)
+ break;
+
+ int curPosY = posYRoute1;
+ while (curPosY != destY) {
+ if (checkCollisionLine(destX, curPosY, &collDataIdxRoute1, &collLineIdxRoute1, 0, _linesNumb)) {
+ if (collLineIdxRoute1 <= _lastLine)
+ break;
+
+ int tmpRouteIdx = computeRouteIdx(collLineIdxRoute1, collDataIdxRoute1, destX, curPosY, destX, destY, idxRoute1, _testRoute1);
+ if (tmpRouteIdx == -1) {
+ useRoute1(idxRoute1, curRouteIdx);
+ return 1;
+ }
+ idxRoute1 = tmpRouteIdx;
+ if (_newPosX != -1 && _newPosY != -1)
+ break;
+ }
+
+ if (curPosY < destY)
+ _testRoute1[idxRoute1++].set(destX, curPosY++, DIR_DOWN);
+ else
+ _testRoute1[idxRoute1++].set(destX, curPosY--, DIR_UP);
+ }
+ if (curPosY == destY) {
+ _testRoute1[idxRoute1].invalidate();
+ useRoute1(idxRoute1, curRouteIdx);
+ return 1;
+ }
+ if (collLineIdxRoute1 <= _lastLine)
+ break;
+ posXRoute1 = _newPosX;
+ posYRoute1 = _newPosY;
+ bool colRes = checkCollisionLine(_newPosX, _newPosY, &collDataIdxRoute1, &collLineIdxRoute1, 0, _lastLine);
+ if (colRes && collLineIdxRoute1 <= _lastLine)
+ break;
+ }
+
+ _testRoute1[idxRoute1].invalidate();
+ idxRoute1 = 0;
+ int posXRoute2 = oldX;
+ int posYRoute2 = oldY;
+ while (true) {
+ int curPosX;
+ if (destX >= posXRoute2 - 2 && destX <= posXRoute2 + 2 && destY >= posYRoute2 - 2 && destY <= posYRoute2 + 2) {
+ _testRoute2[idxRoute1].invalidate();
+ useRoute2(idxRoute1, curRouteIdx);
+ return 1;
+ }
+
+ int curPosYRoute2 = posYRoute2;
+ while (curPosYRoute2 != destY) {
+ if (checkCollisionLine(posXRoute2, curPosYRoute2, &collDataIdxRoute2, &collLineIdxRoute2, 0, _linesNumb)) {
+ if (collLineIdxRoute2 > _lastLine)
+ collLineIdxRoute2 = -1;
+ break;
+ }
+
+ if (curPosYRoute2 < destY)
+ _testRoute2[idxRoute1++].set(posXRoute2, curPosYRoute2++, DIR_DOWN);
+ else
+ _testRoute2[idxRoute1++].set(posXRoute2, curPosYRoute2--, DIR_UP);
+ }
+ if (curPosYRoute2 != destY)
+ break;
+
+ curPosX = posXRoute2;
+ while (curPosX != destX) {
+ if (checkCollisionLine(curPosX, destY, &collDataIdxRoute2, &collLineIdxRoute2, 0, _linesNumb)) {
+ if (collLineIdxRoute2 <= _lastLine)
+ break;
+
+ int tmpRouteIdx = computeRouteIdx(collLineIdxRoute2, collDataIdxRoute2, curPosX, destY, destX, destY, idxRoute1, _testRoute2);
+ if (tmpRouteIdx == -1) {
+ useRoute2(idxRoute1, curRouteIdx);
+ return 1;
+ }
+ idxRoute1 = tmpRouteIdx;
+ if (_newPosX != -1 && _newPosY != -1)
+ break;
+ }
+
+ if (curPosX < destX)
+ _testRoute2[idxRoute1++].set(curPosX++, destY, DIR_RIGHT);
+ else
+ _testRoute2[idxRoute1++].set(curPosX--, destY, DIR_LEFT);
+ }
+ if (curPosX == destX) {
+ collLineIdxRoute2 = -1;
+ _testRoute2[idxRoute1].invalidate();
+ useRoute2(idxRoute1, curRouteIdx);
+ return 1;
+ }
+ if (collLineIdxRoute2 <= _lastLine)
+ break;
+
+ posXRoute2 = _newPosX;
+ posYRoute2 = _newPosY;
+ colResult = checkCollisionLine(_newPosX, _newPosY, &collDataIdxRoute2, &collLineIdxRoute2, 0, _lastLine);
+ if (colResult && collLineIdxRoute2 <= _lastLine)
+ break;
+ }
+
+ _testRoute2[idxRoute1].invalidate();
+
+ if (!dummyLineFl) {
+ if (endLineIdx > foundLineIdx) {
+ if (_testRoute0[0]._x != -1 && collLineIdxRoute0 > foundLineIdx && collLineIdxRoute1 <= collLineIdxRoute0 && collLineIdxRoute2 <= collLineIdxRoute0 && endLineIdx >= collLineIdxRoute0) {
+ _newLineIdx = collLineIdxRoute0;
+ _newLineDataIdx = collDataIdxRoute0;
+ int i = 0;
+ do {
+ assert(curRouteIdx <= 8000);
+ _bestRoute[curRouteIdx++] = _testRoute0[i++];
+ } while (_testRoute0[i].isValid());
+ _newRouteIdx = curRouteIdx;
+ return 2;
+ }
+ if (_testRoute1[0]._x != -1 && foundLineIdx < collLineIdxRoute1 && collLineIdxRoute2 <= collLineIdxRoute1 && collLineIdxRoute0 <= collLineIdxRoute1 && endLineIdx >= collLineIdxRoute1) {
+ _newLineIdx = collLineIdxRoute1;
+ _newLineDataIdx = collDataIdxRoute1;
+ int i = 0;
+ do {
+ assert(curRouteIdx <= 8000);
+ _bestRoute[curRouteIdx++] = _testRoute1[i++];
+ } while (_testRoute1[i].isValid());
+ _newRouteIdx = curRouteIdx;
+ return 2;
+ }
+ if (_testRoute2[0]._x != -1 && foundLineIdx < collLineIdxRoute2 && collLineIdxRoute1 < collLineIdxRoute2 && collLineIdxRoute0 < collLineIdxRoute2 && endLineIdx >= collLineIdxRoute2) {
+ _newLineIdx = collLineIdxRoute2;
+ _newLineDataIdx = collDataIdxRoute2;
+ int i = 0;
+ do {
+ assert(curRouteIdx <= 8000);
+ _bestRoute[curRouteIdx++] = _testRoute2[i++];
+ } while (_testRoute2[i].isValid());
+ _newRouteIdx = curRouteIdx;
+ return 2;
+ }
+ }
+ if (endLineIdx < foundLineIdx) {
+ if (collLineIdxRoute0 == -1)
+ collLineIdxRoute0 = INVALID_LINE_VALUE;
+ if (collLineIdxRoute1 == -1)
+ collLineIdxRoute0 = INVALID_LINE_VALUE;
+ if (collLineIdxRoute2 == -1)
+ collLineIdxRoute0 = INVALID_LINE_VALUE;
+ if (_testRoute1[0]._x != -1 && collLineIdxRoute1 < foundLineIdx && collLineIdxRoute2 >= collLineIdxRoute1 && collLineIdxRoute0 >= collLineIdxRoute1 && endLineIdx <= collLineIdxRoute1) {
+ _newLineIdx = collLineIdxRoute1;
+ _newLineDataIdx = collDataIdxRoute1;
+ int i = 0;
+ do {
+ assert(curRouteIdx <= 8000);
+ _bestRoute[curRouteIdx++] = _testRoute1[i++];
+ } while (_testRoute1[i].isValid());
+ _newRouteIdx = curRouteIdx;
+ return 2;
+ }
+ if (_testRoute2[0]._x != -1 && foundLineIdx > collLineIdxRoute2 && collLineIdxRoute1 >= collLineIdxRoute2 && collLineIdxRoute0 >= collLineIdxRoute2 && endLineIdx <= collLineIdxRoute2) {
+ _newLineIdx = collLineIdxRoute2;
+ _newLineDataIdx = collDataIdxRoute2;
+ int i = 0;
+ do {
+ assert(curRouteIdx <= 8000);
+ _bestRoute[curRouteIdx++] = _testRoute2[i++];
+ } while (_testRoute2[i].isValid());
+ _newRouteIdx = curRouteIdx;
+ return 2;
+ }
+ // CHECKME: Checking essai0[0]._x might make more sense here?
+ if (_testRoute1[0]._x != -1 && foundLineIdx > collLineIdxRoute0 && collLineIdxRoute1 >= collLineIdxRoute0 && collLineIdxRoute2 >= collLineIdxRoute0 && endLineIdx <= collLineIdxRoute0) {
+ _newLineIdx = collLineIdxRoute0;
+ _newLineDataIdx = collDataIdxRoute0;
+ int i = 0;
+ do {
+ assert(curRouteIdx <= 8000);
+ _bestRoute[curRouteIdx++] = _testRoute0[i++];
+ } while (_testRoute0[i].isValid());
+ _newRouteIdx = curRouteIdx;
+ return 2;
+ }
+ }
+ }
+ return 0;
+}
+
+RouteItem *LinesManager::cityMapCarRoute(int x1, int y1, int x2, int y2) {
+ RouteItem *result;
+ int arrDelta[10];
+ int arrDataIdx[10];
+ int arrLineIdx[10];
+
+ int clipX2 = x2;
+ int clipY2 = y2;
+ if (x2 <= 14)
+ clipX2 = 15;
+ if (y2 <= 14)
+ clipY2 = 15;
+ if (clipX2 > _vm->_graphicsMan->_maxX - 10)
+ clipX2 = _vm->_graphicsMan->_maxX - 10;
+ if (clipY2 > 445)
+ clipY2 = 440;
+
+ int delta = 0;
+ for (delta = 0; clipY2 + delta < _vm->_graphicsMan->_maxY; delta++) {
+ if (checkCollisionLine(clipX2, clipY2 + delta, &arrDataIdx[DIR_DOWN], &arrLineIdx[DIR_DOWN], 0, _lastLine) && arrLineIdx[DIR_DOWN] <= _lastLine)
+ break;
+ arrDataIdx[DIR_DOWN] = 0;
+ arrLineIdx[DIR_DOWN] = -1;
+ }
+ arrDelta[DIR_DOWN] = delta;
+
+ for (delta = 0; clipY2 - delta > _vm->_graphicsMan->_minY; delta++) {
+ if (checkCollisionLine(clipX2, clipY2 - delta , &arrDataIdx[DIR_UP], &arrLineIdx[DIR_UP], 0, _lastLine) && arrLineIdx[DIR_UP] <= _lastLine)
+ break;
+ arrDataIdx[DIR_UP] = 0;
+ arrLineIdx[DIR_UP] = -1;
+ if (arrDelta[DIR_DOWN] < delta && arrLineIdx[DIR_DOWN] != -1)
+ break;
+ }
+ arrDelta[DIR_UP] = delta;
+
+ for (delta = 0; clipX2 + delta < _vm->_graphicsMan->_maxX; delta++) {
+ if (checkCollisionLine(clipX2 + delta, clipY2, &arrDataIdx[DIR_RIGHT], &arrLineIdx[DIR_RIGHT], 0, _lastLine) && arrLineIdx[DIR_RIGHT] <= _lastLine)
+ break;
+ arrDataIdx[DIR_RIGHT] = 0;
+ arrLineIdx[DIR_RIGHT] = -1;
+ if ((arrDelta[DIR_UP] <= delta && arrLineIdx[DIR_UP] != -1) || (arrDelta[DIR_DOWN] <= delta && arrLineIdx[DIR_DOWN] != -1))
+ break;
+ }
+ arrDelta[DIR_RIGHT] = delta;
+
+ for (delta = 0; clipX2 - delta > _vm->_graphicsMan->_minX; delta++) {
+ if (checkCollisionLine(clipX2 - delta, clipY2, &arrDataIdx[DIR_LEFT], &arrLineIdx[DIR_LEFT], 0, _lastLine) && arrLineIdx[DIR_LEFT] <= _lastLine)
+ break;
+ arrDataIdx[DIR_LEFT] = 0;
+ arrLineIdx[DIR_LEFT] = -1;
+ if ((arrDelta[DIR_UP] <= delta && arrLineIdx[DIR_UP] != -1) || (arrDelta[DIR_RIGHT] <= delta && arrLineIdx[DIR_RIGHT] != -1) || (arrDelta[DIR_DOWN] <= delta && arrLineIdx[DIR_DOWN] != -1))
+ break;
+ }
+ arrDelta[DIR_LEFT] = delta;
+
+ if (arrLineIdx[DIR_UP] == -1)
+ arrDelta[DIR_UP] = INVALID_LINE_VALUE;
+ if (arrLineIdx[DIR_RIGHT] == -1)
+ arrDelta[DIR_RIGHT] = INVALID_LINE_VALUE;
+ if (arrLineIdx[DIR_DOWN] == -1)
+ arrDelta[DIR_DOWN] = INVALID_LINE_VALUE;
+ if (arrLineIdx[DIR_LEFT] == -1)
+ arrDelta[DIR_LEFT] = INVALID_LINE_VALUE;
+ if (arrLineIdx[DIR_UP] != -1 || arrLineIdx[DIR_RIGHT] != -1 || arrLineIdx[DIR_DOWN] != -1 || arrLineIdx[DIR_LEFT] != -1) {
+ int curLineDataIdx = 0;
+ int curLineIdx = 0;
+ if (arrLineIdx[DIR_DOWN] != -1 && arrDelta[DIR_UP] >= arrDelta[DIR_DOWN] && arrDelta[DIR_RIGHT] >= arrDelta[DIR_DOWN] && arrDelta[DIR_LEFT] >= arrDelta[DIR_DOWN]) {
+ curLineIdx = arrLineIdx[DIR_DOWN];
+ curLineDataIdx = arrDataIdx[DIR_DOWN];
+ } else if (arrLineIdx[DIR_UP] != -1 && arrDelta[DIR_DOWN] >= arrDelta[DIR_UP] && arrDelta[DIR_RIGHT] >= arrDelta[DIR_UP] && arrDelta[DIR_LEFT] >= arrDelta[DIR_UP]) {
+ curLineIdx = arrLineIdx[DIR_UP];
+ curLineDataIdx = arrDataIdx[DIR_UP];
+ } else if (arrLineIdx[DIR_RIGHT] != -1 && arrDelta[DIR_UP] >= arrDelta[DIR_RIGHT] && arrDelta[DIR_DOWN] >= arrDelta[DIR_RIGHT] && arrDelta[DIR_LEFT] >= arrDelta[DIR_RIGHT]) {
+ curLineIdx = arrLineIdx[DIR_RIGHT];
+ curLineDataIdx = arrDataIdx[DIR_RIGHT];
+ } else if (arrLineIdx[DIR_LEFT] != -1 && arrDelta[DIR_DOWN] >= arrDelta[DIR_LEFT] && arrDelta[DIR_RIGHT] >= arrDelta[DIR_LEFT] && arrDelta[DIR_UP] >= arrDelta[DIR_LEFT]) {
+ curLineIdx = arrLineIdx[DIR_LEFT];
+ curLineDataIdx = arrDataIdx[DIR_LEFT];
+ }
+
+ for (int i = 0; i <= 8; i++) {
+ arrLineIdx[i] = -1;
+ arrDataIdx[i] = 0;
+ arrDelta[i] = INVALID_LINE_VALUE;
+ }
+
+ int superRouteIdx = 0;
+ int curRouteDataIdx = 0;
+ int curRouteLineIdx = 0;
+ if (checkCollisionLine(x1, y1, &arrDataIdx[DIR_UP], &arrLineIdx[DIR_UP], 0, _lastLine)) {
+ curRouteLineIdx = arrLineIdx[DIR_UP];
+ curRouteDataIdx = arrDataIdx[DIR_UP];
+ } else if (checkCollisionLine(x1, y1, &arrDataIdx[DIR_UP], &arrLineIdx[DIR_UP], 0, _linesNumb)) {
+ int curRouteIdx = 0;
+ int curRouteX;
+ for (;;) {
+ curRouteX = _testRoute2[curRouteIdx]._x;
+ int curRouteY = _testRoute2[curRouteIdx]._y;
+ Directions curRouteDir = _testRoute2[curRouteIdx]._dir;
+ curRouteIdx++;
+
+ if (checkCollisionLine(curRouteX, curRouteY, &arrDataIdx[DIR_UP], &arrLineIdx[DIR_UP], 0, _lastLine))
+ break;
+
+ _bestRoute[superRouteIdx].set(curRouteX, curRouteY, curRouteDir);
+
+ _testRoute0[superRouteIdx].set(curRouteX, curRouteY, curRouteDir);
+ superRouteIdx++;
+ if (curRouteX == -1)
+ break;;
+ }
+ if (curRouteX != -1) {
+ curRouteLineIdx = arrLineIdx[DIR_UP];
+ curRouteDataIdx = arrDataIdx[DIR_UP];
+ }
+ } else {
+ curRouteLineIdx = 1;
+ curRouteDataIdx = 1;
+ superRouteIdx = 0;
+ }
+ bool loopFl = true;
+ while (loopFl) {
+ loopFl = false;
+ if (curRouteLineIdx < curLineIdx) {
+ superRouteIdx = _lineItem[curRouteLineIdx].appendToRouteInc(curRouteDataIdx, _lineItem[curRouteLineIdx]._lineDataEndIdx - 2, _bestRoute, superRouteIdx);
+ for (int j = curRouteLineIdx + 1; j < curLineIdx; ++j) {
+ if (PLAN_TEST(_lineItem[j]._lineData[0], _lineItem[j]._lineData[1], superRouteIdx, j, curLineIdx)) {
+ curRouteLineIdx = _newLineIdx;
+ curRouteDataIdx = _newLineDataIdx;
+ superRouteIdx = _newRouteIdx;
+ loopFl = true;
+ break;
+ }
+ if (_lineItem[j]._lineDataEndIdx - 2 > 0) {
+ superRouteIdx = _lineItem[j].appendToRouteInc(0, _lineItem[j]._lineDataEndIdx - 2, _bestRoute, superRouteIdx);
+ }
+ }
+ if (loopFl)
+ continue;
+ curRouteDataIdx = 0;
+ curRouteLineIdx = curLineIdx;
+ }
+ if (curRouteLineIdx > curLineIdx) {
+ superRouteIdx = _lineItem[curRouteLineIdx].appendToRouteDec(curRouteDataIdx, 0, _bestRoute, superRouteIdx);
+ for (int l = curRouteLineIdx - 1; l > curLineIdx; --l) {
+ if (PLAN_TEST(_lineItem[l]._lineData[2 * _lineItem[l]._lineDataEndIdx - 2], _lineItem[l]._lineData[2 * _lineItem[l]._lineDataEndIdx - 1], superRouteIdx, l, curLineIdx)) {
+ curRouteLineIdx = _newLineIdx;
+ curRouteDataIdx = _newLineDataIdx;
+ superRouteIdx = _newRouteIdx;
+ loopFl = true;
+ break;
+ }
+
+ superRouteIdx = _lineItem[l].appendToRouteDec(_lineItem[l]._lineDataEndIdx - 2, 0, _bestRoute, superRouteIdx);
+ }
+ if (loopFl)
+ continue;
+
+ curRouteDataIdx = _lineItem[curLineIdx]._lineDataEndIdx - 1;
+ curRouteLineIdx = curLineIdx;
+ }
+ if (curRouteLineIdx == curLineIdx) {
+ if (curRouteDataIdx <= curLineDataIdx) {
+ superRouteIdx = _lineItem[curLineIdx].appendToRouteInc(curRouteDataIdx, curLineDataIdx, _bestRoute, superRouteIdx);
+ } else {
+ superRouteIdx = _lineItem[curLineIdx].appendToRouteDec(curRouteDataIdx, curLineDataIdx, _bestRoute, superRouteIdx);
+ }
+ }
+ }
+ _bestRoute[superRouteIdx].invalidate();
+ result = &_bestRoute[0];
+ } else {
+ result = NULL;
+ }
+ return result;
+}
+
+bool LinesManager::checkSmoothMove(int fromX, int fromY, int destX, int destY) {
+ int distX = abs(fromX - destX) + 1;
+ int distY = abs(fromY - destY) + 1;
+ if (distX > distY)
+ distY = distX;
+ if (distY <= 10)
+ return true;
+
+ int stepX = 1000 * distX / (distY - 1);
+ int stepY = 1000 * distY / (distY - 1);
+ if (destX < fromX)
+ stepX = -stepX;
+ if (destY < fromY)
+ stepY = -stepY;
+
+ int smoothPosX = 1000 * fromX;
+ int smoothPosY = 1000 * fromY;
+ int newPosX = fromX;
+ int newPosY = fromY;
+
+ if (distY + 1 > 0) {
+ int stepCount = 0;
+ int foundLineIdx;
+ int foundDataIdx;
+ while (!checkCollisionLine(newPosX, newPosY, &foundDataIdx, &foundLineIdx, 0, _linesNumb) || foundLineIdx > _lastLine) {
+ smoothPosX += stepX;
+ smoothPosY += stepY;
+ newPosX = smoothPosX / 1000;
+ newPosY = smoothPosY / 1000;
+ ++stepCount;
+ if (stepCount >= distY + 1)
+ return false;
+ }
+ return true;
+ }
+ return false;
+}
+
+bool LinesManager::makeSmoothMove(int fromX, int fromY, int destX, int destY) {
+ int curX = fromX;
+ int curY = fromY;
+ if (fromX > destX && destY > fromY) {
+ int hopkinsIdx = 36;
+ int smoothIdx = 0;
+ int stepCount = 0;
+ while (curX > destX && destY > curY) {
+ int realSpeedX = _vm->_globals->_hopkinsItem[hopkinsIdx]._speedX;
+ int realSpeedY = _vm->_globals->_hopkinsItem[hopkinsIdx]._speedY;
+ int spriteSize = _vm->_globals->_spriteSize[curY];
+ if (spriteSize < 0) {
+ realSpeedX = _vm->_graphicsMan->zoomOut(realSpeedX, -spriteSize);
+ realSpeedY = _vm->_graphicsMan->zoomOut(realSpeedY, -spriteSize);
+ } else if (spriteSize > 0) {
+ realSpeedX = _vm->_graphicsMan->zoomIn(realSpeedX, spriteSize);
+ realSpeedY = _vm->_graphicsMan->zoomIn(realSpeedY, spriteSize);
+ }
+ for (int i = 0; i < realSpeedX; i++) {
+ --curX;
+ _smoothRoute[smoothIdx]._posX = curX;
+ if (curY != curY + realSpeedY)
+ curY++;
+ _smoothRoute[smoothIdx]._posY = curY;
+ smoothIdx++;
+ }
+ ++hopkinsIdx;
+ if (hopkinsIdx == 48)
+ hopkinsIdx = 36;
+ ++stepCount;
+ }
+ if (stepCount > 5) {
+ _smoothRoute[smoothIdx]._posX = -1;
+ _smoothRoute[smoothIdx]._posY = -1;
+ _smoothMoveDirection = DIR_DOWN_LEFT;
+ return false;
+ }
+ } else if (fromX < destX && destY > fromY) {
+ int hopkinsIdx = 36;
+ int smoothIdx = 0;
+ int stepCount = 0;
+ while (curX < destX && destY > curY) {
+ int realSpeedX = _vm->_globals->_hopkinsItem[hopkinsIdx]._speedX;
+ int realSpeedY = _vm->_globals->_hopkinsItem[hopkinsIdx]._speedY;
+ int spriteSize = _vm->_globals->_spriteSize[curY];
+ if (spriteSize < 0) {
+ realSpeedX = _vm->_graphicsMan->zoomOut(realSpeedX, -spriteSize);
+ realSpeedY = _vm->_graphicsMan->zoomOut(realSpeedY, -spriteSize);
+ } else if (spriteSize > 0) {
+ realSpeedX = _vm->_graphicsMan->zoomIn(realSpeedX, spriteSize);
+ realSpeedY = _vm->_graphicsMan->zoomIn(realSpeedY, spriteSize);
+ }
+ for (int i = 0; i < realSpeedX; i++) {
+ ++curX;
+ _smoothRoute[smoothIdx]._posX = curX;
+ if (curY != curY + realSpeedY)
+ curY++;
+ _smoothRoute[smoothIdx]._posY = curY;
+ smoothIdx++;
+ }
+ ++hopkinsIdx;
+ if (hopkinsIdx == 48)
+ hopkinsIdx = 36;
+ ++stepCount;
+ }
+ if (stepCount > 5) {
+ _smoothRoute[smoothIdx]._posX = -1;
+ _smoothRoute[smoothIdx]._posY = -1;
+ _smoothMoveDirection = DIR_DOWN_RIGHT;
+ return false;
+ }
+ } else if (fromX > destX && destY < fromY) {
+ int hopkinsIdx = 12;
+ int smoothIdx = 0;
+ int stepCount = 0;
+ while (curX > destX && destY < curY) {
+ int realSpeedX = _vm->_graphicsMan->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedX, 25);
+ int realSpeedY = _vm->_graphicsMan->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedY, 25);
+ int oldY = curY;
+ for (int i = 0; i < realSpeedX; i++) {
+ --curX;
+ _smoothRoute[smoothIdx]._posX = curX;
+ if ((uint16)curY != (uint16)oldY + realSpeedY)
+ curY--;
+ _smoothRoute[smoothIdx]._posY = curY;
+ smoothIdx++;
+ }
+ ++hopkinsIdx;
+ if (hopkinsIdx == 24)
+ hopkinsIdx = 12;
+ ++stepCount;
+ }
+ if (stepCount > 5) {
+ _smoothRoute[smoothIdx]._posX = -1;
+ _smoothRoute[smoothIdx]._posY = -1;
+ _smoothMoveDirection = DIR_UP_LEFT;
+ return false;
+ }
+ } else if (fromX < destX && destY < fromY) {
+ int hopkinsIdx = 12;
+ int smoothIdx = 0;
+ int stepCount = 0;
+ while (curX < destX && destY < curY) {
+ int oldY = curY;
+ int realSpeedX = _vm->_graphicsMan->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedX, 25);
+ int realSpeedY = _vm->_graphicsMan->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedY, 25);
+ for (int i = 0; i < realSpeedX; i++) {
+ ++curX;
+ _smoothRoute[smoothIdx]._posX = curX;
+ if ((uint16)curY != (uint16)oldY + realSpeedY)
+ curY--;
+ _smoothRoute[smoothIdx]._posY = curY;
+ smoothIdx++;
+ }
+ ++hopkinsIdx;
+ if (hopkinsIdx == 24)
+ hopkinsIdx = 12;
+ ++stepCount;
+ }
+
+ if (stepCount > 5) {
+ _smoothRoute[smoothIdx]._posX = -1;
+ _smoothRoute[smoothIdx]._posY = -1;
+ _smoothMoveDirection = DIR_UP_RIGHT;
+ return false;
+ }
+ }
+ return true;
+}
+
+bool LinesManager::PLAN_TEST(int paramX, int paramY, int superRouteIdx, int paramStartLineIdx, int paramEndLineIdx) {
+ int sideTestUp;
+ int sideTestDown;
+ int sideTestLeft;
+ int sideTestRight;
+ int lineIdxTestUp;
+ int lineIdxTestDown;
+ int lineIdxTestLeft;
+ int lineIdxTestRight;
+ int dataIdxTestUp;
+ int dataIdxTestDown;
+ int dataIdxTestLeft;
+ int dataIdxTestRight;
+
+ int idxTestUp = testLine(paramX, paramY - 2, &sideTestUp, &lineIdxTestUp, &dataIdxTestUp);
+ int idxTestDown = testLine(paramX, paramY + 2, &sideTestDown, &lineIdxTestDown, &dataIdxTestDown);
+ int idxTestLeft = testLine(paramX - 2, paramY, &sideTestLeft, &lineIdxTestLeft, &dataIdxTestLeft);
+ int idxTestRight = testLine(paramX + 2, paramY, &sideTestRight, &lineIdxTestRight, &dataIdxTestRight);
+ if (idxTestUp == -1 && idxTestDown == -1 && idxTestLeft == -1 && idxTestRight == -1)
+ return false;
+
+ // Direction: 1 = Up, 2 = Down, 3 = Left, 4 = Right
+ int direction;
+ if (paramStartLineIdx == -1 || paramEndLineIdx == -1) {
+ if (idxTestUp != -1)
+ direction = 1;
+ else if (idxTestDown != -1)
+ direction = 2;
+ else if (idxTestLeft != -1)
+ direction = 3;
+ else if (idxTestRight != -1)
+ direction = 4;
+ else
+ return false;
+ } else {
+ int stepCountUp = 100;
+ int stepCountDown = 100;
+ int stepCountLeft = 100;
+ int stepCountRight = 100;
+ int paramStepCount = abs(paramStartLineIdx - paramEndLineIdx);
+ if (idxTestUp != -1) {
+ stepCountUp = abs(lineIdxTestUp - paramEndLineIdx);
+ }
+ if (idxTestDown != -1) {
+ stepCountDown = abs(lineIdxTestDown - paramEndLineIdx);
+ }
+ if (idxTestLeft != -1) {
+ stepCountLeft = abs(lineIdxTestLeft - paramEndLineIdx);
+ }
+ if (idxTestRight != -1) {
+ stepCountRight = abs(lineIdxTestRight - paramEndLineIdx);
+ }
+
+ if (stepCountUp < paramStepCount && stepCountUp <= stepCountDown && stepCountUp <= stepCountLeft && stepCountUp <= stepCountRight)
+ direction = 1;
+ else if (paramStepCount > stepCountDown && stepCountUp >= stepCountDown && stepCountLeft >= stepCountDown && stepCountRight >= stepCountDown)
+ direction = 2;
+ else if (stepCountLeft < paramStepCount && stepCountLeft <= stepCountUp && stepCountLeft <= stepCountDown && stepCountLeft <= stepCountRight)
+ direction = 3;
+ else if (stepCountRight < paramStepCount && stepCountRight <= stepCountUp && stepCountRight <= stepCountDown && stepCountRight <= stepCountLeft)
+ direction = 4;
+ else
+ return false;
+ }
+
+ int sideTest = 0;
+ int idxTest = 0;
+ if (direction == 1) {
+ idxTest = idxTestUp;
+ sideTest = sideTestUp;
+ _newLineIdx = lineIdxTestUp;
+ _newLineDataIdx = dataIdxTestUp;
+ } else if (direction == 2) {
+ idxTest = idxTestDown;
+ sideTest = sideTestDown;
+ _newLineIdx = lineIdxTestDown;
+ _newLineDataIdx = dataIdxTestDown;
+ } else if (direction == 3) {
+ idxTest = idxTestLeft;
+ sideTest = sideTestLeft;
+ _newLineIdx = lineIdxTestLeft;
+ _newLineDataIdx = dataIdxTestLeft;
+ } else if (direction == 4) {
+ idxTest = idxTestRight;
+ sideTest = sideTestRight;
+ _newLineIdx = lineIdxTestRight;
+ _newLineDataIdx = dataIdxTestRight;
+ }
+
+ int routeIdx = superRouteIdx;
+ if (sideTest == 1) {
+ routeIdx = _lineItem[idxTest].appendToRouteInc(0, -1, _bestRoute, routeIdx);
+ } else if (sideTest == 2) {
+ routeIdx = _lineItem[idxTest].appendToRouteDec(-1, -1, _bestRoute, routeIdx);
+ }
+ _newRouteIdx = routeIdx;
+ return true;
+}
+
+// Test line
+int LinesManager::testLine(int paramX, int paramY, int *testValue, int *foundLineIdx, int *foundDataIdx) {
+ int16 *lineData;
+ int lineDataEndIdx;
+ int collLineIdx;
+ int collDataIdx;
+
+ for (int idx = _lastLine + 1; idx < _linesNumb + 1; idx++) {
+ lineData = _lineItem[idx]._lineData;
+ lineDataEndIdx = _lineItem[idx]._lineDataEndIdx;
+ if (lineData) {
+ if (lineData[0] == paramX && lineData[1] == paramY) {
+ *testValue = 1;
+ int posX = lineData[2 * (lineDataEndIdx - 1)];
+ int posY = lineData[2 * (lineDataEndIdx - 1) + 1];
+ if (_lineItem[idx]._directionRouteInc == DIR_DOWN || _lineItem[idx]._directionRouteInc == DIR_UP)
+ posY += 2;
+ if (_lineItem[idx]._directionRouteInc == DIR_RIGHT || _lineItem[idx]._directionRouteDec == DIR_LEFT)
+ posX += 2;
+ if (!checkCollisionLine(posX, posY, &collDataIdx, &collLineIdx, 0, _lastLine))
+ error("Error in test line");
+ *foundLineIdx = collLineIdx;
+ *foundDataIdx = collDataIdx;
+ return idx;
+ }
+ }
+
+ if (lineDataEndIdx > 0) {
+ if (lineData[2 * (lineDataEndIdx - 1)] == paramX && lineData[2 * (lineDataEndIdx - 1) + 1] == paramY) {
+ *testValue = 2;
+ int posX = lineData[0];
+ int posY = lineData[1];
+ if (_lineItem[idx]._directionRouteInc == DIR_DOWN || _lineItem[idx]._directionRouteInc == DIR_UP)
+ posY -= 2;
+ if (_lineItem[idx]._directionRouteInc == DIR_RIGHT || _lineItem[idx]._directionRouteDec == DIR_LEFT)
+ posX -= 2;
+ if (!checkCollisionLine(posX, posY, &collDataIdx, &collLineIdx, 0, _lastLine))
+ error("Error in test line");
+ *foundLineIdx = collLineIdx;
+ *foundDataIdx = collDataIdx;
+ return idx;
+ }
+ }
+ }
+ return -1;
+}
+
+int LinesManager::computeYSteps(int idx) {
+ int zoomPct = _vm->_globals->_spriteSize[idx];
+ if (_vm->_globals->_characterType == 1) {
+ if (zoomPct < 0)
+ zoomPct = -zoomPct;
+ zoomPct = 20 * (5 * zoomPct - 100) / -80;
+ } else if (_vm->_globals->_characterType == 2) {
+ if (zoomPct < 0)
+ zoomPct = -zoomPct;
+ zoomPct = 20 * (5 * zoomPct - 165) / -67;
+ }
+
+ int retVal = 25;
+ if (zoomPct < 0)
+ retVal = _vm->_graphicsMan->zoomOut(25, -zoomPct);
+ else if (zoomPct > 0)
+ retVal = _vm->_graphicsMan->zoomIn(25, zoomPct);
+
+ return retVal;
+}
+
+void LinesManager::optimizeRoute(RouteItem *route) {
+ if (route[0]._x == -1 && route[0]._y == -1)
+ return;
+
+ int routeIdx = 0;
+ Directions oldDir = DIR_NONE;
+ int route0Y = route[0]._y;
+ Directions curDir = route[0]._dir;
+
+ for (;;) {
+ if (oldDir != DIR_NONE && curDir != oldDir) {
+ int oldRouteIdx = routeIdx;
+ int routeCount = 0;
+ int yStep = computeYSteps(route0Y);
+ int curRouteX = route[routeIdx]._x;
+ int curRouteY = route[routeIdx]._y;
+ while (curRouteX != -1 || curRouteY != -1) {
+ int idx = routeIdx;
+ ++routeIdx;
+ ++routeCount;
+ if (route[idx]._dir != curDir)
+ break;
+ curRouteX = route[routeIdx]._x;
+ curRouteY = route[routeIdx]._y;
+ }
+ if (routeCount < yStep) {
+ int idx = oldRouteIdx;
+ for (int i = 0; i < routeCount; i++) {
+ route[idx]._dir = oldDir;
+ idx++;
+ }
+ curDir = oldDir;
+ }
+ routeIdx = oldRouteIdx;
+ if (curRouteX == -1 && curRouteY == -1)
+ break;
+ }
+ routeIdx++;
+ oldDir = curDir;
+ route0Y = route[routeIdx]._y;
+ curDir = route[routeIdx]._dir;
+ if (route[routeIdx]._x == -1 && route0Y == -1)
+ break;
+ }
+}
+
+int LinesManager::getMouseZone() {
+ int result;
+
+ int xp = _vm->_events->_mousePos.x + _vm->_events->_mouseOffset.x;
+ int yp = _vm->_events->_mousePos.y + _vm->_events->_mouseOffset.y;
+ if ((_vm->_events->_mousePos.y + _vm->_events->_mouseOffset.y) > 19) {
+ for (int bobZoneId = 0; bobZoneId <= 48; bobZoneId++) {
+ int bobId = _bobZone[bobZoneId];
+ if (bobId && _bobZoneFl[bobZoneId] && _vm->_objectsMan->_bob[bobId]._bobMode && _vm->_objectsMan->_bob[bobId]._frameIndex != 250 &&
+ !_vm->_objectsMan->_bob[bobId]._disabledAnimationFl && xp > _vm->_objectsMan->_bob[bobId]._oldX &&
+ xp < _vm->_objectsMan->_bob[bobId]._oldWidth + _vm->_objectsMan->_bob[bobId]._oldX && yp > _vm->_objectsMan->_bob[bobId]._oldY) {
+ if (yp < _vm->_objectsMan->_bob[bobId]._oldHeight + _vm->_objectsMan->_bob[bobId]._oldY) {
+ if (_zone[bobZoneId]._spriteIndex == -1) {
+ _zone[bobZoneId]._destX = 0;
+ _zone[bobZoneId]._destY = 0;
+ }
+ if (!_zone[bobZoneId]._destX && !_zone[bobZoneId]._destY) {
+ _zone[bobZoneId]._destX = _vm->_objectsMan->_bob[bobId]._oldWidth + _vm->_objectsMan->_bob[bobId]._oldX;
+ _zone[bobZoneId]._destY = _vm->_objectsMan->_bob[bobId]._oldHeight + _vm->_objectsMan->_bob[bobId]._oldY + 6;
+ _zone[bobZoneId]._spriteIndex = -1;
+ }
+ return bobZoneId;
+ }
+ }
+ }
+ _currentSegmentId = 0;
+ for (int squareZoneId = 0; squareZoneId <= 99; squareZoneId++) {
+ if (_zone[squareZoneId]._enabledFl && _squareZone[squareZoneId]._enabledFl
+ && _squareZone[squareZoneId]._left <= xp && _squareZone[squareZoneId]._right >= xp
+ && _squareZone[squareZoneId]._top <= yp && _squareZone[squareZoneId]._bottom >= yp) {
+ if (_squareZone[squareZoneId]._squareZoneFl)
+ return _zoneLine[_squareZone[squareZoneId]._minZoneLineIdx]._bobZoneIdx;
+
+ _segment[_currentSegmentId]._minZoneLineIdx = _squareZone[squareZoneId]._minZoneLineIdx;
+ _segment[_currentSegmentId]._maxZoneLineIdx = _squareZone[squareZoneId]._maxZoneLineIdx;
+ ++_currentSegmentId;
+ }
+ }
+ if (!_currentSegmentId)
+ return -1;
+
+
+ int colRes1 = 0;
+ for (int yCurrent = yp; yCurrent >= 0; --yCurrent) {
+ colRes1 = checkCollision(xp, yCurrent);
+ if (colRes1 != -1 && _zone[colRes1]._enabledFl)
+ break;
+ }
+
+ if (colRes1 == -1)
+ return -1;
+
+ int colRes2 = 0;
+ for (int j = yp; j < _vm->_graphicsMan->_maxY; ++j) {
+ colRes2 = checkCollision(xp, j);
+ if (colRes2 != -1 && _zone[colRes1]._enabledFl)
+ break;
+ }
+
+ if (colRes2 == -1)
+ return -1;
+
+ int colRes3 = 0;
+ for (int k = xp; k >= 0; --k) {
+ colRes3 = checkCollision(k, yp);
+ if (colRes3 != -1 && _zone[colRes1]._enabledFl)
+ break;
+ }
+ if (colRes3 == -1)
+ return -1;
+
+ int colRes4 = 0;
+ for (int xCurrent = xp; _vm->_graphicsMan->_maxX > xCurrent; ++xCurrent) {
+ colRes4 = checkCollision(xCurrent, yp);
+ if (colRes4 != -1 && _zone[colRes1]._enabledFl)
+ break;
+ }
+ if (colRes1 == colRes2 && colRes1 == colRes3 && colRes1 == colRes4)
+ result = colRes1;
+ else
+ result = -1;
+
+ } else {
+ result = 0;
+ }
+ return result;
+}
+
+int LinesManager::checkCollision(int xp, int yp) {
+ if (_currentSegmentId <= 0)
+ return -1;
+
+ int xMax = xp + 4;
+ int xMin = xp - 4;
+
+ for (int idx = 0; idx <= _currentSegmentId; ++idx) {
+ int curZoneLineIdx = _segment[idx]._minZoneLineIdx;
+ if (_segment[idx]._maxZoneLineIdx < curZoneLineIdx)
+ continue;
+
+ int yMax = yp + 4;
+ int yMin = yp - 4;
+
+ do {
+ LigneZoneItem *curZoneLine = &_zoneLine[curZoneLineIdx];
+ int16 *dataP = curZoneLine->_zoneData;
+ if (dataP) {
+ int count = curZoneLine->_count;
+ int startX = dataP[0];
+ int startY = dataP[1];
+ int destX = dataP[count * 2 - 2];
+ int destY = dataP[count * 2 - 1];
+
+ bool flag = true;
+ if ((startX < destX && (xMax < startX || xMin > destX)) ||
+ (startX >= destX && (xMin > startX || xMax < destX)) ||
+ (startY < destY && (yMax < startY || yMin > destY)) ||
+ (startY >= destY && (yMin > startY || yMax < destY)))
+ flag = false;
+
+ if (flag && curZoneLine->_count > 0) {
+ for (int i = 0; i < count; ++i) {
+ int xCheck = *dataP++;
+ int yCheck = *dataP++;
+
+ if ((xp == xCheck || (xp + 1) == xCheck) && (yp == yCheck))
+ return curZoneLine->_bobZoneIdx;
+ }
+ }
+ }
+ } while (++curZoneLineIdx <= _segment[idx]._maxZoneLineIdx);
+ }
+
+ return -1;
+}
+
+// Square Zone
+void LinesManager::initSquareZones() {
+ for (int idx = 0; idx < 100; ++idx) {
+ SquareZoneItem *curZone = &_squareZone[idx];
+ curZone->_enabledFl = false;
+ curZone->_squareZoneFl = false;
+ curZone->_left = 1280;
+ curZone->_right = 0;
+ curZone->_top = 460;
+ curZone->_bottom = 0;
+ curZone->_minZoneLineIdx = 401;
+ curZone->_maxZoneLineIdx = 0;
+ }
+
+ for (int idx = 0; idx < MAX_LINES; ++idx) {
+ int16 *dataP = _zoneLine[idx]._zoneData;
+ if (dataP == NULL)
+ continue;
+
+ SquareZoneItem *curZone = &_squareZone[_zoneLine[idx]._bobZoneIdx];
+ curZone->_enabledFl = true;
+ curZone->_maxZoneLineIdx = MAX(curZone->_maxZoneLineIdx, idx);
+ curZone->_minZoneLineIdx = MIN(curZone->_minZoneLineIdx, idx);
+
+ for (int i = 0; i < _zoneLine[idx]._count; i++) {
+ int zoneX = *dataP++;
+ int zoneY = *dataP++;
+
+ curZone->_left = MIN(curZone->_left, zoneX);
+ curZone->_right = MAX(curZone->_right, zoneX);
+ curZone->_top = MIN(curZone->_top, zoneY);
+ curZone->_bottom = MAX(curZone->_bottom, zoneY);
+ }
+ }
+
+ for (int idx = 0; idx < 100; idx++) {
+ int zoneWidth = abs(_squareZone[idx]._left - _squareZone[idx]._right);
+ int zoneHeight = abs(_squareZone[idx]._top - _squareZone[idx]._bottom);
+ if (zoneWidth == zoneHeight)
+ _squareZone[idx]._squareZoneFl = true;
+ }
+}
+
+void LinesManager::clearAll() {
+ for (int idx = 0; idx < 105; ++idx) {
+ _zone[idx]._destX = 0;
+ _zone[idx]._destY = 0;
+ _zone[idx]._spriteIndex = 0;
+ }
+
+ _testRoute0 = NULL;
+ _testRoute1 = NULL;
+ _testRoute2 = NULL;
+ _lineBuf = NULL;
+ _route = NULL;
+
+ for (int idx = 0; idx < MAX_LINES; ++idx) {
+ _lineItem[idx]._lineDataEndIdx = 0;
+ _lineItem[idx]._direction = DIR_NONE;
+ _lineItem[idx]._directionRouteInc = DIR_NONE;
+ _lineItem[idx]._directionRouteDec = DIR_NONE;
+ _lineItem[idx]._lineData = NULL;
+
+ _zoneLine[idx]._count = 0;
+ _zoneLine[idx]._bobZoneIdx = 0;
+ _zoneLine[idx]._zoneData = NULL;
+ }
+
+ for (int idx = 0; idx < 100; ++idx)
+ _squareZone[idx]._enabledFl = false;
+
+ _testRoute0 = new RouteItem[8334];
+ _testRoute1 = new RouteItem[8334];
+ _testRoute2 = new RouteItem[8334];
+ if (!_testRoute0)
+ _testRoute0 = NULL;
+ if (!_testRoute1)
+ _testRoute1 = NULL;
+ if (!_testRoute2)
+ _testRoute2 = NULL;
+
+ _largeBuf = _vm->_globals->allocMemory(10000);
+ _lineBuf = (int16 *)(_largeBuf);
+}
+
+/**
+ * Clear all zones and reset nextLine
+ */
+void LinesManager::clearAllZones() {
+ for (int idx = 0; idx < MAX_LINES; ++idx)
+ removeZoneLine(idx);
+}
+
+/**
+ * Remove Zone Line
+ */
+void LinesManager::removeZoneLine(int idx) {
+ assert (idx <= MAX_LINES);
+ _zoneLine[idx]._zoneData = (int16 *)_vm->_globals->freeMemory((byte *)_zoneLine[idx]._zoneData);
+}
+
+void LinesManager::resetLines() {
+ for (int idx = 0; idx < MAX_LINES; ++idx) {
+ removeLine(idx);
+ _lineItem[idx]._lineDataEndIdx = 0;
+ _lineItem[idx]._lineData = NULL;
+ }
+}
+
+// Remove Line
+void LinesManager::removeLine(int idx) {
+ if (idx > MAX_LINES)
+ error("Attempting to add a line obstacle > MAX_LIGNE.");
+ _lineItem[idx]._lineData = (int16 *)_vm->_globals->freeMemory((byte *)_lineItem[idx]._lineData);
+}
+
+void LinesManager::setMaxLineIdx(int idx) {
+ _maxLineIdx = idx;
+}
+
+void LinesManager::resetLastLine() {
+ _lastLine = 0;
+}
+
+void LinesManager::resetLinesNumb() {
+ _linesNumb = 0;
+}
+
+void LinesManager::enableZone(int idx) {
+ if (_bobZone[idx]) {
+ _bobZoneFl[idx] = true;
+ } else {
+ _zone[idx]._enabledFl = true;
+ }
+}
+
+void LinesManager::disableZone(int idx) {
+ if (_bobZone[idx]) {
+ _bobZoneFl[idx] = false;
+ } else {
+ _zone[idx]._enabledFl = false;
+ }
+}
+
+void LinesManager::checkZone() {
+ int mouseX = _vm->_events->getMouseX();
+ int mouseY = _vm->_events->getMouseY();
+ int oldMouseY = mouseY;
+ if (_vm->_globals->_cityMapEnabledFl
+ || _vm->_events->_startPos.x >= mouseX
+ || (mouseY = _vm->_graphicsMan->_scrollOffset + 54, mouseX >= mouseY)
+ || (mouseY = oldMouseY - 1, mouseY < 0 || mouseY > 59)) {
+ if (_vm->_objectsMan->_visibleFl)
+ _vm->_objectsMan->_eraseVisibleCounter = 4;
+ _vm->_objectsMan->_visibleFl = false;
+ } else {
+ _vm->_objectsMan->_visibleFl = true;
+ }
+ if (_vm->_objectsMan->_forceZoneFl) {
+ _zoneSkipCount = 100;
+ _oldMouseZoneId = -1;
+ _oldMouseX = -200;
+ _oldMouseY = -220;
+ _vm->_objectsMan->_forceZoneFl = false;
+ }
+
+ _zoneSkipCount++;
+ if (_zoneSkipCount <= 1)
+ return;
+
+ if (_vm->_globals->_freezeCharacterFl || (_route == NULL) || _zoneSkipCount > 4) {
+ _zoneSkipCount = 0;
+ int zoneId;
+ if (_oldMouseX != mouseX || _oldMouseY != oldMouseY) {
+ zoneId = getMouseZone();
+ } else {
+ zoneId = _oldMouseZoneId;
+ }
+ if (_oldMouseZoneId != zoneId) {
+ _vm->_graphicsMan->setColorPercentage2(251, 100, 100, 100);
+ _vm->_events->_mouseCursorId = 4;
+ _vm->_events->changeMouseCursor(4);
+ if (_forceHideText) {
+ _vm->_fontMan->hideText(5);
+ _forceHideText = false;
+ return;
+ }
+ }
+ if (zoneId != -1) {
+ if (_zone[zoneId]._verbFl1 || _zone[zoneId]._verbFl2 ||
+ _zone[zoneId]._verbFl3 || _zone[zoneId]._verbFl4 ||
+ _zone[zoneId]._verbFl5 || _zone[zoneId]._verbFl6 ||
+ _zone[zoneId]._verbFl7 || _zone[zoneId]._verbFl8 ||
+ _zone[zoneId]._verbFl9 || _zone[zoneId]._verbFl10) {
+ if (_oldMouseZoneId != zoneId) {
+ _vm->_fontMan->initTextBuffers(5, _zone[zoneId]._messageId, _vm->_globals->_zoneFilename, 0, 430, 0, 0, 252);
+ _vm->_fontMan->showText(5);
+ _forceHideText = true;
+ }
+ _hotspotTextColor += 25;
+ if (_hotspotTextColor > 100)
+ _hotspotTextColor = 0;
+ _vm->_graphicsMan->setColorPercentage2(251, _hotspotTextColor, _hotspotTextColor, _hotspotTextColor);
+ if (_vm->_events->_mouseCursorId == 4) {
+ if (_zone[zoneId]._verbFl1 == 2) {
+ _vm->_events->changeMouseCursor(16);
+ _vm->_events->_mouseCursorId = 16;
+ _vm->_objectsMan->setVerb(16);
+ }
+ }
+ } else {
+ _vm->_graphicsMan->setColorPercentage2(251, 100, 100, 100);
+ _vm->_events->_mouseCursorId = 4;
+ _vm->_events->changeMouseCursor(4);
+ }
+ }
+ _vm->_objectsMan->_zoneNum = zoneId;
+ _oldMouseX = mouseX;
+ _oldMouseY = oldMouseY;
+ _oldMouseZoneId = zoneId;
+ if (_vm->_globals->_freezeCharacterFl && (_vm->_events->_mouseCursorId == 4)) {
+ if (zoneId != -1 && zoneId != 0)
+ _vm->_objectsMan->handleRightButton();
+ }
+ if ((_vm->_globals->_cityMapEnabledFl && zoneId == -1) || !zoneId) {
+ _vm->_objectsMan->setVerb(0);
+ _vm->_events->_mouseCursorId = 0;
+ _vm->_events->changeMouseCursor(0);
+ }
+ }
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/lines.h b/engines/hopkins/lines.h
new file mode 100644
index 0000000000..9e397cca3d
--- /dev/null
+++ b/engines/hopkins/lines.h
@@ -0,0 +1,196 @@
+/* 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 HOPKINS_LINES_H
+#define HOPKINS_LINES_H
+
+#include "hopkins/globals.h"
+
+#include "common/scummsys.h"
+#include "common/str.h"
+
+namespace Hopkins {
+
+class HopkinsEngine;
+
+struct LigneZoneItem {
+ int _count;
+ int _bobZoneIdx;
+ int16 *_zoneData;
+};
+
+#define INVALID_LINE_VALUE 1300
+
+struct RouteItem;
+
+struct LigneItem {
+ int _lineDataEndIdx;
+ Directions _direction;
+ Directions _directionRouteInc;
+ Directions _directionRouteDec;
+ int16 *_lineData;
+
+ int appendToRouteInc(int from, int to, RouteItem *route, int index);
+ int appendToRouteDec(int from, int to, RouteItem *route, int index);
+};
+
+struct SmoothItem {
+ int _posX;
+ int _posY;
+};
+
+struct SegmentItem {
+ int _minZoneLineIdx;
+ int _maxZoneLineIdx;
+};
+
+struct SquareZoneItem {
+ bool _enabledFl;
+ int _left;
+ int _right;
+ int _top;
+ int _bottom;
+ int _minZoneLineIdx;
+ int _maxZoneLineIdx;
+ bool _squareZoneFl;
+};
+
+struct ZoneItem {
+ int _destX;
+ int _destY;
+ int _spriteIndex;
+ int _verbFl1;
+ int _verbFl2;
+ int _verbFl3;
+ int _verbFl4;
+ int _verbFl5;
+ int _verbFl6;
+ int _verbFl7;
+ int _verbFl8;
+ int _verbFl9;
+ int _verbFl10;
+ bool _enabledFl;
+ int _messageId;
+};
+
+struct RouteItem {
+ int16 _x;
+ int16 _y;
+ Directions _dir;
+ bool isValid() const { return _x != -1 || _y != -1; }
+ void invalidate() { _x = _y = -1; _dir = DIR_NONE; }
+ void set(int16 X, int16 Y, Directions dir) { _x = X; _y = Y; _dir = dir; }
+};
+
+
+class LinesManager {
+private:
+ HopkinsEngine *_vm;
+
+ bool _forceHideText;
+ int _hotspotTextColor;
+ int _pathFindingMaxDepth;
+ SmoothItem _smoothRoute[4000];
+ Directions _smoothMoveDirection;
+ LigneZoneItem _zoneLine[401];
+ SegmentItem _segment[101];
+ SquareZoneItem _squareZone[101];
+ int _currentSegmentId;
+ int _maxLineIdx;
+ int _lastLine;
+ int _linesNumb;
+ int _newLineIdx;
+ int _newLineDataIdx;
+ int _newRouteIdx;
+ int _newPosX;
+ int _newPosY;
+ int _oldMouseX, _oldMouseY;
+ int _oldRouteFromX;
+ int _oldRouteFromY;
+ int _oldRouteDestX;
+ int _oldRouteDestY;
+ int _oldZoneNum;
+
+ byte *_largeBuf;
+ RouteItem *_testRoute0;
+ RouteItem *_testRoute1;
+ int16 *_lineBuf;
+ LigneItem _lineItem[400];
+ RouteItem _bestRoute[8001];
+ int _zoneSkipCount;
+ int _oldMouseZoneId;
+
+ int avoidObstacle(int lineIdx, int lineDataIdx, int routeIdx, int destLineIdx, int destLineDataIdx, RouteItem *route);
+ int avoidObstacleOnSegment(int lineIdx, int lineDataIdx, int routeIdx, int destLineIdx, int destLineDataIdx, RouteItem *route, int startLineIdx, int endLineIdx);
+ int checkInventoryHotspotsRow(int posX, int minZoneNum, bool lastRow);
+ void removeZoneLine(int idx);
+ void removeLine(int idx);
+ int checkCollision(int xp, int yp);
+ bool checkCollisionLine(int xp, int yp, int *foundDataIdx, int *foundLineIdx, int startLineIdx, int endLineIdx);
+ bool checkSmoothMove(int fromX, int fromY, int destX, int destY);
+ bool makeSmoothMove(int fromX, int fromY, int destX, int destY);
+ int characterRoute(int fromX, int fromY, int destX, int destY, int startLineIdx, int endLineIdx, int routeIdx);
+ int testLine(int paramX, int paramY, int *testValue, int *foundLineIdx, int *foundDataIdx);
+ void useRoute0(int idx, int curRouteIdx);
+ void useRoute1(int idx, int curRouteIdx);
+ void useRoute2(int idx, int curRouteIdx);
+ int computeYSteps(int idx);
+ int computeRouteIdx(int lineIdx, int dataIdx, int fromX, int fromY, int destX, int destY, int routerIdx, RouteItem *route);
+
+ bool MIRACLE(int fromX, int fromY, int lineIdx, int destLineIdx, int routeIdx);
+ bool PLAN_TEST(int paramX, int paramY, int superRouteIdx, int paramStartLineIdx, int paramEndLineIdx);
+
+public:
+ RouteItem *_route;
+ RouteItem *_testRoute2;
+
+ int _bobZone[105];
+ bool _bobZoneFl[105];
+ ZoneItem _zone[106];
+
+ LinesManager(HopkinsEngine *vm);
+ ~LinesManager();
+ void clearAll();
+
+ void setMaxLineIdx(int idx);
+ int checkInventoryHotspots(int posX, int posY);
+ void addZoneLine(int idx, int fromX, int fromY, int destX, int destY, int bobZoneIdx);
+ void loadLines(const Common::String &file);
+ void addLine(int lineIdx, Directions direction, int fromX, int fromY, int destX, int destY);
+ void initRoute();
+ RouteItem *findRoute(int fromX, int fromY, int destX, int destY);
+ RouteItem *cityMapCarRoute(int x1, int y1, int x2, int y2);
+ void clearAllZones();
+ void initSquareZones();
+ void resetLines();
+ void resetLinesNumb();
+ void resetLastLine();
+ void enableZone(int idx);
+ void disableZone(int idx);
+ void checkZone();
+ int getMouseZone();
+ void optimizeRoute(RouteItem *route);
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_FONT_H */
diff --git a/engines/hopkins/menu.cpp b/engines/hopkins/menu.cpp
new file mode 100644
index 0000000000..01aa84e4ed
--- /dev/null
+++ b/engines/hopkins/menu.cpp
@@ -0,0 +1,168 @@
+/* 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 "hopkins/menu.h"
+
+#include "hopkins/dialogs.h"
+#include "hopkins/files.h"
+#include "hopkins/hopkins.h"
+#include "hopkins/globals.h"
+#include "hopkins/events.h"
+#include "hopkins/graphics.h"
+#include "hopkins/sound.h"
+
+#include "common/scummsys.h"
+#include "common/events.h"
+#include "common/file.h"
+#include "common/util.h"
+
+namespace Hopkins {
+
+enum MenuSelection { MENU_NONE = 0, PLAY_GAME = 1, LOAD_GAME = 2, OPTIONS = 3, INTRODUCTION = 4, QUIT = 5 };
+
+MenuManager::MenuManager(HopkinsEngine *vm) {
+ _vm = vm;
+}
+
+int MenuManager::menu() {
+ byte *spriteData = NULL;
+ MenuSelection menuIndex;
+ Common::Point mousePos;
+ signed int result;
+ int frameIndex[] = { 0, 0, 0, 0, 0 };
+
+ if (g_system->getEventManager()->shouldQuit())
+ return -1;
+
+ result = 0;
+ while (!g_system->getEventManager()->shouldQuit()) {
+ _vm->_objectsMan->_forestFl = false;
+ _vm->_events->_breakoutFl = false;
+ _vm->_globals->_disableInventFl = true;
+ _vm->_globals->_exitId = 0;
+
+ for (int idx = 0; idx < 31; ++idx)
+ _vm->_globals->_inventory[idx] = 0;
+
+ memset(_vm->_globals->_saveData, 0, 2000);
+ _vm->_objectsMan->addObject(14);
+ memset(frameIndex, 0, sizeof(int) * ARRAYSIZE(frameIndex));
+
+ if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS)
+ _vm->_graphicsMan->loadImage("MENU");
+ else if (_vm->_globals->_language == LANG_EN)
+ _vm->_graphicsMan->loadImage("MENUAN");
+ else if (_vm->_globals->_language == LANG_FR)
+ _vm->_graphicsMan->loadImage("MENUFR");
+ else if (_vm->_globals->_language == LANG_SP)
+ _vm->_graphicsMan->loadImage("MENUES");
+
+ _vm->_graphicsMan->fadeInLong();
+
+ if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS)
+ spriteData = _vm->_objectsMan->loadSprite("MENU.SPR");
+ else if (_vm->_globals->_language == LANG_EN)
+ spriteData = _vm->_objectsMan->loadSprite("MENUAN.SPR");
+ else if (_vm->_globals->_language == LANG_FR)
+ spriteData = _vm->_objectsMan->loadSprite("MENUFR.SPR");
+ else if (_vm->_globals->_language == LANG_SP)
+ spriteData = _vm->_objectsMan->loadSprite("MENUES.SPR");
+
+ _vm->_events->mouseOn();
+ _vm->_events->changeMouseCursor(0);
+ _vm->_events->_mouseCursorId = 0;
+ _vm->_events->_mouseSpriteId = 0;
+
+ _vm->_soundMan->playSound(28);
+
+ // Loop to make menu selection
+ bool selectionMade = false;
+ do {
+ if (g_system->getEventManager()->shouldQuit())
+ return -1;
+
+ menuIndex = MENU_NONE;
+ mousePos = Common::Point(_vm->_events->getMouseX(), _vm->_events->getMouseY());
+
+ if (mousePos.x >= 232 && mousePos.x <= 408) {
+ if (mousePos.y >= 261 && mousePos.y <= 284)
+ menuIndex = PLAY_GAME;
+ else if (mousePos.y >= 293 && mousePos.y <= 316)
+ menuIndex = LOAD_GAME;
+ else if (mousePos.y >= 325 && mousePos.y <= 347)
+ menuIndex = OPTIONS;
+ else if (mousePos.y >= 356 && mousePos.y <= 379)
+ menuIndex = INTRODUCTION;
+ else if (mousePos.y >= 388 && mousePos.y <= 411)
+ menuIndex = QUIT;
+ }
+
+ memset(frameIndex, 0, sizeof(int) * ARRAYSIZE(frameIndex));
+ if (menuIndex > MENU_NONE)
+ frameIndex[menuIndex - 1] = 1;
+
+ _vm->_graphicsMan->fastDisplay(spriteData, 230, 259, frameIndex[0]);
+ _vm->_graphicsMan->fastDisplay(spriteData, 230, 291, frameIndex[1] + 2);
+ _vm->_graphicsMan->fastDisplay(spriteData, 230, 322, frameIndex[2] + 4);
+ _vm->_graphicsMan->fastDisplay(spriteData, 230, 354, frameIndex[3] + 6);
+ _vm->_graphicsMan->fastDisplay(spriteData, 230, 386, frameIndex[4] + 8);
+ _vm->_events->refreshScreenAndEvents();
+
+ if (_vm->_events->getMouseButton() == 1 && menuIndex != MENU_NONE)
+ selectionMade = true;
+ } while (!selectionMade);
+
+ if (menuIndex > MENU_NONE) {
+ _vm->_graphicsMan->fastDisplay(spriteData, 230, 259 + 32 * (menuIndex - 1), 10 + (menuIndex - 1));
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_events->delay(200);
+ }
+
+ if (menuIndex == PLAY_GAME) {
+ result = 1;
+ break;
+ } else if (menuIndex == LOAD_GAME) {
+ _vm->_globals->_exitId = -1;
+ _vm->_dialog->showLoadGame();
+
+ if (_vm->_globals->_exitId != -1) {
+ result = _vm->_globals->_exitId;
+ break;
+ }
+ _vm->_globals->_exitId = 0;
+ } else if (menuIndex == OPTIONS) {
+ _vm->_dialog->showOptionsDialog();
+ } else if (menuIndex == INTRODUCTION) {
+ _vm->playIntro();
+ } else if (menuIndex == QUIT) {
+ result = -1;
+ break;
+ }
+ }
+
+ _vm->_globals->freeMemory(spriteData);
+ _vm->_globals->_disableInventFl = false;
+ _vm->_graphicsMan->fadeOutLong();
+ return result;
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/menu.h b/engines/hopkins/menu.h
new file mode 100644
index 0000000000..e926c29dbd
--- /dev/null
+++ b/engines/hopkins/menu.h
@@ -0,0 +1,46 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef HOPKINS_MENU_H
+#define HOPKINS_MENU_H
+
+#include "common/scummsys.h"
+#include "common/system.h"
+#include "common/error.h"
+
+namespace Hopkins {
+
+class HopkinsEngine;
+
+class MenuManager {
+private:
+ HopkinsEngine *_vm;
+
+public:
+ MenuManager(HopkinsEngine *vm);
+
+ int menu();
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_MENU_H */
diff --git a/engines/hopkins/module.mk b/engines/hopkins/module.mk
new file mode 100644
index 0000000000..5c1a7dd478
--- /dev/null
+++ b/engines/hopkins/module.mk
@@ -0,0 +1,29 @@
+MODULE := engines/hopkins
+
+MODULE_OBJS := \
+ anim.o \
+ computer.o \
+ debugger.o \
+ detection.o \
+ dialogs.o \
+ events.o \
+ files.o \
+ font.o \
+ graphics.o \
+ globals.o \
+ hopkins.o \
+ lines.o \
+ menu.o \
+ objects.o \
+ saveload.o \
+ script.o \
+ sound.o \
+ talk.o
+
+# This module can be built as a plugin
+ifeq ($(ENABLE_HOPKINS), DYNAMIC_PLUGIN)
+PLUGIN := 1
+endif
+
+# Include common rules
+include $(srcdir)/rules.mk
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
new file mode 100644
index 0000000000..a37295cf0e
--- /dev/null
+++ b/engines/hopkins/objects.cpp
@@ -0,0 +1,4058 @@
+/* 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 "hopkins/objects.h"
+
+#include "hopkins/dialogs.h"
+#include "hopkins/files.h"
+#include "hopkins/globals.h"
+#include "hopkins/hopkins.h"
+
+#include "common/system.h"
+#include "graphics/palette.h"
+#include "common/file.h"
+#include "common/rect.h"
+#include "engines/util.h"
+
+namespace Hopkins {
+
+ObjectsManager::ObjectsManager(HopkinsEngine *vm) {
+ _vm = vm;
+
+ for (int i = 0; i < 6; ++i)
+ Common::fill((byte *)&_sprite[i], (byte *)&_sprite[i] + sizeof(SpriteItem), 0);
+
+ for (int i = 0; i < 36; ++i)
+ Common::fill((byte *)&_bob[i], (byte *)&_bob[i] + sizeof(BobItem), 0);
+
+ for (int i = 0; i < 30; ++i) {
+ Common::fill((byte *)&VBob[i], (byte *)&VBob[i] + sizeof(VBobItem), 0);
+ Common::fill((byte *)&_lockedAnims[i], (byte *)&_lockedAnims[i] + sizeof(LockAnimItem), 0);
+ }
+
+ for (int i = 0; i < 300; ++i)
+ Common::fill((byte *)&_objectAuthIcons[i], (byte *)&_objectAuthIcons[i] + sizeof(ObjectAuthIcon), 0);
+
+ _sortedDisplayCount = 0;
+ for (int i = 0; i < 51; ++i)
+ Common::fill((byte *)&_sortedDisplay[i], (byte *)&_sortedDisplay[i] + sizeof(SortItem), 0);
+
+ for (int i = 0; i < 25; ++i)
+ Common::fill((byte *)&_hidingItem[i], (byte *)&_hidingItem[i] + sizeof(HidingItem), 0);
+
+ for (int i = 0; i < 6; ++i)
+ _hidingItemData[i] = NULL;
+
+ for (int i = 0; i < 6; ++i)
+ Common::fill((byte *)&Liste[i], (byte *)&Liste[i] + sizeof(ListeItem), 0);
+
+ for (int i = 0; i < 35; ++i)
+ Common::fill((byte *)&Liste2[i], (byte *)&Liste2[i] + sizeof(ListeItem), 0);
+
+ _helicopterFl = false;
+ _priorityFl = false;
+ _oldBorderPos = Common::Point(0, 0);
+ _oldBorderSpriteIndex = 0;
+ _borderPos = Common::Point(0, 0);
+ _borderSpriteIndex = 0;
+ _saveLoadX = _saveLoadY = 0;
+ _oldCharacterPosX = _oldCharacterPosY = 0;
+ _eraseVisibleCounter = 0;
+ _saveLoadSprite = NULL;
+ _saveLoadSprite2 = NULL;
+ _spritePtr = NULL;
+ _oldSpriteData = NULL;
+ _saveLoadFl = false;
+ _visibleFl = false;
+ _zoneNum = 0;
+ _forceZoneFl = false;
+ _changeVerbFl = false;
+ _verb = 0;
+ _changeHeadFl = false;
+ _disableFl = false;
+ _twoCharactersFl = false;
+ _characterPos = Common::Point(0, 0);
+ _startSpriteIndex = 0;
+ _jumpVerb = 0;
+ _jumpZone = 0;
+ _oldSpriteIndex = 0;
+ _oldFrameIndex = 0;
+ _oldFlipFl = false;
+ _curObjectIndex = 0;
+ _forestFl = false;
+ _mapCarPosX = _mapCarPosY = 0;
+ _forestSprite = NULL;
+ _gestureBuf = NULL;
+ _curGestureFile = 0;
+ _headSprites = NULL;
+ _homeRateCounter = 0;
+ _lastDirection = DIR_NONE;
+ _oldDirection = DIR_NONE;
+ _oldDirectionSpriteIdx = 59;
+ _objectWidth = _objectHeight = 0;
+ _hidingActiveFl = false;
+ _curObjectFileNum = 0;
+ _objectDataBuf = NULL;
+ _charactersEnabledFl = false;
+ _refreshBobMode10Fl = false;
+}
+
+ObjectsManager::~ObjectsManager() {
+ _vm->_globals->freeMemory(_forestSprite);
+ _vm->_globals->freeMemory(_gestureBuf);
+ _vm->_globals->freeMemory(_headSprites);
+ _vm->_globals->freeMemory(_objectDataBuf);
+ clearVBob();
+
+ for (int idx = 0; idx < 6; ++idx)
+ _hidingItemData[idx] = _vm->_globals->freeMemory(_hidingItemData[idx]);
+}
+
+void ObjectsManager::clearAll() {
+ _forestFl = false;
+ _forestSprite = _vm->_globals->freeMemory(_forestSprite);
+ _curGestureFile = 0;
+ _gestureBuf = _vm->_globals->freeMemory(_gestureBuf);
+ _curObjectFileNum = 0;
+
+ for (int idx = 0; idx < 6; ++idx)
+ _hidingItemData[idx] = _vm->_globals->freeMemory(_hidingItemData[idx]);
+
+ _objectDataBuf = _vm->_globals->freeMemory(_objectDataBuf);
+ initVBob();
+}
+
+// Load Object
+void ObjectsManager::loadObjects() {
+ byte *data = _vm->_fileIO->loadFile("OBJET.DAT");
+ byte *srcP = data;
+
+ for (int idx = 0; idx < 300; ++idx) {
+ ObjectAuthIcon *objectAuthIcon = &_objectAuthIcons[idx];
+ objectAuthIcon->_objectFileNum = *srcP++;
+ objectAuthIcon->_idx = *srcP++;
+ objectAuthIcon->_flag1 = *srcP++;
+ objectAuthIcon->_flag2 = *srcP++;
+ objectAuthIcon->_flag3 = *srcP++;
+ objectAuthIcon->_flag4 = *srcP++;
+ objectAuthIcon->_flag5 = *srcP++;
+ objectAuthIcon->_flag6 = *srcP++;
+ }
+
+ _vm->_globals->freeMemory(data);
+}
+
+// Reset Hiding Items
+void ObjectsManager::resetHidingItems() {
+ for (int idx = 1; idx <= 5; ++idx) {
+ _hidingItemData[idx] = _vm->_globals->freeMemory(_hidingItemData[idx]);
+ }
+
+ for (int idx = 0; idx <= 20; ++idx) {
+ HidingItem *hid = &_hidingItem[idx];
+ hid->_spriteData = NULL;
+ hid->_x = 0;
+ hid->_y = 0;
+ hid->_spriteIndex = 0;
+ hid->_useCount = 0;
+ hid->_width = 0;
+ hid->_height = 0;
+ hid->_resetUseCount = false;
+ hid->_yOffset = 0;
+ }
+
+ _hidingActiveFl = false;
+}
+
+/**
+ * Change Object
+ */
+void ObjectsManager::changeObject(int objIndex) {
+ _vm->_events->_objectBuf = loadObjectFromFile(objIndex, true);
+ _curObjectIndex = objIndex;
+}
+
+byte *ObjectsManager::loadObjectFromFile(int objIndex, bool mode) {
+ byte *dataP = NULL;
+ int objectFileNum = _objectAuthIcons[objIndex]._objectFileNum;
+ int idx = _objectAuthIcons[objIndex]._idx;
+
+ if (mode)
+ ++idx;
+
+ if (objectFileNum != _curObjectFileNum) {
+ if (_objectDataBuf)
+ removeObjectDataBuf();
+ if (objectFileNum == 1) {
+ _objectDataBuf = loadSprite("OBJET1.SPR");
+ }
+ _curObjectFileNum = objectFileNum;
+ }
+
+ int width = getWidth(_objectDataBuf, idx);
+ int height = getHeight(_objectDataBuf, idx);
+ _objectWidth = width;
+ _objectHeight = height;
+
+ if (mode) {
+ sprite_alone(_objectDataBuf, _vm->_events->_objectBuf, idx);
+ dataP = _vm->_events->_objectBuf;
+ } else {
+ dataP = _vm->_globals->allocMemory(height * width);
+ if (dataP == NULL)
+ error("CAPTURE_OBJET");
+
+ capture_mem_sprite(_objectDataBuf, dataP, idx);
+ }
+
+ return dataP;
+}
+
+/**
+ * Remove an Object from the inventory
+ */
+void ObjectsManager::removeObject(int objIndex) {
+ int idx;
+ for (idx = 1; idx <= 32; ++idx) {
+ if (_vm->_globals->_inventory[idx] == objIndex)
+ break;
+ }
+
+ if (idx <= 32) {
+ if (idx == 32) {
+ _vm->_globals->_inventory[32] = 0;
+ } else {
+ for (int i = idx; i < 32; ++i)
+ _vm->_globals->_inventory[i] = _vm->_globals->_inventory[i + 1];
+ }
+ }
+ changeObject(14);
+
+}
+
+/**
+ * Set Offset XY
+ */
+void ObjectsManager::setOffsetXY(byte *data, int idx, int xp, int yp, bool isSize) {
+ byte *startP = data + 3;
+ for (int i = idx; i; --i)
+ startP += READ_LE_UINT32(startP) + 16;
+
+ byte *rectP = startP + 8;
+ if (isSize) {
+ // Set size
+ byte *pointP = rectP + 4;
+ WRITE_LE_UINT16(pointP, xp);
+ WRITE_LE_UINT16(pointP + 2, yp);
+ } else {
+ // Set position
+ WRITE_LE_UINT16(rectP, xp);
+ WRITE_LE_UINT16(rectP + 2, yp);
+ }
+}
+
+int ObjectsManager::getOffsetX(const byte *spriteData, int spriteIndex, bool isSize) {
+ const byte *data = spriteData + 3;
+ for (int i = spriteIndex; i; --i)
+ data += READ_LE_UINT32(data) + 16;
+
+ int result;
+ if (isSize)
+ result = READ_LE_INT16(data + 12);
+ else
+ result = READ_LE_INT16(data + 8);
+
+ return result;
+}
+
+int ObjectsManager::getOffsetY(const byte *spriteData, int spriteIndex, bool isSize) {
+ const byte *data = spriteData + 3;
+ for (int i = spriteIndex; i; --i)
+ data += READ_LE_UINT32(data) + 16;
+
+ int result;
+ if (isSize)
+ result = READ_LE_INT16(data + 14);
+ else
+ result = READ_LE_INT16(data + 10);
+
+ return result;
+}
+
+/**
+ * Get Width
+ */
+int ObjectsManager::getWidth(const byte *objectData, int idx) {
+ const byte *rectP = objectData + 3;
+ for (int i = idx; i; --i)
+ rectP += READ_LE_UINT32(rectP) + 16;
+
+ return READ_LE_INT16(rectP + 4);
+}
+
+/**
+ * Get height
+ */
+int ObjectsManager::getHeight(const byte *objectData, int idx) {
+ const byte *rectP = objectData + 3;
+ for (int i = idx; i; --i)
+ rectP += READ_LE_UINT32(rectP) + 16;
+
+ return READ_LE_INT16(rectP + 6);
+}
+
+void ObjectsManager::sprite_alone(const byte *objectData, byte *sprite, int objIndex) {
+ const byte *objP = objectData + 3;
+ for (int i = objIndex; i; --i) {
+ objP += READ_LE_UINT32(objP) + 16;
+ }
+
+ objP += 4;
+ int result = READ_LE_INT16(objP) * READ_LE_INT16(objP + 2);
+
+ memcpy(sprite + 3, objP - 4, result + 16);
+}
+
+void ObjectsManager::capture_mem_sprite(const byte *objectData, byte *sprite, int objIndex) {
+ const byte *objP = objectData + 3;
+ for (int i = objIndex; i; --i) {
+ objP += READ_LE_UINT32(objP) + 16;
+ }
+
+ objP += 4;
+ int result = READ_LE_INT16(objP) * READ_LE_INT16(objP + 2);
+ memcpy(sprite, objP + 12, result);
+}
+
+void ObjectsManager::removeObjectDataBuf() {
+ _curObjectFileNum = 0;
+ _objectDataBuf = _vm->_globals->freeMemory(_objectDataBuf);
+}
+
+/**
+ * Load Sprite from file
+ */
+byte *ObjectsManager::loadSprite(const Common::String &file) {
+ return _vm->_fileIO->loadFile(file);
+}
+
+/**
+ * Add Object
+ */
+void ObjectsManager::addObject(int objIndex) {
+ int arrIndex = 0;
+ for (;;) {
+ ++arrIndex;
+ if ((!_vm->_globals->_inventory[arrIndex]) || (arrIndex == 32))
+ break;
+ }
+
+ _vm->_globals->_inventory[arrIndex] = objIndex;
+}
+
+/**
+ * Display Sprite
+ */
+void ObjectsManager::displaySprite() {
+ int clipX;
+ int clipY;
+ bool loopCondFl;
+ uint16 arr[50];
+
+ // Handle copying any background areas that text are going to be drawn on
+ _sortedDisplayCount = 0;
+ for (int idx = 0; idx <= 10; ++idx) {
+ TxtItemList *curTxtList = &_vm->_fontMan->_textList[idx];
+ if (curTxtList->_enabledFl && _vm->_fontMan->_text[idx]._textType != 2) {
+ clipX = curTxtList->_pos.x - 2;
+
+ if (clipX < _vm->_graphicsMan->_minX)
+ clipX = _vm->_graphicsMan->_minX;
+
+ clipY = curTxtList->_pos.y - 2;
+ if (clipY < _vm->_graphicsMan->_minY)
+ clipY = _vm->_graphicsMan->_minY;
+
+ _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, clipX, clipY,
+ curTxtList->_width + 4, curTxtList->_height + 4, _vm->_graphicsMan->_frontBuffer, clipX, clipY);
+ curTxtList->_enabledFl = false;
+ }
+ }
+
+ if (!_charactersEnabledFl) {
+ for (int idx = 0; idx < MAX_SPRITE; ++idx) {
+ ListeItem *curList = &Liste[idx];
+ if (curList->_visibleFl) {
+ clipX = curList->_posX - 2;
+ if (clipX < _vm->_graphicsMan->_minX)
+ clipX = _vm->_graphicsMan->_minX;
+
+ clipY = curList->_posY - 2;
+ if (clipY < _vm->_graphicsMan->_minY)
+ clipY = _vm->_graphicsMan->_minY;
+
+ _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, clipX, clipY,
+ curList->_width + 4, curList->_height + 4, _vm->_graphicsMan->_frontBuffer, clipX, clipY);
+ curList->_visibleFl = false;
+ }
+ }
+ }
+
+ displayBobAnim();
+ displayVBob();
+
+ if (!_charactersEnabledFl) {
+ // Handle drawing characters on the screen
+ for (int idx = 0; idx < MAX_SPRITE; ++idx) {
+ Liste[idx]._visibleFl = false;
+ SpriteItem *curSpr = &_sprite[idx];
+ if (curSpr->_animationType == 1) {
+ computeSprite(idx);
+ if (curSpr->_activeFl)
+ beforeSort(SORT_SPRITE, idx, curSpr->_height + curSpr->_destY);
+ }
+ }
+
+ if (_hidingActiveFl)
+ checkHidingItem();
+ }
+
+ if (_priorityFl && _sortedDisplayCount) {
+ for (int i = 1; i <= 48; i++)
+ arr[i] = i;
+
+ do {
+ loopCondFl = false;
+ for (int sortIdx = 1; sortIdx < _sortedDisplayCount; sortIdx++) {
+ if (_sortedDisplay[arr[sortIdx]]._priority > _sortedDisplay[arr[sortIdx + 1]]._priority) {
+ SWAP(arr[sortIdx], arr[sortIdx + 1]);
+ loopCondFl = true;
+ }
+ }
+ } while (loopCondFl);
+
+ for (int sortIdx = 1; sortIdx < _sortedDisplayCount + 1; sortIdx++) {
+ int idx = arr[sortIdx];
+ switch (_sortedDisplay[idx]._sortMode) {
+ case SORT_BOB:
+ setBobInfo(_sortedDisplay[idx]._index);
+ break;
+ case SORT_SPRITE:
+ showSprite(_sortedDisplay[idx]._index);
+ break;
+ case SORT_HIDING:
+ displayHiding(_sortedDisplay[idx]._index);
+ break;
+ default:
+ break;
+ }
+ _sortedDisplay[idx]._sortMode = SORT_NONE;
+ }
+ } else {
+ for (int idx = 1; idx < _sortedDisplayCount + 1; ++idx) {
+ switch (_sortedDisplay[idx]._sortMode) {
+ case SORT_BOB:
+ setBobInfo(_sortedDisplay[idx]._index);
+ break;
+ case SORT_SPRITE:
+ showSprite(_sortedDisplay[idx]._index);
+ break;
+ case SORT_HIDING:
+ displayHiding(_sortedDisplay[idx]._index);
+ break;
+ default:
+ break;
+ }
+ _sortedDisplay[idx]._sortMode = SORT_NONE;
+ }
+ }
+
+ // Reset the Sort array
+ for (int idx = 0; idx < 50; ++idx) {
+ SortItem *disp = &_sortedDisplay[idx];
+ disp->_sortMode = SORT_NONE;
+ disp->_index = 0;
+ disp->_priority = 0;
+ }
+
+ _sortedDisplayCount = 0;
+
+ _vm->_dialog->drawInvent(_oldBorderPos, _oldBorderSpriteIndex, _borderPos, _borderSpriteIndex);
+
+ if (_saveLoadFl) {
+ int16 posX = _vm->_events->_startPos.x;
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, _saveLoadSprite, posX + 183, 60, 274, 353);
+ if (_saveLoadX && _saveLoadY)
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _saveLoadSprite2, _saveLoadX + posX + 300, _saveLoadY + 300, 0);
+
+ _vm->_graphicsMan->addDirtyRect(posX + 183, 60, posX + 457, 413);
+ }
+
+ // If the Options dialog is activated, draw the elements
+ if (_vm->_globals->_optionDialogFl) {
+ int16 posX = _vm->_events->_startPos.x;
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ posX + 464, 407, 0);
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ posX + 657, 556, _vm->_globals->_menuSpeed);
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ posX + 731, 495, _vm->_globals->_menuTextOff);
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ posX + 731, 468, _vm->_globals->_menuVoiceOff);
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ posX + 731, 441, _vm->_globals->_menuSoundOff);
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ posX + 731, 414, _vm->_globals->_menuMusicOff);
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ posX + 600, 522, _vm->_globals->_menuDisplayType);
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ posX + 611, 502, _vm->_globals->_menuScrollSpeed);
+ _vm->_graphicsMan->addDirtyRect(posX + 164, 107, posX + 498, 320);
+ }
+
+ // Loop to draw any on-screen text
+ for (int idx = 0; idx <= 10; ++idx) {
+ TxtItem *curTxt = &_vm->_fontMan->_text[idx];
+ if (curTxt->_textOnFl) {
+ TxtItemList *curTxtList = &_vm->_fontMan->_textList[idx];
+ if ((curTxt->_textType < 2) || (curTxt->_textType > 3))
+ _vm->_fontMan->box(idx, curTxt->_messageId, curTxt->_filename, _vm->_events->_startPos.x + curTxt->_pos.x, curTxt->_pos.y);
+ else
+ _vm->_fontMan->box(idx, curTxt->_messageId, curTxt->_filename, curTxt->_pos.x, curTxt->_pos.y);
+ curTxtList->_enabledFl = true;
+
+ if ((curTxt->_textType < 2) || (curTxt->_textType > 3))
+ curTxtList->_pos.x = _vm->_events->_startPos.x + curTxt->_pos.x;
+ else
+ curTxtList->_pos.x = curTxt->_pos.x;
+
+ curTxtList->_pos.y = curTxt->_pos.y;
+ curTxtList->_width = curTxt->_width;
+ curTxtList->_height = curTxt->_height;
+
+ if (curTxtList->_pos.x < _vm->_graphicsMan->_minX)
+ curTxtList->_pos.x = _vm->_graphicsMan->_minX - 1;
+ if (curTxtList->_pos.y < _vm->_graphicsMan->_minY)
+ curTxtList->_pos.y = _vm->_graphicsMan->_minY - 1;
+
+ int posX = curTxtList->_pos.x;
+ if (curTxtList->_width + posX > _vm->_graphicsMan->_maxX)
+ curTxtList->_width = _vm->_graphicsMan->_maxX - posX;
+ int posY = curTxtList->_pos.y;
+ if (curTxtList->_height + posY > _vm->_graphicsMan->_maxY)
+ curTxtList->_height = _vm->_graphicsMan->_maxY - posY;
+ if (curTxtList->_width <= 0 || curTxtList->_height <= 0)
+ curTxtList->_enabledFl = false;
+ }
+ }
+
+ _vm->_dialog->inventAnim();
+}
+
+void ObjectsManager::resetBob(int idx) {
+ BobItem &bob = _bob[idx];
+ ListeItem &item = Liste2[idx];
+
+ bob._bobMode = 0;
+ bob._spriteData = NULL;
+ bob._xp = 0;
+ bob._yp = 0;
+ bob._frameIndex = 0;
+ bob._animDataIdx = 0;
+ bob._moveChange1 = 0;
+ bob._moveChange2 = 0;
+ bob._disabledAnimationFl = false;
+ bob._animData = NULL;
+ bob._bobMode10 = false;
+ bob._bobModeChange = 0;
+ bob._modeChangeCtr = 0;
+ bob._modeChangeUnused = 0;
+ bob._disableFl = false;
+ bob._zoomFactor = 0;
+ bob._flipFl = false;
+ bob._oldX2 = 0;
+
+ item._visibleFl = false;
+ item._posX = 0;
+ item._posY = 0;
+ item._width = 0;
+ item._height = 0;
+}
+
+void ObjectsManager::setBobInfo(int idx) {
+ BobItem *curBob = &_bob[idx];
+
+ if (!curBob->_activeFl)
+ return;
+
+ int xp = curBob->_oldX;
+ int yp = curBob->_oldY;
+
+ if (curBob->_isSpriteFl)
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, curBob->_spriteData,
+ xp + 300, yp + 300, curBob->_frameIndex);
+ else
+ _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer,
+ curBob->_spriteData, xp + 300, yp + 300, curBob->_frameIndex,
+ curBob->_zoomOutFactor, curBob->_zooInmFactor, curBob->_flipFl);
+
+ ListeItem *curLst = &Liste2[idx];
+ curLst->_visibleFl = true;
+ curLst->_posX = xp;
+ curLst->_posY = yp;
+
+ curLst->_width = curBob->_oldWidth;
+ curLst->_height = curBob->_oldHeight;
+
+ if (curLst->_posX < _vm->_graphicsMan->_minX) {
+ curLst->_width -= _vm->_graphicsMan->_minX - curLst->_posX;
+ curLst->_posX = _vm->_graphicsMan->_minX;
+ }
+
+ if (curLst->_posY < _vm->_graphicsMan->_minY) {
+ curLst->_height -= _vm->_graphicsMan->_minY - curLst->_posY;
+ curLst->_posY = _vm->_graphicsMan->_minY;
+ }
+
+ if (curLst->_width + curLst->_posX > _vm->_graphicsMan->_maxX)
+ curLst->_width = _vm->_graphicsMan->_maxX - curLst->_posX;
+
+ if (curLst->_height + curLst->_posY > _vm->_graphicsMan->_maxY)
+ curLst->_height = _vm->_graphicsMan->_maxY - curLst->_posY;
+
+ if (curLst->_width <= 0 || curLst->_height <= 0)
+ curLst->_visibleFl = false;
+
+ if (curLst->_visibleFl)
+ _vm->_graphicsMan->addDirtyRect(curLst->_posX, curLst->_posY, curLst->_posX + curLst->_width, curLst->_posY + curLst->_height);
+}
+
+void ObjectsManager::displayBob(int idx) {
+ BobItem *curBob = &_bob[idx];
+
+ _priorityFl = true;
+
+ if (curBob->_bobMode)
+ return;
+
+ resetBob(idx);
+
+ const byte *data = _vm->_animMan->_animBqe[idx]._data;
+ int bankIdx = READ_LE_INT16(data);
+ if (!bankIdx)
+ return;
+ if ((!_vm->_animMan->Bank[bankIdx]._loadedFl) || (!READ_LE_UINT16(data + 24)))
+ return;
+
+
+ int16 bobModeChange = READ_LE_INT16(data + 2);
+ int16 modeChangeUnused = READ_LE_INT16(data + 4);
+ // data[6] isn't used, read skipped
+ int16 newModeChangeCtr = READ_LE_INT16(data + 8);
+
+ if (!bobModeChange)
+ bobModeChange = 1;
+ if (!newModeChangeCtr)
+ newModeChangeCtr = -1;
+
+ curBob->_isSpriteFl = false;
+
+ if (_vm->_animMan->Bank[bankIdx]._fileHeader == 1) {
+ curBob->_isSpriteFl = true;
+ curBob->_zoomFactor = 0;
+ curBob->_flipFl = false;
+ }
+
+ curBob->_animData = _vm->_animMan->_animBqe[idx]._data;
+ curBob->_bobMode = 10;
+ curBob->_spriteData = _vm->_animMan->Bank[bankIdx]._data;
+
+ curBob->_bobModeChange = bobModeChange;
+ curBob->_modeChangeCtr = newModeChangeCtr;
+ curBob->_modeChangeUnused = modeChangeUnused;
+}
+
+void ObjectsManager::hideBob(int idx) {
+ BobItem *curBob = &_bob[idx];
+ if ((curBob->_bobMode == 3) || (curBob->_bobMode == 10))
+ curBob->_bobMode++;
+}
+
+void ObjectsManager::setBobOffset(int idx, int offset) {
+ _bob[idx]._oldX2 = offset;
+}
+
+void ObjectsManager::computeHideCounter(int idx) {
+ HidingItem *hid = &_hidingItem[idx];
+ if (hid->_useCount == 0)
+ return;
+
+ for (int i = 0; i <= 20; i++) {
+ BobItem *curBob = &_bob[i];
+ if ((curBob->_bobMode) && (!curBob->_disabledAnimationFl) && (!curBob->_disableFl) && (curBob->_frameIndex != 250)) {
+ int oldRight = curBob->_oldX + curBob->_oldWidth;
+ int oldBottom = curBob->_oldY + curBob->_oldHeight;
+ int hiddenRight = hid->_x + hid->_width;
+
+ if ((oldBottom > hid->_y) && (oldBottom < hid->_yOffset + hid->_height + hid->_y)) {
+ if ((oldRight >= hid->_x && oldRight <= hiddenRight)
+ // CHECKME: The original was doing the test two times. This looks like an
+ // original bug
+ // || (cachedRight >= curBob->_oldWidth && curBob->_oldWidth >= hid->_x)
+ || (hiddenRight >= curBob->_oldWidth && curBob->_oldWidth >= hid->_x)
+ || (curBob->_oldWidth >= hid->_x && oldRight <= hiddenRight)
+ || (curBob->_oldWidth <= hid->_x && oldRight >= hiddenRight))
+ ++hid->_useCount;
+ }
+ }
+ }
+}
+
+void ObjectsManager::initBobVariables(int idx) {
+ BobItem *bob = &_bob[idx];
+
+ bob->_activeFl = false;
+ if (bob->_isSpriteFl) {
+ bob->_flipFl = false;
+ bob->_zoomFactor = 0;
+ }
+
+ int spriteIdx = bob->_frameIndex;
+ if (spriteIdx == 250)
+ return;
+
+ int deltaY, deltaX;
+ if (bob->_flipFl) {
+ deltaX = getOffsetX(bob->_spriteData, spriteIdx, true);
+ deltaY = getOffsetY(bob->_spriteData, bob->_frameIndex, true);
+ } else {
+ deltaX = getOffsetX(bob->_spriteData, spriteIdx, false);
+ deltaY = getOffsetY(bob->_spriteData, bob->_frameIndex, false);
+ }
+
+ int negZoom = 0;
+ int posZoom = 0;
+ if (bob->_zoomFactor < 0)
+ negZoom = CLIP(-bob->_zoomFactor, 0, 95);
+ else
+ posZoom = bob->_zoomFactor;
+
+ if (posZoom) {
+ if (deltaX >= 0)
+ deltaX = _vm->_graphicsMan->zoomIn(deltaX, posZoom);
+ else
+ deltaX = -_vm->_graphicsMan->zoomIn(-deltaX, posZoom);
+
+ if (deltaY >= 0)
+ deltaY = _vm->_graphicsMan->zoomIn(deltaY, posZoom);
+ else
+ deltaY = -_vm->_graphicsMan->zoomIn(abs(deltaX), posZoom);
+ }
+
+ if (negZoom) {
+ if (deltaX >= 0)
+ deltaX = _vm->_graphicsMan->zoomOut(deltaX, negZoom);
+ else
+ deltaX = -_vm->_graphicsMan->zoomOut(-deltaX, negZoom);
+
+ if (deltaY >= 0)
+ deltaY = _vm->_graphicsMan->zoomOut(deltaY, negZoom);
+ else
+ deltaY = -_vm->_graphicsMan->zoomOut(abs(deltaX), negZoom);
+ }
+
+ int newX = bob->_xp - deltaX;
+ int newY = bob->_yp - deltaY;
+ bob->_activeFl = true;
+ bob->_oldX = newX;
+ bob->_oldY = newY;
+ bob->_zooInmFactor = posZoom;
+ bob->_zoomOutFactor = negZoom;
+
+ ListeItem *curList = &Liste2[idx];
+ curList->_visibleFl = true;
+ curList->_posX = newX;
+ curList->_posY = newY;
+
+ int width = getWidth(bob->_spriteData, bob->_frameIndex);
+ int height = getHeight(bob->_spriteData, bob->_frameIndex);
+
+ if (posZoom) {
+ width = _vm->_graphicsMan->zoomIn(width, posZoom);
+ height = _vm->_graphicsMan->zoomIn(height, posZoom);
+ } else if (negZoom) {
+ width = _vm->_graphicsMan->zoomOut(width, negZoom);
+ height = _vm->_graphicsMan->zoomOut(height, negZoom);
+ }
+
+ curList->_width = width;
+ curList->_height = height;
+ bob->_oldWidth = width;
+ bob->_oldHeight = height;
+}
+
+void ObjectsManager::checkHidingItem() {
+ for (int hidingItemIdx = 0; hidingItemIdx <= 19; hidingItemIdx++) {
+ HidingItem *hid = &_hidingItem[hidingItemIdx];
+ if (hid->_useCount == 0)
+ continue;
+
+ int _oldUseCount = hid->_useCount;
+ for (int spriteIdx = 0; spriteIdx <= 4; spriteIdx++) {
+ const SpriteItem *spr = &_sprite[spriteIdx];
+ if (spr->_animationType == 1 && spr->_spriteIndex != 250) {
+ int right = spr->_width + spr->_destX;
+ int bottom = spr->_height + spr->_destY;
+ int hidingRight = hid->_width + hid->_x;
+
+ if (bottom > hid->_y && bottom < (hid->_yOffset + hid->_height + hid->_y)) {
+ if ((right >= hid->_x && right <= hidingRight)
+ // CHECKME: The original was doing the test two times. This looks like an
+ // original bug
+ // || (hidingRight >= spr->_destX && hid->_x <= spr->_destX)
+ || (hidingRight >= spr->_destX && hid->_x <= spr->_destX)
+ || (hid->_x <= spr->_destX && right <= hidingRight)
+ || (hid->_x >= spr->_destX && right >= hidingRight))
+ ++hid->_useCount;
+ }
+ }
+ }
+
+ computeHideCounter(hidingItemIdx);
+ if (hid->_useCount != _oldUseCount) {
+ int priority = hid->_yOffset + hid->_height + hid->_y;
+ if (priority > 440)
+ priority = 500;
+
+ beforeSort(SORT_HIDING, hidingItemIdx, priority);
+ hid->_useCount = 1;
+ hid->_resetUseCount = true;
+ } else if (hid->_resetUseCount) {
+ hid->_resetUseCount = false;
+ hid->_useCount = 1;
+ }
+
+ }
+}
+
+void ObjectsManager::showSprite(int idx) {
+ SpriteItem *spr = &_sprite[idx];
+ if (!spr->_activeFl)
+ return;
+
+ if (spr->_rleFl)
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, spr->_spriteData,
+ spr->_destX + 300, spr->_destY + 300, spr->_spriteIndex);
+ else
+ _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, spr->_spriteData,
+ spr->_destX + 300, spr->_destY + 300, spr->_spriteIndex, spr->_reducePct, spr->_zoomPct, spr->_flipFl);
+
+ ListeItem *list = &Liste[idx];
+ list->_width = spr->_width;
+ list->_height = spr->_height;
+
+ if (list->_posX < _vm->_graphicsMan->_minX) {
+ list->_width -= _vm->_graphicsMan->_minX - list->_posX;
+ list->_posX = _vm->_graphicsMan->_minX;
+ }
+
+ if (list->_posY < _vm->_graphicsMan->_minY) {
+ list->_height -= _vm->_graphicsMan->_minY - list->_posY;
+ list->_posY = _vm->_graphicsMan->_minY;
+ }
+
+ list->_width = MIN(list->_width, _vm->_graphicsMan->_maxX - list->_posX);
+ list->_height = MIN(list->_height, _vm->_graphicsMan->_maxY - list->_posY);
+
+ if (list->_width <= 0 || list->_height <= 0)
+ list->_visibleFl = false;
+
+ if (list->_visibleFl)
+ _vm->_graphicsMan->addDirtyRect( list->_posX, list->_posY, list->_posX + list->_width, list->_posY + list->_height);
+}
+
+void ObjectsManager::displayHiding(int idx) {
+ HidingItem *hid = &_hidingItem[idx];
+
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _hidingItemData[1],
+ hid->_x + 300, hid->_y + 300, hid->_spriteIndex);
+ _vm->_graphicsMan->addDirtyRect(hid->_x, hid->_y, hid->_x + hid->_width, hid->_y + hid->_height);
+}
+
+// Compute Sprite
+void ObjectsManager::computeSprite(int idx) {
+ SpriteItem *spr = &_sprite[idx];
+
+ spr->_activeFl = false;
+ int spriteIndex = spr->_spriteIndex;
+ if (spriteIndex == 250)
+ return;
+
+ int offX;
+ int offY;
+ if (spr->_flipFl) {
+ offX = getOffsetX(spr->_spriteData, spriteIndex, true);
+ offY = getOffsetY(spr->_spriteData, spr->_spriteIndex, true);
+ } else {
+ offX = getOffsetX(spr->_spriteData, spriteIndex, false);
+ offY = getOffsetY(spr->_spriteData, spr->_spriteIndex, false);
+ }
+
+ int tmpX = spr->_deltaX + offX;
+ int deltaX = tmpX;
+ int tmpY = spr->_deltaY + offY;
+ int deltaY = tmpY;
+ int zoomPercent = 0;
+ int reducePercent = 0;
+
+ if (spr->_zoomFactor < 0) {
+ reducePercent = -spr->_zoomFactor;
+ if (reducePercent > 95)
+ reducePercent = 95;
+ } else
+ zoomPercent = spr->_zoomFactor;
+
+ if (zoomPercent) {
+ if (tmpX >= 0)
+ deltaX = _vm->_graphicsMan->zoomIn(tmpX, zoomPercent);
+ else
+ deltaX = -_vm->_graphicsMan->zoomIn(-tmpX, zoomPercent);
+
+ if (tmpY >= 0) {
+ deltaY = _vm->_graphicsMan->zoomIn(tmpY, zoomPercent);
+ } else {
+ tmpY = abs(tmpX);
+ deltaY = -_vm->_graphicsMan->zoomIn(tmpY, zoomPercent);
+ }
+ } else if (reducePercent) {
+ if (tmpX >= 0)
+ deltaX = _vm->_graphicsMan->zoomOut(tmpX, reducePercent);
+ else
+ deltaX = -_vm->_graphicsMan->zoomOut(-tmpX, reducePercent);
+
+ if (tmpY >= 0) {
+ deltaY = _vm->_graphicsMan->zoomOut(tmpY, reducePercent);
+ } else {
+ tmpY = abs(tmpX);
+ deltaY = -_vm->_graphicsMan->zoomOut(tmpY, reducePercent);
+ }
+ }
+
+ int newPosX = spr->_spritePos.x - deltaX;
+ int newPosY = spr->_spritePos.y - deltaY;
+ spr->_destX = newPosX;
+ spr->_destY = newPosY;
+ spr->_activeFl = true;
+ spr->_zoomPct = zoomPercent;
+ spr->_reducePct = reducePercent;
+
+ Liste[idx]._visibleFl = true;
+ Liste[idx]._posX = newPosX;
+ Liste[idx]._posY = newPosY;
+
+ int width = getWidth(spr->_spriteData, spr->_spriteIndex);
+ int height = getHeight(spr->_spriteData, spr->_spriteIndex);
+
+ if (zoomPercent) {
+ width = _vm->_graphicsMan->zoomIn(width, zoomPercent);
+ height = _vm->_graphicsMan->zoomIn(height, zoomPercent);
+ } else if (reducePercent) {
+ height = _vm->_graphicsMan->zoomOut(height, reducePercent);
+ width = _vm->_graphicsMan->zoomOut(width, reducePercent);
+ }
+
+ spr->_width = width;
+ spr->_height = height;
+}
+
+// Before Sort
+void ObjectsManager::beforeSort(SortMode sortMode, int index, int priority) {
+ ++_sortedDisplayCount;
+ assert (_sortedDisplayCount <= 48);
+
+ _sortedDisplay[_sortedDisplayCount]._sortMode = sortMode;
+ _sortedDisplay[_sortedDisplayCount]._index = index;
+ _sortedDisplay[_sortedDisplayCount]._priority = priority;
+}
+
+// Display BOB Anim
+void ObjectsManager::displayBobAnim() {
+ for (int idx = 1; idx <= 35; idx++) {
+ BobItem *bob = &_bob[idx];
+ if (idx <= 20 && _charactersEnabledFl) {
+ bob->_bobMode10 = false;
+ continue;
+ }
+
+ if (bob->_bobMode != 10)
+ continue;
+
+ bob->_bobMode10 = false;
+ if (bob->_animData == NULL || bob->_disabledAnimationFl || bob->_modeChangeCtr == 0 || bob->_modeChangeCtr < -1) {
+ if (bob->_bobModeChange == 1 || bob->_bobModeChange == 2)
+ bob->_bobMode10 = true;
+ continue;
+ }
+
+ if (bob->_moveChange1 == bob->_moveChange2) {
+ bob->_bobMode10 = true;
+ } else {
+ bob->_moveChange2++;
+ bob->_bobMode10 = false;
+ }
+
+ if (!bob->_bobMode10) {
+ if (bob->_bobModeChange == 1 || bob->_bobModeChange == 2)
+ bob->_bobMode10 = true;
+ continue;
+ }
+
+ byte *dataPtr = bob->_animData + 20;
+ int dataIdx = bob->_animDataIdx;
+ bob->_xp = READ_LE_INT16(dataPtr + 2 * dataIdx);
+ if (_lockedAnims[idx]._enableFl)
+ bob->_xp = _lockedAnims[idx]._posX;
+ if ( _charactersEnabledFl && idx > 20)
+ bob->_xp += _vm->_events->_startPos.x;
+
+ bob->_yp = READ_LE_INT16(dataPtr + 2 * dataIdx + 2);
+ bob->_moveChange1 = READ_LE_INT16(dataPtr + 2 * dataIdx + 4);
+ bob->_zoomFactor = READ_LE_INT16(dataPtr + 2 * dataIdx + 6);
+ bob->_frameIndex = dataPtr[2 * dataIdx + 8];
+ bob->_flipFl = (dataPtr[2 * dataIdx + 9] != 0);
+ bob->_animDataIdx += 5;
+
+ if (bob->_moveChange1 > 0) {
+ bob->_moveChange1 /= _vm->_globals->_speed;
+ if (bob->_moveChange1 > 0) {
+ bob->_moveChange2 = 1;
+ if (bob->_bobModeChange == 1 || bob->_bobModeChange == 2)
+ bob->_bobMode10 = true;
+ continue;
+ }
+
+ bob->_moveChange1 = 1;
+ }
+ if (!bob->_moveChange1) {
+ if (bob->_modeChangeCtr > 0)
+ bob->_modeChangeCtr--;
+ if (bob->_modeChangeCtr != -1 && bob->_modeChangeCtr <= 0) {
+ bob->_bobMode = 11;
+ } else {
+ bob->_animDataIdx = 0;
+ byte *bobData = bob->_animData + 20;
+ bob->_xp = READ_LE_INT16(bobData);
+
+ if (_lockedAnims[idx]._enableFl)
+ bob->_xp = _lockedAnims[idx]._posX;
+ if (_charactersEnabledFl && idx > 20)
+ bob->_xp += _vm->_events->_startPos.x;
+
+ bob->_yp = READ_LE_INT16(bobData + 2);
+ bob->_moveChange1 = READ_LE_INT16(bobData + 4);
+ bob->_zoomFactor = READ_LE_INT16(bobData + 6);
+ bob->_frameIndex = bobData[8];
+ bob->_flipFl = (bobData[9] != 0);
+ bob->_animDataIdx += 5;
+
+ if (bob->_moveChange1 > 0) {
+ bob->_moveChange1 /= _vm->_globals->_speed;
+ // Original code. It can't be negative, so the check is on == 0
+ if (bob->_moveChange1 <= 0)
+ bob->_moveChange1 = 1;
+ }
+ }
+ }
+
+ bob->_moveChange2 = 1;
+ if (bob->_bobModeChange == 1 || bob->_bobModeChange == 2)
+ bob->_bobMode10 = true;
+ }
+
+ if (!_charactersEnabledFl && _refreshBobMode10Fl) {
+ for (int i = 0; i < 35; i++) {
+ BobItem *curBob = &_bob[i];
+ if (curBob->_bobMode == 10 && !curBob->_disabledAnimationFl)
+ curBob->_bobMode10 = true;
+ }
+ }
+
+ _refreshBobMode10Fl = false;
+
+ for (int i = 1; i <= 35; i++) {
+ BobItem *curBob = &_bob[i];
+ ListeItem *curList = &Liste2[i];
+ if (i > 20 || !_charactersEnabledFl) {
+ if ((curBob->_bobMode == 10) && (curBob->_bobMode10)) {
+ if ((curBob->_bobModeChange != 2) && (curBob->_bobModeChange != 4)) {
+ if (curList->_visibleFl) {
+ _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, curList->_posX, curList->_posY,
+ curList->_width, curList->_height, _vm->_graphicsMan->_frontBuffer, curList->_posX, curList->_posY);
+ curList->_visibleFl = false;
+ }
+ }
+ }
+
+ if (curBob->_bobMode == 11) {
+ if (curList->_visibleFl) {
+ _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, curList->_posX, curList->_posY,
+ curList->_width, curList->_height, _vm->_graphicsMan->_frontBuffer, curList->_posX, curList->_posY);
+ curList->_visibleFl = false;
+ }
+
+ curBob->_bobMode = 0;
+ }
+ }
+ }
+
+ for (int i = 1; i <= 35; i++) {
+ BobItem *curBob = &_bob[i];
+ curBob->_oldY = 0;
+ if (curBob->_bobMode == 10 && !curBob->_disabledAnimationFl && curBob->_bobMode10) {
+ initBobVariables(i);
+ int priority = curBob->_oldX2 + curBob->_oldHeight + curBob->_oldY;
+
+ if (priority > 450)
+ priority = 600;
+
+ if (curBob->_activeFl)
+ beforeSort(SORT_BOB, i, priority);
+ }
+ }
+}
+
+// Display VBOB
+void ObjectsManager::displayVBob() {
+ int width, height;
+
+ for (int idx = 0; idx <= 29; idx++) {
+ VBobItem *vbob = &VBob[idx];
+ if (vbob->_displayMode == 4) {
+ width = getWidth(vbob->_spriteData, vbob->_frameIndex);
+ height = getHeight(vbob->_spriteData, vbob->_frameIndex);
+
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_backBuffer, vbob->_surface,
+ vbob->_xp, vbob->_yp, width, height);
+
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, vbob->_surface,
+ vbob->_xp, vbob->_yp, width, height);
+
+ _vm->_graphicsMan->addDirtyRect(vbob->_xp, vbob->_yp, vbob->_xp + width, height + vbob->_yp);
+ vbob->_surface = _vm->_globals->freeMemory(vbob->_surface);
+
+ vbob->_displayMode = 0;
+ vbob->_spriteData = NULL;
+ vbob->_xp = 0;
+ vbob->_yp = 0;
+ vbob->_oldX = 0;
+ vbob->_oldY = 0;
+ vbob->_frameIndex = 0;
+ vbob->_oldFrameIndex = 0;
+ vbob->_oldSpriteData = NULL;
+ }
+
+ if (vbob->_displayMode == 3) {
+ width = getWidth(vbob->_oldSpriteData, vbob->_oldFrameIndex);
+ height = getHeight(vbob->_oldSpriteData, vbob->_oldFrameIndex);
+
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_backBuffer, vbob->_surface,
+ vbob->_oldX, vbob->_oldY, width, height);
+
+ _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, vbob->_surface,
+ vbob->_oldX, vbob->_oldY, width, height);
+
+ _vm->_graphicsMan->addDirtyRect(vbob->_oldX, vbob->_oldY, vbob->_oldX + width, vbob->_oldY + height);
+
+ vbob->_displayMode = 1;
+ vbob->_oldSpriteData = vbob->_spriteData;
+
+ vbob->_surface = _vm->_globals->freeMemory(vbob->_surface);
+
+ vbob->_oldX = vbob->_xp;
+ vbob->_oldY = vbob->_yp;
+ vbob->_oldFrameIndex = vbob->_frameIndex;
+ }
+
+ if (vbob->_displayMode == 1) {
+ width = getWidth(vbob->_spriteData, vbob->_frameIndex);
+ height = getHeight(vbob->_spriteData, vbob->_frameIndex);
+
+ vbob->_surface = _vm->_globals->freeMemory(vbob->_surface);
+
+ byte *surface = _vm->_globals->allocMemory(height * width);
+ vbob->_surface = surface;
+
+ _vm->_graphicsMan->copySurfaceRect(_vm->_graphicsMan->_backBuffer, surface,
+ vbob->_xp, vbob->_yp, width, height);
+
+ if (*vbob->_spriteData == 78) {
+ _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_backBuffer, vbob->_spriteData,
+ vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex, 0, 0, false);
+
+ _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, vbob->_spriteData,
+ vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex, 0, 0, false);
+ } else {
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, vbob->_spriteData,
+ vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex);
+
+ _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_backBuffer, vbob->_spriteData,
+ vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex);
+ }
+
+ _vm->_graphicsMan->addDirtyRect(vbob->_xp, vbob->_yp , vbob->_xp + width, vbob->_yp + height);
+ vbob->_displayMode = 2;
+ }
+ }
+}
+
+/**
+ * Get Sprite X coordinate
+ */
+int ObjectsManager::getSpriteX(int idx) {
+ assert (idx <= MAX_SPRITE);
+ return _sprite[idx]._spritePos.x;
+}
+
+/**
+ * Get Sprite Y coordinate
+ */
+int ObjectsManager::getSpriteY(int idx) {
+ assert (idx <= MAX_SPRITE);
+ return _sprite[idx]._spritePos.y;
+}
+
+/**
+ * Clear sprite structure
+ */
+void ObjectsManager::clearSprite() {
+ for (int idx = 0; idx < MAX_SPRITE; idx++) {
+ _sprite[idx]._spriteData = NULL;
+ _sprite[idx]._animationType = 0;
+ }
+
+ for (int idx = 0; idx < MAX_SPRITE; idx++) {
+ ListeItem *list = &Liste[idx];
+ list->_visibleFl = false;
+ list->_posX = 0;
+ list->_posY = 0;
+ list->_width = 0;
+ list->_height = 0;
+ }
+}
+
+void ObjectsManager::animateSprite(int idx) {
+ assert (idx <= MAX_SPRITE);
+ _sprite[idx]._animationType = 1;
+}
+
+void ObjectsManager::addStaticSprite(const byte *spriteData, Common::Point pos, int idx, int spriteIndex, int zoomFactor, bool flipFl, int deltaX, int deltaY) {
+ assert (idx <= MAX_SPRITE);
+
+ SpriteItem *spr = &_sprite[idx];
+ spr->_spriteData = spriteData;
+ spr->_spritePos = pos;
+ spr->_spriteIndex = spriteIndex;
+ spr->_zoomFactor = zoomFactor;
+ spr->_flipFl = flipFl;
+ spr->_deltaX = deltaX;
+ spr->_deltaY = deltaY;
+ spr->_animationType = 0;
+
+ if (READ_BE_UINT24(spriteData) == MKTAG24('R', 'L', 'E')) {
+ spr->_rleFl = true;
+ spr->_zoomFactor = 0;
+ spr->_flipFl = false;
+ } else
+ spr->_rleFl = false;
+
+}
+
+/**
+ * Freeze sprite animation and free its memory
+ */
+void ObjectsManager::removeSprite(int idx) {
+ // Type 3 was also used by freeSprite(), which has been removed as it wasn't used
+ _sprite[idx]._animationType = 3;
+}
+
+/**
+ * Set Sprite X coordinate
+ */
+void ObjectsManager::setSpriteX(int idx, int xp) {
+ assert (idx <= MAX_SPRITE);
+ _sprite[idx]._spritePos.x = xp;
+}
+
+/**
+ * Set Sprite Y coordinate
+ */
+void ObjectsManager::setSpriteY(int idx, int yp) {
+ assert (idx <= MAX_SPRITE);
+ _sprite[idx]._spritePos.y = yp;
+}
+
+/**
+ * Set Sprite Index
+ */
+void ObjectsManager::setSpriteIndex(int idx, int spriteIndex) {
+ assert (idx <= MAX_SPRITE);
+ _sprite[idx]._spriteIndex = spriteIndex;
+}
+
+// Set Sprite Size
+void ObjectsManager::setSpriteZoom(int idx, int zoomFactor) {
+ assert (idx <= MAX_SPRITE);
+ if (!_sprite[idx]._rleFl)
+ _sprite[idx]._zoomFactor = zoomFactor;
+}
+
+void ObjectsManager::setFlipSprite(int idx, bool flipFl) {
+ assert (idx <= MAX_SPRITE);
+ if (!_sprite[idx]._rleFl)
+ _sprite[idx]._flipFl = flipFl;
+}
+
+void ObjectsManager::GOHOME() {
+ if (_vm->_linesMan->_route == NULL)
+ return;
+
+ if (_homeRateCounter > 1) {
+ --_homeRateCounter;
+ return;
+ }
+
+ int newPosX;
+ int newPosY;
+ Directions newDirection;
+
+ int oldPosX = 0;
+ int oldPosY = 0;
+ int oldFrameIdx = 0;
+ _homeRateCounter = 0;
+ if (_oldDirection == DIR_NONE) {
+ computeAndSetSpriteSize();
+ newPosX = _vm->_linesMan->_route->_x;
+ newPosY = _vm->_linesMan->_route->_y;
+ newDirection = _vm->_linesMan->_route->_dir;
+ _vm->_linesMan->_route++;
+
+ if (newPosX != -1 || newPosY != -1) {
+ _oldDirection = newDirection;
+ _oldDirectionSpriteIdx = newDirection + 59;
+ _oldFrameIndex = 0;
+ _oldCharacterPosX = newPosX;
+ _oldCharacterPosY = newPosY;
+ } else {
+ setSpriteIndex(0, _oldDirection + 59);
+ _vm->_globals->_actionDirection = DIR_NONE;
+ int zoneId;
+ if (_vm->_globals->_actionMoveTo)
+ zoneId = _vm->_globals->_saveData->_data[svLastZoneNum];
+ else
+ zoneId = _zoneNum;
+ _vm->_linesMan->_route = NULL;
+ computeAndSetSpriteSize();
+ setFlipSprite(0, false);
+ _homeRateCounter = 0;
+ _vm->_linesMan->_route = NULL;
+ _oldDirection = DIR_NONE;
+ if (zoneId > 0) {
+ ZoneItem *curZone = &_vm->_linesMan->_zone[zoneId];
+ if (curZone->_destX && curZone->_destY && curZone->_destY != 31) {
+ if (curZone->_spriteIndex == -1) {
+ curZone->_destX = 0;
+ curZone->_destY = 0;
+ curZone->_spriteIndex = 0;
+ } else {
+ setSpriteIndex(0, curZone->_spriteIndex);
+ _vm->_globals->_actionDirection = curZone->_spriteIndex - 59;
+ }
+ }
+ }
+ }
+ _homeRateCounter = 0;
+ return;
+ }
+ if (_oldDirection == DIR_RIGHT) {
+ if (_oldFrameIndex < 24 || _oldFrameIndex > 35) {
+ oldPosX = _oldCharacterPosX;
+ oldPosY = _oldCharacterPosY;
+ oldFrameIdx = 24;
+ } else {
+ int deltaX = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedX;
+ int deltaY = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY;
+
+ if (_sprite[0]._zoomFactor < 0) {
+ deltaX = _vm->_graphicsMan->zoomOut(deltaX, -_sprite[0]._zoomFactor);
+ deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor);
+ } else if (_sprite[0]._zoomFactor > 0) {
+ deltaX = _vm->_graphicsMan->zoomIn(deltaX, _sprite[0]._zoomFactor);
+ deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor);
+ }
+ oldPosX = _oldCharacterPosX + deltaX;
+ oldPosY = _oldCharacterPosY + deltaY;
+ oldFrameIdx = _oldFrameIndex + 1;
+ if (oldFrameIdx > 35)
+ oldFrameIdx = 24;
+ }
+ _homeRateCounter = 5 / _vm->_globals->_speed;
+ }
+ if (_oldDirection == DIR_LEFT) {
+ if (_oldFrameIndex < 24 || _oldFrameIndex > 35) {
+ oldPosX = _oldCharacterPosX;
+ oldPosY = _oldCharacterPosY;
+ oldFrameIdx = 24;
+ } else {
+ int deltaX = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedX;
+ int deltaY = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY;
+ if (_sprite[0]._zoomFactor < 0) {
+ deltaX = _vm->_graphicsMan->zoomOut(deltaX, -_sprite[0]._zoomFactor);
+ deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor);
+ } else if (_sprite[0]._zoomFactor > 0) {
+ deltaX = _vm->_graphicsMan->zoomIn(deltaX, _sprite[0]._zoomFactor);
+ deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor);
+ }
+ oldPosX = _oldCharacterPosX - deltaX;
+ oldPosY = _oldCharacterPosY - deltaY;
+ oldFrameIdx = _oldFrameIndex + 1;
+ if (oldFrameIdx > 35)
+ oldFrameIdx = 24;
+ }
+ _homeRateCounter = 5 / _vm->_globals->_speed;
+ }
+ if (_oldDirection == DIR_UP) {
+ if (_oldFrameIndex > 11) {
+ oldPosX = _oldCharacterPosX;
+ oldPosY = _oldCharacterPosY;
+ oldFrameIdx = 0;
+ } else {
+ int deltaY = abs(_vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY);
+ if (_sprite[0]._zoomFactor < 0) {
+ deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor);
+ } else if (_sprite[0]._zoomFactor > 0) {
+ deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor);
+ }
+ oldPosX = _oldCharacterPosX;
+ oldPosY = _oldCharacterPosY - deltaY;
+ oldFrameIdx = _oldFrameIndex + 1;
+ if (oldFrameIdx > 11)
+ oldFrameIdx = 0;
+ }
+ _homeRateCounter = 4 / _vm->_globals->_speed;
+ }
+
+ if (_oldDirection == DIR_DOWN) {
+ if (_oldFrameIndex < 48 || _oldFrameIndex > 59) {
+ oldPosX = _oldCharacterPosX;
+ oldPosY = _oldCharacterPosY;
+ oldFrameIdx = 48;
+ } else {
+ int deltaY = abs(_vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY);
+ if (_sprite[0]._zoomFactor < 0) {
+ deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor);
+ } else if (_sprite[0]._zoomFactor > 0) {
+ deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor);
+ }
+ oldPosX = _oldCharacterPosX;
+ oldPosY = deltaY + _oldCharacterPosY;
+ oldFrameIdx = _oldFrameIndex + 1;
+ if (oldFrameIdx > 59)
+ oldFrameIdx = 48;
+ }
+ _homeRateCounter = 4 / _vm->_globals->_speed;
+ }
+ if (_oldDirection == DIR_UP_RIGHT) {
+ if (_oldFrameIndex < 12 || _oldFrameIndex > 23) {
+ oldPosX = _oldCharacterPosX;
+ oldPosY = _oldCharacterPosY;
+ oldFrameIdx = 12;
+ } else {
+ int deltaX = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedX;
+ int deltaY = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY;
+ if (_sprite[0]._zoomFactor < 0) {
+ deltaX = _vm->_graphicsMan->zoomOut(deltaX, -_sprite[0]._zoomFactor);
+ deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor);
+ }
+ if (_sprite[0]._zoomFactor > 0) {
+ deltaX = _vm->_graphicsMan->zoomIn(deltaX, _sprite[0]._zoomFactor);
+ deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor);
+ }
+ oldPosX = deltaX + _oldCharacterPosX;
+ oldPosY = _oldCharacterPosY + deltaY;
+ oldFrameIdx = _oldFrameIndex + 1;
+ if (oldFrameIdx > 23)
+ oldFrameIdx = 12;
+ }
+ _homeRateCounter = 5 / _vm->_globals->_speed;
+ }
+ if (_oldDirection == DIR_UP_LEFT) {
+ if (_oldFrameIndex < 12 || _oldFrameIndex > 23) {
+ oldPosX = _oldCharacterPosX;
+ oldPosY = _oldCharacterPosY;
+ oldFrameIdx = 12;
+ } else {
+ int deltaX = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedX;
+ int deltaY = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY;
+ if (_sprite[0]._zoomFactor < 0) {
+ deltaX = _vm->_graphicsMan->zoomOut(deltaX, -_sprite[0]._zoomFactor);
+ deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor);
+ } else if (_sprite[0]._zoomFactor > 0) {
+ deltaX = _vm->_graphicsMan->zoomIn(deltaX, _sprite[0]._zoomFactor);
+ deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor);
+ }
+ oldPosX = _oldCharacterPosX - deltaX;
+ oldPosY = _oldCharacterPosY + deltaY;
+ oldFrameIdx = _oldFrameIndex + 1;
+ if (oldFrameIdx > 23)
+ oldFrameIdx = 12;
+ }
+ _homeRateCounter = 5 / _vm->_globals->_speed;
+ }
+ if (_oldDirection == DIR_DOWN_RIGHT) {
+ if (_oldFrameIndex < 36 || _oldFrameIndex > 47) {
+ oldPosX = _oldCharacterPosX;
+ oldPosY = _oldCharacterPosY;
+ oldFrameIdx = 36;
+ } else {
+ int deltaX = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedX;
+ int deltaY = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY;
+ if (_sprite[0]._zoomFactor < 0) {
+ deltaX = _vm->_graphicsMan->zoomOut(deltaX, -_sprite[0]._zoomFactor);
+ deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor);
+ }
+ if (_sprite[0]._zoomFactor > 0) {
+ deltaX = _vm->_graphicsMan->zoomIn(deltaX, _sprite[0]._zoomFactor);
+ deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor);
+ }
+ oldPosX = deltaX + _oldCharacterPosX;
+ oldPosY = _oldCharacterPosY + deltaY;
+ oldFrameIdx = _oldFrameIndex + 1;
+ if (oldFrameIdx > 47)
+ oldFrameIdx = 36;
+ }
+ _homeRateCounter = 5 / _vm->_globals->_speed;
+ }
+ if (_oldDirection == DIR_DOWN_LEFT) {
+ if (_oldFrameIndex < 36 || _oldFrameIndex > 47) {
+ oldPosX = _oldCharacterPosX;
+ oldPosY = _oldCharacterPosY;
+ oldFrameIdx = 36;
+ } else {
+ int deltaX = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedX;
+ int deltaY = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY;
+ if (_sprite[0]._zoomFactor < 0) {
+ deltaX = _vm->_graphicsMan->zoomOut(deltaX, -_sprite[0]._zoomFactor);
+ deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor);
+ }
+ if (_sprite[0]._zoomFactor > 0) {
+ deltaX = _vm->_graphicsMan->zoomIn(deltaX, _sprite[0]._zoomFactor);
+ deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor);
+ }
+ oldPosX = _oldCharacterPosX - deltaX;
+ oldPosY = _oldCharacterPosY + deltaY;
+ oldFrameIdx = _oldFrameIndex + 1;
+ if (oldFrameIdx > 47)
+ oldFrameIdx = 36;
+ }
+ _homeRateCounter = 5 / _vm->_globals->_speed;
+ }
+ bool loopCond = false;
+ do {
+ newPosX = _vm->_linesMan->_route->_x;
+ newPosY = _vm->_linesMan->_route->_y;
+ newDirection = (Directions)_vm->_linesMan->_route->_dir;
+ _vm->_linesMan->_route++;
+
+ if (newPosX == -1 && newPosY == -1) {
+ int zoneId;
+ if (_vm->_globals->_actionMoveTo)
+ zoneId = _vm->_globals->_saveData->_data[svLastZoneNum];
+ else
+ zoneId = _zoneNum;
+ setSpriteIndex(0, _oldDirection + 59);
+ _vm->_globals->_actionDirection = DIR_NONE;
+ _vm->_linesMan->_route = NULL;
+ computeAndSetSpriteSize();
+ setFlipSprite(0, false);
+ _homeRateCounter = 0;
+ _oldDirection = DIR_NONE;
+ _oldCharacterPosX = getSpriteX(0);
+ _oldCharacterPosY = getSpriteY(0);
+
+ if (zoneId > 0) {
+ ZoneItem *curZone = &_vm->_linesMan->_zone[zoneId];
+ if (curZone->_destX && curZone->_destY && curZone->_destY != 31) {
+ if ( curZone->_spriteIndex == -1) {
+ curZone->_destX = 0;
+ curZone->_destY = 0;
+ curZone->_spriteIndex = 0;
+ } else {
+ setSpriteIndex(0, curZone->_spriteIndex);
+ _vm->_globals->_actionDirection = curZone->_spriteIndex - 59;
+ }
+ }
+ }
+ _homeRateCounter = 0;
+ return;
+ }
+ if (_oldDirection != newDirection)
+ break;
+ if ((newDirection == DIR_RIGHT && newPosX >= oldPosX) || (_oldDirection == DIR_LEFT && newPosX <= oldPosX) ||
+ (_oldDirection == DIR_UP && newPosY <= oldPosY) || (_oldDirection == DIR_DOWN && newPosY >= oldPosY) ||
+ (_oldDirection == DIR_UP_RIGHT && newPosX >= oldPosX) || (_oldDirection == DIR_UP_LEFT && newPosX <= oldPosX) ||
+ (_oldDirection == DIR_DOWN_RIGHT && newPosX >= oldPosX) || (_oldDirection == DIR_DOWN_LEFT && newPosX <= oldPosX))
+ loopCond = true;
+ } while (!loopCond);
+ if (loopCond) {
+ computeAndSetSpriteSize();
+ if ((_oldDirection == DIR_DOWN_LEFT) || (_oldDirection == DIR_LEFT) || (_oldDirection == DIR_UP_LEFT))
+ setFlipSprite(0, true);
+
+ if ((_oldDirection == DIR_UP) || (_oldDirection == DIR_UP_RIGHT) || (_oldDirection == DIR_RIGHT) ||
+ (_oldDirection == DIR_DOWN_RIGHT) || (_oldDirection == DIR_DOWN))
+ setFlipSprite(0, false);
+
+ setSpriteX(0, newPosX);
+ setSpriteY(0, newPosY);
+ setSpriteIndex(0, oldFrameIdx);
+ } else {
+ if ((_oldDirection == DIR_DOWN_LEFT) || (_oldDirection == DIR_LEFT) || (_oldDirection == DIR_UP_LEFT))
+ setFlipSprite(0, true);
+
+ if ((_oldDirection == DIR_UP) || (_oldDirection == DIR_UP_RIGHT) || (_oldDirection == DIR_RIGHT) ||
+ (_oldDirection == DIR_DOWN_RIGHT) || (_oldDirection == DIR_DOWN))
+ setFlipSprite(0, false);
+ _homeRateCounter = 0;
+ }
+ _oldDirection = newDirection;
+ _oldDirectionSpriteIdx = newDirection + 59;
+ _oldFrameIndex = oldFrameIdx;
+ _oldCharacterPosX = newPosX;
+ _oldCharacterPosY = newPosY;
+}
+
+void ObjectsManager::GOHOME2() {
+ if (_vm->_linesMan->_route == NULL)
+ return;
+
+ int realSpeed = 2;
+ if (_vm->_globals->_speed == 2)
+ realSpeed = 4;
+ else if (_vm->_globals->_speed == 3)
+ realSpeed = 6;
+
+ int countColisionPixel = 0;
+
+ for (;;) {
+ int nexPosX = _vm->_linesMan->_route->_x;
+ int newPosY = _vm->_linesMan->_route->_y;
+ Directions newDirection = (Directions)_vm->_linesMan->_route->_dir;
+ _vm->_linesMan->_route++;
+
+ if ((nexPosX == -1) && (newPosY == -1))
+ break;
+
+ ++countColisionPixel;
+ if (countColisionPixel >= realSpeed) {
+ _lastDirection = newDirection;
+ setSpriteX(0, nexPosX);
+ setSpriteY(0, newPosY);
+ switch (_lastDirection) {
+ case DIR_UP:
+ setSpriteIndex(0, 4);
+ break;
+ case DIR_RIGHT:
+ setSpriteIndex(0, 5);
+ break;
+ case DIR_DOWN:
+ setSpriteIndex(0, 6);
+ break;
+ case DIR_LEFT:
+ setSpriteIndex(0, 7);
+ break;
+ default:
+ break;
+ }
+
+ return;
+ }
+ }
+
+ switch (_lastDirection) {
+ case DIR_UP:
+ setSpriteIndex(0, 0);
+ break;
+ case DIR_RIGHT:
+ setSpriteIndex(0, 1);
+ break;
+ case DIR_DOWN:
+ setSpriteIndex(0, 2);
+ break;
+ case DIR_LEFT:
+ setSpriteIndex(0, 3);
+ break;
+ default:
+ break;
+ }
+
+ _vm->_linesMan->_route = NULL;
+}
+
+/**
+ * Load Zone
+ */
+void ObjectsManager::loadZone(const Common::String &file) {
+ for (int i = 1; i <= 100; i++) {
+ ZoneItem *curZone = &_vm->_linesMan->_zone[i];
+ curZone->_destX = 0;
+ curZone->_destY = 0;
+ curZone->_spriteIndex = 0;
+ curZone->_verbFl1 = 0;
+ curZone->_verbFl2 = 0;
+ curZone->_verbFl3 = 0;
+ curZone->_verbFl4 = 0;
+ curZone->_verbFl5 = 0;
+ curZone->_verbFl6 = 0;
+ curZone->_verbFl7 = 0;
+ curZone->_verbFl8 = 0;
+ curZone->_verbFl9 = 0;
+ curZone->_verbFl10 = 0;
+ curZone->_messageId = 0;
+ curZone->_enabledFl = false;
+ }
+
+ Common::File f;
+ if (!f.exists(file))
+ error("File not found : %s", file.c_str());
+
+ byte *ptr = _vm->_fileIO->loadFile(file);
+ int bufId = 0;
+ int zoneLineIdx = 0;
+ int bobZoneIdx;
+ do {
+ bobZoneIdx = READ_LE_INT16((uint16 *)ptr + bufId);
+ if (bobZoneIdx != -1) {
+ _vm->_linesMan->addZoneLine(
+ zoneLineIdx,
+ READ_LE_UINT16((uint16 *)ptr + bufId + 1),
+ READ_LE_UINT16((uint16 *)ptr + bufId + 2),
+ READ_LE_UINT16((uint16 *)ptr + bufId + 3),
+ READ_LE_UINT16((uint16 *)ptr + bufId + 4),
+ bobZoneIdx);
+ _vm->_linesMan->_zone[bobZoneIdx]._enabledFl = true;
+ }
+ bufId += 5;
+ ++zoneLineIdx;
+ } while (bobZoneIdx != -1);
+
+ for (int i = 1; i <= 100; i++) {
+ ZoneItem *curZone = &_vm->_linesMan->_zone[i];
+ curZone->_destX = READ_LE_INT16((uint16 *)ptr + bufId);
+ curZone->_destY = READ_LE_INT16((uint16 *)ptr + bufId + 1);
+ curZone->_spriteIndex = READ_LE_INT16((uint16 *)ptr + bufId + 2);
+ bufId += 3;
+ }
+
+ byte *verbData = (ptr + 10 * zoneLineIdx + 606);
+ bufId = 0;
+ for (int i = 1; i <= 100; i++) {
+ ZoneItem *curZone = &_vm->_linesMan->_zone[i];
+ curZone->_verbFl1 = verbData[bufId];
+ curZone->_verbFl2 = verbData[bufId + 1];
+ curZone->_verbFl3 = verbData[bufId + 2];
+ curZone->_verbFl4 = verbData[bufId + 3];
+ curZone->_verbFl5 = verbData[bufId + 4];
+ curZone->_verbFl6 = verbData[bufId + 5];
+ curZone->_verbFl7 = verbData[bufId + 6];
+ curZone->_verbFl8 = verbData[bufId + 7];
+ curZone->_verbFl9 = verbData[bufId + 8];
+ curZone->_verbFl10 = verbData[bufId + 9];
+
+ bufId += 10;
+ }
+ verbData += 1010;
+ for (int i = 0; i < 100; i++)
+ _vm->_linesMan->_zone[i + 1]._messageId = READ_LE_UINT16(verbData + 2 * i);
+
+ _vm->_globals->freeMemory(ptr);
+ _vm->_linesMan->initSquareZones();
+}
+
+void ObjectsManager::handleCityMap() {
+ _vm->_dialog->_inventFl = false;
+ _vm->_events->_gameKey = KEY_NONE;
+ _vm->_linesMan->setMaxLineIdx(1);
+ _vm->_globals->_characterMaxPosY = 440;
+ _vm->_globals->_cityMapEnabledFl = true;
+ _vm->_graphicsMan->_noFadingFl = false;
+ _vm->_globals->_freezeCharacterFl = false;
+ _spritePtr = NULL;
+ _vm->_globals->_exitId = 0;
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_soundMan->playSound(31);
+ _vm->_globals->_eventMode = EVENTMODE_IGNORE;
+ _vm->_graphicsMan->loadImage("PLAN");
+ _vm->_linesMan->loadLines("PLAN.OB2");
+ loadHidingItems("PLAN.CA2");
+ loadZone("PLAN.ZO2");
+ _spritePtr = _vm->_fileIO->loadFile("VOITURE.SPR");
+ _vm->_animMan->loadAnim("PLAN");
+ _vm->_graphicsMan->displayAllBob();
+ _vm->_graphicsMan->initScreen("PLAN", 2, false);
+ for (int i = 0; i <= 15; i++)
+ disableHidingItem(i);
+ disableHidingItem(19);
+ disableHidingItem(20);
+ enableHidingBehavior();
+
+ if (!_mapCarPosX && !_mapCarPosY) {
+ _mapCarPosX = 900;
+ _mapCarPosY = 319;
+ }
+ addStaticSprite(_spritePtr, Common::Point(_mapCarPosX, _mapCarPosY), 0, 1, 0, false, 5, 5);
+ _vm->_events->setMouseXY(_mapCarPosX, _mapCarPosY);
+ _vm->_events->mouseOn();
+ _vm->_graphicsMan->scrollScreen(getSpriteX(0) - 320);
+ _vm->_graphicsMan->_scrollOffset = getSpriteX(0) - 320;
+ animateSprite(0);
+ _vm->_linesMan->_route = NULL;
+ _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0);
+
+ for (int i = 0; i <= 4; i++)
+ _vm->_events->refreshScreenAndEvents();
+
+ _vm->_globals->_eventMode = EVENTMODE_IGNORE;
+ _vm->_graphicsMan->fadeInLong();
+ _vm->_events->changeMouseCursor(4);
+ _vm->_graphicsMan->_noFadingFl = false;
+
+ bool loopCond = false;
+ do {
+ int mouseButton = _vm->_events->getMouseButton();
+ if (mouseButton) {
+ // First cop call : Go to the bank and free the hostages
+ if (_vm->_globals->_saveData->_data[svBankAttackAnimPlayedFl] == 1 && !_vm->_globals->_saveData->_data[svCopCall1PlayedFl]) {
+ _vm->_globals->_saveData->_data[svCopCall1PlayedFl] = 1;
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("APPEL1.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ mouseButton = 0;
+ }
+ // Second cop call: Helico has been found in the empty lot
+ if (_vm->_globals->_saveData->_data[svFreedHostageFl] == 1 && !_vm->_globals->_saveData->_data[svCopCall2PlayedFl]) {
+ _vm->_globals->_saveData->_data[svCopCall2PlayedFl] = 1;
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("APPEL2.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ mouseButton = 0;
+ _vm->_events->_curMouseButton = 0;
+ }
+ if (mouseButton == 1)
+ handleLeftButton();
+ }
+
+ _vm->_linesMan->checkZone();
+ GOHOME2();
+
+ if (_vm->_linesMan->_route == NULL && _vm->_globals->_actionMoveTo)
+ PARADISE();
+ _vm->_events->refreshScreenAndEvents();
+
+ if (_vm->_globals->_exitId)
+ loopCond = true;
+ } while (!_vm->shouldQuit() && !loopCond);
+
+ if (!_vm->_graphicsMan->_noFadingFl)
+ _vm->_graphicsMan->fadeOutLong();
+ _vm->_globals->_eventMode = EVENTMODE_DEFAULT;
+ _vm->_graphicsMan->_noFadingFl = false;
+ _mapCarPosX = getSpriteX(0);
+ _mapCarPosY = getSpriteY(0);
+ removeSprite(0);
+ _spritePtr = _vm->_globals->freeMemory(_spritePtr);
+ clearScreen();
+ _vm->_globals->_cityMapEnabledFl = false;
+}
+
+/**
+ * Handle Left button
+ */
+void ObjectsManager::handleLeftButton() {
+ _vm->_fontMan->hideText(9);
+ int destX = _vm->_events->getMouseX();
+ int destY = _vm->_events->getMouseY();
+
+ if (!_vm->_dialog->_inventFl && !_vm->_globals->_cityMapEnabledFl &&
+ destX > _vm->_graphicsMan->_scrollOffset - 30 && destX < _vm->_graphicsMan->_scrollOffset + 50 &&
+ destY > -30 && destY < 50) {
+ int oldMouseCursor = _vm->_events->_mouseCursorId;
+ _vm->_dialog->_inventFl = true;
+ _vm->_dialog->showInventory();
+ _vm->_dialog->_inventFl = false;
+ _vm->_events->_gameKey = KEY_NONE;
+ if (!_vm->_globals->_exitId) {
+ _vm->_dialog->_inventFl = false;
+ _vm->_events->_mouseCursorId = oldMouseCursor;
+ }
+ return;
+ }
+ if (_vm->_globals->_saveData->_data[svField354] == 1 && !_vm->_globals->_cityMapEnabledFl
+ && destX >= 533 && destX <= 559 && destY >= 26 && destY <= 59) {
+ changeCharacterHead(CHARACTER_HOPKINS_CLONE, CHARACTER_HOPKINS);
+ return;
+ }
+ if (_vm->_globals->_saveData->_data[svField356] == 1 && !_vm->_globals->_cityMapEnabledFl
+ && destX >= 533 && destX <= 559 && destY >= 26 && destY <= 48) {
+ changeCharacterHead(CHARACTER_SAMANTHA, CHARACTER_HOPKINS);
+ return;
+ }
+ if (_vm->_globals->_saveData->_data[svField357] == 1) {
+ if (_vm->_globals->_saveData->_data[svField353] == 1 && !_vm->_globals->_cityMapEnabledFl
+ && destX >= 533 && destX <= 559 && destY >= 26 && destY <= 59) {
+ changeCharacterHead(CHARACTER_HOPKINS, CHARACTER_HOPKINS_CLONE);
+ return;
+ }
+ if (_vm->_globals->_saveData->_data[svField355] == 1 && !_vm->_globals->_cityMapEnabledFl
+ && destX >= 567 && destX <= 593 && destY >= 26 && destY <= 59) {
+ changeCharacterHead(CHARACTER_HOPKINS, CHARACTER_SAMANTHA);
+ return;
+ }
+ }
+ if (_vm->_globals->_cityMapEnabledFl && _vm->_globals->_actionMoveTo) {
+ _vm->_linesMan->checkZone();
+ if (_zoneNum <= 0)
+ return;
+ int routeIdx = 0;
+ do {
+ _vm->_linesMan->_testRoute2[routeIdx] = _vm->_linesMan->_route[routeIdx];
+ ++routeIdx;
+ } while (_vm->_linesMan->_route[routeIdx]._x != -1);
+
+ _vm->_linesMan->_testRoute2[routeIdx].invalidate();
+ }
+
+ if (_vm->_globals->_actionMoveTo) {
+ _vm->_linesMan->checkZone();
+ _vm->_globals->_actionMoveTo = false;
+ _vm->_globals->_saveData->_data[svLastMouseCursor] = 0;
+ _vm->_globals->_saveData->_data[svLastZoneNum] = 0;
+ }
+
+ if (_vm->_globals->_cityMapEnabledFl && (_vm->_events->_mouseCursorId != 4 || _zoneNum <= 0))
+ return;
+ if (_zoneNum != -1 && _zoneNum != 0) {
+ ZoneItem *curZone = &_vm->_linesMan->_zone[_zoneNum];
+ if (curZone->_destX && curZone->_destY && curZone->_destY != 31) {
+ destX = curZone->_destX;
+ destY = curZone->_destY;
+ }
+ }
+ _vm->_globals->_actionMoveTo = false;
+ RouteItem *oldRoute = _vm->_linesMan->_route;
+ _vm->_linesMan->_route = NULL;
+ if (_forestFl && _zoneNum >= 20 && _zoneNum <= 23) {
+ if (getSpriteY(0) > 374 && getSpriteY(0) <= 410) {
+ _vm->_linesMan->_route = NULL;
+ setSpriteIndex(0, _oldDirectionSpriteIdx);
+ _vm->_globals->_actionDirection = DIR_NONE;
+ _vm->_linesMan->_route = NULL;
+ computeAndSetSpriteSize();
+ setFlipSprite(0, false);
+ _homeRateCounter = 0;
+ _oldDirection = DIR_NONE;
+ } else {
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(getSpriteX(0), getSpriteY(0), getSpriteX(0), 390);
+ if (_vm->_linesMan->_route)
+ _vm->_linesMan->optimizeRoute(_vm->_linesMan->_route);
+ _oldCharacterPosX = getSpriteX(0);
+ _oldCharacterPosY = getSpriteY(0);
+ _homeRateCounter = 0;
+ if (_vm->_linesMan->_route || oldRoute == _vm->_linesMan->_route) {
+ _oldDirection = DIR_NONE;
+ } else {
+ _vm->_linesMan->_route = oldRoute;
+ }
+ }
+ } else {
+ if (!_vm->_globals->_freezeCharacterFl && !_vm->_globals->_cityMapEnabledFl) {
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(getSpriteX(0), getSpriteY(0), destX, destY);
+ if (_vm->_linesMan->_route)
+ _vm->_linesMan->optimizeRoute(_vm->_linesMan->_route);
+ _oldCharacterPosX = getSpriteX(0);
+ _oldCharacterPosY = getSpriteY(0);
+ _homeRateCounter = 0;
+ if (_vm->_linesMan->_route || oldRoute == _vm->_linesMan->_route)
+ _oldDirection = DIR_NONE;
+ else
+ _vm->_linesMan->_route = oldRoute;
+ }
+ }
+
+ if (!_vm->_globals->_freezeCharacterFl && _vm->_globals->_cityMapEnabledFl)
+ _vm->_linesMan->_route = _vm->_linesMan->cityMapCarRoute(getSpriteX(0), getSpriteY(0), destX, destY);
+
+ if (_zoneNum != -1 && _zoneNum != 0) {
+ if (_vm->_events->_mouseCursorId == 23)
+ _vm->_globals->_saveData->_data[svLastMouseCursor] = 5;
+ else
+ _vm->_globals->_saveData->_data[svLastMouseCursor] = _vm->_events->_mouseCursorId;
+
+ if (_vm->_globals->_cityMapEnabledFl)
+ _vm->_globals->_saveData->_data[svLastMouseCursor] = 6;
+ _vm->_globals->_saveData->_data[svLastZoneNum] = _zoneNum;
+ _vm->_globals->_saveData->_data[svLastObjectIndex] = _curObjectIndex;
+ _vm->_globals->_actionMoveTo = true;
+ }
+ _vm->_fontMan->hideText(5);
+ _vm->_graphicsMan->setColorPercentage2(251, 100, 100, 100);
+ if (_vm->_globals->_screenId == 20 && _vm->_globals->_saveData->_data[svField132] == 1
+ && _curObjectIndex == 20 && _zoneNum == 12
+ && _vm->_events->_mouseCursorId == 23) {
+ // Special case for throwing darts at the switch in Purgatory - the player shouldn't move
+ _vm->_linesMan->_route = NULL;
+ getSpriteX(0);
+ getSpriteY(0);
+ }
+}
+
+void ObjectsManager::PARADISE() {
+ char result = _vm->_globals->_saveData->_data[svLastMouseCursor];
+ if (result && _vm->_globals->_saveData->_data[svLastZoneNum] && result != 4 && result > 3) {
+ _vm->_fontMan->hideText(5);
+ if (!_forestFl || _zoneNum < 20 || _zoneNum > 23) {
+ if (_vm->_graphicsMan->_largeScreenFl) {
+ _vm->_graphicsMan->_scrollStatus = 2;
+ if (_vm->_events->_startPos.x + 320 - getSpriteX(0) > 160) {
+ bool loopCond = false;
+ do {
+ _vm->_graphicsMan->_scrollPosX -= _vm->_graphicsMan->_scrollSpeed;
+ if (_vm->_graphicsMan->_scrollPosX < 0) {
+ _vm->_graphicsMan->_scrollPosX = 0;
+ loopCond = true;
+ }
+ if (_vm->_graphicsMan->_scrollPosX > SCREEN_WIDTH) {
+ _vm->_graphicsMan->_scrollPosX = SCREEN_WIDTH;
+ loopCond = true;
+ }
+ if (_vm->_events->getMouseX() > _vm->_graphicsMan->_scrollPosX + 620)
+ _vm->_events->setMouseXY(_vm->_events->_mousePos.x - 4, _vm->_events->getMouseY());
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (!loopCond && _vm->_events->_startPos.x > getSpriteX(0) - 320);
+ } else if (_vm->_events->_startPos.x + 320 - getSpriteX(0) < -160) {
+ bool loopCond = false;
+ do {
+ _vm->_graphicsMan->_scrollPosX += _vm->_graphicsMan->_scrollSpeed;
+ if (_vm->_graphicsMan->_scrollPosX < 0) {
+ _vm->_graphicsMan->_scrollPosX = 0;
+ loopCond = true;
+ }
+ if (_vm->_graphicsMan->_scrollPosX > SCREEN_WIDTH) {
+ _vm->_graphicsMan->_scrollPosX = SCREEN_WIDTH;
+ loopCond = true;
+ }
+ if (_vm->_events->getMouseX() < _vm->_graphicsMan->_scrollPosX + 10)
+ _vm->_events->setMouseXY(_vm->_events->_mousePos.x + 4, _vm->_events->getMouseY());
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (!loopCond && _vm->_events->_startPos.x < getSpriteX(0) - 320);
+ }
+ if (_vm->_events->getMouseX() > _vm->_graphicsMan->_scrollPosX + 620)
+ _vm->_events->setMouseXY(_vm->_graphicsMan->_scrollPosX + 610, 0);
+ if (_vm->_events->getMouseX() < _vm->_graphicsMan->_scrollPosX + 10)
+ _vm->_events->setMouseXY(_vm->_graphicsMan->_scrollPosX + 10, 0);
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_graphicsMan->_scrollStatus = 0;
+ }
+ _vm->_talkMan->handleAnswer(_vm->_globals->_saveData->_data[svLastZoneNum], _vm->_globals->_saveData->_data[svLastMouseCursor]);
+ } else {
+ _vm->_talkMan->handleForestAnswser(_vm->_globals->_saveData->_data[svLastZoneNum], _vm->_globals->_saveData->_data[svLastMouseCursor]);
+ }
+ _vm->_events->changeMouseCursor(4);
+ if (_zoneNum != -1 && _zoneNum != 0 && !_vm->_linesMan->_zone[_zoneNum]._enabledFl) {
+ _zoneNum = -1;
+ _forceZoneFl = true;
+ }
+ if (_zoneNum != _vm->_globals->_saveData->_data[svLastZoneNum] || _zoneNum == -1 || _zoneNum == 0) {
+ _vm->_events->_mouseCursorId = 4;
+ _changeVerbFl = false;
+ } else {
+ _vm->_events->_mouseCursorId = _vm->_globals->_saveData->_data[svLastMouseCursor];
+ if (_changeVerbFl) {
+ nextVerbIcon();
+ _changeVerbFl = false;
+ }
+ if (_vm->_events->_mouseCursorId == 5)
+ _vm->_events->_mouseCursorId = 4;
+ }
+ if (_vm->_events->_mouseCursorId != 23)
+ _vm->_events->changeMouseCursor(_vm->_events->_mouseCursorId);
+ _zoneNum = 0;
+ _vm->_globals->_saveData->_data[svLastMouseCursor] = 0;
+ _vm->_globals->_saveData->_data[svLastZoneNum] = 0;
+ }
+ if (_vm->_globals->_cityMapEnabledFl) {
+ _vm->_events->_mouseCursorId = 0;
+ _vm->_events->changeMouseCursor(0);
+ }
+ if (_vm->_globals->_freezeCharacterFl && _vm->_events->_mouseCursorId == 4) {
+ if (_zoneNum != -1 && _zoneNum != 0)
+ handleRightButton();
+ }
+ _vm->_globals->_actionMoveTo = false;
+}
+
+/**
+ * Clear Screen
+ */
+void ObjectsManager::clearScreen() {
+ clearSprite();
+ _vm->_graphicsMan->endDisplayBob();
+ _vm->_fontMan->hideText(5);
+ _vm->_fontMan->hideText(9);
+ clearVBob();
+ _vm->_animMan->clearAnim();
+ _vm->_linesMan->clearAllZones();
+ _vm->_linesMan->resetLines();
+ resetHidingItems();
+
+ for (int i = 0; i <= 48; i++) {
+ _vm->_linesMan->_bobZone[i] = 0;
+ _vm->_linesMan->_bobZoneFl[i] = false;
+ }
+ _vm->_events->_mouseCursorId = 4;
+ _verb = 4;
+ _zoneNum = 0;
+ _forceZoneFl = true;
+ _vm->_linesMan->resetLinesNumb();
+ _vm->_linesMan->resetLastLine();
+ _vm->_linesMan->_route = NULL;
+ _vm->_globals->_answerBuffer = _vm->_globals->freeMemory(_vm->_globals->_answerBuffer);
+ _vm->_globals->_levelSpriteBuf = _vm->_globals->freeMemory(_vm->_globals->_levelSpriteBuf);
+ _vm->_events->_startPos.x = 0;
+ _vm->_events->_mouseSpriteId = 0;
+ _vm->_globals->_saveData->_data[svLastMouseCursor] = 0;
+ _vm->_globals->_saveData->_data[svLastZoneNum] = 0;
+ _vm->_globals->_actionMoveTo = false;
+ _forceZoneFl = true;
+ _changeVerbFl = false;
+ _vm->_linesMan->_route = NULL;
+ _oldDirection = DIR_NONE;
+ _vm->_graphicsMan->resetDirtyRects();
+}
+
+/**
+ * Change the currently active player face / Head
+ * @param oldCharacter Previously played character
+ * @param newCharacter New character to play
+ */
+void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCharacter newCharacter) {
+ CharacterLocation *loc;
+
+ _changeHeadFl = true;
+ _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, 532, 25, 65, 40, _vm->_graphicsMan->_frontBuffer, 532, 25);
+ _vm->_graphicsMan->addDirtyRect(532, 25, 597, 65);
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_linesMan->_route = NULL;
+
+ if (oldCharacter == CHARACTER_SAMANTHA && newCharacter == CHARACTER_HOPKINS
+ && _vm->_globals->_saveData->_realHopkins._location == _vm->_globals->_screenId) {
+ _changeHeadFl = false;
+ loc = &_vm->_globals->_saveData->_samantha;
+ loc->_pos.x = getSpriteX(0);
+ loc->_pos.y = getSpriteY(0);
+ loc->_startSpriteIndex = 64;
+ loc->_location = _vm->_globals->_screenId;
+ loc->_zoomFactor = _sprite[0]._animationType;
+
+ removeSprite(1);
+ addStaticSprite(_headSprites, loc->_pos, 1, 3, loc->_zoomFactor, false, 20, 127);
+ animateSprite(1);
+ removeSprite(0);
+
+ _vm->_globals->_saveData->_data[svField354] = 0;
+ _vm->_globals->_saveData->_data[svField356] = 0;
+ _vm->_globals->_saveData->_data[svField357] = 1;
+
+ loc = &_vm->_globals->_saveData->_realHopkins;
+ _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("PERSO.SPR");
+ _vm->_globals->_characterType = 0;
+ addStaticSprite(_vm->_globals->_characterSpriteBuf, loc->_pos, 0, 64, loc->_zoomFactor, false, 34, 190);
+ animateSprite(0);
+ _vm->_globals->loadCharacterData();
+ } else if (oldCharacter == CHARACTER_HOPKINS && newCharacter == CHARACTER_SAMANTHA
+ && _vm->_globals->_saveData->_samantha._location == _vm->_globals->_screenId) {
+ _changeHeadFl = false;
+ loc = &_vm->_globals->_saveData->_realHopkins;
+ loc->_pos.x = getSpriteX(0);
+ loc->_pos.y = getSpriteY(0);
+ loc->_startSpriteIndex = 64;
+ loc->_location = _vm->_globals->_screenId;
+ loc->_zoomFactor = _sprite[0]._zoomFactor;
+
+ removeSprite(1);
+ addStaticSprite(_headSprites, loc->_pos, 1, 2, loc->_zoomFactor, false, 34, 190);
+ animateSprite(1);
+ removeSprite(0);
+
+ _vm->_globals->_saveData->_data[svField354] = 0;
+ _vm->_globals->_saveData->_data[svField356] = 1;
+ _vm->_globals->_saveData->_data[svField357] = 0;
+
+ loc = &_vm->_globals->_saveData->_samantha;
+ _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("PSAMAN.SPR");
+ _vm->_globals->_characterType = 2;
+ addStaticSprite(_vm->_globals->_characterSpriteBuf, loc->_pos, 0, 64, loc->_zoomFactor, false, 20, 127);
+ animateSprite(0);
+ _vm->_globals->loadCharacterData();
+ } else {
+ switch (oldCharacter) {
+ case CHARACTER_HOPKINS:
+ loc = &_vm->_globals->_saveData->_realHopkins;
+ loc->_pos.x = getSpriteX(0);
+ loc->_pos.y = getSpriteY(0);
+ loc->_startSpriteIndex = 64;
+ loc->_location = _vm->_globals->_screenId;
+ loc->_zoomFactor = _sprite[0]._zoomFactor;
+ break;
+ case CHARACTER_HOPKINS_CLONE:
+ loc = &_vm->_globals->_saveData->_cloneHopkins;
+ loc->_pos.x = getSpriteX(0);
+ loc->_pos.y = getSpriteY(0);
+ loc->_startSpriteIndex = 64;
+ loc->_location = _vm->_globals->_screenId;
+ loc->_zoomFactor = _sprite[0]._zoomFactor;
+ break;
+ case CHARACTER_SAMANTHA:
+ loc = &_vm->_globals->_saveData->_samantha;
+ loc->_pos.x = getSpriteX(0);
+ loc->_pos.y = getSpriteY(0);
+ loc->_startSpriteIndex = 64;
+ loc->_location = _vm->_globals->_screenId;
+ loc->_zoomFactor = _sprite[0]._zoomFactor;
+ break;
+ default:
+ break;
+ }
+
+ switch (newCharacter) {
+ case CHARACTER_HOPKINS:
+ _vm->_globals->_saveData->_data[svHopkinsCloneFl] = 0;
+ _vm->_globals->_saveData->_data[svField354] = 0;
+ _vm->_globals->_saveData->_data[svField356] = 0;
+ _vm->_globals->_saveData->_data[svField357] = 1;
+ _vm->_globals->_exitId = _vm->_globals->_saveData->_realHopkins._location;
+ break;
+ case CHARACTER_HOPKINS_CLONE:
+ _vm->_globals->_saveData->_data[svHopkinsCloneFl] = 1;
+ _vm->_globals->_saveData->_data[svField354] = 1;
+ _vm->_globals->_saveData->_data[svField356] = 0;
+ _vm->_globals->_saveData->_data[svField357] = 0;
+ _vm->_globals->_exitId = _vm->_globals->_saveData->_cloneHopkins._location;
+ break;
+ case CHARACTER_SAMANTHA:
+ _vm->_globals->_saveData->_data[svHopkinsCloneFl] = 0;
+ _vm->_globals->_saveData->_data[svField354] = 0;
+ _vm->_globals->_saveData->_data[svField356] = 1;
+ _vm->_globals->_saveData->_data[svField357] = 0;
+ _vm->_globals->_exitId = _vm->_globals->_saveData->_samantha._location;
+ break;
+ }
+ }
+}
+
+// Check Size
+void ObjectsManager::computeAndSetSpriteSize() {
+ int size = _vm->_globals->_spriteSize[getSpriteY(0)];
+ if (_vm->_globals->_characterType == 1) {
+ size = 20 * (5 * abs(size) - 100) / -80;
+ } else if (_vm->_globals->_characterType == 2) {
+ size = 20 * (5 * abs(size) - 165) / -67;
+ }
+ setSpriteZoom(0, size);
+}
+
+/**
+ * Get next verb icon (or text)
+ */
+void ObjectsManager::nextVerbIcon() {
+ _vm->_events->_mouseCursorId++;
+
+ for(;;) {
+ if (_vm->_events->_mouseCursorId == 4) {
+ if (!_vm->_globals->_freezeCharacterFl || _zoneNum == -1 || _zoneNum == 0)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 5 || _vm->_events->_mouseCursorId == 6) {
+ _vm->_events->_mouseCursorId = 6;
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl1 == 1)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 7) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl2 == 1)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 8) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl3 == 1)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 9) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl4 == 1)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 10) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl5 == 1)
+ return;
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 11) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl6 == 1)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 12) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl7 == 1)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 13) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl8 == 1)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 14) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl9 == 1)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 15) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl10 == 1)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 16) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl1 == 2)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 17) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl4 == 2)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 18) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl5 == 2)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 19) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl6 == 2)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 20) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl7 == 2)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 21) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl10 == 2)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 22) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl8 == 2)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 23) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl3 == 2)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 24) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl4 == 3)
+ return;
+
+ ++_vm->_events->_mouseCursorId;
+ }
+
+ if (_vm->_events->_mouseCursorId == 25) {
+ if (_vm->_linesMan->_zone[_zoneNum]._verbFl9 == 2)
+ return;
+ }
+ _vm->_events->_mouseCursorId = 4;
+ }
+}
+
+/**
+ * Handle Right button
+ */
+void ObjectsManager::handleRightButton() {
+ if (_zoneNum != -1 && _zoneNum != 0) {
+ nextVerbIcon();
+ if (_vm->_events->_mouseCursorId != 23)
+ _vm->_events->changeMouseCursor(_vm->_events->_mouseCursorId);
+ _verb = _vm->_events->_mouseCursorId;
+ }
+}
+
+/**
+ * Prepare border used to highlight the place below mouse cursor, in the inventory.
+ * Also set the mouse cursor
+ */
+void ObjectsManager::initBorder(int zoneIdx) {
+ _oldBorderPos = _borderPos;
+ _oldBorderSpriteIndex = _borderSpriteIndex;
+ if (zoneIdx >= 1 && zoneIdx <= 6)
+ _borderPos.y = 120;
+ else if (zoneIdx >= 7 && zoneIdx <= 12)
+ _borderPos.y = 158;
+ else if (zoneIdx >= 13 && zoneIdx <= 18)
+ _borderPos.y = 196;
+ else if (zoneIdx >= 19 && zoneIdx <= 24)
+ _borderPos.y = 234;
+ else if (zoneIdx >= 25 && zoneIdx <= 29)
+ _borderPos.y = 272;
+ else if (zoneIdx == 30)
+ _borderPos.y = 272;
+ else if (zoneIdx == 31)
+ _borderPos.y = 290;
+
+ if (zoneIdx == 1 || zoneIdx == 7 || zoneIdx == 13 || zoneIdx == 19 || zoneIdx == 25)
+ _borderPos.x = _vm->_graphicsMan->_scrollOffset + 158;
+ else if (zoneIdx == 2 || zoneIdx == 8 || zoneIdx == 14 || zoneIdx == 20 || zoneIdx == 26)
+ _borderPos.x = _vm->_graphicsMan->_scrollOffset + 212;
+ else if (zoneIdx == 3 || zoneIdx == 9 || zoneIdx == 15 || zoneIdx == 21 || zoneIdx == 27)
+ _borderPos.x = _vm->_graphicsMan->_scrollOffset + 266;
+ else if (zoneIdx == 4 || zoneIdx == 10 || zoneIdx == 16 || zoneIdx == 22 || zoneIdx == 28)
+ _borderPos.x = _vm->_graphicsMan->_scrollOffset + 320;
+ else if (zoneIdx == 5 || zoneIdx == 11 || zoneIdx == 17 || zoneIdx == 23 || zoneIdx == 29)
+ _borderPos.x = _vm->_graphicsMan->_scrollOffset + 374;
+ else if (zoneIdx == 6 || zoneIdx == 12 || zoneIdx == 18 || zoneIdx == 24 || zoneIdx == 30 || zoneIdx == 31)
+ _borderPos.x = _vm->_graphicsMan->_scrollOffset + 428;
+
+ if (zoneIdx >= 1 && zoneIdx <= 29)
+ _borderSpriteIndex = 0;
+ else if (zoneIdx == 30 || zoneIdx == 31)
+ _borderSpriteIndex = 2;
+ else if (!zoneIdx || zoneIdx == 32) {
+ _borderPos = Common::Point(0, 0);
+ _borderSpriteIndex = 0;
+ }
+
+ if (!zoneIdx)
+ _vm->_events->_mouseCursorId = 0;
+ else if (zoneIdx >= 1 && zoneIdx <= 28)
+ _vm->_events->_mouseCursorId = 8;
+ else if (zoneIdx == 29)
+ _vm->_events->_mouseCursorId = 1;
+ else if (zoneIdx == 30)
+ _vm->_events->_mouseCursorId = 2;
+ else if (zoneIdx == 31)
+ _vm->_events->_mouseCursorId = 3;
+ else if (zoneIdx == 32)
+ _vm->_events->_mouseCursorId = 16;
+
+ if (zoneIdx >= 1 && zoneIdx <= 28 && !_vm->_globals->_inventory[zoneIdx]) {
+ _vm->_events->_mouseCursorId = 0;
+ _borderPos = Common::Point(0, 0);
+ _borderSpriteIndex = 0;
+ }
+
+ if (_vm->_events->_mouseCursorId != 23)
+ _vm->_events->changeMouseCursor(_vm->_events->_mouseCursorId);
+ _vm->_events->getMouseX();
+ _vm->_events->getMouseY();
+}
+
+/**
+ * Get next icon for an object in the inventory
+ */
+void ObjectsManager::nextObjectIcon(int idx) {
+ int cursorId = _vm->_events->_mouseCursorId;
+ ObjectAuthIcon *curAuthIco = &_objectAuthIcons[_vm->_globals->_inventory[idx]];
+
+ if (cursorId == 0 || cursorId == 2 || cursorId == 3 || cursorId == 16)
+ return;
+
+ int nextCursorId = cursorId + 1;
+ if (nextCursorId > 25)
+ nextCursorId = 6;
+
+ do {
+ if (nextCursorId == 2 || nextCursorId == 5 || nextCursorId == 6) {
+ _vm->_events->_mouseCursorId = 6;
+ if (curAuthIco->_flag1 == 1)
+ return;
+ nextCursorId++;
+ }
+ if (nextCursorId == 7) {
+ _vm->_events->_mouseCursorId = 7;
+ if (curAuthIco->_flag2 == 1)
+ return;
+ nextCursorId++;
+ }
+ if (nextCursorId == 8) {
+ _vm->_events->_mouseCursorId = 8;
+ return;
+ }
+ if (nextCursorId == 9 || nextCursorId == 10) {
+ _vm->_events->_mouseCursorId = 10;
+ if (curAuthIco->_flag6 == 1)
+ return;
+ nextCursorId = 11;
+ }
+
+ if (nextCursorId == 11) {
+ _vm->_events->_mouseCursorId = 11;
+ if (curAuthIco->_flag3 == 1)
+ return;
+ nextCursorId++;
+ }
+
+ if (nextCursorId == 12 || nextCursorId == 13) {
+ _vm->_events->_mouseCursorId = 13;
+ if (curAuthIco->_flag4 == 1)
+ return;
+ nextCursorId = 14;
+ }
+
+ if (nextCursorId == 14 || nextCursorId == 15) {
+ _vm->_events->_mouseCursorId = 15;
+ if (curAuthIco->_flag5 == 1)
+ return;
+ nextCursorId = 23;
+ }
+
+ if (nextCursorId >= 16 && nextCursorId <= 23) {
+ _vm->_events->_mouseCursorId = 23;
+ if (curAuthIco->_flag5 == 2)
+ return;
+ nextCursorId = 24;
+ }
+
+ if (nextCursorId == 24 || nextCursorId == 25) {
+ _vm->_events->_mouseCursorId = 25;
+ }
+
+ nextCursorId = 6;
+ } while (curAuthIco->_flag6 != 2);
+}
+
+void ObjectsManager::takeInventoryObject(int idx) {
+ if (_vm->_events->_mouseCursorId == 8)
+ changeObject(idx);
+}
+
+void ObjectsManager::loadObjectIniFile() {
+ byte *data;
+ Common::String file;
+ int lastOpcodeResult = 1;
+
+ file = "OBJET1.ini";
+ bool fileFoundFl = false;
+ data = _vm->_fileIO->searchCat(file, RES_INI, fileFoundFl);
+ if (!fileFoundFl) {
+ data = _vm->_fileIO->loadFile(file);
+ if (data == NULL)
+ error("INI file %s not found", file.c_str());
+ }
+
+ if (READ_BE_UINT24(data) != MKTAG24('I', 'N', 'I'))
+ error("File %s is not an INI file", file.c_str());
+
+ for (;;) {
+ int opcodeType = _vm->_script->handleOpcode(data + 20 * lastOpcodeResult);
+ if (_vm->shouldQuit())
+ return;
+
+ if (opcodeType == 2)
+ lastOpcodeResult = _vm->_script->handleGoto(data + 20 * lastOpcodeResult);
+ else if (opcodeType == 3)
+ lastOpcodeResult = _vm->_script->handleIf(data, lastOpcodeResult);
+
+ if (lastOpcodeResult == -1)
+ error("defective IFF function");
+
+ if (opcodeType == 1 || opcodeType == 4)
+ ++lastOpcodeResult;
+ else if (!opcodeType || opcodeType == 5)
+ break;
+ }
+
+ _vm->_globals->freeMemory(data);
+}
+
+void ObjectsManager::handleSpecialGames() {
+ byte *oldPalette;
+
+ switch (_vm->_globals->_screenId) {
+ case 5:
+ if ((getSpriteY(0) > 399) || _vm->_globals->_saveData->_data[svField173])
+ break;
+
+ _vm->_globals->_saveData->_data[svField173] = 1;
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("flicspe1.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+
+ if (_vm->_globals->_censorshipFl)
+ break;
+
+ oldPalette = _vm->_globals->allocMemory(1000);
+ memcpy(oldPalette, _vm->_graphicsMan->_palette, 769);
+
+ _vm->_graphicsMan->backupScreen();
+
+ if (!_vm->_graphicsMan->_lineNbr)
+ _vm->_graphicsMan->_scrollOffset = 0;
+ _vm->_graphicsMan->displayScreen(true);
+ _vm->_soundMan->_specialSoundNum = 198;
+ _charactersEnabledFl = true;
+ _vm->_animMan->unsetClearAnimFlag();
+ _vm->_animMan->playAnim("otage.ANM", 1, 24, 500, true);
+ _vm->_soundMan->_specialSoundNum = 0;
+ _vm->_graphicsMan->displayScreen(false);
+
+ _vm->_graphicsMan->restoreScreen();
+
+ _charactersEnabledFl = false;
+ memcpy(_vm->_graphicsMan->_palette, oldPalette, 769);
+ _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette);
+ _vm->_globals->freeMemory(oldPalette);
+ _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_backBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ memcpy(_vm->_graphicsMan->_frontBuffer, _vm->_graphicsMan->_backBuffer, 614399);
+
+ _vm->_graphicsMan->_scrollStatus = 0;
+ _vm->_graphicsMan->updateScreen();
+ break;
+ case 20:
+ _vm->_globals->_saveData->_data[svField132] = (getSpriteX(0) > 65 && getSpriteX(0) <= 124 && getSpriteY(0) > 372 && getSpriteY(0) <= 398) ? 1 : 0;
+ break;
+ case 35:
+ if (_vm->_globals->_prevScreenId == 16)
+ handleForest(35, 500, 555, 100, 440, 1);
+ else if (_vm->_globals->_prevScreenId == 36)
+ handleForest(35, 6, 84, 100, 440, 4);
+ break;
+ case 36:
+ if (_vm->_globals->_prevScreenId == 35)
+ handleForest(36, 551, 633, 100, 440, 2);
+ else if (_vm->_globals->_prevScreenId == 37)
+ handleForest(36, 6, 84, 100, 440, 4);
+ break;
+ case 37:
+ if (_vm->_globals->_prevScreenId == 36)
+ handleForest(37, 551, 633, 100, 440, 1);
+ else if (_vm->_globals->_prevScreenId == 38)
+ handleForest(37, 392, 529, 100, 440, 2);
+ break;
+ case 38:
+ if (_vm->_globals->_prevScreenId == 37)
+ handleForest(38, 133, 252, 100, 440, 4);
+ else if (_vm->_globals->_prevScreenId == 39)
+ handleForest(38, 6, 84, 100, 440, 3);
+ break;
+ case 39:
+ if (_vm->_globals->_prevScreenId == 38)
+ handleForest(39, 551, 633, 100, 440, 2);
+ else if (_vm->_globals->_prevScreenId == 40)
+ handleForest(39, 6, 84, 100, 440, 3);
+ break;
+ case 40:
+ if (_vm->_globals->_prevScreenId == 39)
+ handleForest(40, 133, 252, 100, 440, 4);
+ else if (_vm->_globals->_prevScreenId == 41)
+ handleForest(40, 392, 529, 100, 440, 2);
+ break;
+ case 41:
+ if (_vm->_globals->_prevScreenId == 40)
+ handleForest(41, 551, 633, 100, 440, 1);
+ else if (_vm->_globals->_prevScreenId == 17)
+ handleForest(41, 6, 84, 100, 440, 3);
+ break;
+ case 57:
+ _vm->_globals->_disableInventFl = true;
+ if (_vm->_globals->_saveData->_data[svField261] == 1 && getBobAnimDataIdx(5) == 37) {
+ stopBobAnimation(5);
+ setBobAnimDataIdx(5, 0);
+ setBobAnimation(6);
+ _vm->_globals->_saveData->_data[svField261] = 2;
+ _vm->_linesMan->disableZone(15);
+ _vm->_soundMan->playSoundFile("SOUND75.WAV");
+ }
+ if (_vm->_globals->_saveData->_data[svField261] == 2 && getBobAnimDataIdx(6) == 6) {
+ stopBobAnimation(6);
+ setBobAnimDataIdx(6, 0);
+ setBobAnimation(7);
+ _vm->_linesMan->enableZone(14);
+ _vm->_globals->_saveData->_data[svField261] = 3;
+ }
+ _vm->_globals->_disableInventFl = false;
+ break;
+ case 93:
+ if (_vm->_globals->_saveData->_data[svField333])
+ break;
+
+ _vm->_globals->_disableInventFl = true;
+ do
+ _vm->_events->refreshScreenAndEvents();
+ while (getBobAnimDataIdx(8) != 3);
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("GM3.PE2");
+ stopBobAnimation(8);
+ _vm->_globals->_saveData->_data[svField333] = 1;
+ _vm->_globals->_disableInventFl = false;
+ break;
+ }
+}
+
+void ObjectsManager::quickDisplayBobSprite(int idx) {
+ int startPos = 10 * idx;
+ if (!READ_LE_UINT16(_vm->_talkMan->_characterAnim + startPos + 4))
+ return;
+
+ int xp = READ_LE_INT16(_vm->_talkMan->_characterAnim + startPos);
+ int yp = READ_LE_INT16(_vm->_talkMan->_characterAnim + startPos + 2);
+ int spriteIndex = _vm->_talkMan->_characterAnim[startPos + 8];
+
+ _vm->_graphicsMan->fastDisplay(_vm->_talkMan->_characterSprite, xp, yp, spriteIndex);
+}
+
+void ObjectsManager::initVbob(const byte *src, int idx, int xp, int yp, int frameIndex) {
+ if (idx > 29)
+ error("MAX_VBOB exceeded");
+
+ VBobItem *vbob = &VBob[idx];
+ if (vbob->_displayMode <= 1) {
+ vbob->_displayMode = 1;
+ vbob->_xp = xp;
+ vbob->_yp = yp;
+ vbob->_frameIndex = frameIndex;
+ vbob->_oldX = xp;
+ vbob->_oldY = yp;
+ vbob->_oldFrameIndex = frameIndex;
+ vbob->_spriteData = src;
+ vbob->_oldSpriteData = src;
+ vbob->_surface = _vm->_globals->freeMemory(vbob->_surface);
+ } else if (vbob->_displayMode == 2 || vbob->_displayMode == 4) {
+ vbob->_displayMode = 3;
+ vbob->_oldX = vbob->_xp;
+ vbob->_oldY = vbob->_yp;
+ vbob->_oldSpriteData = vbob->_spriteData;
+ vbob->_oldFrameIndex = vbob->_frameIndex;
+ vbob->_xp = xp;
+ vbob->_yp = yp;
+ vbob->_frameIndex = frameIndex;
+ vbob->_spriteData = src;
+ }
+}
+
+void ObjectsManager::disableVbob(int idx) {
+ if (idx > 29)
+ error("MAX_VBOB exceeded");
+
+ VBobItem *vbob = &VBob[idx];
+ if (vbob->_displayMode <= 1)
+ vbob->_displayMode = 0;
+ else
+ vbob->_displayMode = 4;
+}
+
+void ObjectsManager::doActionBack(int idx) {
+ if (_curGestureFile != 1) {
+ _gestureBuf = _vm->_globals->freeMemory(_gestureBuf);
+ _curGestureFile = 1;
+ _gestureBuf = _vm->_fileIO->loadFile("DOS.SPR");
+ }
+
+ switch (idx) {
+ case 1:
+ showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 8, false);
+ break;
+ case 2:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,-1,", 8, false);
+ break;
+ case 3:
+ showSpecialActionAnimation(_gestureBuf, "12,11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8);
+ break;
+ case 4:
+ showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,8,8,8,8,8,9,10,11,12,13,12,11,12,13,12,11,12,13,12,11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8, false);
+ break;
+ case 5:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20,21,-1,", 8, false);
+ break;
+ case 6:
+ showSpecialActionAnimation(_gestureBuf, "20,19,18,17,16,15,-1,", 8);
+ break;
+ case 7:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20,21,22,23,24,-1,", 8, false);
+ break;
+ case 8:
+ showSpecialActionAnimation(_gestureBuf, "23,22,21,20,19,18,17,16,15,-1,", 8);
+ break;
+ case 9:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20,21,22,23,24,-1,", 8, false);
+ break;
+ case 10:
+ showSpecialActionAnimation(_gestureBuf, "23,22,21,20,19,18,17,16,15,-1,", 8);
+ break;
+ }
+}
+
+void ObjectsManager::doActionRight(int idx) {
+ if (_curGestureFile != 3) {
+ _gestureBuf = _vm->_globals->freeMemory(_gestureBuf);
+ _curGestureFile = 3;
+ _gestureBuf = _vm->_fileIO->loadFile("PROFIL.SPR");
+ }
+
+ switch (idx) {
+ case 1:
+ showActionAnimation(_gestureBuf, "20,19,18,17,16,15,14,13,13,13,13,13,14,15,16,17,18,19,20,-1,", 8, false);
+ break;
+ case 2:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "1,2,3,4,5,6,7,8,-1,", 8, false);
+ break;
+ case 3:
+ showSpecialActionAnimation(_gestureBuf, "9,10,11,12,13,14,15,16,17,18,19,20,-1,", 8);
+ break;
+ case 4:
+ showActionAnimation(_gestureBuf, "1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1,-1,", 8, false);
+ break;
+ case 5:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "23,24,25,-1,", 8, false);
+ break;
+ case 6:
+ showSpecialActionAnimation(_gestureBuf, "24,,23,-1,", 8);
+ break;
+ case 7:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "23,24,25,26,27,-1,", 8, false);
+ break;
+ case 8:
+ showSpecialActionAnimation(_gestureBuf, "26,25,24,23,-1,", 8);
+ break;
+ case 9:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "23,24,25,26,27,28,29,-1,", 8, false);
+ break;
+ case 10:
+ showSpecialActionAnimation(_gestureBuf, "28,27,26,25,24,23,-1,", 8);
+ break;
+ }
+}
+
+void ObjectsManager::doActionDiagRight(int idx) {
+ if (_curGestureFile != 4) {
+ _gestureBuf = _vm->_globals->freeMemory(_gestureBuf);
+ _curGestureFile = 4;
+ _gestureBuf = _vm->_fileIO->loadFile("3Q.SPR");
+ }
+
+ switch (idx) {
+ case 1:
+ showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 8, false);
+ break;
+ case 2:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,-1,", 8, false);
+ break;
+ case 3:
+ showSpecialActionAnimation(_gestureBuf, "11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8);
+ break;
+ case 4:
+ showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,11,12,11,12,11,12,11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8, false);
+ break;
+ case 5:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,-1,", 8, false);
+ break;
+ case 6:
+ showSpecialActionAnimation(_gestureBuf, "17,16,15,-1,", 8);
+ break;
+ case 7:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20-1,", 8, false);
+ break;
+ case 8:
+ showSpecialActionAnimation(_gestureBuf, "19,18,17,16,15,-1,", 8);
+ break;
+ case 9:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20,21,-1,", 8, false);
+ break;
+ case 10:
+ showSpecialActionAnimation(_gestureBuf, "20,19,18,17,15,-1,", 8);
+ break;
+ }
+}
+
+void ObjectsManager::doActionFront(int idx) {
+ if (_curGestureFile != 2) {
+ _gestureBuf = _vm->_globals->freeMemory(_gestureBuf);
+ _curGestureFile = 2;
+ _gestureBuf = _vm->_fileIO->loadFile("FACE.SPR");
+ }
+
+ switch (idx) {
+ case 1:
+ showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,9,9,9,9,9,9,7,6,5,4,3,2,1,0,-1,", 8, false);
+ break;
+ case 2:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,-1,", 8, false);
+ break;
+ case 3:
+ showSpecialActionAnimation(_gestureBuf, "14,13,12,11,10,9,7,6,5,4,3,2,1,0,-1,", 8);
+ break;
+ case 4:
+ showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,9,10,11,12,13,14,13,12,11,10,9,7,6,5,4,3,2,1,0,-1,", 8, false);
+ break;
+ }
+}
+
+void ObjectsManager::doActionDiagLeft(int idx) {
+ if (_curGestureFile != 4) {
+ _gestureBuf = _vm->_globals->freeMemory(_gestureBuf);
+ _curGestureFile = 4;
+ _gestureBuf = _vm->_fileIO->loadFile("3Q.SPR");
+ }
+
+ switch (idx) {
+ case 1:
+ showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 8, true);
+ break;
+ case 2:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,-1,", 8, true);
+ break;
+ case 3:
+ showSpecialActionAnimation(_gestureBuf, "11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8);
+ break;
+ case 4:
+ showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,11,12,11,12,11,12,11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8, true);
+ break;
+ case 5:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,-1,", 8, true);
+ break;
+ case 6:
+ showSpecialActionAnimation(_gestureBuf, "17,16,15,-1,", 8);
+ break;
+ case 7:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20,-1,", 8, true);
+ break;
+ case 8:
+ showSpecialActionAnimation(_gestureBuf, "19,18,17,16,15,-1,", 8);
+ break;
+ case 9:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20,21,-1,", 8, true);
+ break;
+ case 10:
+ showSpecialActionAnimation(_gestureBuf, "20,19,18,17,15,-1,", 8);
+ break;
+ }
+}
+
+void ObjectsManager::doActionLeft(int idx) {
+ if (_curGestureFile != 3) {
+ _gestureBuf = _vm->_globals->freeMemory(_gestureBuf);
+ _curGestureFile = 3;
+ _gestureBuf = _vm->_fileIO->loadFile("PROFIL.SPR");
+ }
+
+ switch (idx) {
+ case 1:
+ showActionAnimation(_gestureBuf, "20,19,18,17,16,15,14,13,13,13,13,13,14,15,16,17,18,19,20,-1,", 8, true);
+ break;
+ case 2:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "1,2,3,4,5,6,7,8,-1,", 8, true);
+ break;
+ case 3:
+ showSpecialActionAnimation(_gestureBuf, "9,10,11,12,13,14,15,16,17,18,19,20,-1,", 8);
+ break;
+ case 4:
+ showActionAnimation(_gestureBuf, "1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1,-1,", 8, true);
+ break;
+ case 5:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "23,24,25,-1,", 8, true);
+ break;
+ case 6:
+ showSpecialActionAnimation(_gestureBuf, "24,,23,-1,", 8);
+ break;
+ case 7:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "23,24,25,26,27,-1,", 8, true);
+ break;
+ case 8:
+ showSpecialActionAnimation(_gestureBuf, "26,25,24,23,-1,", 8);
+ break;
+ case 9:
+ showSpecialActionAnimationWithFlip(_gestureBuf, "23,24,25,26,27,28,29,-1,", 8, true);
+ break;
+ case 10:
+ showSpecialActionAnimation(_gestureBuf, "28,27,26,25,24,23,-1,", 8);
+ break;
+ }
+}
+
+void ObjectsManager::setAndPlayAnim(int idx, int animIdx, int destPosi, bool animAction) {
+ // Set Hopkins animation and position
+ setBobAnimation(idx);
+ setBobAnimDataIdx(idx, animIdx);
+
+ // Make Hopkins walk to the expected place
+ do {
+ _vm->_events->refreshScreenAndEvents();
+ } while (destPosi != getBobAnimDataIdx(idx));
+
+ if (!animAction)
+ stopBobAnimation(idx);
+ else {
+ BobItem *bob = &_bob[idx];
+ _vm->_graphicsMan->fastDisplay(bob->_spriteData, bob->_oldX, bob->_oldY, bob->_frameIndex);
+ stopBobAnimation(idx);
+ _vm->_events->refreshScreenAndEvents();
+ }
+}
+
+int ObjectsManager::getBobAnimDataIdx(int idx) {
+ return _bob[idx]._animDataIdx / 5;
+}
+
+void ObjectsManager::setBobAnimDataIdx(int idx, int animIdx) {
+ BobItem *bob = &_bob[idx];
+ bob->_animDataIdx = 5 * animIdx;
+ bob->_moveChange1 = 0;
+ bob->_moveChange2 = 0;
+}
+
+/**
+ * Set Hopkins animation
+ */
+void ObjectsManager::setBobAnimation(int idx) {
+ BobItem *bob = &_bob[idx];
+ if (!bob->_disabledAnimationFl)
+ return;
+
+ bob->_disabledAnimationFl = false;
+ bob->_animDataIdx = 5;
+ bob->_frameIndex = 250;
+ bob->_moveChange1 = 0;
+ bob->_moveChange2 = 0;
+}
+
+/**
+ * Stop Hopkins animation
+ */
+void ObjectsManager::stopBobAnimation(int idx) {
+ _bob[idx]._disabledAnimationFl = true;
+}
+
+/**
+ * Get X position
+ */
+int ObjectsManager::getBobPosX(int idx) {
+ return _bob[idx]._xp;
+}
+
+void ObjectsManager::loadLinkFile(const Common::String &file, bool skipDetails) {
+ Common::File f;
+ Common::String filename = file + ".LNK";
+ bool fileFoundFl = false;
+ byte *ptr = _vm->_fileIO->searchCat(filename, RES_LIN, fileFoundFl);
+ size_t nbytes = _vm->_fileIO->_catalogSize;
+ if (!fileFoundFl) {
+ if (!f.open(filename))
+ error("Error opening file - %s", filename.c_str());
+
+ nbytes = f.size();
+ ptr = _vm->_globals->allocMemory(nbytes);
+ if (ptr == NULL)
+ error("INILINK");
+ _vm->_fileIO->readStream(f, ptr, nbytes);
+ f.close();
+ }
+ if (!skipDetails) {
+ for (int idx = 0; idx < 500; ++idx)
+ _vm->_globals->_spriteSize[idx] = READ_LE_INT16((uint16 *)ptr + idx);
+
+ resetHidingItems();
+
+ Common::String filename2 = Common::String((const char *)ptr + 1000);
+ if (!filename2.empty()) {
+ fileFoundFl = false;
+ _hidingItemData[1] = _vm->_fileIO->searchCat(filename2, RES_SLI, fileFoundFl);
+
+ if (!fileFoundFl) {
+ _hidingItemData[1] = _vm->_fileIO->loadFile(filename2);
+ } else {
+ _hidingItemData[1] = _vm->_fileIO->loadFile("RES_SLI.RES");
+ }
+
+ int curDataCacheId = 60;
+ byte *curDataPtr = ptr + 1000;
+ for (int hidingIdx = 0; hidingIdx <= 21; hidingIdx++) {
+ HidingItem *hid = &_hidingItem[hidingIdx];
+ int curSpriteId = READ_LE_INT16(curDataPtr + 2 * curDataCacheId);
+ hid->_spriteIndex = curSpriteId;
+ hid->_x = READ_LE_INT16(curDataPtr + 2 * curDataCacheId + 2);
+ hid->_y = READ_LE_INT16(curDataPtr + 2 * curDataCacheId + 4);
+ hid->_yOffset = READ_LE_INT16(curDataPtr + 2 * curDataCacheId + 8);
+
+ if (!_hidingItemData[1]) {
+ hid->_useCount = 0;
+ } else {
+ hid->_spriteData = _hidingItemData[1];
+ hid->_width = getWidth(_hidingItemData[1], curSpriteId);
+ hid->_height = getHeight(_hidingItemData[1], curSpriteId);
+ hid->_useCount = 1;
+ }
+ if (!hid->_x && !hid->_y && !hid->_spriteIndex)
+ hid->_useCount = 0;
+
+ curDataCacheId += 5;
+ }
+ enableHidingBehavior();
+ }
+ }
+
+ _vm->_linesMan->resetLines();
+ for (size_t idx = 0; idx < nbytes - 3; idx++) {
+ if (READ_BE_UINT24(&ptr[idx]) == MKTAG24('O', 'B', '2')) {
+ byte *curDataPtr = &ptr[idx + 4];
+ int lineDataIdx = 0;
+ int curLineIdx = 0;
+ _vm->_linesMan->resetLinesNumb();
+ Directions curDirection;
+ do {
+ curDirection = (Directions)READ_LE_INT16(curDataPtr + 2 * lineDataIdx);
+ if (curDirection != DIR_NONE) {
+ _vm->_linesMan->addLine(
+ curLineIdx,
+ curDirection,
+ READ_LE_INT16(curDataPtr + 2 * lineDataIdx + 2),
+ READ_LE_INT16(curDataPtr + 2 * lineDataIdx + 4),
+ READ_LE_INT16(curDataPtr + 2 * lineDataIdx + 6),
+ READ_LE_INT16(curDataPtr + 2 * lineDataIdx + 8));
+ }
+ lineDataIdx += 5;
+ ++curLineIdx;
+ } while (curDirection != DIR_NONE);
+ _vm->_linesMan->initRoute();
+ }
+ }
+
+ if (!skipDetails) {
+ for (size_t idx = 0; idx < nbytes - 3; idx++) {
+ if (READ_BE_UINT24(&ptr[idx]) == MKTAG24('Z', 'O', '2')) {
+ byte *curDataPtr = &ptr[idx + 4];
+ int curDataIdx = 0;
+ for (int i = 1; i <= 100; i++) {
+ ZoneItem *curZone = &_vm->_linesMan->_zone[i];
+ curZone->_destX = 0;
+ curZone->_destY = 0;
+ curZone->_spriteIndex = 0;
+ curZone->_verbFl1 = 0;
+ curZone->_verbFl2 = 0;
+ curZone->_verbFl3 = 0;
+ curZone->_verbFl4 = 0;
+ curZone->_verbFl5 = 0;
+ curZone->_verbFl6 = 0;
+ curZone->_verbFl7 = 0;
+ curZone->_verbFl8 = 0;
+ curZone->_verbFl9 = 0;
+ curZone->_verbFl10 = 0;
+ curZone->_messageId = 0;
+ }
+
+ int curLineIdx = 0;
+ for (;;) {
+ int bobZoneId = READ_LE_INT16(curDataPtr + 2 * curDataIdx);
+ if (bobZoneId != -1) {
+ _vm->_linesMan->addZoneLine(
+ curLineIdx,
+ READ_LE_INT16(curDataPtr + 2 * curDataIdx + 2),
+ READ_LE_INT16(curDataPtr + 2 * curDataIdx + 4),
+ READ_LE_INT16(curDataPtr + 2 * curDataIdx + 6),
+ READ_LE_INT16(curDataPtr + 2 * curDataIdx + 8),
+ bobZoneId);
+ _vm->_linesMan->_zone[bobZoneId]._enabledFl = true;
+ }
+ curDataIdx += 5;
+ ++curLineIdx;
+ if (bobZoneId == -1)
+ break;
+ }
+ for (int i = 1; i <= 100; i++) {
+ ZoneItem *curZone = &_vm->_linesMan->_zone[i];
+ curZone->_destX = READ_LE_INT16(curDataPtr + 2 * curDataIdx);
+ curZone->_destY = READ_LE_INT16(curDataPtr + 2 * curDataIdx + 2);
+ curZone->_spriteIndex = READ_LE_INT16(curDataPtr + 2 * curDataIdx + 4);
+ curDataIdx += 3;
+ }
+
+ byte *verbData = ptr + idx + (10 * curLineIdx + 606) + 4;
+ for (int i = 1; i <= 100; i++) {
+ int j = (i - 1) * 10;
+ ZoneItem *curZone = &_vm->_linesMan->_zone[i];
+ curZone->_verbFl1 = verbData[j];
+ curZone->_verbFl2 = verbData[j + 1];
+ curZone->_verbFl3 = verbData[j + 2];
+ curZone->_verbFl4 = verbData[j + 3];
+ curZone->_verbFl5 = verbData[j + 4];
+ curZone->_verbFl6 = verbData[j + 5];
+ curZone->_verbFl7 = verbData[j + 6];
+ curZone->_verbFl8 = verbData[j + 7];
+ curZone->_verbFl9 = verbData[j + 8];
+ curZone->_verbFl10 = verbData[j + 9];
+ }
+ int dep = 1010;
+ for (int i = 1; i <= 100; i++) {
+ _vm->_linesMan->_zone[i]._messageId = READ_LE_INT16(verbData + dep);
+ dep += 2;
+ }
+ _vm->_linesMan->initSquareZones();
+ }
+ }
+ }
+ _vm->_globals->freeMemory(ptr);
+}
+
+void ObjectsManager::sceneSpecialIni() {
+ switch (_vm->_globals->_screenId) {
+ case 17:
+ if (_vm->_globals->_prevScreenId == 20) {
+ _vm->_globals->_disableInventFl = true;
+ _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0);
+ for (int i = 0; i <= 4; i++)
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_graphicsMan->fadeInLong();
+ animateSprite(0);
+ for (int i = 0; i <= 4; i++)
+ _vm->_events->refreshScreenAndEvents();
+ initVbob(_vm->_globals->_levelSpriteBuf, 5, 15, 28, 1);
+ _vm->_fontMan->hideText(9);
+ bool displayedTxtFl = false;
+ if (!_vm->_soundMan->_textOffFl) {
+ _vm->_fontMan->initTextBuffers(9, 383, _vm->_globals->_textFilename, 220, 72, 6, 36, 253);
+ _vm->_fontMan->showText(9);
+ displayedTxtFl = true;
+ }
+ if (!_vm->_soundMan->_voiceOffFl)
+ _vm->_soundMan->mixVoice(383, 4, displayedTxtFl);
+ _vm->_globals->_saveData->_data[svField270] = 1;
+ _vm->_globals->_saveData->_data[svField300] = 1;
+ _vm->_globals->_saveData->_data[svField320] = 1;
+ if (_vm->_soundMan->_voiceOffFl) {
+ for (int i = 0; i <= 199; i++)
+ _vm->_events->refreshScreenAndEvents();
+ }
+ _vm->_fontMan->hideText(9);
+ disableVbob(5);
+ for (int i = 0; i <= 3; i++)
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_graphicsMan->_noFadingFl = true;
+ _vm->_globals->_disableInventFl = false;
+ }
+ break;
+
+ case 18:
+ if (_vm->_globals->_prevScreenId == 17) {
+ _vm->_events->_mouseSpriteId = 4;
+ for (int i = 0; i <= 4; i++)
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_graphicsMan->fadeInLong();
+ _vm->_globals->_eventMode = EVENTMODE_IGNORE;
+ _vm->_globals->_disableInventFl = false;
+ _vm->_graphicsMan->_noFadingFl = true;
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("MAGE1.pe2");
+ _vm->_graphicsMan->_noFadingFl = true;
+ _vm->_globals->_disableInventFl = false;
+ }
+ break;
+
+ case 35:
+ case 36:
+ case 37:
+ case 38:
+ case 39:
+ case 40:
+ case 41:
+ _vm->_linesMan->_bobZone[20] = 1;
+ _vm->_linesMan->_bobZone[21] = 2;
+ _vm->_linesMan->_bobZone[22] = 3;
+ _vm->_linesMan->_bobZone[23] = 4;
+ _vm->_linesMan->_bobZoneFl[20] = true;
+ _vm->_linesMan->_bobZoneFl[21] = true;
+ _vm->_linesMan->_bobZoneFl[22] = true;
+ _vm->_linesMan->_bobZoneFl[23] = true;
+ enableVerb(20, 5);
+ enableVerb(21, 5);
+ enableVerb(22, 5);
+ enableVerb(23, 5);
+ _vm->_linesMan->_zone[20]._messageId = 30;
+ _vm->_linesMan->_zone[21]._messageId = 30;
+ _vm->_linesMan->_zone[22]._messageId = 30;
+ _vm->_linesMan->_zone[23]._messageId = 30;
+ for (int i = svField200; i <= svField214; i++) {
+ if (_vm->_globals->_saveData->_data[i] != 2)
+ _vm->_globals->_saveData->_data[i] = 0;
+ }
+ break;
+
+ case 73:
+ if (!_vm->_globals->_saveData->_data[svSecondElevatorAvailableFl]) {
+ resetHidingUseCount(0);
+ resetHidingUseCount(1);
+ }
+ break;
+
+ case 93:
+ if (!_vm->_globals->_saveData->_data[svField333])
+ setBobAnimation(8);
+ break;
+ }
+}
+
+void ObjectsManager::setMultiBobAnim(int idx1, int idx2, int anim1Idx, int anim2Idx) {
+ if (idx1 != -1)
+ setBobAnimation(idx1);
+ if (idx2 != -1)
+ setBobAnimation(idx2);
+ if (idx1 != -1)
+ setBobAnimDataIdx(idx1, anim1Idx);
+ if (idx2 != -1)
+ setBobAnimDataIdx(idx2, anim2Idx);
+}
+
+void ObjectsManager::checkEventBobAnim(int idx, int animIdx, int animDataIdx, int a4) {
+ _vm->_events->_curMouseButton = 0;
+ _vm->_events->_mouseButton = 0;
+
+ if (a4 != 3) {
+ setBobAnimation(idx);
+ setBobAnimDataIdx(idx, animIdx);
+ }
+
+ do {
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_events->_curMouseButton)
+ break;
+ } while (animDataIdx != getBobAnimDataIdx(idx));
+ if (!a4)
+ stopBobAnimation(idx);
+}
+
+void ObjectsManager::disableVerb(int idx, int a2) {
+ ZoneItem *curZone = &_vm->_linesMan->_zone[idx];
+ switch (a2) {
+ case 6:
+ case 16:
+ curZone->_verbFl1 = 0;
+ break;
+ case 7:
+ curZone->_verbFl2 = 0;
+ break;
+ case 5:
+ case 8:
+ curZone->_verbFl3 = 0;
+ break;
+ case 9:
+ case 17:
+ case 24:
+ curZone->_verbFl4 = 0;
+ break;
+ case 10:
+ case 18:
+ curZone->_verbFl5 = 0;
+ break;
+ case 11:
+ case 19:
+ curZone->_verbFl6 = 0;
+ break;
+ case 12:
+ case 20:
+ curZone->_verbFl7 = 0;
+ break;
+ case 13:
+ case 22:
+ curZone->_verbFl8 = 0;
+ case 14:
+ case 21:
+ case 25:
+ curZone->_verbFl9 = 0;
+ break;
+ case 15:
+ curZone->_verbFl10 = 0;
+ break;
+ }
+ _changeVerbFl = true;
+}
+
+void ObjectsManager::enableVerb(int idx, int a2) {
+ ZoneItem *curZone = &_vm->_linesMan->_zone[idx];
+
+ switch (a2) {
+ case 5:
+ curZone->_verbFl3 = 2;
+ break;
+ case 6:
+ curZone->_verbFl1 = 1;
+ break;
+ case 7:
+ curZone->_verbFl2 = 1;
+ break;
+ case 8:
+ curZone->_verbFl3 = 1;
+ break;
+ case 9:
+ curZone->_verbFl4 = 1;
+ break;
+ case 10:
+ curZone->_verbFl5 = 1;
+ break;
+ case 11:
+ curZone->_verbFl6 = 1;
+ break;
+ case 12:
+ curZone->_verbFl7 = 1;
+ break;
+ case 13:
+ curZone->_verbFl8 = 1;
+ break;
+ case 14:
+ curZone->_verbFl8 = 1;
+ break;
+ case 15:
+ curZone->_verbFl9 = 1;
+ break;
+ case 16:
+ curZone->_verbFl1 = 2;
+ break;
+ case 17:
+ curZone->_verbFl4 = 2;
+ break;
+ case 18:
+ curZone->_verbFl5 = 2;
+ break;
+ case 19:
+ curZone->_verbFl6 = 2;
+ break;
+ case 20:
+ curZone->_verbFl7 = 2;
+ break;
+ case 21:
+ curZone->_verbFl9 = 2;
+ break;
+ case 22:
+ curZone->_verbFl8 = 2;
+ break;
+ case 24:
+ curZone->_verbFl4 = 3;
+ break;
+ case 25:
+ curZone->_verbFl9 = 2;
+ break;
+ }
+}
+
+void ObjectsManager::showActionAnimation(const byte *spriteData, const Common::String &actionStr, int speed, bool flipFl) {
+ Common::String tmpStr = "";
+ int realSpeed = speed;
+ if (_vm->_globals->_speed == 2)
+ realSpeed = speed / 2;
+ else if (_vm->_globals->_speed == 3)
+ realSpeed = speed / 3;
+ const byte *oldSpriteData = _sprite[0]._spriteData;
+ int spriteIndex = _sprite[0]._spriteIndex;
+ bool oldFlipFl = _sprite[0]._flipFl;
+ _sprite[0]._flipFl = flipFl;
+
+ int idx = 0;
+ for (int strPos = 0; ; strPos++) {
+ bool tokenCompleteFl = false;
+ char curChar = actionStr[strPos];
+ if (curChar == ',') {
+ idx = atoi(tmpStr.c_str());
+ tmpStr = "";
+ tokenCompleteFl = true;
+ } else {
+ tmpStr += curChar;
+ }
+
+ if (tokenCompleteFl) {
+ if (idx == -1) {
+ _sprite[0]._spriteData = oldSpriteData;
+ _sprite[0]._spriteIndex = spriteIndex;
+ _sprite[0]._flipFl = oldFlipFl;
+ } else {
+ _sprite[0]._spriteData = spriteData;
+ _sprite[0]._spriteIndex = idx;
+ }
+ for (int i = 0; i < realSpeed; i++)
+ _vm->_events->refreshScreenAndEvents();
+ if (idx == -1)
+ break;
+ }
+ }
+}
+
+void ObjectsManager::showSpecialActionAnimationWithFlip(const byte *spriteData, const Common::String &animationSeq, int speed, bool flipFl) {
+ Common::String tmpStr = "";
+
+ int realSpeed = speed;
+ if (_vm->_globals->_speed == 2)
+ realSpeed = speed / 2;
+ else if (_vm->_globals->_speed == 3)
+ realSpeed = speed / 3;
+
+ _oldSpriteData = _sprite[0]._spriteData;
+ _oldSpriteIndex = _sprite[0]._spriteIndex;
+ _oldFlipFl = _sprite[0]._flipFl;
+ _sprite[0]._flipFl = flipFl;
+
+ uint strPos = 0;
+ int spriteIndex = 0;
+ do {
+ bool completeTokenFl = false;
+ do {
+ char nextChar = animationSeq[strPos];
+ if ((animationSeq[strPos] == ',') || (strPos == animationSeq.size() - 1)) {
+ // Safeguard: if the sequence doesn't end with a coma, simulate it's present.
+ if (animationSeq[strPos] != ',')
+ tmpStr += nextChar;
+ spriteIndex = atoi(tmpStr.c_str());
+ tmpStr = "";
+ completeTokenFl = true;
+ } else {
+ tmpStr += nextChar;
+ }
+ ++strPos;
+ } while (!completeTokenFl);
+
+ if (spriteIndex != -1) {
+ _sprite[0]._spriteData = spriteData;
+ _sprite[0]._spriteIndex = spriteIndex;
+ }
+ for (int i = 0; i < realSpeed; i++)
+ _vm->_events->refreshScreenAndEvents();
+ } while (spriteIndex != -1);
+}
+
+void ObjectsManager::showSpecialActionAnimation(const byte *spriteData, const Common::String &animString, int speed) {
+ Common::String tmpStr = "";
+ int realSpeed = speed;
+ if (_vm->_globals->_speed == 2)
+ realSpeed = speed / 2;
+ else if (_vm->_globals->_speed == 3)
+ realSpeed = speed / 3;
+
+ int spriteIndex = 0;
+ bool completeTokenFl;
+ char nextChar;
+
+ for (int idx = 0; ; idx++) {
+ completeTokenFl = false;
+ nextChar = animString[idx];
+ if (nextChar == ',') {
+ spriteIndex = atoi(tmpStr.c_str());
+ tmpStr = "";
+ completeTokenFl = true;
+ } else {
+ tmpStr += nextChar;
+ }
+
+ if (completeTokenFl) {
+ if (spriteIndex == -1) {
+ _sprite[0]._spriteData = _oldSpriteData;
+ _sprite[0]._spriteIndex = _oldSpriteIndex;
+ _sprite[0]._flipFl = _oldFlipFl;
+ } else {
+ _sprite[0]._spriteData = spriteData;
+ _sprite[0]._spriteIndex = spriteIndex;
+ }
+
+ for (int i = 0; i < realSpeed; i++)
+ _vm->_events->refreshScreenAndEvents();
+
+ if (spriteIndex == -1)
+ break;
+ }
+ }
+}
+
+void ObjectsManager::handleForest(int screenId, int minX, int maxX, int minY, int maxY, int idx) {
+ int savegameIdx = screenId;
+ if (_vm->_globals->_screenId != screenId)
+ return;
+
+ switch (_vm->_globals->_screenId) {
+ case 35:
+ if (idx > 2)
+ savegameIdx = 201;
+ else
+ savegameIdx = 200;
+ break;
+ case 36:
+ if (idx > 2)
+ savegameIdx = 203;
+ else
+ savegameIdx = 202;
+ break;
+ case 37:
+ if (idx > 2)
+ savegameIdx = 205;
+ else
+ savegameIdx = 204;
+ break;
+ case 38:
+ if (idx > 2)
+ savegameIdx = 207;
+ else
+ savegameIdx = 206;
+ break;
+ case 39:
+ if (idx > 2)
+ savegameIdx = 209;
+ else
+ savegameIdx = 208;
+ break;
+ case 40:
+ if (idx > 2)
+ savegameIdx = 211;
+ else
+ savegameIdx = 210;
+ break;
+ case 41:
+ if (idx > 2)
+ savegameIdx = 213;
+ else
+ savegameIdx = 212;
+ break;
+ }
+
+ if (_vm->_globals->_saveData->_data[savegameIdx] == 2)
+ return;
+
+ if (_vm->_globals->_saveData->_data[savegameIdx]) {
+ if (_vm->_globals->_saveData->_data[savegameIdx] == 1) {
+ if (((idx == 1 || idx == 2) && getBobAnimDataIdx(idx) == 26) || ((idx == 3 || idx == 4) && getBobAnimDataIdx(idx) == 27)) {
+ _vm->_dialog->disableInvent();
+ _vm->_soundMan->playSample(1);
+ _vm->_globals->_saveData->_data[savegameIdx] = 4;
+ }
+ }
+ if (_vm->_globals->_saveData->_data[savegameIdx] == 4) {
+ if (idx >= 1 && idx <= 4 && getBobAnimDataIdx(idx) > 30)
+ _vm->_globals->_saveData->_data[savegameIdx] = 3;
+ }
+ if (_vm->_globals->_saveData->_data[savegameIdx] == 3) {
+ _vm->_graphicsMan->_fadingFl = true;
+ _vm->_animMan->playAnim("CREVE2.ANM", 100, 24, 500);
+ _vm->_globals->_exitId = 150;
+ _vm->_graphicsMan->_noFadingFl = true;
+ hideBob(1);
+ hideBob(2);
+ hideBob(3);
+ hideBob(4);
+ }
+ } else if (minX < getSpriteX(0)
+ && maxX > getSpriteX(0)
+ && minY < getSpriteY(0)
+ && maxY > getSpriteY(0)) {
+ if (idx >= 1 && idx <= 4)
+ setBobAnimation(idx);
+ _vm->_globals->_saveData->_data[savegameIdx] = 1;
+ }
+}
+
+void ObjectsManager::lockAnimX(int idx, int x) {
+ _lockedAnims[idx]._enableFl = true;
+ _lockedAnims[idx]._posX = x;
+}
+
+/**
+ * Game scene control method
+ */
+void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Common::String &linkFile,
+ const Common::String &animFile, const Common::String &s4, int soundNum, bool initializeScreen) {
+ _vm->_dialog->_inventFl = false;
+ _vm->_events->_gameKey = KEY_NONE;
+ _vm->_dialog->enableInvent();
+ _vm->_graphicsMan->_scrollOffset = 0;
+ _vm->_globals->_cityMapEnabledFl = false;
+ _vm->_globals->_eventMode = EVENTMODE_IGNORE;
+ _vm->_soundMan->playSound(soundNum);
+ _vm->_linesMan->_route = NULL;
+ _vm->_globals->_freezeCharacterFl = true;
+ _vm->_globals->_exitId = 0;
+ if (!backgroundFile.empty())
+ _vm->_graphicsMan->loadImage(backgroundFile);
+ if (!linkFile.empty())
+ loadLinkFile(linkFile);
+ if (!animFile.empty())
+ _vm->_animMan->loadAnim(animFile);
+ _vm->_graphicsMan->displayAllBob();
+ if (!s4.empty()) {
+ if (initializeScreen)
+ _vm->_graphicsMan->initScreen(s4, 0, initializeScreen);
+ else
+ _vm->_graphicsMan->initScreen(s4, 2, initializeScreen);
+ }
+ _vm->_events->mouseOn();
+ if (_vm->_globals->_screenId == 61) {
+ addStaticSprite(_vm->_globals->_characterSpriteBuf, Common::Point(330, 418), 0, 60, 0, false, 34, 190);
+ animateSprite(0);
+ _vm->_linesMan->_route = NULL;
+ computeAndSetSpriteSize();
+ }
+ _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0);
+ _vm->_events->changeMouseCursor(4);
+ for (int i = 0; i <= 4; i++)
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_graphicsMan->fadeInLong();
+ if (_vm->_globals->_screenId == 61) {
+ _vm->_animMan->playSequence("OUVRE.SEQ", 10, 4, 10, false, false);
+ stopBobAnimation(3);
+ _vm->_globals->_checkDistanceFl = true;
+ _oldCharacterPosX = getSpriteX(0);
+ _oldDirection = DIR_NONE;
+ _homeRateCounter = 0;
+ _vm->_linesMan->_route = NULL;
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(getSpriteX(0), getSpriteY(0), 330, 345);
+ _vm->_globals->_checkDistanceFl = true;
+ do {
+ GOHOME();
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_linesMan->_route);
+ setSpriteIndex(0, 64);
+ }
+ do {
+ int mouseButton = _vm->_events->getMouseButton();
+ if (mouseButton == 1) {
+ handleLeftButton();
+ mouseButton = 1;
+ } else if (mouseButton == 2)
+ handleRightButton();
+ _vm->_dialog->testDialogOpening();
+ _vm->_linesMan->checkZone();
+ if (_vm->_globals->_actionMoveTo)
+ PARADISE();
+ if (!_vm->_globals->_exitId)
+ _vm->_events->refreshScreenAndEvents();
+
+ if (_vm->_globals->_exitId)
+ break;
+ } while (!_vm->shouldQuit());
+ if (_vm->shouldQuit())
+ return;
+
+ _vm->_graphicsMan->fadeOutLong();
+ if (!animFile.empty())
+ _vm->_graphicsMan->endDisplayBob();
+ if (_vm->_globals->_screenId == 61)
+ removeSprite(0);
+ clearScreen();
+ _vm->_globals->_eventMode = EVENTMODE_DEFAULT;
+}
+
+/**
+ * Game scene control method
+ */
+void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Common::String &linkFile,
+ const Common::String &animFile, const Common::String &s4, int soundNum, bool initializeScreen) {
+ _vm->_dialog->_inventFl = false;
+ _vm->_events->_gameKey = KEY_NONE;
+ _verb = 4;
+ _vm->_graphicsMan->_scrollOffset = 0;
+ _vm->_dialog->enableInvent();
+ _vm->_globals->_cityMapEnabledFl = false;
+ _vm->_graphicsMan->_noFadingFl = false;
+ _vm->_globals->_freezeCharacterFl = false;
+ _vm->_globals->_exitId = 0;
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_soundMan->playSound(soundNum);
+ _vm->_globals->_eventMode = EVENTMODE_IGNORE;
+ if (!backgroundFile.empty())
+ _vm->_graphicsMan->loadImage(backgroundFile);
+ if (!linkFile.empty())
+ loadLinkFile(linkFile);
+ if (!animFile.empty()) {
+ _vm->_animMan->loadAnim(animFile);
+ _vm->_graphicsMan->displayAllBob();
+ }
+ if (!s4.empty()) {
+ if (initializeScreen)
+ _vm->_graphicsMan->initScreen(s4, 0, initializeScreen);
+ else
+ _vm->_graphicsMan->initScreen(s4, 2, initializeScreen);
+ }
+ _vm->_events->mouseOn();
+ _vm->_events->_mouseCursorId = 4;
+ _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0);
+ if (_vm->_globals->_characterType) {
+ if (!_vm->_globals->_saveData->_data[svAlternateSpriteFl] && !_vm->_globals->_saveData->_data[svField356]) {
+ _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("PERSO.SPR");
+ _vm->_globals->_characterType = 0;
+ }
+ }
+ if (!_vm->_globals->_characterType && _vm->_globals->_saveData->_data[svAlternateSpriteFl] == 1) {
+ _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("HOPFEM.SPR");
+ _vm->_globals->_characterType = 1;
+ }
+
+ if (_vm->_globals->_characterType != 2 && _vm->_globals->_saveData->_data[svField356] == 1) {
+ _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("PSAMAN.SPR");
+ _vm->_globals->_characterType = 2;
+ }
+ _vm->_globals->loadCharacterData();
+ switch (_vm->_globals->_characterType) {
+ case 0:
+ addStaticSprite(_vm->_globals->_characterSpriteBuf, _characterPos, 0, _startSpriteIndex, 0, false, 34, 190);
+ break;
+ case 1:
+ addStaticSprite(_vm->_globals->_characterSpriteBuf, _characterPos, 0, _startSpriteIndex, 0, false, 28, 155);
+ break;
+ case 2:
+ addStaticSprite(_vm->_globals->_characterSpriteBuf, _characterPos, 0, _startSpriteIndex, 0, false, 20, 127);
+ break;
+ }
+ _vm->_events->setMouseXY(_characterPos);
+ if (_vm->_graphicsMan->_largeScreenFl)
+ _vm->_graphicsMan->_scrollPosX = (int16)getSpriteX(0) - 320;
+ computeAndSetSpriteSize();
+ animateSprite(0);
+ enableHidingBehavior();
+ _vm->_linesMan->_route = NULL;
+ computeAndSetSpriteSize();
+ sceneSpecialIni();
+ _vm->_events->_mouseSpriteId = 4;
+ _oldCharacterPosX = _characterPos.x;
+ _oldCharacterPosY = _characterPos.y;
+ _oldDirection = DIR_NONE;
+ _homeRateCounter = 0;
+
+ for (int idx = 0; idx < 5; ++idx)
+ _vm->_events->refreshScreenAndEvents();
+
+ _vm->_globals->_eventMode = EVENTMODE_IGNORE;
+ if (!_vm->_graphicsMan->_noFadingFl)
+ _vm->_graphicsMan->fadeInLong();
+ _vm->_graphicsMan->_noFadingFl = false;
+ _vm->_events->changeMouseCursor(4);
+
+ int xCheck = 0;
+ int yCheck = 0;
+
+ bool breakFlag = false;
+ while (!_vm->shouldQuit() && !breakFlag) {
+ int mouseButtons = _vm->_events->getMouseButton();
+ if (mouseButtons) {
+ if (mouseButtons == 1) {
+ if (_verb == 16 && _vm->_events->_mouseCursorId == 16) {
+ int xp = _vm->_events->getMouseX();
+ int yp = _vm->_events->getMouseY();
+
+ if ((xCheck == xp) && (yCheck == yp)) {
+ _vm->_linesMan->_route = NULL;
+ PARADISE();
+ if (_vm->_globals->_exitId)
+ breakFlag = true;
+ }
+ xCheck = xp;
+ yCheck = yp;
+ }
+ handleLeftButton();
+ } else if (mouseButtons == 2) {
+ handleRightButton();
+ }
+ }
+ if (!_vm->_globals->_exitId) {
+ _vm->_dialog->testDialogOpening();
+ _vm->_linesMan->checkZone();
+ if (_vm->_linesMan->_route == NULL
+ || (GOHOME(), _vm->_linesMan->_route == NULL)) {
+ if (_vm->_globals->_actionMoveTo)
+ PARADISE();
+ }
+ handleSpecialGames();
+ _vm->_events->refreshScreenAndEvents();
+ if (!_vm->_globals->_exitId)
+ continue;
+ }
+ breakFlag = true;
+ }
+
+ if (_vm->_globals->_exitId != 8 || _vm->_globals->_screenId != 5 || !_helicopterFl) {
+ if (!_vm->_graphicsMan->_noFadingFl)
+ _vm->_graphicsMan->fadeOutLong();
+ _vm->_graphicsMan->_noFadingFl = false;
+ removeSprite(0);
+ if (_twoCharactersFl) {
+ removeSprite(1);
+ _twoCharactersFl = false;
+ }
+ if (!animFile.empty())
+ _vm->_graphicsMan->endDisplayBob();
+ clearScreen();
+ } else {
+ _helicopterFl = false;
+ }
+ _vm->_globals->_eventMode = EVENTMODE_DEFAULT;
+}
+
+void ObjectsManager::setVerb(int id) {
+ _verb = id;
+}
+
+void ObjectsManager::resetHidingUseCount(int idx) {
+ _hidingItem[idx]._useCount = 0;
+}
+
+void ObjectsManager::setHidingUseCount(int idx) {
+ _hidingItem[idx]._useCount = 1;
+}
+
+// Load Hiding Items
+void ObjectsManager::loadHidingItems(const Common::String &file) {
+ resetHidingItems();
+ byte *ptr = _vm->_fileIO->loadFile(file);
+ Common::String filename = Common::String((const char *)ptr);
+
+ Common::File f;
+ if (!f.exists(filename))
+ return;
+
+ byte *spriteData = _vm->_fileIO->loadFile(filename);
+ _hidingItemData[1] = spriteData;
+ int curBufIdx = 60;
+ for (int i = 0; i <= 21; i++) {
+ HidingItem *hid = &_hidingItem[i];
+ hid->_spriteIndex = READ_LE_INT16((uint16 *)ptr + curBufIdx);
+ hid->_x = READ_LE_INT16((uint16 *)ptr + curBufIdx + 1);
+ hid->_y = READ_LE_INT16((uint16 *)ptr + curBufIdx + 2);
+ hid->_yOffset = READ_LE_INT16((uint16 *)ptr + curBufIdx + 4);
+ if (spriteData == NULL) {
+ hid->_useCount = 0;
+ } else {
+ hid->_spriteData = spriteData;
+ hid->_width = getWidth(spriteData, hid->_spriteIndex);
+ hid->_height = getHeight(spriteData, hid->_spriteIndex);
+ hid->_useCount = 1;
+ }
+
+ if ( !hid->_x && !hid->_y && !hid->_spriteIndex)
+ hid->_useCount = 0;
+ curBufIdx += 5;
+ }
+ enableHidingBehavior();
+ _vm->_globals->freeMemory(ptr);
+}
+
+void ObjectsManager::initVBob() {
+ for (int idx = 0; idx < 30; ++idx) {
+ VBobItem *vbob = &VBob[idx];
+ vbob->_displayMode = 0;
+ vbob->_xp = 0;
+ vbob->_yp = 0;
+ vbob->_frameIndex = 0;
+ vbob->_surface = NULL;
+ vbob->_spriteData = NULL;
+ vbob->_oldSpriteData = NULL;
+ }
+}
+
+void ObjectsManager::clearVBob() {
+ for (int idx = 0; idx < 30; ++idx) {
+ VBobItem *vbob = &VBob[idx];
+ vbob->_displayMode = 0;
+ vbob->_xp = 0;
+ vbob->_yp = 0;
+ vbob->_frameIndex = 0;
+ vbob->_surface = _vm->_globals->freeMemory(vbob->_surface);
+ vbob->_spriteData = NULL;
+ vbob->_oldSpriteData = NULL;
+ }
+}
+
+void ObjectsManager::disableHidingItem(int idx) {
+ assert(idx < 36);
+ _bob[idx]._disableFl = true;
+}
+
+void ObjectsManager::enableHidingBehavior() {
+ _hidingActiveFl = true;
+}
+
+void ObjectsManager::disableHidingBehavior() {
+ _hidingActiveFl = false;
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h
new file mode 100644
index 0000000000..0562af9ba7
--- /dev/null
+++ b/engines/hopkins/objects.h
@@ -0,0 +1,338 @@
+/* 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 HOPKINS_OBJECTS_H
+#define HOPKINS_OBJECTS_H
+
+#include "hopkins/globals.h"
+
+#include "common/scummsys.h"
+#include "common/endian.h"
+#include "common/str.h"
+
+#define MAX_SPRITE 5
+namespace Hopkins {
+
+struct ObjectAuthIcon {
+ byte _objectFileNum;
+ byte _idx;
+ byte _flag1;
+ byte _flag2;
+ byte _flag3;
+ byte _flag4;
+ byte _flag5;
+ byte _flag6;
+};
+
+struct SpriteItem {
+ int _animationType;
+ const byte *_spriteData;
+ Common::Point _spritePos;
+ int _zoomFactor;
+ bool _flipFl;
+ int _spriteIndex;
+ int _deltaX;
+ int _deltaY;
+ bool _rleFl;
+ bool _activeFl;
+ int _destX;
+ int _destY;
+ int _width;
+ int _height;
+ int _zoomPct;
+ int _reducePct;
+};
+
+struct BobItem {
+ int _bobMode;
+ byte *_spriteData;
+ int _xp;
+ int _yp;
+ int _frameIndex;
+ int _animDataIdx;
+ int _moveChange1;
+ int _moveChange2;
+ bool _disabledAnimationFl;
+ byte *_animData;
+ bool _bobMode10;
+ int _bobModeChange;
+ int _modeChangeCtr;
+ int _modeChangeUnused;
+ bool _disableFl; // Set to true in B_CACHE_OFF()
+ int _zoomFactor;
+ bool _flipFl;
+ bool _isSpriteFl;
+ bool _activeFl;
+ int _oldX;
+ int _oldY;
+ int _oldWidth;
+ int _oldHeight;
+ int _oldX2;
+ int _zooInmFactor;
+ int _zoomOutFactor;
+};
+
+struct HidingItem {
+ int _x;
+ int _y;
+ int _spriteIndex;
+ int _width;
+ int _height;
+ int _useCount;
+ byte *_spriteData;
+ bool _resetUseCount;
+ int _yOffset;
+};
+
+struct LockAnimItem {
+ bool _enableFl;
+ int _posX;
+};
+
+struct VBobItem {
+ const byte *_spriteData;
+ int _displayMode;
+ int _xp;
+ int _yp;
+ int _frameIndex;
+ byte *_surface;
+ int _oldX;
+ int _oldY;
+ int _oldFrameIndex;
+ const byte *_oldSpriteData;
+};
+
+struct ListeItem {
+ bool _visibleFl;
+ int _posX;
+ int _posY;
+ int _width;
+ int _height;
+};
+
+/**
+ * Mode for SortItem records
+ */
+enum SortMode { SORT_NONE = 0, SORT_BOB = 1, SORT_SPRITE = 2, SORT_HIDING = 3 };
+
+/**
+ * Structure to represent a pending display of either a Bob, Sprite, or Cache Item.
+ */
+struct SortItem {
+ SortMode _sortMode;
+ int _index;
+ int _priority;
+};
+
+class HopkinsEngine;
+
+class ObjectsManager {
+private:
+ HopkinsEngine *_vm;
+
+ int _objectWidth, _objectHeight;
+ int _oldBorderSpriteIndex;
+ int _borderSpriteIndex;
+ byte *_spritePtr;
+ const byte *_oldSpriteData;
+ int _verb;
+ int _oldSpriteIndex;
+ int _oldFrameIndex;
+ int _oldDirectionSpriteIdx;
+ Directions _oldDirection;
+ Directions _lastDirection;
+ bool _oldFlipFl;
+ int _curGestureFile;
+ byte *_gestureBuf;
+ int _homeRateCounter;
+ int _sortedDisplayCount;
+ SortItem _sortedDisplay[51];
+ byte *_hidingItemData[6];
+ HidingItem _hidingItem[25];
+ bool _hidingActiveFl;
+ ObjectAuthIcon _objectAuthIcons[300];
+ int _curObjectFileNum;
+ byte *_objectDataBuf;
+
+ VBobItem VBob[30];
+ ListeItem Liste[6];
+ ListeItem Liste2[35];
+
+ void initVBob();
+ void clearVBob();
+
+ void sprite_alone(const byte *objectData, byte *sprite, int objIndex);
+ void removeObjectDataBuf();
+
+ int getOffsetX(const byte *spriteData, int spriteIndex, bool isSize);
+ int getOffsetY(const byte *spriteData, int spriteIndex, bool isSize);
+
+ void capture_mem_sprite(const byte *objectData, byte *sprite, int objIndex);
+ void setBobInfo(int idx);
+ void computeHideCounter(int idx);
+ void initBobVariables(int idx);
+
+ void checkHidingItem();
+ void displayHiding(int idx);
+ void computeSprite(int idx);
+ void beforeSort(SortMode sortMode, int index, int priority);
+ void displayBobAnim();
+ void displayVBob();
+ void showSprite(int idx);
+ void clearSprite();
+ void setSpriteZoom(int idx, int zoomFactor);
+
+ void loadZone(const Common::String &file);
+ void changeCharacterHead(PlayerCharacter oldCharacter, PlayerCharacter newCharacter);
+ void GOHOME2();
+
+ void nextVerbIcon();
+ void handleForest(int screenId, int minX, int maxX, int minY, int maxY, int idx);
+
+ void sceneSpecialIni();
+ void showActionAnimation(const byte *spriteData, const Common::String &actionStr, int speed, bool flipFl);
+public:
+ bool _disableFl;
+ bool _forestFl;
+ bool _visibleFl;
+ bool _saveLoadFl;
+ bool _forceZoneFl;
+ bool _changeVerbFl;
+ bool _helicopterFl;
+ bool _twoCharactersFl;
+ bool _changeHeadFl;
+ bool _priorityFl;
+ int _jumpVerb;
+ int _jumpZone;
+ int _zoneNum;
+ int _eraseVisibleCounter;
+ int _curObjectIndex;
+ int _startSpriteIndex;
+ int _saveLoadX, _saveLoadY;
+ int _mapCarPosX, _mapCarPosY;
+ int _oldCharacterPosX, _oldCharacterPosY;
+ Common::Point _borderPos;
+ Common::Point _oldBorderPos;
+ Common::Point _characterPos;
+ byte *_forestSprite;
+ byte *_saveLoadSprite;
+ byte *_saveLoadSprite2;
+ byte *_headSprites;
+ SpriteItem _sprite[6];
+ BobItem _bob[36];
+ LockAnimItem _lockedAnims[30];
+ bool _charactersEnabledFl;
+ bool _refreshBobMode10Fl;
+
+ ObjectsManager(HopkinsEngine *vm);
+ ~ObjectsManager();
+
+ void clearAll();
+
+ int getWidth(const byte *objectData, int idx);
+ int getHeight(const byte *objectData, int idx);
+ byte *loadSprite(const Common::String &file);
+ void loadLinkFile(const Common::String &file, bool OBSSEUL = false);
+ void addStaticSprite(const byte *spriteData, Common::Point pos, int idx, int spriteIndex, int zoomFactor, bool flipFl, int deltaX, int deltaY);
+ void animateSprite(int idx);
+ void removeSprite(int idx);
+ void setSpriteX(int idx, int xp);
+ void setSpriteY(int idx, int yp);
+ int getSpriteX(int idx);
+ int getSpriteY(int idx);
+ void setSpriteIndex(int idx, int spriteIndex);
+ void displaySprite();
+ void computeAndSetSpriteSize();
+ void setFlipSprite(int idx, bool flip);
+
+ int getBobAnimDataIdx(int idx);
+ void initBorder(int zoneIdx);
+ void nextObjectIcon(int idx);
+ void takeInventoryObject(int idx);
+ void handleSpecialGames();
+
+ void addObject(int objIndex);
+ void changeObject(int objIndex);
+ void removeObject(int objIndex);
+
+ void resetBob(int idx);
+ void hideBob(int idx);
+ void displayBob(int idx);
+ void setBobOffset(int idx, int offset);
+ void setBobAnimDataIdx(int idx, int animIdx);
+ void setBobAnimation(int idx);
+ void stopBobAnimation(int idx);
+ int getBobPosX(int idx);
+
+ void handleCityMap();
+ void clearScreen();
+ void disableVerb(int idx, int a2);
+ void enableVerb(int idx, int a2);
+ void lockAnimX(int idx, int x);
+ void handleLeftButton();
+ void handleRightButton();
+ void setOffsetXY(byte *data, int idx, int xp, int yp, bool isSize);
+ void setVerb(int id);
+
+ void doActionBack(int idx);
+ void doActionRight(int idx);
+ void doActionFront(int idx);
+ void doActionLeft(int idx);
+ void doActionDiagRight(int idx);
+ void doActionDiagLeft(int idx);
+ void loadObjects();
+ byte *loadObjectFromFile(int objIndex, bool mode);
+ void resetHidingItems();
+ void resetHidingUseCount(int idx);
+ void setHidingUseCount(int idx);
+ void loadHidingItems(const Common::String &file);
+ void enableHidingBehavior();
+ void disableHidingBehavior();
+ void disableHidingItem(int idx);
+
+ void resetHomeRateCounter() { _homeRateCounter = 0; }
+ void resetOldFrameIndex() { _oldFrameIndex = -1; }
+ void resetOldDirection() { _oldDirection = DIR_NONE; }
+ int getObjectWidth() { return _objectWidth; }
+ int getObjectHeight() { return _objectHeight; }
+
+ void showSpecialActionAnimationWithFlip(const byte *spriteData, const Common::String &animationSeq, int speed, bool flipFl);
+ void showSpecialActionAnimation(const byte *spriteData, const Common::String &animString, int speed);
+ void checkEventBobAnim(int idx, int animIdx, int animDataIdx, int a4);
+ void setMultiBobAnim(int idx1, int idx2, int anim1Idx, int anim2Idx);
+ void loadObjectIniFile();
+ void quickDisplayBobSprite(int idx);
+ void initVbob(const byte *src, int idx, int xp, int yp, int frameIndex);
+ void disableVbob(int idx);
+ void setAndPlayAnim(int idx, int animIdx, int destPosi, bool animAction);
+
+ void PERSONAGE(const Common::String &backgroundFile, const Common::String &linkFile,
+ const Common::String &animFile, const Common::String &s4, int soundNum, bool initializeScreen);
+ void PERSONAGE2(const Common::String &backgroundFile, const Common::String &linkFile,
+ const Common::String &animFile, const Common::String &s4, int soundNum, bool initializeScreen);
+ void GOHOME();
+ void PARADISE();
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_OBJECTS_H */
diff --git a/engines/hopkins/saveload.cpp b/engines/hopkins/saveload.cpp
new file mode 100644
index 0000000000..0576b851cd
--- /dev/null
+++ b/engines/hopkins/saveload.cpp
@@ -0,0 +1,333 @@
+/* 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 "hopkins/saveload.h"
+
+#include "hopkins/files.h"
+#include "hopkins/globals.h"
+#include "hopkins/hopkins.h"
+
+
+#include "common/system.h"
+#include "common/savefile.h"
+#include "graphics/surface.h"
+#include "graphics/scaler.h"
+#include "graphics/thumbnail.h"
+
+namespace Hopkins {
+
+const char *SAVEGAME_STR = "HOPKINS";
+#define SAVEGAME_STR_SIZE 13
+
+SaveLoadManager::SaveLoadManager(HopkinsEngine *vm) {
+ _vm = vm;
+}
+
+bool SaveLoadManager::save(const Common::String &file, const void *buf, size_t n) {
+ Common::OutSaveFile *f = g_system->getSavefileManager()->openForSaving(file);
+
+ if (f) {
+ size_t bytesWritten = f->write(buf, n);
+ f->finalize();
+ delete f;
+
+ return bytesWritten == n;
+ } else
+ return false;
+}
+
+// Save File
+bool SaveLoadManager::saveFile(const Common::String &file, const void *buf, size_t n) {
+ return save(file, buf, n);
+}
+
+void SaveLoadManager::initSaves() {
+ Common::String dataFilename = "HISCORE.DAT";
+ byte data[100];
+ Common::fill(&data[0], &data[100], 0);
+
+ saveFile(dataFilename, data, 100);
+}
+
+void SaveLoadManager::load(const Common::String &file, byte *buf) {
+ Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(file);
+ if (f == NULL)
+ error("Error openinig file - %s", file.c_str());
+
+ int32 filesize = f->size();
+ f->read(buf, filesize);
+ delete f;
+}
+
+bool SaveLoadManager::readSavegameHeader(Common::InSaveFile *in, hopkinsSavegameHeader &header) {
+ char saveIdentBuffer[SAVEGAME_STR_SIZE + 1];
+ header._thumbnail = NULL;
+
+ // Validate the header Id
+ in->read(saveIdentBuffer, SAVEGAME_STR_SIZE + 1);
+ if (strncmp(saveIdentBuffer, SAVEGAME_STR, SAVEGAME_STR_SIZE))
+ return false;
+
+ header._version = in->readByte();
+ if (header._version > HOPKINS_SAVEGAME_VERSION)
+ 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._year = in->readSint16LE();
+ header._month = in->readSint16LE();
+ header._day = in->readSint16LE();
+ header._hour = in->readSint16LE();
+ header._minute = in->readSint16LE();
+ header._totalFrames = in->readUint32LE();
+
+ return true;
+}
+
+void SaveLoadManager::writeSavegameHeader(Common::OutSaveFile *out, hopkinsSavegameHeader &header) {
+ // Write out a savegame header
+ out->write(SAVEGAME_STR, SAVEGAME_STR_SIZE + 1);
+
+ out->writeByte(HOPKINS_SAVEGAME_VERSION);
+
+ // Write savegame name
+ out->write(header._saveName.c_str(), header._saveName.size() + 1);
+
+ // Create a thumbnail and save it
+ Graphics::Surface *thumb = new Graphics::Surface();
+ createThumbnail(thumb);
+ 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);
+ out->writeUint32LE(_vm->_events->_gameCounter);
+}
+
+Common::Error SaveLoadManager::saveGame(int slot, const Common::String &saveName) {
+ /* Pack any necessary data into the savegame data structure */
+ // Set the selected slot number
+ _vm->_globals->_saveData->_data[svLastSavegameSlot] = slot;
+
+ // Set up the inventory
+ for (int i = 0; i < 35; ++i)
+ _vm->_globals->_saveData->_inventory[i] = _vm->_globals->_inventory[i];
+
+ _vm->_globals->_saveData->_mapCarPosX = _vm->_objectsMan->_mapCarPosX;
+ _vm->_globals->_saveData->_mapCarPosY = _vm->_objectsMan->_mapCarPosY;
+
+ /* Create the savegame */
+ Common::OutSaveFile *savefile = g_system->getSavefileManager()->openForSaving(_vm->generateSaveName(slot));
+ if (!savefile)
+ return Common::kCreatingFileFailed;
+
+ // Set up the serializer
+ Common::Serializer serializer(NULL, savefile);
+
+ // Write out the savegame header
+ hopkinsSavegameHeader header;
+ header._saveName = saveName;
+ header._version = HOPKINS_SAVEGAME_VERSION;
+ writeSavegameHeader(savefile, header);
+
+ // Write out the savegame data
+ syncSavegameData(serializer, header._version);
+
+ // Save file complete
+ savefile->finalize();
+ delete savefile;
+
+ return Common::kNoError;
+}
+
+Common::Error SaveLoadManager::loadGame(int slot) {
+ // Try and open the save file for reading
+ Common::InSaveFile *savefile = g_system->getSavefileManager()->openForLoading(
+ _vm->generateSaveName(slot));
+ if (!savefile)
+ return Common::kReadingFailed;
+
+ // Set up the serializer
+ Common::Serializer serializer(savefile, NULL);
+
+ // Read in the savegame header
+ hopkinsSavegameHeader header;
+ readSavegameHeader(savefile, header);
+ if (header._thumbnail)
+ header._thumbnail->free();
+ delete header._thumbnail;
+
+ // Read in the savegame data
+ syncSavegameData(serializer, header._version);
+
+ // Loading save file complete
+ delete savefile;
+
+ // Unpack the inventory
+ for (int i = 0; i < 35; ++i)
+ _vm->_globals->_inventory[i] = _vm->_globals->_saveData->_inventory[i];
+
+ // Set variables from loaded data as necessary
+ _vm->_globals->_saveData->_data[svLastSavegameSlot] = slot;
+ _vm->_globals->_exitId = _vm->_globals->_saveData->_data[svLastScreenId];
+ _vm->_globals->_saveData->_data[svLastPrevScreenId] = 0;
+ _vm->_globals->_screenId = 0;
+ _vm->_objectsMan->_mapCarPosX = _vm->_globals->_saveData->_mapCarPosX;
+ _vm->_objectsMan->_mapCarPosY = _vm->_globals->_saveData->_mapCarPosY;
+
+ return Common::kNoError;
+}
+
+bool SaveLoadManager::readSavegameHeader(int slot, hopkinsSavegameHeader &header) {
+ // Try and open the save file for reading
+ Common::InSaveFile *saveFile = g_system->getSavefileManager()->openForLoading(
+ g_vm->generateSaveName(slot));
+ if (!saveFile)
+ return false;
+
+ bool result = readSavegameHeader(saveFile, header);
+ delete saveFile;
+ return result;
+}
+
+#define REDUCE_AMOUNT 80
+
+void SaveLoadManager::createThumbnail(Graphics::Surface *s) {
+ int w = _vm->_graphicsMan->zoomOut(SCREEN_WIDTH, REDUCE_AMOUNT);
+ int h = _vm->_graphicsMan->zoomOut(SCREEN_HEIGHT - 40, REDUCE_AMOUNT);
+
+ Graphics::Surface thumb8;
+ thumb8.create(w, h, Graphics::PixelFormat::createFormatCLUT8());
+
+ _vm->_graphicsMan->reduceScreenPart(_vm->_graphicsMan->_frontBuffer, (byte *)thumb8.pixels,
+ _vm->_events->_startPos.x, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 40, 80);
+
+ // Convert the 8-bit pixel to 16 bit surface
+ s->create(w, h, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0));
+
+ const byte *srcP = (const byte *)thumb8.pixels;
+ uint16 *destP = (uint16 *)s->pixels;
+
+ for (int yp = 0; yp < h; ++yp) {
+ // Copy over the line, using the source pixels as lookups into the pixels palette
+ const byte *lineSrcP = srcP;
+ uint16 *lineDestP = destP;
+
+ for (int xp = 0; xp < w; ++xp)
+ *lineDestP++ = *(uint16 *)&_vm->_graphicsMan->_palettePixels[*lineSrcP++ * 2];
+
+ // Move to the start of the next line
+ srcP += w;
+ destP += w;
+ }
+ thumb8.free();
+}
+
+void SaveLoadManager::syncSavegameData(Common::Serializer &s, int version) {
+ s.syncBytes(&_vm->_globals->_saveData->_data[0], 2050);
+ syncCharacterLocation(s, _vm->_globals->_saveData->_cloneHopkins);
+ syncCharacterLocation(s, _vm->_globals->_saveData->_realHopkins);
+ syncCharacterLocation(s, _vm->_globals->_saveData->_samantha);
+
+ for (int i = 0; i < 35; ++i)
+ s.syncAsSint16LE(_vm->_globals->_saveData->_inventory[i]);
+
+ if (version > 1) {
+ s.syncAsSint16LE(_vm->_globals->_saveData->_mapCarPosX);
+ s.syncAsSint16LE(_vm->_globals->_saveData->_mapCarPosY);
+ } else {
+ _vm->_globals->_saveData->_mapCarPosX = _vm->_globals->_saveData->_mapCarPosY = 0;
+ }
+
+}
+
+void SaveLoadManager::syncCharacterLocation(Common::Serializer &s, CharacterLocation &item) {
+ s.syncAsSint16LE(item._pos.x);
+ s.syncAsSint16LE(item._pos.y);
+ s.syncAsSint16LE(item._startSpriteIndex);
+ s.syncAsSint16LE(item._location);
+ s.syncAsSint16LE(item._zoomFactor);
+}
+
+void SaveLoadManager::convertThumb16To8(Graphics::Surface *thumb16, Graphics::Surface *thumb8) {
+ thumb8->create(thumb16->w, thumb16->h, Graphics::PixelFormat::createFormatCLUT8());
+ Graphics::PixelFormat pixelFormat16(2, 5, 6, 5, 0, 11, 5, 0, 0);
+
+ byte paletteR[PALETTE_SIZE];
+ byte paletteG[PALETTE_SIZE];
+ byte paletteB[PALETTE_SIZE];
+ for (int palIndex = 0; palIndex < PALETTE_SIZE; ++palIndex) {
+ uint16 p = READ_LE_UINT16(&_vm->_graphicsMan->_palettePixels[palIndex * 2]);
+ pixelFormat16.colorToRGB(p, paletteR[palIndex], paletteG[palIndex], paletteB[palIndex]);
+ }
+
+ const uint16 *srcP = (const uint16 *)thumb16->pixels;
+ byte *destP = (byte *)thumb8->pixels;
+
+ for (int yp = 0; yp < thumb16->h; ++yp) {
+ const uint16 *lineSrcP = srcP;
+ byte *lineDestP = destP;
+
+ for (int xp = 0; xp < thumb16->w; ++xp) {
+ byte r, g, b;
+ pixelFormat16.colorToRGB(*lineSrcP++, r, g, b);
+
+ // Scan the palette for the closest match
+ int difference = 99999, foundIndex = 0;
+ for (int palIndex = 0; palIndex < PALETTE_SIZE; ++palIndex) {
+ byte rCurrent = paletteR[palIndex];
+ byte gCurrent = paletteG[palIndex];
+ byte bCurrent = paletteB[palIndex];
+
+ int diff = ABS((int)r - (int)rCurrent) + ABS((int)g - (int)gCurrent) + ABS((int)b - (int)bCurrent);
+ if (diff < difference) {
+ difference = diff;
+ foundIndex = palIndex;
+ }
+ }
+
+ *lineDestP++ = foundIndex;
+ }
+
+ // Move to the start of the next line
+ srcP += thumb16->w;
+ destP += thumb16->w;
+ }
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/saveload.h b/engines/hopkins/saveload.h
new file mode 100644
index 0000000000..221a445fd2
--- /dev/null
+++ b/engines/hopkins/saveload.h
@@ -0,0 +1,78 @@
+/* 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 HOPKINS_SAVELOAD_H
+#define HOPKINS_SAVELOAD_H
+
+#include "hopkins/globals.h"
+#include "hopkins/graphics.h"
+
+#include "common/scummsys.h"
+#include "common/savefile.h"
+#include "common/serializer.h"
+#include "common/str.h"
+
+namespace Hopkins {
+
+class HopkinsEngine;
+
+#define HOPKINS_SAVEGAME_VERSION 2
+
+struct hopkinsSavegameHeader {
+ uint8 _version;
+ Common::String _saveName;
+ Graphics::Surface *_thumbnail;
+ int _year, _month, _day;
+ int _hour, _minute;
+ int _totalFrames;
+};
+
+class SaveLoadManager {
+private:
+ HopkinsEngine *_vm;
+
+ void createThumbnail(Graphics::Surface *s);
+ void syncSavegameData(Common::Serializer &s, int version);
+ void syncCharacterLocation(Common::Serializer &s, CharacterLocation &item);
+public:
+ SaveLoadManager(HopkinsEngine *vm);
+
+ void initSaves();
+ bool save(const Common::String &file, const void *buf, size_t n);
+ bool saveFile(const Common::String &file, const void *buf, size_t n);
+ void load(const Common::String &file, byte *buf);
+
+ static bool readSavegameHeader(Common::InSaveFile *in, hopkinsSavegameHeader &header);
+ void writeSavegameHeader(Common::OutSaveFile *out, hopkinsSavegameHeader &header);
+ static bool readSavegameHeader(int slot, hopkinsSavegameHeader &header);
+ Common::Error saveGame(int slot, const Common::String &saveName);
+ Common::Error loadGame(int slot);
+
+ /**
+ * Converts a 16-bit thumbnail to 8 bit paletted using the currently active palette.
+ */
+ void convertThumb16To8(Graphics::Surface *thumb16, Graphics::Surface *thumb8);
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_SAVELOAD_H */
diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp
new file mode 100644
index 0000000000..ce60377c5c
--- /dev/null
+++ b/engines/hopkins/script.cpp
@@ -0,0 +1,2624 @@
+/* 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 "hopkins/objects.h"
+#include "hopkins/dialogs.h"
+#include "hopkins/files.h"
+#include "hopkins/globals.h"
+#include "hopkins/sound.h"
+#include "hopkins/hopkins.h"
+
+#include "common/system.h"
+#include "graphics/palette.h"
+#include "common/file.h"
+#include "common/rect.h"
+#include "engines/util.h"
+
+namespace Hopkins {
+
+ScriptManager::ScriptManager(HopkinsEngine *vm) {
+ _vm = vm;
+ _tempObjectFl = false;
+}
+
+int ScriptManager::handleOpcode(const byte *dataP) {
+ if (READ_BE_UINT16(dataP) != MKTAG16('F', 'C'))
+ return 0;
+
+ int opcodeType = 0;
+ int vbobFrameIndex = 0;
+
+ uint32 signature24 = READ_BE_UINT24(&dataP[2]);
+ switch (signature24) {
+ case MKTAG24('T', 'X', 'T'): {
+ vbobFrameIndex = dataP[6];
+ int mesgId = READ_LE_INT16(dataP + 13);
+ opcodeType = 1;
+ if (!_tempObjectFl) {
+ if (_vm->_globals->_saveData->_data[svField356] == 1) {
+ if (mesgId == 53)
+ mesgId = 644;
+ if (mesgId == 624)
+ mesgId = 639;
+ if (mesgId == 627)
+ mesgId = 630;
+ if (mesgId == 625)
+ mesgId = 639;
+ if (mesgId == 8)
+ mesgId = 637;
+ if (mesgId == 53)
+ mesgId = 644;
+ if (mesgId == 557)
+ mesgId = 636;
+ if (mesgId == 51)
+ mesgId = 644;
+ if (mesgId == 287)
+ mesgId = 636;
+ if (mesgId == 619)
+ mesgId = 633;
+ if (mesgId == 620)
+ mesgId = 634;
+ if (mesgId == 622)
+ mesgId = 644;
+ if (mesgId == 297)
+ mesgId = 636;
+ if (mesgId == 612 || mesgId == 613 || mesgId == 614 || mesgId == 134)
+ mesgId = 636;
+ if (mesgId == 615)
+ mesgId = 635;
+ if (mesgId == 618)
+ mesgId = 632;
+ if (mesgId == 611)
+ mesgId = 642;
+ if (mesgId == 610)
+ mesgId = 641;
+ if (mesgId == 18)
+ mesgId = 643;
+ if (mesgId == 602)
+ mesgId = 645;
+ if (mesgId == 603)
+ mesgId = 646;
+ if (mesgId == 604)
+ mesgId = 647;
+ if (mesgId == 51)
+ mesgId = 644;
+ if (mesgId == 607)
+ mesgId = 650;
+ if (mesgId == 605)
+ mesgId = 648;
+ if (mesgId == 606)
+ mesgId = 649;
+ if (mesgId == 601)
+ mesgId = 652;
+ if (mesgId == 37)
+ mesgId = 636;
+ if (mesgId == 595)
+ mesgId = 633;
+ if (mesgId == 596)
+ mesgId = 634;
+ if (mesgId == 532)
+ mesgId = 636;
+ if (mesgId == 599)
+ mesgId = 636;
+ if (mesgId == 363)
+ mesgId = 636;
+ }
+ if (!_vm->_soundMan->_soundOffFl && _vm->_soundMan->_soundFl) {
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_soundMan->_soundFl);
+ }
+ bool displayedTxtFl = false;
+ if (!_vm->_soundMan->_textOffFl) {
+ int textPosX = READ_LE_INT16(dataP + 9);
+ int textPosY = READ_LE_INT16(dataP + 11);
+ _vm->_fontMan->initTextBuffers(9, mesgId, _vm->_globals->_textFilename, 2 * textPosX, 2 * textPosY + 40, 6, dataP[7], 253);
+ _vm->_fontMan->showText(9);
+ displayedTxtFl = true;
+ }
+ if (!_vm->_soundMan->_voiceOffFl)
+ _vm->_soundMan->mixVoice(mesgId, 4, displayedTxtFl);
+ } else { // if (_tempObjectFl)
+ if (_vm->_globals->_saveData->_data[svField356]) {
+ _vm->_fontMan->initTextBuffers(9, 635, _vm->_globals->_textFilename, 55, 20, dataP[8], 35, 253);
+ bool displayedTxtFl = false;
+ if (!_vm->_soundMan->_textOffFl) {
+ _vm->_fontMan->showText(9);
+ displayedTxtFl = true;
+ }
+
+ if (!_vm->_soundMan->_voiceOffFl)
+ _vm->_soundMan->mixVoice(635, 4, displayedTxtFl);
+ } else {
+ int textPosX = READ_LE_INT16(dataP + 9);
+ if (_vm->_globals->_language == LANG_FR && !_vm->_soundMan->_textOffFl)
+ _vm->_fontMan->initTextBuffers(9, mesgId, "OBJET1.TXT", 2 * textPosX, 60, 6, dataP[7], 253);
+ else if (_vm->_globals->_language == LANG_EN && !_vm->_soundMan->_textOffFl)
+ _vm->_fontMan->initTextBuffers(9, mesgId, "OBJETAN.TXT", 2 * textPosX, 60, 6, dataP[7], 253);
+ else if (_vm->_globals->_language == LANG_SP && !_vm->_soundMan->_textOffFl) {
+ _vm->_fontMan->initTextBuffers(9, mesgId, "OBJETES.TXT", 2 * textPosX, 60, 6, dataP[7], 253);
+ }
+
+ bool displayedTxtFl = false;
+ if (!_vm->_soundMan->_textOffFl) {
+ _vm->_fontMan->showText(9);
+ displayedTxtFl = true;
+ }
+
+ if (!_vm->_soundMan->_voiceOffFl)
+ _vm->_soundMan->mixVoice(mesgId, 5, displayedTxtFl);
+ }
+ }
+ break;
+ }
+ case MKTAG24('B', 'O', 'B'):
+ if (!_vm->_objectsMan->_disableFl) {
+ int vbobIdx = dataP[5];
+ vbobFrameIndex = dataP[6];
+ int moveChange = dataP[7];
+ int vbobPosX = READ_LE_INT16(dataP + 8);
+ int vbobPosY = READ_LE_INT16(dataP + 10);
+ if (vbobIdx == 52) {
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, vbobPosX, READ_LE_INT16(dataP + 10), vbobFrameIndex);
+ } else if (vbobIdx == 51) {
+ _vm->_objectsMan->quickDisplayBobSprite(vbobFrameIndex);
+ } else if (vbobIdx != 50) {
+ _vm->_objectsMan->initVbob(_vm->_globals->_levelSpriteBuf, vbobIdx, vbobPosX, vbobPosY, vbobFrameIndex);
+ if (moveChange)
+ moveChange /= _vm->_globals->_speed;
+ if (moveChange > 1) {
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ --moveChange;
+ _vm->_events->refreshScreenAndEvents();
+ } while (moveChange);
+ }
+ }
+ }
+ opcodeType = 1;
+ break;
+ case MKTAG24('S', 'T', 'P'):
+ if (!_vm->_objectsMan->_disableFl) {
+ _vm->_objectsMan->_twoCharactersFl = false;
+ _vm->_objectsMan->_characterPos.x = READ_LE_INT16(dataP + 6);
+ _vm->_objectsMan->_characterPos.y = READ_LE_INT16(dataP + 8);
+ _vm->_objectsMan->_startSpriteIndex = dataP[5];
+ if (_vm->_objectsMan->_changeHeadFl) {
+ if (_vm->_globals->_saveData->_data[svField354] == 1
+ && _vm->_globals->_saveData->_cloneHopkins._pos.x && _vm->_globals->_saveData->_cloneHopkins._pos.y
+ && _vm->_globals->_saveData->_cloneHopkins._startSpriteIndex && _vm->_globals->_saveData->_cloneHopkins._location) {
+
+ _vm->_objectsMan->_characterPos = _vm->_globals->_saveData->_cloneHopkins._pos;
+ _vm->_objectsMan->_startSpriteIndex = _vm->_globals->_saveData->_cloneHopkins._startSpriteIndex;
+ }
+ if (_vm->_globals->_saveData->_data[svField356] == 1
+ && _vm->_globals->_saveData->_samantha._pos.x && _vm->_globals->_saveData->_samantha._pos.y
+ && _vm->_globals->_saveData->_samantha._startSpriteIndex && _vm->_globals->_saveData->_samantha._location) {
+ _vm->_objectsMan->_characterPos = _vm->_globals->_saveData->_samantha._pos;
+ _vm->_objectsMan->_startSpriteIndex = _vm->_globals->_saveData->_samantha._startSpriteIndex;
+ }
+ if (_vm->_globals->_saveData->_data[svField357] == 1
+ && _vm->_globals->_saveData->_realHopkins._pos.x && _vm->_globals->_saveData->_realHopkins._pos.y
+ && _vm->_globals->_saveData->_realHopkins._startSpriteIndex && _vm->_globals->_saveData->_realHopkins._location) {
+ _vm->_objectsMan->_characterPos = _vm->_globals->_saveData->_realHopkins._pos;
+ _vm->_objectsMan->_startSpriteIndex = _vm->_globals->_saveData->_realHopkins._startSpriteIndex;
+ }
+ }
+ if (_vm->_globals->_saveData->_data[svField356] == 1
+ && _vm->_globals->_saveData->_realHopkins._location == _vm->_globals->_screenId) {
+ _vm->_objectsMan->addStaticSprite(
+ _vm->_objectsMan->_headSprites,
+ _vm->_globals->_saveData->_realHopkins._pos,
+ 1,
+ 2,
+ _vm->_globals->_saveData->_realHopkins._zoomFactor,
+ false,
+ 34,
+ 190);
+ _vm->_objectsMan->animateSprite(1);
+ _vm->_objectsMan->_twoCharactersFl = true;
+ }
+ if (_vm->_globals->_saveData->_data[svField357] == 1
+ && _vm->_globals->_saveData->_data[svField355] == 1
+ && _vm->_globals->_saveData->_samantha._location == _vm->_globals->_screenId) {
+ _vm->_objectsMan->addStaticSprite(
+ _vm->_objectsMan->_headSprites,
+ _vm->_globals->_saveData->_samantha._pos,
+ 1,
+ 3,
+ _vm->_globals->_saveData->_samantha._zoomFactor,
+ false,
+ 20,
+ 127);
+ _vm->_objectsMan->animateSprite(1);
+ _vm->_objectsMan->_twoCharactersFl = true;
+ }
+ }
+ opcodeType = 1;
+ _vm->_objectsMan->_changeHeadFl = false;
+ break;
+ case MKTAG24('S', 'T', 'E'):
+ if (!_vm->_objectsMan->_disableFl) {
+ _vm->_globals->_prevScreenId = _vm->_globals->_screenId;
+ _vm->_globals->_saveData->_data[svLastPrevScreenId] = _vm->_globals->_screenId;
+ _vm->_globals->_screenId = _vm->_globals->_saveData->_data[svLastScreenId] = dataP[5];
+ vbobFrameIndex = dataP[6];
+ }
+ opcodeType = 1;
+ break;
+ case MKTAG24('B', 'O', 'F'):
+ if (!_vm->_objectsMan->_disableFl)
+ _vm->_objectsMan->disableVbob(READ_LE_INT16(dataP + 5));
+ opcodeType = 1;
+ break;
+ case MKTAG24('P', 'E', 'R'): {
+ int specialOpcode = READ_LE_INT16(dataP + 5);
+ if (!_vm->_globals->_saveData->_data[svAlternateSpriteFl] && !_vm->_globals->_saveData->_data[svField356]) {
+ vbobFrameIndex = 0;
+
+ switch (specialOpcode) {
+ case 1:
+ case 14:
+ if (_vm->_globals->_actionDirection == DIR_UP)
+ _vm->_objectsMan->doActionBack(4);
+ if (_vm->_globals->_actionDirection == DIR_RIGHT)
+ _vm->_objectsMan->doActionRight(4);
+ if (_vm->_globals->_actionDirection == DIR_UP_RIGHT)
+ _vm->_objectsMan->doActionDiagRight(4);
+ if (_vm->_globals->_actionDirection == DIR_DOWN)
+ _vm->_objectsMan->doActionFront(4);
+ if (_vm->_globals->_actionDirection == DIR_UP_LEFT)
+ _vm->_objectsMan->doActionDiagLeft(4);
+ if (_vm->_globals->_actionDirection == DIR_LEFT)
+ _vm->_objectsMan->doActionLeft(4);
+ break;
+ case 2:
+ if (_vm->_globals->_actionDirection == DIR_UP)
+ _vm->_objectsMan->doActionBack(7);
+ if (_vm->_globals->_actionDirection == DIR_RIGHT)
+ _vm->_objectsMan->doActionRight(7);
+ if (_vm->_globals->_actionDirection == DIR_UP_RIGHT)
+ _vm->_objectsMan->doActionDiagRight(7);
+ if (_vm->_globals->_actionDirection == DIR_DOWN)
+ _vm->_objectsMan->doActionFront(7);
+ if (_vm->_globals->_actionDirection == DIR_UP_LEFT)
+ _vm->_objectsMan->doActionDiagLeft(7);
+ if (_vm->_globals->_actionDirection == DIR_LEFT)
+ _vm->_objectsMan->doActionLeft(7);
+ if (_vm->_globals->_actionDirection == DIR_UP)
+ _vm->_objectsMan->doActionBack(8);
+ if (_vm->_globals->_actionDirection == DIR_RIGHT)
+ _vm->_objectsMan->doActionRight(8);
+ if (_vm->_globals->_actionDirection == DIR_UP_RIGHT)
+ _vm->_objectsMan->doActionDiagRight(8);
+ if (_vm->_globals->_actionDirection == DIR_DOWN)
+ _vm->_objectsMan->doActionFront(8);
+ if (_vm->_globals->_actionDirection == DIR_UP_LEFT)
+ _vm->_objectsMan->doActionDiagLeft(8);
+ if (_vm->_globals->_actionDirection == DIR_LEFT)
+ _vm->_objectsMan->doActionLeft(8);
+ break;
+ case 19:
+ case 4:
+ if (_vm->_globals->_actionDirection == DIR_UP)
+ _vm->_objectsMan->doActionBack(1);
+ if (_vm->_globals->_actionDirection == DIR_RIGHT)
+ _vm->_objectsMan->doActionRight(1);
+ if (_vm->_globals->_actionDirection == DIR_UP_RIGHT)
+ _vm->_objectsMan->doActionDiagRight(1);
+ if (_vm->_globals->_actionDirection == DIR_DOWN)
+ _vm->_objectsMan->doActionFront(1);
+ if (_vm->_globals->_actionDirection == DIR_UP_LEFT)
+ _vm->_objectsMan->doActionDiagLeft(1);
+ if (_vm->_globals->_actionDirection == DIR_LEFT)
+ _vm->_objectsMan->doActionLeft(1);
+ break;
+ case 5:
+ if (_vm->_globals->_actionDirection == DIR_UP)
+ _vm->_objectsMan->doActionBack(5);
+ if (_vm->_globals->_actionDirection == DIR_RIGHT)
+ _vm->_objectsMan->doActionRight(5);
+ if (_vm->_globals->_actionDirection == DIR_UP_RIGHT)
+ _vm->_objectsMan->doActionDiagRight(5);
+ if (_vm->_globals->_actionDirection == DIR_DOWN)
+ _vm->_objectsMan->doActionFront(5);
+ if (_vm->_globals->_actionDirection == DIR_UP_LEFT)
+ _vm->_objectsMan->doActionDiagLeft(5);
+ if (_vm->_globals->_actionDirection == DIR_LEFT)
+ _vm->_objectsMan->doActionLeft(5);
+ if (_vm->_globals->_actionDirection == DIR_UP)
+ _vm->_objectsMan->doActionBack(6);
+ if (_vm->_globals->_actionDirection == DIR_RIGHT)
+ _vm->_objectsMan->doActionRight(6);
+ if (_vm->_globals->_actionDirection == DIR_UP_RIGHT)
+ _vm->_objectsMan->doActionDiagRight(6);
+ if (_vm->_globals->_actionDirection == DIR_DOWN)
+ _vm->_objectsMan->doActionFront(6);
+ if (_vm->_globals->_actionDirection == DIR_UP_LEFT)
+ _vm->_objectsMan->doActionDiagLeft(6);
+ if (_vm->_globals->_actionDirection == DIR_LEFT)
+ _vm->_objectsMan->doActionLeft(6);
+ break;
+ case 17:
+ case 7:
+ if (_vm->_globals->_actionDirection == DIR_UP)
+ _vm->_objectsMan->doActionBack(2);
+ if (_vm->_globals->_actionDirection == DIR_RIGHT)
+ _vm->_objectsMan->doActionRight(2);
+ if (_vm->_globals->_actionDirection == DIR_UP_RIGHT)
+ _vm->_objectsMan->doActionDiagRight(2);
+ if (_vm->_globals->_actionDirection == DIR_DOWN)
+ _vm->_objectsMan->doActionFront(2);
+ if (_vm->_globals->_actionDirection == DIR_UP_LEFT)
+ _vm->_objectsMan->doActionDiagLeft(2);
+ if (_vm->_globals->_actionDirection == DIR_LEFT)
+ _vm->_objectsMan->doActionLeft(2);
+ break;
+ case 18:
+ case 8:
+ if (_vm->_globals->_actionDirection == DIR_UP)
+ _vm->_objectsMan->doActionBack(3);
+ if (_vm->_globals->_actionDirection == DIR_RIGHT)
+ _vm->_objectsMan->doActionRight(3);
+ if (_vm->_globals->_actionDirection == DIR_UP_RIGHT)
+ _vm->_objectsMan->doActionDiagRight(3);
+ if (_vm->_globals->_actionDirection == DIR_DOWN)
+ _vm->_objectsMan->doActionFront(3);
+ if (_vm->_globals->_actionDirection == DIR_UP_LEFT)
+ _vm->_objectsMan->doActionDiagLeft(3);
+ if (_vm->_globals->_actionDirection == DIR_LEFT)
+ _vm->_objectsMan->doActionLeft(3);
+ break;
+ case 9:
+ if (_vm->_globals->_actionDirection == DIR_UP)
+ _vm->_objectsMan->doActionBack(5);
+ if (_vm->_globals->_actionDirection == DIR_RIGHT)
+ _vm->_objectsMan->doActionRight(5);
+ if (_vm->_globals->_actionDirection == DIR_UP_RIGHT)
+ _vm->_objectsMan->doActionDiagRight(5);
+ if (_vm->_globals->_actionDirection == DIR_DOWN)
+ _vm->_objectsMan->doActionFront(5);
+ if (_vm->_globals->_actionDirection == DIR_UP_LEFT)
+ _vm->_objectsMan->doActionDiagLeft(5);
+ if (_vm->_globals->_actionDirection == DIR_LEFT)
+ _vm->_objectsMan->doActionLeft(5);
+ break;
+ case 10:
+ if (_vm->_globals->_actionDirection == DIR_UP)
+ _vm->_objectsMan->doActionBack(6);
+ if (_vm->_globals->_actionDirection == DIR_RIGHT)
+ _vm->_objectsMan->doActionRight(6);
+ if (_vm->_globals->_actionDirection == DIR_UP_RIGHT)
+ _vm->_objectsMan->doActionDiagRight(6);
+ if (_vm->_globals->_actionDirection == DIR_DOWN)
+ _vm->_objectsMan->doActionFront(6);
+ if (_vm->_globals->_actionDirection == DIR_UP_LEFT)
+ _vm->_objectsMan->doActionDiagLeft(6);
+ if (_vm->_globals->_actionDirection == DIR_LEFT)
+ _vm->_objectsMan->doActionLeft(6);
+ break;
+ case 15:
+ case 11:
+ if (_vm->_globals->_actionDirection == DIR_UP)
+ _vm->_objectsMan->doActionBack(7);
+ if (_vm->_globals->_actionDirection == DIR_RIGHT)
+ _vm->_objectsMan->doActionRight(7);
+ if (_vm->_globals->_actionDirection == DIR_UP_RIGHT)
+ _vm->_objectsMan->doActionDiagRight(7);
+ if (_vm->_globals->_actionDirection == DIR_DOWN)
+ _vm->_objectsMan->doActionFront(7);
+ if (_vm->_globals->_actionDirection == DIR_UP_LEFT)
+ _vm->_objectsMan->doActionDiagLeft(7);
+ if (_vm->_globals->_actionDirection == DIR_LEFT)
+ _vm->_objectsMan->doActionLeft(7);
+ break;
+ case 16:
+ case 12:
+ if (_vm->_globals->_actionDirection == DIR_UP)
+ _vm->_objectsMan->doActionBack(8);
+ if (_vm->_globals->_actionDirection == DIR_RIGHT)
+ _vm->_objectsMan->doActionRight(8);
+ if (_vm->_globals->_actionDirection == DIR_UP_RIGHT)
+ _vm->_objectsMan->doActionDiagRight(8);
+ if (_vm->_globals->_actionDirection == DIR_DOWN)
+ _vm->_objectsMan->doActionFront(8);
+ if (_vm->_globals->_actionDirection == DIR_UP_LEFT)
+ _vm->_objectsMan->doActionDiagLeft(8);
+ if (_vm->_globals->_actionDirection == DIR_LEFT)
+ _vm->_objectsMan->doActionLeft(8);
+ break;
+ }
+ }
+ opcodeType = 1;
+ break;
+ }
+ case MKTAG24('M', 'U', 'S'):
+ opcodeType = 1;
+ break;
+ case MKTAG24('W', 'A', 'I'): {
+ uint frameNumb = READ_LE_UINT16(dataP + 5) / _vm->_globals->_speed;
+ if (!frameNumb)
+ frameNumb = 1;
+ for (uint i = 0; i < frameNumb + 1; i++) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ }
+ opcodeType = 1;
+ break;
+ }
+ case MKTAG24('O', 'B', 'P'):
+ opcodeType = 1;
+ _vm->_objectsMan->addObject(READ_LE_INT16(dataP + 5));
+ break;
+ case MKTAG24('O', 'B', 'M'):
+ opcodeType = 1;
+ _vm->_objectsMan->removeObject(READ_LE_INT16(dataP + 5));
+ break;
+ case MKTAG24('G', 'O', 'T'):
+ opcodeType = 2;
+ break;
+ case MKTAG24('Z', 'O', 'N'):
+ _vm->_linesMan->enableZone(READ_LE_INT16(dataP + 5));
+ opcodeType = 1;
+ break;
+ case MKTAG24('Z', 'O', 'F'):
+ _vm->_linesMan->disableZone(READ_LE_INT16(dataP + 5));
+ opcodeType = 1;
+ break;
+ case MKTAG24('E', 'X', 'I'):
+ opcodeType = 5;
+ break;
+ case MKTAG24('S', 'O', 'R'):
+ _vm->_globals->_exitId = READ_LE_INT16(dataP + 5);
+ opcodeType = 5;
+ break;
+ case MKTAG24('B', 'C', 'A'):
+ _vm->_objectsMan->disableHidingItem(READ_LE_INT16(dataP + 5));
+ opcodeType = 1;
+ break;
+ case MKTAG24('A', 'N', 'I'): {
+ int animId = READ_LE_INT16(dataP + 5);
+ if (animId <= 100)
+ _vm->_objectsMan->setBobAnimation(animId);
+ else
+ _vm->_objectsMan->stopBobAnimation(animId - 100);
+ opcodeType = 1;
+ break;
+ }
+ case MKTAG24('S', 'P', 'E'):
+ switch (READ_LE_INT16(dataP + 5)) {
+ case 6:
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setAndPlayAnim(20, 0, 14, true);
+ break;
+
+ case 7:
+ _vm->_talkMan->startAnimatedCharacterDialogue("rueh1.pe2");
+ break;
+
+ case 8:
+ _vm->_talkMan->startAnimatedCharacterDialogue("ruef1.pe2");
+ break;
+
+ case 10:
+ _vm->_talkMan->startAnimatedCharacterDialogue("bqeflic1.pe2");
+ break;
+
+ case 11:
+ _vm->_talkMan->startAnimatedCharacterDialogue("bqeflic2.pe2");
+ break;
+
+ case 12:
+ _vm->_fontMan->hideText(9);
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_talkMan->startAnimatedCharacterDialogue("bqetueur.pe2");
+ break;
+
+ case 13:
+ _vm->_events->_mouseButton = _vm->_events->_curMouseButton;
+ _vm->_globals->_disableInventFl = true;
+ _vm->_graphicsMan->fadeOutLong();
+ _vm->_objectsMan->disableHidingBehavior();
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_fontMan->hideText(5);
+ _vm->_fontMan->hideText(9);
+ _vm->_graphicsMan->endDisplayBob();
+ _vm->_objectsMan->clearScreen();
+
+ if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo()) {
+ _vm->_graphicsMan->fadeOutLong();
+ } else {
+ _vm->_soundMan->playSoundFile("SOUND17.WAV");
+ _vm->_graphicsMan->_fadingFl = true;
+ _vm->_animMan->playSequence2("HELICO.SEQ", 10, 4, 10);
+ }
+
+ _vm->_animMan->loadAnim("otage");
+ _vm->_graphicsMan->loadImage("IM05");
+ _vm->_graphicsMan->displayAllBob();
+
+ for (int i = 0; i <= 4; i++) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ }
+
+ _vm->_events->mouseOff();
+ _vm->_graphicsMan->fadeInDefaultLength(_vm->_graphicsMan->_frontBuffer);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(3) != 100);
+ _vm->_graphicsMan->fadeOutDefaultLength(_vm->_graphicsMan->_frontBuffer);
+ _vm->_graphicsMan->endDisplayBob();
+
+ // If uncensored, rip the throat of the hostage
+ if (!_vm->_globals->_censorshipFl) {
+ _vm->_soundMan->_specialSoundNum = 16;
+ _vm->_graphicsMan->_fadingFl = true;
+ _vm->_animMan->playAnim("EGORGE.ANM", 50, 28, 500);
+ _vm->_soundMan->_specialSoundNum = 0;
+ }
+ _vm->_animMan->loadAnim("ASCEN");
+ _vm->_events->mouseOff();
+ _vm->_graphicsMan->loadImage("ASCEN");
+ _vm->_graphicsMan->displayAllBob();
+
+ for (int i = 0; i <= 4; i++) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ }
+
+ _vm->_events->mouseOff();
+ _vm->_graphicsMan->fadeInDefaultLength(_vm->_graphicsMan->_frontBuffer);
+ _vm->_objectsMan->checkEventBobAnim(1, 0, 17, 3);
+ _vm->_graphicsMan->fadeOutDefaultLength(_vm->_graphicsMan->_frontBuffer);
+ _vm->_graphicsMan->endDisplayBob();
+
+ if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo())
+ _vm->_soundMan->playSoundFile("SOUND17.WAV");
+
+ _vm->_soundMan->_specialSoundNum = 14;
+ _vm->_graphicsMan->_fadingFl = true;
+ _vm->_animMan->playSequence2("ASSOM.SEQ", 10, 4, 500);
+ _vm->_soundMan->_specialSoundNum = 0;
+
+ if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo())
+ _vm->_graphicsMan->fadeOutLong();
+
+ _vm->_globals->_disableInventFl = false;
+ _vm->_objectsMan->_helicopterFl = true;
+ break;
+
+ case 16:
+ _vm->_talkMan->startAnimatedCharacterDialogue("ftoubib.pe2");
+ break;
+
+ case 17:
+ _vm->_talkMan->startAnimatedCharacterDialogue("flic2b.pe2");
+ break;
+
+ case 18:
+ _vm->_talkMan->startAnimatedCharacterDialogue("fjour.pe2");
+ break;
+
+ case 20:
+ _vm->_talkMan->startAnimatedCharacterDialogue("PUNK.pe2");
+ break;
+
+ case 21:
+ _vm->_talkMan->startAnimatedCharacterDialogue("MEDLEG.pe2");
+ break;
+
+ case 22:
+ _vm->_talkMan->animateObject("CADAVRE1.pe2");
+ break;
+
+ case 23:
+ _vm->_talkMan->startStaticCharacterDialogue("CHERCHE1.pe2");
+ break;
+
+ case 25:
+ _vm->_talkMan->startAnimatedCharacterDialogue("AGENT1.pe2");
+ break;
+
+ case 26:
+ _vm->_talkMan->startAnimatedCharacterDialogue("AGENT2.pe2");
+ break;
+
+ case 27:
+ if (_vm->_globals->_saveData->_data[svField94] != 1 || _vm->_globals->_saveData->_data[svField95] != 1)
+ _vm->_talkMan->startAnimatedCharacterDialogue("STANDAR.pe2");
+ else
+ _vm->_talkMan->startAnimatedCharacterDialogue("STANDAR1.pe2");
+ break;
+
+ case 29:
+ _vm->_globals->_disableInventFl = true;
+ _vm->_talkMan->animateObject("TELEP.pe2");
+ _vm->_globals->_disableInventFl = false;
+ break;
+
+ case 32:
+ _vm->_talkMan->startAnimatedCharacterDialogue("SAMAN.pe2");
+ break;
+
+ case 35:
+ if (!_vm->_soundMan->_soundOffFl) {
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_soundMan->_soundFl);
+ }
+ _vm->_talkMan->startAnimatedCharacterDialogue("PTLAB.pe2");
+ break;
+
+ case 36:
+ if (_vm->_globals->_saveData->_data[svField270] == 2 && _vm->_globals->_saveData->_data[svField94] == 1 && _vm->_globals->_saveData->_data[svField95] == 1)
+ _vm->_globals->_saveData->_data[svField270] = 3;
+
+ switch (_vm->_globals->_saveData->_data[svField270]) {
+ case 0:
+ _vm->_talkMan->startStaticCharacterDialogue("PATRON0.pe2");
+ break;
+ case 1:
+ _vm->_talkMan->startStaticCharacterDialogue("PATRON1.pe2");
+ break;
+ case 2:
+ _vm->_talkMan->startStaticCharacterDialogue("PATRON2.pe2");
+ break;
+ case 3:
+ _vm->_talkMan->startStaticCharacterDialogue("PATRON3.pe2");
+ break;
+ default:
+ if (_vm->_globals->_saveData->_data[svField270] > 3) {
+ _vm->_talkMan->startStaticCharacterDialogue("PATRON4.pe2");
+ _vm->_globals->_saveData->_data[svField270] = 5;
+ }
+ break;
+ }
+ break;
+
+ case 37:
+ _vm->_graphicsMan->_fadingFl = true;
+ _vm->_animMan->playSequence2("corde.SEQ", 32, 32, 100);
+ _vm->_graphicsMan->_noFadingFl = true;
+ break;
+
+ case 38:
+ _vm->_soundMan->loadSample(1, "SOUND44.WAV");
+ _vm->_soundMan->loadSample(2, "SOUND42.WAV");
+ _vm->_soundMan->loadSample(3, "SOUND41.WAV");
+ _vm->_soundMan->_specialSoundNum = 17;
+ _vm->_animMan->playSequence("grenade.SEQ", 1, 32, 100, false, false);
+ _vm->_soundMan->_specialSoundNum = 0;
+ _vm->_graphicsMan->_fadingFl = true;
+ _vm->_animMan->playAnim("CREVE17.ANM", 24, 24, 200);
+ _vm->_soundMan->removeSample(1);
+ _vm->_soundMan->removeSample(2);
+ _vm->_soundMan->removeSample(3);
+ _vm->_graphicsMan->_noFadingFl = true;
+ break;
+
+ case 40:
+ _vm->_talkMan->startAnimatedCharacterDialogue("MAGE.pe2");
+ break;
+
+ case 41:
+ _vm->_talkMan->startAnimatedCharacterDialogue("MORT3.pe2");
+ break;
+
+ case 42:
+ _vm->_talkMan->startAnimatedCharacterDialogue("MORT2.pe2");
+ break;
+
+ case 43:
+ _vm->_talkMan->startAnimatedCharacterDialogue("MORT1.pe2");
+ break;
+
+ case 44:
+ _vm->_talkMan->startAnimatedCharacterDialogue("MORT3A.pe2");
+ break;
+
+ case 45:
+ _vm->_talkMan->startAnimatedCharacterDialogue("FEM3.pe2");
+ break;
+
+ case 46: {
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_linesMan->_route = (RouteItem *)NULL;
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 564, 420);
+ _vm->_objectsMan->_zoneNum = -1;
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_objectsMan->GOHOME();
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_linesMan->_route != (RouteItem *)NULL);
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_soundMan->loadSample(1, "SOUND44.WAV");
+ _vm->_soundMan->loadSample(2, "SOUND45.WAV");
+ _vm->_objectsMan->setMultiBobAnim(9, 10, 0, 0);
+ bool playFl = false;
+ for (;;) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(9)) {
+ case 4:
+ case 16:
+ case 28:
+ if (!playFl) {
+ _vm->_soundMan->playSample(1);
+ playFl = true;
+ }
+ break;
+ case 5:
+ case 17:
+ case 29:
+ playFl = false;
+ break;
+ }
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(10)) {
+ case 10:
+ case 22:
+ case 33:
+ if (!playFl) {
+ _vm->_soundMan->playSample(2);
+ playFl = true;
+ }
+ break;
+ case 11:
+ playFl = false;
+ break;
+ case 12:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 249, 1);
+ break;
+ case 23:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 249, 2);
+ playFl = false;
+ break;
+ case 34:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 249, 3);
+ playFl = false;
+ break;
+ }
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(9) == 36)
+ break;
+ }
+ _vm->_objectsMan->animateSprite(0);
+ _vm->_objectsMan->stopBobAnimation(9);
+ _vm->_objectsMan->stopBobAnimation(10);
+ _vm->_soundMan->removeSample(1);
+ _vm->_soundMan->removeSample(2);
+ break;
+ }
+
+ case 47:
+ _vm->_talkMan->startAnimatedCharacterDialogue("BARMAN.pe2");
+ break;
+
+ case 48:
+ _vm->_talkMan->startAnimatedCharacterDialogue("SAMAN2.pe2");
+ break;
+
+ case 49: {
+ _vm->_objectsMan->disableHidingBehavior();
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setMultiBobAnim(9, 10, 0, 0);
+
+ int endIdx;
+ if (_vm->_globals->_saveData->_data[svField133] == 1)
+ endIdx = 41;
+ else
+ endIdx = 12;
+ bool playFl = false;
+ for (;;) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(9)) {
+ case 4:
+ case 18:
+ if (!playFl) {
+ _vm->_soundMan->directPlayWav("SOUND44.WAV");
+ playFl = true;
+ }
+ break;
+ case 5:
+ case 9:
+ playFl = false;
+ break;
+ }
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(10)) {
+ case 11:
+ if (!playFl) {
+ _vm->_soundMan->directPlayWav("SOUND45.WAV");
+ playFl = true;
+ }
+ break;
+ case 12:
+ playFl = false;
+ break;
+ }
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(9) == endIdx)
+ break;
+ }
+
+ if (endIdx == 12) {
+ _vm->_objectsMan->animateSprite(0);
+ _vm->_objectsMan->stopBobAnimation(9);
+ }
+ _vm->_objectsMan->enableHidingBehavior();
+ break;
+ }
+
+ case 50:
+ _vm->_soundMan->playSoundFile("SOUND46.WAv");
+ _vm->_objectsMan->setAndPlayAnim(11, 0, 23, false);
+ break;
+
+ case 51: {
+ _vm->_graphicsMan->fadeOutLong();
+ _vm->_objectsMan->disableHidingBehavior();
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_fontMan->hideText(5);
+ _vm->_fontMan->hideText(9);
+ _vm->_graphicsMan->endDisplayBob();
+ _vm->_graphicsMan->loadImage("IM20f");
+ _vm->_animMan->loadAnim("ANIM20f");
+ _vm->_graphicsMan->displayAllBob();
+ _vm->_events->mouseOff();
+ _vm->_graphicsMan->fadeInLong();
+ _vm->_soundMan->loadWav("SOUND46.WAV", 1);
+ bool playFl = false;
+ for (;;) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ if (_vm->_objectsMan->getBobAnimDataIdx(12) == 5 && !playFl) {
+ _vm->_soundMan->playWav(1);
+ playFl = true;
+ }
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(12) == 34)
+ break;
+ }
+ _vm->_objectsMan->stopBobAnimation(2);
+ _vm->_graphicsMan->fadeOutLong();
+ _vm->_graphicsMan->_noFadingFl = true;
+ _vm->_globals->_exitId = 20;
+ break;
+ }
+
+ case 52:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("GARDE.PE2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 53:
+ _vm->_talkMan->startAnimatedCharacterDialogue("GARDE1.pe2");
+ break;
+
+ case 54:
+ _vm->_talkMan->startAnimatedCharacterDialogue("GARDE2.pe2");
+ break;
+
+ case 55:
+ _vm->_objectsMan->stopBobAnimation(1);
+ _vm->_objectsMan->setAndPlayAnim(15, 0, 12, false);
+ _vm->_objectsMan->stopBobAnimation(15);
+ _vm->_objectsMan->loadLinkFile("IM19a", true);
+ break;
+
+ case 56:
+ _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("HOPFEM.SPR");
+ _vm->_globals->_characterType = 1;
+ _vm->_globals->_saveData->_data[svAlternateSpriteFl] = 1;
+ _vm->_globals->loadCharacterData();
+ _vm->_objectsMan->_sprite[0]._deltaX = 28;
+ _vm->_objectsMan->_sprite[0]._deltaY = 155;
+ _vm->_objectsMan->computeAndSetSpriteSize();
+ break;
+
+ case 57:
+ _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("PERSO.SPR");
+ _vm->_globals->_characterType = 0;
+ _vm->_globals->_saveData->_data[svAlternateSpriteFl] = 0;
+ _vm->_globals->loadCharacterData();
+ _vm->_objectsMan->_sprite[0]._deltaX = 34;
+ _vm->_objectsMan->_sprite[0]._deltaY = 190;
+ _vm->_objectsMan->computeAndSetSpriteSize();
+ break;
+
+ case 58:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("Gm1.PE2");
+ _vm->_globals->_saveData->_data[svField176] = 1;
+ _vm->_globals->_saveData->_data[svField270] = 2;
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 59: {
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_objectsMan->_oldCharacterPosX = _vm->_objectsMan->getSpriteX(0);
+ _vm->_objectsMan->resetOldDirection();
+ _vm->_objectsMan->resetHomeRateCounter();
+ _vm->_linesMan->_route = (RouteItem *)NULL;
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 445, 332);
+ _vm->_globals->_checkDistanceFl = true;
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_objectsMan->GOHOME();
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_linesMan->_route != (RouteItem *)NULL);
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setBobAnimation(7);
+ _vm->_objectsMan->setBobAnimDataIdx(7, 0);
+ bool playFl = false;
+ _vm->_soundMan->loadSample(1, "SOUND40.WAV");
+ for (;;) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(7)) {
+ case 10:
+ case 18:
+ if (!playFl) {
+ _vm->_soundMan->playSample(1);
+ playFl = true;
+ }
+ break;
+ case 11:
+ playFl = false;
+ break;
+ case 19:
+ _vm->_objectsMan->setBobAnimation(3);
+ playFl = false;
+ break;
+ }
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(3) == 48)
+ break;
+ }
+ _vm->_soundMan->removeSample(1);
+ _vm->_objectsMan->setSpriteIndex(0, 62);
+ _vm->_objectsMan->animateSprite(0);
+ _vm->_objectsMan->setBobAnimation(6);
+ _vm->_objectsMan->stopBobAnimation(7);
+ _vm->_objectsMan->stopBobAnimation(3);
+ break;
+ }
+
+ case 62:
+ _vm->_talkMan->animateObject("SBCADA.pe2");
+ break;
+
+ case 65:
+ _vm->_talkMan->animateObject("ScCADA.pe2");
+ break;
+
+ case 80: {
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setBobAnimation(12);
+ _vm->_objectsMan->setBobAnimation(13);
+ _vm->_objectsMan->setBobAnimDataIdx(12, 0);
+ _vm->_objectsMan->setBobAnimDataIdx(13, 0);
+ _vm->_soundMan->loadWav("SOUND44.WAV", 1);
+ _vm->_soundMan->loadWav("SOUND71.WAV", 2);
+ bool playFl = false;
+ for (;;) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(12)) {
+ case 4:
+ if (!playFl) {
+ _vm->_soundMan->playWav(1);
+ playFl = true;
+ }
+ break;
+ case 5:
+ playFl = false;
+ break;
+ }
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(4)) {
+ case 5:
+ if (!playFl) {
+ _vm->_soundMan->playWav(2);
+ playFl = true;
+ }
+ case 6:
+ playFl = false;
+ break;
+ }
+
+ if (_vm->_objectsMan->getBobAnimDataIdx(13) == 8) {
+ _vm->_objectsMan->stopBobAnimation(13);
+ _vm->_objectsMan->stopBobAnimation(3);
+ _vm->_objectsMan->setBobAnimation(4);
+ _vm->_objectsMan->setBobAnimDataIdx(4, 0);
+ _vm->_objectsMan->setBobAnimDataIdx(13, 0);
+ }
+
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(4) == 16)
+ break;
+ }
+ _vm->_objectsMan->stopBobAnimation(12);
+ _vm->_objectsMan->stopBobAnimation(4);
+ _vm->_objectsMan->animateSprite(0);
+ _vm->_objectsMan->loadLinkFile("IM27a", true);
+ break;
+ }
+
+ case 81: {
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_objectsMan->_oldCharacterPosX = _vm->_objectsMan->getSpriteX(0);
+ _vm->_objectsMan->resetOldDirection();
+ _vm->_objectsMan->resetHomeRateCounter();
+ _vm->_linesMan->_route = (RouteItem *)NULL;
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 119, 268);
+ _vm->_globals->_checkDistanceFl = true;
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_objectsMan->GOHOME();
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_linesMan->_route != (RouteItem *)NULL);
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setBobAnimation(11);
+ _vm->_objectsMan->setBobAnimation(8);
+ _vm->_objectsMan->setBobAnimDataIdx(11, 0);
+ _vm->_objectsMan->setBobAnimDataIdx(8, 0);
+ _vm->_soundMan->loadWav("SOUND44.WAV", 1);
+ _vm->_soundMan->loadWav("SOUND48.WAV", 2);
+ _vm->_soundMan->loadWav("SOUND49.WAV", 3);
+ bool playFl = false;
+ for (;;) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(11)) {
+ case 4:
+ if (!playFl) {
+ _vm->_soundMan->playWav(1);
+ playFl = true;
+ }
+ break;
+ case 5:
+ playFl = false;
+ break;
+ }
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(8)) {
+ case 11:
+ if (!playFl) {
+ _vm->_soundMan->playWav(2);
+ playFl = true;
+ }
+ break;
+ case 12:
+ playFl = false;
+ break;
+ }
+
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(8) == 32)
+ break;
+ }
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 201, 14, 1);
+ _vm->_objectsMan->animateSprite(0);
+ _vm->_objectsMan->stopBobAnimation(11);
+ _vm->_objectsMan->stopBobAnimation(8);
+ _vm->_objectsMan->setBobAnimation(5);
+ _vm->_objectsMan->setBobAnimation(6);
+ _vm->_objectsMan->setBobAnimDataIdx(5, 0);
+ _vm->_objectsMan->setBobAnimDataIdx(6, 0);
+ _vm->_soundMan->playWav(3);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(5) != 74);
+ _vm->_objectsMan->stopBobAnimation(5);
+ _vm->_objectsMan->stopBobAnimation(6);
+ _vm->_objectsMan->setBobAnimation(9);
+ _vm->_objectsMan->setBobAnimation(7);
+ break;
+ }
+
+ case 83:
+ _vm->_talkMan->startAnimatedCharacterDialogue("CVIGIL.pe2");
+ break;
+
+ case 84:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("CVIGIL1.PE2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 85:
+ _vm->_objectsMan->stopBobAnimation(3);
+ _vm->_objectsMan->setBobAnimation(5);
+ _vm->_objectsMan->setBobAnimDataIdx(5, 0);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(5) != 6);
+ _vm->_objectsMan->stopBobAnimation(5);
+ _vm->_objectsMan->setBobAnimation(6);
+ _vm->_objectsMan->loadLinkFile("IM24a", true);
+ break;
+
+ case 86:
+ if (_vm->_globals->_saveData->_data[svField231] == 1) {
+ _vm->_talkMan->startAnimatedCharacterDialogue("chotess1.pe2");
+ } else {
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("chotesse.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ }
+ break;
+
+ case 87:
+ if (_vm->_globals->_saveData->_data[svField188])
+ _vm->_talkMan->startAnimatedCharacterDialogue("stand2.pe2");
+ else
+ _vm->_talkMan->startAnimatedCharacterDialogue("stand1.pe2");
+ break;
+
+ case 88:
+ if (_vm->_globals->_saveData->_data[svField183] == 1) {
+ _vm->_objectsMan->setBobAnimDataIdx(1, 0);
+ _vm->_objectsMan->setBobAnimDataIdx(2, 0);
+ _vm->_objectsMan->setBobAnimation(1);
+ _vm->_objectsMan->setBobAnimation(2);
+ _vm->_soundMan->loadSample(1, "SOUND40.WAV");
+ bool playFl = false;
+ for (;;) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(1)) {
+ case 1:
+ case 3:
+ case 5:
+ case 7:
+ if (!playFl) {
+ _vm->_soundMan->playSample(1);
+ playFl = true;
+ }
+ break;
+ case 2:
+ case 4:
+ case 6:
+ case 8:
+ playFl = false;
+ break;
+ }
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(1) == 9)
+ break;
+ }
+ _vm->_objectsMan->stopBobAnimation(1);
+ _vm->_objectsMan->stopBobAnimation(2);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 283, 160, 6);
+ _vm->_soundMan->removeSample(1);
+ }
+ if (_vm->_globals->_saveData->_data[svField183] == 2) {
+ _vm->_objectsMan->setBobAnimDataIdx(1, 0);
+ _vm->_objectsMan->setBobAnimDataIdx(3, 0);
+ _vm->_objectsMan->setBobAnimation(1);
+ _vm->_objectsMan->setBobAnimation(3);
+ _vm->_soundMan->loadSample(1, "SOUND40.WAV");
+ bool playFl = false;
+ for (;;) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(1)) {
+ case 1:
+ case 3:
+ case 5:
+ case 7:
+ if (!playFl) {
+ _vm->_soundMan->playSample(1);
+ playFl = true;
+ }
+ break;
+ case 2:
+ case 4:
+ case 6:
+ case 8:
+ playFl = false;
+ break;
+ }
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(1) == 9)
+ break;
+ }
+ _vm->_objectsMan->stopBobAnimation(1);
+ _vm->_objectsMan->stopBobAnimation(3);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 283, 161, 8);
+ _vm->_soundMan->removeSample(1);
+ }
+ break;
+
+ case 90:
+ _vm->_soundMan->playSoundFile("SOUND52.WAV");
+ if (!_vm->_globals->_saveData->_data[svField186]) {
+ _vm->_animMan->playSequence("CIB5A.SEQ", 1, 12, 1, false, false);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 0);
+ } else if (_vm->_globals->_saveData->_data[svField186] == 1) {
+ _vm->_animMan->playSequence("CIB5C.SEQ", 1, 12, 1, false, false);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 0);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 329, 87, 2);
+ }
+ break;
+
+ case 91:
+ _vm->_soundMan->playSoundFile("SOUND52.WAV");
+ if (!_vm->_globals->_saveData->_data[svField186]) {
+ _vm->_animMan->playSequence("CIB5B.SEQ", 1, 12, 1, false, false);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 5);
+ } else if (_vm->_globals->_saveData->_data[svField186] == 1) {
+ _vm->_animMan->playSequence("CIB5D.SEQ", 1, 12, 1, false, false);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 5);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 283, 160, 6);
+ }
+ break;
+
+ case 92:
+ _vm->_soundMan->playSoundFile("SOUND52.WAV");
+ if (!_vm->_globals->_saveData->_data[svField184]) {
+ _vm->_animMan->playSequence("CIB6A.SEQ", 1, 12, 1, false, false);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 0);
+ } else if (_vm->_globals->_saveData->_data[svField184] == 1) {
+ _vm->_animMan->playSequence("CIB6C.SEQ", 1, 12, 1, false, false);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 0);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 293, 139, 3);
+ }
+ break;
+
+ case 93:
+ _vm->_soundMan->playSoundFile("SOUND52.WAV");
+ if (!_vm->_globals->_saveData->_data[svField184]) {
+ _vm->_animMan->playSequence("CIB6B.SEQ", 1, 12, 1, false, false);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 5);
+ } else if (_vm->_globals->_saveData->_data[svField184] == 1) {
+ _vm->_animMan->playSequence("CIB6D.SEQ", 1, 12, 1, false, false);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 5);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 283, 161, 8);
+ }
+ break;
+
+ case 94:
+ if (!_vm->_globals->_saveData->_data[svField228])
+ _vm->_talkMan->startAnimatedCharacterDialogue("flicn.pe2");
+ else if (_vm->_globals->_saveData->_data[svField228] == 1)
+ _vm->_talkMan->startAnimatedCharacterDialogue("flicn1.pe2");
+ break;
+
+ case 95:
+ _vm->_objectsMan->setBobAnimation(9);
+ _vm->_objectsMan->setBobAnimation(10);
+ _vm->_objectsMan->setBobAnimation(12);
+ _vm->_objectsMan->setBobAnimDataIdx(9, 0);
+ _vm->_objectsMan->setBobAnimDataIdx(10, 0);
+ _vm->_objectsMan->setBobAnimDataIdx(12, 0);
+ _vm->_objectsMan->removeSprite(0);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(9) != 15);
+ _vm->_objectsMan->stopBobAnimation(9);
+ _vm->_objectsMan->animateSprite(0);
+ _vm->_soundMan->playSoundFile("SOUND50.WAV");
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(12) != 117);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 830, 122, 0);
+ _vm->_objectsMan->stopBobAnimation(12);
+ _vm->_objectsMan->stopBobAnimation(10);
+ _vm->_objectsMan->setBobAnimation(11);
+ break;
+
+ case 98:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("CVIGIL2.PE2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 100:
+ _vm->_talkMan->startAnimatedCharacterDialogue("tourist.pe2");
+ break;
+
+ case 101:
+ _vm->_talkMan->startAnimatedCharacterDialogue("tahi1.pe2");
+ break;
+
+ case 103:
+ // Dice game
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("tourist1.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ _vm->_animMan->playAnim2("T421.ANM", 100, 14, 500);
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("tourist2.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 104:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("tourist3.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 105:
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_objectsMan->_oldCharacterPosX = _vm->_objectsMan->getSpriteX(0);
+ _vm->_objectsMan->resetOldDirection();
+ _vm->_objectsMan->resetHomeRateCounter();
+ _vm->_linesMan->_route = (RouteItem *)NULL;
+ switch (_vm->_globals->_saveData->_data[svField253]) {
+ case 1:
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 201, 294);
+ break;
+ case 2:
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 158, 338);
+ break;
+ default:
+ if (_vm->_globals->_saveData->_data[svField253] > 2)
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 211, 393);
+ break;
+ }
+ _vm->_globals->_checkDistanceFl = true;
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_objectsMan->GOHOME();
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_linesMan->_route != (RouteItem *)NULL);
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setSpriteIndex(0, 60);
+ _vm->_soundMan->loadSample(1, "SOUND63.WAV");
+ if (_vm->_globals->_saveData->_data[svField253] > 2) {
+ _vm->_objectsMan->setBobAnimation(4);
+ bool playFl = false;
+ for (;;) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(4)) {
+ case 9:
+ case 32:
+ case 55:
+ if (!playFl) {
+ _vm->_soundMan->playSample(1);
+ playFl = true;
+ }
+ break;
+ case 10:
+ case 33:
+ case 56:
+ playFl = false;
+ break;
+ }
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(4) == 72)
+ break;
+ }
+ _vm->_objectsMan->stopBobAnimation(4);
+ }
+ if (_vm->_globals->_saveData->_data[svField253] == 1) {
+ _vm->_objectsMan->setBobAnimation(6);
+ bool playFl = false;
+ for (;;) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(6)) {
+ case 9:
+ case 32:
+ case 55:
+ if (!playFl) {
+ _vm->_soundMan->playSample(1);
+ playFl = true;
+ }
+ break;
+ case 10:
+ case 33:
+ case 56:
+ playFl = false;
+ break;
+ }
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(6) == 72)
+ break;
+ }
+ _vm->_objectsMan->stopBobAnimation(6);
+ }
+ if (_vm->_globals->_saveData->_data[svField253] == 2) {
+ _vm->_objectsMan->setBobAnimation(5);
+ bool playFl = false;
+ for (;;) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(5)) {
+ case 9:
+ case 32:
+ case 55:
+ if (!playFl) {
+ _vm->_soundMan->playSample(1);
+ playFl = true;
+ }
+ break;
+ case 10:
+ case 33:
+ case 56:
+ playFl = false;
+ break;
+ }
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(5) == 72)
+ break;
+ }
+ _vm->_objectsMan->stopBobAnimation(5);
+ }
+ _vm->_objectsMan->animateSprite(0);
+ _vm->_objectsMan->doActionBack(1);
+ _vm->_soundMan->removeSample(1);
+ break;
+
+ case 106:
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setBobAnimation(4);
+ _vm->_objectsMan->setBobAnimDataIdx(4, 0);
+ _vm->_soundMan->loadWav("SOUND61.WAV", 1);
+ _vm->_soundMan->loadWav("SOUND62.WAV", 2);
+ _vm->_soundMan->loadWav("SOUND61.WAV", 3);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(4) != 10);
+ _vm->_soundMan->playWav(1);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(4) != 18);
+ _vm->_soundMan->playWav(2);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(4) != 62);
+ _vm->_soundMan->playWav(3);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(4) != 77);
+ _vm->_objectsMan->stopBobAnimation(4);
+ _vm->_objectsMan->animateSprite(0);
+ break;
+
+ case 107:
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setBobAnimation(5);
+ _vm->_objectsMan->setBobAnimDataIdx(5, 0);
+ _vm->_soundMan->loadWav("SOUND61.WAV", 1);
+ _vm->_soundMan->loadWav("SOUND62.WAV", 2);
+ _vm->_soundMan->loadWav("SOUND61.WAV", 3);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(5) != 10);
+ _vm->_soundMan->playWav(1);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(5) != 18);
+ _vm->_soundMan->playWav(2);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(5) != 38);
+ _vm->_soundMan->playWav(3);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(5) != 53);
+ _vm->_objectsMan->stopBobAnimation(5);
+ _vm->_objectsMan->animateSprite(0);
+ break;
+
+ case 108:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("peche1.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 109:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("peche2.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 110:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("peche3.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 111:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("peche4.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 112:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("teint1.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 113:
+ _vm->_talkMan->startAnimatedCharacterDialogue("teint.pe2");
+ break;
+
+ case 114:
+ _vm->_talkMan->startAnimatedCharacterDialogue("tahibar.pe2");
+ break;
+
+ case 115:
+ _vm->_talkMan->startAnimatedCharacterDialogue("ilebar.pe2");
+ break;
+
+ case 116:
+ _vm->_talkMan->startAnimatedCharacterDialogue("Profred.pe2");
+ break;
+
+ case 170:
+ _vm->_talkMan->startAnimatedCharacterDialogue("GRED.pe2");
+ break;
+
+ case 171: {
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("gred1.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_objectsMan->_oldCharacterPosX = _vm->_objectsMan->getSpriteX(0);
+ _vm->_objectsMan->resetOldDirection();
+ _vm->_objectsMan->resetHomeRateCounter();
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_linesMan->_route = (RouteItem *)NULL;
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 361, 325);
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_objectsMan->_zoneNum = -1;
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_objectsMan->GOHOME();
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_linesMan->_route != (RouteItem *)NULL);
+ _vm->_globals->_exitId = 59;
+ break;
+ }
+
+ case 172:
+ _vm->_talkMan->startAnimatedCharacterDialogue("GBLEU.pe2");
+ break;
+
+ case 173: {
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("gbleu1.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_objectsMan->_oldCharacterPosX = _vm->_objectsMan->getSpriteX(0);
+ _vm->_objectsMan->resetOldDirection();
+ _vm->_objectsMan->resetHomeRateCounter();
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_linesMan->_route = (RouteItem *)NULL;
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 361, 325);
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_objectsMan->_zoneNum = -1;
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_objectsMan->GOHOME();
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_linesMan->_route != (RouteItem *)NULL);
+ _vm->_globals->_exitId = 59;
+ break;
+ }
+
+ case 174:
+ _vm->_talkMan->startAnimatedCharacterDialogue("Profbl.pe2");
+ break;
+
+ case 175:
+ _vm->_objectsMan->setSpriteIndex(0, 55);
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setBobAnimation(9);
+ _vm->_objectsMan->setBobAnimation(10);
+ _vm->_objectsMan->setBobOffset(10, 300);
+ _vm->_soundMan->playSoundFile("SOUND44.WAV");
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(10) != 7);
+ _vm->_objectsMan->setBobAnimation(6);
+ _vm->_objectsMan->stopBobAnimation(3);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(6) != 10);
+ _vm->_soundMan->playSoundFile("SOUND71.WAV");
+ _vm->_objectsMan->setBobAnimation(7);
+ _vm->_objectsMan->stopBobAnimation(4);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(7) != 15);
+ _vm->_objectsMan->stopBobAnimation(5);
+ _vm->_objectsMan->setBobAnimation(8);
+ _vm->_soundMan->playSoundFile("SOUND70.WAV");
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(8) != 76);
+ _vm->_objectsMan->stopBobAnimation(6);
+ _vm->_objectsMan->stopBobAnimation(7);
+ _vm->_objectsMan->stopBobAnimation(8);
+ _vm->_objectsMan->stopBobAnimation(9);
+ _vm->_objectsMan->stopBobAnimation(10);
+ _vm->_objectsMan->animateSprite(0);
+ break;
+
+ case 176:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("gred2.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 177:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("gbleu2.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 200:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("Gm2.PE2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 201:
+ _vm->_objectsMan->setBobAnimation(3);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(3) != 18);
+ _vm->_objectsMan->stopBobAnimation(3);
+ _vm->_objectsMan->setBobAnimation(4);
+ break;
+
+ case 202:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("SVGARD2.PE2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 203:
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setBobAnimation(4);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(4) == 18)
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 18, 334, 0, false);
+ } while (_vm->_objectsMan->getBobAnimDataIdx(4) != 26);
+ _vm->_objectsMan->stopBobAnimation(4);
+ _vm->_objectsMan->animateSprite(0);
+ break;
+
+ case 204: {
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setBobAnimation(3);
+ _vm->_soundMan->loadWav("SOUND67.WAV", 1);
+ bool playFl = false;
+ for (;;) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(3)) {
+ case 10:
+ if (!playFl) {
+ _vm->_soundMan->playWav(1);
+ playFl = true;
+ }
+ break;
+ case 11:
+ playFl = false;
+ break;
+ }
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(3) == 50)
+ break;
+ }
+ _vm->_objectsMan->stopBobAnimation(3);
+ _vm->_objectsMan->animateSprite(0);
+ break;
+ }
+
+ case 205: {
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setBobAnimation(4);
+ _vm->_soundMan->loadWav("SOUND69.WAV", 1);
+ bool playFl = false;
+ for (;;) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ switch (_vm->_objectsMan->getBobAnimDataIdx(4)) {
+ case 10:
+ if (!playFl) {
+ _vm->_soundMan->playWav(1);
+ playFl = true;
+ }
+ break;
+ case 11:
+ playFl = false;
+ break;
+ }
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(4) == 24)
+ break;
+ }
+ _vm->_objectsMan->stopBobAnimation(4);
+ _vm->_objectsMan->animateSprite(0);
+ break;
+ }
+
+ case 207:
+ _vm->_talkMan->animateObject("PANNEAU.PE2");
+ break;
+
+ case 208: {
+ _vm->_globals->_disableInventFl = true;
+ if (_vm->_globals->_saveData->_data[svLastPrevScreenId] != _vm->_globals->_saveData->_data[svField401]) {
+ _vm->_soundMan->_specialSoundNum = 208;
+ _vm->_animMan->playSequence("SORT.SEQ", 10, 4, 10, true, false);
+ _vm->_soundMan->_specialSoundNum = 0;
+ }
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_linesMan->_route = (RouteItem *)NULL;
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 330, 418);
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_objectsMan->_zoneNum = 0;
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_objectsMan->GOHOME();
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_linesMan->_route != (RouteItem *)NULL);
+ _vm->_objectsMan->setSpriteIndex(0, 64);
+ _vm->_globals->_exitId = _vm->_globals->_saveData->_data[svField401];
+ _vm->_globals->_disableInventFl = false;
+ break;
+ }
+
+ case 209: {
+ _vm->_objectsMan->setBobAnimDataIdx(1, 0);
+ _vm->_objectsMan->setBobAnimDataIdx(2, 0);
+ _vm->_objectsMan->setSpriteIndex(0, 60);
+ _vm->_objectsMan->stopBobAnimation(4);
+ _vm->_objectsMan->setBobAnimation(1);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(1) != 9);
+ _vm->_objectsMan->stopBobAnimation(1);
+ _vm->_linesMan->_route = (RouteItem *)NULL;
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 330, 314);
+ _vm->_objectsMan->_zoneNum = 0;
+ _vm->_globals->_checkDistanceFl = true;
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_objectsMan->GOHOME();
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_linesMan->_route != (RouteItem *)NULL);
+ _vm->_objectsMan->setSpriteIndex(0, 64);
+ _vm->_objectsMan->setBobAnimation(2);
+ _vm->_soundMan->playSoundFile("SOUND66.WAV");
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(2) != 10);
+ _vm->_objectsMan->stopBobAnimation(2);
+ _vm->_objectsMan->setBobAnimation(4);
+ break;
+ }
+
+ case 210:
+ _vm->_soundMan->_specialSoundNum = 210;
+ _vm->_animMan->playSequence2("SECRET1.SEQ", 1, 12, 1, true);
+ _vm->_soundMan->_specialSoundNum = 0;
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 192, 152, 0);
+ _vm->_objectsMan->setBobAnimation(9);
+ _vm->_objectsMan->loadLinkFile("IM73a", true);
+ _vm->_objectsMan->enableHidingBehavior();
+ _vm->_objectsMan->setHidingUseCount(0);
+ _vm->_objectsMan->setHidingUseCount(1);
+ _vm->_graphicsMan->setColorPercentage2(252, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage2(253, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage2(251, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage2(254, 0, 0, 0);
+ break;
+
+ case 211:
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->disableHidingBehavior();
+ _vm->_soundMan->_specialSoundNum = 211;
+ _vm->_animMan->playSequence("SECRET2.SEQ", 1, 12, 100, false, true);
+ _vm->_soundMan->_specialSoundNum = 0;
+ _vm->_graphicsMan->_noFadingFl = true;
+ _vm->_graphicsMan->fadeOutLong();
+
+ for (int i = 1; i <= 39; i++) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ }
+
+ _vm->_graphicsMan->setColorPercentage2(252, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage2(253, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage2(251, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage2(254, 0, 0, 0);
+ break;
+
+ case 215:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("aviat.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 216:
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("aviat1.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ break;
+
+ case 229:
+ _vm->_soundMan->_specialSoundNum = 229;
+ _vm->_animMan->playSequence("MUR.SEQ", 1, 12, 1, false, false);
+ _vm->_soundMan->_specialSoundNum = 0;
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 340, 157, 2);
+ break;
+
+ case 230: {
+ _vm->_objectsMan->loadLinkFile("IM93a", true);
+ _vm->_objectsMan->enableHidingBehavior();
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_objectsMan->_oldCharacterPosX = _vm->_objectsMan->getSpriteX(0);
+ _vm->_objectsMan->resetOldDirection();
+ _vm->_objectsMan->resetHomeRateCounter();
+ _vm->_globals->_checkDistanceFl = true;
+ _vm->_linesMan->_route = (RouteItem *)NULL;
+ _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 488, 280);
+ _vm->_globals->_checkDistanceFl = true;
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_objectsMan->GOHOME();
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_linesMan->_route != (RouteItem *)NULL);
+ _vm->_objectsMan->removeSprite(0);
+ bool playFl = false;
+ _vm->_objectsMan->setBobAnimation(7);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ if (_vm->_objectsMan->getBobAnimDataIdx(7) == 9 && !playFl) {
+ playFl = true;
+ _vm->_soundMan->playSoundFile("SOUND81.WAV");
+ }
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(7) != 15);
+ _vm->_objectsMan->stopBobAnimation(7);
+ _vm->_objectsMan->setSpriteX(0, 476);
+ _vm->_objectsMan->setSpriteY(0, 278);
+ _vm->_objectsMan->animateSprite(0);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 337, 154, 3);
+ _vm->_objectsMan->loadLinkFile("IM93c", true);
+ _vm->_objectsMan->enableHidingBehavior();
+ break;
+ }
+
+ case 231:
+ _vm->_objectsMan->disableHidingBehavior();
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setBobAnimation(12);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(12) != 6);
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("PRMORT.pe2");
+ _vm->_globals->_introSpeechOffFl = false;
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(12) != 12);
+ _vm->_objectsMan->animateSprite(0);
+ _vm->_objectsMan->stopBobAnimation(12);
+ _vm->_objectsMan->enableHidingBehavior();
+ break;
+
+ case 233: {
+ _vm->_objectsMan->disableHidingBehavior();
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setBobAnimation(11);
+ bool playFl = false;
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_objectsMan->getBobAnimDataIdx(11) == 10 && !playFl)
+ playFl = true;
+ } while (_vm->_objectsMan->getBobAnimDataIdx(11) != 13);
+ _vm->_objectsMan->stopBobAnimation(11);
+ _vm->_objectsMan->enableHidingBehavior();
+ _vm->_objectsMan->setBobAnimation(13);
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ } while (_vm->_objectsMan->getBobAnimDataIdx(13) != 48);
+ _vm->_globals->_introSpeechOffFl = true;
+ _vm->_talkMan->startAnimatedCharacterDialogue("HRADIO.PE2");
+ _vm->_globals->_introSpeechOffFl = false;
+ _vm->_graphicsMan->fadeOutLong();
+ _vm->_objectsMan->stopBobAnimation(13);
+ _vm->_graphicsMan->_noFadingFl = true;
+ _vm->_globals->_exitId = 94;
+ break;
+ }
+
+ case 236: {
+ if (_vm->_globals->_saveData->_data[svField341]) {
+ switch (_vm->_globals->_saveData->_data[svField341]) {
+ case 1:
+ vbobFrameIndex = 6;
+ break;
+ case 2:
+ vbobFrameIndex = 5;
+ break;
+ case 3:
+ vbobFrameIndex = 4;
+ break;
+ }
+ _vm->_soundMan->playSoundFile("SOUND83.WAV");
+ _vm->_objectsMan->setAndPlayAnim(vbobFrameIndex, 26, 50, false);
+
+ switch (_vm->_globals->_saveData->_data[svField341]) {
+ case 1:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 27, 117, 0);
+ _vm->_globals->_saveData->_data[svField338] = 0;
+ break;
+ case 2:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 145, 166, 2);
+ _vm->_globals->_saveData->_data[svField339] = 0;
+ break;
+ case 3:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 4);
+ _vm->_globals->_saveData->_data[svField340] = 0;
+ break;
+ }
+ }
+ _vm->_soundMan->playSoundFile("SOUND83.WAV");
+ _vm->_objectsMan->setAndPlayAnim(6, 0, 23, false);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 27, 117, 1);
+ break;
+ }
+
+ case 237: {
+ switch (_vm->_globals->_saveData->_data[svField341]) {
+ case 1:
+ vbobFrameIndex = 6;
+ break;
+ case 2:
+ vbobFrameIndex = 5;
+ break;
+ case 3:
+ vbobFrameIndex = 4;
+ break;
+ }
+
+ if (_vm->_globals->_saveData->_data[svField341]) {
+ _vm->_soundMan->playSoundFile("SOUND83.WAV");
+ _vm->_objectsMan->setAndPlayAnim(vbobFrameIndex, 26, 50, false);
+
+ switch (_vm->_globals->_saveData->_data[svField341]) {
+ case 1:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 27, 117, 0);
+ _vm->_globals->_saveData->_data[svField338] = 0;
+ break;
+ case 2:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 145, 166, 2);
+ _vm->_globals->_saveData->_data[svField339] = 0;
+ break;
+ case 3:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 4);
+ _vm->_globals->_saveData->_data[svField340] = 0;
+ break;
+ }
+ }
+
+ _vm->_soundMan->playSoundFile("SOUND83.WAV");
+ _vm->_objectsMan->setAndPlayAnim(5, 0, 23, false);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 145, 166, 3);
+ break;
+ }
+
+ case 238: {
+ switch (_vm->_globals->_saveData->_data[svField341]) {
+ case 1:
+ vbobFrameIndex = 6;
+ break;
+ case 2:
+ vbobFrameIndex = 5;
+ break;
+ case 3:
+ vbobFrameIndex = 4;
+ break;
+ }
+
+ if (_vm->_globals->_saveData->_data[svField341]) {
+ _vm->_soundMan->playSoundFile("SOUND83.WAV");
+ _vm->_objectsMan->setAndPlayAnim(vbobFrameIndex, 26, 50, false);
+ switch (_vm->_globals->_saveData->_data[svField341]) {
+ case 1:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 27, 117, 0);
+ _vm->_globals->_saveData->_data[svField338] = 0;
+ break;
+ case 2:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 145, 166, 2);
+ _vm->_globals->_saveData->_data[svField339] = 0;
+ break;
+ case 3:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 4);
+ _vm->_globals->_saveData->_data[svField340] = 0;
+ break;
+ }
+ }
+ _vm->_soundMan->playSoundFile("SOUND83.WAV");
+ _vm->_objectsMan->setAndPlayAnim(4, 0, 23, false);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 5);
+ break;
+ }
+
+ case 239:
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_soundMan->playSoundFile("SOUND84.WAV");
+ _vm->_objectsMan->setAndPlayAnim(16, 0, 10, false);
+ break;
+
+ case 240: {
+ _vm->_objectsMan->setBobAnimation(1);
+ bool soundFlag = false;
+ do {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ switch (_vm->_objectsMan->getBobAnimDataIdx(1)) {
+ case 12:
+ if (!soundFlag) {
+ _vm->_soundMan->playSoundFile("SOUND86.WAV");
+ soundFlag = true;
+ }
+ break;
+ case 13:
+ // The original was starting then stopping sound at 25
+ // It looked wrong so the check was set on 26
+ case 26:
+ soundFlag = false;
+ break;
+ case 25:
+ if (!soundFlag) {
+ _vm->_soundMan->playSoundFile("SOUND85.WAV");
+ soundFlag = true;
+ }
+ break;
+ }
+ } while (_vm->_objectsMan->getBobAnimDataIdx(1) != 32);
+ _vm->_objectsMan->stopBobAnimation(1);
+ _vm->_objectsMan->setBobAnimation(2);
+ _vm->_fontMan->hideText(9);
+ bool displayedTxtFl = false;
+ if (!_vm->_soundMan->_textOffFl) {
+ _vm->_fontMan->initTextBuffers(9, 617, _vm->_globals->_textFilename, 91, 41, 3, 30, 253);
+ _vm->_fontMan->showText(9);
+ displayedTxtFl = true;
+ }
+ if (!_vm->_soundMan->_voiceOffFl)
+ _vm->_soundMan->mixVoice(617, 4, displayedTxtFl);
+ for (int i = 0; i <= 29; i++) {
+ if (_vm->shouldQuit())
+ return -1; // Exiting game
+
+ _vm->_events->refreshScreenAndEvents();
+ }
+ CharacterLocation *realHopkins = &_vm->_globals->_saveData->_realHopkins;
+ realHopkins->_pos.x = _vm->_objectsMan->getSpriteX(0);
+ realHopkins->_pos.y = _vm->_objectsMan->getSpriteY(0);
+ realHopkins->_startSpriteIndex = 57;
+ realHopkins->_location = 97;
+ _vm->_globals->_saveData->_data[svHopkinsCloneFl] = 1;
+ _vm->_globals->_saveData->_data[svField352] = 1;
+ _vm->_globals->_saveData->_data[svField353] = 1;
+ _vm->_globals->_saveData->_data[svField354] = 1;
+ break;
+ }
+
+ case 241:
+ _vm->_talkMan->startAnimatedCharacterDialogue("RECEP.PE2");
+ break;
+
+ // Resurrect Samantha's clone
+ case 242: {
+ _vm->_soundMan->playSoundFile("SOUND87.WAV");
+ _vm->_animMan->playSequence("RESUF.SEQ", 1, 24, 1, false, true);
+
+ CharacterLocation *samantha = &_vm->_globals->_saveData->_samantha;
+ samantha->_pos.x = 404;
+ samantha->_pos.y = 395;
+ samantha->_startSpriteIndex = 64;
+ samantha->_location = _vm->_globals->_screenId;
+ samantha->_zoomFactor = -(100 * (67 - (100 - abs(_vm->_globals->_spriteSize[790 / 2]))) / 67);
+
+ _vm->_globals->_saveData->_data[svField357] = 1;
+ _vm->_globals->_saveData->_data[svField354] = 0;
+ _vm->_globals->_saveData->_data[svField356] = 0;
+ _vm->_globals->_saveData->_data[svField355] = 1;
+ _vm->_objectsMan->_twoCharactersFl = true;
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 373, 191, 3);
+ _vm->_objectsMan->addStaticSprite(_vm->_objectsMan->_headSprites, samantha->_pos, 1, 3, samantha->_zoomFactor, false, 20, 127);
+ _vm->_objectsMan->animateSprite(1);
+ break;
+ }
+
+ case 243:
+ _vm->_soundMan->playSoundFile("SOUND88.WAV");
+ if (_vm->_globals->_saveData->_data[svField341] == 2) {
+ _vm->_animMan->playSequence("RESU.SEQ", 2, 24, 2, false, true);
+ } else {
+ _vm->_objectsMan->setAndPlayAnim(7, 0, 14, false);
+ }
+ break;
+
+ case 245:
+ _vm->_soundMan->playSoundFile("SOUND89.WAV");
+ _vm->_objectsMan->setAndPlayAnim(5, 0, 6, false);
+ _vm->_linesMan->_zone[4]._destX = 276;
+ _vm->_objectsMan->enableVerb(4, 19);
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 285, 379, 0);
+ _vm->_globals->_saveData->_data[svField399] = 1;
+ break;
+
+ case 246:
+ _vm->_objectsMan->removeSprite(0);
+ _vm->_objectsMan->setAndPlayAnim(6, 0, 15, false);
+ _vm->_objectsMan->_charactersEnabledFl = true;
+ _vm->_graphicsMan->displayScreen(true);
+ _vm->_animMan->playSequence2("TUNNEL.SEQ", 1, 18, 20, true);
+ _vm->_graphicsMan->_noFadingFl = true;
+ _vm->_graphicsMan->fadeOutLong();
+ _vm->_objectsMan->_charactersEnabledFl = false;
+ _vm->_globals->_exitId = 100;
+ break;
+
+ case 600:
+ if (!_vm->getIsDemo()) {
+ _vm->_graphicsMan->_fadingFl = true;
+ _vm->_graphicsMan->_fadeDefaultSpeed = 1;
+ _vm->_animMan->playAnim("BOMBE1A.ANM", 100, 18, 100);
+ }
+ _vm->_graphicsMan->loadImage("BOMBEB");
+ _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0);
+ _vm->_graphicsMan->initScreen("BOMBE", 2, true);
+ _vm->_graphicsMan->fadeInShort();
+ break;
+
+ case 601:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false);
+ _vm->_objectsMan->setAndPlayAnim(2, 0, 16, true);
+ break;
+
+ case 602:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false);
+ _vm->_objectsMan->setAndPlayAnim(4, 0, 16, true);
+ break;
+
+ case 603:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false);
+ _vm->_objectsMan->setAndPlayAnim(3, 0, 16, true);
+ _vm->_soundMan->_specialSoundNum = 199;
+ _vm->_graphicsMan->_fadingFl = true;
+ _vm->_animMan->playAnim("BOMBE2A.ANM", 50, 14, 500);
+ _vm->_soundMan->_specialSoundNum = 0;
+ memset(_vm->_graphicsMan->_frontBuffer, 0, 614400);
+ _vm->_graphicsMan->_noFadingFl = true;
+ _vm->_globals->_exitId = 151;
+ break;
+
+ case 604:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false);
+ _vm->_objectsMan->setAndPlayAnim(1, 0, 16, true);
+ _vm->_soundMan->_specialSoundNum = 199;
+ _vm->_animMan->playAnim("BOMBE2A.ANM", 50, 14, 500);
+ _vm->_soundMan->_specialSoundNum = 0;
+ _vm->_graphicsMan->_noFadingFl = true;
+ memset(_vm->_graphicsMan->_frontBuffer, 0, 614400);
+ _vm->_globals->_exitId = 151;
+ break;
+
+ case 605:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false);
+ _vm->_objectsMan->setAndPlayAnim(5, 0, 16, true);
+ _vm->_graphicsMan->fadeOutShort();
+ _vm->_soundMan->_specialSoundNum = 199;
+ _vm->_graphicsMan->_fadingFl = true;
+ _vm->_animMan->playAnim("BOMBE2A.ANM", 50, 14, 500);
+ _vm->_soundMan->_specialSoundNum = 0;
+ _vm->_graphicsMan->_noFadingFl = true;
+ memset(_vm->_graphicsMan->_frontBuffer, 0, 614400);
+ _vm->_globals->_exitId = 151;
+ break;
+
+ case 606:
+ _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false);
+ _vm->_objectsMan->setAndPlayAnim(6, 0, 16, true);
+ if ((_vm->getPlatform() != Common::kPlatformWindows) || !_vm->getIsDemo()) {
+ _vm->_animMan->playAnim("BOMBE3A.ANM", 50, 14, 500);
+ memset(_vm->_graphicsMan->_frontBuffer, 0, 614400);
+ }
+ _vm->_globals->_exitId = 6;
+ break;
+
+ case 607:
+ // Display bomb plan
+ if (!_vm->getIsDemo()) {
+ memcpy(_vm->_graphicsMan->_oldPalette, _vm->_graphicsMan->_palette, 769);
+ _vm->_animMan->playAnim2("PLAN.ANM", 50, 10, 800);
+ }
+ _vm->_graphicsMan->resetDirtyRects();
+ break;
+
+ case 608:
+ _vm->_objectsMan->stopBobAnimation(2);
+ _vm->_objectsMan->stopBobAnimation(3);
+ _vm->_objectsMan->stopBobAnimation(4);
+ _vm->_objectsMan->stopBobAnimation(6);
+ _vm->_objectsMan->stopBobAnimation(11);
+ _vm->_objectsMan->stopBobAnimation(10);
+ break;
+
+ case 609:
+ _vm->_objectsMan->setBobAnimation(2);
+ _vm->_objectsMan->setBobAnimation(3);
+ _vm->_objectsMan->setBobAnimation(4);
+ _vm->_objectsMan->setBobAnimation(6);
+ _vm->_objectsMan->setBobAnimation(11);
+ _vm->_objectsMan->setBobAnimation(10);
+ break;
+
+ case 610:
+ _vm->_objectsMan->stopBobAnimation(5);
+ _vm->_objectsMan->stopBobAnimation(7);
+ _vm->_objectsMan->stopBobAnimation(8);
+ _vm->_objectsMan->stopBobAnimation(9);
+ _vm->_objectsMan->stopBobAnimation(12);
+ _vm->_objectsMan->stopBobAnimation(13);
+ break;
+
+ case 611:
+ _vm->_objectsMan->setBobAnimation(5);
+ _vm->_objectsMan->setBobAnimation(7);
+ _vm->_objectsMan->setBobAnimation(8);
+ _vm->_objectsMan->setBobAnimation(9);
+ _vm->_objectsMan->setBobAnimation(12);
+ _vm->_objectsMan->setBobAnimation(13);
+ break;
+ }
+ opcodeType = 1;
+ break;
+ case MKTAG24('E', 'I', 'F'):
+ opcodeType = 4;
+ break;
+ case MKTAG24('V', 'A', 'L'): {
+ opcodeType = 1;
+ int idx = READ_LE_INT16(dataP + 5);
+ assert(idx >= 0 && idx < 2050);
+ _vm->_globals->_saveData->_data[idx] = dataP[7];
+ break;
+ }
+ case MKTAG24('A', 'D', 'D'):
+ opcodeType = 1;
+ _vm->_globals->_saveData->_data[READ_LE_INT16(dataP + 5)] += dataP[7];
+ break;
+ case MKTAG24('B', 'O', 'S'):
+ opcodeType = 1;
+ _vm->_objectsMan->setBobOffset(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7));
+ break;
+ case MKTAG24('V', 'O', 'N'):
+ _vm->_objectsMan->enableVerb(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7));
+ opcodeType = 1;
+ break;
+ case MKTAG24('Z', 'C', 'H'):
+ _vm->_linesMan->_zone[READ_LE_INT16(dataP + 5)]._messageId = READ_LE_INT16(dataP + 7);
+ opcodeType = 1;
+ break;
+ case MKTAG24('J', 'U', 'M'):
+ _vm->_objectsMan->_jumpZone = READ_LE_INT16(dataP + 5);
+ _vm->_objectsMan->_jumpVerb = READ_LE_INT16(dataP + 7);
+ opcodeType = 6;
+ break;
+ case MKTAG24('S', 'O', 'U'): {
+ int soundNum = READ_LE_INT16(dataP + 5);
+
+ Common::String file = Common::String::format("SOUND%d.WAV", soundNum);
+ _vm->_soundMan->playSoundFile(file);
+ opcodeType = 1;
+ break;
+ }
+ case MKTAG24('V', 'O', 'F'):
+ _vm->_objectsMan->disableVerb(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7));
+ opcodeType = 1;
+ break;
+ case MKTAG24('I', 'I', 'F'):
+ opcodeType = 3;
+ break;
+ default:
+ warning("Unhandled opcode %c%c%c", dataP[2], dataP[3], dataP[4]);
+ break;
+ }
+
+ return opcodeType;
+}
+
+
+int ScriptManager::handleGoto(const byte *dataP) {
+ return READ_LE_INT16(dataP + 5);
+}
+
+int ScriptManager::handleIf(const byte *dataP, int offset) {
+ int newOffset;
+ int curOffset = offset;
+ bool loopFl;
+ do {
+ loopFl = false;
+ int tmpOffset = curOffset;
+ int opcodeType;
+ do {
+ if (_vm->shouldQuit())
+ return 0; // Exiting game
+
+ ++tmpOffset;
+ if (tmpOffset > 400)
+ error("Control if failed");
+ opcodeType = checkOpcode(dataP + 20 * tmpOffset);
+ } while (opcodeType != 4); // EIF
+ newOffset = tmpOffset;
+ tmpOffset = curOffset;
+ do {
+ if (_vm->shouldQuit())
+ return 0; // Exiting game
+
+ ++tmpOffset;
+ if (tmpOffset > 400)
+ error("Control if failed ");
+ if (checkOpcode(dataP + 20 * tmpOffset) == 3) { // IIF
+ curOffset = newOffset;
+ loopFl = true;
+ break;
+ }
+ } while (newOffset != tmpOffset);
+ } while (loopFl);
+
+ const byte *buf = dataP + 20 * offset;
+ byte oper = buf[13];
+ byte oper2 = buf[14];
+ byte operType = buf[15];
+ int saveDataIdx1 = READ_LE_INT16(buf + 5);
+ int compVal1 = READ_LE_INT16(buf + 7);
+ bool check1Fl = false;
+ if ((oper == 1 && _vm->_globals->_saveData->_data[saveDataIdx1] == compVal1) ||
+ (oper == 2 && _vm->_globals->_saveData->_data[saveDataIdx1] != compVal1) ||
+ (oper == 3 && _vm->_globals->_saveData->_data[saveDataIdx1] <= compVal1) ||
+ (oper == 4 && _vm->_globals->_saveData->_data[saveDataIdx1] >= compVal1) ||
+ (oper == 5 && _vm->_globals->_saveData->_data[saveDataIdx1] > compVal1) ||
+ (oper == 6 && _vm->_globals->_saveData->_data[saveDataIdx1] < compVal1))
+ check1Fl = true;
+
+ bool check2Fl = false;
+ if (operType != 3) {
+ int saveDataIdx2 = READ_LE_INT16(buf + 9);
+ int compVal2 = READ_LE_INT16(buf + 11);
+ if ((oper2 == 1 && compVal2 == _vm->_globals->_saveData->_data[saveDataIdx2]) ||
+ (oper2 == 2 && compVal2 != _vm->_globals->_saveData->_data[saveDataIdx2]) ||
+ (oper2 == 3 && compVal2 >= _vm->_globals->_saveData->_data[saveDataIdx2]) ||
+ (oper2 == 4 && compVal2 <= _vm->_globals->_saveData->_data[saveDataIdx2]) ||
+ (oper2 == 5 && compVal2 < _vm->_globals->_saveData->_data[saveDataIdx2]) ||
+ (oper2 == 6 && compVal2 > _vm->_globals->_saveData->_data[saveDataIdx2]))
+ check2Fl = true;
+ }
+
+ if ((operType == 3) && check1Fl) {
+ return (offset + 1);
+ } else if ((operType == 1) && check1Fl && check2Fl) {
+ return (offset + 1);
+ } else if ((operType == 2) && (check1Fl || check2Fl)) {
+ return (offset + 1);
+ }
+
+ return (newOffset + 1);
+}
+
+int ScriptManager::checkOpcode(const byte *dataP) {
+ int result = 0;
+ if (READ_BE_UINT16(dataP) != MKTAG16('F', 'C'))
+ return result;
+
+ uint32 signature24 = READ_BE_UINT24(&dataP[2]);
+ switch (signature24) {
+ case MKTAG24('A', 'N', 'I'):
+ case MKTAG24('B', 'C', 'A'):
+ case MKTAG24('B', 'O', 'B'):
+ case MKTAG24('B', 'O', 'F'):
+ case MKTAG24('B', 'O', 'S'):
+ case MKTAG24('M', 'U', 'S'):
+ case MKTAG24('O', 'B', 'M'):
+ case MKTAG24('O', 'B', 'P'):
+ case MKTAG24('P', 'E', 'R'):
+ case MKTAG24('S', 'O', 'U'):
+ case MKTAG24('S', 'P', 'E'):
+ case MKTAG24('T', 'X', 'T'):
+ case MKTAG24('V', 'A', 'L'):
+ case MKTAG24('V', 'O', 'F'):
+ case MKTAG24('V', 'O', 'N'):
+ case MKTAG24('Z', 'C', 'H'):
+ case MKTAG24('Z', 'O', 'F'):
+ case MKTAG24('Z', 'O', 'N'):
+ result = 1;
+ break;
+ case MKTAG24('G', 'O', 'T'):
+ result = 2;
+ break;
+ case MKTAG24('I', 'I', 'F'):
+ result = 3;
+ break;
+ case MKTAG24('E', 'I', 'F'):
+ result = 4;
+ break;
+ case MKTAG24('E', 'X', 'I'):
+ case MKTAG24('S', 'O', 'R'):
+ result = 5;
+ break;
+ case MKTAG24('J', 'U', 'M'):
+ result = 6;
+ break;
+// default:
+// warning("Unhandled opcode %c%c%c", dataP[2], dataP[3], dataP[4]);
+ }
+ return result;
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/script.h b/engines/hopkins/script.h
new file mode 100644
index 0000000000..2a22e18ccb
--- /dev/null
+++ b/engines/hopkins/script.h
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef HOPKINS_SCRIPT_H
+#define HOPKINS_SCRIPT_H
+
+#include "hopkins/globals.h"
+
+#include "common/scummsys.h"
+#include "common/endian.h"
+#include "common/str.h"
+
+namespace Hopkins {
+
+class ScriptManager {
+private:
+ HopkinsEngine *_vm;
+ int checkOpcode(const byte *dataP);
+public:
+ bool _tempObjectFl;
+
+ ScriptManager(HopkinsEngine *vm);
+
+ int handleOpcode(const byte *dataP);
+ int handleIf(const byte *dataP, int offset);
+ int handleGoto(const byte *dataP);
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_SCRIPT_H */
diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp
new file mode 100644
index 0000000000..d8dfba5246
--- /dev/null
+++ b/engines/hopkins/sound.cpp
@@ -0,0 +1,916 @@
+/* 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 "hopkins/sound.h"
+
+#include "hopkins/globals.h"
+#include "hopkins/hopkins.h"
+
+#include "audio/decoders/adpcm_intern.h"
+#include "common/system.h"
+#include "common/config-manager.h"
+#include "common/file.h"
+#include "common/textconsole.h"
+#include "audio/audiostream.h"
+#include "audio/mods/module.h"
+#include "audio/mods/protracker.h"
+#include "audio/decoders/raw.h"
+
+namespace Hopkins {
+
+class APC_ADPCMStream : public Audio::DVI_ADPCMStream {
+public:
+ APC_ADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, int rate, int channels) : DVI_ADPCMStream(stream, disposeAfterUse, stream->size(), rate, channels, 0) {
+ stream->seek(-12, SEEK_CUR);
+ _status.ima_ch[0].last = _startValue[0] = stream->readUint32LE();
+ _status.ima_ch[1].last = _startValue[1] = stream->readUint32LE();
+ stream->seek(4, SEEK_CUR);
+ }
+
+ void reset() {
+ DVI_ADPCMStream::reset();
+ _status.ima_ch[0].last = _startValue[0];
+ _status.ima_ch[1].last = _startValue[1];
+ }
+
+private:
+ int16 _startValue[2];
+};
+
+Audio::RewindableAudioStream *makeAPCStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse) {
+ if (stream->readUint32BE() != MKTAG('C', 'R', 'Y', 'O'))
+ return 0;
+ if (stream->readUint32BE() != MKTAG('_', 'A', 'P', 'C'))
+ return 0;
+ stream->readUint32BE(); // version
+ stream->readUint32LE(); // out size
+ uint32 rate = stream->readUint32LE();
+ stream->skip(8); // initial values, will be handled by the class
+ bool stereo = stream->readUint32LE() != 0;
+
+ return new APC_ADPCMStream(stream, disposeAfterUse, rate, stereo ? 2 : 1);
+}
+
+class TwaAudioStream : public Audio::AudioStream {
+public:
+ TwaAudioStream(Common::String name, Common::SeekableReadStream *stream) {
+ _name = name;
+ _cueSheet.clear();
+ _cueStream = NULL;
+ _cue = 0;
+ _loadedCue = -1;
+
+ for (;;) {
+ char buf[3];
+ stream->read(buf, 3);
+
+ if (buf[0] == 'x' || stream->eos())
+ break;
+
+ _cueSheet.push_back(atol(buf));
+ }
+
+ for (_cue = 0; _cue < _cueSheet.size(); _cue++) {
+ if (loadCue(_cue))
+ break;
+ }
+ }
+
+ ~TwaAudioStream() {
+ delete _cueStream;
+ _cueStream = NULL;
+ }
+
+ virtual bool isStereo() const {
+ return _cueStream ? _cueStream->isStereo() : true;
+ }
+
+ virtual int getRate() const {
+ return _cueStream ? _cueStream->getRate() : 22050;
+ }
+
+ virtual bool endOfData() const {
+ return _cueStream == NULL;
+ }
+
+ virtual int readBuffer(int16 *buffer, const int numSamples) {
+ if (!_cueStream)
+ return 0;
+
+ int16 *buf = buffer;
+ int samplesLeft = numSamples;
+
+ while (samplesLeft) {
+ if (_cueStream) {
+ int readSamples = _cueStream->readBuffer(buf, samplesLeft);
+ buf += readSamples;
+ samplesLeft -= readSamples;
+ }
+
+ if (samplesLeft > 0) {
+ if (++_cue >= _cueSheet.size()) {
+ _cue = 0;
+ }
+ loadCue(_cue);
+ }
+ }
+
+ return numSamples;
+ }
+
+protected:
+ bool loadCue(int nr) {
+ if (_loadedCue == _cueSheet[nr]) {
+ _cueStream->rewind();
+ return true;
+ }
+
+ delete _cueStream;
+ _cueStream = NULL;
+ _loadedCue = _cueSheet[nr];
+
+ Common::String filename = Common::String::format("%s_%02d", _name.c_str(), _cueSheet[nr]);
+ Common::File *file = new Common::File();
+
+ if (file->open(filename + ".APC")) {
+ _cueStream = makeAPCStream(file, DisposeAfterUse::YES);
+ return true;
+ }
+
+ if (file->open(filename + ".WAV")) {
+ _cueStream = Audio::makeWAVStream(file, DisposeAfterUse::YES);
+ return true;
+ }
+
+ if (file->open(filename + ".RAW")) {
+ _cueStream = Audio::makeRawStream(file, 22050, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
+ return true;
+ }
+
+ warning("TwaAudioStream::loadCue: Missing cue %d (%s)", nr, filename.c_str());
+ _loadedCue = -1;
+ delete file;
+ return false;
+ }
+
+private:
+ Common::String _name;
+ Common::Array<int> _cueSheet;
+ Audio::RewindableAudioStream *_cueStream;
+ uint _cue;
+ int _loadedCue;
+};
+
+Audio::AudioStream *makeTwaStream(Common::String name, Common::SeekableReadStream *stream) {
+ return new TwaAudioStream(name, stream);
+}
+
+SoundManager::SoundManager(HopkinsEngine *vm) {
+ _vm = vm;
+
+ _specialSoundNum = 0;
+ _soundVolume = 0;
+ _voiceVolume = 0;
+ _musicVolume = 0;
+ _soundOffFl = true;
+ _musicOffFl = true;
+ _voiceOffFl = true;
+ _textOffFl = false;
+ _soundFl = false;
+ _skipRefreshFl = false;
+ _currentSoundIndex = 0;
+ _oldSoundNumber = 0;
+ _modPlayingFl = false;
+
+ for (int i = 0; i < VOICE_COUNT; ++i)
+ Common::fill((byte *)&_voice[i], (byte *)&_voice[i] + sizeof(VoiceItem), 0);
+ for (int i = 0; i < SWAV_COUNT; ++i)
+ Common::fill((byte *)&_sWav[i], (byte *)&_sWav[i] + sizeof(SwavItem), 0);
+ for (int i = 0; i < SOUND_COUNT; ++i)
+ Common::fill((byte *)&_sound[i], (byte *)&_sound[i] + sizeof(SoundItem), 0);
+ Common::fill((byte *)&_music, (byte *)&_music + sizeof(MusicItem), 0);
+}
+
+SoundManager::~SoundManager() {
+ stopMusic();
+ delMusic();
+ _vm->_mixer->stopHandle(_musicHandle);
+ _modPlayingFl = false;
+}
+
+void SoundManager::checkSoundEnd() {
+ if (!_soundOffFl && _soundFl) {
+ if (!checkVoiceStatus(1)) {
+ stopVoice(1);
+ delWav(_currentSoundIndex);
+ }
+ }
+}
+
+void SoundManager::loadAnimSound() {
+ switch (_specialSoundNum) {
+ case 2:
+ loadSample(5, "mitra1.wav");
+ loadSample(1, "tir2.wav");
+ loadSample(2, "sound6.wav");
+ loadSample(3, "sound5.WAV");
+ loadSample(4, "sound4.WAV");
+ break;
+ case 5:
+ loadWav("CRIE.WAV", 1);
+ break;
+ case 14:
+ loadWav("SOUND14.WAV", 1);
+ break;
+ case 16:
+ loadWav("SOUND16.WAV", 1);
+ break;
+ case 198:
+ loadWav("SOUND3.WAV", 1);
+ break;
+ case 199:
+ loadWav("SOUND22.WAV", 1);
+ break;
+ case 200:
+ mixVoice(682, 1);
+ break;
+ case 208:
+ loadWav("SOUND77.WAV", 1);
+ break;
+ case 210:
+ loadWav("SOUND78.WAV", 1);
+ break;
+ case 211:
+ loadWav("SOUND78.WAV", 1);
+ break;
+ case 229:
+ loadWav("SOUND80.WAV", 1);
+ loadWav("SOUND82.WAV", 2);
+ break;
+ }
+}
+
+void SoundManager::playAnimSound(int soundNumber) {
+ if (!_vm->_globals->_censorshipFl && _specialSoundNum == 2) {
+ switch (soundNumber) {
+ case 20:
+ playSample(5);
+ break;
+ case 57:
+ case 63:
+ case 69:
+ playSample(1);
+ break;
+ case 75:
+ playSample(2);
+ break;
+ case 109:
+ playSample(3);
+ break;
+ case 122:
+ playSample(4);
+ break;
+ }
+ } else if (_specialSoundNum == 1 && soundNumber == 17)
+ playSoundFile("SOUND42.WAV");
+ else if (_specialSoundNum == 5 && soundNumber == 19)
+ playWav(1);
+ else if (_specialSoundNum == 14 && soundNumber == 625)
+ playWav(1);
+ else if (_specialSoundNum == 16 && soundNumber == 25)
+ playWav(1);
+ else if (_specialSoundNum == 17) {
+ if (soundNumber == 6)
+ playSample(1);
+ else if (soundNumber == 14)
+ playSample(2);
+ else if (soundNumber == 67)
+ playSample(3);
+ } else if (_specialSoundNum == 198 && soundNumber == 15)
+ playWav(1);
+ else if (_specialSoundNum == 199 && soundNumber == 72)
+ playWav(1);
+ else if (_specialSoundNum == 208 && soundNumber == 40)
+ playWav(1);
+ else if (_specialSoundNum == 210 && soundNumber == 2)
+ playWav(1);
+ else if (_specialSoundNum == 211 && soundNumber == 22)
+ playWav(1);
+ else if (_specialSoundNum == 229) {
+ if (soundNumber == 15)
+ playWav(1);
+ else if (soundNumber == 91)
+ playWav(2);
+ }
+}
+
+static const char *const modSounds[] = {
+ "appart", "ville", "Rock", "police", "deep",
+ "purgat", "riviere", "SUSPENS", "labo", "cadavre",
+ "cabane", "purgat2", "foret", "ile", "ile2",
+ "hopkins", "peur", "URAVOLGA", "BASE", "cadavre2",
+ "usine", "chien", "coeur", "stand", "ocean",
+ "base3", "gloop", "cant", "feel", "lost",
+ "tobac"
+};
+
+void SoundManager::playSound(int soundNumber) {
+ if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) {
+ if (soundNumber > 27)
+ return;
+ }
+
+ if (_oldSoundNumber != soundNumber || !_modPlayingFl) {
+ if (_modPlayingFl)
+ stopSound();
+
+ playMod(modSounds[soundNumber - 1]);
+ _oldSoundNumber = soundNumber;
+ }
+}
+
+void SoundManager::stopSound() {
+ stopVoice(0);
+ stopVoice(1);
+ stopVoice(2);
+ if (_soundFl)
+ delWav(_currentSoundIndex);
+
+ for (int i = 1; i <= 48; ++i)
+ removeWavSample(i);
+
+ if (_modPlayingFl) {
+ stopMusic();
+ delMusic();
+ _modPlayingFl = false;
+ }
+}
+
+void SoundManager::playMod(const Common::String &file) {
+ if (_musicOffFl)
+ return;
+ Common::String modFile = file;
+
+ // HACK
+ if (modFile == "URAVOLGA" && (_vm->getPlatform() == Common::kPlatformWindows || _vm->getPlatform() == Common::kPlatformLinux))
+ modFile = "peur";
+
+ // The Windows/Linux version chops off the music file names to 5 characters
+ if (modFile.size() > 5 && (_vm->getPlatform() == Common::kPlatformWindows || _vm->getPlatform() == Common::kPlatformLinux)) {
+ if (!modFile.hasSuffix("2")) {
+ while (modFile.size() > 5)
+ modFile.deleteLastChar();
+ } else {
+ while (modFile.size() > 4)
+ modFile.deleteLastChar();
+ modFile += "2";
+ }
+ }
+ if (_modPlayingFl) {
+ stopMusic();
+ delMusic();
+ _modPlayingFl = false;
+ }
+
+ loadMusic(modFile);
+ playMusic();
+ _modPlayingFl = true;
+}
+
+void SoundManager::loadMusic(const Common::String &file) {
+ if (_music._active)
+ delMusic();
+
+ Common::File f;
+ if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) {
+ Common::String filename = Common::String::format("%s.MOD", file.c_str());
+
+ if (!f.open(filename))
+ error("Error opening file %s", filename.c_str());
+
+ Modules::Module *module;
+ Audio::AudioStream *modStream = Audio::makeProtrackerStream(&f, 0, 44100, true, &module);
+
+ // WORKAROUND: This song is played at the empty lot where the
+ // bank robbers have left the helicopter. The MOD file appears
+ // to be slightly broken. Almost half of it is just the same
+ // noise repeating. We fix this by only playing the working
+ // part of it. The result is pretty close to the Windows music.
+ if (file.equalsIgnoreCase("cadavre")) {
+ module->songlen = 3;
+ }
+
+ _vm->_mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, modStream);
+
+ } else {
+ Common::String filename = Common::String::format("%s.TWA", file.c_str());
+
+ if (!f.open(filename))
+ error("Error opening file %s", filename.c_str());
+
+ Audio::AudioStream *twaStream = makeTwaStream(file.c_str(), &f);
+ _vm->_mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, twaStream);
+ f.close();
+ }
+
+ _music._active = true;
+}
+
+void SoundManager::playMusic() {
+}
+
+void SoundManager::stopMusic() {
+ _vm->_mixer->stopHandle(_musicHandle);
+}
+
+void SoundManager::delMusic() {
+ _music._active = false;
+}
+
+void SoundManager::checkSounds() {
+ checkVoiceActivity();
+}
+
+/**
+ * Checks voices to see if they're finished
+ */
+void SoundManager::checkVoiceActivity() {
+ // Check the status of each voice.
+ bool hasActiveVoice = false;
+ for (int i = 0; i < VOICE_COUNT; ++i) {
+ checkVoiceStatus(i);
+ hasActiveVoice |= _voice[i]._status;
+ }
+
+ if (!hasActiveVoice && _soundFl) {
+ _soundFl = false;
+ _currentSoundIndex = 0;
+ }
+}
+
+bool SoundManager::mixVoice(int voiceId, int voiceMode, bool dispTxtFl) {
+ int fileNumber;
+ int oldMusicVol;
+ bool breakFlag;
+ Common::String prefix;
+ Common::String filename;
+ Common::File f;
+ size_t catPos, catLen;
+
+ fileNumber = voiceId;
+ if (_voiceOffFl)
+ return false;
+
+ if ((voiceMode == 1 || voiceMode == 2)
+ && ( voiceId == 4 || voiceId == 16 || voiceId == 121
+ || voiceId == 142 || voiceId == 182 || voiceId == 191
+ || voiceId == 212 || voiceId == 225 || voiceId == 239
+ || voiceId == 245 || voiceId == 297 || voiceId == 308
+ || voiceId == 333 || voiceId == 348 || voiceId == 352
+ || voiceId == 358 || voiceId == 364 || voiceId == 371
+ || voiceId == 394 || voiceId == 414 || voiceId == 429
+ || voiceId == 442 || voiceId == 446 || voiceId == 461
+ || voiceId == 468 || voiceId == 476 || voiceId == 484
+ || voiceId == 491 || voiceId == 497 || voiceId == 501
+ || voiceId == 511 || voiceId == 520 || voiceId == 536
+ || voiceId == 554 || voiceId == 566 || voiceId == 573
+ || voiceId == 632 || voiceId == 645))
+ fileNumber = 684;
+
+ if (voiceMode == 1 || voiceMode == 2)
+ prefix = "DF";
+ else if (voiceMode == 3)
+ prefix = "IF";
+ else if (voiceMode == 4)
+ prefix = "TF";
+ else if (voiceMode == 5)
+ prefix = "OF";
+
+ // BeOS and OS/2 versions are using a slightly different speech order during intro
+ // This map those values to the ones used by the Win95 and Linux versions
+ int mappedFileNumber = fileNumber;
+ if (voiceMode == 3 && (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS)) {
+ if (fileNumber == 4)
+ mappedFileNumber = 0;
+ else if (fileNumber > 4)
+ mappedFileNumber = fileNumber - 1;
+ }
+
+ filename = Common::String::format("%s%d", prefix.c_str(), mappedFileNumber);
+
+ bool fileFoundFl = false;
+ _vm->_fileIO->searchCat(filename + ".WAV", RES_VOI, fileFoundFl);
+ if (fileFoundFl) {
+ if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS)
+ filename = "ENG_VOI.RES";
+ // Win95 and Linux versions uses another set of names
+ else if (_vm->_globals->_language == LANG_FR)
+ filename = "RES_VFR.RES";
+ else if (_vm->_globals->_language == LANG_EN)
+ filename = "RES_VAN.RES";
+ else if (_vm->_globals->_language == LANG_SP)
+ filename = "RES_VES.RES";
+
+ catPos = _vm->_fileIO->_catalogPos;
+ catLen = _vm->_fileIO->_catalogSize;
+ } else {
+ _vm->_fileIO->searchCat(filename + ".APC", RES_VOI, fileFoundFl);
+ if (fileFoundFl) {
+ if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS)
+ filename = "ENG_VOI.RES";
+ // Win95 and Linux versions uses another set of names
+ else if (_vm->_globals->_language == LANG_FR)
+ filename = "RES_VFR.RES";
+ else if (_vm->_globals->_language == LANG_EN)
+ filename = "RES_VAN.RES";
+ else if (_vm->_globals->_language == LANG_SP)
+ filename = "RES_VES.RES";
+
+ catPos = _vm->_fileIO->_catalogPos;
+ catLen = _vm->_fileIO->_catalogSize;
+ } else {
+ _vm->_fileIO->searchCat(filename + ".RAW", RES_VOI, fileFoundFl);
+ if (fileFoundFl) {
+ if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS)
+ filename = "ENG_VOI.RES";
+ // Win95 and Linux versions uses another set of names
+ else if (_vm->_globals->_language == LANG_FR)
+ filename = "RES_VFR.RES";
+ else if (_vm->_globals->_language == LANG_EN)
+ filename = "RES_VAN.RES";
+ else if (_vm->_globals->_language == LANG_SP)
+ filename = "RES_VES.RES";
+
+ catPos = _vm->_fileIO->_catalogPos;
+ catLen = _vm->_fileIO->_catalogSize;
+ } else {
+ if (!f.exists(filename + ".WAV")) {
+ if (!f.exists(filename + ".APC"))
+ return false;
+ filename = filename + ".APC";
+ } else
+ filename = filename + ".WAV";
+
+ catPos = 0;
+ catLen = 0;
+ }
+ }
+ }
+ oldMusicVol = _musicVolume;
+ if (!loadVoice(filename, catPos, catLen, _sWav[20])) {
+ // This case only concerns the English Win95 demo
+ // If it's not possible to load the voice, we force the active flag
+ // to false in order to make sure the missing buffer won't be played
+ // accidentally later
+ _sWav[20]._active = false;
+ } else {
+ _sWav[20]._active = true;
+
+ // Reduce music volume during speech
+ if (!_musicOffFl && _musicVolume > 2) {
+ _musicVolume -= _musicVolume * 9 / 20;
+ setMODMusicVolume(_musicVolume);
+ }
+ }
+ playVoice();
+
+ _vm->_events->_escKeyFl = false;
+
+ // Loop for playing voice
+ breakFlag = false;
+ do {
+ if (_specialSoundNum != 4 && !_skipRefreshFl)
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_events->getMouseButton())
+ break;
+ _vm->_events->refreshEvents();
+ if (_vm->_events->_escKeyFl)
+ break;
+ // We only check the voice status if the file has been loaded properly
+ // This avoids skipping completely the talk animations in the Win95 UK Demo
+ if (!checkVoiceStatus(2) && _sWav[20]._active)
+ breakFlag = true;
+ // This is specific to the Win95 UK Demo again: if nothing is displayed,
+ // don't wait for a click event.
+ if (!_sWav[20]._active && !dispTxtFl)
+ break;
+ } while (!_vm->shouldQuit() && !breakFlag);
+
+
+ stopVoice(2);
+ removeWavSample(20);
+
+ // Speech is over, set the music volume back to normal
+ _musicVolume = oldMusicVol;
+ if (!_musicOffFl && _musicVolume > 2) {
+ setMODMusicVolume(_musicVolume);
+ }
+ _vm->_events->_escKeyFl = false;
+ _skipRefreshFl = false;
+ return true;
+}
+
+void SoundManager::removeSample(int soundIndex) {
+ if (checkVoiceStatus(1))
+ stopVoice(1);
+ if (checkVoiceStatus(2))
+ stopVoice(2);
+ if (checkVoiceStatus(3))
+ stopVoice(3);
+ removeWavSample(soundIndex);
+ _sound[soundIndex]._active = false;
+}
+
+void SoundManager::playSoundFile(const Common::String &file) {
+ if (_soundOffFl)
+ return;
+
+ // Fallback for the menu option.
+ // The BeOS and OS/2 versions don't play sound at this point.
+ // sound20 sounds very close to bruit2 from the linux and Win95 versions.
+ Common::File f;
+ Common::String filename;
+ if (file == "bruit2.wav" && !f.exists(file))
+ filename = "sound20.wav";
+ else
+ filename = file;
+
+ if (_soundFl)
+ delWav(_currentSoundIndex);
+ loadWav(filename, 1);
+ playWav(1);
+}
+
+void SoundManager::directPlayWav(const Common::String &file) {
+ if (_soundOffFl)
+ return;
+
+ loadWav(file, 1);
+ playWav(1);
+}
+
+void SoundManager::setMODSampleVolume() {
+ for (int idx = 0; idx < SWAV_COUNT; ++idx) {
+ if (idx != 20 && _sWav[idx]._active) {
+ int volume = _soundVolume * 255 / 16;
+ _vm->_mixer->setChannelVolume(_sWav[idx]._soundHandle, volume);
+ }
+ }
+}
+
+void SoundManager::setMODVoiceVolume() {
+ if (_sWav[20]._active) {
+ int volume = _voiceVolume * 255 / 16;
+ _vm->_mixer->setChannelVolume(_sWav[20]._soundHandle, volume);
+ }
+}
+
+void SoundManager::setMODMusicVolume(int volume) {
+ if (_vm->_mixer->isSoundHandleActive(_musicHandle))
+ _vm->_mixer->setChannelVolume(_musicHandle, volume * 255 / 16);
+}
+
+void SoundManager::loadSample(int wavIndex, const Common::String &file) {
+ loadWavSample(wavIndex, file, false);
+ _sound[wavIndex]._active = true;
+}
+
+void SoundManager::playSample(int wavIndex, int voiceMode) {
+ if (_soundOffFl || !_sound[wavIndex]._active)
+ return;
+
+ if (_soundFl)
+ delWav(_currentSoundIndex);
+
+ switch (voiceMode) {
+ case 5:
+ case 8:
+ // Case added to identify the former PLAY_SAMPLE2 calls
+ case 9:
+ if (checkVoiceStatus(1))
+ stopVoice(1);
+ playWavSample(1, wavIndex);
+ break;
+ case 6:
+ if (checkVoiceStatus(2))
+ stopVoice(1);
+ playWavSample(2, wavIndex);
+ break;
+ case 7:
+ if (checkVoiceStatus(3))
+ stopVoice(1);
+ playWavSample(3, wavIndex);
+ break;
+ default:
+ break;
+ }
+}
+
+bool SoundManager::checkVoiceStatus(int voiceIndex) {
+ if (_voice[voiceIndex]._status) {
+ int wavIndex = _voice[voiceIndex]._wavIndex;
+ if (_sWav[wavIndex]._audioStream && _sWav[wavIndex]._audioStream->endOfStream())
+ stopVoice(voiceIndex);
+ }
+
+ return _voice[voiceIndex]._status;
+}
+
+void SoundManager::stopVoice(int voiceIndex) {
+ if (_voice[voiceIndex]._status) {
+ _voice[voiceIndex]._status = false;
+ int wavIndex = _voice[voiceIndex]._wavIndex;
+ if (_sWav[wavIndex]._active && _sWav[wavIndex]._freeSampleFl)
+ removeWavSample(wavIndex);
+ }
+ _voice[voiceIndex]._status = false;
+}
+
+void SoundManager::playVoice() {
+ if (!_sWav[20]._active)
+ return;
+
+ if (!_voice[2]._status) {
+ int wavIndex = _voice[2]._wavIndex;
+ if (_sWav[wavIndex]._active && _sWav[wavIndex]._freeSampleFl)
+ removeWavSample(wavIndex);
+ }
+
+ playWavSample(2, 20);
+}
+
+bool SoundManager::removeWavSample(int wavIndex) {
+ if (!_sWav[wavIndex]._active)
+ return false;
+
+ _vm->_mixer->stopHandle(_sWav[wavIndex]._soundHandle);
+ delete _sWav[wavIndex]._audioStream;
+ _sWav[wavIndex]._audioStream = NULL;
+ _sWav[wavIndex]._active = false;
+
+ return true;
+}
+
+bool SoundManager::loadVoice(const Common::String &filename, size_t fileOffset, size_t entryLength, SwavItem &item) {
+ Common::File f;
+ if (!f.open(filename)) {
+ // Fallback to APC...
+ if (!f.open(setExtension(filename, ".APC"))) {
+ // The English demo doesn't include the speech file.
+ // This avoids it to crash when discussing with other characters
+ if (!_vm->getIsDemo())
+ error("Could not open %s for reading", filename.c_str());
+ return false;
+ }
+ }
+
+ f.seek(fileOffset);
+ item._audioStream = makeSoundStream(f.readStream((entryLength == 0) ? f.size() : entryLength));
+ f.close();
+
+ return true;
+}
+
+void SoundManager::loadWavSample(int wavIndex, const Common::String &filename, bool freeSample) {
+ if (_sWav[wavIndex]._active)
+ removeWavSample(wavIndex);
+
+ if (loadVoice(filename, 0, 0, _sWav[wavIndex])) {
+ _sWav[wavIndex]._active = true;
+ _sWav[wavIndex]._freeSampleFl = freeSample;
+ } else{
+ _sWav[wavIndex]._active = false;
+ }
+}
+
+void SoundManager::loadWav(const Common::String &file, int wavIndex) {
+ loadWavSample(wavIndex, file, true);
+}
+
+void SoundManager::playWav(int wavIndex) {
+ if (_soundFl || _soundOffFl)
+ return;
+
+ _soundFl = true;
+ _currentSoundIndex = wavIndex;
+ playWavSample(1, wavIndex);
+}
+
+void SoundManager::delWav(int wavIndex) {
+ if (!removeWavSample(wavIndex))
+ return;
+
+ if (checkVoiceStatus(1))
+ stopVoice(1);
+
+ _currentSoundIndex = 0;
+ _soundFl = false;
+}
+
+void SoundManager::playWavSample(int voiceIndex, int wavIndex) {
+ if (!_sWav[wavIndex]._active)
+ warning("Bad handle");
+
+ if (_voice[voiceIndex]._status && _sWav[wavIndex]._active && _sWav[wavIndex]._freeSampleFl)
+ removeWavSample(wavIndex);
+
+ _voice[voiceIndex]._status = true;
+ _voice[voiceIndex]._wavIndex = wavIndex;
+
+ int volume = (voiceIndex == 2) ? _voiceVolume * 255 / 16 : _soundVolume * 255 / 16;
+
+ // If the handle is still in use, stop it. Otherwise we'll lose the
+ // handle to that sound. This can currently happen (but probably
+ // shouldn't) when skipping a movie.
+ if (_vm->_mixer->isSoundHandleActive(_sWav[wavIndex]._soundHandle))
+ _vm->_mixer->stopHandle(_sWav[wavIndex]._soundHandle);
+
+ // Start the voice playing
+ _sWav[wavIndex]._audioStream->rewind();
+ _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_sWav[wavIndex]._soundHandle,
+ _sWav[wavIndex]._audioStream, -1, volume, 0, DisposeAfterUse::NO);
+}
+
+void SoundManager::syncSoundSettings() {
+ bool muteAll = false;
+ if (ConfMan.hasKey("mute"))
+ muteAll = ConfMan.getBool("mute");
+
+ // Update the mute settings
+ _musicOffFl = muteAll || (ConfMan.hasKey("music_mute") && ConfMan.getBool("music_mute"));
+ _soundOffFl = muteAll || (ConfMan.hasKey("sfx_mute") && ConfMan.getBool("sfx_mute"));
+ _voiceOffFl = muteAll || (ConfMan.hasKey("speech_mute") && ConfMan.getBool("speech_mute"));
+
+ // Update the volume levels
+ _musicVolume = MIN(255, ConfMan.getInt("music_volume")) * 16 / 255;
+ _soundVolume = MIN(255, ConfMan.getInt("sfx_volume")) * 16 / 255;
+ _voiceVolume = MIN(255, ConfMan.getInt("speech_volume")) * 16 / 255;
+
+ // Update any active sounds
+ for (int idx = 0; idx < SWAV_COUNT; ++idx) {
+ if (_sWav[idx]._active) {
+ int volume = (idx == 20) ? (_voiceVolume * 255 / 16) : (_soundVolume * 255 / 16);
+ _vm->_mixer->setChannelVolume(_sWav[idx]._soundHandle, volume);
+ }
+ }
+ if (_vm->_mixer->isSoundHandleActive(_musicHandle)) {
+ _vm->_mixer->setChannelVolume(_musicHandle, _musicVolume * 255 / 16);
+ }
+}
+
+void SoundManager::updateScummVMSoundSettings() {
+ ConfMan.setBool("mute", _musicOffFl && _soundOffFl && _voiceOffFl);
+ ConfMan.setBool("music_mute", _musicOffFl);
+ ConfMan.setBool("sfx_mute", _soundOffFl);
+ ConfMan.setBool("speech_mute", _voiceOffFl);
+
+ ConfMan.setInt("music_volume", _musicVolume * 255 / 16);
+ ConfMan.setInt("sfx_volume", _soundVolume * 255 / 16);
+ ConfMan.setInt("speech_volume", _voiceVolume * 255 / 16);
+
+ ConfMan.flushToDisk();
+}
+
+/**
+ * Creates an audio stream based on a passed raw stream
+ */
+Audio::RewindableAudioStream *SoundManager::makeSoundStream(Common::SeekableReadStream *stream) {
+ if (_vm->getPlatform() == Common::kPlatformWindows)
+ return makeAPCStream(stream, DisposeAfterUse::YES);
+ else if (_vm->getPlatform() == Common::kPlatformLinux)
+ return Audio::makeWAVStream(stream, DisposeAfterUse::YES);
+ else
+ return Audio::makeRawStream(stream, 22050, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
+}
+
+// Blatant rip from gob engine. Hi DrMcCoy!
+Common::String SoundManager::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;
+}
+} // End of namespace Hopkins
diff --git a/engines/hopkins/sound.h b/engines/hopkins/sound.h
new file mode 100644
index 0000000000..f1d047ae8b
--- /dev/null
+++ b/engines/hopkins/sound.h
@@ -0,0 +1,138 @@
+/* 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 HOPKINS_SOUND_H
+#define HOPKINS_SOUND_H
+
+#include "common/scummsys.h"
+#include "common/str.h"
+#include "audio/audiostream.h"
+#include "audio/decoders/wave.h"
+#include "audio/mixer.h"
+
+namespace Hopkins {
+
+class VoiceItem {
+public:
+ bool _status;
+ int _wavIndex;
+};
+
+class SwavItem {
+public:
+ bool _active;
+ Audio::RewindableAudioStream *_audioStream;
+ Audio::SoundHandle _soundHandle;
+ bool _freeSampleFl;
+};
+
+class MusicItem {
+public:
+ bool _active;
+};
+
+class SoundItem {
+public:
+ bool _active;
+};
+
+#define VOICE_COUNT 3
+#define SWAV_COUNT 50
+#define SOUND_COUNT 10
+
+class HopkinsEngine;
+
+class SoundManager {
+private:
+ HopkinsEngine *_vm;
+
+ Audio::SoundHandle _musicHandle;
+ int _currentSoundIndex;
+ bool _modPlayingFl;
+ int _oldSoundNumber;
+
+ VoiceItem _voice[VOICE_COUNT];
+ SwavItem _sWav[SWAV_COUNT];
+ SoundItem _sound[SOUND_COUNT];
+ MusicItem _music;
+
+ void playMod(const Common::String &file);
+ void loadMusic(const Common::String &file);
+ void playMusic();
+ void stopMusic();
+ void delMusic();
+ bool checkVoiceStatus(int voiceIndex);
+ bool loadVoice(const Common::String &filename, size_t fileOffset, size_t entryLength, SwavItem &item);
+ void stopVoice(int voiceIndex);
+ void playVoice();
+ void delWav(int wavIndex);
+ void checkVoiceActivity();
+ Common::String setExtension(const Common::String &str, const Common::String &ext);
+ Audio::RewindableAudioStream *makeSoundStream(Common::SeekableReadStream *stream);
+ bool removeWavSample(int wavIndex);
+ void loadWavSample(int wavIndex, const Common::String &filename, bool freeSample);
+ void playWavSample(int voiceIndex, int wavIndex);
+
+public:
+ bool _musicOffFl;
+ bool _soundOffFl;
+ bool _voiceOffFl;
+ bool _textOffFl;
+ bool _soundFl;
+ bool _skipRefreshFl;
+ int _musicVolume;
+ int _soundVolume;
+ int _voiceVolume;
+ int _specialSoundNum;
+public:
+ SoundManager(HopkinsEngine *vm);
+ ~SoundManager();
+
+ void loadAnimSound();
+ void playAnimSound(int soundNumber);
+
+ void loadSample(int wavIndex, const Common::String &file);
+ void playSample(int wavIndex, int voiceMode = 9);
+ void removeSample(int soundIndex);
+
+ void checkSoundEnd();
+ void checkSounds();
+ void playSoundFile(const Common::String &file);
+ void playSound(int soundNumber);
+ void stopSound();
+
+ void updateScummVMSoundSettings();
+ void syncSoundSettings();
+ bool mixVoice(int voiceId, int voiceMode, bool displTxtFl = false);
+
+ void setMODMusicVolume(int volume);
+ void setMODSampleVolume();
+ void setMODVoiceVolume();
+
+ void loadWav(const Common::String &file, int wavIndex);
+ void playWav(int wavIndex);
+ void directPlayWav(const Common::String &file2);
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_SOUND_H */
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp
new file mode 100644
index 0000000000..a16f6f5e4e
--- /dev/null
+++ b/engines/hopkins/talk.cpp
@@ -0,0 +1,1081 @@
+/* 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 "hopkins/talk.h"
+
+#include "hopkins/files.h"
+#include "hopkins/globals.h"
+#include "hopkins/graphics.h"
+#include "hopkins/hopkins.h"
+#include "hopkins/objects.h"
+
+#include "common/system.h"
+#include "common/endian.h"
+#include "common/file.h"
+#include "common/textconsole.h"
+
+namespace Hopkins {
+
+TalkManager::TalkManager(HopkinsEngine *vm) {
+ _vm = vm;
+ _characterBuffer = NULL;
+ _characterPalette = NULL;
+ _characterSprite = NULL;
+ _characterAnim = NULL;
+ _characterSize = 0;
+ _dialogueMesgId1 = _dialogueMesgId2 = _dialogueMesgId3 = _dialogueMesgId4 = 0;
+ _paletteBufferIdx = 0;
+}
+
+void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) {
+ Common::String spriteFilename;
+
+ _vm->_fontMan->hideText(5);
+ _vm->_fontMan->hideText(9);
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_graphicsMan->_scrollStatus = 1;
+ bool oldDisableInventFl = _vm->_globals->_disableInventFl;
+ _vm->_globals->_disableInventFl = true;
+ bool fileFoundFl = false;
+ _characterBuffer = _vm->_fileIO->searchCat(filename, RES_PER, fileFoundFl);
+ _characterSize = _vm->_fileIO->_catalogSize;
+ if (!fileFoundFl) {
+ _characterBuffer = _vm->_fileIO->loadFile(filename);
+ _characterSize = _vm->_fileIO->fileSize(filename);
+ }
+
+ _vm->_globals->_saveData->_data[svDialogField4] = 0;
+
+ getStringFromBuffer(40, spriteFilename, (const char *)_characterBuffer);
+ getStringFromBuffer(0, _questionsFilename, (const char *)_characterBuffer);
+ getStringFromBuffer(20, _answersFilename, (const char *)_characterBuffer);
+ if (_vm->_globals->_language == LANG_FR) {
+ _answersFilename = _questionsFilename = "RUE.TXT";
+ } else if (_vm->_globals->_language == LANG_EN) {
+ _answersFilename = _questionsFilename = "RUEAN.TXT";
+ } else if (_vm->_globals->_language == LANG_SP) {
+ _answersFilename = _questionsFilename = "RUEES.TXT";
+ }
+ _dialogueMesgId1 = READ_LE_INT16((uint16 *)_characterBuffer + 40);
+ _paletteBufferIdx = 20 * READ_LE_INT16((uint16 *)_characterBuffer + 42) + 110;
+ fileFoundFl = false;
+ _characterSprite = _vm->_fileIO->searchCat(spriteFilename, RES_SAN, fileFoundFl);
+ if (!fileFoundFl) {
+ _characterSprite = _vm->_objectsMan->loadSprite(spriteFilename);
+ } else {
+ _characterSprite = _vm->_objectsMan->loadSprite("RES_SAN.RES");
+ }
+
+ _vm->_graphicsMan->backupScreen();
+
+ if (!_vm->_graphicsMan->_lineNbr)
+ _vm->_graphicsMan->_scrollOffset = 0;
+ _vm->_graphicsMan->displayScreen(true);
+ _vm->_objectsMan->_charactersEnabledFl = true;
+ searchCharacterPalette(_paletteBufferIdx, false);
+ startCharacterAnim0(_paletteBufferIdx, false);
+ initCharacterAnim();
+ _dialogueMesgId2 = _dialogueMesgId1 + 1;
+ _dialogueMesgId3 = _dialogueMesgId1 + 2;
+ _dialogueMesgId4 = _dialogueMesgId1 + 3;
+ int oldMouseCursorId = _vm->_events->_mouseCursorId;
+ _vm->_events->_mouseCursorId = 4;
+ _vm->_events->changeMouseCursor(0);
+ if (!_vm->_globals->_introSpeechOffFl) {
+ int answer = 0;
+ int dlgAnswer;
+ do {
+ dlgAnswer = dialogQuestion(false);
+ if (dlgAnswer != _dialogueMesgId4)
+ answer = dialogAnswer(dlgAnswer, false);
+ if (answer == -1)
+ dlgAnswer = _dialogueMesgId4;
+ _vm->_events->refreshScreenAndEvents();
+ } while (dlgAnswer != _dialogueMesgId4);
+ }
+ if (_vm->_globals->_introSpeechOffFl) {
+ int idx = 1;
+ int answer;
+ do
+ answer = dialogAnswer(idx++, false);
+ while (answer != -1);
+ }
+ clearCharacterAnim();
+ _vm->_globals->_introSpeechOffFl = false;
+ _characterBuffer = _vm->_globals->freeMemory(_characterBuffer);
+ _characterSprite = _vm->_globals->freeMemory(_characterSprite);
+ _vm->_graphicsMan->displayScreen(false);
+
+ _vm->_graphicsMan->restoreScreen();
+
+ _vm->_objectsMan->_charactersEnabledFl = false;
+ _vm->_events->_mouseCursorId = oldMouseCursorId;
+
+ _vm->_events->changeMouseCursor(oldMouseCursorId);
+ _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100);
+
+ if (_vm->getIsDemo() == false)
+ _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0);
+
+ _vm->_graphicsMan->initColorTable(145, 150, _vm->_graphicsMan->_palette);
+ _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette);
+ _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_backBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ memcpy(_vm->_graphicsMan->_frontBuffer, _vm->_graphicsMan->_backBuffer, 614399);
+ _vm->_globals->_disableInventFl = oldDisableInventFl;
+ _vm->_graphicsMan->updateScreen();
+ for (int i = 0; i <= 4; i++)
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_graphicsMan->_scrollStatus = 0;
+}
+
+void TalkManager::startStaticCharacterDialogue(const Common::String &filename) {
+ // TODO: The original disables the mouse cursor here
+ bool oldDisableInventFl = _vm->_globals->_disableInventFl;
+ _vm->_globals->_disableInventFl = true;
+ bool fileFoundFl = false;
+ _characterBuffer = _vm->_fileIO->searchCat(filename, RES_PER, fileFoundFl);
+ _characterSize = _vm->_fileIO->_catalogSize;
+ if (!fileFoundFl) {
+ _characterBuffer = _vm->_fileIO->loadFile(filename);
+ _characterSize = _vm->_fileIO->fileSize(filename);
+ }
+
+ _vm->_globals->_saveData->_data[svDialogField4] = 0;
+
+ getStringFromBuffer(0, _questionsFilename, (const char *)_characterBuffer);
+ getStringFromBuffer(20, _answersFilename, (const char *)_characterBuffer);
+
+ switch (_vm->_globals->_language) {
+ case LANG_EN:
+ _questionsFilename = "RUEAN.TXT";
+ _answersFilename = "RUEAN.TXT";
+ break;
+ case LANG_FR:
+ _questionsFilename = "RUE.TXT";
+ _answersFilename = "RUE.TXT";
+ break;
+ case LANG_SP:
+ _questionsFilename = "RUEES.TXT";
+ _answersFilename = "RUEES.TXT";
+ break;
+ }
+
+ _dialogueMesgId1 = READ_LE_INT16((uint16 *)_characterBuffer + 40);
+ _paletteBufferIdx = 20 * READ_LE_INT16((uint16 *)_characterBuffer + 42) + 110;
+ searchCharacterPalette(_paletteBufferIdx, false);
+ _dialogueMesgId2 = _dialogueMesgId1 + 1;
+ _dialogueMesgId3 = _dialogueMesgId1 + 2;
+ _dialogueMesgId4 = _dialogueMesgId1 + 3;
+ int oldMouseCursorId = _vm->_events->_mouseCursorId;
+ _vm->_events->_mouseCursorId = 4;
+ _vm->_events->changeMouseCursor(0);
+
+ if (!_vm->_globals->_introSpeechOffFl) {
+ int answer;
+ do {
+ answer = dialogQuestion(true);
+ if (answer != _dialogueMesgId4) {
+ if (dialogAnswer(answer, true) == -1)
+ answer = _dialogueMesgId4;
+ }
+ } while (answer != _dialogueMesgId4);
+ }
+
+ if (_vm->_globals->_introSpeechOffFl) {
+ int idx = 1;
+ int answer;
+ do
+ answer = dialogAnswer(idx++, true);
+ while (answer != -1);
+ }
+
+ _characterBuffer = _vm->_globals->freeMemory(_characterBuffer);
+ _vm->_events->_mouseCursorId = oldMouseCursorId;
+
+ _vm->_events->changeMouseCursor(oldMouseCursorId);
+ _vm->_graphicsMan->initColorTable(145, 150, _vm->_graphicsMan->_palette);
+ _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette);
+ // TODO: The original re-enables the mouse cursor here
+ _vm->_globals->_disableInventFl = oldDisableInventFl;
+}
+
+void TalkManager::getStringFromBuffer(int srcStart, Common::String &dest, const char *srcData) {
+ dest = Common::String(srcData + srcStart);
+}
+
+int TalkManager::dialogQuestion(bool animatedFl) {
+ if (animatedFl) {
+ uint16 *bufPtr = (uint16 *)_characterBuffer + 48;
+ int curVal = READ_LE_INT16(bufPtr);
+ if (curVal != 0)
+ _vm->_objectsMan->setBobAnimation(curVal);
+ if (curVal != 1)
+ _vm->_objectsMan->setBobAnimation(READ_LE_INT16(bufPtr + 1));
+ if (curVal != 2)
+ _vm->_objectsMan->setBobAnimation(READ_LE_INT16(bufPtr + 2));
+ if (curVal != 3)
+ _vm->_objectsMan->setBobAnimation(READ_LE_INT16(bufPtr + 3));
+ if (curVal != 4)
+ _vm->_objectsMan->setBobAnimation(READ_LE_INT16(bufPtr + 4));
+ } else {
+ dialogWait();
+ }
+
+ int sentence1LineNumb = countBoxLines(_dialogueMesgId1, _questionsFilename);
+ int sentence2LineNumb = countBoxLines(_dialogueMesgId2, _questionsFilename);
+ int sentence3LineNumb = countBoxLines(_dialogueMesgId3, _questionsFilename);
+ int sentence4LineNumb = countBoxLines(_dialogueMesgId4, _questionsFilename);
+
+ int sentence4PosY = 420 - 20 * sentence4LineNumb;
+ int sentence3PosY = sentence4PosY - 20 * sentence3LineNumb;
+ int sentence2PosY = sentence3PosY - 20 * sentence2LineNumb;
+ int sentence1PosY = sentence2PosY - 20 * sentence1LineNumb;
+
+ _vm->_fontMan->initTextBuffers(5, _dialogueMesgId1, _questionsFilename, 5, sentence1PosY, 0, 65, 255);
+ _vm->_fontMan->initTextBuffers(6, _dialogueMesgId2, _questionsFilename, 5, sentence2PosY, 0, 65, 255);
+ _vm->_fontMan->initTextBuffers(7, _dialogueMesgId3, _questionsFilename, 5, sentence3PosY, 0, 65, 255);
+ _vm->_fontMan->initTextBuffers(8, _dialogueMesgId4, _questionsFilename, 5, sentence4PosY, 0, 65, 255);
+ _vm->_fontMan->showText(5);
+ _vm->_fontMan->showText(6);
+ _vm->_fontMan->showText(7);
+ _vm->_fontMan->showText(8);
+
+ int retVal = -1;
+ bool loopCond = false;
+ do {
+ int mousePosY = _vm->_events->getMouseY();
+ if (sentence1PosY < mousePosY && mousePosY < (sentence2PosY - 1)) {
+ _vm->_fontMan->setOptimalColor(6, 7, 8, 5);
+ retVal = _dialogueMesgId1;
+ }
+ if (sentence2PosY < mousePosY && mousePosY < (sentence3PosY - 1)) {
+ _vm->_fontMan->setOptimalColor(5, 7, 8, 6);
+ retVal = _dialogueMesgId2;
+ }
+ if (sentence3PosY < mousePosY && mousePosY < (sentence4PosY - 1)) {
+ _vm->_fontMan->setOptimalColor(5, 6, 8, 7);
+ retVal = _dialogueMesgId3;
+ }
+ if (sentence4PosY < mousePosY && mousePosY < 419) {
+ _vm->_fontMan->setOptimalColor(5, 6, 7, 8);
+ retVal = _dialogueMesgId4;
+ }
+
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_events->getMouseButton())
+ loopCond = true;
+ if (retVal == -1)
+ loopCond = false;
+ } while (!_vm->shouldQuit() && !loopCond);
+
+ _vm->_soundMan->mixVoice(retVal, 1);
+ _vm->_fontMan->hideText(5);
+ _vm->_fontMan->hideText(6);
+ _vm->_fontMan->hideText(7);
+ _vm->_fontMan->hideText(8);
+
+ if (animatedFl) {
+ uint16 *bufPtr = (uint16 *)_characterBuffer + 48;
+
+ int curVal = READ_LE_INT16(bufPtr);
+ if (curVal != 0)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+
+ curVal = READ_LE_INT16(bufPtr + 1);
+ if (curVal != 1)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+
+ curVal = READ_LE_INT16(bufPtr + 2);
+ if (curVal != 2)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+
+ curVal = READ_LE_INT16(bufPtr + 3);
+ if (curVal != 3)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+
+ curVal = READ_LE_INT16(bufPtr + 4);
+ if (curVal != 4)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+ } else {
+ dialogTalk();
+ }
+
+ _vm->_events->refreshScreenAndEvents();
+ return retVal;
+}
+
+int TalkManager::dialogAnswer(int idx, bool animatedFl) {
+ int charIdx;
+ byte *charBuf;
+ for (charBuf = _characterBuffer + 110, charIdx = 0; READ_LE_INT16(charBuf) != idx; charBuf += 20) {
+ ++charIdx;
+ if (READ_LE_INT16((uint16 *)_characterBuffer + 42) < charIdx)
+ return -1;
+ }
+
+ int mesgId = READ_LE_INT16((uint16 *)charBuf + 1);
+ int mesgPosX = READ_LE_INT16((uint16 *)charBuf + 2);
+ int mesgPosY = READ_LE_INT16((uint16 *)charBuf + 3);
+ int mesgLength = READ_LE_INT16((uint16 *)charBuf + 4);
+ _dialogueMesgId1 = READ_LE_INT16((uint16 *)charBuf + 5);
+ _dialogueMesgId2 = READ_LE_INT16((uint16 *)charBuf + 6);
+ _dialogueMesgId3 = READ_LE_INT16((uint16 *)charBuf + 7);
+ int frameNumb = READ_LE_INT16((uint16 *)charBuf + 8);
+
+ int curBufVal = READ_LE_INT16((uint16 *)charBuf + 9);
+ if (curBufVal)
+ _vm->_globals->_saveData->_data[svDialogField4] = curBufVal;
+
+ if (!frameNumb)
+ frameNumb = 10;
+ if (animatedFl) {
+ uint16 *bufPtr = (uint16 *)_characterBuffer + 43;
+ int curVal = READ_LE_INT16(bufPtr);
+ if (curVal)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+
+ curVal = READ_LE_INT16(bufPtr + 1);
+ if (curVal)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+
+ curVal = READ_LE_INT16(bufPtr + 2);
+ if (curVal)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+
+ curVal = READ_LE_INT16(bufPtr + 3);
+ if (curVal)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+
+ curVal = READ_LE_INT16(bufPtr + 4);
+ if (curVal)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+ } else {
+ dialogAnim();
+ }
+
+ bool displayedTxtFl = false;
+ if (!_vm->_soundMan->_textOffFl) {
+ _vm->_fontMan->initTextBuffers(9, mesgId, _answersFilename, mesgPosX, mesgPosY, 5, mesgLength, 252);
+ _vm->_fontMan->showText(9);
+ displayedTxtFl = true;
+ }
+ if (!_vm->_soundMan->mixVoice(mesgId, 1, displayedTxtFl)) {
+ _vm->_events->_curMouseButton = 0;
+ _vm->_events->_mouseButton = 0;
+
+ if (_vm->getIsDemo()) {
+ for (int i = 0; i < frameNumb; i++) {
+ _vm->_events->refreshScreenAndEvents();
+ }
+ } else {
+ for (int i = 0; i < frameNumb; i++) {
+ _vm->_events->refreshScreenAndEvents();
+ if (_vm->_events->_mouseButton || _vm->_events->_curMouseButton)
+ break;
+ if (_vm->_events->getMouseButton() && i + 1 > abs(frameNumb / 5))
+ break;
+ }
+ }
+ }
+
+ if (!_vm->_soundMan->_textOffFl)
+ _vm->_fontMan->hideText(9);
+ if (animatedFl) {
+ uint16 *bufPtr = (uint16 *)_characterBuffer + 43;
+ int curVal = READ_LE_INT16(bufPtr);
+ if (curVal)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+
+ curVal = READ_LE_INT16(bufPtr + 1);
+ if (curVal)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+
+ curVal = READ_LE_INT16(bufPtr + 2);
+ if (curVal)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+
+ curVal = READ_LE_INT16(bufPtr + 3);
+ if (curVal)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+
+ curVal = READ_LE_INT16(bufPtr + 4);
+ if (curVal)
+ _vm->_objectsMan->stopBobAnimation(curVal);
+ } else {
+ dialogEndTalk();
+ }
+ int result = 0;
+ if (!_dialogueMesgId1)
+ result = -1;
+
+ return result;
+}
+
+void TalkManager::searchCharacterPalette(int startIdx, bool dark) {
+ int palettePos = 0;
+ size_t curIdx = startIdx;
+ for (;;) {
+ if (READ_BE_UINT24(&_characterBuffer[curIdx]) == MKTAG24('P', 'A', 'L')) {
+ palettePos = curIdx;
+ break;
+ }
+ ++curIdx;
+ if (_characterSize == curIdx)
+ return;
+ }
+
+ _characterPalette = _characterBuffer + palettePos + 5;
+ _characterPalette[0] = 0;
+ _characterPalette[1] = 0;
+ _characterPalette[2] = 0;
+ _characterPalette[759] = 255;
+ _characterPalette[760] = 255;
+ _characterPalette[762] = 0;
+ _characterPalette[763] = 0;
+ _characterPalette[764] = 0;
+ _characterPalette[765] = 224;
+ _characterPalette[766] = 224;
+ _characterPalette[767] = 255;
+
+ if (!dark)
+ _characterPalette[761] = 86;
+ else
+ _characterPalette[761] = 255;
+
+ _vm->_graphicsMan->setPaletteVGA256(_characterPalette);
+ _vm->_graphicsMan->initColorTable(145, 150, _characterPalette);
+}
+
+void TalkManager::dialogWait() {
+ for (int idx = 26; idx <= 30; ++idx) {
+ if (_vm->_animMan->_animBqe[idx]._enabledFl)
+ displayBobDialogAnim(idx);
+ }
+}
+
+void TalkManager::dialogTalk() {
+ for (int idx = 26; idx <= 30; ++idx) {
+ if (_vm->_animMan->_animBqe[idx]._enabledFl)
+ _vm->_objectsMan->hideBob(idx);
+ }
+
+ for (int idx = 26; idx <= 30; ++idx) {
+ if (_vm->_animMan->_animBqe[idx]._enabledFl)
+ _vm->_objectsMan->resetBob(idx);
+ }
+}
+
+void TalkManager::dialogEndTalk() {
+ for (int idx = 21; idx <= 25; ++idx) {
+ if (_vm->_animMan->_animBqe[idx]._enabledFl)
+ _vm->_objectsMan->hideBob(idx);
+ }
+
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_events->refreshScreenAndEvents();
+
+ for (int idx = 21; idx <= 25; ++idx) {
+ if (_vm->_animMan->_animBqe[idx]._enabledFl)
+ _vm->_objectsMan->resetBob(idx);
+ }
+}
+
+int TalkManager::countBoxLines(int idx, const Common::String &file) {
+ _vm->_fontMan->_fontFixedWidth = 11;
+
+ // Build up the filename
+ Common::String filename;
+ Common::String dest;
+ filename = dest = file;
+ while (filename.lastChar() != '.')
+ filename.deleteLastChar();
+ filename += "IND";
+
+ Common::File f;
+ if (!f.open(filename))
+ error("Could not open file - %s", filename.c_str());
+ int filesize = f.size();
+ assert(filesize < 16188);
+
+ uint32 indexData[4047];
+ for (int i = 0; i < (filesize / 4); ++i)
+ indexData[i] = f.readUint32LE();
+ f.close();
+
+ if (!f.open(dest))
+ error("Error opening file - %s", dest.c_str());
+
+ f.seek(indexData[idx]);
+ byte *decryptBuf = _vm->_globals->allocMemory(2058);
+ assert(decryptBuf);
+
+ f.read(decryptBuf, 2048);
+ f.close();
+
+ // Decrypt buffer
+ byte *curDecryptPtr = decryptBuf;
+ for (int i = 0; i < 2048; i++) {
+ char curByte = *curDecryptPtr;
+ if ((byte)(curByte + 46) > 27) {
+ if ((byte)(curByte + 80) > 27) {
+ if ((curByte >= 'A' && curByte <= 'Z') || (curByte >= 'a' && curByte <= 'z'))
+ curByte = ' ';
+ } else {
+ curByte -= 79;
+ }
+ } else {
+ curByte += 111;
+ }
+ *curDecryptPtr = curByte;
+ curDecryptPtr++;
+ }
+
+ // Separate strings
+ for (int i = 0; i < 2048; i++) {
+ if ( decryptBuf[i] == 10 || decryptBuf[i] == 13)
+ decryptBuf[i] = 0;
+ }
+
+ // Check size of each strings in order to compute box width
+ int curBufIndx = 0;
+ int lineCount = 0;
+ int lineSize = 0;
+ char curChar;
+ do {
+ int curLineSize = 0;
+ for (;;) {
+ lineSize = curLineSize;
+ do {
+ curChar = decryptBuf[curBufIndx + curLineSize];
+ ++curLineSize;
+ } while (curChar != ' ' && curChar != '%');
+
+ if (curLineSize >= MIN_LETTERS_PER_LINE - 1) {
+ if (curChar == '%')
+ curChar = ' ';
+ break;
+ }
+
+ if (curChar == '%') {
+ lineSize = curLineSize;
+ break;
+ }
+ }
+ ++lineCount;
+ curBufIndx += lineSize;
+ } while (curChar != '%');
+ _vm->_globals->freeMemory(decryptBuf);
+ return lineCount;
+}
+
+void TalkManager::dialogAnim() {
+ for (int idx = 21; idx <= 25; ++idx) {
+ if (_vm->_animMan->_animBqe[idx]._enabledFl)
+ displayBobDialogAnim(idx);
+ }
+}
+
+void TalkManager::displayBobDialogAnim(int idx) {
+ _vm->_objectsMan->_priorityFl = true;
+ if (!_vm->_objectsMan->_bob[idx]._bobMode) {
+ _vm->_objectsMan->resetBob(idx);
+ byte *bqeData = _vm->_animMan->_animBqe[idx]._data;
+ int newMode = READ_LE_INT16(bqeData + 2);
+ if (!newMode)
+ newMode = 1;
+ if (READ_LE_INT16(bqeData + 24)) {
+ _vm->_objectsMan->_bob[idx]._isSpriteFl = true;
+ _vm->_objectsMan->_bob[idx]._zoomFactor = 0;
+ _vm->_objectsMan->_bob[idx]._flipFl = false;
+ _vm->_objectsMan->_bob[idx]._animData = _vm->_animMan->_animBqe[idx]._data;
+ _vm->_objectsMan->_bob[idx]._bobMode = 10;
+ bqeData = _characterSprite;
+ _vm->_objectsMan->_bob[idx]._spriteData = _characterSprite;
+ _vm->_objectsMan->_bob[idx]._bobModeChange = newMode;
+ _vm->_objectsMan->_bob[idx]._modeChangeCtr = -1;
+ _vm->_objectsMan->_bob[idx]._modeChangeUnused = 0;
+ }
+ }
+}
+
+void TalkManager::startCharacterAnim0(int startIdx, bool readOnlyFl) {
+ int animIdx = 0;
+ size_t curIdx = startIdx;
+ for (;;) {
+ if (READ_BE_UINT32(&_characterBuffer[curIdx]) == MKTAG('A', 'N', 'I', 'M') && _characterBuffer[curIdx + 4] == 1) {
+ animIdx = curIdx;
+ break;
+ }
+ ++curIdx;
+ if (_characterSize == curIdx)
+ return;
+ }
+ _characterAnim = _characterBuffer + animIdx + 25;
+ if (!readOnlyFl) {
+ int idx = 0;
+ do {
+ if (!READ_LE_INT16(&_characterAnim[2 * idx + 4]))
+ break;
+ if (_vm->_globals->_speed != 501)
+ _vm->_graphicsMan->fastDisplay(_characterSprite, _vm->_events->_startPos.x + READ_LE_INT16(&_characterAnim[2 * idx]),
+ READ_LE_INT16(&_characterAnim[2 * idx + 2]), _characterAnim[2 * idx + 8]);
+ idx += 5;
+ } while (_vm->_globals->_speed != 501);
+ }
+}
+
+/**
+ * Initialize character animation
+ */
+void TalkManager::initCharacterAnim() {
+ uint16 *bufPtr = (uint16 *)_characterBuffer + 43;
+ byte *animPtr = _characterBuffer + 110;
+ int curVal = READ_LE_INT16(bufPtr);
+ if (curVal)
+ searchCharacterAnim(21, animPtr, curVal, _characterSize);
+
+ curVal = READ_LE_INT16(bufPtr + 1);
+ if (curVal)
+ searchCharacterAnim(22, animPtr, curVal, _characterSize);
+
+ curVal = READ_LE_INT16(bufPtr + 2);
+ if (curVal)
+ searchCharacterAnim(23, animPtr, curVal, _characterSize);
+
+ curVal = READ_LE_INT16(bufPtr + 3);
+ if (curVal)
+ searchCharacterAnim(24, animPtr, curVal, _characterSize);
+
+ curVal = READ_LE_INT16(bufPtr + 4);
+ if (curVal)
+ searchCharacterAnim(25, animPtr, curVal, _characterSize);
+
+ curVal = READ_LE_INT16(bufPtr + 5);
+ if (curVal)
+ searchCharacterAnim(26, animPtr, curVal, _characterSize);
+
+ curVal = READ_LE_INT16(bufPtr + 6);
+ if (curVal)
+ searchCharacterAnim(27, animPtr, curVal, _characterSize);
+
+ curVal = READ_LE_INT16(bufPtr + 7);
+ if (curVal)
+ searchCharacterAnim(28, animPtr, curVal, _characterSize);
+
+ curVal = READ_LE_INT16(bufPtr + 8);
+ if (curVal)
+ searchCharacterAnim(29, animPtr, curVal, _characterSize);
+
+ curVal = READ_LE_INT16(bufPtr + 9);
+ if (curVal)
+ searchCharacterAnim(30, animPtr, curVal, _characterSize);
+}
+
+void TalkManager::clearCharacterAnim() {
+ for (int idx = 21; idx <= 34; ++idx) {
+ _vm->_animMan->_animBqe[idx]._data = _vm->_globals->freeMemory(_vm->_animMan->_animBqe[idx]._data);
+ _vm->_animMan->_animBqe[idx]._enabledFl = false;
+ }
+}
+
+bool TalkManager::searchCharacterAnim(int idx, const byte *bufPerso, int animId, int bufferSize) {
+ bool result = false;
+
+ for (int bufPos = 0; bufPos <= bufferSize; bufPos++) {
+ if (READ_BE_UINT32(bufPerso + bufPos) == MKTAG('A', 'N', 'I', 'M') && bufPerso[bufPos + 4] == animId) {
+ int bufIndx = bufPos + 5;
+ const byte *curPtr = bufPerso + bufIndx;
+ int animLength = 0;
+ bool loopCond = false;
+ do {
+ if (READ_BE_UINT32(curPtr) == MKTAG('A', 'N', 'I', 'M') || READ_BE_UINT24(curPtr) == MKTAG24('F', 'I', 'N'))
+ loopCond = true;
+ if (bufIndx > bufferSize) {
+ _vm->_animMan->_animBqe[idx]._enabledFl = false;
+ _vm->_animMan->_animBqe[idx]._data = NULL;
+ return false;
+ }
+ ++bufIndx;
+ ++animLength;
+ ++curPtr;
+ } while (!loopCond);
+ _vm->_animMan->_animBqe[idx]._data = _vm->_globals->allocMemory(animLength + 50);
+ _vm->_animMan->_animBqe[idx]._enabledFl = true;
+ memcpy(_vm->_animMan->_animBqe[idx]._data, (const byte *)(bufPerso + bufPos + 5), 20);
+ int bqeVal = READ_LE_INT16(bufPos + bufPerso + 29);
+ WRITE_LE_UINT16(_vm->_animMan->_animBqe[idx]._data + 20, READ_LE_INT16(bufPos + bufPerso + 25));
+ WRITE_LE_UINT16(_vm->_animMan->_animBqe[idx]._data + 22, READ_LE_INT16(bufPos + bufPerso + 27));
+ WRITE_LE_UINT16(_vm->_animMan->_animBqe[idx]._data + 24, bqeVal);
+ WRITE_LE_UINT16(_vm->_animMan->_animBqe[idx]._data + 26, READ_LE_INT16(bufPos + bufPerso + 31));
+ _vm->_animMan->_animBqe[idx]._data[28] = bufPerso[bufPos + 33];
+ _vm->_animMan->_animBqe[idx]._data[29] = bufPerso[bufPos + 34];
+ byte *bqeCurData = _vm->_animMan->_animBqe[idx]._data + 20;
+ const byte *curBufPerso = bufPos + bufPerso + 25;
+ for (int i = 1; i < 5000; i++) {
+ bqeCurData += 10;
+ curBufPerso += 10;
+ if (!bqeVal)
+ break;
+ bqeVal = READ_LE_INT16(curBufPerso + 4);
+ WRITE_LE_UINT16(bqeCurData, READ_LE_INT16(curBufPerso));
+ WRITE_LE_UINT16(bqeCurData + 2, READ_LE_INT16(curBufPerso + 2));
+ WRITE_LE_UINT16(bqeCurData + 4, bqeVal);
+ WRITE_LE_UINT16(bqeCurData + 6, READ_LE_INT16(curBufPerso + 6));
+ bqeCurData[8] = curBufPerso[8];
+ bqeCurData[9] = curBufPerso[9];
+ }
+ result = true;
+ }
+ if (READ_BE_UINT24(&bufPerso[bufPos]) == MKTAG24('F', 'I', 'N'))
+ result = true;
+
+ if (result)
+ break;
+ }
+
+ return result;
+}
+
+void TalkManager::handleAnswer(int zone, int verb) {
+ byte zoneObj = zone;
+ byte verbObj = verb;
+
+ bool outerLoopFl;
+ byte *ptr = NULL;
+ do {
+ outerLoopFl = false;
+ bool tagFound = false;
+ if (_vm->_globals->_answerBuffer == NULL)
+ return;
+
+ byte *curAnswerBuf = _vm->_globals->_answerBuffer;
+ for (;;) {
+ if (READ_BE_UINT24(curAnswerBuf) == MKTAG24('F', 'I', 'N'))
+ return;
+ if (READ_BE_UINT24(curAnswerBuf) == MKTAG24('C', 'O', 'D')) {
+ if (curAnswerBuf[3] == zoneObj && curAnswerBuf[4] == verbObj)
+ tagFound = true;
+ }
+ if (!tagFound)
+ curAnswerBuf++;
+ else
+ break;
+ }
+
+ // 'COD' tag found
+ curAnswerBuf += 5;
+ ptr = _vm->_globals->allocMemory(620);
+ assert(ptr);
+ memset(ptr, 0, 620);
+ uint16 curAnswerIdx = 0;
+ int idx = 0;
+ bool innerLoopCond = false;
+ do {
+ tagFound = false;
+ if (READ_BE_UINT16(&curAnswerBuf[curAnswerIdx]) == MKTAG16('F', 'C')) {
+ ++idx;
+ assert(idx < (620 / 20));
+
+ byte *answerBuf = (ptr + 20 * idx);
+ uint16 anwerIdx = 0;
+ do {
+ assert(anwerIdx < 20);
+ answerBuf[anwerIdx++] = curAnswerBuf[curAnswerIdx++];
+ if (READ_BE_UINT16(&curAnswerBuf[curAnswerIdx]) == MKTAG16('F', 'F')) {
+ tagFound = true;
+ answerBuf[anwerIdx] = 'F';
+ answerBuf[anwerIdx + 1] = 'F';
+ ++curAnswerIdx;
+ }
+ } while (!tagFound);
+ }
+ if (!tagFound) {
+ uint32 signature24 = READ_BE_UINT24(&curAnswerBuf[curAnswerIdx]);
+ if (signature24 == MKTAG24('C', 'O', 'D') || signature24 == MKTAG24('F', 'I', 'N'))
+ innerLoopCond = true;
+ }
+ curAnswerBuf += curAnswerIdx + 1;
+ curAnswerIdx = 0;
+ } while (!innerLoopCond);
+ innerLoopCond = false;
+ int lastOpcodeResult = 1;
+ do {
+ int opcodeType = _vm->_script->handleOpcode(ptr + 20 * lastOpcodeResult);
+ if (_vm->shouldQuit())
+ return;
+
+ if (opcodeType == 2)
+ // GOTO
+ lastOpcodeResult = _vm->_script->handleGoto(ptr + 20 * lastOpcodeResult);
+ else if (opcodeType == 3)
+ // IF
+ lastOpcodeResult = _vm->_script->handleIf(ptr, lastOpcodeResult);
+
+ if (lastOpcodeResult == -1)
+ error("Invalid IFF function");
+
+ if (opcodeType == 1 || opcodeType == 4)
+ // Already handled opcode or END IF
+ ++lastOpcodeResult;
+ else if (!opcodeType || opcodeType == 5)
+ // EXIT
+ innerLoopCond = true;
+ else if (opcodeType == 6) {
+ // JUMP
+ _vm->_globals->freeMemory(ptr);
+ zoneObj = _vm->_objectsMan->_jumpZone;
+ verbObj = _vm->_objectsMan->_jumpVerb;
+ outerLoopFl = true;
+ break;
+ }
+ } while (!innerLoopCond);
+ } while (outerLoopFl);
+ _vm->_globals->freeMemory(ptr);
+ _vm->_globals->_saveData->_data[svLastZoneNum] = 0;
+ return;
+}
+
+void TalkManager::handleForestAnswser(int zone, int verb) {
+ int indx = 0;
+ if (verb != 5 || _vm->_globals->_saveData->_data[svLastObjectIndex] != 4)
+ return;
+
+ if (zone == 22 || zone == 23) {
+ _vm->_objectsMan->setFlipSprite(0, false);
+ _vm->_objectsMan->setSpriteIndex(0, 62);
+ _vm->_objectsMan->showSpecialActionAnimationWithFlip(_vm->_objectsMan->_forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, false);
+ if (zone == 22) {
+ _vm->_objectsMan->lockAnimX(6, _vm->_objectsMan->getBobPosX(3));
+ _vm->_objectsMan->lockAnimX(8, _vm->_objectsMan->getBobPosX(3));
+ } else { // zone == 23
+ _vm->_objectsMan->lockAnimX(6, _vm->_objectsMan->getBobPosX(4));
+ _vm->_objectsMan->lockAnimX(8, _vm->_objectsMan->getBobPosX(4));
+ }
+ _vm->_objectsMan->stopBobAnimation(3);
+ _vm->_objectsMan->stopBobAnimation(4);
+ _vm->_objectsMan->setBobAnimation(6);
+ _vm->_soundMan->playSample(1);
+ _vm->_objectsMan->showSpecialActionAnimation(_vm->_objectsMan->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4);
+ do
+ _vm->_events->refreshScreenAndEvents();
+ while (_vm->_objectsMan->getBobAnimDataIdx(6) < 12);
+ _vm->_objectsMan->stopBobAnimation(6);
+ _vm->_objectsMan->setBobAnimation(8);
+
+ switch (_vm->_globals->_screenId) {
+ case 35:
+ indx = 201;
+ break;
+ case 36:
+ indx = 203;
+ break;
+ case 37:
+ indx = 205;
+ break;
+ case 38:
+ indx = 207;
+ break;
+ case 39:
+ indx = 209;
+ break;
+ case 40:
+ indx = 211;
+ break;
+ case 41:
+ indx = 213;
+ break;
+ }
+ _vm->_globals->_saveData->_data[indx] = 2;
+ _vm->_linesMan->disableZone(22);
+ _vm->_linesMan->disableZone(23);
+ } else if (zone == 20 || zone == 21) {
+ _vm->_objectsMan->setFlipSprite(0, true);
+ _vm->_objectsMan->setSpriteIndex(0, 62);
+ _vm->_objectsMan->showSpecialActionAnimationWithFlip(_vm->_objectsMan->_forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, true);
+ if (zone == 20) {
+ _vm->_objectsMan->lockAnimX(5, _vm->_objectsMan->getBobPosX(1));
+ _vm->_objectsMan->lockAnimX(7, _vm->_objectsMan->getBobPosX(1));
+ } else { // zone == 21
+ _vm->_objectsMan->lockAnimX(5, _vm->_objectsMan->getBobPosX(2));
+ _vm->_objectsMan->lockAnimX(7, _vm->_objectsMan->getBobPosX(2));
+ }
+ _vm->_objectsMan->stopBobAnimation(1);
+ _vm->_objectsMan->stopBobAnimation(2);
+ _vm->_objectsMan->setBobAnimation(5);
+ _vm->_soundMan->playSample(1);
+ _vm->_objectsMan->showSpecialActionAnimation(_vm->_objectsMan->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4);
+ do
+ _vm->_events->refreshScreenAndEvents();
+ while (_vm->_objectsMan->getBobAnimDataIdx(5) < 12);
+ _vm->_objectsMan->stopBobAnimation(5);
+ _vm->_objectsMan->setBobAnimation(7);
+ switch (_vm->_globals->_screenId) {
+ case 35:
+ indx = 200;
+ break;
+ case 36:
+ indx = 202;
+ break;
+ case 37:
+ indx = 204;
+ break;
+ case 38:
+ indx = 206;
+ break;
+ case 39:
+ indx = 208;
+ break;
+ case 40:
+ indx = 210;
+ break;
+ case 41:
+ indx = 212;
+ break;
+ }
+ _vm->_globals->_saveData->_data[indx] = 2;
+ _vm->_linesMan->disableZone(21);
+ _vm->_linesMan->disableZone(20);
+ }
+}
+
+void TalkManager::animateObject(const Common::String &filename) {
+ _vm->_fontMan->hideText(5);
+ _vm->_fontMan->hideText(9);
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_graphicsMan->_scrollStatus = 1;
+ _vm->_linesMan->clearAllZones();
+ _vm->_linesMan->resetLines();
+ _vm->_objectsMan->resetHidingItems();
+
+ for (int i = 0; i <= 44; i++)
+ _vm->_linesMan->_bobZone[i] = 0;
+
+ _vm->_objectsMan->_zoneNum = -1;
+ _vm->_events->_mouseCursorId = 4;
+ _vm->_events->changeMouseCursor(0);
+ bool fileFoundFl = false;
+ _characterBuffer = _vm->_fileIO->searchCat(filename, RES_PER, fileFoundFl);
+ _characterSize = _vm->_fileIO->_catalogSize;
+ if (!fileFoundFl) {
+ _characterBuffer = _vm->_fileIO->loadFile(filename);
+ _characterSize = _vm->_fileIO->fileSize(filename);
+ }
+ Common::String screenFilename;
+ Common::String spriteFilename;
+ Common::String curScreenFilename;
+ getStringFromBuffer(40, spriteFilename, (const char *)_characterBuffer);
+ getStringFromBuffer(0, screenFilename, (const char *)_characterBuffer);
+ getStringFromBuffer(20, curScreenFilename, (const char *)_characterBuffer);
+
+ if (curScreenFilename == "NULL")
+ curScreenFilename = Common::String::format("IM%d", _vm->_globals->_screenId);
+
+ fileFoundFl = false;
+ _characterSprite = _vm->_fileIO->searchCat(spriteFilename, RES_SAN, fileFoundFl);
+ if (!fileFoundFl)
+ _characterSprite = _vm->_objectsMan->loadSprite(spriteFilename);
+ else
+ _characterSprite = _vm->_objectsMan->loadSprite("RES_SAN.RES");
+
+ _vm->_graphicsMan->backupScreen();
+
+ if (!_vm->_graphicsMan->_lineNbr)
+ _vm->_graphicsMan->_scrollOffset = 0;
+ _vm->_graphicsMan->displayScreen(true);
+ _paletteBufferIdx = 20 * READ_LE_INT16((uint16 *)_characterBuffer + 42) + 110;
+ _vm->_graphicsMan->displayScreen(true);
+ _vm->_objectsMan->_charactersEnabledFl = true;
+ searchCharacterPalette(_paletteBufferIdx, true);
+ startCharacterAnim0(_paletteBufferIdx, false);
+ byte *oldAnswerBufferPtr = _vm->_globals->_answerBuffer;
+ _vm->_globals->_answerBuffer = NULL;
+ _vm->_globals->_freezeCharacterFl = true;
+ _vm->_objectsMan->loadLinkFile(screenFilename);
+ _vm->_objectsMan->_charactersEnabledFl = true;
+ _vm->_globals->_actionMoveTo = false;
+ _vm->_objectsMan->_zoneNum = -1;
+ initCharacterAnim();
+ dialogAnim();
+ dialogWait();
+ _vm->_graphicsMan->initScreen(screenFilename, 2, true);
+ _vm->_globals->_freezeCharacterFl = true;
+ _vm->_objectsMan->_forceZoneFl = true;
+ _vm->_objectsMan->_zoneNum = -1;
+ do {
+ int mouseButton = _vm->_events->getMouseButton();
+ if (mouseButton == 1)
+ _vm->_objectsMan->handleLeftButton();
+ else if (mouseButton == 2)
+ _vm->_objectsMan->handleRightButton();
+
+ _vm->_linesMan->checkZone();
+ if (_vm->_globals->_actionMoveTo)
+ _vm->_objectsMan->PARADISE();
+ _vm->_events->refreshScreenAndEvents();
+ } while (!_vm->_globals->_exitId);
+ dialogEndTalk();
+ dialogTalk();
+ clearCharacterAnim();
+ clearCharacterAnim();
+ _vm->_globals->_introSpeechOffFl = false;
+ _characterBuffer = _vm->_globals->freeMemory(_characterBuffer);
+ _characterSprite = _vm->_globals->freeMemory(_characterSprite);
+ _vm->_graphicsMan->displayScreen(false);
+ _vm->_linesMan->clearAllZones();
+ _vm->_linesMan->resetLines();
+ _vm->_objectsMan->resetHidingItems();
+ for (int i = 0; i <= 44; i++)
+ _vm->_linesMan->_bobZone[i] = 0;
+
+ _vm->_globals->freeMemory(_vm->_globals->_answerBuffer);
+ _vm->_globals->_answerBuffer = oldAnswerBufferPtr;
+ _vm->_objectsMan->_disableFl = true;
+ _vm->_objectsMan->loadLinkFile(curScreenFilename);
+ _vm->_graphicsMan->initScreen(curScreenFilename, 2, true);
+ _vm->_objectsMan->_disableFl = false;
+ _vm->_globals->_freezeCharacterFl = false;
+ if (_vm->_globals->_exitId == 101)
+ _vm->_globals->_exitId = 0;
+
+ _vm->_graphicsMan->restoreScreen();
+
+ _vm->_objectsMan->_charactersEnabledFl = false;
+ _vm->_events->_mouseCursorId = 4;
+ _vm->_events->changeMouseCursor(4);
+ _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100);
+
+ if (!_vm->getIsDemo())
+ _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0);
+
+ _vm->_graphicsMan->initColorTable(145, 150, _vm->_graphicsMan->_palette);
+ _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette);
+ _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_backBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette);
+ memcpy(_vm->_graphicsMan->_frontBuffer, _vm->_graphicsMan->_backBuffer, 614399);
+ _vm->_globals->_disableInventFl = false;
+ _vm->_graphicsMan->updateScreen();
+ for (int i = 0; i <= 4; i++)
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_graphicsMan->_scrollStatus = 0;
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/talk.h b/engines/hopkins/talk.h
new file mode 100644
index 0000000000..678f52090a
--- /dev/null
+++ b/engines/hopkins/talk.h
@@ -0,0 +1,78 @@
+/* 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 HOPKINS_TALK_H
+#define HOPKINS_TALK_H
+
+#include "common/scummsys.h"
+#include "common/str.h"
+
+namespace Hopkins {
+
+class HopkinsEngine;
+
+#define MIN_LETTERS_PER_LINE 65
+
+class TalkManager {
+private:
+ HopkinsEngine *_vm;
+
+ Common::String _questionsFilename;
+ Common::String _answersFilename;
+ byte *_characterBuffer;
+ byte *_characterPalette;
+ size_t _characterSize;
+ int _dialogueMesgId1, _dialogueMesgId2;
+ int _dialogueMesgId3, _dialogueMesgId4;
+ int _paletteBufferIdx;
+
+ void getStringFromBuffer(int srcStart, Common::String &dest, const char *srcData);
+ int dialogQuestion(bool animatedFl);
+ int dialogAnswer(int idx, bool animatedFl);
+ void searchCharacterPalette(int startIdx, bool dark);
+ void dialogWait();
+ void dialogTalk();
+ void dialogEndTalk();
+ void startCharacterAnim0(int startIndedx, bool readOnlyFl);
+ void initCharacterAnim();
+ void clearCharacterAnim();
+ bool searchCharacterAnim(int idx, const byte *bufPerso, int animId, int bufferSize);
+ int countBoxLines(int idx, const Common::String &file);
+ void dialogAnim();
+ void displayBobDialogAnim(int idx);
+
+public:
+ byte *_characterAnim;
+ byte *_characterSprite;
+
+ TalkManager(HopkinsEngine *vm);
+
+ void startStaticCharacterDialogue(const Common::String &filename);
+ void startAnimatedCharacterDialogue(const Common::String &filename);
+ void animateObject(const Common::String &filename);
+ void handleAnswer(int zone, int verb);
+ void handleForestAnswser(int zone, int verb);
+};
+
+} // End of namespace Hopkins
+
+#endif /* HOPKINS_TALK_H */
diff --git a/engines/kyra/chargen.cpp b/engines/kyra/chargen.cpp
index 7ea2feb361..80a95da047 100644
--- a/engines/kyra/chargen.cpp
+++ b/engines/kyra/chargen.cpp
@@ -193,7 +193,7 @@ bool CharacterGenerator::start(EoBCharacter *characters, uint8 ***faceShapes) {
}
if (inputFlag & 0x8000) {
- inputFlag = (inputFlag & 0x0f) - 1;
+ inputFlag = (inputFlag & 0x0F) - 1;
if (inputFlag == 4) {
loop = false;
} else {
@@ -402,7 +402,7 @@ int CharacterGenerator::viewDeleteCharacter() {
}
if (inputFlag & 0x8000) {
- inputFlag = (inputFlag & 0x0f) - 1;
+ inputFlag = (inputFlag & 0x0F) - 1;
if (inputFlag == 4) {
res = 1;
loop = false;
@@ -524,7 +524,7 @@ int CharacterGenerator::classMenu(int raceSex) {
while (res == -1 && !_vm->shouldQuit()) {
updateMagicShapes();
- int in = getInput(0) & 0xff;
+ int in = getInput(0) & 0xFF;
Common::Point mp = _vm->getMousePos();
if (in == _vm->_keyMap[Common::KEYCODE_ESCAPE] || _vm->_gui->_menuLastInFlags == _vm->_keyMap[Common::KEYCODE_ESCAPE] || _vm->_gui->_menuLastInFlags == _vm->_keyMap[Common::KEYCODE_b]) {
@@ -572,7 +572,7 @@ int CharacterGenerator::alignmentMenu(int cClass) {
while (res == -1 && !_vm->shouldQuit()) {
updateMagicShapes();
- int in = getInput(0) & 0xff;
+ int in = getInput(0) & 0xFF;
Common::Point mp = _vm->getMousePos();
if (in == _vm->_keyMap[Common::KEYCODE_ESCAPE] || _vm->_gui->_menuLastInFlags == _vm->_keyMap[Common::KEYCODE_ESCAPE] || _vm->_gui->_menuLastInFlags == _vm->_keyMap[Common::KEYCODE_b]) {
@@ -658,14 +658,14 @@ void CharacterGenerator::generateStats(int index) {
sv[i] = _chargenMaxStats[i];
}
- c->strengthCur = c->strengthMax = sv[0] & 0xff;
+ c->strengthCur = c->strengthMax = sv[0] & 0xFF;
c->strengthExtCur = c->strengthExtMax = sv[0] >> 8;
- c->intelligenceCur = c->intelligenceMax = sv[1] & 0xff;
- c->wisdomCur = c->wisdomMax = sv[2] & 0xff;
- c->dexterityCur = c->dexterityMax = sv[3] & 0xff;
- c->constitutionCur = c->constitutionMax = sv[4] & 0xff;
- c->charismaCur = c->charismaMax = sv[5] & 0xff;
- c->armorClass = 10 + _vm->getDexterityArmorClassModifier(sv[3] & 0xff);
+ c->intelligenceCur = c->intelligenceMax = sv[1] & 0xFF;
+ c->wisdomCur = c->wisdomMax = sv[2] & 0xFF;
+ c->dexterityCur = c->dexterityMax = sv[3] & 0xFF;
+ c->constitutionCur = c->constitutionMax = sv[4] & 0xFF;
+ c->charismaCur = c->charismaMax = sv[5] & 0xFF;
+ c->armorClass = 10 + _vm->getDexterityArmorClassModifier(sv[3] & 0xFF);
c->hitPointsCur = 0;
for (int l = 0; l < 3; l++) {
@@ -817,7 +817,7 @@ void CharacterGenerator::faceSelectMenu() {
} else if (in == _vm->_keyMap[Common::KEYCODE_RETURN] || in == _vm->_keyMap[Common::KEYCODE_KP5]) {
in = 3;
} else if (in & 0x8000) {
- in &= 0xff;
+ in &= 0xFF;
} else {
in = 0;
}
@@ -1017,7 +1017,7 @@ int CharacterGenerator::modifyStat(int index, int8 *stat1, int8 *stat2) {
ci = -2;
} else if (inputFlag & 0x8000) {
- inputFlag = (inputFlag & 0x0f) - 1;
+ inputFlag = (inputFlag & 0x0F) - 1;
if (index != inputFlag) {
ci = inputFlag;
loop = false;
@@ -1037,7 +1037,7 @@ int CharacterGenerator::modifyStat(int index, int8 *stat1, int8 *stat2) {
v2--;
}
- v1 = CLIP<uint8>(v1, _chargenMinStats[index], _chargenMaxStats[index] & 0xff);
+ v1 = CLIP<uint8>(v1, _chargenMinStats[index], _chargenMaxStats[index] & 0xFF);
v2 = (v1 == 18 && _chargenMaxStats[index] >= 19) ? CLIP<uint8>(v2, 0, 100) : 0;
if (s2)
*s2 = v2;
@@ -1614,7 +1614,7 @@ int TransferPartyWiz::selectCharactersMenu() {
bool update = false;
for (bool loop = true; loop && (!_vm->shouldQuit());) {
- int inputFlag = _vm->checkInput(0, false, 0) & 0x8ff;
+ int inputFlag = _vm->checkInput(0, false, 0) & 0x8FF;
_vm->removeInputTop();
if (inputFlag) {
@@ -1827,7 +1827,7 @@ Item TransferPartyWiz::convertItem(Item eob1Item) {
itm2->flags = itm1->flags | 0x40;
itm2->icon = itm1->icon;
itm2->type = itm1->type;
- itm2->level = 0xff;
+ itm2->level = 0xFF;
switch (itm2->type) {
case 35:
@@ -1850,7 +1850,7 @@ Item TransferPartyWiz::convertItem(Item eob1Item) {
return 0;
}
itm2->value = itm1->value;
- itm2->flags = ((itm1->flags & 0x3f) + 3) | 0x40;
+ itm2->flags = ((itm1->flags & 0x3F) + 3) | 0x40;
break;
case 18:
itm2->icon = 19;
@@ -1860,7 +1860,7 @@ Item TransferPartyWiz::convertItem(Item eob1Item) {
break;
}
- switch ((_vm->_itemTypes[itm2->type].extraProperties & 0x7f) - 1) {
+ switch ((_vm->_itemTypes[itm2->type].extraProperties & 0x7F) - 1) {
case 0:
case 1:
case 2:
diff --git a/engines/kyra/darkmoon.cpp b/engines/kyra/darkmoon.cpp
index 054b2b285e..130fb10df3 100644
--- a/engines/kyra/darkmoon.cpp
+++ b/engines/kyra/darkmoon.cpp
@@ -136,7 +136,7 @@ void DarkMoonEngine::updateUsedCharacterHandItem(int charIndex, int slot) {
if (itm->type == 48 || itm->type == 62) {
if (itm->value == 5)
return;
- int charges = itm->flags & 0x3f;
+ int charges = itm->flags & 0x3F;
if (--charges)
--itm->flags;
else
@@ -450,7 +450,7 @@ void DarkMoonEngine::characterLevelGain(int charIndex) {
int s = _numLevelsPerClass[c->cClass];
for (int i = 0; i < s; i++) {
uint32 er = getRequiredExperience(c->cClass, i, c->level[i] + 1);
- if (er == 0xffffffff)
+ if (er == 0xFFFFFFFF)
continue;
increaseCharacterExperience(charIndex, er - c->experience[i] + 1);
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index 5b9d665a0e..5c2b8fe1e8 100644
--- a/engines/kyra/detection_tables.h
+++ b/engines/kyra/detection_tables.h
@@ -53,7 +53,8 @@ namespace {
#define LOL_FLOPPY_FLAGS FLAGS(false, false, false, false, false, false, false, false, Kyra::GI_LOL)
#define LOL_FLOPPY_FAN_FLAGS(x, y) FLAGS_FAN(x, y, false, false, false, false, false, false, false, false, Kyra::GI_LOL)
#define LOL_FLOPPY_CMP_FLAGS FLAGS(false, false, false, false, false, false, false, true, Kyra::GI_LOL)
-#define LOL_PC98_SJIS_FLAGS FLAGS(false, false, false, false, true, true, false, false, Kyra::GI_LOL)
+#define LOL_PC9801_FLAGS FLAGS(false, false, false, false, true, true, false, false, Kyra::GI_LOL)
+#define LOL_FMTOWNS_FLAGS FLAGS(false, false, false, false, true, false, false, false, Kyra::GI_LOL)
#define LOL_DEMO_FLAGS FLAGS(true, true, false, false, false, false, false, false, Kyra::GI_LOL)
#define LOL_KYRA2_DEMO_FLAGS FLAGS(true, false, false, false, false, false, false, false, Kyra::GI_KYRA2)
@@ -1413,6 +1414,23 @@ const KYRAGameDescription adGameDescs[] = {
LOL_FLOPPY_FLAGS
},
+ { // French floppy version 1.20, bug #3608967 "Lands of Lore - french version 1.20 MD5"
+ {
+ "lol",
+ "Extracted",
+ {
+ {"GENERAL.PAK", 0, "a9e22c450c4f1de6a600261183430394", -1 },
+ {"CHAPTER7.PAK", 0, "fb5294f7445318876741c8db39ba0b1a", -1 },
+ { 0, 0, 0, 0 }
+ },
+ Common::FR_FRA,
+ Common::kPlatformPC,
+ ADGF_NO_FLAGS,
+ GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
+ },
+ LOL_FLOPPY_FLAGS
+ },
+
{ // French floppy version 1.23, bug #3552534 "KYRA: LOL Floppy FR version unknown"
{
"lol",
@@ -1462,7 +1480,24 @@ const KYRAGameDescription adGameDescs[] = {
ADGF_NO_FLAGS,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIPC98, GUIO_RENDERPC9801, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
- LOL_PC98_SJIS_FLAGS
+ LOL_PC9801_FLAGS
+ },
+
+ {
+ {
+ "lol",
+ 0,
+ {
+ { "GENERAL.PAK", 0, "2e4d4ce54bac9162e11fcba6907b576e", -1 },
+ { "TMUS.PAK", 0, "5543dae575164e51856f5a49cfd6b368", -1 },
+ { 0, 0, 0, 0 }
+ },
+ Common::JA_JPN,
+ Common::kPlatformFMTowns,
+ ADGF_NO_FLAGS,
+ GUIO5(GUIO_NOSPEECH, GUIO_MIDITOWNS, GUIO_RENDERFMTOWNS, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
+ },
+ LOL_FMTOWNS_FLAGS
},
{
diff --git a/engines/kyra/eob.cpp b/engines/kyra/eob.cpp
index a7bde9f1ee..4e1707b1ac 100644
--- a/engines/kyra/eob.cpp
+++ b/engines/kyra/eob.cpp
@@ -316,7 +316,7 @@ void EoBEngine::runNpcDialogue(int npcIndex) {
void EoBEngine::updateUsedCharacterHandItem(int charIndex, int slot) {
EoBItem *itm = &_items[_characters[charIndex].inventory[slot]];
if (itm->type == 48) {
- int charges = itm->flags & 0x3f;
+ int charges = itm->flags & 0x3F;
if (--charges)
--itm->flags;
else
@@ -359,7 +359,7 @@ void EoBEngine::loadDoorShapes(int doorType1, int shapeId1, int doorType2, int s
_screen->loadShapeSetBitmap("DOOR", 5, 3);
_screen->_curPage = 2;
- if (doorType1 != 0xff) {
+ if (doorType1 != 0xFF) {
for (int i = 0; i < 3; i++) {
const uint8 *enc = &_doorShapeEncodeDefs[(doorType1 * 3 + i) << 2];
_doorShapes[shapeId1 + i] = _screen->encodeShape(enc[0], enc[1], enc[2], enc[3], false, (_flags.gameID == GI_EOB1) ? _cgaMappingLevel[_cgaLevelMappingIndex[_currentLevel - 1]] : 0);
@@ -370,7 +370,7 @@ void EoBEngine::loadDoorShapes(int doorType1, int shapeId1, int doorType2, int s
}
}
- if (doorType2 != 0xff) {
+ if (doorType2 != 0xFF) {
for (int i = 0; i < 3; i++) {
const uint8 *enc = &_doorShapeEncodeDefs[(doorType2 * 3 + i) << 2];
_doorShapes[shapeId2 + i] = _screen->encodeShape(enc[0], enc[1], enc[2], enc[3], false, (_flags.gameID == GI_EOB1) ? _cgaMappingLevel[_cgaLevelMappingIndex[_currentLevel - 1]] : 0);
@@ -460,7 +460,7 @@ void EoBEngine::turnUndeadAuto() {
int oc = _openBookChar;
for (int i = 0; i < 6; i++) {
- if (!testCharacter(i, 0x0d))
+ if (!testCharacter(i, 0x0D))
continue;
EoBCharacter *c = &_characters[i];
@@ -505,7 +505,7 @@ bool EoBEngine::checkPartyStatusExtra() {
_txt->printMessage(_menuStringsDefeat[0]);
while (!shouldQuit()) {
removeInputTop();
- if (checkInput(0, false, 0) & 0xff)
+ if (checkInput(0, false, 0) & 0xFF)
break;
}
_screen->copyPage(10, 0);
diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp
index 6c899b8c8e..d477209e5b 100644
--- a/engines/kyra/eobcommon.cpp
+++ b/engines/kyra/eobcommon.cpp
@@ -364,7 +364,7 @@ void EoBCoreEngine::initKeymap() {
}
Common::Error EoBCoreEngine::init() {
- // In EOB the timer proc is directly invoked via interrupt 0x1c, 18.2 times per second.
+ // In EOB the timer proc is directly invoked via interrupt 0x1C, 18.2 times per second.
// This makes a tick length of 54.94.
_tickLength = 55;
@@ -488,8 +488,8 @@ Common::Error EoBCoreEngine::init() {
_monsterFlashOverlay = new uint8[16];
_monsterStoneOverlay = new uint8[16];
- memset(_monsterFlashOverlay, (_configRenderMode == Common::kRenderCGA) ? 0xff : 0x0f, 16 * sizeof(uint8));
- memset(_monsterStoneOverlay, 0x0d, 16 * sizeof(uint8));
+ memset(_monsterFlashOverlay, (_configRenderMode == Common::kRenderCGA) ? 0xFF : 0x0F, 16 * sizeof(uint8));
+ memset(_monsterStoneOverlay, 0x0D, 16 * sizeof(uint8));
_monsterFlashOverlay[0] = _monsterStoneOverlay[0] = 0;
// Prevent autosave on game startup
@@ -985,7 +985,7 @@ void EoBCoreEngine::recalcArmorClass(int index) {
int tp = _items[itm].type;
- if (!(_itemTypes[tp].allowedClasses & _classModifierFlags[c->cClass]) || (_itemTypes[tp].extraProperties & 0x7f) || (i >= 1 && i <= 2 && tp != 27 && !(_flags.gameID == GI_EOB2 && tp == 57)))
+ if (!(_itemTypes[tp].allowedClasses & _classModifierFlags[c->cClass]) || (_itemTypes[tp].extraProperties & 0x7F) || (i >= 1 && i <= 2 && tp != 27 && !(_flags.gameID == GI_EOB2 && tp == 57)))
continue;
c->armorClass += _itemTypes[tp].armorClass;
@@ -997,12 +997,12 @@ void EoBCoreEngine::recalcArmorClass(int index) {
int8 m2 = 0;
if (c->inventory[25]) {
- if (!(_itemTypes[_items[c->inventory[25]].type].extraProperties & 0x7f))
+ if (!(_itemTypes[_items[c->inventory[25]].type].extraProperties & 0x7F))
m1 = _items[c->inventory[25]].value;
}
if (c->inventory[26]) {
- if (!(_itemTypes[_items[c->inventory[26]].type].extraProperties & 0x7f))
+ if (!(_itemTypes[_items[c->inventory[26]].type].extraProperties & 0x7F))
m2 = _items[c->inventory[26]].value;
}
@@ -1054,7 +1054,7 @@ int EoBCoreEngine::validateWeaponSlotItem(int index, int slot) {
if (!itm2)
return 1;
- int f = (_itemTypes[tp2].extraProperties & 0x7f);
+ int f = (_itemTypes[tp2].extraProperties & 0x7F);
if (f <= 0 || f > 3)
return r;
@@ -1269,12 +1269,12 @@ void EoBCoreEngine::removeCharacterFromParty(int charIndex) {
if (i == 16 || !c->inventory[i])
continue;
- setItemPosition((Item *)&_levelBlockProperties[_currentBlock & 0x3ff].drawObjects, _currentBlock, c->inventory[i], _dropItemDirIndex[(_currentDirection << 2) + rollDice(1, 2, -1)]);
+ setItemPosition((Item *)&_levelBlockProperties[_currentBlock & 0x3FF].drawObjects, _currentBlock, c->inventory[i], _dropItemDirIndex[(_currentDirection << 2) + rollDice(1, 2, -1)]);
c->inventory[i] = 0;
}
while (c->inventory[16])
- setItemPosition((Item *)&_levelBlockProperties[_currentBlock & 0x3ff].drawObjects, _currentBlock, getQueuedItem(&c->inventory[16], 0, -1), _dropItemDirIndex[(_currentDirection << 2) + rollDice(1, 2, -1)]);
+ setItemPosition((Item *)&_levelBlockProperties[_currentBlock & 0x3FF].drawObjects, _currentBlock, getQueuedItem(&c->inventory[16], 0, -1), _dropItemDirIndex[(_currentDirection << 2) + rollDice(1, 2, -1)]);
c->inventory[16] = 0;
@@ -1320,7 +1320,7 @@ void EoBCoreEngine::increaseCharacterExperience(int charIndex, int32 points) {
_characters[charIndex].experience[i] += points;
uint32 er = getRequiredExperience(cl, i, _characters[charIndex].level[i] + 1);
- if (er == 0xffffffff)
+ if (er == 0xFFFFFFFF)
continue;
if (_characters[charIndex].experience[i] >= er)
@@ -1331,7 +1331,7 @@ void EoBCoreEngine::increaseCharacterExperience(int charIndex, int32 points) {
uint32 EoBCoreEngine::getRequiredExperience(int cClass, int levelIndex, int level) {
cClass = getCharacterClassType(cClass, levelIndex);
if (cClass == -1)
- return 0xffffffff;
+ return 0xFFFFFFFF;
const uint32 *tbl = _expRequirementTables[cClass];
return tbl[level - 1];
@@ -1619,7 +1619,7 @@ void EoBCoreEngine::displayParchment(int id) {
removeInputTop();
while (!shouldQuit()) {
delay(_tickLength);
- if (checkInput(0, false, 0) & 0xff)
+ if (checkInput(0, false, 0) & 0xFF)
break;
removeInputTop();
}
@@ -1652,7 +1652,7 @@ int EoBCoreEngine::countResurrectionCandidates() {
if (!inv)
continue;
- if ((_flags.gameID == GI_EOB1 && ((_itemTypes[_items[inv].type].extraProperties & 0x7f) != 8)) || (_flags.gameID == GI_EOB2 && _items[inv].type != 33))
+ if ((_flags.gameID == GI_EOB1 && ((_itemTypes[_items[inv].type].extraProperties & 0x7F) != 8)) || (_flags.gameID == GI_EOB2 && _items[inv].type != 33))
continue;
_rrNames[_rrCount] = _npcPreset[_items[inv].value - 1].name;
@@ -1661,7 +1661,7 @@ int EoBCoreEngine::countResurrectionCandidates() {
}
if (_itemInHand > 0) {
- if ((_flags.gameID == GI_EOB1 && ((_itemTypes[_items[_itemInHand].type].extraProperties & 0x7f) == 8)) || (_flags.gameID == GI_EOB2 && _items[_itemInHand].type == 33)) {
+ if ((_flags.gameID == GI_EOB1 && ((_itemTypes[_items[_itemInHand].type].extraProperties & 0x7F) == 8)) || (_flags.gameID == GI_EOB2 && _items[_itemInHand].type == 33)) {
_rrNames[_rrCount] = _npcPreset[_items[_itemInHand].value - 1].name;
_rrId[_rrCount++] = -_items[_itemInHand].value;
}
@@ -1780,7 +1780,7 @@ void EoBCoreEngine::useSlotWeapon(int charIndex, int slotIndex, Item item) {
if (c->effectFlags & 0x40)
removeCharacterEffect(10, charIndex, 1); // remove invisibility effect
- int ep = _itemTypes[tp].extraProperties & 0x7f;
+ int ep = _itemTypes[tp].extraProperties & 0x7F;
int8 inflict = 0;
if (ep == 1) {
@@ -1823,14 +1823,14 @@ int EoBCoreEngine::closeDistanceAttack(int charIndex, Item item) {
if (r == -1) {
uint8 w = _specialWallTypes[_levelBlockProperties[d].walls[_sceneDrawVarDown]];
- if (w == 0xff) {
+ if (w == 0xFF) {
if (_flags.gameID == GI_EOB1) {
_levelBlockProperties[d].walls[_sceneDrawVarDown]++;
_levelBlockProperties[d].walls[_sceneDrawVarDown ^ 2]++;
} else {
for (int i = 0; i < 4; i++) {
- if (_specialWallTypes[_levelBlockProperties[d].walls[i]] == 0xff)
+ if (_specialWallTypes[_levelBlockProperties[d].walls[i]] == 0xFF)
_levelBlockProperties[d].walls[i]++;
}
}
@@ -1921,7 +1921,7 @@ int EoBCoreEngine::projectileWeaponAttack(int charIndex, Item item) {
void EoBCoreEngine::inflictMonsterDamage(EoBMonsterInPlay *m, int damage, bool giveExperience) {
m->hitPointsCur -= damage;
- m->flags = (m->flags & 0xf7) | 1;
+ m->flags = (m->flags & 0xF7) | 1;
if (_monsterProps[m->type].capsFlags & 0x2000) {
explodeMonster(m);
@@ -2027,7 +2027,7 @@ bool EoBCoreEngine::characterAttackHitTest(int charIndex, int monsterIndex, int
if (charIndex < 0)
return true;
- int p = item ? (_flags.gameID == GI_EOB1 ? _items[item].type : (_itemTypes[_items[item].type].extraProperties & 0x7f)) : 0;
+ int p = item ? (_flags.gameID == GI_EOB1 ? _items[item].type : (_itemTypes[_items[item].type].extraProperties & 0x7F)) : 0;
if (_monsters[monsterIndex].flags & 0x20)
return true;// EOB 2 only ?
@@ -2206,7 +2206,7 @@ void EoBCoreEngine::statusAttack(int charIndex, int attackStatusFlags, const cha
c->flags |= attackStatusFlags;
}
- if ((attackStatusFlags & 0x0c) && (_openBookChar == charIndex) && _updateFlags) {
+ if ((attackStatusFlags & 0x0C) && (_openBookChar == charIndex) && _updateFlags) {
Button b;
clickedSpellbookAbort(&b);
}
@@ -2312,7 +2312,7 @@ int EoBCoreEngine::getSaveThrowModifier(int hpModifier, int level, int type) {
}
bool EoBCoreEngine::calcDamageCheckItemType(int itemType) {
- itemType = _itemTypes[itemType].extraProperties & 0x7f;
+ itemType = _itemTypes[itemType].extraProperties & 0x7F;
return (itemType == 2 || itemType == 3) ? true : false;
}
diff --git a/engines/kyra/eobcommon.h b/engines/kyra/eobcommon.h
index e42130cde0..70200d3049 100644
--- a/engines/kyra/eobcommon.h
+++ b/engines/kyra/eobcommon.h
@@ -722,21 +722,21 @@ protected:
void gui_processWeaponSlotClickRight(int charIndex, int slotIndex);
void gui_processInventorySlotClick(int slot);
- static const int16 _buttonList1[];
+ static const uint8 _buttonList1[];
int _buttonList1Size;
- static const int16 _buttonList2[];
+ static const uint8 _buttonList2[];
int _buttonList2Size;
- static const int16 _buttonList3[];
+ static const uint8 _buttonList3[];
int _buttonList3Size;
- static const int16 _buttonList4[];
+ static const uint8 _buttonList4[];
int _buttonList4Size;
- static const int16 _buttonList5[];
+ static const uint8 _buttonList5[];
int _buttonList5Size;
- static const int16 _buttonList6[];
+ static const uint8 _buttonList6[];
int _buttonList6Size;
- static const int16 _buttonList7[];
+ static const uint8 _buttonList7[];
int _buttonList7Size;
- static const int16 _buttonList8[];
+ static const uint8 _buttonList8[];
int _buttonList8Size;
const EoBGuiButtonDef *_buttonDefs;
diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp
index 1c827e2802..ed3aaefbd9 100644
--- a/engines/kyra/gui_eob.cpp
+++ b/engines/kyra/gui_eob.cpp
@@ -86,7 +86,7 @@ void EoBCoreEngine::gui_drawCharPortraitWithStats(int index) {
int txtCol1 = 12;
int txtCol2 = 15;
- if ((_flags.gameID == GI_EOB1 && c->flags & 6) || (_flags.gameID == GI_EOB2 && c->flags & 0x0e)) {
+ if ((_flags.gameID == GI_EOB1 && c->flags & 6) || (_flags.gameID == GI_EOB2 && c->flags & 0x0E)) {
txtCol1 = 8;
txtCol2 = 6;
}
@@ -285,7 +285,7 @@ void EoBCoreEngine::gui_drawWeaponSlot(int charIndex, int slot) {
else
_screen->drawShape(_screen->_curPage, _itemIconShapes[85 + slot], x + 8, y, 0);
- if ((_characters[charIndex].disabledSlots & (1 << slot)) || !validateWeaponSlotItem(charIndex, slot) || (_characters[charIndex].hitPointsCur <= 0) || (_characters[charIndex].flags & 0x0c))
+ if ((_characters[charIndex].disabledSlots & (1 << slot)) || !validateWeaponSlotItem(charIndex, slot) || (_characters[charIndex].hitPointsCur <= 0) || (_characters[charIndex].flags & 0x0C))
_screen->drawShape(_screen->_curPage, _weaponSlotGrid, x, y, 0);
}
@@ -808,13 +808,13 @@ int EoBCoreEngine::clickedSceneDropPickupItem(Button *button) {
if (button->arg > 1) {
block = calcNewBlockPosition(_currentBlock, _currentDirection);
int f = _wllWallFlags[_levelBlockProperties[block].walls[_sceneDrawVarDown]];
- if (!(f & 0x0b))
+ if (!(f & 0x0B))
return 1;
}
int d = _dropItemDirIndex[(_currentDirection << 2) + button->arg];
if (_itemInHand) {
- setItemPosition((Item *)&_levelBlockProperties[block & 0x3ff].drawObjects, block, _itemInHand, d);
+ setItemPosition((Item *)&_levelBlockProperties[block & 0x3FF].drawObjects, block, _itemInHand, d);
setHandItem(0);
runLevelScript(block, 4);
} else {
@@ -856,7 +856,7 @@ int EoBCoreEngine::clickedWeaponSlot(Button *button) {
static const uint8 sY[] = { 27, 27, 79, 79, 131, 131 };
int slot = sY[button->arg] > _mouseY ? 0 : 1;
- if ((_gui->_flagsMouseLeft & 0x7f) == 1)
+ if ((_gui->_flagsMouseLeft & 0x7F) == 1)
gui_processWeaponSlotClickLeft(button->arg, slot);
else
gui_processWeaponSlotClickRight(button->arg, slot);
@@ -1031,9 +1031,9 @@ int EoBCoreEngine::clickedSpellbookList(Button *button) {
}
int EoBCoreEngine::clickedCastSpellOnCharacter(Button *button) {
- _activeSpellCharId = button->arg & 0xff;
+ _activeSpellCharId = button->arg & 0xFF;
- if (_activeSpellCharId == 0xff) {
+ if (_activeSpellCharId == 0xFF) {
printWarning(_magicStrings3[_flags.gameID == GI_EOB1 ? 2 : 1]);
if (_castScrollSlot) {
gui_updateSlotAfterScrollUse();
@@ -1215,7 +1215,7 @@ void EoBCoreEngine::gui_processWeaponSlotClickLeft(int charIndex, int slotIndex)
int ih = _itemInHand;
int t = _items[ih].type;
- uint16 v = (ih) ? _itemTypes[t].invFlags : 0xffff;
+ uint16 v = (ih) ? _itemTypes[t].invFlags : 0xFFFF;
if (v & _slotValidationFlags[slotIndex]) {
setHandItem(itm);
@@ -1227,7 +1227,7 @@ void EoBCoreEngine::gui_processWeaponSlotClickLeft(int charIndex, int slotIndex)
}
void EoBCoreEngine::gui_processWeaponSlotClickRight(int charIndex, int slotIndex) {
- if (!testCharacter(charIndex, 0x0d))
+ if (!testCharacter(charIndex, 0x0D))
return;
Item itm = _characters[charIndex].inventory[slotIndex];
@@ -1244,7 +1244,7 @@ void EoBCoreEngine::gui_processWeaponSlotClickRight(int charIndex, int slotIndex
int8 tp = _items[itm].type;
int8 vl = _items[itm].value;
- uint8 ep = _itemTypes[tp].extraProperties & 0x7f;
+ uint8 ep = _itemTypes[tp].extraProperties & 0x7F;
switch (ep) {
case 0:
@@ -1376,7 +1376,7 @@ GUI_EoB::GUI_EoB(EoBCoreEngine *vm) : GUI(vm), _vm(vm), _screen(vm->_screen) {
_backupButtonList = 0;
_progress = 0;
_prcButtonUnk3 = 1;
- _cflag = 0xffff;
+ _cflag = 0xFFFF;
_menuLineSpacing = 0;
_menuLastInFlags = 0;
@@ -1385,8 +1385,8 @@ GUI_EoB::GUI_EoB(EoBCoreEngine *vm) : GUI(vm), _vm(vm), _screen(vm->_screen) {
_numPages = (_vm->game() == GI_EOB2) ? 8 : 5;
_numVisPages = (_vm->game() == GI_EOB2) ? 6 : 5;
- _clericSpellAvltyFlags = (_vm->game() == GI_EOB2) ? 0xf7ffffff : 0x7bffff;
- _paladinSpellAvltyFlags = (_vm->game() == GI_EOB2) ? 0xa9bbd1d : 0x800ff2;
+ _clericSpellAvltyFlags = (_vm->game() == GI_EOB2) ? 0xF7FFFFFF : 0x7BFFFF;
+ _paladinSpellAvltyFlags = (_vm->game() == GI_EOB2) ? 0xA9BBD1D : 0x800FF2;
_numAssignedSpellsOfType = new int8[72];
memset(_numAssignedSpellsOfType, 0, 72);
@@ -1524,7 +1524,7 @@ void GUI_EoB::processButton(Button *button) {
int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8 mouseWheel) {
_progress = 0;
- uint16 in = inputFlags & 0xff;
+ uint16 in = inputFlags & 0xFF;
uint16 buttonReleaseFlag = 0;
bool clickEvt = false;
//_vm->_processingButtons = true;
@@ -1543,13 +1543,13 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
////////////////////////////
if (!buttonList && !(inputFlags & 0x800))
- return inputFlags & 0xff;
+ return inputFlags & 0xFF;
////////////////////////////
inputFlags = 0;
clickEvt = true;
} else if (inputFlags & 0x8000) {
- inputFlags &= 0xff;
+ inputFlags &= 0xFF;
}
uint16 result = 0;
@@ -1582,7 +1582,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
_specialProcessButton = 0;
_prcButtonUnk3 = 1;
- _cflag = 0xffff;
+ _cflag = 0xFFFF;
}
int sd = 0;
@@ -1616,12 +1616,12 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
if (flgs2 & 1)
flgs2 |= 8;
else
- flgs2 &= 0xfff7;
+ flgs2 &= 0xFFF7;
if (flgs2 & 4)
flgs2 |= 0x10;
else
- flgs2 &= 0xffef;
+ flgs2 &= 0xFFEF;
uint16 vL = 0;
uint16 vR = 0;
@@ -1640,8 +1640,8 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
v6 = 1;
}
} else if (_flagsModifier || clickEvt) {
- vL = flgs & 0xf00;
- vR = flgs & 0xf000;
+ vL = flgs & 0xF00;
+ vR = flgs & 0xF000;
if (_prcButtonUnk3) {
if (sd != buttonList->dimTableIndex) {
@@ -1675,7 +1675,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
flgs2 |= 4;
vc = 1;
} else {
- flgs2 &= 0xfffb;
+ flgs2 &= 0xFFFB;
}
if (flgs & 0x100) {
@@ -1702,7 +1702,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
flgs2 |= 4;
vc = 1;
} else {
- flgs2 &= 0xfffb;
+ flgs2 &= 0xFFFB;
}
if (!(flgs & 0x200))
@@ -1730,12 +1730,12 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
}
if ((flgs & 2) && (flgs2 & 1))
- flgs2 &= 0xfffe;
+ flgs2 &= 0xFFFE;
break;
case 3:
if ((flgs & 4) || (!buttonList->data2Val1))
- flgs2 &= 0xfffb;
+ flgs2 &= 0xFFFB;
else
flgs2 |= 4;
@@ -1745,7 +1745,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
}
if ((flgs & 2) && (flgs2 & 1))
- flgs2 &= 0xfffe;
+ flgs2 &= 0xFFFE;
break;
default:
@@ -1761,7 +1761,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
if ((flgs & 4) && buttonList->data2Val1)
flgs2 |= 4;
else
- flgs2 &= 0xfffb;
+ flgs2 &= 0xFFFB;
if (flgs & 0x1000) {
v6 = 1;
@@ -1786,7 +1786,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
if ((flgs & 4) && buttonList->data2Val1)
flgs2 |= 4;
else
- flgs2 &= 0xfffb;
+ flgs2 &= 0xFFFB;
if (!(flgs & 0x2000))
break;
@@ -1812,12 +1812,12 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
}
if ((flgs & 2) && (flgs2 & 1))
- flgs2 &= 0xfffe;
+ flgs2 &= 0xFFFE;
break;
case 3:
if ((flgs & 4) || (!buttonList->data2Val1))
- flgs2 &= 0xfffb;
+ flgs2 &= 0xFFFB;
else
flgs2 |= 4;
@@ -1827,7 +1827,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
}
if ((flgs & 2) && (flgs2 & 1))
- flgs2 &= 0xfffe;
+ flgs2 &= 0xFFFE;
break;
default:
@@ -1835,7 +1835,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
}
}
} else { // if (_vm->_mouseX >= x2 && _vm->_mouseX <= (x2 + buttonList->width)....)
- flgs2 &= 0xfff9;
+ flgs2 &= 0xFFF9;
if ((flgs & 0x40) && (!(flgs & 0x80)) && _specialProcessButton && !v8) {
static const uint16 flagsTable[] = { 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000 };
@@ -1859,7 +1859,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
}
if ((flgs & 2) && (flgs2 & 1))
- flgs2 &= 0xfffe;
+ flgs2 &= 0xFFFE;
} // end if (_vm->_mouseX >= x2 && _vm->_mouseX <= (x2 + buttonList->width)....)
} // end if (_prcButtonUnk3)
} // end if (_flagsModifier || clickEvt)
@@ -1896,7 +1896,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
};
if ((_flagsMouseLeft == 1 || _flagsMouseRight == 1) && !v18)
- _cflag = 0xffff;
+ _cflag = 0xFFFF;
if (!result)
result = inputFlags;
@@ -1938,7 +1938,7 @@ int GUI_EoB::simpleMenu_process(int sd, const char *const *strings, void *b, int
int x = (_screen->_curDim->sx + dm->sx) << 3;
int y = _screen->_curDim->sy + dm->sy;
- int inFlag = _vm->checkInput(0, false, 0) & 0x8ff;
+ int inFlag = _vm->checkInput(0, false, 0) & 0x8FF;
_vm->removeInputTop();
Common::Point mousePos = _vm->getMousePos();
@@ -2051,7 +2051,7 @@ void GUI_EoB::runCampMenu() {
newMenu = -1;
}
- int inputFlag = _vm->checkInput(buttonList, false, 0) & 0x80ff;
+ int inputFlag = _vm->checkInput(buttonList, false, 0) & 0x80FF;
_vm->removeInputTop();
if (inputFlag == _vm->_keyMap[Common::KEYCODE_ESCAPE])
@@ -2060,7 +2060,7 @@ void GUI_EoB::runCampMenu() {
inputFlag = 0x8000 + prevHighlightButton->index;
}
- Button *clickedButton = _vm->gui_getButton(buttonList, inputFlag & 0x7fff);
+ Button *clickedButton = _vm->gui_getButton(buttonList, inputFlag & 0x7FFF);
if (clickedButton) {
drawMenuButton(prevHighlightButton, false, false, true);
@@ -2140,8 +2140,8 @@ void GUI_EoB::runCampMenu() {
displayTextBox(44);
// fall through
- case 0x800c:
- case 0x800f:
+ case 0x800C:
+ case 0x800F:
if (lastMenu == 1 || lastMenu == 2)
newMenu = 0;
else if (inputFlag == _vm->_keyMap[Common::KEYCODE_ESCAPE])
@@ -2163,7 +2163,7 @@ void GUI_EoB::runCampMenu() {
newMenu = 1;
break;
- case 0x800a:
+ case 0x800A:
for (; i < 6; i++) {
if (_vm->testCharacter(i, 1))
cnt++;
@@ -2183,19 +2183,19 @@ void GUI_EoB::runCampMenu() {
newMenu = 0;
break;
- case 0x800b:
+ case 0x800B:
if (confirmDialogue(46))
_vm->quitGame();
newMenu = 0;
break;
- case 0x800d:
+ case 0x800D:
_vm->_configSounds ^= true;
_vm->_configMusic = _vm->_configSounds ? 1 : 0;
newMenu = 2;
break;
- case 0x800e:
+ case 0x800E:
_vm->_configHpBarGraphs ^= true;
newMenu = 2;
redrawPortraits = true;
@@ -2290,7 +2290,7 @@ bool GUI_EoB::confirmDialogue2(int dim, int id, int deflt) {
else if (_vm->posWithinRect(p.x, p.y, x[1], y, x[1] + 32, y + 14))
newHighlight = 1;
- int inputFlag = _vm->checkInput(0, false, 0) & 0x8ff;
+ int inputFlag = _vm->checkInput(0, false, 0) & 0x8FF;
_vm->removeInputTop();
if (inputFlag == _vm->_keyMap[Common::KEYCODE_SPACE] || inputFlag == _vm->_keyMap[Common::KEYCODE_RETURN]) {
@@ -2351,7 +2351,7 @@ void GUI_EoB::messageDialogue(int dim, int id, int buttonTextCol) {
_screen->updateScreen();
for (bool runLoop = true; runLoop && !_vm->shouldQuit();) {
- int inputFlag = _vm->checkInput(0, false, 0) & 0x8ff;
+ int inputFlag = _vm->checkInput(0, false, 0) & 0x8FF;
_vm->removeInputTop();
if (inputFlag == 199 || inputFlag == 201) {
@@ -2392,7 +2392,7 @@ void GUI_EoB::messageDialogue2(int dim, int id, int buttonTextCol) {
_screen->updateScreen();
for (bool runLoop = true; runLoop && !_vm->shouldQuit();) {
- int inputFlag = _vm->checkInput(0, false, 0) & 0x8ff;
+ int inputFlag = _vm->checkInput(0, false, 0) & 0x8FF;
_vm->removeInputTop();
if (inputFlag == 199 || inputFlag == 201) {
@@ -2764,7 +2764,7 @@ int GUI_EoB::selectSaveSlotDialogue(int x, int y, int id) {
int slot = -1;
for (bool runLoop = true; runLoop && !_vm->shouldQuit();) {
- int inputFlag = _vm->checkInput(0, false, 0) & 0x8ff;
+ int inputFlag = _vm->checkInput(0, false, 0) & 0x8FF;
_vm->removeInputTop();
if (inputFlag == _vm->_keyMap[Common::KEYCODE_SPACE] || inputFlag == _vm->_keyMap[Common::KEYCODE_RETURN]) {
@@ -3008,11 +3008,11 @@ void GUI_EoB::runMemorizePrayMenu(int charIndex, int spellType) {
lastHighLightText = newHighLightText;
}
- int inputFlag = _vm->checkInput(buttonList, false, 0) & 0x80ff;
+ int inputFlag = _vm->checkInput(buttonList, false, 0) & 0x80FF;
_vm->removeInputTop();
if (inputFlag == _vm->_keyMap[Common::KEYCODE_KP6] || inputFlag == _vm->_keyMap[Common::KEYCODE_RIGHT]) {
- inputFlag = 0x801a + ((lastHighLightButton + 1) % _numVisPages);
+ inputFlag = 0x801A + ((lastHighLightButton + 1) % _numVisPages);
} else if (inputFlag == _vm->_keyMap[Common::KEYCODE_KP4] || inputFlag == _vm->_keyMap[Common::KEYCODE_LEFT]) {
inputFlag = lastHighLightButton ? 0x8019 + lastHighLightButton : 0x8019 + _numVisPages;
} else if (inputFlag == _vm->_keyMap[Common::KEYCODE_ESCAPE]) {
@@ -3027,7 +3027,7 @@ void GUI_EoB::runMemorizePrayMenu(int charIndex, int spellType) {
}
if (inputFlag & 0x8000) {
- b = _vm->gui_getButton(buttonList, inputFlag & 0x7fff);
+ b = _vm->gui_getButton(buttonList, inputFlag & 0x7FFF);
drawMenuButton(b, true, true, true);
_screen->updateScreen();
_vm->_system->delayMillis(80);
@@ -3074,9 +3074,9 @@ void GUI_EoB::runMemorizePrayMenu(int charIndex, int spellType) {
runLoop = false;
} else if (inputFlag & 0x8000) {
- newHighLightButton = inputFlag - 0x801a;
+ newHighLightButton = inputFlag - 0x801A;
if (newHighLightButton == lastHighLightButton)
- drawMenuButton(_vm->gui_getButton(buttonList, inputFlag & 0x7fff), false, true, true);
+ drawMenuButton(_vm->gui_getButton(buttonList, inputFlag & 0x7FFF), false, true, true);
}
}
@@ -3553,7 +3553,7 @@ bool GUI_EoB::confirmDialogue(int id) {
lastHighlight = newHighlight;
}
- int inputFlag = _vm->checkInput(buttonList, false, 0) & 0x80ff;
+ int inputFlag = _vm->checkInput(buttonList, false, 0) & 0x80FF;
_vm->removeInputTop();
if (inputFlag == _vm->_keyMap[Common::KEYCODE_KP5] || inputFlag == _vm->_keyMap[Common::KEYCODE_SPACE] || inputFlag == _vm->_keyMap[Common::KEYCODE_RETURN]) {
diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp
index 36fbb0b40a..3a2c07beff 100644
--- a/engines/kyra/gui_hof.cpp
+++ b/engines/kyra/gui_hof.cpp
@@ -521,7 +521,7 @@ void KyraEngine_HoF::bookPrintText(int dstPage, const uint8 *str, int x, int y,
Screen::FontId oldFont = _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_BOOKFONT_FNT);
_screen->_charWidth = -2;
- _screen->printText((const char *)str, x, y, color, (_flags.lang == Common::JA_JPN) ? 0xf6 : 0);
+ _screen->printText((const char *)str, x, y, color, (_flags.lang == Common::JA_JPN) ? 0xF6 : 0);
_screen->_charWidth = 0;
_screen->setFont(oldFont);
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index a79da0681e..f7a5386574 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -120,7 +120,7 @@ void LoLEngine::gui_drawScroll() {
if (h) {
_screen->copyRegion(201, 1, 17, 15, 6, h, 2, 2, Screen::CR_NO_P_CHECK);
_screen->copyRegion(208, 1, 89, 15, 6, h, 2, 2, Screen::CR_NO_P_CHECK);
- _screen->fillRect(21, 15, 89, h + 15, _flags.use16ColorMode ? 0xbb : 206);
+ _screen->fillRect(21, 15, 89, h + 15, _flags.use16ColorMode ? 0xBB : 206);
}
_screen->copyRegion(112, 16, 12, h + 15, 87, 14, 2, 2, Screen::CR_NO_P_CHECK);
@@ -172,7 +172,7 @@ void LoLEngine::gui_displayCharInventory(int charNum) {
gui_drawAllCharPortraitsWithStats();
if (_flags.use16ColorMode)
- _screen->fprintString("%s", 156, 8, 0xe1, 0, 1, l->name);
+ _screen->fprintString("%s", 156, 8, 0xE1, 0, 1, l->name);
else
_screen->fprintString("%s", 157, 9, 254, 0, 5, l->name);
@@ -182,7 +182,7 @@ void LoLEngine::gui_displayCharInventory(int charNum) {
gui_drawCharInventoryItem(i);
Screen::FontId of = _screen->setFont(Screen::FID_9_FNT);
- _screen->fprintString("%s", 182, 103, _flags.use16ColorMode ? 0xbb : 172, 0, 5, getLangString(0x4033));
+ _screen->fprintString("%s", 182, 103, _flags.use16ColorMode ? 0xBB : 172, 0, 5, getLangString(0x4033));
_screen->setFont(of);
static const uint16 statusFlags[] = { 0x0080, 0x0000, 0x1000, 0x0002, 0x100, 0x0001, 0x0000, 0x0000 };
@@ -206,7 +206,7 @@ void LoLEngine::gui_displayCharInventory(int charNum) {
int32 b = l->experiencePts[i] - _expRequirements[l->skillLevels[i] - 1];
int32 e = _expRequirements[l->skillLevels[i]] - _expRequirements[l->skillLevels[i] - 1];
- while (e & 0xffff8000) {
+ while (e & 0xFFFF8000) {
e >>= 1;
c = b;
b >>= 1;
@@ -245,7 +245,7 @@ void LoLEngine::gui_printCharacterStats(int index, int redraw, int value) {
// protection
if (_flags.use16ColorMode) {
y = (index + 2) << 3;
- col = 0xa1;
+ col = 0xA1;
if (redraw)
_screen->fprintString("%s", offs + 108, y, col, 0, 0, getLangString(0x4014 + index));
} else {
@@ -260,7 +260,7 @@ void LoLEngine::gui_printCharacterStats(int index, int redraw, int value) {
y = s * 10 + 62;
if (_flags.use16ColorMode) {
y = (s + 8) << 3;
- col = _characters[_selectedCharacter].flags & (0x200 << s) ? 0xe1 : 0x81;
+ col = _characters[_selectedCharacter].flags & (0x200 << s) ? 0xE1 : 0x81;
if (redraw)
_screen->fprintString("%s", offs + 108, y, col, 0, 0, getLangString(0x4014 + index));
} else {
@@ -274,7 +274,7 @@ void LoLEngine::gui_printCharacterStats(int index, int redraw, int value) {
if (offs)
_screen->copyRegion(294, y, 182 + offs, y, 18, 8, 6, _screen->_curPage, Screen::CR_NO_P_CHECK);
- Screen::FontId of = _flags.use16ColorMode ? _screen->setFont(Screen::FID_SJIS_FNT) : _screen->_currentFont;
+ Screen::FontId of = (_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? _screen->setFont(Screen::FID_SJIS_FNT) : _screen->_currentFont;
_screen->fprintString("%d", 200 + offs, y, col, 0, _flags.use16ColorMode ? 2 : 6, value);
_screen->setFont(of);
}
@@ -322,12 +322,12 @@ void LoLEngine::gui_changeCharacterStats(int charNum) {
void LoLEngine::gui_drawCharInventoryItem(int itemIndex) {
static const uint8 slotShapes[] = { 0x30, 0x34, 0x30, 0x34, 0x2E, 0x2F, 0x32, 0x33, 0x31, 0x35, 0x35 };
-
+ //2Eh, 32h, 2Eh, 32h, 2Ch, 2Dh, 30h, 31h, 2Fh, 33h, 33h
const uint8 *coords = &_charInvDefs[_charInvIndex[_characters[_selectedCharacter].raceClassSex] * 22 + itemIndex * 2];
uint8 x = *coords++;
uint8 y = *coords;
- if (y == 0xff)
+ if (y == 0xFF)
return;
if (!_screen->_curPage)
@@ -366,7 +366,7 @@ void LoLEngine::gui_drawCharPortraitWithStats(int charNum) {
gui_drawCharFaceShape(charNum, 0, 1, _screen->_curPage);
if (_flags.use16ColorMode) {
- gui_drawLiveMagicBar(33, 32, _characters[charNum].magicPointsCur, 0, _characters[charNum].magicPointsMax, 5, 32, 0xaa, 0x44, 0);
+ gui_drawLiveMagicBar(33, 32, _characters[charNum].magicPointsCur, 0, _characters[charNum].magicPointsMax, 5, 32, 0xAA, 0x44, 0);
gui_drawLiveMagicBar(39, 32, _characters[charNum].hitPointsCur, 0, _characters[charNum].hitPointsMax, 5, 32, 0x66, 0x44, 1);
_screen->printText(getLangString(0x4253), 33, 1, 0x99, 0);
_screen->printText(getLangString(0x4254), 39, 1, 0x55, 0);
@@ -493,7 +493,7 @@ void LoLEngine::gui_drawLiveMagicBar(int x, int y, int curPoints, int unk, int m
if (flag) {
t = maxPoints >> 1;
if (t > curPoints)
- col1 = _flags.use16ColorMode ? 0xbb : 144;
+ col1 = _flags.use16ColorMode ? 0xBB : 144;
t = maxPoints >> 2;
if (t > curPoints)
col1 = _flags.use16ColorMode ? 0x88 : 132;
@@ -525,9 +525,9 @@ void LoLEngine::calcCharPortraitXpos() {
}
void LoLEngine::gui_drawMoneyBox(int pageNum) {
- static const uint16 moneyX256[] = { 0x128, 0x134, 0x12b, 0x131, 0x12e};
+ static const uint16 moneyX256[] = { 0x128, 0x134, 0x12B, 0x131, 0x12E};
static const uint16 moneyY256[] = { 0x73, 0x73, 0x74, 0x74, 0x75};
- static const uint16 moneyX16[] = { 0x127, 0x133, 0x12a, 0x130, 0x12d};
+ static const uint16 moneyX16[] = { 0x127, 0x133, 0x12A, 0x130, 0x12D};
static const uint16 moneyY16[] = { 0x74, 0x74, 0x75, 0x75, 0x76};
int backupPage = _screen->_curPage;
@@ -551,11 +551,11 @@ void LoLEngine::gui_drawMoneyBox(int pageNum) {
continue;
uint8 h = _moneyColumnHeight[i] - 1;
- _screen->drawClippedLine(moneyX[i], moneyY[i], moneyX[i], moneyY[i] - h, _flags.use16ColorMode ? 1 : 0xd2);
- _screen->drawClippedLine(moneyX[i] + 1, moneyY[i], moneyX[i] + 1, moneyY[i] - h, _flags.use16ColorMode ? 2 : 0xd1);
- _screen->drawClippedLine(moneyX[i] + 2, moneyY[i], moneyX[i] + 2, moneyY[i] - h, _flags.use16ColorMode ? 3 : 0xd0);
- _screen->drawClippedLine(moneyX[i] + 3, moneyY[i], moneyX[i] + 3, moneyY[i] - h, _flags.use16ColorMode ? 2 : 0xd1);
- _screen->drawClippedLine(moneyX[i] + 4, moneyY[i], moneyX[i] + 4, moneyY[i] - h, _flags.use16ColorMode ? 1 : 0xd2);
+ _screen->drawClippedLine(moneyX[i], moneyY[i], moneyX[i], moneyY[i] - h, _flags.use16ColorMode ? 1 : 0xD2);
+ _screen->drawClippedLine(moneyX[i] + 1, moneyY[i], moneyX[i] + 1, moneyY[i] - h, _flags.use16ColorMode ? 2 : 0xD1);
+ _screen->drawClippedLine(moneyX[i] + 2, moneyY[i], moneyX[i] + 2, moneyY[i] - h, _flags.use16ColorMode ? 3 : 0xD0);
+ _screen->drawClippedLine(moneyX[i] + 3, moneyY[i], moneyX[i] + 3, moneyY[i] - h, _flags.use16ColorMode ? 2 : 0xD1);
+ _screen->drawClippedLine(moneyX[i] + 4, moneyY[i], moneyX[i] + 4, moneyY[i] - h, _flags.use16ColorMode ? 1 : 0xD2);
}
Screen::FontId backupFont = _screen->setFont(Screen::FID_6_FNT);
@@ -584,7 +584,7 @@ void LoLEngine::gui_drawCompass() {
_compassDirection = _currentDirection << 6;
}
- int t = ((_compassDirection + 4) >> 3) & 0x1f;
+ int t = ((_compassDirection + 4) >> 3) & 0x1F;
if (t == _compassDirectionIndex)
return;
@@ -744,13 +744,13 @@ void LoLEngine::gui_toggleFightButtons(bool disable) {
if (disable)
_characters[i].flags |= 0x2000;
else
- _characters[i].flags &= 0xdfff;
+ _characters[i].flags &= 0xDFFF;
if (disable && !textEnabled()) {
int u = _selectedCharacter;
_selectedCharacter = 99;
int f = _updateFlags;
- _updateFlags &= 0xfffd;
+ _updateFlags &= 0xFFFD;
gui_drawCharPortraitWithStats(i);
@@ -774,7 +774,7 @@ void LoLEngine::gui_updateInput() {
if (inputFlag && _activeMagicMenu != -1 && !(inputFlag & 0x8800)) {
gui_enableDefaultPlayfieldButtons();
- _characters[_activeMagicMenu].flags &= 0xffef;
+ _characters[_activeMagicMenu].flags &= 0xFFEF;
gui_drawCharPortraitWithStats(_activeMagicMenu);
gui_triggerEvent(inputFlag);
_preserveEvents = false;
@@ -875,7 +875,7 @@ void LoLEngine::gui_initCharInventorySpecialButtons(int charNum) {
const uint8 *s = &_charInvDefs[_charInvIndex[_characters[charNum].raceClassSex] * 22];
for (int i = 0; i < 11; i++) {
- if (*s != 0xff)
+ if (*s != 0xFF)
gui_initButton(33 + i, s[0], s[1], i);
s += 2;
}
@@ -916,7 +916,7 @@ void LoLEngine::gui_initButton(int index, int x, int y, int val) {
*b = Button();
b->nextButton = 0;
- b->data0Val2 = b->data1Val2 = b->data2Val2 = 0xfe;
+ b->data0Val2 = b->data1Val2 = b->data2Val2 = 0xFE;
b->data0Val3 = b->data1Val3 = b->data2Val3 = 0x01;
b->index = cnt;
@@ -925,7 +925,7 @@ void LoLEngine::gui_initButton(int index, int x, int y, int val) {
b->dimTableIndex = _buttonData[index].screenDim;
b->flags = _buttonData[index].buttonflags;
- b->arg = (val != -1) ? (uint8)(val & 0xff) : _buttonData[index].index;
+ b->arg = (val != -1) ? (uint8)(val & 0xFF) : _buttonData[index].index;
if (index == 15) {
// magic sub menu
@@ -1100,17 +1100,17 @@ int LoLEngine::clickedMagicSubmenu(Button *button) {
gui_enableDefaultPlayfieldButtons();
if (checkMagic(c, _availableSpells[_selectedSpell], spellLevel)) {
- _characters[c].flags &= 0xffef;
+ _characters[c].flags &= 0xFFEF;
gui_drawCharPortraitWithStats(c);
} else {
_characters[c].flags |= 4;
- _characters[c].flags &= 0xffef;
+ _characters[c].flags &= 0xFFEF;
if (castSpell(c, _availableSpells[_selectedSpell], spellLevel)) {
setCharacterUpdateEvent(c, 1, 8, 1);
increaseExperience(c, 2, spellLevel * spellLevel);
} else {
- _characters[c].flags &= 0xfffb;
+ _characters[c].flags &= 0xFFFB;
gui_drawCharPortraitWithStats(c);
}
}
@@ -1120,7 +1120,7 @@ int LoLEngine::clickedMagicSubmenu(Button *button) {
}
int LoLEngine::clickedScreen(Button *button) {
- _characters[_activeMagicMenu].flags &= 0xffef;
+ _characters[_activeMagicMenu].flags &= 0xFFEF;
gui_drawCharPortraitWithStats(_activeMagicMenu);
_activeMagicMenu = -1;
@@ -1178,12 +1178,12 @@ int LoLEngine::clickedPortraitEtcRight(Button *button) {
runItemScript(c, _itemInHand, 0x400, 0, 0);
runLevelScriptCustom(_currentBlock, 0x400, c, _itemInHand, 0, 0);
} else {
- _txt->printMessage(2, getLangString(0x402c), _characters[c].name);
+ _txt->printMessage(2, getLangString(0x402C), _characters[c].name);
}
return 1;
}
- _txt->printMessage(2, "%s", getLangString((flg & 8) ? 0x4029 : ((flg & 0x10) ? 0x402a : 0x402b)));
+ _txt->printMessage(2, "%s", getLangString((flg & 8) ? 0x4029 : ((flg & 0x10) ? 0x402A : 0x402B)));
return 1;
}
@@ -1235,13 +1235,13 @@ int LoLEngine::clickedCharInventorySlot(Button *button) {
}
int LoLEngine::clickedExitCharInventory(Button *button) {
- _updateFlags &= 0xfff3;
+ _updateFlags &= 0xFFF3;
gui_enableDefaultPlayfieldButtons();
_weaponsDisabled = false;
for (int i = 0; i < 4; i++) {
if (_charInventoryUnk & (1 << i))
- _characters[i].flags &= 0xf1ff;
+ _characters[i].flags &= 0xF1FF;
}
_screen->copyBlockToPage(2, 0, 0, 320, 200, _pageBuffer1);
@@ -1315,7 +1315,7 @@ int LoLEngine::clickedScenePickupItem(Button *button) {
uint16 block = (p <= 128) ? calcNewBlockPosition(_currentBlock, _currentDirection) : _currentBlock;
- int found = checkSceneForItems(&_levelBlockProperties[block].drawObjects, p & 0x7f);
+ int found = checkSceneForItems(&_levelBlockProperties[block].drawObjects, p & 0x7F);
if (found != -1) {
removeLevelItem(found, block);
@@ -1465,7 +1465,7 @@ int LoLEngine::clickedSpellTargetCharacter(Button *button) {
int t = button->arg;
_txt->printMessage(0, "%s.\r", _characters[t].name);
- if ((_spellProperties[_activeSpell.spell].flags & 0xff) == 1) {
+ if ((_spellProperties[_activeSpell.spell].flags & 0xFF) == 1) {
_activeSpell.target = t;
castHealOnSingleCharacter(&_activeSpell);
}
@@ -1504,7 +1504,7 @@ int LoLEngine::clickedSceneThrowItem(Button *button) {
uint16 y = 0;
calcCoordinates(x, y, _currentBlock, 0x80, 0x80);
- if (launchObject(0, _itemInHand, x, y, 12, _currentDirection << 1, 6, _selectedCharacter, 0x3f)) {
+ if (launchObject(0, _itemInHand, x, y, 12, _currentDirection << 1, 6, _selectedCharacter, 0x3F)) {
snd_playSoundEffect(18, -1);
setHandItem(0);
}
@@ -1520,7 +1520,7 @@ int LoLEngine::clickedOptions(Button *button) {
_updateFlags |= 4;
Button b;
- b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xfe;
+ b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xFE;
b.data0Val3 = b.data1Val3 = b.data2Val3 = 0x01;
if (_weaponsDisabled)
@@ -1540,7 +1540,7 @@ int LoLEngine::clickedOptions(Button *button) {
_gui->runMenu(_gui->_mainMenu);
- _updateFlags &= 0xfffb;
+ _updateFlags &= 0xFFFB;
setMouseCursorToItemInHand();
resetLampStatus();
gui_enableDefaultPlayfieldButtons();
@@ -1564,7 +1564,7 @@ int LoLEngine::clickedRestParty(Button *button) {
gui_toggleButtonDisplayMode(_flags.isTalkie ? 77 : 75, 1);
Button b;
- b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xfe;
+ b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xFE;
b.data0Val3 = b.data1Val3 = b.data2Val3 = 0x01;
if (_weaponsDisabled)
@@ -1710,7 +1710,7 @@ int LoLEngine::clickedRestParty(Button *button) {
bool setframe = true;
if (_characters[i].flags & 0x1000) {
- _characters[i].flags &= 0xefff;
+ _characters[i].flags &= 0xEFFF;
if (_partyAwake) {
if (_characters[i].damageSuffered) {
@@ -1733,7 +1733,7 @@ int LoLEngine::clickedRestParty(Button *button) {
setTemporaryFaceFrame(i, frm, upd, 1);
}
- _updateFlags &= 0xfffe;
+ _updateFlags &= 0xFFFE;
_partyAwake = true;
updateDrawPage2();
gui_drawScene(0);
@@ -1742,7 +1742,7 @@ int LoLEngine::clickedRestParty(Button *button) {
} else {
for (int i = 0; i < 4; i++)
- _characters[i].flags &= 0xefff;
+ _characters[i].flags &= 0xEFFF;
if (needPoisoningFlags) {
setTemporaryFaceFrameForAllCharacters(0, 0, 0);
@@ -1750,7 +1750,7 @@ int LoLEngine::clickedRestParty(Button *button) {
if (needPoisoningFlags & (1 << i))
setTemporaryFaceFrame(i, 3, 8, 0);
}
- _txt->printMessage(0x8000, "%s", getLangString(0x405a));
+ _txt->printMessage(0x8000, "%s", getLangString(0x405A));
gui_drawAllCharPortraitsWithStats();
} else {
@@ -1773,10 +1773,10 @@ int LoLEngine::clickedCompass(Button *button) {
return 0;
if (_compassBroken) {
- if (characterSays(0x425b, -1, true))
- _txt->printMessage(4, "%s", getLangString(0x425b));
+ if (characterSays(0x425B, -1, true))
+ _txt->printMessage(4, "%s", getLangString(0x425B));
} else {
- _txt->printMessage(0, "%s", getLangString(0x402f + _currentDirection));
+ _txt->printMessage(0, "%s", getLangString(0x402F + _currentDirection));
}
return 1;
@@ -1813,8 +1813,8 @@ int LoLEngine::clickedLamp(Button *button) {
_lampOilStatus += 100;
} else {
- uint16 s = (_lampOilStatus >= 100) ? 0x4060 : ((!_lampOilStatus) ? 0x405c : (_lampOilStatus / 33) + 0x405d);
- _txt->printMessage(0, getLangString(0x405b), getLangString(s));
+ uint16 s = (_lampOilStatus >= 100) ? 0x4060 : ((!_lampOilStatus) ? 0x405C : (_lampOilStatus / 33) + 0x405D);
+ _txt->printMessage(0, getLangString(0x405B), getLangString(s));
}
if (_brightness)
@@ -1836,7 +1836,7 @@ int LoLEngine::clickedStatusIcon(Button *button) {
if (str == 0 || str > 3)
return 1;
- _txt->printMessage(0x8002, "%s", getLangString(str == 1 ? 0x424c : (str == 2 ? 0x424e : 0x424d)));
+ _txt->printMessage(0x8002, "%s", getLangString(str == 1 ? 0x424C : (str == 2 ? 0x424E : 0x424D)));
return 1;
}
@@ -2239,7 +2239,7 @@ int GUI_LoL::runMenu(Menu &menu) {
if (_currentMenu == &_gameOptions) {
char *s = (char *)_vm->_tempBuffer5120;
- Common::strlcpy(s, _vm->getLangString(0x406f + _vm->_monsterDifficulty), 30);
+ Common::strlcpy(s, _vm->getLangString(0x406F + _vm->_monsterDifficulty), 30);
_currentMenu->item[_vm->gameFlags().isTalkie ? 0 : 2].itemString = s;
s += (strlen(s) + 1);
@@ -2252,7 +2252,7 @@ int GUI_LoL::runMenu(Menu &menu) {
s += (strlen(s) + 1);
if (_vm->gameFlags().isTalkie) {
- Common::strlcpy(s, _vm->getLangString(0x42d6 + _vm->_lang), 30);
+ Common::strlcpy(s, _vm->getLangString(0x42D6 + _vm->_lang), 30);
_currentMenu->item[3].itemString = s;
s += (strlen(s) + 1);
@@ -2315,7 +2315,7 @@ int GUI_LoL::runMenu(Menu &menu) {
for (int ii = 0; ii < 3; ++ii) {
Button *b = getButtonListData() + 1 + (i - 1) * 3 + ii;
b->nextButton = 0;
- b->data0Val2 = b->data1Val2 = b->data2Val2 = 0xfe;
+ b->data0Val2 = b->data1Val2 = b->data2Val2 = 0xFE;
b->data0Val3 = b->data1Val3 = b->data2Val3 = 0x01;
b->index = ii;
@@ -2367,9 +2367,9 @@ int GUI_LoL::runMenu(Menu &menu) {
int mw = (d->w << 3) + 1;
int mh = d->h + 1;
if (_vm->gameFlags().use16ColorMode) {
- _screen->drawShadedBox(mx, my, mx + mw + 1, my + mh + 1, 0xdd, 0xff);
- _screen->drawLine(true, mx + mw + 1, my, mh + 1, 0xcc);
- _screen->drawLine(false, mx, my + mh + 1, mw + 2, 0xcc);
+ _screen->drawShadedBox(mx, my, mx + mw + 1, my + mh + 1, 0xDD, 0xFF);
+ _screen->drawLine(true, mx + mw + 1, my, mh + 1, 0xCC);
+ _screen->drawLine(false, mx, my + mh + 1, mw + 2, 0xCC);
} else {
_screen->drawShadedBox(mx, my, mx + mw, my + mh, 227, 223);
}
@@ -2622,7 +2622,7 @@ int GUI_LoL::clickedMainMenu(Button *button) {
_newMenu = &_audioOptions;
break;
case 0x4006:
- _choiceMenu.menuNameId = 0x400a;
+ _choiceMenu.menuNameId = 0x400A;
_newMenu = &_choiceMenu;
break;
case 0x4005:
@@ -2677,7 +2677,7 @@ int GUI_LoL::clickedDeleteMenu(Button *button) {
return 1;
}
- _choiceMenu.menuNameId = 0x400b;
+ _choiceMenu.menuNameId = 0x400B;
_newMenu = &_choiceMenu;
int16 s = (int16)button->arg;
_menuResult = _deleteMenu.item[-s - 2].saveSlot + 1;
@@ -2689,7 +2689,7 @@ int GUI_LoL::clickedOptionsMenu(Button *button) {
updateMenuButton(button);
switch (button->arg) {
- case 0xfff9:
+ case 0xFFF9:
_vm->_configMusic ^= 1;
_vm->sound()->enableMusic(_vm->_configMusic);
@@ -2698,23 +2698,23 @@ int GUI_LoL::clickedOptionsMenu(Button *button) {
else
_vm->_sound->beginFadeOut();
break;
- case 0xfff8:
+ case 0xFFF8:
_vm->_configSounds ^= true;
_vm->sound()->enableSFX(_vm->_configSounds);
break;
- case 0xfff7:
+ case 0xFFF7:
_vm->_monsterDifficulty = (_vm->_monsterDifficulty + 1) % 3;
break;
- case 0xfff6:
+ case 0xFFF6:
_vm->_smoothScrollingEnabled ^= true;
break;
- case 0xfff5:
+ case 0xFFF5:
_vm->_floatingCursorsEnabled ^= true;
break;
- case 0xfff4:
+ case 0xFFF4:
_vm->_lang = (_vm->_lang + 1) % 3;
break;
- case 0xfff3:
+ case 0xFFF3:
_vm->_configVoice ^= 3;
break;
case 0x4072: {
@@ -2793,7 +2793,7 @@ int GUI_LoL::clickedAudioMenu(Button *button) {
} while (1);
} else if (button->arg == 5) {
_vm->_lastSpeechId = -1;
- _vm->snd_playCharacterSpeech(0x42e0, 0, 0);
+ _vm->snd_playCharacterSpeech(0x42E0, 0, 0);
}
}
diff --git a/engines/kyra/gui_lol.h b/engines/kyra/gui_lol.h
index dbf54e41f0..79d4b6b4c9 100644
--- a/engines/kyra/gui_lol.h
+++ b/engines/kyra/gui_lol.h
@@ -36,9 +36,9 @@ namespace Kyra {
menu.width = (dim->w << 3); \
menu.height = (dim->h); \
if (_vm->gameFlags().use16ColorMode) { \
- menu.bkgdColor = 0xcc; \
- menu.color1 = 0xff; \
- menu.color2 = 0xdd; \
+ menu.bkgdColor = 0xCC; \
+ menu.color1 = 0xFF; \
+ menu.color2 = 0xDD; \
} else { \
menu.bkgdColor = 225; \
menu.color1 = 223; \
@@ -49,7 +49,7 @@ namespace Kyra {
menu.numberOfItems = d; \
menu.titleX = (dim->sx << 3) + (dim->w << 2); \
menu.titleY = 6; \
- menu.textColor = _vm->gameFlags().use16ColorMode ? 0xe1 : 254; \
+ menu.textColor = _vm->gameFlags().use16ColorMode ? 0xE1 : 254; \
menu.scrollUpButtonX = e; \
menu.scrollUpButtonY = f; \
menu.scrollDownButtonX = g; \
@@ -65,13 +65,13 @@ namespace Kyra {
item.y = c; \
item.width = d; \
item.height = e; \
- item.textColor = _vm->gameFlags().use16ColorMode ? 0xc1 : 204; \
- item.highlightColor = _vm->gameFlags().use16ColorMode ? 0xe1 : 254; \
+ item.textColor = _vm->gameFlags().use16ColorMode ? 0xC1 : 204; \
+ item.highlightColor = _vm->gameFlags().use16ColorMode ? 0xE1 : 254; \
item.titleX = -1; \
if (_vm->gameFlags().use16ColorMode) { \
- item.bkgdColor = 0xcc; \
- item.color1 = 0xff; \
- item.color2 = 0xdd; \
+ item.bkgdColor = 0xCC; \
+ item.color1 = 0xFF; \
+ item.color2 = 0xDD; \
} else { \
item.bkgdColor = 225; \
item.color1 = 223; \
diff --git a/engines/kyra/gui_rpg.cpp b/engines/kyra/gui_rpg.cpp
index be40050bb1..ab25f95df8 100644
--- a/engines/kyra/gui_rpg.cpp
+++ b/engines/kyra/gui_rpg.cpp
@@ -76,8 +76,8 @@ void KyraRpgEngine::gui_drawHorizontalBarGraph(int x, int y, int w, int h, int32
screen()->fillRect(x + t, y, x + w - 1, y + h, col2);
}
-void KyraRpgEngine::gui_initButtonsFromList(const int16 *list) {
- while (*list != -1)
+void KyraRpgEngine::gui_initButtonsFromList(const uint8 *list) {
+ while (*list != 0xFF)
gui_initButton(*list++);
}
@@ -107,7 +107,7 @@ bool KyraRpgEngine::clickedShape(int shapeIndex) {
uint16 s = _levelDecorationProperties[shapeIndex].shapeIndex[1];
- if (s == 0xffff)
+ if (s == 0xFFFF)
continue;
int w = _flags.gameID == GI_LOL ? _levelDecorationShapes[s][3] : (_levelDecorationShapes[s][2] << 3);
diff --git a/engines/kyra/items_eob.cpp b/engines/kyra/items_eob.cpp
index 0994e12e4f..6c7ccf14dc 100644
--- a/engines/kyra/items_eob.cpp
+++ b/engines/kyra/items_eob.cpp
@@ -118,7 +118,7 @@ void EoBCoreEngine::setItemPosition(Item *itemQueue, int block, Item item, int p
EoBItem *itm = &_items[item];
itm->pos = pos;
itm->block = block;
- itm->level = block < 0 ? 0xff : _currentLevel;
+ itm->level = block < 0 ? 0xFF : _currentLevel;
if (!*itemQueue) {
*itemQueue = itm->next = itm->prev = item;
@@ -141,7 +141,7 @@ void EoBCoreEngine::createInventoryItem(EoBCharacter *c, Item itemIndex, int16 i
if (itemValue != -1)
_items[itemIndex].value = itemValue;
- if (itemValue && ((_itemTypes[_items[itemIndex].type].extraProperties & 0x7f) < 4))
+ if (itemValue && ((_itemTypes[_items[itemIndex].type].extraProperties & 0x7F) < 4))
_items[itemIndex].flags |= 0x80;
if (c->inventory[preferedInventorySlot]) {
@@ -208,7 +208,7 @@ int EoBCoreEngine::validateInventorySlotForItem(Item item, int charIndex, int sl
}
int itm = _characters[charIndex].inventory[slot];
- int ex = _itemTypes[_items[itm].type].extraProperties & 0x7f;
+ int ex = _itemTypes[_items[itm].type].extraProperties & 0x7F;
if (_items[itm].flags & 0x20 && (_flags.gameID == GI_EOB1 || slot < 2)) {
if (_flags.gameID == GI_EOB2 && ex > 0 && ex < 4)
@@ -216,7 +216,7 @@ int EoBCoreEngine::validateInventorySlotForItem(Item item, int charIndex, int sl
return 0;
}
- uint16 v = item ? _itemTypes[_items[item].type].invFlags : 0xffff;
+ uint16 v = item ? _itemTypes[_items[item].type].invFlags : 0xFFFF;
if (v & _slotValidationFlags[slot])
return 1;
@@ -359,7 +359,7 @@ void EoBCoreEngine::printFullItemName(Item item) {
EoBItem *itm = &_items[item];
const char *nameUnid = _itemNames[itm->nameUnid];
const char *nameId = _itemNames[itm->nameId];
- uint8 f = _itemTypes[itm->type].extraProperties & 0x7f;
+ uint8 f = _itemTypes[itm->type].extraProperties & 0x7F;
int8 v = itm->value;
const char *tstr2 = 0;
diff --git a/engines/kyra/items_hof.cpp b/engines/kyra/items_hof.cpp
index ef2c50c0c5..e1d3c659de 100644
--- a/engines/kyra/items_hof.cpp
+++ b/engines/kyra/items_hof.cpp
@@ -84,7 +84,7 @@ bool KyraEngine_HoF::dropItem(int unk1, Item item, int x, int y, int unk2) {
bool success = processItemDrop(_mainCharacter.sceneId, item, x, y, unk1, unk2);
if (!success) {
- snd_playSoundEffect(0x0d);
+ snd_playSoundEffect(0x0D);
if (countAllItems() >= 30)
showMessageFromCCode(5, 0x84, 0);
}
@@ -205,7 +205,7 @@ void KyraEngine_HoF::itemDropDown(int startX, int startY, int dstX, int dstY, in
if (startX == dstX && startY == dstY) {
if (_layerFlagTable[_screen->getLayer(dstX, dstY)] && item != 13) {
updateCharFacing();
- snd_playSoundEffect(0x2d);
+ snd_playSoundEffect(0x2D);
removeHandItem();
objectChat(getTableString(0xFF, _cCodeBuffer, 1), 0, 0x83, 0xFF);
} else {
@@ -213,7 +213,7 @@ void KyraEngine_HoF::itemDropDown(int startX, int startY, int dstX, int dstY, in
_itemList[itemSlot].y = dstY;
_itemList[itemSlot].id = item;
_itemList[itemSlot].sceneId = _mainCharacter.sceneId;
- snd_playSoundEffect(0x0c);
+ snd_playSoundEffect(0x0C);
addItemToAnimList(itemSlot);
}
} else {
@@ -283,7 +283,7 @@ void KyraEngine_HoF::itemDropDown(int startX, int startY, int dstX, int dstY, in
if (_layerFlagTable[_screen->getLayer(dstX, dstY)] && item != 13) {
updateCharFacing();
- snd_playSoundEffect(0x2d);
+ snd_playSoundEffect(0x2D);
removeHandItem();
_screen->showMouse();
objectChat(getTableString(0xFF, _cCodeBuffer, 1), 0, 0x83, 0xFF);
@@ -292,7 +292,7 @@ void KyraEngine_HoF::itemDropDown(int startX, int startY, int dstX, int dstY, in
_itemList[itemSlot].y = dstY;
_itemList[itemSlot].id = item;
_itemList[itemSlot].sceneId = _mainCharacter.sceneId;
- snd_playSoundEffect(0x0c);
+ snd_playSoundEffect(0x0C);
addItemToAnimList(itemSlot);
_screen->showMouse();
}
@@ -307,7 +307,7 @@ void KyraEngine_HoF::exchangeMouseItem(int itemPos) {
_itemInHand = itemId;
addItemToAnimList(itemPos);
- snd_playSoundEffect(0x0b);
+ snd_playSoundEffect(0x0B);
setMouseCursor(_itemInHand);
int str2 = 7;
@@ -331,7 +331,7 @@ bool KyraEngine_HoF::pickUpItem(int x, int y) {
deleteItemAnimEntry(itemPos);
int itemId = _itemList[itemPos].id;
_itemList[itemPos].id = kItemNone;
- snd_playSoundEffect(0x0b);
+ snd_playSoundEffect(0x0B);
setMouseCursor(itemId);
int str2 = 7;
diff --git a/engines/kyra/items_lok.cpp b/engines/kyra/items_lok.cpp
index b92cd616c1..8ee07e8271 100644
--- a/engines/kyra/items_lok.cpp
+++ b/engines/kyra/items_lok.cpp
@@ -29,9 +29,9 @@ namespace Kyra {
int KyraEngine_LoK::findDuplicateItemShape(int shape) {
static const uint8 dupTable[] = {
- 0x48, 0x46, 0x49, 0x47, 0x4a, 0x46, 0x4b, 0x47,
- 0x4c, 0x46, 0x4d, 0x47, 0x5b, 0x5a, 0x5c, 0x5a,
- 0x5d, 0x5a, 0x5e, 0x5a, 0xFF, 0xFF
+ 0x48, 0x46, 0x49, 0x47, 0x4A, 0x46, 0x4B, 0x47,
+ 0x4C, 0x46, 0x4D, 0x47, 0x5B, 0x5A, 0x5C, 0x5A,
+ 0x5D, 0x5A, 0x5E, 0x5A, 0xFF, 0xFF
};
int i = 0;
diff --git a/engines/kyra/items_lol.cpp b/engines/kyra/items_lol.cpp
index 409b53f6f0..f7fd04bab8 100644
--- a/engines/kyra/items_lol.cpp
+++ b/engines/kyra/items_lol.cpp
@@ -29,7 +29,7 @@ namespace Kyra {
LoLObject *LoLEngine::findObject(uint16 index) {
if (index & 0x8000)
- return &_monsters[index & 0x7fff];
+ return &_monsters[index & 0x7FFF];
else
return &_itemsInPlay[index];
}
@@ -221,7 +221,7 @@ Item LoLEngine::makeItem(int itemType, int curFrame, int flags) {
memset(&_itemsInPlay[slot], 0, sizeof(LoLItem));
_itemsInPlay[slot].itemPropertyIndex = itemType;
- _itemsInPlay[slot].shpCurFrame_flg = (curFrame & 0x1fff) | flags;
+ _itemsInPlay[slot].shpCurFrame_flg = (curFrame & 0x1FFF) | flags;
_itemsInPlay[slot].level = -1;
return slot;
@@ -292,7 +292,7 @@ void LoLEngine::runItemScript(int charNum, Item item, int flags, int next, int r
memset(&scriptState, 0, sizeof(EMCState));
uint8 func = item ? _itemProperties[_itemsInPlay[item].itemPropertyIndex].itemScriptFunc : 3;
- if (func == 0xff)
+ if (func == 0xFF)
return;
_emc->init(&scriptState, &_itemScript);
@@ -351,8 +351,8 @@ bool LoLEngine::itemEquipped(int charNum, uint16 itemType) {
void LoLEngine::setItemPosition(Item item, uint16 x, uint16 y, int flyingHeight, int moveable) {
if (!flyingHeight) {
- x = (x & 0xffc0) | 0x40;
- y = (y & 0xffc0) | 0x40;
+ x = (x & 0xFFC0) | 0x40;
+ y = (y & 0xFFC0) | 0x40;
}
uint16 block = calcBlockIndex(x, y);
@@ -364,7 +364,7 @@ void LoLEngine::setItemPosition(Item item, uint16 x, uint16 y, int flyingHeight,
if (moveable)
_itemsInPlay[item].shpCurFrame_flg |= 0x4000;
else
- _itemsInPlay[item].shpCurFrame_flg &= 0xbfff;
+ _itemsInPlay[item].shpCurFrame_flg &= 0xBFFF;
assignItemToBlock(&_levelBlockProperties[block].assignedObjects, item);
@@ -429,9 +429,9 @@ bool LoLEngine::launchObject(int objectType, Item item, int startX, int startY,
if (attackerId != -1) {
if (attackerId & 0x8000) {
- t->flags &= 0xfd;
+ t->flags &= 0xFD;
} else {
- t->flags &= 0xfb;
+ t->flags &= 0xFB;
increaseExperience(attackerId, 1, 2);
}
}
@@ -455,8 +455,8 @@ void LoLEngine::endObjectFlight(FlyingObject *t, int x, int y, int collisionType
if (t->objectType == 0 || t->objectType == 1) {
objectFlightProcessHits(t, cx, cy, collisionType);
- t->x = (cx & 0xffc0) | 0x40;
- t->y = (cy & 0xffc0) | 0x40;
+ t->x = (cx & 0xFFC0) | 0x40;
+ t->y = (cy & 0xFFC0) | 0x40;
t->flyingHeight = 0;
updateObjectFlightPosition(t);
}
diff --git a/engines/kyra/kyra_rpg.cpp b/engines/kyra/kyra_rpg.cpp
index df2297ebfd..f8eb7d00cd 100644
--- a/engines/kyra/kyra_rpg.cpp
+++ b/engines/kyra/kyra_rpg.cpp
@@ -180,7 +180,7 @@ Common::Error KyraRpgEngine::init() {
_vcnColTable = new uint8[128];
for (int i = 0; i < 128; i++)
- _vcnColTable[i] = i & 0x0f;
+ _vcnColTable[i] = i & 0x0F;
_doorShapes = new uint8*[6];
memset(_doorShapes, 0, 6 * sizeof(uint8 *));
@@ -204,18 +204,19 @@ bool KyraRpgEngine::posWithinRect(int posX, int posY, int x1, int y1, int x2, in
void KyraRpgEngine::drawDialogueButtons() {
int cp = screen()->setCurPage(0);
- Screen::FontId of = screen()->setFont(gameFlags().use16ColorMode ? Screen::FID_SJIS_FNT : Screen::FID_6_FNT);
+ Screen::FontId of = screen()->setFont(_flags.lang == Common::JA_JPN && _flags.use16ColorMode ? Screen::FID_SJIS_FNT : Screen::FID_6_FNT);
for (int i = 0; i < _dialogueNumButtons; i++) {
int x = _dialogueButtonPosX[i];
- if (gameFlags().use16ColorMode) {
- gui_drawBox(x, ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) & ~7) - 1, 74, 10, 0xee, 0xcc, -1);
+ if (_flags.lang == Common::JA_JPN && _flags.use16ColorMode) {
+ gui_drawBox(x, ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) & ~7) - 1, 74, 10, 0xEE, 0xCC, -1);
screen()->printText(_dialogueButtonString[i], (x + 37 - (screen()->getTextWidth(_dialogueButtonString[i])) / 2) & ~3,
- ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2) & ~7, _dialogueHighlightedButton == i ? 0xc1 : 0xe1, 0);
+ ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2) & ~7, _dialogueHighlightedButton == i ? 0xC1 : 0xE1, 0);
} else {
+ int sjisYOffset = (_flags.lang == Common::JA_JPN && _dialogueButtonString[i][0] < 0) ? 2 : 0;
gui_drawBox(x, (_dialogueButtonYoffs + _dialogueButtonPosY[i]), _dialogueButtonWidth, guiSettings()->buttons.height, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
screen()->printText(_dialogueButtonString[i], x + (_dialogueButtonWidth >> 1) - (screen()->getTextWidth(_dialogueButtonString[i])) / 2,
- (_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2, _dialogueHighlightedButton == i ? _dialogueButtonLabelColor1 : _dialogueButtonLabelColor2, 0);
+ (_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2 - sjisYOffset, _dialogueHighlightedButton == i ? _dialogueButtonLabelColor1 : _dialogueButtonLabelColor2, 0);
}
}
screen()->setFont(of);
@@ -228,7 +229,7 @@ uint16 KyraRpgEngine::processDialogue() {
for (int i = 0; i < _dialogueNumButtons; i++) {
int x = _dialogueButtonPosX[i];
- int y = (gameFlags().use16ColorMode ? ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) & ~7) - 1 : (_dialogueButtonYoffs + _dialogueButtonPosY[i]));
+ int y = ((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) & ~7) - 1 : (_dialogueButtonYoffs + _dialogueButtonPosY[i]));
Common::Point p = getMousePos();
if (posWithinRect(p.x, p.y, x, y, x + _dialogueButtonWidth, y + guiSettings()->buttons.height)) {
_dialogueHighlightedButton = i;
diff --git a/engines/kyra/kyra_rpg.h b/engines/kyra/kyra_rpg.h
index 2615875f4d..cd36d2a5cd 100644
--- a/engines/kyra/kyra_rpg.h
+++ b/engines/kyra/kyra_rpg.h
@@ -283,7 +283,7 @@ protected:
void removeInputTop();
void gui_drawBox(int x, int y, int w, int h, int frameColor1, int frameColor2, int fillColor);
virtual void gui_drawHorizontalBarGraph(int x, int y, int w, int h, int32 curVal, int32 maxVal, int col1, int col2);
- void gui_initButtonsFromList(const int16 *list);
+ void gui_initButtonsFromList(const uint8 *list);
virtual void gui_initButton(int index, int x = -1, int y = -1, int val = -1) = 0;
void gui_resetButtonList();
void gui_notifyButtonListChanged();
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index f6fc4c3234..9194b64155 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -353,84 +353,88 @@ void KyraEngine_v1::setupKeyMap() {
Common::KeyCode kcScummVM;
int16 kcDOS;
int16 kcPC98;
+ int16 kcFMTowns;
};
+#define UNKNOWN_KEYCODE -1
#define KC(x) Common::KEYCODE_##x
static const KeyCodeMapEntry keys[] = {
- { KC(SPACE), 61, 53 },
- { KC(RETURN), 43, 29 },
- { KC(UP), 96, 68 },
- { KC(KP8), 96, 68 },
- { KC(RIGHT), 102, 73 },
- { KC(KP6), 102, 73 },
- { KC(DOWN), 98, 76 },
- { KC(KP2), 98, 76 },
- { KC(KP5), 97, 72 },
- { KC(LEFT), 92, 71 },
- { KC(KP4), 92, 71 },
- { KC(HOME), 91, 67 },
- { KC(KP7), 91, 67 },
- { KC(PAGEUP), 101, 69 },
- { KC(KP9), 101, 69 },
- { KC(END), 93, 0/*unknown*/ },
- { KC(KP1), 93, 0/*unknown*/ },
- { KC(PAGEDOWN), 103, 0/*unknown*/ },
- { KC(KP3), 103, 0/*unknown*/ },
- { KC(F1), 112, 99 },
- { KC(F2), 113, 100 },
- { KC(F3), 114, 101 },
- { KC(F4), 115, 102 },
- { KC(F5), 116, 103 },
- { KC(F6), 117, 104 },
- { KC(a), 31, 31 },
- { KC(b), 50, 50 },
- { KC(c), 48, 48 },
- { KC(d), 33, 33 },
- { KC(e), 19, 19 },
- { KC(f), 34, 34 },
- { KC(i), 24, 24 },
- { KC(k), 38, 38 },
- { KC(m), 52, 52 },
- { KC(n), 51, 51 },
- { KC(o), 25, 25 },
- { KC(p), 26, 26 },
- { KC(r), 20, 20 },
- { KC(s), 32, 32 },
- { KC(w), 18, 18 },
- { KC(y), 22, 22 },
- { KC(z), 46, 46 },
- { KC(1), 2, 0/*unknown*/ },
- { KC(2), 3, 0/*unknown*/ },
- { KC(3), 4, 0/*unknown*/ },
- { KC(4), 5, 0/*unknown*/ },
- { KC(5), 6, 0/*unknown*/ },
- { KC(6), 7, 0/*unknown*/ },
- { KC(7), 8, 0/*unknown*/ },
- { KC(SLASH), 55, 55 },
- { KC(ESCAPE), 110, 1 },
- { KC(MINUS), 12, 0/*unknown*/ },
- { KC(KP_MINUS), 105, 0/*unknown*/ },
- { KC(PLUS), 13, 0/*unknown*/ },
- { KC(KP_PLUS), 106, 0/*unknown*/ },
+ { KC(SPACE), 61, 53, 32 },
+ { KC(RETURN), 43, 29, 13 },
+ { KC(UP), 96, 68, 30 },
+ { KC(KP8), 96, 68, 30 },
+ { KC(RIGHT), 102, 73, 28 },
+ { KC(KP6), 102, 73, 28 },
+ { KC(DOWN), 98, 76, 31 },
+ { KC(KP2), 98, 76, 31 },
+ { KC(KP5), 97, 72, UNKNOWN_KEYCODE },
+ { KC(LEFT), 92, 71, 29 },
+ { KC(KP4), 92, 71, 29 },
+ { KC(HOME), 91, 67, 127 },
+ { KC(KP7), 91, 67, 127 },
+ { KC(PAGEUP), 101, 69, 18 },
+ { KC(KP9), 101, 69, 18 },
+ { KC(END), 93, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE },
+ { KC(KP1), 93, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE },
+ { KC(PAGEDOWN), 103, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE },
+ { KC(KP3), 103, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE },
+ { KC(F1), 112, 99, UNKNOWN_KEYCODE },
+ { KC(F2), 113, 100, UNKNOWN_KEYCODE },
+ { KC(F3), 114, 101, UNKNOWN_KEYCODE },
+ { KC(F4), 115, 102, UNKNOWN_KEYCODE },
+ { KC(F5), 116, 103, UNKNOWN_KEYCODE },
+ { KC(F6), 117, 104, UNKNOWN_KEYCODE },
+ { KC(a), 31, 31, UNKNOWN_KEYCODE },
+ { KC(b), 50, 50, UNKNOWN_KEYCODE },
+ { KC(c), 48, 48, 67 },
+ { KC(d), 33, 33, UNKNOWN_KEYCODE },
+ { KC(e), 19, 19, UNKNOWN_KEYCODE },
+ { KC(f), 34, 34, UNKNOWN_KEYCODE },
+ { KC(i), 24, 24, UNKNOWN_KEYCODE },
+ { KC(k), 38, 38, UNKNOWN_KEYCODE },
+ { KC(m), 52, 52, UNKNOWN_KEYCODE },
+ { KC(n), 51, 51, UNKNOWN_KEYCODE },
+ { KC(o), 25, 25, 79 },
+ { KC(p), 26, 26, 80 },
+ { KC(r), 20, 20, 82 },
+ { KC(s), 32, 32, UNKNOWN_KEYCODE },
+ { KC(w), 18, 18, UNKNOWN_KEYCODE },
+ { KC(y), 22, 22, UNKNOWN_KEYCODE },
+ { KC(z), 46, 46, UNKNOWN_KEYCODE },
+ { KC(0), UNKNOWN_KEYCODE, UNKNOWN_KEYCODE, 48 },
+ { KC(1), 2, UNKNOWN_KEYCODE, 49 },
+ { KC(2), 3, UNKNOWN_KEYCODE, 50 },
+ { KC(3), 4, UNKNOWN_KEYCODE, 51 },
+ { KC(4), 5, UNKNOWN_KEYCODE, 52 },
+ { KC(5), 6, UNKNOWN_KEYCODE, 53 },
+ { KC(6), 7, UNKNOWN_KEYCODE, 54 },
+ { KC(7), 8, UNKNOWN_KEYCODE, 55 },
+ { KC(SLASH), 55, 55, 47 },
+ { KC(ESCAPE), 110, 1, 27 },
+ { KC(MINUS), 12, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE },
+ { KC(KP_MINUS), 105, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE },
+ { KC(PLUS), 13, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE },
+ { KC(KP_PLUS), 106, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE },
// Multiple mappings for the keys to the right of the 'M' key,
// since these are different for QWERTZ, QWERTY and AZERTY keyboards.
// QWERTZ
- { KC(COMMA), 53, 0/*unknown*/ },
- { KC(PERIOD), 54, 0/*unknown*/ },
+ { KC(COMMA), 53, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE },
+ { KC(PERIOD), 54, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE },
// AZERTY
- { KC(SEMICOLON), 53, 0/*unknown*/ },
- { KC(COLON), 54, 0/*unknown*/ },
+ { KC(SEMICOLON), 53, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE },
+ { KC(COLON), 54, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE },
// QWERTY
- { KC(LESS), 53, 0/*unknown*/ },
- { KC(GREATER), 54, 0/*unknown*/ }
+ { KC(LESS), 53, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE },
+ { KC(GREATER), 54, UNKNOWN_KEYCODE, UNKNOWN_KEYCODE }
};
#undef KC
+#undef UNKNOWN_KEYCODE
_keyMap.clear();
for (int i = 0; i < ARRAYSIZE(keys); i++)
- _keyMap[keys[i].kcScummVM] = (_flags.platform == Common::kPlatformPC98) ? keys[i].kcPC98 : keys[i].kcDOS;
+ _keyMap[keys[i].kcScummVM] = (_flags.platform == Common::kPlatformPC98) ? keys[i].kcPC98 : ((_flags.platform == Common::kPlatformFMTowns) ? keys[i].kcFMTowns : keys[i].kcDOS);
}
void KyraEngine_v1::updateInput() {
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index dcfd2b7e10..f7696d45b5 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -114,7 +114,7 @@ LoLEngine::LoLEngine(OSystem *system, const GameFlags &flags) : KyraRpgEngine(sy
_selectedSpell = 0;
_updateCharNum = _portraitSpeechAnimMode = _textColorFlag = 0;
_palUpdateTimer = _updatePortraitNext = 0;
- _lampStatusTimer = 0xffffffff;
+ _lampStatusTimer = 0xFFFFFFFF;
_weaponsDisabled = false;
_charInventoryUnk = 0;
@@ -381,10 +381,10 @@ Common::Error LoLEngine::init() {
_screen->setAnimBlockPtr(10000);
_screen->setScreenDim(0);
- _pageBuffer1 = new uint8[0xfa00];
- memset(_pageBuffer1, 0, 0xfa00);
- _pageBuffer2 = new uint8[0xfa00];
- memset(_pageBuffer2, 0, 0xfa00);
+ _pageBuffer1 = new uint8[0xFA00];
+ memset(_pageBuffer1, 0, 0xFA00);
+ _pageBuffer2 = new uint8[0xFA00];
+ memset(_pageBuffer2, 0, 0xFA00);
_itemsInPlay = new LoLItem[400];
memset(_itemsInPlay, 0, sizeof(LoLItem) * 400);
@@ -524,7 +524,7 @@ Common::Error LoLEngine::go() {
// the prologue code we need to setup them manually here.
if (_gameToLoad != -1 && action != 3) {
preInit();
- _screen->setFont(_flags.use16ColorMode ? Screen::FID_SJIS_FNT : Screen::FID_9_FNT);
+ _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_FNT : Screen::FID_9_FNT);
}
// We have three sound.dat files, one for the intro, one for the
@@ -674,7 +674,7 @@ void LoLEngine::checkFloatingPointerRegions() {
uint8 *LoLEngine::getItemIconShapePtr(int index) {
int ix = _itemProperties[_itemsInPlay[index].itemPropertyIndex].shpIndex;
if (_itemProperties[_itemsInPlay[index].itemPropertyIndex].flags & 0x200)
- ix += (_itemsInPlay[index].shpCurFrame_flg & 0x1fff) - 1;
+ ix += (_itemsInPlay[index].shpCurFrame_flg & 0x1FFF) - 1;
return _itemIconShapes[ix];
}
@@ -683,14 +683,14 @@ int LoLEngine::mainMenu() {
bool hasSave = saveFileLoadable(0);
MainMenu::StaticData data[] = {
- // 256 color mode
+ // 256 color ASCII mode
{
{ 0, 0, 0, 0, 0 },
{ 0x01, 0x04, 0x0C, 0x04, 0x00, 0x3D, 0x9F },
{ 0x2C, 0x19, 0x48, 0x2C },
Screen::FID_9_FNT, 1
},
- // 16 color mode
+ // 16 color SJIS mode
{
{ 0, 0, 0, 0, 0 },
{ 0x01, 0x04, 0x0C, 0x04, 0x00, 0xC1, 0xE1 },
@@ -933,7 +933,7 @@ void LoLEngine::writeSettings() {
case 0:
default:
- if (_flags.platform == Common::kPlatformPC98)
+ if (_flags.platform == Common::kPlatformPC98 || _flags.platform == Common::kPlatformFMTowns)
_flags.lang = Common::JA_JPN;
else
_flags.lang = Common::EN_ANY;
@@ -1029,7 +1029,7 @@ void LoLEngine::decodeSjis(const char *src, char *dst) {
uint8 cmd = 0;
while ((cmd = *src++) != 0) {
if (cmd == 27) {
- cmd = *src++ & 0x7f;
+ cmd = *src++ & 0x7F;
memcpy(dst, src, cmd * 2);
dst += cmd * 2;
src += cmd * 2;
@@ -1341,7 +1341,7 @@ int LoLEngine::calculateProtection(int index) {
int c = 0;
if (index & 0x8000) {
// Monster
- index &= 0x7fff;
+ index &= 0x7FFF;
c = (_monsters[index].properties->itemProtection * _monsters[index].properties->fightingStats[2]) >> 8;
} else {
// Character
@@ -1490,7 +1490,7 @@ void LoLEngine::increaseCharacterHitpoints(int charNum, int points, bool ignoreD
points = 1;
_characters[charNum].hitPointsCur = CLIP<int16>(_characters[charNum].hitPointsCur + points, 1, _characters[charNum].hitPointsMax);
- _characters[charNum].flags &= 0xfff7;
+ _characters[charNum].flags &= 0xFFF7;
}
void LoLEngine::setupScreenDims() {
@@ -1561,10 +1561,10 @@ void LoLEngine::gui_specialSceneSuspendControls(int controlMode) {
void LoLEngine::gui_specialSceneRestoreControls(int restoreLamp) {
if (restoreLamp) {
- _updateFlags &= 0xfffa;
+ _updateFlags &= 0xFFFA;
resetLampStatus();
}
- _updateFlags &= 0xfffe;
+ _updateFlags &= 0xFFFE;
_specialSceneFlag = 0;
checkFloatingPointerRegions();
}
@@ -1572,7 +1572,7 @@ void LoLEngine::gui_specialSceneRestoreControls(int restoreLamp) {
void LoLEngine::restoreAfterSceneWindowDialogue(int redraw) {
gui_enableControls();
_txt->setupField(false);
- _updateFlags &= 0xffdf;
+ _updateFlags &= 0xFFDF;
setDefaultButtonState();
@@ -1601,8 +1601,8 @@ void LoLEngine::initDialogueSequence(int controlMode, int pageNum) {
if (_flags.use16ColorMode) {
_screen->fillRect(0, 128, 319, 199, 0x44);
- gui_drawBox(0, 129, 320, 71, 0xee, 0xcc, -1);
- gui_drawBox(1, 130, 318, 69, 0xee, 0xcc, 0x11);
+ gui_drawBox(0, 129, 320, 71, 0xEE, 0xCC, -1);
+ gui_drawBox(1, 130, 318, 69, 0xEE, 0xCC, 0x11);
} else {
_screen->fillRect(0, 128, 319, 199, 1);
gui_drawBox(0, 129, 320, 71, 136, 251, -1);
@@ -1651,7 +1651,7 @@ void LoLEngine::restoreAfterDialogueSequence(int controlMode) {
if (_currentControlMode) {
_screen->modifyScreenDim(4, 11, 124, 28, 45);
_screen->modifyScreenDim(5, 85, 123, 233, 54);
- _updateFlags &= 0xfffd;
+ _updateFlags &= 0xFFFD;
} else {
const ScreenDim *d = _screen->getScreenDim(5);
_screen->fillRect(d->sx, d->sy, d->sx + d->w - (_flags.use16ColorMode ? 3 : 2), d->sy + d->h - 2, d->unkA);
@@ -1714,14 +1714,14 @@ void LoLEngine::generateBrightnessPalette(const Palette &src, Palette &dst, int
brightness = (8 - brightness) << 5;
if (modifier >= 0 && modifier < 8 && (_flagsTable[31] & 0x08)) {
- brightness = 256 - ((((modifier & 0xfffe) << 5) * (256 - brightness)) >> 8);
+ brightness = 256 - ((((modifier & 0xFFFE) << 5) * (256 - brightness)) >> 8);
if (brightness < 0)
brightness = 0;
}
for (int i = 0; i < 384; i++) {
uint16 c = (dst[i] * brightness) >> 8;
- dst[i] = c & 0xff;
+ dst[i] = c & 0xFF;
}
}
}
@@ -1731,9 +1731,9 @@ void LoLEngine::generateFlashPalette(const Palette &src, Palette &dst, int color
for (int i = 2; i < 128; i++) {
for (int ii = 0; ii < 3; ii++) {
- uint8 t = src[i * 3 + ii] & 0x3f;
+ uint8 t = src[i * 3 + ii] & 0x3F;
if (colorFlags & (1 << ii))
- t += ((0x3f - t) >> 1);
+ t += ((0x3F - t) >> 1);
else
t -= (t >> 1);
dst[i * 3 + ii] = t;
@@ -1755,7 +1755,7 @@ void LoLEngine::createTransparencyTables() {
0x88, 0x00, 0x99, 0x00, 0xAA, 0x00, 0xBB, 0x00, 0xCC, 0x00, 0xDD, 0x00, 0xEE, 0x00, 0xFF, 0x00
};
- memset(tpal, 0xff, 768);
+ memset(tpal, 0xFF, 768);
_res->loadFileToBuf("LOL.NOL", tpal, 48);
for (int i = 15; i > -1; i--) {
@@ -1763,7 +1763,7 @@ void LoLEngine::createTransparencyTables() {
tpal[s] = tpal[i * 3];
tpal[s + 1] = tpal[i * 3 + 1];
tpal[s + 2] = tpal[i * 3 + 2];
- tpal[i * 3 + 2] = tpal[i * 3 + 1] = tpal[i * 3] = 0xff;
+ tpal[i * 3 + 2] = tpal[i * 3 + 1] = tpal[i * 3] = 0xFF;
}
_screen->createTransparencyTablesIntern(colTbl, 16, tpal, tpal, _transparencyTable1, _transparencyTable2, 80);
@@ -1953,15 +1953,15 @@ void LoLEngine::giveItemToMonster(LoLMonster *monster, Item item) {
}
const uint16 *LoLEngine::getCharacterOrMonsterStats(int id) {
- return (id & 0x8000) ? (const uint16 *)_monsters[id & 0x7fff].properties->fightingStats : _characters[id].defaultModifiers;
+ return (id & 0x8000) ? (const uint16 *)_monsters[id & 0x7FFF].properties->fightingStats : _characters[id].defaultModifiers;
}
uint16 *LoLEngine::getCharacterOrMonsterItemsMight(int id) {
- return (id & 0x8000) ? _monsters[id & 0x7fff].properties->itemsMight : _characters[id].itemsMight;
+ return (id & 0x8000) ? _monsters[id & 0x7FFF].properties->itemsMight : _characters[id].itemsMight;
}
uint16 *LoLEngine::getCharacterOrMonsterProtectionAgainstItems(int id) {
- return (id & 0x8000) ? _monsters[id & 0x7fff].properties->protectionAgainstItems : _characters[id].protectionAgainstItems;
+ return (id & 0x8000) ? _monsters[id & 0x7FFF].properties->protectionAgainstItems : _characters[id].protectionAgainstItems;
}
void LoLEngine::delay(uint32 millis, bool doUpdate, bool) {
@@ -2098,7 +2098,7 @@ int LoLEngine::processMagicSpark(int charNum, int spellLevel) {
uint16 target = getNearestMonsterFromCharacterForBlock(targetBlock, charNum);
static const uint8 dmg[] = { 7, 15, 25, 60 };
- if (target != 0xffff) {
+ if (target != 0xFFFF) {
inflictMagicalDamage(target, charNum, dmg[spellLevel], 5, 0);
updateDrawPage2();
gui_drawScene(0);
@@ -2116,8 +2116,8 @@ int LoLEngine::processMagicSpark(int charNum, int spellLevel) {
const uint16 height = mov->height();
for (int i = 0; i < 6; i++) {
- wX[i] = (_rnd.getRandomNumber(0x7fff) % 64) + ((176 - width) >> 1) + 80;
- wY[i] = (_rnd.getRandomNumber(0x7fff) % 32) + ((120 - height) >> 1) - 16;
+ wX[i] = (_rnd.getRandomNumber(0x7FFF) % 64) + ((176 - width) >> 1) + 80;
+ wY[i] = (_rnd.getRandomNumber(0x7FFF) % 32) + ((120 - height) >> 1) - 16;
wFrames[i] = i << 1;
}
@@ -2167,7 +2167,7 @@ int LoLEngine::processMagicHeal(int charNum, int spellLevel) {
tpal.copy(_screen->getPalette(1));
if (_flags.use16ColorMode) {
- tpal.fill(16, 240, 0xff);
+ tpal.fill(16, 240, 0xFF);
uint8 *dst = tpal.getData();
for (int i = 1; i < 16; i++) {
int s = ((i << 4) | i) * 3;
@@ -2250,7 +2250,7 @@ int LoLEngine::processMagicHeal(int charNum, int spellLevel) {
_screen->copyRegion(charNum * 77, 32, pX[charNum], pY, 77, 44, 2, 2, Screen::CR_NO_P_CHECK);
- pts[charNum] &= 0xff;
+ pts[charNum] &= 0xFF;
pts[charNum] += ((diff[charNum] << 8) / 16);
increaseCharacterHitpoints(charNum, pts[charNum] / 256, true);
gui_drawCharPortraitWithStats(charNum);
@@ -2333,8 +2333,8 @@ int LoLEngine::processMagicIce(int charNum, int spellLevel) {
tpal[i * 3 + 1] = v;
tpal[i * 3 + 2] = v << 1;
- if (tpal[i * 3 + 2] > 0x3f)
- tpal[i * 3 + 2] = 0x3f;
+ if (tpal[i * 3 + 2] > 0x3F)
+ tpal[i * 3 + 2] = 0x3F;
}
}
@@ -2395,7 +2395,7 @@ int LoLEngine::processMagicIce(int charNum, int spellLevel) {
int might = rollDice(iceDamageMin[spellLevel], iceDamageMax[spellLevel]) + iceDamageAdd[spellLevel];
int dmg = calcInflictableDamagePerItem(charNum, 0, might, 3, 2);
- LoLMonster *m = &_monsters[o & 0x7fff];
+ LoLMonster *m = &_monsters[o & 0x7FFF];
if (m->hitPoints <= dmg) {
increaseExperience(charNum, 2, m->hitPoints);
o = m->nextAssignedObject;
@@ -2474,7 +2474,7 @@ int LoLEngine::processMagicFireball(int charNum, int spellLevel) {
while (o & 0x8000) {
static const uint8 fireballDamage[] = { 20, 40, 80, 100 };
int dmg = calcInflictableDamagePerItem(charNum, o, fireballDamage[spellLevel], 4, 1);
- LoLMonster *m = &_monsters[o & 0x7fff];
+ LoLMonster *m = &_monsters[o & 0x7FFF];
o = m->nextAssignedObject;
_envSfxUseQueue = true;
inflictDamage(m->id | 0x8000, dmg, charNum, 2, 4);
@@ -2524,8 +2524,8 @@ int LoLEngine::processMagicFireball(int charNum, int spellLevel) {
static const int8 finShpIndex2[] = { -1, 1, 2, 3, 4, -1 };
uint8 *shp = fb->finalize ? _fireballShapes[finShpIndex1[fb->finProgress]] : _fireballShapes[0];
- int fX = (((fb->progress * _fireBallCoords[fb->tblIndex & 0xff]) >> 16) + fb->destX) - ((fb->progress / 8 + shp[3] + fireBallWH) >> 1);
- int fY = (((fb->progress * _fireBallCoords[(fb->tblIndex + 64) & 0xff]) >> 16) + fb->destY) - ((fb->progress / 8 + shp[2] + fireBallWH) >> 1);
+ int fX = (((fb->progress * _fireBallCoords[fb->tblIndex & 0xFF]) >> 16) + fb->destX) - ((fb->progress / 8 + shp[3] + fireBallWH) >> 1);
+ int fY = (((fb->progress * _fireBallCoords[(fb->tblIndex + 64) & 0xFF]) >> 16) + fb->destY) - ((fb->progress / 8 + shp[2] + fireBallWH) >> 1);
int sW = ((fb->progress / 8 + shp[3] + fireBallWH) << 8) / shp[3];
int sH = ((fb->progress / 8 + shp[2] + fireBallWH) << 8) / shp[2];
@@ -2537,8 +2537,8 @@ int LoLEngine::processMagicFireball(int charNum, int spellLevel) {
if (finShpIndex2[fb->finProgress] != -1) {
shp = _fireballShapes[finShpIndex2[fb->finProgress]];
- fX = (((fb->progress * _fireBallCoords[fb->tblIndex & 0xff]) >> 16) + fb->destX) - ((fb->progress / 8 + shp[3] + fireBallWH) >> 1);
- fY = (((fb->progress * _fireBallCoords[(fb->tblIndex + 64) & 0xff]) >> 16) + fb->destY) - ((fb->progress / 8 + shp[2] + fireBallWH) >> 1);
+ fX = (((fb->progress * _fireBallCoords[fb->tblIndex & 0xFF]) >> 16) + fb->destX) - ((fb->progress / 8 + shp[3] + fireBallWH) >> 1);
+ fY = (((fb->progress * _fireBallCoords[(fb->tblIndex + 64) & 0xFF]) >> 16) + fb->destY) - ((fb->progress / 8 + shp[2] + fireBallWH) >> 1);
sW = ((fb->progress / 8 + shp[3] + fireBallWH) << 8) / shp[3];
sH = ((fb->progress / 8 + shp[2] + fireBallWH) << 8) / shp[2];
_screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 4, sW, sH);
@@ -2639,7 +2639,7 @@ int LoLEngine::processMagicHandOfFate(int spellLevel) {
uint16 o = _levelBlockProperties[b1].assignedObjects;
while (o & 0x8000) {
uint16 o2 = o;
- LoLMonster *m = &_monsters[o & 0x7fff];
+ LoLMonster *m = &_monsters[o & 0x7FFF];
o = findObject(o)->nextAssignedObject;
int nX = 0;
int nY = 0;
@@ -2667,7 +2667,7 @@ int LoLEngine::processMagicHandOfFate(int spellLevel) {
// This might be a bug in the original code, but using
// the hand of fate spell won't give any experience points
int dmg = calcInflictableDamagePerItem(-1, t, damage[spellLevel - 2], 0x80, 1);
- inflictDamage(t, dmg, 0xffff, 3, 0x80);
+ inflictDamage(t, dmg, 0xFFFF, 3, 0x80);
}
}
@@ -2783,7 +2783,7 @@ int LoLEngine::processMagicFog() {
uint16 o = _levelBlockProperties[calcNewBlockPosition(_currentBlock, _currentDirection)].assignedObjects;
while (o & 0x8000) {
inflictMagicalDamage(o, -1, 15, 6, 0);
- o = _monsters[o & 0x7fff].nextAssignedObject;
+ o = _monsters[o & 0x7FFF].nextAssignedObject;
}
gui_drawScene(0);
@@ -2808,7 +2808,7 @@ int LoLEngine::processMagicSwarm(int charNum, int damage) {
int t = 0;
uint16 o = _levelBlockProperties[calcNewBlockPosition(_currentBlock, _currentDirection)].assignedObjects;
while (o & 0x8000) {
- o &= 0x7fff;
+ o &= 0x7FFF;
if (_monsters[o].mode != 13) {
destIds[t++] = o;
@@ -2816,7 +2816,7 @@ int LoLEngine::processMagicSwarm(int charNum, int damage) {
_envSfxUseQueue = true;
inflictMagicalDamage(o | 0x8000, charNum, damage, 0, 0);
_envSfxUseQueue = false;
- _monsters[o].flags &= 0xffef;
+ _monsters[o].flags &= 0xFFEF;
}
}
o = _monsters[o].nextAssignedObject;
@@ -2908,9 +2908,9 @@ int LoLEngine::processMagicVaelansCube() {
uint16 o = _levelBlockProperties[bl].assignedObjects;
while (o & 0x8000) {
- LoLMonster *m = &_monsters[o & 0x7fff];
+ LoLMonster *m = &_monsters[o & 0x7FFF];
if (m->properties->flags & 0x1000) {
- inflictDamage(o, 100, 0xffff, 0, 0x80);
+ inflictDamage(o, 100, 0xFFFF, 0, 0x80);
res = 1;
}
o = m->nextAssignedObject;
@@ -3036,7 +3036,7 @@ void LoLEngine::drinkBezelCup(int numUses, int charNum) {
uint16 step = 0;
do {
- step = (step & 0xff) + (hpDiff * 256) / (bezelAnimData[numUses * 3 + 1]);
+ step = (step & 0xFF) + (hpDiff * 256) / (bezelAnimData[numUses * 3 + 1]);
increaseCharacterHitpoints(charNum, step / 256, true);
gui_drawCharPortraitWithStats(charNum);
@@ -3073,7 +3073,7 @@ void LoLEngine::addSpellToScroll(int spell, int charNum) {
}
if (_availableSpells[i] == spell) {
- _txt->printMessage(2, "%s", getLangString(0x42d0));
+ _txt->printMessage(2, "%s", getLangString(0x42D0));
return;
}
}
@@ -3101,7 +3101,7 @@ void LoLEngine::transferSpellToScollAnimation(int charNum, int spell, int slot)
_screen->copyRegion(201, 1, 17, 15, 6, h, 2, 2, Screen::CR_NO_P_CHECK);
_screen->copyRegion(208, 1, 89, 15, 6, h, 2, 2, Screen::CR_NO_P_CHECK);
int cp = _screen->setCurPage(2);
- _screen->fillRect(21, 15, 89, h + 15, _flags.use16ColorMode ? 0xbb : 206);
+ _screen->fillRect(21, 15, 89, h + 15, _flags.use16ColorMode ? 0xBB : 206);
_screen->copyRegion(112, 16, 12, h + 15, 87, 14, 2, 2, Screen::CR_NO_P_CHECK);
int y = 15;
@@ -3289,7 +3289,7 @@ int LoLEngine::checkMagic(int charNum, int spellNum, int spellLevel) {
}
int LoLEngine::getSpellTargetBlock(int currentBlock, int direction, int maxDistance, uint16 &targetBlock) {
- targetBlock = 0xffff;
+ targetBlock = 0xFFFF;
uint16 c = calcNewBlockPosition(currentBlock, direction);
int i = 0;
@@ -3321,9 +3321,9 @@ void LoLEngine::inflictMagicalDamageForBlock(int block, int attacker, int damage
uint16 o = _levelBlockProperties[block].assignedObjects;
while (o & 0x8000) {
inflictDamage(o, calcInflictableDamagePerItem(attacker, o, damage, index, 2), attacker, 2, index);
- if ((_monsters[o & 0x7fff].flags & 0x20) && (_currentLevel != 22))
+ if ((_monsters[o & 0x7FFF].flags & 0x20) && (_currentLevel != 22))
break;
- o = _monsters[o & 0x7fff].nextAssignedObject;
+ o = _monsters[o & 0x7FFF].nextAssignedObject;
}
}
@@ -3336,7 +3336,7 @@ int LoLEngine::battleHitSkillTest(int16 attacker, int16 target, int skill) {
return 1;
if (target & 0x8000) {
- if (_monsters[target & 0x7fff].mode >= 13)
+ if (_monsters[target & 0x7FFF].mode >= 13)
return 0;
}
@@ -3345,8 +3345,8 @@ int LoLEngine::battleHitSkillTest(int16 attacker, int16 target, int skill) {
int sk = 0;
if (attacker & 0x8000) {
- hitChanceModifier = _monsters[target & 0x7fff].properties->fightingStats[0];
- sk = 100 - _monsters[target & 0x7fff].properties->skillLevel;
+ hitChanceModifier = _monsters[target & 0x7FFF].properties->fightingStats[0];
+ sk = 100 - _monsters[target & 0x7FFF].properties->skillLevel;
} else {
hitChanceModifier = _characters[attacker].defaultModifiers[0];
int8 m = _characters[attacker].skillModifiers[skill];
@@ -3356,8 +3356,10 @@ int LoLEngine::battleHitSkillTest(int16 attacker, int16 target, int skill) {
}
if (target & 0x8000) {
- evadeChanceModifier = (_monsterModifiers[9 + _monsterDifficulty] * _monsters[target & 0x7fff].properties->fightingStats[3]) >> 8;
- _monsters[target & 0x7fff].flags |= 0x10;
+ evadeChanceModifier = _monsters[target & 0x7FFF].properties->fightingStats[3];
+ if (_monsterModifiers4)
+ evadeChanceModifier = (evadeChanceModifier * _monsterModifiers4[_monsterDifficulty]) >> 8;
+ _monsters[target & 0x7FFF].flags |= 0x10;
} else {
evadeChanceModifier = _characters[target].defaultModifiers[3];
}
@@ -3392,7 +3394,7 @@ int LoLEngine::inflictDamage(uint16 target, int damage, uint16 attacker, int ski
LoLCharacter *c = 0;
if (target & 0x8000) {
- m = &_monsters[target & 0x7fff];
+ m = &_monsters[target & 0x7FFF];
if (m->mode >= 13)
return 0;
@@ -3482,7 +3484,7 @@ void LoLEngine::removeCharacterEffects(LoLCharacter *c, int first, int last) {
for (int i = first; i <= last; i++) {
switch (i - 1) {
case 0:
- c->flags &= 0xfffb;
+ c->flags &= 0xFFFB;
c->weaponHit = 0;
break;
@@ -3491,19 +3493,19 @@ void LoLEngine::removeCharacterEffects(LoLCharacter *c, int first, int last) {
break;
case 2:
- c->flags &= 0xffbf;
+ c->flags &= 0xFFBF;
break;
case 3:
- c->flags &= 0xff7f;
+ c->flags &= 0xFF7F;
break;
case 4:
- c->flags &= 0xfeff;
+ c->flags &= 0xFEFF;
break;
case 6:
- c->flags &= 0xefff;
+ c->flags &= 0xEFFF;
break;
default:
@@ -3557,7 +3559,7 @@ int LoLEngine::calcInflictableDamagePerItem(int16 attacker, int16 target, uint16
void LoLEngine::checkForPartyDeath() {
Button b;
- b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xfe;
+ b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xFE;
b.data0Val3 = b.data1Val3 = b.data2Val3 = 0x01;
for (int i = 0; i < 4; i++) {
@@ -3596,7 +3598,7 @@ void LoLEngine::checkForPartyDeath() {
_gui->runMenu(_gui->_deathMenu);
setMouseCursorToItemInHand();
- _updateFlags &= 0xfffb;
+ _updateFlags &= 0xFFFB;
resetLampStatus();
gui_enableDefaultPlayfieldButtons();
@@ -3613,7 +3615,7 @@ void LoLEngine::applyMonsterAttackSkill(LoLMonster *monster, int16 target, int16
switch (monster->properties->attackSkillType - 1) {
case 0:
- t = removeCharacterItem(target, 0x7ff);
+ t = removeCharacterItem(target, 0x7FF);
if (t) {
giveItemToMonster(monster, t);
if (characterSays(0x4019, _characters[target].id, true))
@@ -3630,16 +3632,16 @@ void LoLEngine::applyMonsterAttackSkill(LoLMonster *monster, int16 target, int16
t = removeCharacterItem(target, 0x20);
if (t) {
deleteItem(t);
- if (characterSays(0x401b, _characters[target].id, true))
- _txt->printMessage(6, "%s", getLangString(0x401b));
+ if (characterSays(0x401B, _characters[target].id, true))
+ _txt->printMessage(6, "%s", getLangString(0x401B));
}
break;
case 3:
- t = removeCharacterItem(target, 0x0f);
+ t = removeCharacterItem(target, 0x0F);
if (t) {
- if (characterSays(0x401e, _characters[target].id, true))
- _txt->printMessage(6, getLangString(0x401e), _characters[target].name);
+ if (characterSays(0x401E, _characters[target].id, true))
+ _txt->printMessage(6, getLangString(0x401E), _characters[target].name);
setItemPosition(t, monster->x, monster->y, 0, 1);
}
break;
@@ -3684,27 +3686,27 @@ void LoLEngine::applyMonsterDefenseSkill(LoLMonster *monster, int16 attacker, in
switch (monster->properties->defenseSkillType - 1) {
case 0:
case 1:
- if ((flags & 0x3f) == 2 || skill)
+ if ((flags & 0x3F) == 2 || skill)
return;
for (int i = 0; i < 3; i++) {
itm = _characters[attacker].items[i];
if (!itm)
continue;
- if ((_itemProperties[_itemsInPlay[itm].itemPropertyIndex].protection & 0x3f) != flags)
+ if ((_itemProperties[_itemsInPlay[itm].itemPropertyIndex].protection & 0x3F) != flags)
continue;
- removeCharacterItem(attacker, 0x7fff);
+ removeCharacterItem(attacker, 0x7FFF);
if (monster->properties->defenseSkillType == 1) {
giveItemToMonster(monster, itm);
- if (characterSays(0x401c, _characters[attacker].id, true))
- _txt->printMessage(6, "%s", getLangString(0x401c));
+ if (characterSays(0x401C, _characters[attacker].id, true))
+ _txt->printMessage(6, "%s", getLangString(0x401C));
} else {
deleteItem(itm);
- if (characterSays(0x401d, _characters[attacker].id, true))
- _txt->printMessage(6, "%s", getLangString(0x401d));
+ if (characterSays(0x401D, _characters[attacker].id, true))
+ _txt->printMessage(6, "%s", getLangString(0x401D));
}
}
break;
@@ -3895,7 +3897,7 @@ void LoLEngine::launchMagicViper() {
void LoLEngine::breakIceWall(uint8 *pal1, uint8 *pal2) {
_screen->hideMouse();
uint16 bl = calcNewBlockPosition(_currentBlock, _currentDirection);
- _levelBlockProperties[bl].flags &= 0xef;
+ _levelBlockProperties[bl].flags &= 0xEF;
_screen->copyPage(0, 2);
gui_drawScene(2);
_screen->copyPage(2, 10);
@@ -3923,10 +3925,10 @@ uint16 LoLEngine::getNearestMonsterFromCharacterForBlock(uint16 block, int charN
uint16 cX = 0;
uint16 cY = 0;
- uint16 id = 0xffff;
- int minDist = 0x7fff;
+ uint16 id = 0xFFFF;
+ int minDist = 0x7FFF;
- if (block == 0xffff)
+ if (block == 0xFFFF)
return id;
calcCoordinatesForSingleCharacter(charNum, cX, cY);
@@ -3934,7 +3936,7 @@ uint16 LoLEngine::getNearestMonsterFromCharacterForBlock(uint16 block, int charN
int o = _levelBlockProperties[block].assignedObjects;
while (o & 0x8000) {
- LoLMonster *m = &_monsters[o & 0x7fff];
+ LoLMonster *m = &_monsters[o & 0x7FFF];
if (m->mode >= 13) {
o = m->nextAssignedObject;
continue;
@@ -3953,8 +3955,8 @@ uint16 LoLEngine::getNearestMonsterFromCharacterForBlock(uint16 block, int charN
}
uint16 LoLEngine::getNearestMonsterFromPos(int x, int y) {
- uint16 id = 0xffff;
- int minDist = 0x7fff;
+ uint16 id = 0xFFFF;
+ int minDist = 0x7FFF;
for (int i = 0; i < 30; i++) {
if (_monsters[i].mode > 13)
@@ -3971,8 +3973,8 @@ uint16 LoLEngine::getNearestMonsterFromPos(int x, int y) {
}
uint16 LoLEngine::getNearestPartyMemberFromPos(int x, int y) {
- uint16 id = 0xffff;
- int minDist = 0x7fff;
+ uint16 id = 0xFFFF;
+ int minDist = 0x7FFF;
for (int i = 0; i < 4; i++) {
if (!(_characters[i].flags & 1) || _characters[i].hitPointsCur <= 0)
@@ -4054,7 +4056,7 @@ void LoLEngine::displayAutomap() {
delayTimer = _system->getMillis() + 8 * _tickLength;
}
- int f = checkInput(0) & 0xff;
+ int f = checkInput(0) & 0xFF;
removeInputTop();
if (f) {
@@ -4062,7 +4064,7 @@ void LoLEngine::displayAutomap() {
gui_notifyButtonListChanged();
}
- if (f == 0x30) {
+ if (f == _keyMap[Common::KEYCODE_c]) {
for (int i = 0; i < 1024; i++)
_levelBlockProperties[i].flags |= 7;
_mapUpdateNeeded = true;
@@ -4094,7 +4096,7 @@ void LoLEngine::updateAutoMap(uint16 block) {
return;
_levelBlockProperties[block].flags |= 7;
- uint16 x = block & 0x1f;
+ uint16 x = block & 0x1F;
uint16 y = block >> 5;
updateAutoMapIntern(block, x, y, -1, -1);
@@ -4112,7 +4114,7 @@ bool LoLEngine::updateAutoMapIntern(uint16 block, uint16 x, uint16 y, int16 xOff
x += xOffs;
y += yOffs;
- if ((x & 0xffe0) || (y & 0xffe0))
+ if ((x & 0xFFE0) || (y & 0xFFE0))
return false;
xOffs++;
@@ -4122,7 +4124,7 @@ bool LoLEngine::updateAutoMapIntern(uint16 block, uint16 x, uint16 y, int16 xOff
uint16 b = block + blockPosTable[6 + xOffs];
if (fx != -1) {
- if (_wllAutomapData[_levelBlockProperties[b].walls[fx]] & 0xc0)
+ if (_wllAutomapData[_levelBlockProperties[b].walls[fx]] & 0xC0)
return false;
}
@@ -4130,13 +4132,13 @@ bool LoLEngine::updateAutoMapIntern(uint16 block, uint16 x, uint16 y, int16 xOff
b = block + blockPosTable[9 + yOffs];
if (fy != -1) {
- if (_wllAutomapData[_levelBlockProperties[b].walls[fy]] & 0xc0)
+ if (_wllAutomapData[_levelBlockProperties[b].walls[fy]] & 0xC0)
return false;
}
b = block + blockPosTable[6 + xOffs] + blockPosTable[9 + yOffs];
- if ((fx != -1) && (fy != -1) && (_wllAutomapData[_levelBlockProperties[b].walls[fx]] & 0xc0) && (_wllAutomapData[_levelBlockProperties[b].walls[fy]] & 0xc0))
+ if ((fx != -1) && (fy != -1) && (_wllAutomapData[_levelBlockProperties[b].walls[fx]] & 0xC0) && (_wllAutomapData[_levelBlockProperties[b].walls[fy]] & 0xC0))
return false;
_levelBlockProperties[b].flags |= 7;
@@ -4147,8 +4149,8 @@ bool LoLEngine::updateAutoMapIntern(uint16 block, uint16 x, uint16 y, int16 xOff
void LoLEngine::loadMapLegendData(int level) {
uint16 *legendData = (uint16 *)_tempBuffer5120;
for (int i = 0; i < 32; i++) {
- legendData[i * 6] = 0xffff;
- legendData[i * 6 + 5] = 0xffff;
+ legendData[i * 6] = 0xFFFF;
+ legendData[i * 6 + 5] = 0xFFFF;
}
Common::String file = Common::String::format("level%d.xxx", level);
@@ -4189,7 +4191,7 @@ void LoLEngine::drawMapPage(int pageNum) {
_screen->copyRegion(236, 16, 236 + xOffset, 16, -xOffset, 1, pageNum, pageNum, Screen::CR_NO_P_CHECK);
int cp = _screen->setCurPage(pageNum);
- Screen::FontId of = _screen->setFont(_flags.use16ColorMode ? Screen::FID_SJIS_FNT : Screen::FID_9_FNT);
+ Screen::FontId of = _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_FNT : Screen::FID_9_FNT);
_screen->printText(getLangString(_autoMapStrings[_currentMapLevel]), 236 + xOffset, 8, 1, 0);
uint16 blX = mapGetStartPosX();
uint16 bl = (mapGetStartPosY() << 5) + blX;
@@ -4199,7 +4201,7 @@ void LoLEngine::drawMapPage(int pageNum) {
for (; bl < 1024; bl++) {
uint8 *w = _levelBlockProperties[bl].walls;
- if ((_levelBlockProperties[bl].flags & 7) == 7 && (!(_wllAutomapData[w[0]] & 0xc0)) && (!(_wllAutomapData[w[2]] & 0xc0)) && (!(_wllAutomapData[w[1]] & 0xc0)) && (!(_wllAutomapData[w[3]] & 0xc0))) {
+ if ((_levelBlockProperties[bl].flags & 7) == 7 && (!(_wllAutomapData[w[0]] & 0xC0)) && (!(_wllAutomapData[w[2]] & 0xC0)) && (!(_wllAutomapData[w[1]] & 0xC0)) && (!(_wllAutomapData[w[3]] & 0xC0))) {
uint16 b0 = calcNewBlockPosition(bl, 0);
uint16 b2 = calcNewBlockPosition(bl, 2);
uint16 b1 = calcNewBlockPosition(bl, 1);
@@ -4216,25 +4218,25 @@ void LoLEngine::drawMapPage(int pageNum) {
// draw north wall
drawMapBlockWall(b3, w31, sx, sy, 3);
drawMapShape(w31, sx, sy, 3);
- if (_wllAutomapData[w31] & 0xc0)
+ if (_wllAutomapData[w31] & 0xC0)
_screen->copyBlockAndApplyOverlay(_screen->_curPage, sx, sy, _screen->_curPage, sx, sy, 1, 6, 0, _mapOverlay);
// draw west wall
drawMapBlockWall(b1, w13, sx, sy, 1);
drawMapShape(w13, sx, sy, 1);
- if (_wllAutomapData[w13] & 0xc0)
+ if (_wllAutomapData[w13] & 0xC0)
_screen->copyBlockAndApplyOverlay(_screen->_curPage, sx + 6, sy, _screen->_curPage, sx + 6, sy, 1, 6, 0, _mapOverlay);
// draw east wall
drawMapBlockWall(b0, w02, sx, sy, 0);
drawMapShape(w02, sx, sy, 0);
- if (_wllAutomapData[w02] & 0xc0)
+ if (_wllAutomapData[w02] & 0xC0)
_screen->copyBlockAndApplyOverlay(_screen->_curPage, sx, sy, _screen->_curPage, sx, sy, 7, 1, 0, _mapOverlay);
//draw south wall
drawMapBlockWall(b2, w20, sx, sy, 2);
drawMapShape(w20, sx, sy, 2);
- if (_wllAutomapData[w20] & 0xc0)
+ if (_wllAutomapData[w20] & 0xC0)
_screen->copyBlockAndApplyOverlay(_screen->_curPage, sx, sy + 5, _screen->_curPage, sx, sy + 5, 7, 1, 0, _mapOverlay);
}
@@ -4249,7 +4251,7 @@ void LoLEngine::drawMapPage(int pageNum) {
_screen->setFont(of);
_screen->setCurPage(cp);
- of = _screen->setFont(_flags.use16ColorMode ? Screen::FID_SJIS_FNT : Screen::FID_6_FNT);
+ of = _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_FNT : Screen::FID_6_FNT);
int tY = 0;
sx = mapGetStartPosX();
@@ -4260,19 +4262,19 @@ void LoLEngine::drawMapPage(int pageNum) {
for (int ii = 0; ii < 32; ii++) {
uint16 *l = &legendData[ii * 6];
- if (l[0] == 0xffff)
+ if (l[0] == 0xFFFF)
break;
uint16 cbl = l[0] + (l[1] << 5);
if ((_levelBlockProperties[cbl].flags & 7) != 7)
continue;
- if (l[2] == 0xffff)
+ if (l[2] == 0xFFFF)
continue;
printMapText(l[2], 244 + xOffset, (tY << 3) + 22 + yOffset);
- if (l[5] == 0xffff) {
+ if (l[5] == 0xFFFF) {
tY++;
continue;
}
@@ -4343,7 +4345,7 @@ bool LoLEngine::automapProcessButtons(int inputFlag) {
void LoLEngine::automapForwardButton() {
int i = _currentMapLevel + 1;
while (!(_hasTempDataFlags & (1 << (i - 1))))
- i = (i + 1) & 0x1f;
+ i = (i + 1) & 0x1F;
if (i == _currentMapLevel)
return;
@@ -4360,7 +4362,7 @@ void LoLEngine::automapForwardButton() {
void LoLEngine::automapBackButton() {
int i = _currentMapLevel - 1;
while (!(_hasTempDataFlags & (1 << (i - 1))))
- i = (i - 1) & 0x1f;
+ i = (i - 1) & 0x1F;
if (i == _currentMapLevel)
return;
@@ -4401,7 +4403,7 @@ void LoLEngine::redrawMapCursor() {
}
void LoLEngine::drawMapBlockWall(uint16 block, uint8 wall, int x, int y, int direction) {
- if (((1 << direction) & _levelBlockProperties[block].flags) || ((_wllAutomapData[wall] & 0x1f) != 13))
+ if (((1 << direction) & _levelBlockProperties[block].flags) || ((_wllAutomapData[wall] & 0x1F) != 13))
return;
int cp = _screen->_curPage;
@@ -4411,8 +4413,8 @@ void LoLEngine::drawMapBlockWall(uint16 block, uint8 wall, int x, int y, int dir
}
void LoLEngine::drawMapShape(uint8 wall, int x, int y, int direction) {
- int l = _wllAutomapData[wall] & 0x1f;
- if (l == 0x1f)
+ int l = _wllAutomapData[wall] & 0x1F;
+ if (l == 0x1F)
return;
_screen->drawShape(_screen->_curPage, _automapShapes[(l << 2) + direction], x + _mapCoords[10][direction] - 2, y + _mapCoords[11][direction] - 2, 0, 0);
@@ -4478,7 +4480,7 @@ int LoLEngine::mapGetStartPosY() {
}
void LoLEngine::mapIncludeLegendData(int type) {
- type &= 0x7f;
+ type &= 0x7F;
for (int i = 0; i < 11; i++) {
if (_defaultLegendData[i].shapeIndex != type)
continue;
@@ -4499,7 +4501,7 @@ void LoLEngine::printMapText(uint16 stringId, int x, int y) {
void LoLEngine::printMapExitButtonText() {
int cp = _screen->setCurPage(2);
Screen::FontId of = _screen->setFont(Screen::FID_9_FNT);
- _screen->fprintString("%s", 295, 182, _flags.use16ColorMode ? 0xbb : 172, 0, 5, getLangString(0x4033));
+ _screen->fprintString("%s", 295, 182, _flags.use16ColorMode ? 0xBB : 172, 0, 5, getLangString(0x4033));
_screen->setFont(of);
_screen->setCurPage(cp);
}
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index d8df6b6703..4002346d31 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -336,9 +336,9 @@ private:
static const char *const _charPreviewNamesDefault[];
static const char *const _charPreviewNamesRussianFloppy[];
- // PC98 specific data
+ // PC98/FM-TOWNS specific data
static const uint16 _charPosXPC98[];
- static const uint8 _charNamesPC98[][11];
+ static const char *const _charNamesJapanese[];
WSAMovie_v2 *_chargenWSA;
static const uint8 _chargenFrameTableTalkie[];
@@ -558,14 +558,14 @@ private:
int clickedStatusIcon(Button *button);
const LoLButtonDef *_buttonData;
- const int16 *_buttonList1;
- const int16 *_buttonList2;
- const int16 *_buttonList3;
- const int16 *_buttonList4;
- const int16 *_buttonList5;
- const int16 *_buttonList6;
- const int16 *_buttonList7;
- const int16 *_buttonList8;
+ const uint8 *_buttonList1;
+ const uint8 *_buttonList2;
+ const uint8 *_buttonList3;
+ const uint8 *_buttonList4;
+ const uint8 *_buttonList5;
+ const uint8 *_buttonList6;
+ const uint8 *_buttonList7;
+ const uint8 *_buttonList8;
// text
int characterSays(int track, int charId, bool redraw);
@@ -1137,7 +1137,11 @@ private:
uint16 _monsterCurBlock;
int _objectLastDirection;
- const uint16 *_monsterModifiers;
+ const uint16 *_monsterModifiers1;
+ const uint16 *_monsterModifiers2;
+ const uint16 *_monsterModifiers3;
+ const uint16 *_monsterModifiers4;
+
const int8 *_monsterShiftOffs;
const uint8 *_monsterDirFlags;
const uint8 *_monsterScaleX;
diff --git a/engines/kyra/magic_eob.cpp b/engines/kyra/magic_eob.cpp
index b5f2a4e803..2180c5359d 100644
--- a/engines/kyra/magic_eob.cpp
+++ b/engines/kyra/magic_eob.cpp
@@ -308,7 +308,7 @@ void EoBCoreEngine::startSpell(int spell) {
EoBCharacter *c = &_characters[_activeSpellCharId];
snd_playSoundEffect(s->sound);
- if (s->flags & 0xa0)
+ if (s->flags & 0xA0)
sparkEffectDefensive(_activeSpellCharId);
else if (s->flags & 0x40)
sparkEffectDefensive(-1);
@@ -623,7 +623,7 @@ bool EoBCoreEngine::turnUndeadHit(EoBMonsterInPlay *m, int hitChance, int caster
assert(_monsterProps[m->type].tuResist > 0);
uint8 e = _turnUndeadEffect[_monsterProps[m->type].tuResist * 14 + MIN(casterLevel, 14)];
- if (e == 0xff) {
+ if (e == 0xFF) {
calcAndInflictMonsterDamage(m, 0, 0, 500, 0x200, 5, 3);
} else if (hitChance < e) {
return false;
@@ -711,7 +711,7 @@ Item EoBCoreEngine::createMagicWeaponItem(int flags, int icon, int value, int ty
void EoBCoreEngine::removeMagicWeaponItem(Item item) {
_itemTypes[_items[item].type].armorClass = -30;
_items[item].block = -2;
- _items[item].level = 0xff;
+ _items[item].level = 0xFF;
}
void EoBCoreEngine::updateWallOfForceTimers() {
@@ -841,7 +841,7 @@ bool EoBCoreEngine::spellCallback_end_magicMissile(void *obj) {
}
void EoBCoreEngine::spellCallback_start_shockingGrasp() {
- int t = createMagicWeaponType(0, 0, 0, 0x0f, 1, 8, getMageLevel(_openBookChar), 1);
+ int t = createMagicWeaponType(0, 0, 0, 0x0F, 1, 8, getMageLevel(_openBookChar), 1);
Item i = (t != -1) ? createMagicWeaponItem(0x10, 82, 0, t) : -1;
if (t == -1 || i == -1) {
if (_flags.gameID == GI_EOB2)
@@ -948,7 +948,7 @@ bool EoBCoreEngine::spellCallback_end_lightningBolt(void *obj) {
}
void EoBCoreEngine::spellCallback_start_vampiricTouch() {
- int t = createMagicWeaponType(0, 0, 0, 0x0f, getMageLevel(_openBookChar) >> 1, 6, 0, 1);
+ int t = createMagicWeaponType(0, 0, 0, 0x0F, getMageLevel(_openBookChar) >> 1, 6, 0, 1);
Item i = (t != -1) ? createMagicWeaponItem(0x18, 83, 0, t) : -1;
if (t == -1 || i == -1) {
if (_flags.gameID == GI_EOB2)
@@ -989,7 +989,7 @@ bool EoBCoreEngine::spellCallback_end_iceStorm(void *obj) {
if (res) {
for (int i = 0; i < 4; i++) {
uint16 bl = fo->curBlock;
- fo->curBlock = (fo->curBlock + blockAdv[i]) & 0x3ff;
+ fo->curBlock = (fo->curBlock + blockAdv[i]) & 0x3FF;
magicObjectDamageHit(fo, 1, 6, 0, getMageLevel(fo->attackerId));
fo->curBlock = bl;
}
@@ -1027,7 +1027,7 @@ void EoBCoreEngine::spellCallback_start_coneOfCold() {
_preventMonsterFlash = true;
for (int i = 0; i < 7; i++) {
- for (const int16 *m = findBlockMonsters((_currentBlock + tbl[i]) & 0x3ff, 4, _currentDirection, 1, 1); *m != -1; m++)
+ for (const int16 *m = findBlockMonsters((_currentBlock + tbl[i]) & 0x3FF, 4, _currentDirection, 1, 1); *m != -1; m++)
calcAndInflictMonsterDamage(&_monsters[*m], cl, 4, cl, 0x41, 5, 0);
}
@@ -1054,7 +1054,7 @@ void EoBCoreEngine::spellCallback_start_wallOfForce() {
return;
}
- uint32 dur = 0xffffffff;
+ uint32 dur = 0xFFFFFFFF;
int s = 0;
int i = 0;
@@ -1158,7 +1158,7 @@ bool EoBCoreEngine::spellCallback_end_aid(void *obj) {
}
void EoBCoreEngine::spellCallback_start_flameBlade() {
- int t = createMagicWeaponType(0, 0, 0, 0x0f, 1, 4, 4, 1);
+ int t = createMagicWeaponType(0, 0, 0, 0x0F, 1, 4, 4, 1);
Item i = (t != -1) ? createMagicWeaponItem(0, 84, 0, t) : -1;
if (t == -1 || i == -1) {
if (_flags.gameID == GI_EOB2)
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index adb3063344..c350c81742 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -185,7 +185,7 @@ bool Resource::loadFileList(const Common::String &filedata) {
// the demo version supplied with Kyra3 does not
// contain all pak files listed in filedata.fdt
// so we don't do anything here if they are non
- // existant.
+ // existent.
} else if (!loadPakFile(filename)) {
delete f;
error("couldn't load file '%s'", filename.c_str());
diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h
index 5364cce270..5c179a7864 100644
--- a/engines/kyra/resource.h
+++ b/engines/kyra/resource.h
@@ -679,7 +679,10 @@ enum KyraResources {
kLoLCharDefsKieran,
kLoLCharDefsAkshel,
kLoLExpRequirements,
- kLoLMonsterModifiers,
+ kLoLMonsterModifiers1,
+ kLoLMonsterModifiers2,
+ kLoLMonsterModifiers3,
+ kLoLMonsterModifiers4,
kLoLMonsterShiftOffsets,
kLoLMonsterDirFlags,
kLoLMonsterScaleY,
diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp
index 6f7591ccf1..4c413487ff 100644
--- a/engines/kyra/resource_intern.cpp
+++ b/engines/kyra/resource_intern.cpp
@@ -496,7 +496,7 @@ public:
void advSrcBitsBy1();
void advSrcBitsByIndex(uint8 newIndex);
- uint8 getKeyLower() const { return _key & 0xff; }
+ uint8 getKeyLower() const { return _key & 0xFF; }
void setIndex(uint8 index) { _index = index; }
uint16 getKeyMasked(uint8 newIndex);
uint16 keyMaskedAlign(uint16 val);
@@ -515,7 +515,7 @@ void FileExpanderSource::advSrcBitsBy1() {
_key >>= 1;
if (!--_bitsLeft) {
if (_dataPtr < _endofBuffer)
- _key = ((*_dataPtr++) << 8) | (_key & 0xff);
+ _key = ((*_dataPtr++) << 8) | (_key & 0xFF);
_bitsLeft = 8;
}
}
@@ -528,7 +528,7 @@ void FileExpanderSource::advSrcBitsByIndex(uint8 newIndex) {
_index = -_bitsLeft;
_bitsLeft = 8 - _index;
if (_dataPtr < _endofBuffer)
- _key = (*_dataPtr++ << 8) | (_key & 0xff);
+ _key = (*_dataPtr++ << 8) | (_key & 0xFF);
}
_key >>= _index;
}
@@ -540,13 +540,13 @@ uint16 FileExpanderSource::getKeyMasked(uint8 newIndex) {
if (_index > 8) {
newIndex = _index - 8;
- res = (_key & 0xff) & mskTable[8];
+ res = (_key & 0xFF) & mskTable[8];
advSrcBitsByIndex(8);
_index = newIndex;
- res |= (((_key & 0xff) & mskTable[_index]) << 8);
+ res |= (((_key & 0xFF) & mskTable[_index]) << 8);
advSrcBitsByIndex(_index);
} else {
- res = (_key & 0xff) & mskTable[_index];
+ res = (_key & 0xFF) & mskTable[_index];
advSrcBitsByIndex(_index);
}
@@ -568,10 +568,10 @@ void FileExpanderSource::copyBytes(uint8 *& dst) {
uint16 FileExpanderSource::keyMaskedAlign(uint16 val) {
val -= 0x101;
- _index = (val & 0xff) >> 2;
+ _index = (val & 0xFF) >> 2;
int16 b = ((_bitsLeft << 8) | _index) - 1;
_bitsLeft = b >> 8;
- _index = b & 0xff;
+ _index = b & 0xFF;
uint16 res = (((val & 3) + 4) << _index) + 0x101;
return res + getKeyMasked(_index);
}
@@ -727,20 +727,20 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32
cmd = ((int16 *)_tables[2])[_src->getKeyLower()];
_src->advSrcBitsByIndex(cmd < 0 ? calcCmdAndIndex(_tables[3], cmd) : _tables[0][cmd]);
- if (cmd == 0x11d) {
+ if (cmd == 0x11D) {
cmd = 0x200;
} else if (cmd > 0x108) {
cmd = _src->keyMaskedAlign(cmd);
}
if (!(cmd >> 8)) {
- *d++ = cmd & 0xff;
+ *d++ = cmd & 0xFF;
} else if (cmd != 0x100) {
- cmd -= 0xfe;
+ cmd -= 0xFE;
int16 offset = ((int16 *)_tables[4])[_src->getKeyLower()];
_src->advSrcBitsByIndex(offset < 0 ? calcCmdAndIndex(_tables[5], offset) : _tables[1][offset]);
- if ((offset & 0xff) >= 4) {
- uint8 newIndex = ((offset & 0xff) >> 1) - 1;
+ if ((offset & 0xFF) >= 4) {
+ uint8 newIndex = ((offset & 0xFF) >> 1) - 1;
offset = (((offset & 1) + 2) << newIndex);
offset += _src->getKeyMasked(newIndex);
}
@@ -775,7 +775,7 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32
void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex2, int cnt) {
uint8 *tbl1 = _tables[srcIndex];
uint8 *tbl2 = _tables[dstIndex];
- uint8 *tbl3 = dstIndex2 == 0xff ? 0 : _tables[dstIndex2];
+ uint8 *tbl3 = dstIndex2 == 0xFF ? 0 : _tables[dstIndex2];
if (!cnt)
return;
@@ -859,7 +859,7 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex
do {
s2[o] = cnt;
o += inc;
- } while (!(o & 0xf00));
+ } while (!(o & 0xF00));
} else if (t > 8) {
if (!bt)
@@ -868,7 +868,7 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex
t -= 8;
uint8 shiftCnt = 1;
uint8 v = (*d) >> 8;
- s2 = &((uint16 *)tbl2)[*d & 0xff];
+ s2 = &((uint16 *)tbl2)[*d & 0xFF];
do {
if (!*s2) {
@@ -897,7 +897,7 @@ uint8 FileExpander::calcCmdAndIndex(const uint8 *tbl, int16 &para) {
do {
newIndex++;
- para = t[((~para) & 0xfffe) | (v & 1)];
+ para = t[((~para) & 0xFFFE) | (v & 1)];
v >>= 1;
} while (para < 0);
@@ -1020,7 +1020,7 @@ Common::Archive *InstallerLoader::load(Resource *owner, const Common::String &fi
pos = 0;
- const uint32 kExecSize = 0x0bba;
+ const uint32 kExecSize = 0x0BBA;
const uint32 kHeaderSize = 30;
const uint32 kHeaderSize2 = 46;
diff --git a/engines/kyra/saveload_eob.cpp b/engines/kyra/saveload_eob.cpp
index 70c690e452..e4f53a852d 100644
--- a/engines/kyra/saveload_eob.cpp
+++ b/engines/kyra/saveload_eob.cpp
@@ -453,7 +453,7 @@ Common::Error EoBCoreEngine::saveGameStateIntern(int slot, const char *saveName,
out->write(l->wallsXorData, 4096);
for (int ii = 0; ii < 1024; ii++)
- out->writeByte(l->flags[ii] & 0xff);
+ out->writeByte(l->flags[ii] & 0xFF);
EoBMonsterInPlay *lm = (EoBMonsterInPlay *)_lvlTempData[i]->monsters;
EoBFlyingObject *lf = (EoBFlyingObject *)_lvlTempData[i]->flyingObjects;
diff --git a/engines/kyra/saveload_lol.cpp b/engines/kyra/saveload_lol.cpp
index b6840663e9..6c83ebd51b 100644
--- a/engines/kyra/saveload_lol.cpp
+++ b/engines/kyra/saveload_lol.cpp
@@ -41,7 +41,7 @@ Common::Error LoLEngine::loadGameState(int slot) {
SaveHeader header;
Common::InSaveFile *saveFile = openSaveForReading(fileName, header);
if (!saveFile) {
- _txt->printMessage(2, "%s", getLangString(0x425d));
+ _txt->printMessage(2, "%s", getLangString(0x425D));
return Common::kNoError;
}
@@ -437,7 +437,7 @@ Common::Error LoLEngine::saveGameStateIntern(int slot, const char *saveName, con
out->write(l->wallsXorData, 4096);
for (int ii = 0; ii < 1024; ii++)
- out->writeByte(l->flags[ii] & 0xff);
+ out->writeByte(l->flags[ii] & 0xFF);
LoLMonster *lm = (LoLMonster *)_lvlTempData[i]->monsters;
FlyingObject *lf = (FlyingObject *)_lvlTempData[i]->flyingObjects;
@@ -547,7 +547,7 @@ void LoLEngine::restoreTempDataAdjustMonsterStrength(int index) {
if (_lvlTempData[index]->monsterDifficulty == _monsterDifficulty)
return;
- uint16 d = (_monsterModifiers[_lvlTempData[index]->monsterDifficulty] << 8) / _monsterModifiers[_monsterDifficulty];
+ uint16 d = (_monsterModifiers1[_lvlTempData[index]->monsterDifficulty] << 8) / _monsterModifiers1[_monsterDifficulty];
for (int i = 0; i < 30; i++) {
if (_monsters[i].mode >= 14 || _monsters[i].block == 0 || _monsters[i].hitPoints <= 0)
diff --git a/engines/kyra/scene_eob.cpp b/engines/kyra/scene_eob.cpp
index 53f000a50c..84cf4a3809 100644
--- a/engines/kyra/scene_eob.cpp
+++ b/engines/kyra/scene_eob.cpp
@@ -157,7 +157,7 @@ Common::String EoBCoreEngine::initLevelData(int sub) {
_curGfxFile = (const char *)pos;
pos += slen;
- if (*pos++ != 0xff && _flags.gameID == GI_EOB2) {
+ if (*pos++ != 0xFF && _flags.gameID == GI_EOB2) {
tmpStr = Common::String::format(paletteFilePattern, (const char *)pos);
pos += 13;
}
@@ -174,7 +174,7 @@ Common::String EoBCoreEngine::initLevelData(int sub) {
if (_configRenderMode != Common::kRenderCGA) {
Palette backupPal(256);
backupPal.copy(_screen->getPalette(0), 224, 32, 224);
- _screen->getPalette(0).fill(224, 32, 0x3f);
+ _screen->getPalette(0).fill(224, 32, 0x3F);
uint8 *src = _screen->getPalette(0).getData();
_screen->createFadeTable(src, _screen->getFadeTable(0), 4, 75); // green
@@ -271,7 +271,7 @@ void EoBCoreEngine::addLevelItems() {
for (int i = 0; i < 600; i++) {
if (_items[i].level != _currentLevel || _items[i].block <= 0)
continue;
- setItemPosition((Item *)&_levelBlockProperties[_items[i].block & 0x3ff].drawObjects, _items[i].block, i, _items[i].pos);
+ setItemPosition((Item *)&_levelBlockProperties[_items[i].block & 0x3FF].drawObjects, _items[i].block, i, _items[i].pos);
}
}
@@ -305,10 +305,10 @@ void EoBCoreEngine::loadVcnData(const char *file, const uint8 *cgaMapping) {
while (dst < _vcnBlocks + vcnSize) {
const uint16 *table = _screen->getCGADitheringTable((tblSwitch++) & 1);
for (int ii = 0; ii < 2; ii++) {
- *dst++ = (table[pos[0]] & 0x000f) | ((table[pos[0]] & 0x0f00) >> 4);
- *dst++ = (table[pos[1]] & 0x000f) | ((table[pos[1]] & 0x0f00) >> 4);
- *dst2++ = ((pos[0] & 0xf0 ? 0x30 : 0) | (pos[0] & 0x0f ? 0x03 : 0)) ^ 0x33;
- *dst2++ = ((pos[1] & 0xf0 ? 0x30 : 0) | (pos[1] & 0x0f ? 0x03 : 0)) ^ 0x33;
+ *dst++ = (table[pos[0]] & 0x000F) | ((table[pos[0]] & 0x0F00) >> 4);
+ *dst++ = (table[pos[1]] & 0x000F) | ((table[pos[1]] & 0x0F00) >> 4);
+ *dst2++ = ((pos[0] & 0xF0 ? 0x30 : 0) | (pos[0] & 0x0F ? 0x03 : 0)) ^ 0x33;
+ *dst2++ = ((pos[1] & 0xF0 ? 0x30 : 0) | (pos[1] & 0x0F ? 0x03 : 0)) ^ 0x33;
pos += 2;
}
}
@@ -379,8 +379,8 @@ void EoBCoreEngine::loadDecorations(const char *cpsFile, const char *decFile) {
LevelDecorationProperty *l = &_levelDecorationData[i];
for (int ii = 0; ii < 10; ii++) {
l->shapeIndex[ii] = s->readByte();
- if (l->shapeIndex[ii] == 0xff)
- l->shapeIndex[ii] = 0xffff;
+ if (l->shapeIndex[ii] == 0xFF)
+ l->shapeIndex[ii] = 0xFFFF;
}
l->next = s->readByte();
l->flags = s->readByte();
@@ -427,7 +427,7 @@ void EoBCoreEngine::assignWallsAndDecorations(int wallIndex, int vmpIndex, int d
for (int i = 0; i < 10; i++) {
uint16 t = _levelDecorationProperties[_mappedDecorationsCount].shapeIndex[i];
- if (t == 0xffff)
+ if (t == 0xFFFF)
continue;
if (_levelDecorationShapes[t])
@@ -479,7 +479,7 @@ void EoBCoreEngine::toggleWallState(int wall, int toggle) {
if (toggle)
_wllWallFlags[wall + i] |= 2;
else
- _wllWallFlags[wall + i] &= 0xfd;
+ _wllWallFlags[wall + i] &= 0xFD;
}
}
@@ -593,7 +593,7 @@ void EoBCoreEngine::drawDecorations(int index) {
if ((i == 0) && (flg & 1 || ((flg & 2) && _wllProcessFlag)))
ix = -ix;
- if (_levelDecorationProperties[l].shapeIndex[shpIx] == 0xffff) {
+ if (_levelDecorationProperties[l].shapeIndex[shpIx] == 0xFFFF) {
l = _levelDecorationProperties[l].next;
continue;
}
@@ -708,7 +708,7 @@ int EoBCoreEngine::clickedNiche(uint16 block, uint16 direction) {
if (_dscItemShapeMap[_items[_itemInHand].icon] <= 14) {
_txt->printMessage(_pryDoorStrings[5]);
} else {
- setItemPosition((Item *)&_levelBlockProperties[block & 0x3ff].drawObjects, block, _itemInHand, 8);
+ setItemPosition((Item *)&_levelBlockProperties[block & 0x3FF].drawObjects, block, _itemInHand, 8);
runLevelScript(block, 4);
setHandItem(0);
_sceneUpdateRequired = true;
@@ -731,7 +731,7 @@ int EoBCoreEngine::clickedDoorPry(uint16 block, uint16 direction) {
int d = -1;
for (int i = 0; i < 6; i++) {
- if (!testCharacter(i, 0x0d))
+ if (!testCharacter(i, 0x0D))
continue;
if (d >= 0) {
int s1 = _characters[i].strengthCur + _characters[i].strengthExtCur;
@@ -776,7 +776,7 @@ int EoBCoreEngine::clickedDoorNoPry(uint16 block, uint16 direction) {
int EoBCoreEngine::specialWallAction(int block, int direction) {
direction ^= 2;
uint8 type = _specialWallTypes[_levelBlockProperties[block].walls[direction]];
- if (!type || !(_clickedSpecialFlag & (((_levelBlockProperties[block].flags & 0xf8) >> 3) | 0xe0)))
+ if (!type || !(_clickedSpecialFlag & (((_levelBlockProperties[block].flags & 0xF8) >> 3) | 0xE0)))
return 0;
int res = 0;
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index d916348fb8..f1045d2ddf 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -193,7 +193,7 @@ int LoLEngine::assignLevelDecorationShapes(int index) {
for (int i = 0; i < 10; i++) {
uint16 t = _levelDecorationProperties[o].shapeIndex[i];
- if (t == 0xffff)
+ if (t == 0xFFFF)
continue;
uint16 pv = p1[t];
@@ -254,7 +254,7 @@ void LoLEngine::loadBlockProperties(const char *cmzFile) {
_levelBlockProperties[i].direction = 5;
if (_wllAutomapData[_levelBlockProperties[i].walls[0]] == 17) {
- _levelBlockProperties[i].flags &= 0xef;
+ _levelBlockProperties[i].flags &= 0xEF;
_levelBlockProperties[i].flags |= 0x20;
}
}
@@ -315,9 +315,9 @@ void LoLEngine::loadLevelGraphics(const char *file, int specialColor, int weight
if (_lastSpecialColor == 1)
_lastSpecialColor = 0x44;
else if (_lastSpecialColor == 0x66)
- _lastSpecialColor = scumm_stricmp(file, "YVEL2") ? 0xcc : 0x44;
- else if (_lastSpecialColor == 0x6b)
- _lastSpecialColor = 0xcc;
+ _lastSpecialColor = scumm_stricmp(file, "YVEL2") ? 0xCC : 0x44;
+ else if (_lastSpecialColor == 0x6B)
+ _lastSpecialColor = 0xCC;
else
_lastSpecialColor = 0x44;
}
@@ -431,17 +431,17 @@ void LoLEngine::loadLevelGraphics(const char *file, int specialColor, int weight
}
for (int ii = l; ii < 256; ii++)
- levelOverlay[ii] = ii & 0xff;
+ levelOverlay[ii] = ii & 0xFF;
}
uint8 *levelOverlay = _screen->getLevelOverlay(7);
for (int i = 0; i < 256; i++)
- levelOverlay[i] = i & 0xff;
+ levelOverlay[i] = i & 0xFF;
if (_flags.use16ColorMode) {
- _screen->getLevelOverlay(6)[0xee] = 0xee;
+ _screen->getLevelOverlay(6)[0xEE] = 0xEE;
if (_lastSpecialColor == 0x44)
- _screen->getLevelOverlay(5)[0xee] = 0xee;
+ _screen->getLevelOverlay(5)[0xEE] = 0xEE;
for (int i = 0; i < 7; i++)
memcpy(_screen->getLevelOverlay(i), _screen->getLevelOverlay(i + 1), 256);
@@ -505,14 +505,14 @@ void LoLEngine::resetBlockProperties() {
for (int i = 0; i < 1024; i++) {
LevelBlockProperty *l = &_levelBlockProperties[i];
if (l->flags & 0x10) {
- l->flags &= 0xef;
+ l->flags &= 0xEF;
if (testWallInvisibility(i, 0) && testWallInvisibility(i, 1))
l->flags |= 0x40;
} else {
if (l->flags & 0x40)
- l->flags &= 0xbf;
+ l->flags &= 0xBF;
else if (l->flags & 0x80)
- l->flags &= 0x7f;
+ l->flags &= 0x7F;
}
}
}
@@ -574,7 +574,7 @@ void LoLEngine::updateLampStatus() {
setPaletteBrightness(_screen->getPalette(0), _brightness, newLampEffect);
_lampStatusTimer = _system->getMillis() + (10 + rollDice(1, 30)) * _tickLength;
} else {
- if ((_lampEffect & 0xfe) == (newLampEffect & 0xfe)) {
+ if ((_lampEffect & 0xFE) == (newLampEffect & 0xFE)) {
if (_system->getMillis() <= _lampStatusTimer) {
newLampEffect = _lampEffect;
} else {
@@ -702,7 +702,7 @@ void LoLEngine::moveParty(uint16 direction, int unk1, int unk2, int buttonShape)
runLevelScript(opos, 8);
runLevelScript(npos, 2);
- if (_levelBlockProperties[npos].walls[0] == 0x1a)
+ if (_levelBlockProperties[npos].walls[0] == 0x1A)
memset(_levelBlockProperties[npos].walls, 0, 4);
}
}
@@ -711,12 +711,12 @@ void LoLEngine::moveParty(uint16 direction, int unk1, int unk2, int buttonShape)
}
uint16 LoLEngine::calcBlockIndex(uint16 x, uint16 y) {
- return (((y & 0xff00) >> 3) | (x >> 8)) & 0x3ff;
+ return (((y & 0xFF00) >> 3) | (x >> 8)) & 0x3FF;
}
void LoLEngine::calcCoordinates(uint16 &x, uint16 &y, int block, uint16 xOffs, uint16 yOffs) {
- x = (block & 0x1f) << 8 | xOffs;
- y = ((block & 0xffe0) << 3) | yOffs;
+ x = (block & 0x1F) << 8 | xOffs;
+ y = ((block & 0xFFE0) << 3) | yOffs;
}
void LoLEngine::calcCoordinatesForSingleCharacter(int charNum, uint16 &x, uint16 &y) {
@@ -732,8 +732,8 @@ void LoLEngine::calcCoordinatesForSingleCharacter(int charNum, uint16 &x, uint16
calcCoordinatesAddDirectionOffset(x, y, _currentDirection);
- x |= (_partyPosX & 0xff00);
- y |= (_partyPosY & 0xff00);
+ x |= (_partyPosX & 0xFF00);
+ y |= (_partyPosY & 0xFF00);
}
void LoLEngine::calcCoordinatesAddDirectionOffset(uint16 &x, uint16 &y, int direction) {
@@ -777,7 +777,7 @@ void LoLEngine::notifyBlockNotPassable(int scrollFlag) {
movePartySmoothScrollBlocked(2);
snd_stopSpeech(true);
- _txt->printMessage(0x8002, "%s", getLangString(0x403f));
+ _txt->printMessage(0x8002, "%s", getLangString(0x403F));
snd_playSoundEffect(19, -1);
}
@@ -804,7 +804,7 @@ int LoLEngine::clickedNiche(uint16 block, uint16 direction) {
return 0;
uint16 x = 0x80;
- uint16 y = 0xff;
+ uint16 y = 0xFF;
calcCoordinatesAddDirectionOffset(x, y, _currentDirection);
calcCoordinates(x, y, block, x, y);
setItemPosition(_itemInHand, x, y, 8, 1);
@@ -1180,7 +1180,7 @@ void LoLEngine::processGasExplosion(int soundId) {
memcpy(p2, p1, 768);
for (int i = 1; i < 128; i++)
- p2[i * 3] = 0x3f;
+ p2[i * 3] = 0x3F;
uint32 ctime = _system->getMillis();
while (_screen->timedPaletteFadeStep(_screen->getPalette(0).getData(), p2, _system->getMillis() - ctime, 10))
@@ -1244,10 +1244,10 @@ void LoLEngine::setWallType(int block, int wall, int val) {
for (int i = 0; i < 4; i++)
_levelBlockProperties[block].walls[i] = val;
if (_wllAutomapData[val] == 17) {
- _levelBlockProperties[block].flags &= 0xef;
+ _levelBlockProperties[block].flags &= 0xEF;
_levelBlockProperties[block].flags |= 0x20;
} else {
- _levelBlockProperties[block].flags &= 0xdf;
+ _levelBlockProperties[block].flags &= 0xDF;
}
} else {
_levelBlockProperties[block].walls[wall] = val;
@@ -1491,7 +1491,7 @@ void LoLEngine::drawDecorations(int index) {
ov = 0;
}
ovl = _screen->getLevelOverlay(ov);
- } else if (_levelDecorationProperties[l].shapeIndex[shpIx] != 0xffff) {
+ } else if (_levelDecorationProperties[l].shapeIndex[shpIx] != 0xFFFF) {
scaleW = scaleH = 0x100;
int ov = 7;
if (_flags.use16ColorMode) {
@@ -1504,7 +1504,7 @@ void LoLEngine::drawDecorations(int index) {
ovl = _screen->getLevelOverlay(ov);
}
- if (_levelDecorationProperties[l].shapeIndex[shpIx] != 0xffff) {
+ if (_levelDecorationProperties[l].shapeIndex[shpIx] != 0xFFFF) {
shapeData = _levelDecorationShapes[_levelDecorationProperties[l].shapeIndex[shpIx]];
if (shapeData) {
if (ix < 0) {
@@ -1538,10 +1538,10 @@ void LoLEngine::drawDecorations(int index) {
}
void LoLEngine::drawBlockEffects(int index, int type) {
- static const uint16 yOffs[] = { 0xff, 0xff, 0x80, 0x80 };
+ static const uint16 yOffs[] = { 0xFF, 0xFF, 0x80, 0x80 };
uint8 flg = _visibleBlocks[index]->flags;
// flags: 0x10 = ice wall, 0x20 = teleporter, 0x40 = blue slime spot, 0x80 = blood spot
- if (!(flg & 0xf0))
+ if (!(flg & 0xF0))
return;
type = (type == 0) ? 2 : 0;
@@ -1562,8 +1562,8 @@ void LoLEngine::drawBlockEffects(int index, int type) {
calcCoordinatesAddDirectionOffset(x, y, _currentDirection);
- x |= ((_visibleBlockIndex[index] & 0x1f) << 8);
- y |= ((_visibleBlockIndex[index] & 0xffe0) << 3);
+ x |= ((_visibleBlockIndex[index] & 0x1F) << 8);
+ y |= ((_visibleBlockIndex[index] & 0xFFE0) << 3);
drawItemOrMonster(_effectShapes[type], ovl, x, y, 0, (type == 1) ? -20 : 0, drawFlag, -1, false);
}
diff --git a/engines/kyra/scene_rpg.cpp b/engines/kyra/scene_rpg.cpp
index 5a0433323c..6d724efed0 100644
--- a/engines/kyra/scene_rpg.cpp
+++ b/engines/kyra/scene_rpg.cpp
@@ -151,7 +151,7 @@ void KyraRpgEngine::generateBlockDrawingBuffer() {
memset(_blockDrawingBuffer, 0, 660 * sizeof(uint16));
- _wllProcessFlag = ((_currentBlock >> 5) + (_currentBlock & 0x1f) + _currentDirection) & 1;
+ _wllProcessFlag = ((_currentBlock >> 5) + (_currentBlock & 0x1F) + _currentDirection) & 1;
if (_wllProcessFlag) // floor and ceiling
generateVmpTileDataFlipped(0, 15, 1, -330, 22, 15);
@@ -318,7 +318,7 @@ bool KyraRpgEngine::hasWall(int index) {
void KyraRpgEngine::assignVisibleBlocks(int block, int direction) {
for (int i = 0; i < 18; i++) {
- uint16 t = (block + _dscBlockIndex[direction * 18 + i]) & 0x3ff;
+ uint16 t = (block + _dscBlockIndex[direction * 18 + i]) & 0x3FF;
_visibleBlockIndex[i] = t;
_visibleBlocks[i] = &_levelBlockProperties[t];
@@ -366,7 +366,7 @@ void KyraRpgEngine::drawVcnBlocks() {
if (vcnOffset & 0x4000) {
horizontalFlip = true;
- vcnOffset &= 0x3fff;
+ vcnOffset &= 0x3FFF;
}
uint8 *src = 0;
@@ -378,7 +378,7 @@ void KyraRpgEngine::drawVcnBlocks() {
vcnOffset = bdb[329];
if (vcnOffset & 0x4000) {
horizontalFlip = true;
- vcnOffset &= 0x3fff;
+ vcnOffset &= 0x3FFF;
}
src = (_vcfBlocks ? _vcfBlocks : _vcnBlocks) + (vcnOffset << 5);
@@ -391,7 +391,7 @@ void KyraRpgEngine::drawVcnBlocks() {
src += 3;
for (int blockX = 0; blockX < 4; blockX++) {
uint8 bl = *src--;
- *d++ = _vcnColTable[((bl & 0x0f) + wllVcnOffset) | shift];
+ *d++ = _vcnColTable[((bl & 0x0F) + wllVcnOffset) | shift];
*d++ = _vcnColTable[((bl >> 4) + wllVcnOffset) | shift];
}
src += 5;
@@ -402,7 +402,7 @@ void KyraRpgEngine::drawVcnBlocks() {
for (int blockX = 0; blockX < 4; blockX++) {
uint8 bl = *src++;
*d++ = _vcnColTable[((bl >> 4) + wllVcnOffset) | shift];
- *d++ = _vcnColTable[((bl & 0x0f) + wllVcnOffset) | shift];
+ *d++ = _vcnColTable[((bl & 0x0F) + wllVcnOffset) | shift];
}
d += 168;
}
@@ -414,7 +414,7 @@ void KyraRpgEngine::drawVcnBlocks() {
horizontalFlip = false;
if (vcnExtraOffsetWll & 0x4000) {
- vcnExtraOffsetWll &= 0x3fff;
+ vcnExtraOffsetWll &= 0x3FFF;
horizontalFlip = true;
}
@@ -429,11 +429,11 @@ void KyraRpgEngine::drawVcnBlocks() {
for (int blockX = 0; blockX < 4; blockX++) {
uint8 bl = *src--;
uint8 mask = _vcnTransitionMask ? *maskTable-- : 0;
- uint8 h = _vcnColTable[((bl & 0x0f) + wllVcnRmdOffset) | shift];
+ uint8 h = _vcnColTable[((bl & 0x0F) + wllVcnRmdOffset) | shift];
uint8 l = _vcnColTable[((bl >> 4) + wllVcnRmdOffset) | shift];
if (_vcnTransitionMask)
- *d = (*d & (mask & 0x0f)) | h;
+ *d = (*d & (mask & 0x0F)) | h;
else if (h)
*d = h;
d++;
@@ -454,7 +454,7 @@ void KyraRpgEngine::drawVcnBlocks() {
uint8 bl = *src++;
uint8 mask = _vcnTransitionMask ? *maskTable++ : 0;
uint8 h = _vcnColTable[((bl >> 4) + wllVcnRmdOffset) | shift];
- uint8 l = _vcnColTable[((bl & 0x0f) + wllVcnRmdOffset) | shift];
+ uint8 l = _vcnColTable[((bl & 0x0F) + wllVcnRmdOffset) | shift];
if (_vcnTransitionMask)
*d = (*d & (mask >> 4)) | h;
@@ -463,7 +463,7 @@ void KyraRpgEngine::drawVcnBlocks() {
d++;
if (_vcnTransitionMask)
- *d = (*d & (mask & 0x0f)) | l;
+ *d = (*d & (mask & 0x0F)) | l;
else if (l)
*d = l;
d++;
@@ -482,7 +482,7 @@ void KyraRpgEngine::drawVcnBlocks() {
uint16 KyraRpgEngine::calcNewBlockPosition(uint16 curBlock, uint16 direction) {
static const int16 blockPosTable[] = { -32, 1, 32, -1 };
- return (curBlock + blockPosTable[direction]) & 0x3ff;
+ return (curBlock + blockPosTable[direction]) & 0x3FF;
}
int KyraRpgEngine::clickedWallShape(uint16 block, uint16 direction) {
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 6c77870210..419b630714 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -56,6 +56,7 @@ Screen::Screen(KyraEngine_v1 *vm, OSystem *system, const ScreenDim *dimTable, co
_pageMapping[i] = i & ~1;
_renderMode = Common::kRenderDefault;
+ _sjisMixedFontMode = false;
_currentFont = FID_8_FNT;
_paletteChanged = true;
@@ -124,6 +125,7 @@ bool Screen::init() {
if (_useOverlays) {
_useSJIS = (_vm->gameFlags().lang == Common::JA_JPN);
_sjisInvisibleColor = (_vm->game() == GI_KYRA1) ? 0x80 : 0xF6;
+ _sjisMixedFontMode = !_use16ColorMode;
for (int i = 0; i < SCREEN_OVLS_NUM; ++i) {
if (!_sjisOverlayPtrs[i]) {
@@ -139,7 +141,7 @@ bool Screen::init() {
if (!font)
error("Could not load any SJIS font, neither the original nor ScummVM's 'SJIS.FNT'");
- _fonts[FID_SJIS_FNT] = new SJISFont(font, _sjisInvisibleColor, _use16ColorMode, !_use16ColorMode);
+ _fonts[FID_SJIS_FNT] = new SJISFont(font, _sjisInvisibleColor, _use16ColorMode, !_use16ColorMode && _vm->game() != GI_LOL, _vm->game() == GI_LOL ? 1 : 0);
}
}
@@ -1246,11 +1248,16 @@ int Screen::getCharWidth(uint16 c) const {
return width + ((_currentFont != FID_SJIS_FNT) ? _charWidth : 0);
}
-int Screen::getTextWidth(const char *str) const {
+int Screen::getTextWidth(const char *str) {
int curLineLen = 0;
int maxLineLen = 0;
+ FontId curFont = _currentFont;
+
while (1) {
+ if (_sjisMixedFontMode)
+ setFont(*str < 0 ? FID_SJIS_FNT : curFont);
+
uint c = fetchChar(str);
if (c == 0) {
@@ -1274,7 +1281,7 @@ void Screen::printText(const char *str, int x, int y, uint8 color1, uint8 color2
cmap[1] = color1;
setTextColor(cmap, 0, 1);
- const uint8 charHeightFnt = getFontHeight();
+ FontId curFont = _currentFont;
if (x < 0)
x = 0;
@@ -1288,6 +1295,11 @@ void Screen::printText(const char *str, int x, int y, uint8 color1, uint8 color2
return;
while (1) {
+ if (_sjisMixedFontMode)
+ setFont(*str < 0 ? FID_SJIS_FNT : curFont);
+
+ uint8 charHeightFnt = getFontHeight();
+
uint c = fetchChar(str);
if (c == 0) {
@@ -1490,7 +1502,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
int scaleCounterV = 0;
- const int drawFunc = flags & 0x0f;
+ const int drawFunc = flags & 0x0F;
_dsProcessMargin = dsMarginFunc[drawFunc];
_dsScaleSkip = dsSkipFunc[drawFunc];
_dsProcessLine = dsLineFunc[drawFunc];
@@ -1747,7 +1759,7 @@ int Screen::drawShapeMarginScaleUpwind(uint8 *&dst, const uint8 *&src, int &cnt)
_dsTmpWidth += cnt;
int i = (_dsOffscreenLeft - cnt) * _dsScaleW;
- int res = i & 0xff;
+ int res = i & 0xFF;
i >>= 8;
i -= _dsOffscreenScaleVal2;
dst += i;
@@ -1773,7 +1785,7 @@ int Screen::drawShapeMarginScaleDownwind(uint8 *&dst, const uint8 *&src, int &cn
_dsTmpWidth += cnt;
int i = (_dsOffscreenLeft - cnt) * _dsScaleW;
- int res = i & 0xff;
+ int res = i & 0xFF;
i >>= 8;
i -= _dsOffscreenScaleVal2;
dst -= i;
@@ -1862,7 +1874,7 @@ void Screen::drawShapeProcessLineScaleUpwind(uint8 *&dst, const uint8 *&src, int
int r = c * _dsScaleW + scaleState;
dst += (r >> 8);
cnt -= (r >> 8);
- scaleState = r & 0xff;
+ scaleState = r & 0xFF;
}
} else if (scaleState) {
(this->*_dsPlot)(dst++, c);
@@ -1890,7 +1902,7 @@ void Screen::drawShapeProcessLineScaleDownwind(uint8 *&dst, const uint8 *&src, i
int r = c * _dsScaleW + scaleState;
dst -= (r >> 8);
cnt -= (r >> 8);
- scaleState = r & 0xff;
+ scaleState = r & 0xFF;
}
} else {
(this->*_dsPlot)(dst--, c);
@@ -1938,9 +1950,9 @@ void Screen::drawShapePlotType5(uint8 *dst, uint8 cmd) {
void Screen::drawShapePlotType6(uint8 *dst, uint8 cmd) {
int t = _drawShapeVar4 + _drawShapeVar5;
- if (t & 0xff00) {
+ if (t & 0xFF00) {
cmd = dst[_drawShapeVar3];
- t &= 0xff;
+ t &= 0xFF;
} else {
cmd = _dsTable2[cmd];
}
@@ -1951,7 +1963,7 @@ void Screen::drawShapePlotType6(uint8 *dst, uint8 cmd) {
void Screen::drawShapePlotType8(uint8 *dst, uint8 cmd) {
uint32 relOffs = dst - _dsDstPage;
- int t = (_shapePages[0][relOffs] & 0x7f) & 0x87;
+ int t = (_shapePages[0][relOffs] & 0x7F) & 0x87;
if (_dsDrawLayer < t)
cmd = _shapePages[1][relOffs];
@@ -1960,7 +1972,7 @@ void Screen::drawShapePlotType8(uint8 *dst, uint8 cmd) {
void Screen::drawShapePlotType9(uint8 *dst, uint8 cmd) {
uint32 relOffs = dst - _dsDstPage;
- int t = (_shapePages[0][relOffs] & 0x7f) & 0x87;
+ int t = (_shapePages[0][relOffs] & 0x7F) & 0x87;
if (_dsDrawLayer < t) {
cmd = _shapePages[1][relOffs];
} else {
@@ -1974,7 +1986,7 @@ void Screen::drawShapePlotType9(uint8 *dst, uint8 cmd) {
void Screen::drawShapePlotType11_15(uint8 *dst, uint8 cmd) {
uint32 relOffs = dst - _dsDstPage;
- int t = (_shapePages[0][relOffs] & 0x7f) & 0x87;
+ int t = (_shapePages[0][relOffs] & 0x7F) & 0x87;
if (_dsDrawLayer < t) {
cmd = _shapePages[1][relOffs];
@@ -1990,7 +2002,7 @@ void Screen::drawShapePlotType11_15(uint8 *dst, uint8 cmd) {
void Screen::drawShapePlotType12(uint8 *dst, uint8 cmd) {
uint32 relOffs = dst - _dsDstPage;
- int t = (_shapePages[0][relOffs] & 0x7f) & 0x87;
+ int t = (_shapePages[0][relOffs] & 0x7F) & 0x87;
if (_dsDrawLayer < t) {
cmd = _shapePages[1][relOffs];
} else {
@@ -2002,7 +2014,7 @@ void Screen::drawShapePlotType12(uint8 *dst, uint8 cmd) {
void Screen::drawShapePlotType13(uint8 *dst, uint8 cmd) {
uint32 relOffs = dst - _dsDstPage;
- int t = (_shapePages[0][relOffs] & 0x7f) & 0x87;
+ int t = (_shapePages[0][relOffs] & 0x7F) & 0x87;
if (_dsDrawLayer < t) {
cmd = _shapePages[1][relOffs];
} else {
@@ -2017,14 +2029,14 @@ void Screen::drawShapePlotType13(uint8 *dst, uint8 cmd) {
void Screen::drawShapePlotType14(uint8 *dst, uint8 cmd) {
uint32 relOffs = dst - _dsDstPage;
- int t = (_shapePages[0][relOffs] & 0x7f) & 0x87;
+ int t = (_shapePages[0][relOffs] & 0x7F) & 0x87;
if (_dsDrawLayer < t) {
cmd = _shapePages[1][relOffs];
} else {
t = _drawShapeVar4 + _drawShapeVar5;
- if (t & 0xff00) {
+ if (t & 0xFF00) {
cmd = dst[_drawShapeVar3];
- t &= 0xff;
+ t &= 0xFF;
} else {
cmd = _dsTable2[cmd];
}
@@ -2118,7 +2130,7 @@ void Screen::decodeFrame1(const uint8 *src, uint8 *dst, uint32 size) {
uint8 nib = 0;
uint16 code = decodeEGAGetCode(src, nib);
- uint8 last = code & 0xff;
+ uint8 last = code & 0xFF;
uint8 *dstPrev = dst;
uint16 count = 1;
@@ -2131,7 +2143,7 @@ void Screen::decodeFrame1(const uint8 *src, uint8 *dst, uint32 size) {
uint8 cmd = code >> 8;
if (cmd--) {
- code = (cmd << 8) | (code & 0xff);
+ code = (cmd << 8) | (code & 0xFF);
uint8 *tmpDst = dst;
if (code < numPatterns) {
@@ -2159,7 +2171,7 @@ void Screen::decodeFrame1(const uint8 *src, uint8 *dst, uint32 size) {
count = countPrev;
} else {
- *dst++ = last = (code & 0xff);
+ *dst++ = last = (code & 0xFF);
if (numPatterns < 3840) {
patterns[numPatterns].pos = dstPrev;
@@ -2180,7 +2192,7 @@ uint16 Screen::decodeEGAGetCode(const uint8 *&pos, uint8 &nib) {
res >>= 4;
} else {
pos++;
- res &= 0xfff;
+ res &= 0xFFF;
}
return res;
}
@@ -3566,11 +3578,11 @@ void AMIGAFont::unload() {
memset(_chars, 0, sizeof(_chars));
}
-SJISFont::SJISFont(Graphics::FontSJIS *font, const uint8 invisColor, bool is16Color, bool outlineSize)
- : _colorMap(0), _font(font), _invisColor(invisColor), _is16Color(is16Color) {
+SJISFont::SJISFont(Graphics::FontSJIS *font, const uint8 invisColor, bool is16Color, bool drawOutline, int extraSpacing)
+ : _colorMap(0), _font(font), _invisColor(invisColor), _is16Color(is16Color), _drawOutline(drawOutline), _sjisWidthOffset(extraSpacing) {
assert(_font);
- _font->setDrawingMode(outlineSize ? Graphics::FontSJIS::kOutlineMode : Graphics::FontSJIS::kDefaultMode);
+ _font->setDrawingMode(_drawOutline ? Graphics::FontSJIS::kOutlineMode : Graphics::FontSJIS::kDefaultMode);
_sjisWidth = _font->getMaxFontWidth() >> 1;
_fontHeight = _font->getFontHeight() >> 1;
@@ -3587,14 +3599,14 @@ int SJISFont::getHeight() const {
}
int SJISFont::getWidth() const {
- return _sjisWidth;
+ return _sjisWidth + _sjisWidthOffset;
}
int SJISFont::getCharWidth(uint16 c) const {
if (c <= 0x7F || (c >= 0xA1 && c <= 0xDF))
return _asciiWidth;
else
- return _sjisWidth;
+ return _sjisWidth + _sjisWidthOffset;
}
void SJISFont::setColorMap(const uint8 *src) {
@@ -3604,7 +3616,7 @@ void SJISFont::setColorMap(const uint8 *src) {
if (_colorMap[0] == _invisColor)
_font->setDrawingMode(Graphics::FontSJIS::kDefaultMode);
else
- _font->setDrawingMode(Graphics::FontSJIS::kOutlineMode);
+ _font->setDrawingMode(_drawOutline ? Graphics::FontSJIS::kOutlineMode : Graphics::FontSJIS::kDefaultMode);
}
}
@@ -3643,7 +3655,7 @@ void Palette::loadVGAPalette(Common::ReadStream &stream, int startIndex, int col
uint8 *pos = _palData + startIndex * 3;
for (int i = 0 ; i < colors * 3; i++)
- *pos++ = stream.readByte() & 0x3f;
+ *pos++ = stream.readByte() & 0x3F;
}
void Palette::loadEGAPalette(Common::ReadStream &stream, int startIndex, int colors) {
diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h
index 7f3abf8b5f..156b5b9a7c 100644
--- a/engines/kyra/screen.h
+++ b/engines/kyra/screen.h
@@ -211,7 +211,7 @@ private:
*/
class SJISFont : public Font {
public:
- SJISFont(Graphics::FontSJIS *font, const uint8 invisColor, bool is16Color, bool outlineSize);
+ SJISFont(Graphics::FontSJIS *font, const uint8 invisColor, bool is16Color, bool drawOutline, int extraSpacing);
~SJISFont() { unload(); }
bool usesOverlay() const { return true; }
@@ -230,6 +230,12 @@ private:
Graphics::FontSJIS *_font;
const uint8 _invisColor;
const bool _is16Color;
+ const bool _drawOutline;
+ // We use this for cases where the font width returned by getWidth() or getCharWidth() does not match the original.
+ // The original Japanese game versions use hard coded sjis font widths of 8 or 9. However, this does not necessarily
+ // depend on whether an outline is used or not (neither LOL/PC-9801 nor LOL/FM-TOWNS use an outline, but the first
+ // version uses a font width of 8 where the latter uses a font width of 9).
+ const int _sjisWidthOffset;
int _sjisWidth, _asciiWidth;
int _fontHeight;
@@ -468,7 +474,7 @@ public:
int getFontWidth() const;
int getCharWidth(uint16 c) const;
- int getTextWidth(const char *str) const;
+ int getTextWidth(const char *str);
void printText(const char *str, int x, int y, uint8 color1, uint8 color2);
@@ -581,6 +587,7 @@ protected:
Common::RenderMode _renderMode;
uint8 _sjisInvisibleColor;
+ bool _sjisMixedFontMode;
Palette *_screenPalette;
Common::Array<Palette *> _palettes;
diff --git a/engines/kyra/screen_eob.cpp b/engines/kyra/screen_eob.cpp
index 7cb50502f7..b1b26357f8 100644
--- a/engines/kyra/screen_eob.cpp
+++ b/engines/kyra/screen_eob.cpp
@@ -94,7 +94,7 @@ bool Screen_EoB::init() {
_egaDitheringTable = new uint8[256];
_egaDitheringTempPage = new uint8[SCREEN_W * 2 * SCREEN_H * 2];
for (int i = 0; i < 256; i++)
- _egaDitheringTable[i] = i & 0x0f;
+ _egaDitheringTable[i] = i & 0x0F;
} else if (_renderMode == Common::kRenderCGA) {
_cgaMappingDefault = _vm->staticres()->loadRawData(kEoB1CgaMappingDefault, temp);
_cgaDitheringTables[0] = new uint16[256];
@@ -105,7 +105,7 @@ bool Screen_EoB::init() {
_cgaScaleTable = new uint8[256];
memset(_cgaScaleTable, 0, 256 * sizeof(uint8));
for (int i = 0; i < 256; i++)
- _cgaScaleTable[i] = ((i & 0xf0) >> 2) | (i & 0x03);
+ _cgaScaleTable[i] = ((i & 0xF0) >> 2) | (i & 0x03);
}
return true;
@@ -260,14 +260,14 @@ void Screen_EoB::convertPage(int srcPage, int dstPage, const uint8 *cgaMapping)
for (int height = SCREEN_H; height; height--) {
const uint16 *table = _cgaDitheringTables[(tblSwitch++) & 1];
for (int width = SCREEN_W / 2; width; width--) {
- WRITE_LE_UINT16(d++, table[((src[1] & 0x0f) << 4) | (src[0] & 0x0f)]);
+ WRITE_LE_UINT16(d++, table[((src[1] & 0x0F) << 4) | (src[0] & 0x0F)]);
src += 2;
}
}
} else if (_renderMode == Common::kRenderEGA && !_useHiResEGADithering) {
uint32 len = SCREEN_W * SCREEN_H;
while (len--)
- *dst++ = *src++ & 0x0f;
+ *dst++ = *src++ & 0x0F;
} else {
copyPage(srcPage, dstPage);
}
@@ -321,9 +321,9 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
uint8 *dst = shp;
*dst++ = 4;
- *dst++ = (h & 0xff);
- *dst++ = (w & 0xff);
- *dst++ = (h & 0xff);
+ *dst++ = (h & 0xFF);
+ *dst++ = (w & 0xFF);
+ *dst++ = (h & 0xFF);
uint8 *dst2 = dst + (h * (w << 1));
@@ -334,8 +334,8 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
const uint16 *table = _cgaDitheringTables[(tblSwitch++) & 1];
while (w1--) {
- uint16 p0 = table[((src[1] & 0x0f) << 4) | (src[0] & 0x0f)];
- uint16 p1 = table[((src[3] & 0x0f) << 4) | (src[2] & 0x0f)];
+ uint16 p0 = table[((src[1] & 0x0F) << 4) | (src[0] & 0x0F)];
+ uint16 p1 = table[((src[3] & 0x0F) << 4) | (src[2] & 0x0F)];
*dst++ = ((p0 & 0x0003) << 6) | ((p0 & 0x0300) >> 4) | ((p1 & 0x0003) << 2) | ((p1 & 0x0300) >> 8);
@@ -380,9 +380,9 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
uint8 *dst = shp;
*dst++ = 8;
- *dst++ = (h & 0xff);
- *dst++ = (w & 0xff);
- *dst++ = (h & 0xff);
+ *dst++ = (h & 0xFF);
+ *dst++ = (w & 0xFF);
+ *dst++ = (h & 0xFF);
srcLineStart = getPagePtr(_curPage | 1) + y * 320 + (x << 3);
src = srcLineStart;
@@ -405,7 +405,7 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
*dst++ = 0;
numZero -= 255;
}
- val = numZero & 0xff;
+ val = numZero & 0xFF;
}
*dst++ = val;
} while (src != lineEnd);
@@ -420,7 +420,7 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
if (_renderMode != Common::kRenderEGA || _useHiResEGADithering) {
colorMap = new uint8[0x100];
- memset(colorMap, 0xff, 0x100);
+ memset(colorMap, 0xFF, 0x100);
}
shapesize = h * (w << 2) + 20;
@@ -429,12 +429,12 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
uint8 *dst = shp;
*dst++ = 2;
- *dst++ = (h & 0xff);
- *dst++ = (w & 0xff);
- *dst++ = (h & 0xff);
+ *dst++ = (h & 0xFF);
+ *dst++ = (w & 0xFF);
+ *dst++ = (h & 0xFF);
if (_renderMode != Common::kRenderEGA || _useHiResEGADithering) {
- memset(dst, 0xff, 0x10);
+ memset(dst, 0xFF, 0x10);
} else {
for (int i = 0; i < 16; i++)
dst[i] = i;
@@ -449,10 +449,10 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
uint16 w1 = w << 3;
while (w1--) {
uint8 s = *src++;
- uint8 c = s & 0x0f;
+ uint8 c = s & 0x0F;
if (colorMap) {
c = colorMap[s];
- if (c == 0xff) {
+ if (c == 0xFF) {
if (col < 0x10) {
*pal++ = s;
c = colorMap[s] = col++;
@@ -662,7 +662,7 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
pal = ovl ? ovl : src;
src += 16;
} else {
- static const uint8 cgaDefOvl[] = { 0x00, 0x55, 0xaa, 0xff };
+ static const uint8 cgaDefOvl[] = { 0x00, 0x55, 0xAA, 0xFF };
pal = ovl ? ovl : cgaDefOvl;
for (int i = 0; i < 4; i++)
cgaPal[i] = pal[i] & 3;
@@ -817,7 +817,7 @@ const uint8 *Screen_EoB::scaleShapeStep(const uint8 *shp) {
else
i = -i;
- _dsScaleTrans = (i << 4) | (i & 0x0f);
+ _dsScaleTrans = (i << 4) | (i & 0x0F);
for (int ii = 0; ii < 16; ii++)
*d++ = *shp++;
}
@@ -1193,14 +1193,14 @@ void Screen_EoB::createFadeTable(uint8 *palData, uint8 *dst, uint8 rootColor, ui
for (uint8 i = 1; i; i++) {
uint16 tmp = (uint16)((*src - r) * weight) << 1;
- tr = *src++ - ((tmp >> 8) & 0xff);
+ tr = *src++ - ((tmp >> 8) & 0xFF);
tmp = (uint16)((*src - g) * weight) << 1;
- tg = *src++ - ((tmp >> 8) & 0xff);
+ tg = *src++ - ((tmp >> 8) & 0xFF);
tmp = (uint16)((*src - b) * weight) << 1;
- tb = *src++ - ((tmp >> 8) & 0xff);
+ tb = *src++ - ((tmp >> 8) & 0xFF);
uint8 *d = palData + 3;
- uint16 v = 0xffff;
+ uint16 v = 0xFFFF;
uint8 col = rootColor;
for (uint8 ii = 1; ii; ii++) {
@@ -1261,7 +1261,7 @@ void Screen_EoB::ditherRect(const uint8 *src, uint8 *dst, int dstPitch, int srcW
if (in != colorKey) {
in = _egaDitheringTable[in];
*dst++ = *dst2++ = in >> 4;
- *dst++ = *dst2++ = in & 0x0f;
+ *dst++ = *dst2++ = in & 0x0F;
} else {
dst[0] = dst[1] = dst2[0] = dst2[1] = colorKey;
dst += 2;
@@ -1297,9 +1297,9 @@ void Screen_EoB::drawShapeSetPixel(uint8 *dst, uint8 col) {
void Screen_EoB::scaleShapeProcessLine2Bit(uint8 *&shpDst, const uint8 *&shpSrc, uint32 transOffsetDst, uint32 transOffsetSrc) {
for (int i = 0; i < _dsDiv; i++) {
shpDst[0] = (_cgaScaleTable[shpSrc[0]] << 2) | (shpSrc[1] >> 6);
- shpDst[1] = ((shpSrc[1] & 0x0f) << 4) | ((shpSrc[2] >> 2) & 0x0f);
+ shpDst[1] = ((shpSrc[1] & 0x0F) << 4) | ((shpSrc[2] >> 2) & 0x0F);
shpDst[transOffsetDst] = (_cgaScaleTable[shpSrc[transOffsetSrc]] << 2) | (shpSrc[transOffsetSrc + 1] >> 6);
- shpDst[transOffsetDst + 1] = ((shpSrc[transOffsetSrc + 1] & 0x0f) << 4) | ((shpSrc[transOffsetSrc + 2] >> 2) & 0x0f);
+ shpDst[transOffsetDst + 1] = ((shpSrc[transOffsetSrc + 1] & 0x0F) << 4) | ((shpSrc[transOffsetSrc + 2] >> 2) & 0x0F);
shpSrc += 3;
shpDst += 2;
}
@@ -1308,15 +1308,15 @@ void Screen_EoB::scaleShapeProcessLine2Bit(uint8 *&shpDst, const uint8 *&shpSrc,
shpDst[0] = _cgaScaleTable[shpSrc[0]] << 2;
shpDst[1] = 0;
shpDst[transOffsetDst] = (_cgaScaleTable[shpSrc[transOffsetSrc]] << 2) | 3;
- shpDst[transOffsetDst + 1] = 0xff;
+ shpDst[transOffsetDst + 1] = 0xFF;
shpSrc++;
shpDst += 2;
} else if (_dsRem == 2) {
shpDst[0] = (_cgaScaleTable[shpSrc[0]] << 2) | (shpSrc[1] >> 6);
- shpDst[1] = (shpSrc[1] & 0x3f) << 2;
+ shpDst[1] = (shpSrc[1] & 0x3F) << 2;
shpDst[transOffsetDst] = (_cgaScaleTable[shpSrc[transOffsetSrc]] << 2) | (shpSrc[transOffsetSrc + 1] >> 6);
- shpDst[transOffsetDst + 1] = ((shpSrc[transOffsetSrc + 1] & 0x3f) << 2) | 3;
+ shpDst[transOffsetDst + 1] = ((shpSrc[transOffsetSrc + 1] & 0x3F) << 2) | 3;
shpSrc += 2;
shpDst += 2;
}
@@ -1325,7 +1325,7 @@ void Screen_EoB::scaleShapeProcessLine2Bit(uint8 *&shpDst, const uint8 *&shpSrc,
void Screen_EoB::scaleShapeProcessLine4Bit(uint8 *&dst, const uint8 *&src) {
for (int i = 0; i < _dsDiv; i++) {
*dst++ = *src++;
- *dst++ = (READ_BE_UINT16(src) >> 4) & 0xff;
+ *dst++ = (READ_BE_UINT16(src) >> 4) & 0xFF;
src += 2;
}
@@ -1333,7 +1333,7 @@ void Screen_EoB::scaleShapeProcessLine4Bit(uint8 *&dst, const uint8 *&src) {
*dst++ = *src++;
*dst++ = _dsScaleTrans;
} else if (_dsRem == 2) {
- *dst++ = (src[0] & 0xf0) | (src[1] >> 4);
+ *dst++ = (src[0] & 0xF0) | (src[1] >> 4);
src += 2;
*dst++ = _dsScaleTrans;
*dst++ = _dsScaleTrans;
@@ -1362,7 +1362,7 @@ void Screen_EoB::generateEGADitheringTable(const Palette &pal) {
for (int ii = 256; ii; ii--) {
const uint8 *palEntry = _egaMatchTable + (ii - 1) * 3;
- if (*palEntry == 0xff)
+ if (*palEntry == 0xFF)
continue;
int e_r = palEntry[0] - r;
@@ -1382,8 +1382,8 @@ void Screen_EoB::generateEGADitheringTable(const Palette &pal) {
void Screen_EoB::generateCGADitheringTables(const uint8 *mappingData) {
for (int i = 0; i < 256; i++) {
- _cgaDitheringTables[0][i] = (mappingData[(i >> 4) + 16] << 8) | mappingData[i & 0x0f];
- _cgaDitheringTables[1][i] = (mappingData[i >> 4] << 8) | mappingData[(i & 0x0f) + 16];
+ _cgaDitheringTables[0][i] = (mappingData[(i >> 4) + 16] << 8) | mappingData[i & 0x0F];
+ _cgaDitheringTables[1][i] = (mappingData[i >> 4] << 8) | mappingData[(i & 0x0F) + 16];
}
}
@@ -1509,42 +1509,42 @@ void OldDOSFont::drawChar(uint16 c, byte *dst, int pitch) const {
if (_width == 6) {
switch (c) {
case 0x81:
- case 0x9a:
- c = 0x5d;
+ case 0x9A:
+ c = 0x5D;
break;
case 0x84:
- case 0x8e:
- c = 0x5b;
+ case 0x8E:
+ c = 0x5B;
break;
case 0x94:
case 0x99:
c = 0x40;
- case 0xe1:
+ case 0xE1:
// TODO: recheck this: no conversion for 'п' ?
break;
}
} else if (_width == 8) {
switch (c) {
case 0x81:
- case 0x9a:
- case 0x5d:
- c = 0x1d;
+ case 0x9A:
+ case 0x5D:
+ c = 0x1D;
break;
case 0x84:
- case 0x5b:
- c = 0x1e;
+ case 0x5B:
+ c = 0x1E;
break;
case 0x94:
case 0x40:
- c = 0x1f;
+ c = 0x1F;
break;
- case 0x8e:
- c = 0x1b;
+ case 0x8E:
+ c = 0x1B;
break;
case 0x99:
- c = 0x1c;
+ c = 0x1C;
break;
- case 0xe1:
+ case 0xE1:
c = 0x19;
break;
}
@@ -1564,8 +1564,8 @@ void OldDOSFont::drawChar(uint16 c, byte *dst, int pitch) const {
uint16 cgaMask2 = cgaColorMask[color2 & 3];
if (_renderMode == Common::kRenderCGA || _renderMode == Common::kRenderEGA) {
- color1 &= 0x0f;
- color2 &= 0x0f;
+ color1 &= 0x0F;
+ color2 &= 0x0F;
}
int cH = _height;
@@ -1596,7 +1596,7 @@ void OldDOSFont::drawChar(uint16 c, byte *dst, int pitch) const {
uint8 sh = 6;
for (int i = 0; i < _width; i++) {
cDst |= ((dst[i] & 3) << sh);
- sh = (sh - 2) & 0x0f;
+ sh = (sh - 2) & 0x0F;
}
uint16 out = (~(cmp1 | cmp2) & cDst) | (cmp1 & cgaMask1) | (cmp2 & cgaMask2);
@@ -1604,7 +1604,7 @@ void OldDOSFont::drawChar(uint16 c, byte *dst, int pitch) const {
sh = 6;
for (int i = 0; i < _width; i++) {
*dst++ = (out >> sh) & 3;
- sh = (sh - 2) & 0x0f;
+ sh = (sh - 2) & 0x0F;
}
last = s;
diff --git a/engines/kyra/screen_hof.cpp b/engines/kyra/screen_hof.cpp
index a8ec2cc4ca..b7de7988b8 100644
--- a/engines/kyra/screen_hof.cpp
+++ b/engines/kyra/screen_hof.cpp
@@ -34,16 +34,16 @@ void Screen_HoF::generateGrayOverlay(const Palette &srcPal, uint8 *grayOverlay,
for (int i = 0; i != lastColor; i++) {
if (flag) {
- int v = ((((srcPal[3 * i] & 0x3f) + (srcPal[3 * i + 1] & 0x3f)
- + (srcPal[3 * i + 2] & 0x3f)) / 3) * factor) / 0x40;
- tmpPal[3 * i] = tmpPal[3 * i + 1] = tmpPal[3 * i + 2] = v & 0xff;
+ int v = ((((srcPal[3 * i] & 0x3F) + (srcPal[3 * i + 1] & 0x3F)
+ + (srcPal[3 * i + 2] & 0x3F)) / 3) * factor) / 0x40;
+ tmpPal[3 * i] = tmpPal[3 * i + 1] = tmpPal[3 * i + 2] = v & 0xFF;
} else {
- int v = (((srcPal[3 * i] & 0x3f) * factor) / 0x40) + addR;
- tmpPal[3 * i] = (v > 0x3f) ? 0x3f : v & 0xff;
- v = (((srcPal[3 * i + 1] & 0x3f) * factor) / 0x40) + addG;
- tmpPal[3 * i + 1] = (v > 0x3f) ? 0x3f : v & 0xff;
- v = (((srcPal[3 * i + 2] & 0x3f) * factor) / 0x40) + addB;
- tmpPal[3 * i + 2] = (v > 0x3f) ? 0x3f : v & 0xff;
+ int v = (((srcPal[3 * i] & 0x3F) * factor) / 0x40) + addR;
+ tmpPal[3 * i] = (v > 0x3F) ? 0x3F : v & 0xFF;
+ v = (((srcPal[3 * i + 1] & 0x3F) * factor) / 0x40) + addG;
+ tmpPal[3 * i + 1] = (v > 0x3F) ? 0x3F : v & 0xFF;
+ v = (((srcPal[3 * i + 2] & 0x3F) * factor) / 0x40) + addB;
+ tmpPal[3 * i + 2] = (v > 0x3F) ? 0x3F : v & 0xFF;
}
}
diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp
index 4e64f51269..16a77c8fcb 100644
--- a/engines/kyra/screen_lol.cpp
+++ b/engines/kyra/screen_lol.cpp
@@ -133,12 +133,12 @@ void Screen_LoL::generateGrayOverlay(const Palette &srcPal, uint8 *grayOverlay,
Palette tmpPal(lastColor);
for (int i = 0; i != lastColor; i++) {
- int v = (((srcPal[3 * i] & 0x3f) * factor) / 0x40) + addR;
- tmpPal[3 * i] = (v > 0x3f) ? 0x3f : v & 0xff;
- v = (((srcPal[3 * i + 1] & 0x3f) * factor) / 0x40) + addG;
- tmpPal[3 * i + 1] = (v > 0x3f) ? 0x3f : v & 0xff;
- v = (((srcPal[3 * i + 2] & 0x3f) * factor) / 0x40) + addB;
- tmpPal[3 * i + 2] = (v > 0x3f) ? 0x3f : v & 0xff;
+ int v = (((srcPal[3 * i] & 0x3F) * factor) / 0x40) + addR;
+ tmpPal[3 * i] = (v > 0x3F) ? 0x3F : v & 0xFF;
+ v = (((srcPal[3 * i + 1] & 0x3F) * factor) / 0x40) + addG;
+ tmpPal[3 * i + 1] = (v > 0x3F) ? 0x3F : v & 0xFF;
+ v = (((srcPal[3 * i + 2] & 0x3F) * factor) / 0x40) + addB;
+ tmpPal[3 * i + 2] = (v > 0x3F) ? 0x3F : v & 0xFF;
}
for (int i = 0; i < lastColor; i++)
@@ -149,7 +149,7 @@ void Screen_LoL::createTransparencyTablesIntern(const uint8 *ovl, int a, const u
Palette screenPal(256);
screenPal.copy(fxPal2, 0, 256);
- memset(outTable1, 0xff, 256);
+ memset(outTable1, 0xFF, 256);
for (int i = 0; i < a; i++)
outTable1[ovl[i]] = i;
@@ -268,7 +268,7 @@ void Screen_LoL::fadeClearSceneWindow(int delay) {
void Screen_LoL::backupSceneWindow(int srcPageNum, int dstPageNum) {
uint8 *src = getPagePtr(srcPageNum) + 112;
- uint8 *dst = getPagePtr(dstPageNum) + 0xa500;
+ uint8 *dst = getPagePtr(dstPageNum) + 0xA500;
for (int h = 0; h < 120; h++) {
for (int w = 0; w < 176; w++)
@@ -278,7 +278,7 @@ void Screen_LoL::backupSceneWindow(int srcPageNum, int dstPageNum) {
}
void Screen_LoL::restoreSceneWindow(int srcPageNum, int dstPageNum) {
- uint8 *src = getPagePtr(srcPageNum) + 0xa500;
+ uint8 *src = getPagePtr(srcPageNum) + 0xA500;
uint8 *dst = getPagePtr(dstPageNum) + 112;
for (int h = 0; h < 120; h++) {
@@ -292,7 +292,7 @@ void Screen_LoL::restoreSceneWindow(int srcPageNum, int dstPageNum) {
}
void Screen_LoL::clearGuiShapeMemory(int pageNum) {
- uint8 *dst = getPagePtr(pageNum) + 0x79b0;
+ uint8 *dst = getPagePtr(pageNum) + 0x79B0;
for (int i = 0; i < 23; i++) {
memset(dst, 0, 176);
dst += 320;
@@ -300,7 +300,7 @@ void Screen_LoL::clearGuiShapeMemory(int pageNum) {
}
void Screen_LoL::copyGuiShapeFromSceneBackupBuffer(int srcPageNum, int dstPageNum) {
- uint8 *src = getPagePtr(srcPageNum) + 0x79c3;
+ uint8 *src = getPagePtr(srcPageNum) + 0x79C3;
uint8 *dst = getPagePtr(dstPageNum);
for (int i = 0; i < 23; i++) {
@@ -323,7 +323,7 @@ void Screen_LoL::copyGuiShapeFromSceneBackupBuffer(int srcPageNum, int dstPageN
void Screen_LoL::copyGuiShapeToSurface(int srcPageNum, int dstPageNum) {
uint8 *src = getPagePtr(srcPageNum);
- uint8 *dst = getPagePtr(dstPageNum) + 0xe7c3;
+ uint8 *dst = getPagePtr(dstPageNum) + 0xE7C3;
for (int i = 0; i < 23; i++) {
uint8 v = *src++;
@@ -342,8 +342,8 @@ void Screen_LoL::copyGuiShapeToSurface(int srcPageNum, int dstPageNum) {
}
void Screen_LoL::smoothScrollZoomStepTop(int srcPageNum, int dstPageNum, int x, int y) {
- uint8 *src = getPagePtr(srcPageNum) + 0xa500 + y * 176 + x;
- uint8 *dst = getPagePtr(dstPageNum) + 0xa500;
+ uint8 *src = getPagePtr(srcPageNum) + 0xA500 + y * 176 + x;
+ uint8 *dst = getPagePtr(dstPageNum) + 0xA500;
x <<= 1;
uint16 width = 176 - x;
@@ -363,7 +363,7 @@ void Screen_LoL::smoothScrollZoomStepTop(int srcPageNum, int dstPageNum, int x,
do {
scaleXc += scaleX;
int numbytes = cntW + (scaleXc >> 16);
- scaleXc &= 0xffff;
+ scaleXc &= 0xFFFF;
memset(dst, *src++, numbytes);
dst += numbytes;
} while (--widthCnt);
@@ -385,8 +385,8 @@ void Screen_LoL::smoothScrollZoomStepTop(int srcPageNum, int dstPageNum, int x,
}
void Screen_LoL::smoothScrollZoomStepBottom(int srcPageNum, int dstPageNum, int x, int y) {
- uint8 *src = getPagePtr(srcPageNum) + 0xc4a0 + x;
- uint8 *dst = getPagePtr(dstPageNum) + 0xc4a0;
+ uint8 *src = getPagePtr(srcPageNum) + 0xC4A0 + x;
+ uint8 *dst = getPagePtr(dstPageNum) + 0xC4A0;
x <<= 1;
uint16 width = 176 - x;
@@ -406,7 +406,7 @@ void Screen_LoL::smoothScrollZoomStepBottom(int srcPageNum, int dstPageNum, int
do {
scaleXc += scaleX;
int numbytes = cntW + (scaleXc >> 16);
- scaleXc &= 0xffff;
+ scaleXc &= 0xFFFF;
memset(dst, *src++, numbytes);
dst += numbytes;
} while (--widthCnt);
@@ -453,7 +453,7 @@ void Screen_LoL::smoothScrollHorizontalStep(int pageNum, int srcX, int dstX, int
void Screen_LoL::smoothScrollTurnStep1(int srcPage1Num, int srcPage2Num, int dstPageNum) {
uint8 *s = getPagePtr(srcPage1Num) + 273;
- uint8 *d = getPagePtr(dstPageNum) + 0xa500;
+ uint8 *d = getPagePtr(dstPageNum) + 0xA500;
for (int i = 0; i < 120; i++) {
uint8 a = *s++;
@@ -472,7 +472,7 @@ void Screen_LoL::smoothScrollTurnStep1(int srcPage1Num, int srcPage2Num, int dst
}
s = getPagePtr(srcPage2Num) + 112;
- d = getPagePtr(dstPageNum) + 0xa52c;
+ d = getPagePtr(dstPageNum) + 0xA52C;
for (int i = 0; i < 120; i++) {
for (int ii = 0; ii < 33; ii++) {
@@ -490,7 +490,7 @@ void Screen_LoL::smoothScrollTurnStep1(int srcPage1Num, int srcPage2Num, int dst
void Screen_LoL::smoothScrollTurnStep2(int srcPage1Num, int srcPage2Num, int dstPageNum) {
uint8 *s = getPagePtr(srcPage1Num) + 244;
- uint8 *d = getPagePtr(dstPageNum) + 0xa500;
+ uint8 *d = getPagePtr(dstPageNum) + 0xA500;
for (int k = 0; k < 2; k++) {
for (int i = 0; i < 120; i++) {
@@ -505,13 +505,13 @@ void Screen_LoL::smoothScrollTurnStep2(int srcPage1Num, int srcPage2Num, int dst
}
s = getPagePtr(srcPage2Num) + 112;
- d = getPagePtr(dstPageNum) + 0xa558;
+ d = getPagePtr(dstPageNum) + 0xA558;
}
}
void Screen_LoL::smoothScrollTurnStep3(int srcPage1Num, int srcPage2Num, int dstPageNum) {
uint8 *s = getPagePtr(srcPage1Num) + 189;
- uint8 *d = getPagePtr(dstPageNum) + 0xa500;
+ uint8 *d = getPagePtr(dstPageNum) + 0xA500;
for (int i = 0; i < 120; i++) {
for (int ii = 0; ii < 33; ii++) {
@@ -527,7 +527,7 @@ void Screen_LoL::smoothScrollTurnStep3(int srcPage1Num, int srcPage2Num, int dst
}
s = getPagePtr(srcPage2Num) + 112;
- d = getPagePtr(dstPageNum) + 0xa584;
+ d = getPagePtr(dstPageNum) + 0xA584;
for (int i = 0; i < 120; i++) {
for (int ii = 0; ii < 14; ii++) {
@@ -781,8 +781,8 @@ bool Screen_LoL::fadeColor(int dstColorIndex, int srcColorIndex, uint32 elapsedT
for (int i = 0; i < 3; i++) {
if (elapsedTicks < totalTicks) {
- srcV = *src & 0x3f;
- dstV = *dst & 0x3f;
+ srcV = *src & 0x3F;
+ dstV = *dst & 0x3F;
outV = srcV - dstV;
if (outV)
@@ -794,7 +794,7 @@ bool Screen_LoL::fadeColor(int dstColorIndex, int srcColorIndex, uint32 elapsedT
res = false;
}
- tmpPalEntry[i] = outV & 0xff;
+ tmpPalEntry[i] = outV & 0xFF;
src++;
dst++;
p++;
diff --git a/engines/kyra/screen_v2.cpp b/engines/kyra/screen_v2.cpp
index 407d73a8ec..cc7d526ffe 100644
--- a/engines/kyra/screen_v2.cpp
+++ b/engines/kyra/screen_v2.cpp
@@ -117,11 +117,11 @@ void Screen_v2::applyOverlay(int x, int y, int w, int h, int pageNum, const uint
}
int Screen_v2::findLeastDifferentColor(const uint8 *paletteEntry, const Palette &pal, uint8 firstColor, uint16 numColors, bool skipSpecialColors) {
- int m = 0x7fff;
+ int m = 0x7FFF;
int r = 0x101;
for (int i = 0; i < numColors; i++) {
- if (skipSpecialColors && i >= 0xc0 && i <= 0xc3)
+ if (skipSpecialColors && i >= 0xC0 && i <= 0xC3)
continue;
int v = paletteEntry[0] - pal[(i + firstColor) * 3 + 0];
@@ -170,14 +170,14 @@ bool Screen_v2::timedPaletteFadeStep(uint8 *pal1, uint8 *pal2, uint32 elapsedTim
uint8 out = 0;
if (elapsedTime < totalTime) {
- int32 d = ((pal2[i] & 0x3f) - (pal1[i] & 0x3f));
+ int32 d = ((pal2[i] & 0x3F) - (pal1[i] & 0x3F));
if (d)
res = true;
int32 val = ((((d << 8) / (int32)totalTime) * (int32)elapsedTime) >> 8);
- out = ((pal1[i] & 0x3f) + (int8)val);
+ out = ((pal1[i] & 0x3F) + (int8)val);
} else {
- out = p1[i] = (pal2[i] & 0x3f);
+ out = p1[i] = (pal2[i] & 0x3F);
res = false;
}
@@ -311,13 +311,13 @@ void Screen_v2::wsaFrameAnimationStep(int x1, int y1, int x2, int y2,
if (w1 == 1) {
memset(dt, *s, w2);
} else {
- t = ((((((w2 - w1 + 1) & 0xffff) << 8) / w1) + 0x100) & 0xffff) << 8;
+ t = ((((((w2 - w1 + 1) & 0xFFFF) << 8) / w1) + 0x100) & 0xFFFF) << 8;
int bp = 0;
for (int i = 0; i < w1; i++) {
int cnt = (t >> 16);
- bp += (t & 0xffff);
- if (bp > 0xffff) {
- bp -= 0xffff;
+ bp += (t & 0xFFFF);
+ if (bp > 0xFFFF) {
+ bp -= 0xFFFF;
cnt++;
}
memset(dt, *s++, cnt);
@@ -328,13 +328,13 @@ void Screen_v2::wsaFrameAnimationStep(int x1, int y1, int x2, int y2,
if (w2 == 1) {
*dt = *s;
} else {
- t = (((((w1 - w2) & 0xffff) << 8) / w2) & 0xffff) << 8;
+ t = (((((w1 - w2) & 0xFFFF) << 8) / w2) & 0xFFFF) << 8;
int bp = 0;
for (int i = 0; i < w2; i++) {
*dt++ = *s++;
- bp += (t & 0xffff);
- if (bp > 0xffff) {
- bp -= 0xffff;
+ bp += (t & 0xFFFF);
+ if (bp > 0xFFFF) {
+ bp -= 0xFFFF;
s++;
}
s += (t >> 16);
diff --git a/engines/kyra/script_eob.cpp b/engines/kyra/script_eob.cpp
index c07c41f706..e5ccbf2c2e 100644
--- a/engines/kyra/script_eob.cpp
+++ b/engines/kyra/script_eob.cpp
@@ -175,7 +175,7 @@ void EoBInfProcessor::run(int func, int flags) {
uint16 f = _vm->_levelBlockProperties[func].flags;
- uint16 subFlags = ((f & 0xfff8) >> 3) | 0xe0;
+ uint16 subFlags = ((f & 0xFFF8) >> 3) | 0xE0;
if (!(flags & subFlags))
return;
@@ -233,7 +233,7 @@ void EoBInfProcessor::reset() {
}
const char *EoBInfProcessor::getString(uint16 index) {
- if (index == 0xffff)
+ if (index == 0xFFFF)
return 0;
int8 *res = _scriptData + READ_LE_UINT16(_scriptData);
@@ -348,7 +348,7 @@ int EoBInfProcessor::oeob_movePartyOrObject(int8 *data) {
int8 *pos = data;
int8 a = *pos++;
- uint16 b = 0xffff;
+ uint16 b = 0xFFFF;
uint16 c = 0;
uint16 d = 0;
@@ -972,7 +972,7 @@ int EoBInfProcessor::oeob_eval_v2(int8 *data) {
case 9:
switch (*pos++) {
case -36:
- _stack[_stackIndex++] = _vm->_itemTypes[_vm->_items[_vm->_lastUsedItem].type].extraProperties & 0x7f;
+ _stack[_stackIndex++] = _vm->_itemTypes[_vm->_items[_vm->_lastUsedItem].type].extraProperties & 0x7F;
break;
case -31:
_stack[_stackIndex++] = _vm->_items[_vm->_lastUsedItem].type;
@@ -1097,7 +1097,7 @@ int EoBInfProcessor::oeob_eval_v2(int8 *data) {
case 26:
a = 0;
for (i = 0; i < 6; i++) {
- if (_vm->testCharacter(i, 0x0f))
+ if (_vm->testCharacter(i, 0x0F))
a++;
}
_stack[_stackIndex++] = a;
@@ -1260,7 +1260,7 @@ int EoBInfProcessor::oeob_loadNewLevelOrMonsters(int8 *data) {
pos += 2;
uint8 dir = (uint8)*pos++;
- if (dir != 0xff)
+ if (dir != 0xFF)
_vm->_currentDirection = dir;
for (int i = 0; i < 30; i++)
@@ -1328,11 +1328,11 @@ int EoBInfProcessor::oeob_createItem_v1(int8 *data) {
uint8 itmPos = *pos++;
if (itm) {
- if (block == 0xffff && !_vm->_itemInHand) {
+ if (block == 0xFFFF && !_vm->_itemInHand) {
_vm->setHandItem(itm);
debugC(5, kDebugLevelScript, " - create hand item '%d'", itm);
- } else if (block != 0xffff) {
- _vm->setItemPosition((Item *)&_vm->_levelBlockProperties[block & 0x3ff].drawObjects, block, itm, itmPos);
+ } else if (block != 0xFFFF) {
+ _vm->setItemPosition((Item *)&_vm->_levelBlockProperties[block & 0x3FF].drawObjects, block, itm, itmPos);
debugC(5, kDebugLevelScript, " - create item '%d' on block '0x%.04X', position '%d'", itm, block, itmPos);
}
}
@@ -1363,19 +1363,19 @@ int EoBInfProcessor::oeob_createItem_v2(int8 *data) {
if (!itm)
return pos - data;
- if (block == 0xffff) {
+ if (block == 0xFFFF) {
if (!_vm->_itemInHand) {
_vm->setHandItem(itm);
debugC(5, kDebugLevelScript, " - create hand item '%d' (value '%d', flags '0x%X', icon number '%d')", itm, _vm->_items[itm].value, _vm->_items[itm].flags, _vm->_items[itm].icon);
} else {
- _vm->setItemPosition((Item *)&_vm->_levelBlockProperties[_vm->_currentBlock & 0x3ff].drawObjects, _vm->_currentBlock, itm, _itemPos[_vm->rollDice(1, 2, -1)]);
+ _vm->setItemPosition((Item *)&_vm->_levelBlockProperties[_vm->_currentBlock & 0x3FF].drawObjects, _vm->_currentBlock, itm, _itemPos[_vm->rollDice(1, 2, -1)]);
debugC(5, kDebugLevelScript, " - create item '%d' (value '%d', flags '0x%X', icon number '%d') on current block", itm, _vm->_items[itm].value, _vm->_items[itm].flags, _vm->_items[itm].icon);
}
- } else if (block == 0xfffe) {
- _vm->setItemPosition((Item *)&_vm->_levelBlockProperties[_vm->_currentBlock & 0x3ff].drawObjects, _vm->_currentBlock, itm, _itemPos[(_vm->_currentDirection << 2) + _vm->rollDice(1, 2, -1)]);
+ } else if (block == 0xFFFE) {
+ _vm->setItemPosition((Item *)&_vm->_levelBlockProperties[_vm->_currentBlock & 0x3FF].drawObjects, _vm->_currentBlock, itm, _itemPos[(_vm->_currentDirection << 2) + _vm->rollDice(1, 2, -1)]);
debugC(5, kDebugLevelScript, " - create item '%d' (value '%d', flags '0x%X', icon number '%d') on current block", itm, _vm->_items[itm].value, _vm->_items[itm].flags, _vm->_items[itm].icon);
} else {
- _vm->setItemPosition((Item *)&_vm->_levelBlockProperties[block & 0x3ff].drawObjects, block, itm, itmPos);
+ _vm->setItemPosition((Item *)&_vm->_levelBlockProperties[block & 0x3FF].drawObjects, block, itm, itmPos);
debugC(5, kDebugLevelScript, " - create item '%d' (value '%d', flags '0x%X', icon number '%d') on block '0x%.04X', position '%d'", itm, _vm->_items[itm].value, _vm->_items[itm].flags, _vm->_items[itm].icon, block, itmPos);
}
@@ -1530,7 +1530,7 @@ int EoBInfProcessor::oeob_dialogue(int8 *data) {
break;
case -40:
- _dlgResult = _vm->runDialogue(READ_LE_UINT16(pos), READ_LE_UINT16(pos + 6) == 0xffff ? 2 : 3, getString(READ_LE_UINT16(pos + 2)), getString(READ_LE_UINT16(pos + 4)), getString(READ_LE_UINT16(pos + 6)));
+ _dlgResult = _vm->runDialogue(READ_LE_UINT16(pos), READ_LE_UINT16(pos + 6) == 0xFFFF ? 2 : 3, getString(READ_LE_UINT16(pos + 2)), getString(READ_LE_UINT16(pos + 4)), getString(READ_LE_UINT16(pos + 6)));
pos += 8;
break;
diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp
index fca83ae632..5bf8f6e78d 100644
--- a/engines/kyra/script_hof.cpp
+++ b/engines/kyra/script_hof.cpp
@@ -253,7 +253,7 @@ int KyraEngine_HoF::o2_displayWsaSequentialFrames(EMCState *script) {
uint16 currentFrame = stackPos(3);
uint16 lastFrame = stackPos(4);
uint16 index = stackPos(5);
- uint16 copyParam = stackPos(6) | 0xc000;
+ uint16 copyParam = stackPos(6) | 0xC000;
_screen->hideMouse();
@@ -278,7 +278,7 @@ int KyraEngine_HoF::o2_displayWsaSequence(EMCState *script) {
const int frameDelay = stackPos(2) * _tickLength;
const int index = stackPos(3);
const bool doUpdate = (stackPos(4) != 0);
- const uint16 copyParam = stackPos(5) | 0xc000;
+ const uint16 copyParam = stackPos(5) | 0xC000;
_screen->hideMouse();
@@ -319,8 +319,8 @@ int KyraEngine_HoF::o2_drawShape(EMCState *script) {
uint8 *shp = getShapePtr(stackPos(0) + 64);
int x = stackPos(1);
int y = stackPos(2);
- uint8 dsFlag = stackPos(3) & 0xff;
- uint8 modeFlag = stackPos(4) & 0xff;
+ uint8 dsFlag = stackPos(3) & 0xFF;
+ uint8 modeFlag = stackPos(4) & 0xFF;
if (modeFlag) {
_screen->drawShape(2, shp, x, y, 2, dsFlag ? 1 : 0);
@@ -918,7 +918,7 @@ int KyraEngine_HoF::o2_useItemOnMainChar(EMCState *script) {
tmpScript.regs[0] = _mainCharacter.sceneId;
int oldVocH = _vocHigh;
- _vocHigh = 0x5a;
+ _vocHigh = 0x5A;
while (_emc->isValid(&tmpScript))
_emc->run(&tmpScript);
@@ -955,7 +955,7 @@ int KyraEngine_HoF::o2_pressColorKey(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_pressColorKey(%p) (%d)", (const void *)script, stackPos(0));
for (int i = 6; i; i--)
_inputColorCode[i] = _inputColorCode[i - 1];
- _inputColorCode[0] = stackPos(0) & 0xff;
+ _inputColorCode[0] = stackPos(0) & 0xFF;
for (int i = 0; i < 7; i++) {
if (_presetColorCode[i] != _inputColorCode[6 - i])
return _dbgPass;
@@ -1023,8 +1023,8 @@ int KyraEngine_HoF::o2_getColorCodeValue(EMCState *script) {
int KyraEngine_HoF::o2_setColorCodeValue(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_setColorCodeValue(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
- _presetColorCode[stackPos(0)] = stackPos(1) & 0xff;
- return stackPos(1) & 0xff;
+ _presetColorCode[stackPos(0)] = stackPos(1) & 0xFF;
+ return stackPos(1) & 0xFF;
}
int KyraEngine_HoF::o2_countItemInstances(EMCState *script) {
@@ -1495,7 +1495,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
OpcodeUnImpl();
OpcodeUnImpl();
Opcode(o2_setCharacterAnimFrame);
- // 0x0c
+ // 0x0C
Opcode(o2_setCharacterFacingOverwrite);
Opcode(o2_trySceneChange);
Opcode(o2_moveCharacter);
@@ -1515,7 +1515,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
Opcode(o2_wsaOpen);
Opcode(o2_displayWsaSequentialFrames);
Opcode(o2_displayWsaSequence);
- // 0x1c
+ // 0x1C
Opcode(o2_addItemToInventory);
Opcode(o2_drawShape);
Opcode(o2_addItemToCurScene);
@@ -1536,7 +1536,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
Opcode(o1_setGameFlag);
Opcode(o1_setHandItem);
Opcode(o1_removeHandItem);
- // 0x2c
+ // 0x2C
Opcode(o1_getMouseState);
Opcode(o1_hideMouse);
Opcode(o2_addSpecialExit);
@@ -1556,7 +1556,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
Opcode(o2_setTimerDelay);
Opcode(o2_setScaleTableItem);
Opcode(o2_setDrawLayerTableItem);
- // 0x3c
+ // 0x3C
Opcode(o2_setCharPalEntry);
Opcode(o2_loadZShapes);
Opcode(o2_drawSceneShape);
@@ -1576,7 +1576,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
Opcode(o2_restoreInventoryGfx);
Opcode(o2_setSceneAnimPos2);
Opcode(o2_update);
- // 0x4c
+ // 0x4C
OpcodeUnImpl();
Opcode(o2_fadeScenePal);
Opcode(o2_dummy);
@@ -1596,7 +1596,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
Opcode(o1_playSoundEffect);
Opcode(o2_setSceneAnimPos);
Opcode(o1_blockInWalkableRegion);
- // 0x5c
+ // 0x5C
Opcode(o1_blockOutWalkableRegion);
OpcodeUnImpl();
Opcode(o2_setCauldronState);
@@ -1616,7 +1616,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
OpcodeUnImpl();
Opcode(o2_playFireflyScore);
Opcode(o2_waitForConfirmationClick);
- // 0x6c
+ // 0x6C
Opcode(o2_encodeShape);
Opcode(o2_defineRoomEntrance);
Opcode(o2_runAnimationScript);
@@ -1636,7 +1636,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
Opcode(o2_defineScene);
Opcode(o2_addCauldronStateTableEntry);
Opcode(o2_setCountDown);
- // 0x7c
+ // 0x7C
Opcode(o2_getCountDown);
Opcode(o2_dummy);
Opcode(o2_dummy);
@@ -1656,7 +1656,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
Opcode(o2_removeItemFromScene);
Opcode(o2_initObject);
Opcode(o2_npcChat);
- // 0x8c
+ // 0x8C
Opcode(o2_deinitObject);
Opcode(o2_playTimSequence);
Opcode(o2_makeBookOrCauldronAppear);
@@ -1676,27 +1676,27 @@ void KyraEngine_HoF::setupOpcodeTable() {
Opcode(o2_customChatFinish);
Opcode(o2_setupSceneAnimation);
Opcode(o2_stopSceneAnimation);
- // 0x9c
+ // 0x9C
Opcode(o2_disableTimer);
Opcode(o2_enableTimer);
Opcode(o2_setTimerCountdown);
Opcode(o2_processPaletteIndex);
- // 0xa0
+ // 0xA0
Opcode(o2_updateTwoSceneAnims);
Opcode(o2_getRainbowRoomData);
Opcode(o2_drawSceneShapeEx);
Opcode(o2_midiSoundFadeout);
- // 0xa4
+ // 0xA4
Opcode(o2_getSfxDriver);
Opcode(o2_getVocSupport);
Opcode(o2_getMusicDriver);
Opcode(o2_setVocHigh);
- // 0xa8
+ // 0xA8
Opcode(o2_getVocHigh);
Opcode(o2_zanthiaChat);
Opcode(o2_isVoiceEnabled);
Opcode(o2_isVoicePlaying);
- // 0xac
+ // 0xAC
Opcode(o2_stopVoicePlaying);
Opcode(o2_getGameLanguage);
Opcode(o2_demoFinale);
diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp
index db9e01cabb..22d5e9fd7c 100644
--- a/engines/kyra/script_lok.cpp
+++ b/engines/kyra/script_lok.cpp
@@ -1774,7 +1774,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
Opcode(o1_blockInWalkableRegion);
Opcode(o1_blockOutWalkableRegion);
Opcode(o1_walkPlayerToPoint);
- // 0x0c
+ // 0x0C
Opcode(o1_dropItemInScene);
Opcode(o1_drawAnimShapeIntoScene);
Opcode(o1_setHandItem);
@@ -1794,7 +1794,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
Opcode(o1_phaseInSameScene);
Opcode(o1_setScenePhasingFlag);
Opcode(o1_resetScenePhasingFlag);
- // 0x1c
+ // 0x1C
Opcode(o1_queryScenePhasingFlag);
Opcode(o1_sceneToDirection);
Opcode(o1_setBirthstoneGem);
@@ -1814,7 +1814,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
Opcode(o1_openWSAFile);
Opcode(o1_closeWSAFile);
Opcode(o1_runWSAFromBeginningToEnd);
- // 0x2c
+ // 0x2C
Opcode(o1_displayWSAFrame);
Opcode(o1_enterNewScene);
Opcode(o1_setSpecialEnterXAndY);
@@ -1834,7 +1834,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
Opcode(o1_getCharacterY);
Opcode(o1_setCharacterFacing);
Opcode(o1_copyWSARegion);
- // 0x3c
+ // 0x3C
Opcode(o1_printText);
Opcode(o1_getRand);
Opcode(o1_loadSoundFile);
@@ -1854,7 +1854,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
Opcode(o1_placeCharacterInOtherScene);
Opcode(o1_getKey);
Opcode(o1_specificItemInInventory);
- // 0x4c
+ // 0x4C
Opcode(o1_popMobileNPCIntoScene);
Opcode(o1_mobileCharacterInScene);
Opcode(o1_hideMobileCharacter);
@@ -1874,7 +1874,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
Opcode(o1_setCharacterMovementDelay);
Opcode(o1_getCharacterFacing);
Opcode(o1_bkgdScrollSceneAndMasksRight);
- // 0x5c
+ // 0x5C
Opcode(o1_dispelMagicAnimation);
Opcode(o1_findBrightestFireberry);
Opcode(o1_setFireberryGlowPalette);
@@ -1894,7 +1894,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
Opcode(o1_addItemToInventory);
Opcode(o1_intPrint);
Opcode(o1_shakeScreen);
- // 0x6c
+ // 0x6C
Opcode(o1_createAmuletJewel);
Opcode(o1_setSceneAnimCurrXY);
Opcode(o1_poisonBrandonAndRemaps);
@@ -1914,7 +1914,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
Opcode(o1_setMousePos);
Opcode(o1_getMouseState);
Opcode(o1_setEntranceMouseCursorTrack);
- // 0x7c
+ // 0x7C
Opcode(o1_itemAppearsOnGround);
Opcode(o1_setNoDrawShapesFlag);
Opcode(o1_fadeEntirePalette);
@@ -1934,7 +1934,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
Opcode(o1_getScaleDepthTableValue);
Opcode(o1_setScaleDepthTableValue);
Opcode(o1_message);
- // 0x8c
+ // 0x8C
Opcode(o1_checkClickOnNPC);
Opcode(o1_getFoyerItem);
Opcode(o1_setFoyerItem);
@@ -1954,7 +1954,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
Opcode(o1_fillRect);
Opcode(o1_vocUnload);
Opcode(o1_vocLoad);
- // 0x9c
+ // 0x9C
Opcode(o1_dummy);
}
#undef Opcode
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp
index 9c0fe21ad4..0bbe66f530 100644
--- a/engines/kyra/script_lol.cpp
+++ b/engines/kyra/script_lol.cpp
@@ -126,7 +126,7 @@ int LoLEngine::olol_moveParty(EMCState *script) {
mode = (mode - 6 - _currentDirection) & 3;
Button b;
- b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xfe;
+ b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xFE;
b.data0Val3 = b.data1Val3 = b.data2Val3 = 0x01;
switch (mode) {
@@ -268,7 +268,7 @@ int LoLEngine::olol_makeItem(EMCState *script) {
int LoLEngine::olol_placeMoveLevelItem(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_placeMoveLevelItem(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5));
- placeMoveLevelItem(stackPos(0), stackPos(1), stackPos(2), stackPos(3) & 0xff, stackPos(4) & 0xff, stackPos(5));
+ placeMoveLevelItem(stackPos(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF, stackPos(4) & 0xFF, stackPos(5));
return 1;
}
@@ -321,7 +321,7 @@ int LoLEngine::olol_getItemPara(EMCState *script) {
case 14:
return p->unkB;
case 15:
- return i->shpCurFrame_flg & 0x1fff;
+ return i->shpCurFrame_flg & 0x1FFF;
case 16:
return p->flags;
case 17:
@@ -397,7 +397,7 @@ int LoLEngine::olol_setCharacterStat(EMCState *script) {
break;
case 1:
- c->raceClassSex = e & 0x0f;
+ c->raceClassSex = e & 0x0F;
break;
case 5:
@@ -478,19 +478,19 @@ int LoLEngine::olol_loadDoorShapes(EMCState *script) {
_wllWallFlags[i + 3] |= 7;
int t = i % 5;
if (t == 4)
- _wllWallFlags[i + 3] &= 0xf8;
+ _wllWallFlags[i + 3] &= 0xF8;
if (t == 3)
- _wllWallFlags[i + 3] &= 0xfd;
+ _wllWallFlags[i + 3] &= 0xFD;
}
if (stackPos(3)) {
for (int i = 3; i < 13; i++)
- _wllWallFlags[i] &= 0xfd;
+ _wllWallFlags[i] &= 0xFD;
}
if (stackPos(4)) {
for (int i = 13; i < 23; i++)
- _wllWallFlags[i] &= 0xfd;
+ _wllWallFlags[i] &= 0xFD;
}
return 1;
@@ -683,7 +683,7 @@ int LoLEngine::olol_setGlobalVar(EMCState *script) {
break;
case 2:
- _currentLevel = b & 0xff;
+ _currentLevel = b & 0xFF;
break;
case 3:
@@ -691,7 +691,7 @@ int LoLEngine::olol_setGlobalVar(EMCState *script) {
break;
case 4:
- _brightness = b & 0xff;
+ _brightness = b & 0xFF;
break;
case 5:
@@ -717,20 +717,20 @@ int LoLEngine::olol_setGlobalVar(EMCState *script) {
break;
case 9:
- _lampOilStatus = b & 0xff;
+ _lampOilStatus = b & 0xFF;
break;
case 10:
- _sceneDefaultUpdate = b & 0xff;
+ _sceneDefaultUpdate = b & 0xFF;
gui_toggleButtonDisplayMode(0, 0);
break;
case 11:
- _compassBroken = a & 0xff;
+ _compassBroken = a & 0xFF;
break;
case 12:
- _drainMagic = a & 0xff;
+ _drainMagic = a & 0xFF;
break;
default:
@@ -763,9 +763,9 @@ int LoLEngine::olol_checkEquippedItemScriptFlags(EMCState *script) {
int LoLEngine::olol_setDoorState(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_setDoorState(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
if (stackPos(1))
- _levelBlockProperties[stackPos(0)].flags = (_levelBlockProperties[stackPos(0)].flags & 0xef) | 0x20;
+ _levelBlockProperties[stackPos(0)].flags = (_levelBlockProperties[stackPos(0)].flags & 0xEF) | 0x20;
else
- _levelBlockProperties[stackPos(0)].flags &= 0xdf;
+ _levelBlockProperties[stackPos(0)].flags &= 0xDF;
return 1;
}
@@ -784,7 +784,7 @@ int LoLEngine::olol_assignLevelDecorationShape(EMCState *script) {
int LoLEngine::olol_resetBlockShapeAssignment(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_resetBlockShapeAssignment(%p) (%d)", (const void *)script, stackPos(0));
- uint8 v = stackPos(0) & 0xff;
+ uint8 v = stackPos(0) & 0xFF;
memset(_wllShapeMap + 3, v, 5);
memset(_wllShapeMap + 13, v, 5);
return 1;
@@ -823,7 +823,7 @@ int LoLEngine::olol_initMonster(EMCState *script) {
l->type = stackPos(4);
l->properties = &_monsterProperties[l->type];
l->direction = l->facing << 1;
- l->hitPoints = (l->properties->hitPoints * _monsterModifiers[_monsterDifficulty]) >> 8;
+ l->hitPoints = (l->properties->hitPoints * _monsterModifiers1[_monsterDifficulty]) >> 8;
if (_currentLevel != 12 || l->type != 2)
l->hitPoints = (l->hitPoints * (rollDice(1, 128) + 192)) >> 8;
@@ -842,7 +842,7 @@ int LoLEngine::olol_initMonster(EMCState *script) {
l->destDirection = l->direction;
for (int ii = 0; ii < 4; ii++)
- l->equipmentShapes[ii] = stackPos(7 + ii) & 0xff;
+ l->equipmentShapes[ii] = stackPos(7 + ii) & 0xFF;
checkSceneUpdateNeed(l->block);
return i;
@@ -927,7 +927,7 @@ int LoLEngine::olol_loadMonsterProperties(EMCState *script) {
stackPos(35), stackPos(36), stackPos(37), stackPos(38), stackPos(39), stackPos(40), stackPos(41));
LoLMonsterProperty *l = &_monsterProperties[stackPos(0)];
- l->shapeIndex = stackPos(1) & 0xff;
+ l->shapeIndex = stackPos(1) & 0xFF;
int shpWidthMax = 0;
@@ -1079,7 +1079,7 @@ int LoLEngine::olol_addRemoveCharacter(EMCState *script) {
if (!(_characters[i].flags & 1) || _characters[i].id != id)
continue;
- _characters[i].flags &= 0xfffe;
+ _characters[i].flags &= 0xFFFE;
calcCharPortraitXpos();
if (_selectedCharacter == i)
@@ -1192,7 +1192,7 @@ int LoLEngine::olol_changeMonsterStat(EMCState *script) {
if (stackPos(0) == -1)
return 1;
- LoLMonster *m = &_monsters[stackPos(0) & 0x7fff];
+ LoLMonster *m = &_monsters[stackPos(0) & 0x7FFF];
int16 d = stackPos(2);
uint16 x = 0;
@@ -1208,7 +1208,7 @@ int LoLEngine::olol_changeMonsterStat(EMCState *script) {
break;
case 2:
- calcCoordinates(x, y, d, m->x & 0xff, m->y & 0xff);
+ calcCoordinates(x, y, d, m->x & 0xFF, m->y & 0xFF);
if (!walkMonsterCheckDest(x, y, m, 7))
placeMonster(m, x, y);
break;
@@ -1233,7 +1233,7 @@ int LoLEngine::olol_getMonsterStat(EMCState *script) {
if (stackPos(0) == -1)
return 0;
- LoLMonster *m = &_monsters[stackPos(0) & 0x7fff];
+ LoLMonster *m = &_monsters[stackPos(0) & 0x7FFF];
int d = stackPos(1);
switch (d) {
@@ -1318,8 +1318,8 @@ int LoLEngine::olol_drawExitButton(EMCState *script) {
int w = _screen->getTextWidth(str);
if (_flags.use16ColorMode) {
- gui_drawBox(x - offs - w, y - 9, w + offs, 9, 0xee, 0xcc, 0x11);
- _screen->printText(str, x - (offs >> 1) - w, y - 7, 0xbb, 0);
+ gui_drawBox(x - offs - w, y - 9, w + offs, 9, 0xEE, 0xCC, 0x11);
+ _screen->printText(str, x - (offs >> 1) - w, y - 7, 0xBB, 0);
} else {
gui_drawBox(x - offs - w, y - 9, w + offs, 9, 136, 251, 252);
_screen->printText(str, x - (offs >> 1) - w, y - 7, 144, 0);
@@ -1497,7 +1497,7 @@ int LoLEngine::olol_distanceAttack(EMCState *script) {
uint16 y = 0;
calcCoordinates(x, y, stackPos(2), fX, fY);
- if (launchObject(stackPos(0), stackPos(1), x, y, stackPos(5), stackPos(6) << 1, stackPos(7), stackPos(8), 0x3f))
+ if (launchObject(stackPos(0), stackPos(1), x, y, stackPos(5), stackPos(6) << 1, stackPos(7), stackPos(8), 0x3F))
return 1;
deleteItem(stackPos(1));
@@ -1532,7 +1532,7 @@ int LoLEngine::olol_moveBlockObjects(EMCState *script) {
// WORKAROUND for script bug
// Items would vanish when thrown towards the stairs
// in white tower level 3.
- if (_currentLevel == 21 && level == 21 && destBlock == 0x3e0) {
+ if (_currentLevel == 21 && level == 21 && destBlock == 0x3E0) {
level = 20;
destBlock = 0x0247;
}
@@ -1544,7 +1544,7 @@ int LoLEngine::olol_moveBlockObjects(EMCState *script) {
if (!includeMonsters)
continue;
- l &= 0x7fff;
+ l &= 0x7FFF;
LoLMonster *m = &_monsters[l];
@@ -1558,7 +1558,7 @@ int LoLEngine::olol_moveBlockObjects(EMCState *script) {
if (!(_itemsInPlay[l].shpCurFrame_flg & 0x4000) || !includeItems)
continue;
- placeMoveLevelItem(l, level, destBlock, _itemsInPlay[l].x & 0xff, _itemsInPlay[l].y & 0xff, _itemsInPlay[l].flyingHeight);
+ placeMoveLevelItem(l, level, destBlock, _itemsInPlay[l].x & 0xFF, _itemsInPlay[l].y & 0xFF, _itemsInPlay[l].flyingHeight);
res = 1;
if (!runScript || level != _currentLevel)
@@ -1617,7 +1617,7 @@ int LoLEngine::olol_dummy1(EMCState *script) {
int LoLEngine::olol_suspendMonster(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_suspendMonster(%p) (%d)", (const void *)script, stackPos(0));
- LoLMonster *m = &_monsters[stackPos(0) & 0x7fff];
+ LoLMonster *m = &_monsters[stackPos(0) & 0x7FFF];
setMonsterMode(m, 14);
checkSceneUpdateNeed(m->block);
placeMonster(m, 0, 0);
@@ -1732,11 +1732,11 @@ int LoLEngine::olol_getItemOnPos(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_getItemOnPos(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3));
int pX = stackPos(1);
if (pX != -1)
- pX &= 0xff;
+ pX &= 0xFF;
int pY = stackPos(2);
if (pY != -1)
- pY &= 0xff;
+ pY &= 0xFF;
int o = (stackPos(3) || _emcLastItem == -1) ? stackPos(0) : _emcLastItem;
@@ -1744,19 +1744,19 @@ int LoLEngine::olol_getItemOnPos(EMCState *script) {
while (_emcLastItem) {
if (_emcLastItem & 0x8000) {
- o = _emcLastItem & 0x7fff;
+ o = _emcLastItem & 0x7FFF;
_emcLastItem = _levelBlockProperties[o].assignedObjects;
continue;
}
- if (pX != -1 && (_itemsInPlay[_emcLastItem].x & 0xff) != pX) {
- o = _emcLastItem & 0x7fff;
+ if (pX != -1 && (_itemsInPlay[_emcLastItem].x & 0xFF) != pX) {
+ o = _emcLastItem & 0x7FFF;
_emcLastItem = _levelBlockProperties[o].assignedObjects;
continue;
}
- if (pY != -1 && (_itemsInPlay[_emcLastItem].y & 0xff) != pY) {
- o = _emcLastItem & 0x7fff;
+ if (pY != -1 && (_itemsInPlay[_emcLastItem].y & 0xFF) != pY) {
+ o = _emcLastItem & 0x7FFF;
_emcLastItem = _levelBlockProperties[o].assignedObjects;
continue;
}
@@ -1835,7 +1835,7 @@ int LoLEngine::olol_assignCustomSfx(EMCState *script) {
return 0;
uint16 t = READ_LE_UINT16(&_ingameSoundIndex[i << 1]);
- if (t == 0xffff)
+ if (t == 0xFFFF)
return 0;
strcpy(_ingameSoundList[t], c);
@@ -1848,7 +1848,7 @@ int LoLEngine::olol_findAssignedMonster(EMCState *script) {
uint16 o = stackPos(1) == -1 ? _levelBlockProperties[stackPos(0)].assignedObjects : findObject(stackPos(1))->nextAssignedObject;
while (o) {
if (o & 0x8000)
- return o & 0x7fff;
+ return o & 0x7FFF;
o = findObject(o)->nextAssignedObject;
}
return -1;
@@ -1861,8 +1861,8 @@ int LoLEngine::olol_checkBlockForMonster(EMCState *script) {
uint16 o = _levelBlockProperties[block].assignedObjects;
while (o & 0x8000) {
- if (id == 0xffff || id == o)
- return o & 0x7fff;
+ if (id == 0xFFFF || id == o)
+ return o & 0x7FFF;
o = findObject(o)->nextAssignedObject;
}
return -1;
@@ -2040,7 +2040,7 @@ int LoLEngine::olol_changeItemTypeOrFlag(EMCState *script) {
if (stackPos(1) == 4)
i->itemPropertyIndex = val;
else if (stackPos(1) == 15)
- i->shpCurFrame_flg = (i->shpCurFrame_flg & 0xe000) | (val & 0x1fff);
+ i->shpCurFrame_flg = (i->shpCurFrame_flg & 0xE000) | (val & 0x1FFF);
else
val = -1;
@@ -2129,7 +2129,7 @@ int LoLEngine::olol_paletteFlash(EMCState *script) {
uint8 *d = p2.getData();
for (int i = 0; i < 16; i++)
- d[i * 3] = 0x3f;
+ d[i * 3] = 0x3F;
_screen->setScreenPalette(p2);
_screen->updateScreen();
diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp
index 22d0bc4e95..f656b162fd 100644
--- a/engines/kyra/script_mr.cpp
+++ b/engines/kyra/script_mr.cpp
@@ -1144,7 +1144,7 @@ void KyraEngine_MR::setupOpcodeTable() {
Opcode(o3_dummy);
Opcode(o3_dummy);
Opcode(o3_getCharacterFrameFromFacing);
- // 0x0c
+ // 0x0C
Opcode(o2_setCharacterFacingOverwrite);
Opcode(o2_trySceneChange);
Opcode(o2_moveCharacter);
@@ -1164,7 +1164,7 @@ void KyraEngine_MR::setupOpcodeTable() {
Opcode(o3_showAlbum);
Opcode(o3_setInventorySlot);
Opcode(o3_getInventorySlot);
- // 0x1c
+ // 0x1C
Opcode(o3_addItemToInventory);
OpcodeUnImpl();
Opcode(o3_addItemToCurScene);
@@ -1184,7 +1184,7 @@ void KyraEngine_MR::setupOpcodeTable() {
Opcode(o1_setGameFlag);
Opcode(o1_setHandItem);
Opcode(o1_removeHandItem);
- // 0x2c
+ // 0x2C
Opcode(o1_getMouseState);
Opcode(o1_hideMouse);
Opcode(o2_addSpecialExit);
@@ -1204,7 +1204,7 @@ void KyraEngine_MR::setupOpcodeTable() {
Opcode(o3_makeSecondChanceSave);
Opcode(o3_setSceneFilename);
OpcodeUnImpl();
- // 0x3c
+ // 0x3C
Opcode(o3_removeItemsFromScene);
Opcode(o3_disguiseMalcolm);
Opcode(o3_drawSceneShape);
@@ -1224,7 +1224,7 @@ void KyraEngine_MR::setupOpcodeTable() {
Opcode(o3_dummy);
Opcode(o3_setSceneAnimPosAndFrame);
Opcode(o2_update);
- // 0x4c
+ // 0x4C
Opcode(o3_removeItemInstances);
Opcode(o3_dummy);
Opcode(o3_disableInventory);
@@ -1244,7 +1244,7 @@ void KyraEngine_MR::setupOpcodeTable() {
Opcode(o3_playSoundEffect);
Opcode(o3_getScore);
Opcode(o3_daggerWarning);
- // 0x5c
+ // 0x5C
Opcode(o3_blockOutWalkableRegion);
Opcode(o3_dummy);
Opcode(o3_showSceneStringsMessage);
@@ -1264,7 +1264,7 @@ void KyraEngine_MR::setupOpcodeTable() {
Opcode(o3_dummy);
Opcode(o3_dummy);
Opcode(o2_waitForConfirmationClick);
- // 0x6c
+ // 0x6C
Opcode(o3_dummy);
Opcode(o2_defineRoomEntrance);
Opcode(o2_runAnimationScript);
@@ -1284,7 +1284,7 @@ void KyraEngine_MR::setupOpcodeTable() {
Opcode(o2_defineScene);
Opcode(o3_setConversationState);
OpcodeUnImpl();
- // 0x7c
+ // 0x7C
OpcodeUnImpl();
Opcode(o3_getConversationState);
Opcode(o3_dummy);
@@ -1304,7 +1304,7 @@ void KyraEngine_MR::setupOpcodeTable() {
Opcode(o3_dummy);
Opcode(o3_dialogStartScript);
Opcode(o3_dummy);
- // 0x8c
+ // 0x8C
Opcode(o3_dialogEndScript);
Opcode(o3_dummy);
Opcode(o3_dummy);
@@ -1324,27 +1324,27 @@ void KyraEngine_MR::setupOpcodeTable() {
Opcode(o3_customChatFinish);
Opcode(o3_setupSceneAnimObject);
Opcode(o3_removeSceneAnimObject);
- // 0x9c
+ // 0x9C
Opcode(o2_disableTimer);
Opcode(o2_enableTimer);
Opcode(o2_setTimerCountdown);
OpcodeUnImpl();
- // 0xa0
+ // 0xA0
Opcode(o3_dummy);
Opcode(o3_dummy);
Opcode(o3_dummy);
Opcode(o3_dummy);
- // 0xa4
+ // 0xA4
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
Opcode(o2_setVocHigh);
- // 0xa8
+ // 0xA8
Opcode(o2_getVocHigh);
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
- // 0xac
+ // 0xAC
OpcodeUnImpl();
Opcode(o3_dummy);
OpcodeUnImpl();
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index c358091223..ba0f62a2b4 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -297,20 +297,20 @@ void TIMInterpreter::displayText(uint16 textId, int16 flags) {
memcpy(filename, text+1, end-1-text);
}
- const bool isPC98 = (_vm->gameFlags().platform == Common::kPlatformPC98);
+ const bool sjisMode = (_vm->gameFlags().lang == Common::JA_JPN && _vm->gameFlags().use16ColorMode);
if (filename[0] && (_vm->speechEnabled() || !_vm->gameFlags().isTalkie))
_vm->sound()->voicePlay(filename, 0, 255, 255, !_vm->gameFlags().isTalkie);
if (text[0] == '$')
text = strchr(text + 1, '$') + 1;
- if (!isPC98)
+ if (!_vm->gameFlags().use16ColorMode)
setupTextPalette((flags < 0) ? 1 : flags, 0);
if (flags < 0) {
static const uint8 colorMap[] = { 0x00, 0xF0, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
- _screen->setFont(isPC98 ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT);
+ _screen->setFont(sjisMode ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT);
_screen->setTextColorMap(colorMap);
_screen->_charWidth = -2;
}
@@ -335,7 +335,7 @@ void TIMInterpreter::displayText(uint16 textId, int16 flags) {
int width = _screen->getTextWidth(str);
if (flags >= 0) {
- if (isPC98) {
+ if (_vm->gameFlags().use16ColorMode) {
static const uint8 colorMap[] = { 0xE1, 0xE1, 0xC1, 0xA1, 0x81, 0x61 };
_screen->printText(str, (320 - width) >> 1, 160 + heightAdd, colorMap[flags], 0x00);
} else {
@@ -359,7 +359,7 @@ void TIMInterpreter::displayText(uint16 textId, int16 flags) {
if (flags < 0) {
static const uint8 colorMap[] = { 0x00, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0x00, 0x00, 0x00, 0x00 };
- _screen->setFont(isPC98 ? Screen::FID_SJIS_FNT : Screen::FID_INTRO_FNT);
+ _screen->setFont(sjisMode ? Screen::FID_SJIS_FNT : Screen::FID_INTRO_FNT);
_screen->setTextColorMap(colorMap);
_screen->_charWidth = 0;
}
@@ -377,7 +377,7 @@ void TIMInterpreter::displayText(uint16 textId, int16 flags, uint8 color) {
if (flags == 255)
return;
- _screen->setFont(_vm->gameFlags().use16ColorMode ? Screen::FID_SJIS_FNT : Screen::FID_INTRO_FNT);
+ _screen->setFont((_vm->gameFlags().lang == Common::JA_JPN && _vm->gameFlags().use16ColorMode) ? Screen::FID_SJIS_FNT : Screen::FID_INTRO_FNT);
static const uint8 colorMap[] = { 0x00, 0xA0, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
_screen->setTextColorMap(colorMap);
@@ -393,14 +393,14 @@ void TIMInterpreter::displayText(uint16 textId, int16 flags, uint8 color) {
int y = 0;
if (_vm->gameFlags().use16ColorMode) {
- if (color == 0xda)
- color = 0xa1;
- else if (color == 0xf2)
- color = 0xe1;
+ if (color == 0xDA)
+ color = 0xA1;
+ else if (color == 0xF2)
+ color = 0xE1;
else if (flags < 0)
- color = 0xe1;
+ color = 0xE1;
else
- color = 0xc1;
+ color = 0xC1;
}
while (str[0]) {
@@ -1083,7 +1083,7 @@ int TIMInterpreter_LoL::cmd_dialogueBox(const uint16 *param) {
int cnt = 0;
for (int i = 1; i < 4; i++) {
- if (param[i] != 0xffff) {
+ if (param[i] != 0xFFFF) {
tmpStr[i-1] = getTableString(param[i]);
cnt++;
} else {
diff --git a/engines/kyra/sequences_darkmoon.cpp b/engines/kyra/sequences_darkmoon.cpp
index d4f5c847fd..d2e6e85218 100644
--- a/engines/kyra/sequences_darkmoon.cpp
+++ b/engines/kyra/sequences_darkmoon.cpp
@@ -867,7 +867,7 @@ void DarkMoonEngine::seq_playCredits(DarkmoonSequenceHelper *sq, const uint8 *da
int16 nextY = i ? items[i].y + items[i].size + (items[i].size >> 2) : dm->h;
const char *posOld = pos;
- pos = strchr(pos, 0x0d);
+ pos = strchr(pos, 0x0D);
if (!pos)
pos = strchr(posOld, 0x00);
@@ -893,7 +893,7 @@ void DarkMoonEngine::seq_playCredits(DarkmoonSequenceHelper *sq, const uint8 *da
items[i + 1].dataType = 0;
int l = pos - posOld;
- if (items[i + 1].crlf != 0x0d)
+ if (items[i + 1].crlf != 0x0D)
l++;
delete[] items[i + 1].str;
@@ -1071,7 +1071,7 @@ void DarkmoonSequenceHelper::animCommand(int index, int del) {
uint32 end = 0;
- for (const DarkMoonAnimCommand *s = _config->animData[index]; s->command != 0xff && !_vm->skipFlag() && !_vm->shouldQuit(); s++) {
+ for (const DarkMoonAnimCommand *s = _config->animData[index]; s->command != 0xFF && !_vm->skipFlag() && !_vm->shouldQuit(); s++) {
int palIndex = _config->mode == kFinale ? (s->pal + 1) : s->pal;
int x = s->x1;
int y = s->y1;
@@ -1187,7 +1187,7 @@ void DarkmoonSequenceHelper::animCommand(int index, int del) {
case 6:
// play sound effect
- if (s->obj != 0xff)
+ if (s->obj != 0xFF)
_vm->snd_playSoundEffect(s->obj);
break;
diff --git a/engines/kyra/sequences_eob.cpp b/engines/kyra/sequences_eob.cpp
index d28da4df4b..0fec386485 100644
--- a/engines/kyra/sequences_eob.cpp
+++ b/engines/kyra/sequences_eob.cpp
@@ -1061,7 +1061,7 @@ void EoBEngine::seq_playFinale() {
gui_drawBox(0, 0, 176, 175, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
_txt->printDialogueText(51, _moreStrings[0]);
- if (!checkScriptFlags(0x1ffe)) {
+ if (!checkScriptFlags(0x1FFE)) {
_screen->fadeToBlack();
return;
}
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index 207d0ced15..231337e6d4 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -444,8 +444,8 @@ SeqPlayer_HOF::SeqPlayer_HOF(KyraEngine_v1 *vm, Screen_v2 *screen, OSystem *syst
} else {
const MainMenu::StaticData data = {
{ _sequenceStrings[97], _sequenceStrings[96], _sequenceStrings[95], _sequenceStrings[98], 0 },
- { 0x01, 0x04, 0x0C, 0x04, 0x00, 0xd7, 0xd6 },
- { 0xd8, 0xda, 0xd9, 0xd8 },
+ { 0x01, 0x04, 0x0C, 0x04, 0x00, 0xD7, 0xD6 },
+ { 0xD8, 0xDA, 0xD9, 0xD8 },
(_vm->gameFlags().lang == Common::JA_JPN) ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT, 240
};
@@ -1137,7 +1137,7 @@ void SeqPlayer_HOF::startNestedAnimation(int animSlot, int sequenceID) {
_animSlots[animSlot].y = s.y;
_animSlots[animSlot].fadeInTransitionType = s.fadeInTransitionType;
_animSlots[animSlot].fadeOutTransitionType = s.fadeOutTransitionType;
- _animSlots[animSlot].lastFrame = 0xffff;
+ _animSlots[animSlot].lastFrame = 0xFFFF;
doNestedFrameTransition(s.fadeInTransitionType, animSlot);
@@ -1258,7 +1258,7 @@ bool SeqPlayer_HOF::updateNestedAnimation(int animSlot) {
bool res = false;
if (currentFrame >= _animSlots[animSlot].endFrame) {
- int sw = ((_animSlots[animSlot].flags & 0x1e) - 2);
+ int sw = ((_animSlots[animSlot].flags & 0x1E) - 2);
switch (sw) {
case 0:
res = true;
@@ -1488,7 +1488,7 @@ void SeqPlayer_HOF::playHoFTalkieCredits() {
_screen->fadeFromBlack();
_screen->_charWidth = -2;
- uint8 *dataPtr = new uint8[0xafd];
+ uint8 *dataPtr = new uint8[0xAFD];
memcpy(dataPtr, talkieCredits, talkieCreditsSize);
_vm->staticres()->unloadId(k2SeqplayCredits);
@@ -1804,9 +1804,9 @@ int SeqPlayer_HOF::cbHOF_overview(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
_vm->sound()->playTrack(4);
frameEnd = _system->getMillis() + 60 * _vm->tickLength();
- _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
memset(_textColorMap, _textColor[1], 16);
- _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
_screen->setTextColorMap(_textColorMap);
delayUntil(frameEnd);
@@ -1889,9 +1889,9 @@ int SeqPlayer_HOF::cbHOF_library(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
assert(_screenHoF);
_screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
- _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
memset(_textColorMap, _textColor[1], 16);
- _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
_screen->setTextColorMap(_textColorMap);
break;
@@ -1959,9 +1959,9 @@ int SeqPlayer_HOF::cbHOF_hand(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
assert(_screenHoF);
_screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
- _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
memset(_textColorMap, _textColor[1], 16);
- _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
_screen->setTextColorMap(_textColorMap);
break;
@@ -2032,9 +2032,9 @@ int SeqPlayer_HOF::cbHOF_point(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
case 0:
_vm->sound()->playTrack(7);
- _textColor[1] = 0xf7;
+ _textColor[1] = 0xF7;
memset(_textColorMap, _textColor[1], 16);
- _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
_screen->setTextColorMap(_textColorMap);
assert(_screenHoF);
_screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
@@ -2063,9 +2063,9 @@ int SeqPlayer_HOF::cbHOF_zanfaun(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
case 0:
_vm->sound()->playTrack(8);
- _textColor[1] = 0xfd;
+ _textColor[1] = 0xFD;
memset(_textColorMap, _textColor[1], 16);
- _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
_screen->setTextColorMap(_textColorMap);
break;
@@ -2229,9 +2229,9 @@ int SeqPlayer_HOF::cbHOF_funters(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
case 0:
_vm->sound()->playTrack(3);
- _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
memset(_textColorMap, _textColor[1], 16);
- _textColor[0] = _textColorMap[1] = 0xff;
+ _textColor[0] = _textColorMap[1] = 0xFF;
_screen->setTextColorMap(_textColorMap);
frameEnd = _system->getMillis() + 480 * _vm->tickLength();
@@ -2322,7 +2322,7 @@ int SeqPlayer_HOF::cbHOF_ferb(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
break;
case 0:
- _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
memset(_textColorMap, _textColor[1], 16);
_textColor[0] = _textColorMap[1] = 255;
_screen->setTextColorMap(_textColorMap);
@@ -2404,9 +2404,9 @@ int SeqPlayer_HOF::cbHOF_fish(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
break;
case 0:
- _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
memset(_textColorMap, _textColor[1], 16);
- _textColor[0] = _textColorMap[1] = 0xff;
+ _textColor[0] = _textColorMap[1] = 0xFF;
_screen->setTextColorMap(_textColorMap);
break;
@@ -2494,9 +2494,9 @@ int SeqPlayer_HOF::cbHOF_fheep(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
break;
case 0:
- _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
memset(_textColorMap, _textColor[1], 16);
- _textColor[0] = _textColorMap[1] = 0xff;
+ _textColor[0] = _textColorMap[1] = 0xFF;
_screen->setTextColorMap(_textColorMap);
break;
@@ -2570,9 +2570,9 @@ int SeqPlayer_HOF::cbHOF_farmer(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
break;
case 0:
- _textColor[1] = 1 + (_screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 254) & 0xff);
+ _textColor[1] = 1 + (_screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 254) & 0xFF);
memset(_textColorMap, _textColor[1], 16);
- _textColorMap[1] = _textColor[0] = 1 + (_screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 254) & 0xff);
+ _textColorMap[1] = _textColor[0] = 1 + (_screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 254) & 0xFF);
_screen->setTextColorMap(_textColorMap);
playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 30 : 26);
break;
@@ -2643,10 +2643,10 @@ int SeqPlayer_HOF::cbHOF_fuards(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
case 0:
for (int i = 0; i < 0x300; i++)
- _screen->getPalette(0)[i] &= 0x3f;
+ _screen->getPalette(0)[i] &= 0x3F;
_textColor[1] = 0xCf;
memset(_textColorMap, _textColor[1], 16);
- _textColor[0] = _textColorMap[1] = 0xfe;
+ _textColor[0] = _textColorMap[1] = 0xFE;
_screen->setTextColorMap(_textColorMap);
break;
@@ -2732,9 +2732,9 @@ int SeqPlayer_HOF::cbHOF_firates(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
break;
case 0:
- _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
memset(_textColorMap, _textColor[1], 16);
- _textColor[0] = _textColorMap[1] = 0xff;
+ _textColor[0] = _textColorMap[1] = 0xFF;
_screen->setTextColorMap(_textColorMap);
break;
@@ -2819,9 +2819,9 @@ int SeqPlayer_HOF::cbHOF_frash(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
case 0:
if (_callbackCurrentFrame == 1) {
_vm->sound()->playTrack(4);
- _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
memset(_textColorMap, _textColor[1], 16);
- _textColor[0] = _textColorMap[1] = 0xff;
+ _textColor[0] = _textColorMap[1] = 0xFF;
_screen->setTextColorMap(_textColorMap);
}
_animDuration = 10;
@@ -3054,7 +3054,7 @@ int SeqPlayer_HOF::cbHOFDEMO_fisher(WSAMovie_v2 *wsaObj, int x, int y, int frm)
startNestedAnimation(1, kNestedSequenceHoFDemoDig);
}
- if (_scrollProgressCounter >= 0x18f && !_callbackCurrentFrame)
+ if (_scrollProgressCounter >= 0x18F && !_callbackCurrentFrame)
return 0;
if (!_callbackCurrentFrame) {
@@ -3067,15 +3067,15 @@ int SeqPlayer_HOF::cbHOFDEMO_fisher(WSAMovie_v2 *wsaObj, int x, int y, int frm)
updateDemoAdText(24, 144);
_callbackCurrentFrame++;
- if (_callbackCurrentFrame < 0x256 || _callbackCurrentFrame > 0x31c) {
- if (_callbackCurrentFrame < 0x174 || _callbackCurrentFrame > 0x1d7) {
- if (_callbackCurrentFrame < 0x84 || _callbackCurrentFrame > 0xe7) {
+ if (_callbackCurrentFrame < 0x256 || _callbackCurrentFrame > 0x31C) {
+ if (_callbackCurrentFrame < 0x174 || _callbackCurrentFrame > 0x1D7) {
+ if (_callbackCurrentFrame < 0x84 || _callbackCurrentFrame > 0xE7) {
_scrollProgressCounter++;
}
}
}
- if (_callbackCurrentFrame > 0x31e) {
+ if (_callbackCurrentFrame > 0x31E) {
closeNestedAnimation(0);
closeNestedAnimation(1);
setCountDown(0);
@@ -3152,8 +3152,8 @@ int SeqPlayer_HOF::cbLOLDEMO_scene1(WSAMovie_v2 *wsaObj, int x, int y, int frm)
for (int i = 3; i < 768; i++) {
tmpPal[i] = ((int)tmpPal[i] * 120) / 64;
- if (tmpPal[i] > 0x3f)
- tmpPal[i] = 0x3f;
+ if (tmpPal[i] > 0x3F)
+ tmpPal[i] = 0x3F;
}
playSoundAndDisplaySubTitle(_vm->_rnd.getRandomBit());
@@ -3293,8 +3293,8 @@ int SeqPlayer_HOF::cbLOLDEMO_scene6(WSAMovie_v2 *wsaObj, int x, int y, int frm)
for (int i = 3; i < 0x300; i++) {
tmpPal[i] = ((int)tmpPal[i] * 120) / 64;
- if (tmpPal[i] > 0x3f)
- tmpPal[i] = 0x3f;
+ if (tmpPal[i] > 0x3F)
+ tmpPal[i] = 0x3F;
}
playSoundAndDisplaySubTitle(_vm->_rnd.getRandomBit());
@@ -3325,7 +3325,7 @@ int SeqPlayer_HOF::cbLOLDEMO_scene6(WSAMovie_v2 *wsaObj, int x, int y, int frm)
#undef CASE_ALT
-const uint8 SeqPlayer_HOF::_textColorPresets[] = { 0x01, 0x01, 0x00, 0x3f, 0x3f, 0x3f };
+const uint8 SeqPlayer_HOF::_textColorPresets[] = { 0x01, 0x01, 0x00, 0x3F, 0x3F, 0x3F };
void KyraEngine_HoF::seq_showStarcraftLogo() {
WSAMovie_v2 *ci = new WSAMovie_v2(this);
diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp
index e63d0a7d8f..994bd2ba9b 100644
--- a/engines/kyra/sequences_lok.cpp
+++ b/engines/kyra/sequences_lok.cpp
@@ -1207,7 +1207,7 @@ struct CreditsLine {
void KyraEngine_LoK::seq_playCredits() {
static const uint8 colorMap[] = { 0, 0, 0xC, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
- static const char stringTerms[] = { 0x5, 0xd, 0x0};
+ static const char stringTerms[] = { 0x5, 0xD, 0x0};
typedef Common::List<CreditsLine> CreditsLineList;
CreditsLineList lines;
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index 83005367d7..c8f97eb770 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -72,7 +72,7 @@ int LoLEngine::processPrologue() {
// Original version: (260|193) "V CD1.02 D"
const int width = _screen->getTextWidth(versionString.c_str());
_screen->fprintString("%s", 320 - width, 193, 0x67, 0x00, 0x04, versionString.c_str());
- _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_9_FNT);
+ _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_FNT : Screen::FID_9_FNT);
_screen->fadePalette(_screen->getPalette(0), 0x1E);
_screen->updateScreen();
@@ -145,7 +145,12 @@ void LoLEngine::setupPrologueData(bool load) {
static const char *const fileListFloppy[] = {
"INTRO.PAK", "INTROVOC.PAK", 0
};
- const char *const *fileList = _flags.isTalkie ? fileListCD : fileListFloppy;
+
+ static const char *const fileListTowns[] = {
+ "INTRO.PAK", "TINTROVO.PAK", 0
+ };
+
+ const char *const *fileList = _flags.isTalkie ? fileListCD : (_flags.platform == Common::kPlatformFMTowns ? fileListTowns : fileListFloppy);
char filename[32];
for (uint i = 0; fileList[i]; ++i) {
@@ -225,7 +230,7 @@ void LoLEngine::showIntro() {
_screen->loadFont(Screen::FID_8_FNT, "NEW8P.FNT");
_screen->loadFont(Screen::FID_INTRO_FNT, "INTRO.FNT");
- _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT);
+ _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT);
_tim->resetFinishedFlag();
_tim->setLangData("LOLINTRO.DIP");
@@ -295,10 +300,10 @@ int LoLEngine::chooseCharacter() {
_chargenWSA->displayFrame(0, 2, 113, 0, 0, 0, 0);
- _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_9_FNT);
+ _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_FNT : Screen::FID_9_FNT);
_screen->_curPage = 2;
- if (_flags.platform == Common::kPlatformPC98) {
+ if (_flags.platform == Common::kPlatformPC98 && _flags.use16ColorMode) {
_screen->fillRect(17, 29, 94, 97, 17);
_screen->fillRect(68, 167, 310, 199, 17);
_screen->drawClippedLine(68, 166, 311, 166, 238);
@@ -310,7 +315,7 @@ int LoLEngine::chooseCharacter() {
_screen->_curPage = 2;
for (int i = 0; i < 4; ++i) {
- _screen->printText((const char *)_charNamesPC98[i], _charPosXPC98[i], 168, 0xC1, 0x00);
+ _screen->printText(_charNamesJapanese[i], _charPosXPC98[i], 168, 0xC1, 0x00);
Screen::FontId old = _screen->setFont(Screen::FID_SJIS_FNT);
for (int j = 0; j < 3; ++j) {
@@ -324,7 +329,7 @@ int LoLEngine::chooseCharacter() {
_screen->printText(_tim->getCTableEntry(53), 72, 184, 0x81, 0x00);
_screen->printText(_tim->getCTableEntry(55), 72, 192, 0x81, 0x00);
} else {
- const char *const *previewNames = (_flags.lang == Common::RU_RUS && !_flags.isTalkie) ? _charPreviewNamesRussianFloppy : _charPreviewNamesDefault;
+ const char *const *previewNames = (_flags.lang == Common::RU_RUS && !_flags.isTalkie) ? _charPreviewNamesRussianFloppy : (_flags.lang == Common::JA_JPN ? _charNamesJapanese : _charPreviewNamesDefault);
for (int i = 0; i < 4; ++i) {
_screen->fprintStringIntro("%s", _charPreviews[i].x + 16, _charPreviews[i].y + 36, 0xC0, 0x00, 0x9C, 0x120, previewNames[i]);
_screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 48, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[0]);
@@ -716,7 +721,7 @@ void LoLEngine::showStarcraftLogo() {
_screen->fadeFromBlack();
int inputFlag = 0;
for (int i = 0; i < endframe; i++) {
- inputFlag = checkInput(0) & 0xff;
+ inputFlag = checkInput(0) & 0xFF;
if (shouldQuit() || inputFlag)
break;
ci->displayFrame(i, 2, 32, 80, 0, 0, 0);
@@ -728,7 +733,7 @@ void LoLEngine::showStarcraftLogo() {
if (!(shouldQuit() || inputFlag)) {
_sound->voicePlay("star2", &_speechHandle);
while (_sound->voiceIsPlaying(&_speechHandle) && !(shouldQuit() || inputFlag)) {
- inputFlag = checkInput(0) & 0xff;
+ inputFlag = checkInput(0) & 0xFF;
delay(_tickLength);
}
}
@@ -1015,7 +1020,11 @@ void LoLEngine::setupEpilogueData(bool load) {
"GENERAL.PAK", "INTRO.PAK", "FINALE1.PAK", "FINALE2.PAK", 0
};
- const char *const *fileList = _flags.isTalkie ? fileListCD : fileListFloppy;
+ static const char *const fileListTowns[] = {
+ "GENERAL.PAK", "INTRO.PAK", "FINALE1.PAK", "TFINALE2.PAK", 0
+ };
+
+ const char *const *fileList = _flags.isTalkie ? fileListCD : (_flags.platform == Common::kPlatformFMTowns ? fileListTowns : fileListFloppy);
assert(fileList);
char filename[32];
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index 9119fb44fa..2f5a0b6121 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -165,7 +165,7 @@ public:
*
* @param track sound effect id
*/
- virtual void playSoundEffect(uint8 track, uint8 volume = 0xff) = 0;
+ virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF) = 0;
/**
* Stop playback of all sfx tracks.
@@ -319,7 +319,7 @@ public:
virtual void haltTrack();
virtual bool isPlaying() const;
- virtual void playSoundEffect(uint8 track, uint8 volume = 0xff);
+ virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
virtual void stopAllSoundEffects();
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 958cfcbcb4..1d665709e5 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -683,14 +683,14 @@ void AdLibDriver::adjustSfxData(uint8 *ptr, int volume) {
_sfxVelocity = ptr[3];
// Adjust the values.
- if (volume != 0xff) {
+ if (volume != 0xFF) {
if (_version >= 3) {
int newVal = ((((ptr[3]) + 63) * volume) >> 8) & 0xFF;
ptr[3] = -newVal + 63;
ptr[1] = ((ptr[1] * volume) >> 8) & 0xFF;
} else {
- int newVal = ((_sfxVelocity << 2) ^ 0xff) * volume;
- ptr[3] = (newVal >> 10) ^ 0x3f;
+ int newVal = ((_sfxVelocity << 2) ^ 0xFF) * volume;
+ ptr[3] = (newVal >> 10) ^ 0x3F;
ptr[1] = newVal >> 11;
}
}
@@ -2375,7 +2375,7 @@ void SoundAdLibPC::playTrack(uint8 track) {
_driver->setSyncJumpMask(0x000F);
else
_driver->setSyncJumpMask(0);
- play(track, 0xff);
+ play(track, 0xFF);
}
}
@@ -2409,7 +2409,7 @@ void SoundAdLibPC::play(uint8 track, uint8 volume) {
}
void SoundAdLibPC::beginFadeOut() {
- play(_version > 2 ? 1 : 15, 0xff);
+ play(_version > 2 ? 1 : 15, 0xFF);
}
int SoundAdLibPC::checkTrigger() {
diff --git a/engines/kyra/sound_adlib.h b/engines/kyra/sound_adlib.h
index f78d812670..f8486499ab 100644
--- a/engines/kyra/sound_adlib.h
+++ b/engines/kyra/sound_adlib.h
@@ -79,7 +79,7 @@ public:
virtual void haltTrack();
virtual bool isPlaying() const;
- virtual void playSoundEffect(uint8 track, uint8 volume = 0xff);
+ virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
virtual void beginFadeOut();
diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp
index 6ff1c3d2ea..518805c43e 100644
--- a/engines/kyra/sound_digital.cpp
+++ b/engines/kyra/sound_digital.cpp
@@ -271,8 +271,8 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) {
while (outSize > 0) {
input = _inBuffer[i++] << 2;
- code = (input >> 8) & 0xff;
- count = (input & 0xff) >> 2;
+ code = (input >> 8) & 0xFF;
+ count = (input & 0xFF) >> 2;
switch (code) {
case 2:
@@ -294,7 +294,7 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) {
for (; count >= 0; count--) {
code = _inBuffer[i++];
- curSample += WSTable4Bit[code & 0x0f];
+ curSample += WSTable4Bit[code & 0x0F];
curSample = clip8BitSample(curSample);
_outBuffer[j++] = curSample;
diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h
index c5cf2658aa..007ca3d3f5 100644
--- a/engines/kyra/sound_intern.h
+++ b/engines/kyra/sound_intern.h
@@ -54,31 +54,31 @@ class MidiOutput;
class SoundMidiPC : public Sound {
public:
SoundMidiPC(KyraEngine_v1 *vm, Audio::Mixer *mixer, MidiDriver *driver, kType type);
- ~SoundMidiPC();
+ virtual ~SoundMidiPC();
- kType getMusicType() const { return _type; }
+ virtual kType getMusicType() const { return _type; }
- bool init();
+ virtual bool init();
- void updateVolumeSettings();
+ virtual void updateVolumeSettings();
- void initAudioResourceInfo(int set, void *info);
- void selectAudioResourceSet(int set);
- bool hasSoundFile(uint file) const;
- void loadSoundFile(uint file);
- void loadSoundFile(Common::String file);
- void loadSfxFile(Common::String file);
+ virtual void initAudioResourceInfo(int set, void *info);
+ virtual void selectAudioResourceSet(int set);
+ virtual bool hasSoundFile(uint file) const;
+ virtual void loadSoundFile(uint file);
+ virtual void loadSoundFile(Common::String file);
+ virtual void loadSfxFile(Common::String file);
- void playTrack(uint8 track);
- void haltTrack();
- bool isPlaying() const;
+ virtual void playTrack(uint8 track);
+ virtual void haltTrack();
+ virtual bool isPlaying() const;
- void playSoundEffect(uint8 track, uint8 volume = 0xff);
- void stopAllSoundEffects();
+ virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
+ virtual void stopAllSoundEffects();
- void beginFadeOut();
+ virtual void beginFadeOut();
- void pause(bool paused);
+ virtual void pause(bool paused);
private:
static void onTimer(void *data);
@@ -113,28 +113,28 @@ private:
class SoundTowns : public Sound {
public:
SoundTowns(KyraEngine_v1 *vm, Audio::Mixer *mixer);
- ~SoundTowns();
+ virtual ~SoundTowns();
- kType getMusicType() const { return kTowns; }
+ virtual kType getMusicType() const { return kTowns; }
- bool init();
- void process();
+ virtual bool init();
+ virtual void process();
- void initAudioResourceInfo(int set, void *info);
- void selectAudioResourceSet(int set);
- bool hasSoundFile(uint file) const;
- void loadSoundFile(uint file);
- void loadSoundFile(Common::String) {}
+ virtual void initAudioResourceInfo(int set, void *info);
+ virtual void selectAudioResourceSet(int set);
+ virtual bool hasSoundFile(uint file) const;
+ virtual void loadSoundFile(uint file);
+ virtual void loadSoundFile(Common::String) {}
- void playTrack(uint8 track);
- void haltTrack();
+ virtual void playTrack(uint8 track);
+ virtual void haltTrack();
- void playSoundEffect(uint8 track, uint8 volume = 0xff);
- void stopAllSoundEffects();
+ virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
+ virtual void stopAllSoundEffects();
- void beginFadeOut();
+ virtual void beginFadeOut();
- void updateVolumeSettings();
+ virtual void updateVolumeSettings();
private:
bool loadInstruments();
@@ -167,27 +167,26 @@ private:
class SoundPC98 : public Sound {
public:
SoundPC98(KyraEngine_v1 *vm, Audio::Mixer *mixer);
- ~SoundPC98();
+ virtual ~SoundPC98();
virtual kType getMusicType() const { return kPC98; }
- bool init();
+ virtual bool init();
- void process() {}
- void initAudioResourceInfo(int set, void *info);
- void selectAudioResourceSet(int set);
- bool hasSoundFile(uint file) const;
- void loadSoundFile(uint file);
- void loadSoundFile(Common::String file);
+ virtual void initAudioResourceInfo(int set, void *info);
+ virtual void selectAudioResourceSet(int set);
+ virtual bool hasSoundFile(uint file) const;
+ virtual void loadSoundFile(uint file);
+ virtual void loadSoundFile(Common::String file);
- void playTrack(uint8 track);
- void haltTrack();
- void beginFadeOut();
+ virtual void playTrack(uint8 track);
+ virtual void haltTrack();
+ virtual void beginFadeOut();
- int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, bool isSfx) { return -1; }
- void playSoundEffect(uint8 track, uint8 volume = 0xff);
+ virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool isSfx) override { return -1; }
+ virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
- void updateVolumeSettings();
+ virtual void updateVolumeSettings();
private:
int _lastTrack;
@@ -203,27 +202,27 @@ private:
class SoundTownsPC98_v2 : public Sound {
public:
SoundTownsPC98_v2(KyraEngine_v1 *vm, Audio::Mixer *mixer);
- ~SoundTownsPC98_v2();
+ virtual ~SoundTownsPC98_v2();
- kType getMusicType() const { return _vm->gameFlags().platform == Common::kPlatformFMTowns ? kTowns : kPC98; }
+ virtual kType getMusicType() const { return _vm->gameFlags().platform == Common::kPlatformFMTowns ? kTowns : kPC98; }
- bool init();
- void process();
+ virtual bool init();
+ virtual void process();
- void initAudioResourceInfo(int set, void *info);
- void selectAudioResourceSet(int set);
- bool hasSoundFile(uint file) const;
- void loadSoundFile(uint file) {}
- void loadSoundFile(Common::String file);
+ virtual void initAudioResourceInfo(int set, void *info);
+ virtual void selectAudioResourceSet(int set);
+ virtual bool hasSoundFile(uint file) const;
+ virtual void loadSoundFile(uint file) {}
+ virtual void loadSoundFile(Common::String file);
- void playTrack(uint8 track);
- void haltTrack();
- void beginFadeOut();
+ virtual void playTrack(uint8 track);
+ virtual void haltTrack();
+ virtual void beginFadeOut();
- int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume = 255, uint8 priority = 255, bool isSfx = true);
- void playSoundEffect(uint8 track, uint8 volume = 0xff);
+ virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume = 255, uint8 priority = 255, bool isSfx = true) override;
+ virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
- void updateVolumeSettings();
+ virtual void updateVolumeSettings();
private:
Audio::AudioStream *_currentSFX;
@@ -319,26 +318,24 @@ struct AmigaSfxTable {
class SoundAmiga : public Sound {
public:
SoundAmiga(KyraEngine_v1 *vm, Audio::Mixer *mixer);
- ~SoundAmiga();
+ virtual ~SoundAmiga();
virtual kType getMusicType() const { return kAmiga; } //FIXME
- bool init();
+ virtual bool init();
- void process() {}
+ virtual void initAudioResourceInfo(int set, void *info);
+ virtual void selectAudioResourceSet(int set);
+ virtual bool hasSoundFile(uint file) const;
+ virtual void loadSoundFile(uint file);
+ virtual void loadSoundFile(Common::String) {}
- void initAudioResourceInfo(int set, void *info);
- void selectAudioResourceSet(int set);
- bool hasSoundFile(uint file) const;
- void loadSoundFile(uint file);
- void loadSoundFile(Common::String) {}
+ virtual void playTrack(uint8 track);
+ virtual void haltTrack();
+ virtual void beginFadeOut();
- void playTrack(uint8 track);
- void haltTrack();
- void beginFadeOut();
-
- int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, bool isSfx) { return -1; }
- void playSoundEffect(uint8 track, uint8 volume = 0xff);
+ virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool isSfx) override { return -1; }
+ virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
protected:
Audio::MaxTrax *_driver;
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp
index 3c2c931445..48230d025c 100644
--- a/engines/kyra/sound_lol.cpp
+++ b/engines/kyra/sound_lol.cpp
@@ -60,7 +60,7 @@ bool LoLEngine::snd_playCharacterSpeech(int id, int8 speaker, int) {
Common::String pattern2 = Common::String::format("%02d", id & 0x4000 ? 0 : _curTlkFile);
if (id & 0x4000) {
- pattern1 = Common::String::format("%03X", id & 0x3fff);
+ pattern1 = Common::String::format("%03X", id & 0x3FFF);
} else if (id < 1000) {
pattern1 = Common::String::format("%03d", id);
} else {
@@ -164,7 +164,7 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) {
if (track == -1 || track >= _ingameSoundListSize)
return;
- volume &= 0xff;
+ volume &= 0xFF;
int16 prIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2 + 1]);
uint16 priority = (prIndex > 0) ? (prIndex * volume) >> 8 : -prIndex;
@@ -214,8 +214,8 @@ bool LoLEngine::snd_processEnvironmentalSoundEffect(int soundId, int block) {
uint16 cbl = _currentBlock;
for (int i = 3; i > 0; i--) {
- int dir = calcMonsterDirection(cbl & 0x1f, cbl >> 5, block & 0x1f, block >> 5);
- cbl = (cbl + blockShiftTable[dir]) & 0x3ff;
+ int dir = calcMonsterDirection(cbl & 0x1F, cbl >> 5, block & 0x1F, block >> 5);
+ cbl = (cbl + blockShiftTable[dir]) & 0x3FF;
if (cbl != block) {
if (testWallFlag(cbl, 0, 1))
_environmentSfxVol >>= 1;
@@ -247,7 +247,7 @@ void LoLEngine::snd_playQueuedEffects() {
void LoLEngine::snd_loadSoundFile(int track) {
if (_sound->musicEnabled()) {
- if (_flags.platform != Common::kPlatformPC98) {
+ if (_flags.platform == Common::kPlatformPC) {
int t = (track - 250) * 3;
if (_curMusicFileIndex != _musicTrackMap[t] || _curMusicFileExt != (char)_musicTrackMap[t + 1]) {
snd_stopMusic();
@@ -269,12 +269,12 @@ int LoLEngine::snd_playTrack(int track) {
_lastMusicTrack = track;
if (_sound->musicEnabled()) {
- if (_flags.platform == Common::kPlatformPC98) {
- _sound->playTrack(track - 249);
- } else {
+ if (_flags.platform == Common::kPlatformPC) {
snd_loadSoundFile(track);
int t = (track - 250) * 3;
_sound->playTrack(_musicTrackMap[t + 2]);
+ } else {
+ _sound->playTrack(track - 249);
}
}
diff --git a/engines/kyra/sound_midi.cpp b/engines/kyra/sound_midi.cpp
index a54c52612b..b93b42fa9c 100644
--- a/engines/kyra/sound_midi.cpp
+++ b/engines/kyra/sound_midi.cpp
@@ -783,7 +783,6 @@ void SoundMidiPC::onTimer(void *data) {
midi->_sfx[i]->stopPlaying();
}
- midi->_output->setSourceVolume(0, midi->_musicVolume, true);
midi->_fadeMusicOut = false;
}
}
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index ee2ea6b6e4..af741a1ebe 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -174,8 +174,8 @@ void SoundTowns::playSoundEffect(uint8 track, uint8) {
}
}
- uint8 *fileBody = _sfxFileData + 0x01b8;
- int32 offset = (int32)READ_LE_UINT32(_sfxFileData + (track - 0x0b) * 4);
+ uint8 *fileBody = _sfxFileData + 0x01B8;
+ int32 offset = (int32)READ_LE_UINT32(_sfxFileData + (track - 0x0B) * 4);
if (offset == -1)
return;
@@ -214,10 +214,10 @@ void SoundTowns::playSoundEffect(uint8 track, uint8) {
sfx_WdTable_Number = READ_LE_UINT16(_sfxWDTable + sfx_WdTable_Offset);
sfx_BtTable_Offset += (int16)READ_LE_UINT16(_sfxWDTable + sfx_WdTable_Offset + 2);
- *tgt++ = _sfxBTTable[((sfx_BtTable_Offset >> 2) & 0xff)];
+ *tgt++ = _sfxBTTable[((sfx_BtTable_Offset >> 2) & 0xFF)];
sfx_BtTable_Offset += (int16)READ_LE_UINT16(_sfxWDTable + sfx_WdTable_Offset + 4);
- *tgt++ = _sfxBTTable[((sfx_BtTable_Offset >> 2) & 0xff)];
+ *tgt++ = _sfxBTTable[((sfx_BtTable_Offset >> 2) & 0xFF)];
}
}
@@ -293,7 +293,7 @@ void SoundTowns::beginFadeOut() {
for (int ii = 0; ii < 6; ii++)
_driver->chanVolume(ii, fadeVolCur[ii]);
for (int ii = 0x40; ii < 0x46; ii++)
- _driver->chanVolume(ii, fadeVolCur[ii - 0x3a]);
+ _driver->chanVolume(ii, fadeVolCur[ii - 0x3A]);
for (int ii = 0; ii < 6; ii++) {
fadeVolCur[ii] -= fadeVolStep[ii];
@@ -525,7 +525,9 @@ bool SoundTownsPC98_v2::init() {
TownsPC98_AudioDriver::kType86 : TownsPC98_AudioDriver::kTypeTowns);
if (_vm->gameFlags().platform == Common::kPlatformFMTowns) {
- _vm->checkCD();
+ if (_resInfo[_currentResourceSet])
+ if (_resInfo[_currentResourceSet]->cdaTableSize)
+ _vm->checkCD();
// FIXME: While checking for 'track1.XXX(X)' looks like
// a good idea, we should definitely not be doing this
// here. Basically our filenaming scheme could change
@@ -694,7 +696,7 @@ int32 SoundTownsPC98_v2::voicePlay(const char *file, Audio::SoundHandle *handle,
cmd = ~cmd;
} else {
cmd |= 0x80;
- if (cmd == 0xff)
+ if (cmd == 0xFF)
cmd--;
}
if (cmd < 0x80)
diff --git a/engines/kyra/sprites_eob.cpp b/engines/kyra/sprites_eob.cpp
index 5c679f5cb4..962efe6a4e 100644
--- a/engines/kyra/sprites_eob.cpp
+++ b/engines/kyra/sprites_eob.cpp
@@ -58,7 +58,7 @@ void EoBCoreEngine::releaseMonsterShapes(int first, int num) {
const uint8 *EoBCoreEngine::loadMonsterProperties(const uint8 *data) {
uint8 cmd = *data++;
- while (cmd != 0xff) {
+ while (cmd != 0xFF) {
EoBMonsterProperty *d = &_monsterProps[cmd];
d->armorClass = (int8)*data++;
d->hitChance = (int8)*data++;
@@ -90,7 +90,7 @@ const uint8 *EoBCoreEngine::loadMonsterProperties(const uint8 *data) {
d->sound2 = (int8)*data++;
d->numRemoteAttacks = *data++;
- if (*data++ != 0xff) {
+ if (*data++ != 0xFF) {
d->remoteWeaponChangeMode = *data++;
d->numRemoteWeapons = *data++;
@@ -113,7 +113,7 @@ const uint8 *EoBCoreEngine::loadMonsterProperties(const uint8 *data) {
}
const uint8 *EoBCoreEngine::loadActiveMonsterData(const uint8 *data, int level) {
- for (uint8 p = *data++; p != 0xff; p = *data++) {
+ for (uint8 p = *data++; p != 0xFF; p = *data++) {
uint8 v = *data++;
_timer->setCountdown(0x20 + (p << 1), v);
_timer->setCountdown(0x21 + (p << 1), v);
@@ -132,7 +132,7 @@ const uint8 *EoBCoreEngine::loadActiveMonsterData(const uint8 *data, int level)
memset(_monsters, 0, 30 * sizeof(EoBMonsterInPlay));
for (int i = 0; i < 30; i++, data += 14) {
- if (*data == 0xff)
+ if (*data == 0xFF)
continue;
initMonster(data[0], data[1], READ_LE_UINT16(&data[2]), data[4], (int8)data[5], data[6], data[7], data[8], data[9], READ_LE_UINT16(&data[10]), READ_LE_UINT16(&data[12]));
@@ -174,7 +174,7 @@ void EoBCoreEngine::initMonster(int index, int unit, uint16 block, int pos, int
}
void EoBCoreEngine::placeMonster(EoBMonsterInPlay *m, uint16 block, int dir) {
- if (block != 0xffff) {
+ if (block != 0xFFFF) {
checkSceneUpdateNeed(m->block);
if (_levelBlockProperties[m->block].flags & 7) {
_levelBlockProperties[m->block].flags--;
@@ -201,11 +201,11 @@ void EoBCoreEngine::killMonster(EoBMonsterInPlay *m, bool giveExperience) {
if (m->randItem) {
if (rollDice(1, 10, 0) == 1)
- setItemPosition((Item *)&_levelBlockProperties[m->block & 0x3ff].drawObjects, m->block, duplicateItem(m->randItem), pos);
+ setItemPosition((Item *)&_levelBlockProperties[m->block & 0x3FF].drawObjects, m->block, duplicateItem(m->randItem), pos);
}
if (m->fixedItem)
- setItemPosition((Item *)&_levelBlockProperties[m->block & 0x3ff].drawObjects, m->block, duplicateItem(m->fixedItem), pos);
+ setItemPosition((Item *)&_levelBlockProperties[m->block & 0x3FF].drawObjects, m->block, duplicateItem(m->fixedItem), pos);
if (giveExperience)
increasePartyExperience(_monsterProps[m->type].experience);
@@ -357,7 +357,7 @@ void EoBCoreEngine::flashMonsterShape(EoBMonsterInPlay *m) {
disableSysTimer(2);
_flashShapeTimer = 0;
drawScene(1);
- m->flags &= 0xfd;
+ m->flags &= 0xFD;
_flashShapeTimer = _system->getMillis() + _tickLength;
enableSysTimer(2);
@@ -536,7 +536,7 @@ void EoBCoreEngine::drawMonsters(int index) {
int h = shp[1];
x = x - (w >> 1) + (d->idleAnimState >> 4);
- y = y - h + (d->idleAnimState & 0x0f);
+ y = y - h + (d->idleAnimState & 0x0F);
drawMonsterShape(shp, x, y, f >= 0 ? 0 : 1, d->flags, palIndex);
diff --git a/engines/kyra/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp
index f4bae113c5..88b24e1367 100644
--- a/engines/kyra/sprites_lol.cpp
+++ b/engines/kyra/sprites_lol.cpp
@@ -66,7 +66,7 @@ void LoLEngine::loadMonsterShapes(const char *file, int monsterIndex, int animTy
of[2] = _screen->makeShapeCopy(p, s + 2);
}
}
- _monsterAnimType[monsterIndex] = animType & 0xff;
+ _monsterAnimType[monsterIndex] = animType & 0xFF;
uint8 *palShape = _screen->makeShapeCopy(p, 16);
@@ -90,7 +90,7 @@ void LoLEngine::loadMonsterShapes(const char *file, int monsterIndex, int animTy
uint16 sz = MIN(_screen->getShapeSize(_monsterShapes[pos]) - 10, 256);
memset(tmpPal2, 0, 256);
memcpy(tmpPal2, _monsterShapes[pos] + 10, sz);
- memset(tmpPal3, 0xff, 256 * sizeof(uint16));
+ memset(tmpPal3, 0xFF, 256 * sizeof(uint16));
uint8 numCol = *tmpPal2;
for (int ii = 0; ii < numCol; ii++) {
@@ -104,7 +104,7 @@ void LoLEngine::loadMonsterShapes(const char *file, int monsterIndex, int animTy
memset(tmpPal2, 0, 256);
memcpy(tmpPal2, _monsterShapes[pos] + 10, sz);
for (int iii = 0; iii < numCol; iii++) {
- if (tmpPal3[iii] == 0xffff)
+ if (tmpPal3[iii] == 0xFFFF)
continue;
if (p[tmpPal3[iii] * 320 + ii + 1])
tmpPal2[1 + iii] = p[tmpPal3[iii] * 320 + ii + 1];
@@ -159,7 +159,7 @@ int LoLEngine::deleteMonstersFromBlock(int block) {
continue;
}
- LoLMonster *m = &_monsters[i & 0x7fff];
+ LoLMonster *m = &_monsters[i & 0x7FFF];
cnt++;
setMonsterMode(m, 14);
@@ -215,8 +215,8 @@ bool LoLEngine::updateMonsterAdjustBlocks(LoLMonster *monster) {
if (monster->properties->flags & 8)
return true;
- uint16 x1 = (monster->x & 0xff00) | 0x80;
- uint16 y1 = (monster->y & 0xff00) | 0x80;
+ uint16 x1 = (monster->x & 0xFF00) | 0x80;
+ uint16 y1 = (monster->y & 0xFF00) | 0x80;
int x2 = _partyPosX;
int y2 = _partyPosY;
@@ -242,7 +242,7 @@ bool LoLEngine::updateMonsterAdjustBlocks(LoLMonster *monster) {
return false;
for (int i = 0; i < 18; i++)
- _visibleBlocks[i] = &_levelBlockProperties[(monster->block + _dscBlockIndex[dir + i]) & 0x3ff];
+ _visibleBlocks[i] = &_levelBlockProperties[(monster->block + _dscBlockIndex[dir + i]) & 0x3FF];
int16 fx1 = 0;
int16 fx2 = 0;
@@ -277,8 +277,8 @@ void LoLEngine::placeMonster(LoLMonster *monster, uint16 x, uint16 y) {
_levelBlockProperties[monster->block].direction = 5;
checkSceneUpdateNeed(monster->block);
- // WORKAROUND: Some monsters in the white tower have sound id's of 0xff. This is definitely a bug, since the
- // last valid track number is 249 and there is no specific handling for 0xff. Nonetheless this wouldn't
+ // WORKAROUND: Some monsters in the white tower have sound id's of 0xFF. This is definitely a bug, since the
+ // last valid track number is 249 and there is no specific handling for 0xFF. Nonetheless this wouldn't
// cause problems in the original code, because it just so happens that the invalid memory address points
// to an entry in _ingameGMSoundIndex which just so happens to have a value of -1
if (monster->properties->sounds[0] == 0 || monster->properties->sounds[0] == 255 || cont == false)
@@ -364,7 +364,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object
return 4;
if (x & 0x80) {
- if (((x & 0xff) + objectWidth) & 0xff00) {
+ if (((x & 0xFF) + objectWidth) & 0xFF00) {
xOffs = 1;
_objectLastDirection = 2;
x2 = x + objectWidth;
@@ -380,7 +380,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object
flag = 1;
}
} else {
- if (((x & 0xff) - objectWidth) & 0xff00) {
+ if (((x & 0xFF) - objectWidth) & 0xFF00) {
xOffs = -1;
_objectLastDirection = 6;
x2 = x - objectWidth;
@@ -398,7 +398,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object
}
if (y & 0x80) {
- if (((y & 0xff) + objectWidth) & 0xff00) {
+ if (((y & 0xFF) + objectWidth) & 0xFF00) {
yOffs = 1;
_objectLastDirection = 4;
y2 = y + objectWidth;
@@ -415,7 +415,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object
flag = 0;
}
} else {
- if (((y & 0xff) - objectWidth) & 0xff00) {
+ if (((y & 0xFF) - objectWidth) & 0xFF00) {
yOffs = -1;
_objectLastDirection = 0;
y2 = y - objectWidth;
@@ -449,7 +449,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object
int LoLEngine::testBlockPassability(int block, int x, int y, int objectWidth, int testFlag, int wallFlag) {
if (block == _currentBlock)
- testFlag &= 0xfffe;
+ testFlag &= 0xFFFE;
if (testFlag & 1) {
_monsterCurBlock = block;
@@ -463,7 +463,7 @@ int LoLEngine::testBlockPassability(int block, int x, int y, int objectWidth, in
uint16 obj = _levelBlockProperties[block].assignedObjects;
while (obj & 0x8000) {
- LoLMonster *monster = &_monsters[obj & 0x7fff];
+ LoLMonster *monster = &_monsters[obj & 0x7FFF];
if (monster->mode < 13) {
int r = checkDrawObjectSpace(x, y, monster->x, monster->y);
@@ -481,19 +481,8 @@ int LoLEngine::calcMonsterSkillLevel(int id, int a) {
const uint16 *c = getCharacterOrMonsterStats(id);
int r = (a << 8) / c[4];
- /*
- if (!(id & 0x8000))
- r = (r * _monsterModifiers[3 + _monsterDifficulty]) >> 8;
-
- id &= 0x7fff;
-
- if (_characters[id].skillLevels[1] <= 3)
- return r;
- else if (_characters[id].skillLevels[1] <= 7)
- return (r- (r >> 2));*/
-
if (id & 0x8000) {
- r = (r * _monsterModifiers[3 + _monsterDifficulty]) >> 8;
+ r = (r * _monsterModifiers2[3 + _monsterDifficulty]) >> 8;
} else {
if (_characters[id].skillLevels[1] > 7)
r = (r - (r >> 1));
@@ -530,7 +519,7 @@ void LoLEngine::drawBlockObjects(int blockArrayIndex) {
s = l->drawObjects;
while (s) {
if (s & 0x8000) {
- s &= 0x7fff;
+ s &= 0x7FFF;
if (blockArrayIndex < 15)
drawMonster(s);
s = _monsters[s].nextDrawObject;
@@ -607,7 +596,7 @@ void LoLEngine::drawBlockObjects(int blockArrayIndex) {
void LoLEngine::drawMonster(uint16 id) {
LoLMonster *m = &_monsters[id];
int16 flg = _monsterDirFlags[(_currentDirection << 2) + m->facing];
- int curFrm = getMonsterCurFrame(m, flg & 0xffef);
+ int curFrm = getMonsterCurFrame(m, flg & 0xFFEF);
uint8 *shp = 0;
if (curFrm == -1) {
@@ -622,7 +611,7 @@ void LoLEngine::drawMonster(uint16 id) {
if (m->properties->flags & 0x800)
flg |= 0x20;
- uint8 *monsterPalette = d ? _monsterPalettes[(m->properties->shapeIndex << 4) + (curFrm & 0x0f)] + (shp[10] * (d - 1)) : 0;
+ uint8 *monsterPalette = d ? _monsterPalettes[(m->properties->shapeIndex << 4) + (curFrm & 0x0F)] + (shp[10] * (d - 1)) : 0;
uint8 *brightnessOverlay = drawItemOrMonster(shp, monsterPalette, m->x + _monsterShiftOffs[m->shiftStep << 1], m->y + _monsterShiftOffs[(m->shiftStep << 1) + 1], 0, 0, flg | 1, -1, flip);
for (int i = 0; i < 4; i++) {
@@ -644,16 +633,16 @@ void LoLEngine::drawMonster(uint16 id) {
int dW = _screen->getShapeScaledWidth(shp, _dmScaleW) >> 1;
int dH = _screen->getShapeScaledHeight(shp, _dmScaleH) >> 1;
- int bloodAmount = (m->mode == 13) ? (m->fightCurTick << 1) : (m->properties->hitPoints / (m->damageReceived & 0x7fff));
+ int bloodAmount = (m->mode == 13) ? (m->fightCurTick << 1) : (m->properties->hitPoints / (m->damageReceived & 0x7FFF));
shp = _gameShapes[6];
- int bloodType = m->properties->flags & 0xc000;
+ int bloodType = m->properties->flags & 0xC000;
if (bloodType == 0x4000)
- bloodType = _flags.use16ColorMode ? 0xbb : 63;
+ bloodType = _flags.use16ColorMode ? 0xBB : 63;
else if (bloodType == 0x8000)
bloodType = _flags.use16ColorMode ? 0x55 : 15;
- else if (bloodType == 0xc000)
+ else if (bloodType == 0xC000)
bloodType = _flags.use16ColorMode ? 0x33 : 74;
else
bloodType = 0;
@@ -708,7 +697,9 @@ int LoLEngine::getMonsterCurFrame(LoLMonster *m, uint16 dirFlags) {
break;
case 1:
// monsters whose outward appearance reflects the damage they have taken
- tmp = (m->properties->hitPoints * _monsterModifiers[_monsterDifficulty]) >> 8;
+ tmp = m->properties->hitPoints;
+ if (_flags.isTalkie)
+ tmp = (tmp * _monsterModifiers1[_monsterDifficulty]) >> 8;
if (m->hitPoints > (tmp >> 1))
tmp = 0;
else if (m->hitPoints > (tmp >> 2))
@@ -796,7 +787,7 @@ void LoLEngine::redrawSceneItem() {
int t = (i << 7) + 1;
while (s) {
if (s & 0x8000) {
- s = _monsters[s & 0x7fff].nextDrawObject;
+ s = _monsters[s & 0x7FFF].nextDrawObject;
} else {
LoLItem *item = &_itemsInPlay[s];
@@ -934,7 +925,7 @@ uint8 *LoLEngine::drawItemOrMonster(uint8 *shape, uint8 *monsterPalette, int x,
uint8 tmpOvl[16];
if (flags & 0x80) {
- flags &= 0xff7f;
+ flags &= 0xFF7F;
ovl2 = monsterPalette;
monsterPalette = 0;
} else {
@@ -969,7 +960,7 @@ uint8 *LoLEngine::drawItemOrMonster(uint8 *shape, uint8 *monsterPalette, int x,
if (_flags.use16ColorMode) {
if (_currentLevel != 22)
- flg &= 0xdfff;
+ flg &= 0xDFFF;
} else {
if (_currentLevel == 22) {
@@ -1059,7 +1050,7 @@ void LoLEngine::updateMonster(LoLMonster *monster) {
if ((monster->mode != 11) && (monster->mode != 14)) {
if (!(_rnd.getRandomNumber(255) & 3)) {
- monster->shiftStep = (monster->shiftStep + 1) & 0x0f;
+ monster->shiftStep = (monster->shiftStep + 1) & 0x0F;
checkSceneUpdateNeed(monster->block);
}
}
@@ -1127,7 +1118,7 @@ void LoLEngine::updateMonster(LoLMonster *monster) {
// first recovery phase after delivering an attack
if (++monster->fightCurTick > 2) {
setMonsterMode(monster, 5);
- monster->fightCurTick = (int8)((((8 << 8) / monster->properties->fightingStats[4]) * _monsterModifiers[6 + _monsterDifficulty]) >> 8);
+ monster->fightCurTick = (int8)((((8 << 8) / monster->properties->fightingStats[4]) * _monsterModifiers3[_monsterDifficulty]) >> 8);
}
checkSceneUpdateNeed(monster->block);
break;
@@ -1137,7 +1128,7 @@ void LoLEngine::updateMonster(LoLMonster *monster) {
chasePartyWithCloseAttacks(monster);
} else {
setMonsterMode(monster, 7);
- monster->flags &= 0xfff7;
+ monster->flags &= 0xFFF7;
}
break;
@@ -1164,13 +1155,13 @@ void LoLEngine::updateMonster(LoLMonster *monster) {
if (monster->damageReceived) {
if (monster->damageReceived & 0x8000)
- monster->damageReceived &= 0x7fff;
+ monster->damageReceived &= 0x7FFF;
else
monster->damageReceived = 0;
checkSceneUpdateNeed(monster->block);
}
- monster->flags &= 0xffef;
+ monster->flags &= 0xFFEF;
}
void LoLEngine::moveMonster(LoLMonster *monster) {
@@ -1239,13 +1230,13 @@ bool LoLEngine::chasePartyWithDistanceAttacks(LoLMonster *monster) {
int flyingObject = monster->properties->distWeapons[s];
- if (flyingObject & 0xc000) {
+ if (flyingObject & 0xC000) {
if (getBlockDistance(monster->block, _currentBlock) > 1) {
int type = flyingObject & 0x4000 ? 0 : 1;
- flyingObject = makeItem(flyingObject & 0x3fff, 0, 0);
+ flyingObject = makeItem(flyingObject & 0x3FFF, 0, 0);
if (flyingObject) {
- if (!launchObject(type, flyingObject, monster->x, monster->y, 12, dir << 1, -1, monster->id | 0x8000, 0x3f))
+ if (!launchObject(type, flyingObject, monster->x, monster->y, 12, dir << 1, -1, monster->id | 0x8000, 0x3F))
deleteItem(flyingObject);
}
}
@@ -1274,7 +1265,7 @@ bool LoLEngine::chasePartyWithDistanceAttacks(LoLMonster *monster) {
if (getBlockDistance(monster->block, _monsters[i].block) < 7)
setMonsterMode(monster, 7);
}
- _txt->printMessage(2, "%s", getLangString(0x401a));
+ _txt->printMessage(2, "%s", getLangString(0x401A));
} else if (flyingObject == 4) {
launchMagicViper();
@@ -1294,7 +1285,7 @@ bool LoLEngine::chasePartyWithDistanceAttacks(LoLMonster *monster) {
void LoLEngine::chasePartyWithCloseAttacks(LoLMonster *monster) {
if (!(monster->flags & 8)) {
- int dir = calcMonsterDirection(monster->x & 0xff00, monster->y & 0xff00, _partyPosX & 0xff00, _partyPosY & 0xff00);
+ int dir = calcMonsterDirection(monster->x & 0xFF00, monster->y & 0xFF00, _partyPosX & 0xFF00, _partyPosY & 0xFF00);
int x1 = _partyPosX;
int y1 = _partyPosY;
@@ -1396,11 +1387,11 @@ int LoLEngine::checkForPossibleDistanceAttack(uint16 monsterBlock, int direction
if (mdist > distance)
return 5;
- int dir = calcMonsterDirection(monsterBlock & 0x1f, monsterBlock >> 5, curBlock & 0x1f, curBlock >> 5);
+ int dir = calcMonsterDirection(monsterBlock & 0x1F, monsterBlock >> 5, curBlock & 0x1F, curBlock >> 5);
if ((dir & 1) || (dir != (direction << 1)))
return 5;
- if (((monsterBlock & 0x1f) != (curBlock & 0x1f)) && ((monsterBlock & 0xffe0) != (curBlock & 0xffe0)))
+ if (((monsterBlock & 0x1F) != (curBlock & 0x1F)) && ((monsterBlock & 0xFFE0) != (curBlock & 0xFFE0)))
return 5;
if (distance < 0)
@@ -1438,8 +1429,8 @@ void LoLEngine::getNextStepCoords(int16 srcX, int16 srcY, int &newX, int &newY,
static const int8 stepAdjustX[] = { 0, 32, 32, 32, 0, -32, -32, -32 };
static const int8 stepAdjustY[] = { -32, -32, 0, 32, 32, 32, 0, -32 };
- newX = (srcX + stepAdjustX[direction]) & 0x1fff;
- newY = (srcY + stepAdjustY[direction]) & 0x1fff;
+ newX = (srcX + stepAdjustX[direction]) & 0x1FFF;
+ newY = (srcY + stepAdjustY[direction]) & 0x1FFF;
}
void LoLEngine::alignMonsterToParty(LoLMonster *monster) {
@@ -1447,7 +1438,7 @@ void LoLEngine::alignMonsterToParty(LoLMonster *monster) {
uint16 mx = monster->x;
uint16 my = monster->y;
uint16 *pos = (mdir & 1) ? &my : &mx;
- bool centered = (*pos & 0x7f) == 0;
+ bool centered = (*pos & 0x7F) == 0;
bool posFlag = true;
if (monster->properties->maxWidth <= 63) {
@@ -1458,7 +1449,7 @@ void LoLEngine::alignMonsterToParty(LoLMonster *monster) {
r = true;
} else {
uint16 id = _levelBlockProperties[monster->block].assignedObjects;
- id = (id & 0x8000) ? (id & 0x7fff) : 0xffff;
+ id = (id & 0x8000) ? (id & 0x7FFF) : 0xFFFF;
if (id != monster->id) {
r = true;
@@ -1466,8 +1457,8 @@ void LoLEngine::alignMonsterToParty(LoLMonster *monster) {
for (int i = 0; i < 3; i++) {
mdir = (mdir + 1) & 3;
id = _levelBlockProperties[calcNewBlockPosition(monster->block, mdir)].assignedObjects;
- id = (id & 0x8000) ? (id & 0x7fff) : 0xffff;
- if (id != 0xffff) {
+ id = (id & 0x8000) ? (id & 0x7FFF) : 0xFFFF;
+ if (id != 0xFFFF) {
r = true;
break;
}
diff --git a/engines/kyra/sprites_rpg.cpp b/engines/kyra/sprites_rpg.cpp
index 0c4fcb09ab..9c08bc8dd6 100644
--- a/engines/kyra/sprites_rpg.cpp
+++ b/engines/kyra/sprites_rpg.cpp
@@ -27,9 +27,9 @@
namespace Kyra {
int KyraRpgEngine::getBlockDistance(uint16 block1, uint16 block2) {
- int b1x = block1 & 0x1f;
+ int b1x = block1 & 0x1F;
int b1y = block1 >> 5;
- int b2x = block2 & 0x1f;
+ int b2x = block2 & 0x1F;
int b2y = block2 >> 5;
uint8 dy = ABS(b2y - b1y);
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index dc4f4986fb..bac31f0a3e 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -39,7 +39,7 @@
namespace Kyra {
-#define RESFILE_VERSION 83
+#define RESFILE_VERSION 84
namespace {
bool checkKyraDat(Common::SeekableReadStream *file) {
@@ -1109,13 +1109,13 @@ const uint8 KyraEngine_LoK::_itemPosY[] = {
};
void GUI_LoK::initStaticResource() {
- GUI_V1_BUTTON(_scrollUpButton, 0x12, 1, 1, 1, 0x483, 0, 0, 0, 0x18, 0x0f, 0);
- GUI_V1_BUTTON(_scrollDownButton, 0x13, 1, 1, 1, 0x483, 0, 0, 0, 0x18, 0x0f, 0);
+ GUI_V1_BUTTON(_scrollUpButton, 0x12, 1, 1, 1, 0x483, 0, 0, 0, 0x18, 0x0F, 0);
+ GUI_V1_BUTTON(_scrollDownButton, 0x13, 1, 1, 1, 0x483, 0, 0, 0, 0x18, 0x0F, 0);
- GUI_V1_BUTTON(_menuButtonData[0], 0x0c, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
- GUI_V1_BUTTON(_menuButtonData[1], 0x0d, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
- GUI_V1_BUTTON(_menuButtonData[2], 0x0e, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
- GUI_V1_BUTTON(_menuButtonData[3], 0x0f, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
+ GUI_V1_BUTTON(_menuButtonData[0], 0x0C, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
+ GUI_V1_BUTTON(_menuButtonData[1], 0x0D, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
+ GUI_V1_BUTTON(_menuButtonData[2], 0x0E, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
+ GUI_V1_BUTTON(_menuButtonData[3], 0x0F, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
GUI_V1_BUTTON(_menuButtonData[4], 0x10, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
GUI_V1_BUTTON(_menuButtonData[5], 0x11, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
diff --git a/engines/kyra/staticres_eob.cpp b/engines/kyra/staticres_eob.cpp
index 79f018c53e..e0a2862dea 100644
--- a/engines/kyra/staticres_eob.cpp
+++ b/engines/kyra/staticres_eob.cpp
@@ -220,44 +220,44 @@ const uint8 EoBCoreEngine::_wallOfForceShapeDefs[] = {
0x0C, 0x00, 0x05, 0x10
};
-const int16 EoBCoreEngine::_buttonList1[] = {
+const uint8 EoBCoreEngine::_buttonList1[] = {
58, 0, 1, 2, 3, 90, 91, 4, 5, 6, 7, 8, 9, 10, 11, 12, 78, 79, 13, 14, 15, 16,
- 80, 81, 17, 18, 19, 20, 82, 83, 49, 50, 51, 52, 53, 54, 56, 57, -1
+ 80, 81, 17, 18, 19, 20, 82, 83, 49, 50, 51, 52, 53, 54, 56, 57, 255
};
-const int16 EoBCoreEngine::_buttonList2[] = {
+const uint8 EoBCoreEngine::_buttonList2[] = {
58, 61, 62, 63, 64, 65, 93, 94, 66, 67, 68, 69, 70, 71, 76, 77, 88, 0, 1, 2, 3,
90, 91, 4, 5, 6, 7, 8, 9, 10, 11, 12, 78, 79, 13, 14, 15, 16, 80, 81, 17, 18,
- 19, 20, 82, 83, 49, 50, 51, 52, 53, 54, 56, 57, -1
+ 19, 20, 82, 83, 49, 50, 51, 52, 53, 54, 56, 57, 255
};
-const int16 EoBCoreEngine::_buttonList3[] = {
+const uint8 EoBCoreEngine::_buttonList3[] = {
58, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 84, 85, 46, 47, 48, 60, 59, 92, 4, 5, 6, 7, 8, 49, 50,
- 51, 52, 53, 54, 56, 57, -1
+ 51, 52, 53, 54, 56, 57, 255
};
-const int16 EoBCoreEngine::_buttonList4[] = {
- 58, 47, 48, 60, 59, 92, 4, 5, 6, 7, 8, 49, 50, 51, 52, 53, 54, 56, 57, -1
+const uint8 EoBCoreEngine::_buttonList4[] = {
+ 58, 47, 48, 60, 59, 92, 4, 5, 6, 7, 8, 49, 50, 51, 52, 53, 54, 56, 57, 255
};
-const int16 EoBCoreEngine::_buttonList5[] = {
+const uint8 EoBCoreEngine::_buttonList5[] = {
58, 61, 62, 63, 64, 65, 93, 66, 67, 68, 69, 70, 71, 88, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 84,
- 85, 46, 47, 48, 60, 59, 92, 4, 5, 6, 7, 8, 49, 50, 51, 52, 53, 54, 56, 57, -1
+ 85, 46, 47, 48, 60, 59, 92, 4, 5, 6, 7, 8, 49, 50, 51, 52, 53, 54, 56, 57, 255
};
-const int16 EoBCoreEngine::_buttonList6[] = {
+const uint8 EoBCoreEngine::_buttonList6[] = {
58, 61, 62, 63, 64, 65, 93, 66, 67, 68, 69, 70, 71, 88, 46, 47, 48, 60, 59, 92,
- 4, 5, 6, 7, 8, 49, 50, 51, 52, 53, 54, 56, 57, -1
+ 4, 5, 6, 7, 8, 49, 50, 51, 52, 53, 54, 56, 57, 255
};
-const int16 EoBCoreEngine::_buttonList7[] = {
- 17, 18, 19, 20, 82, 83, 55, -1
+const uint8 EoBCoreEngine::_buttonList7[] = {
+ 17, 18, 19, 20, 82, 83, 55, 255
};
-const int16 EoBCoreEngine::_buttonList8[] = {
- 72, 73, 74, 75, 86, 87, 89, -1
+const uint8 EoBCoreEngine::_buttonList8[] = {
+ 72, 73, 74, 75, 86, 87, 89, 255
};
const uint8 EoBCoreEngine::_clock2Timers[] = {
@@ -1118,10 +1118,10 @@ void EoBEngine::initSpells() {
{ 0x0000, 0x000000, 0x00 }, // dummy
{ 0x0033, 0x000001, 0x00 }, // armor
{ 0x0100, 0x000000, 0x21 }, // burning hands
- { 0x004c, 0x000002, 0x00 }, // detect magic
+ { 0x004C, 0x000002, 0x00 }, // detect magic
{ 0x0100, 0x000000, 0x01 }, // magic missile
{ 0x0000, 0x000000, 0x00 }, // dummy
- { 0x008b, 0x000008, 0x00 }, // shield
+ { 0x008B, 0x000008, 0x00 }, // shield
{ 0x0488, 0x000000, 0x03 }, // shocking grasp
{ 0x0021, 0x000040, 0x00 }, // invisibility
{ 0x0000, 0x000000, 0x00 }, // dummy
@@ -1141,10 +1141,10 @@ void EoBEngine::initSpells() {
{ 0x0000, 0x000000, 0x00 }, // CLOUD KILL
{ 0x0100, 0x000000, 0x41 }, // cone of cold
{ 0x0100, 0x000000, 0x00 }, // hold monster
- { 0x005c, 0x000400, 0x00 }, // bless
+ { 0x005C, 0x000400, 0x00 }, // bless
{ 0x0020, 0x000000, 0x00 }, // cure light wounds
{ 0x0100, 0x000000, 0x01 }, // cause light wounds
- { 0x004c, 0x000002, 0x00 }, // detect magic
+ { 0x004C, 0x000002, 0x00 }, // detect magic
{ 0x0029, 0x000800, 0x00 }, // prot from evil
{ 0x0039, 0x000000, 0x00 }, // aid
{ 0x2408, 0x000000, 0x21 }, // flame blade
@@ -1153,7 +1153,7 @@ void EoBEngine::initSpells() {
{ 0x0040, 0x000000, 0x00 }, // create food
{ 0x1000, 0x000000, 0x00 }, // dispel magic
{ 0x0099, 0x004000, 0x00 }, // magical vestment
- { 0x004c, 0x008000, 0x00 }, // prayer
+ { 0x004C, 0x008000, 0x00 }, // prayer
{ 0x0040, 0x000000, 0x00 }, // remove paralysis
{ 0x0020, 0x000000, 0x00 }, // cure serious
{ 0x0100, 0x000000, 0x01 }, // cause serious
diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp
index f97424005d..a1c5ff340c 100644
--- a/engines/kyra/staticres_lol.cpp
+++ b/engines/kyra/staticres_lol.cpp
@@ -238,6 +238,15 @@ void LoLEngine::initStaticResource() {
_sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
_sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
_sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
+ } else if (_flags.platform == Common::kPlatformFMTowns) {
+ static const char *const fileListIntro[] = { 0, "lore84.twn", "lore82.twn", 0, 0, 0, "lore83.twn", "lore81.twn" };
+ static const char *const fileListFinale[] = { 0, 0, "lore85.twn", "lore86.twn", "lore87.twn" };
+ SoundResourceInfo_TownsPC98V2 resInfoIntro(fileListIntro, ARRAYSIZE(fileListIntro), 0, 0, 0);
+ SoundResourceInfo_TownsPC98V2 resInfoIngame(0, 0, "lore%02d.twn", 0, 0);
+ SoundResourceInfo_TownsPC98V2 resInfoFinale(fileListFinale, ARRAYSIZE(fileListFinale), 0, 0, 0);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
+ _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
}
if (_flags.isDemo)
@@ -261,7 +270,10 @@ void LoLEngine::initStaticResource() {
_charDefsKieran = _staticres->loadRawDataBe16(kLoLCharDefsKieran, tempSize);
_charDefsAkshel = _staticres->loadRawDataBe16(kLoLCharDefsAkshel, tempSize);
_expRequirements = (const int32 *)_staticres->loadRawDataBe32(kLoLExpRequirements, tempSize);
- _monsterModifiers = _staticres->loadRawDataBe16(kLoLMonsterModifiers, tempSize);
+ _monsterModifiers1 = _staticres->loadRawDataBe16(kLoLMonsterModifiers1, tempSize);
+ _monsterModifiers2 = _staticres->loadRawDataBe16(kLoLMonsterModifiers2, tempSize);
+ _monsterModifiers3 = _staticres->loadRawDataBe16(kLoLMonsterModifiers3, tempSize);
+ _monsterModifiers4 = _staticres->loadRawDataBe16(kLoLMonsterModifiers4, tempSize);
_monsterShiftOffs = (const int8 *)_staticres->loadRawData(kLoLMonsterShiftOffsets, tempSize);
_monsterDirFlags = _staticres->loadRawData(kLoLMonsterDirFlags, tempSize);
_monsterScaleX = _staticres->loadRawData(kLoLMonsterScaleX, tempSize);
@@ -304,14 +316,14 @@ void LoLEngine::initStaticResource() {
}
_buttonData = _staticres->loadButtonDefs(kLoLButtonDefs, tempSize);
- _buttonList1 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList1, tempSize);
- _buttonList2 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList2, tempSize);
- _buttonList3 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList3, tempSize);
- _buttonList4 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList4, tempSize);
- _buttonList5 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList5, tempSize);
- _buttonList6 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList6, tempSize);
- _buttonList7 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList7, tempSize);
- _buttonList8 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList8, tempSize);
+ _buttonList1 = _staticres->loadRawData(kLoLButtonList1, tempSize);
+ _buttonList2 = _staticres->loadRawData(kLoLButtonList2, tempSize);
+ _buttonList3 = _staticres->loadRawData(kLoLButtonList3, tempSize);
+ _buttonList4 = _staticres->loadRawData(kLoLButtonList4, tempSize);
+ _buttonList5 = _staticres->loadRawData(kLoLButtonList5, tempSize);
+ _buttonList6 = _staticres->loadRawData(kLoLButtonList6, tempSize);
+ _buttonList7 = _staticres->loadRawData(kLoLButtonList7, tempSize);
+ _buttonList8 = _staticres->loadRawData(kLoLButtonList8, tempSize);
_autoMapStrings = _staticres->loadRawDataBe16(kLoLMapStringId, tempSize);
@@ -458,11 +470,11 @@ void LoLEngine::initStaticResource() {
}
void GUI_LoL::initStaticData() {
- GUI_V2_BUTTON(_scrollUpButton, 20, 96, 0, 1, 1, 1, 0x4487, 0, 0, 0, 25, 16, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 0);
- GUI_V2_BUTTON(_scrollDownButton, 21, 98, 0, 1, 1, 1, 0x4487, 0, 0, 0, 25, 16, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 0);
+ GUI_V2_BUTTON(_scrollUpButton, 20, 96, 0, 1, 1, 1, 0x4487, 0, 0, 0, 25, 16, 0xFE, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0);
+ GUI_V2_BUTTON(_scrollDownButton, 21, 98, 0, 1, 1, 1, 0x4487, 0, 0, 0, 25, 16, 0xFE, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0);
for (uint i = 0; i < ARRAYSIZE(_menuButtons); ++i)
- GUI_V2_BUTTON(_menuButtons[i], i, 0, 0, 0, 0, 0, 0x4487, 0, 0, 0, 0, 0, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 0);
+ GUI_V2_BUTTON(_menuButtons[i], i, 0, 0, 0, 0, 0, 0x4487, 0, 0, 0, 0, 0, 0xFE, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0);
if (_vm->gameFlags().isTalkie)
GUI_LOL_MENU(_mainMenu, 9, 0x4000, 0, 7, -1, -1, -1, -1);
@@ -487,61 +499,61 @@ void GUI_LoL::initStaticData() {
for (int i = 0; i < _mainMenu.numberOfItems; ++i)
_mainMenu.item[i].callback = mainMenuFunctor;
- GUI_LOL_MENU(_loadMenu, 10, 0x400e, 1, 5, 128, 20, 128, 118);
- GUI_LOL_MENU_ITEM(_loadMenu.item[0], 0xfffe, 8, 39, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_loadMenu.item[1], 0xfffd, 8, 56, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_loadMenu.item[2], 0xfffc, 8, 73, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_loadMenu.item[3], 0xfffb, 8, 90, 256, 15, 0, 0);
+ GUI_LOL_MENU(_loadMenu, 10, 0x400E, 1, 5, 128, 20, 128, 118);
+ GUI_LOL_MENU_ITEM(_loadMenu.item[0], 0xFFFE, 8, 39, 256, 15, 0, 0);
+ GUI_LOL_MENU_ITEM(_loadMenu.item[1], 0xFFFD, 8, 56, 256, 15, 0, 0);
+ GUI_LOL_MENU_ITEM(_loadMenu.item[2], 0xFFFC, 8, 73, 256, 15, 0, 0);
+ GUI_LOL_MENU_ITEM(_loadMenu.item[3], 0xFFFB, 8, 90, 256, 15, 0, 0);
GUI_LOL_MENU_ITEM(_loadMenu.item[4], 0x4011, 168, 118, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
Button::Callback loadMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedLoadMenu);
for (int i = 0; i < 5; ++i)
_loadMenu.item[i].callback = loadMenuFunctor;
- GUI_LOL_MENU(_saveMenu, 10, 0x400d, 1, 5, 128, 20, 128, 118);
- GUI_LOL_MENU_ITEM(_saveMenu.item[0], 0xfffe, 8, 39, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_saveMenu.item[1], 0xfffd, 8, 56, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_saveMenu.item[2], 0xfffc, 8, 73, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_saveMenu.item[3], 0xfffb, 8, 90, 256, 15, 0, 0);
+ GUI_LOL_MENU(_saveMenu, 10, 0x400D, 1, 5, 128, 20, 128, 118);
+ GUI_LOL_MENU_ITEM(_saveMenu.item[0], 0xFFFE, 8, 39, 256, 15, 0, 0);
+ GUI_LOL_MENU_ITEM(_saveMenu.item[1], 0xFFFD, 8, 56, 256, 15, 0, 0);
+ GUI_LOL_MENU_ITEM(_saveMenu.item[2], 0xFFFC, 8, 73, 256, 15, 0, 0);
+ GUI_LOL_MENU_ITEM(_saveMenu.item[3], 0xFFFB, 8, 90, 256, 15, 0, 0);
GUI_LOL_MENU_ITEM(_saveMenu.item[4], 0x4011, 168, 118, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
Button::Callback saveMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedSaveMenu);
for (int i = 0; i < 5; ++i)
_saveMenu.item[i].callback = saveMenuFunctor;
- GUI_LOL_MENU(_deleteMenu, 10, 0x400f, 1, 5, 128, 20, 128, 118);
- GUI_LOL_MENU_ITEM(_deleteMenu.item[0], 0xfffe, 8, 39, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_deleteMenu.item[1], 0xfffd, 8, 56, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_deleteMenu.item[2], 0xfffc, 8, 73, 256, 15, 0, 0);
- GUI_LOL_MENU_ITEM(_deleteMenu.item[3], 0xfffb, 8, 90, 256, 15, 0, 0);
+ GUI_LOL_MENU(_deleteMenu, 10, 0x400F, 1, 5, 128, 20, 128, 118);
+ GUI_LOL_MENU_ITEM(_deleteMenu.item[0], 0xFFFE, 8, 39, 256, 15, 0, 0);
+ GUI_LOL_MENU_ITEM(_deleteMenu.item[1], 0xFFFD, 8, 56, 256, 15, 0, 0);
+ GUI_LOL_MENU_ITEM(_deleteMenu.item[2], 0xFFFC, 8, 73, 256, 15, 0, 0);
+ GUI_LOL_MENU_ITEM(_deleteMenu.item[3], 0xFFFB, 8, 90, 256, 15, 0, 0);
GUI_LOL_MENU_ITEM(_deleteMenu.item[4], 0x4011, 168, 118, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
Button::Callback deleteMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedDeleteMenu);
for (int i = 0; i < 5; ++i)
_deleteMenu.item[i].callback = deleteMenuFunctor;
- GUI_LOL_MENU(_gameOptions, 17, 0x400c, 0, 6, -1, -1, -1, -1);
+ GUI_LOL_MENU(_gameOptions, 17, 0x400C, 0, 6, -1, -1, -1, -1);
if (_vm->gameFlags().isTalkie) {
- GUI_LOL_MENU_ITEM(_gameOptions.item[0], 0xfff7, 120, 22, 80, 15, 0x406e, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[1], 0xfff6, 120, 39, 80, 15, 0x406c, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[2], 0xfff5, 120, 56, 80, 15, 0x406d, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[3], 0xfff4, 120, 73, 80, 15, 0x42d5, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[4], 0xfff3, 120, 90, 80, 15, 0x42d2, 0);
+ GUI_LOL_MENU_ITEM(_gameOptions.item[0], 0xFFF7, 120, 22, 80, 15, 0x406E, 0);
+ GUI_LOL_MENU_ITEM(_gameOptions.item[1], 0xFFF6, 120, 39, 80, 15, 0x406C, 0);
+ GUI_LOL_MENU_ITEM(_gameOptions.item[2], 0xFFF5, 120, 56, 80, 15, 0x406D, 0);
+ GUI_LOL_MENU_ITEM(_gameOptions.item[3], 0xFFF4, 120, 73, 80, 15, 0x42D5, 0);
+ GUI_LOL_MENU_ITEM(_gameOptions.item[4], 0xFFF3, 120, 90, 80, 15, 0x42D2, 0);
GUI_LOL_MENU_ITEM(_gameOptions.item[5], 0x4072, 104, 110, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
} else {
- GUI_LOL_MENU_ITEM(_gameOptions.item[0], 0xfff9, 120, 22, 80, 15, 0x406a, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[1], 0xfff8, 120, 39, 80, 15, 0x406b, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[2], 0xfff7, 120, 56, 80, 15, 0x406e, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[3], 0xfff6, 120, 73, 80, 15, 0x406c, 0);
- GUI_LOL_MENU_ITEM(_gameOptions.item[4], 0xfff5, 120, 90, 80, 15, 0x406d, 0);
+ GUI_LOL_MENU_ITEM(_gameOptions.item[0], 0xFFF9, 120, 22, 80, 15, 0x406A, 0);
+ GUI_LOL_MENU_ITEM(_gameOptions.item[1], 0xFFF8, 120, 39, 80, 15, 0x406B, 0);
+ GUI_LOL_MENU_ITEM(_gameOptions.item[2], 0xFFF7, 120, 56, 80, 15, 0x406E, 0);
+ GUI_LOL_MENU_ITEM(_gameOptions.item[3], 0xFFF6, 120, 73, 80, 15, 0x406C, 0);
+ GUI_LOL_MENU_ITEM(_gameOptions.item[4], 0xFFF5, 120, 90, 80, 15, 0x406D, 0);
GUI_LOL_MENU_ITEM(_gameOptions.item[5], 0x4072, 104, 110, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
}
Button::Callback optionsMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedOptionsMenu);
for (int i = 0; i < _gameOptions.numberOfItems; ++i)
_gameOptions.item[i].callback = optionsMenuFunctor;
- GUI_LOL_MENU(_audioOptions, 18, 0x42d9, 2, 1, -1, -1, -1, -1);
+ GUI_LOL_MENU(_audioOptions, 18, 0x42D9, 2, 1, -1, -1, -1, -1);
GUI_LOL_MENU_ITEM(_audioOptions.item[0], 0x4072, 152, 76, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
- GUI_LOL_MENU_ITEM(_audioOptions.item[1], 3, 128, 22, 114, 14, 0x42db, 0);
- GUI_LOL_MENU_ITEM(_audioOptions.item[2], 4, 128, 39, 114, 14, 0x42da, 0);
- GUI_LOL_MENU_ITEM(_audioOptions.item[3], 5, 128, 56, 114, 14, 0x42dc, 0);
+ GUI_LOL_MENU_ITEM(_audioOptions.item[1], 3, 128, 22, 114, 14, 0x42DB, 0);
+ GUI_LOL_MENU_ITEM(_audioOptions.item[2], 4, 128, 39, 114, 14, 0x42DA, 0);
+ GUI_LOL_MENU_ITEM(_audioOptions.item[3], 5, 128, 56, 114, 14, 0x42DC, 0);
Button::Callback audioMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedAudioMenu);
for (int i = 0; i < 4; ++i)
_audioOptions.item[i].callback = audioMenuFunctor;
@@ -659,11 +671,11 @@ const uint16 LoLEngine::_charPosXPC98[] = {
92, 152, 212, 268
};
-const uint8 LoLEngine::_charNamesPC98[][11] = {
- { 0x83, 0x41, 0x83, 0x4E, 0x83, 0x56, 0x83, 0x46, 0x83, 0x8B, 0x00 },
- { 0x83, 0x7D, 0x83, 0x43, 0x83, 0x50, 0x83, 0x8B, 0x00, 0x00, 0x00 },
- { 0x83, 0x4C, 0x81, 0x5B, 0x83, 0x89, 0x83, 0x93, 0x00, 0x00, 0x00 },
- { 0x83, 0x52, 0x83, 0x93, 0x83, 0x89, 0x83, 0x62, 0x83, 0x68, 0x00 }
+const char *const LoLEngine::_charNamesJapanese[] = {
+ "\x83\x41\x83\x4E\x83\x56\x83\x46\x83\x8B\0",
+ "\x83\x7D\x83\x43\x83\x50\x83\x8B\x00\x00\0",
+ "\x83\x4C\x81\x5B\x83\x89\x83\x93\x00\x00\0",
+ "\x83\x52\x83\x93\x83\x89\x83\x62\x83\x68\0"
};
const uint8 LoLEngine::_chargenFrameTableTalkie[] = {
diff --git a/engines/kyra/text_hof.cpp b/engines/kyra/text_hof.cpp
index 06067d6693..7fa823da0f 100644
--- a/engines/kyra/text_hof.cpp
+++ b/engines/kyra/text_hof.cpp
@@ -464,9 +464,9 @@ void KyraEngine_HoF::processDialogue(int dlgOffset, int vocH, int csEntry) {
nextTimSequence = READ_LE_UINT16(&_ingameTalkObjIndex[cmd]);
if (nextTimSequence == 10) {
- if (queryGameFlag(0x3e))
+ if (queryGameFlag(0x3E))
nextTimSequence = 14;
- if (queryGameFlag(0x3f))
+ if (queryGameFlag(0x3F))
nextTimSequence = 15;
if (queryGameFlag(0x40))
nextTimSequence = 16;
diff --git a/engines/kyra/text_lol.cpp b/engines/kyra/text_lol.cpp
index ee42d6db92..6e77db1f8a 100644
--- a/engines/kyra/text_lol.cpp
+++ b/engines/kyra/text_lol.cpp
@@ -85,7 +85,7 @@ void TextDisplayer_LoL::setupField(bool mode) {
_screen->copyBlockToPage(3, 0, 0, 320, 200, _vm->_pageBuffer1);
_screen->setCurPage(cp);
- _vm->_updateFlags &= 0xfffd;
+ _vm->_updateFlags &= 0xFFFD;
}
} else {
if (!mode)
@@ -136,18 +136,16 @@ void TextDisplayer_LoL::expandField() {
void TextDisplayer_LoL::printDialogueText(int dim, char *str, EMCState *script, const uint16 *paramList, int16 paramIndex) {
int oldDim = 0;
- const bool isPc98 = (_vm->gameFlags().platform == Common::kPlatformPC98);
-
if (dim == 3) {
if (_vm->_updateFlags & 2) {
oldDim = clearDim(4);
- _textDimData[4].color1 = isPc98 ? 0x33 : 254;
+ _textDimData[4].color1 = _vm->gameFlags().use16ColorMode ? 0x33 : 254;
_textDimData[4].color2 = _screen->_curDim->unkA;
} else {
oldDim = clearDim(3);
- _textDimData[3].color1 = isPc98 ? 0x33 : 192;
+ _textDimData[3].color1 = _vm->gameFlags().use16ColorMode ? 0x33 : 192;
_textDimData[3].color2 = _screen->_curDim->unkA;
- if (!isPc98)
+ if (!_vm->gameFlags().use16ColorMode)
_screen->copyColor(192, 254);
_vm->enableTimer(11);
_vm->_textColorFlag = 0;
@@ -157,12 +155,12 @@ void TextDisplayer_LoL::printDialogueText(int dim, char *str, EMCState *script,
oldDim = _screen->curDimIndex();
_screen->setScreenDim(dim);
_lineCount = 0;
- _textDimData[dim].color1 = isPc98 ? 0x33 : 254;
+ _textDimData[dim].color1 = _vm->gameFlags().use16ColorMode ? 0x33 : 254;
_textDimData[dim].color2 = _screen->_curDim->unkA;
}
int cp = _screen->setCurPage(0);
- Screen::FontId of = _screen->setFont(_vm->gameFlags().use16ColorMode ? Screen::FID_SJIS_FNT : Screen::FID_9_FNT);
+ Screen::FontId of = _screen->setFont((_vm->gameFlags().lang == Common::JA_JPN && _vm->gameFlags().use16ColorMode) ? Screen::FID_SJIS_FNT : Screen::FID_9_FNT);
preprocessString(str, script, paramList, paramIndex);
_numCharsTotal = strlen(_dialogueBuffer);
@@ -176,8 +174,8 @@ void TextDisplayer_LoL::printDialogueText(int dim, char *str, EMCState *script,
}
void TextDisplayer_LoL::printMessage(uint16 type, const char *str, ...) {
- static const uint8 textColors256[] = { 0xfe, 0xa2, 0x84, 0x97, 0x9F };
- static const uint8 textColors16[] = { 0x33, 0xaa, 0x88, 0x55, 0x99 };
+ static const uint8 textColors256[] = { 0xFE, 0xA2, 0x84, 0x97, 0x9F };
+ static const uint8 textColors16[] = { 0x33, 0xAA, 0x88, 0x55, 0x99 };
static const uint8 soundEffect[] = { 0x0B, 0x00, 0x2B, 0x1B, 0x00 };
const uint8 *textColors = _vm->gameFlags().use16ColorMode ? textColors16 : textColors256;
@@ -187,7 +185,7 @@ void TextDisplayer_LoL::printMessage(uint16 type, const char *str, ...) {
else
_vm->stopPortraitSpeechAnim();
- uint16 col = textColors[type & 0x7fff];
+ uint16 col = textColors[type & 0x7FFF];
int od = _screen->curDimIndex();
@@ -222,16 +220,15 @@ void TextDisplayer_LoL::printMessage(uint16 type, const char *str, ...) {
_vm->sound()->playSoundEffect(soundEffect[type]);
}
- _vm->_textColorFlag = type & 0x7fff;
+ _vm->_textColorFlag = type & 0x7FFF;
_vm->_fadeText = false;
}
void TextDisplayer_LoL::preprocessString(char *str, EMCState *script, const uint16 *paramList, int16 paramIndex) {
char *dst = _dialogueBuffer;
- const bool isPc98 = (_vm->gameFlags().platform == Common::kPlatformPC98);
for (char *s = str; *s;) {
- if (isPc98) {
+ if (_vm->gameFlags().lang == Common::JA_JPN) {
uint8 c = *s;
if (c >= 0xE0 || (c > 0x80 && c < 0xA0)) {
*dst++ = *s++;
diff --git a/engines/kyra/text_rpg.cpp b/engines/kyra/text_rpg.cpp
index 52c14c7223..a19d678e35 100644
--- a/engines/kyra/text_rpg.cpp
+++ b/engines/kyra/text_rpg.cpp
@@ -36,7 +36,7 @@ enum {
TextDisplayer_rpg::TextDisplayer_rpg(KyraRpgEngine *engine, Screen *scr) : _vm(engine), _screen(scr),
_lineCount(0), _printFlag(false), _lineWidth(0), _numCharsTotal(0), _allowPageBreak(true),
- _numCharsLeft(0), _numCharsPrinted(0), _sjisLineBreakFlag(false), _waitButtonMode(1) {
+ _numCharsLeft(0), _numCharsPrinted(0), _sjisTextModeLineBreak(false), _waitButtonMode(1) {
_dialogueBuffer = new char[kEoBTextBufferSize];
memset(_dialogueBuffer, 0, kEoBTextBufferSize);
@@ -88,8 +88,8 @@ void TextDisplayer_rpg::resetDimTextPositions(int dim) {
}
void TextDisplayer_rpg::resetPageBreakString() {
- if (vm()->_moreStrings)
- strcpy(_pageBreakString, vm()->_moreStrings[0]);
+ if (_vm->_moreStrings)
+ strcpy(_pageBreakString, _vm->_moreStrings[0]);
}
void TextDisplayer_rpg::setPageBreakFlag() {
@@ -102,8 +102,6 @@ void TextDisplayer_rpg::removePageBreakFlag() {
}
void TextDisplayer_rpg::displayText(char *str, ...) {
- const bool isPc98 = (_vm->gameFlags().platform == Common::kPlatformPC98);
-
_printFlag = false;
_lineWidth = 0;
@@ -125,7 +123,9 @@ void TextDisplayer_rpg::displayText(char *str, ...) {
const ScreenDim *sd = _screen->_curDim;
int sdx = _screen->curDimIndex();
- bool pc98PrintFlag = (isPc98 && (sdx == 3 || sdx == 4 || sdx == 5 || sdx == 15)) ? true : false;
+ bool sjisTextMode = (_vm->gameFlags().lang == Common::JA_JPN && _vm->gameFlags().use16ColorMode && (sdx == 3 || sdx == 4 || sdx == 5 || sdx == 15)) ? true : false;
+ int sjisOffs = sjisTextMode ? 8 : 9;
+
uint16 charsPerLine = (sd->w << 3) / (_screen->getFontWidth() + _screen->_charWidth);
while (c) {
@@ -146,15 +146,25 @@ void TextDisplayer_rpg::displayText(char *str, ...) {
c = parseCommand();
}
- if (isPc98) {
+ if (_vm->gameFlags().lang == Common::JA_JPN) {
uint8 cu = (uint8) c;
if (cu >= 0xE0 || (cu > 0x80 && cu < 0xA0)) {
- _currentLine[_numCharsLeft++] = c;
- _currentLine[_numCharsLeft++] = parseCommand();
- _currentLine[_numCharsLeft] = '\0';
- _lineWidth += 8;
- if ((_textDimData[sdx].column + _lineWidth) > (sd->w << 3))
+ if (sjisTextMode) {
+ _currentLine[_numCharsLeft++] = c;
+ _currentLine[_numCharsLeft++] = parseCommand();
+ _currentLine[_numCharsLeft] = '\0';
+ }
+
+ if ((_textDimData[sdx].column + _lineWidth + sjisOffs) > (sd->w << 3))
printLine(_currentLine);
+
+ if (!sjisTextMode) {
+ _currentLine[_numCharsLeft++] = c;
+ _currentLine[_numCharsLeft++] = parseCommand();
+ _currentLine[_numCharsLeft] = '\0';
+ }
+
+ _lineWidth += sjisOffs;
c = parseCommand();
continue;
}
@@ -182,17 +192,17 @@ void TextDisplayer_rpg::displayText(char *str, ...) {
case 8:
printLine(_currentLine);
dv = _textDimData[sdx].column / (_screen->getFontWidth() + _screen->_charWidth);
- dv = ((dv + 8) & 0xfff8) - 1;
+ dv = ((dv + 8) & 0xFFF8) - 1;
if (dv >= charsPerLine)
dv = 0;
_textDimData[sdx].column = (_screen->getFontWidth() + _screen->_charWidth) * dv;
break;
case 12:
- if (isPc98)
- _sjisLineBreakFlag = true;
+ if (sjisTextMode)
+ _sjisTextModeLineBreak = true;
printLine(_currentLine);
- _sjisLineBreakFlag = false;
+ _sjisTextModeLineBreak = false;
_lineCount++;
_textDimData[sdx].column = 0;
_textDimData[sdx].line++;
@@ -208,7 +218,7 @@ void TextDisplayer_rpg::displayText(char *str, ...) {
default:
if (_vm->game() == GI_LOL || (unsigned char)c > 30) {
- _lineWidth += (pc98PrintFlag ? 4 : _screen->getCharWidth((uint8)c));
+ _lineWidth += (sjisTextMode ? 4 : (_screen->_currentFont == Screen::FID_SJIS_FNT ? 9 : _screen->getCharWidth((uint8)c)));
_currentLine[_numCharsLeft++] = c;
_currentLine[_numCharsLeft] = 0;
@@ -266,7 +276,7 @@ void TextDisplayer_rpg::readNextPara() {
// versions depend on this code we'll have to look at this again.
#if 0
if ((_vm->game() != GI_LOL) && (d & 0x80)) {
- d &= 0x7f;
+ d &= 0x7F;
c = d & 7;
d = (d & 0x78) >> 3;
uint8 l = d;
@@ -280,10 +290,9 @@ void TextDisplayer_rpg::readNextPara() {
}
void TextDisplayer_rpg::printLine(char *str) {
- const bool isPc98 = (_vm->gameFlags().platform == Common::kPlatformPC98);
const ScreenDim *sd = _screen->_curDim;
int sdx = _screen->curDimIndex();
- bool pc98PrintFlag = (isPc98 && (sdx == 3 || sdx == 4 || sdx == 5 || sdx == 15)) ? true : false;
+ bool sjisTextMode = (_vm->gameFlags().lang == Common::JA_JPN && _vm->gameFlags().use16ColorMode && (sdx == 3 || sdx == 4 || sdx == 5 || sdx == 15)) ? true : false;
int fh = (_screen->_currentFont == Screen::FID_SJIS_FNT) ? 9 : (_screen->getFontHeight() + _screen->_charOffset);
int lines = (sd->h - _screen->_charOffset) / fh;
@@ -307,25 +316,27 @@ void TextDisplayer_rpg::printLine(char *str) {
}
int x1 = (sd->sx << 3) + _textDimData[sdx].column;
- int y = sd->sy + (pc98PrintFlag ? (_textDimData[sdx].line << 3) : (fh * _textDimData[sdx].line));
+ int y = sd->sy + (sjisTextMode ? (_textDimData[sdx].line << 3) : (fh * _textDimData[sdx].line));
int w = sd->w << 3;
int lw = _lineWidth;
int s = _numCharsLeft;
char c = 0;
+ uint8 twoByteCharOffs = 0;
- if (pc98PrintFlag) {
+
+ if (sjisTextMode) {
bool ct = true;
if ((lw + _textDimData[sdx].column) > w) {
if ((lines - 1 - (_waitButtonSpace << 1)) <= _lineCount)
// cut off line to leave space for "MORE" button
- w -= vm()->guiSettings()->buttons.waitReserve;
+ w -= _vm->guiSettings()->buttons.waitReserve;
} else {
- if (!_sjisLineBreakFlag || (_lineCount + 1 < lines - 1))
+ if (!_sjisTextModeLineBreak || (_lineCount + 1 < lines - 1))
ct = false;
else
// cut off line to leave space for "MORE" button
- w -= vm()->guiSettings()->buttons.waitReserve;
+ w -= _vm->guiSettings()->buttons.waitReserve;
}
if (ct) {
@@ -344,41 +355,88 @@ void TextDisplayer_rpg::printLine(char *str) {
s = n2;
}
} else {
- if ((lw + _textDimData[sdx].column) > w) {
+ if (_vm->gameFlags().lang == Common::JA_JPN) {
+ for (int i = 0; i < s; ++i) {
+ uint8 cu = (uint8) str[i];
+ if (cu >= 0xE0 || (cu > 0x80 && cu < 0xA0))
+ twoByteCharOffs = 8;
+ }
+ }
+
+ if ((lw + _textDimData[sdx].column) >= w) {
if ((lines - 1) <= _lineCount && _allowPageBreak)
// cut off line to leave space for "MORE" button
- w -= vm()->guiSettings()->buttons.waitReserve;
+ w -= _vm->guiSettings()->buttons.waitReserve;
w -= _textDimData[sdx].column;
- int n2 = 0;
- int n1 = s - 1;
+ int lineLastCharPos = 0;
+ int strPos = s - 1;
+
+ if (twoByteCharOffs) {
+ lw = 0;
+ int prevStrPos = 0;
+ c = str[0];
+
+ for (strPos = 0; strPos < s; ++strPos) {
+ uint8 cu = (uint8) str[strPos];
+ if (cu >= 0xE0 || (cu > 0x80 && cu < 0xA0)) {
+ lw += 9;
+ strPos++;
+ } else {
+ lw += _screen->getCharWidth((uint8)c);
+ }
+
+ if (!lineLastCharPos && w < lw + twoByteCharOffs)
+ lineLastCharPos = prevStrPos;
+
+ if (lineLastCharPos && c == ' ') {
+ s = strPos;
+ _printFlag = false;
+ break;
+ }
+ prevStrPos = strPos;
+ c = (char) cu;
+ }
+
+ if (!lineLastCharPos) {
+ lineLastCharPos = s - 1;
+ if (lineLastCharPos && str[lineLastCharPos] == ' ') {
+ s = strPos;
+ _printFlag = false;
+ }
+ }
- while (n1 > 0) {
- //cut off line after last space
- c = str[n1];
+ lw = _lineWidth;
- lw -= _screen->getCharWidth((uint8)c);
+ } else {
+ while (strPos > 0) {
+ //cut off line after last space
+ c = str[strPos];
- if (!n2 && lw <= w)
- n2 = n1;
+ lw -= _screen->getCharWidth((uint8)c);
- if (n2 && c == ' ') {
- s = n1;
- _printFlag = false;
- break;
+ if (!lineLastCharPos && lw <= w)
+ lineLastCharPos = strPos;
+
+ if (lineLastCharPos && c == ' ') {
+ s = strPos;
+ _printFlag = false;
+ break;
+ }
+ strPos--;
}
- n1--;
}
- if (!n1) {
+ if (!strPos) {
if (_textDimData[sdx].column && !_printFlag) {
s = lw = 0;
_printFlag = true;
} else {
- s = n2;
+ s = lineLastCharPos;
}
}
+
}
}
@@ -386,7 +444,7 @@ void TextDisplayer_rpg::printLine(char *str) {
str[s] = 0;
uint8 col = _textDimData[sdx].color1;
- if (isPc98 && (sdx == 2 || sdx == 3 || sdx == 4 || sdx == 5 || sdx == 15)) {
+ if (sjisTextMode && (sdx == 2 || sdx == 3 || sdx == 4 || sdx == 5 || sdx == 15)) {
switch (_textDimData[sdx].color1) {
case 0x88:
col = 0x41;
@@ -394,14 +452,14 @@ void TextDisplayer_rpg::printLine(char *str) {
case 0x55:
col = 0x81;
break;
- case 0xaa:
+ case 0xAA:
col = 0x21;
break;
case 0x99:
- col = 0xa1;
+ col = 0xA1;
break;
case 0x33:
- col = 0xe1;
+ col = 0xE1;
break;
case 0x18:
col = 0x61;
@@ -413,6 +471,7 @@ void TextDisplayer_rpg::printLine(char *str) {
_screen->printText(str, x1 & ~3, (y + 8) & ~7, col, 0);
} else {
_screen->printText(str, x1, y, col, _textDimData[sdx].color2);
+ _screen->updateScreen();
}
_textDimData[sdx].column += lw;
@@ -432,9 +491,9 @@ void TextDisplayer_rpg::printLine(char *str) {
str[len] = 0;
_numCharsLeft = strlen(str);
- _lineWidth = pc98PrintFlag ? (_numCharsLeft << 2) : _screen->getTextWidth(str);
+ _lineWidth = sjisTextMode ? (_numCharsLeft << 2) : (_screen->_currentFont == Screen::FID_SJIS_FNT ? _numCharsLeft * 9: _screen->getTextWidth(str));
- if (!_numCharsLeft && _textDimData[sdx].column < (sd->w << 3))
+ if (!_numCharsLeft && (_textDimData[sdx].column + twoByteCharOffs) <= (sd->w << 3))
return;
_textDimData[sdx].column = 0;
@@ -483,7 +542,7 @@ void TextDisplayer_rpg::printMessage(const char *str, int textColor, ...) {
displayText(_dialogueBuffer);
- if (vm()->game() != GI_EOB1)
+ if (_vm->game() != GI_EOB1)
_textDimData[_screen->curDimIndex()].color1 = tc;
if (!_screen->_curPage)
@@ -494,7 +553,7 @@ int TextDisplayer_rpg::clearDim(int dim) {
int res = _screen->curDimIndex();
_screen->setScreenDim(dim);
_textDimData[dim].color1 = _screen->_curDim->unk8;
- _textDimData[dim].color2 = vm()->game() == GI_LOL ? _screen->_curDim->unkA : vm()->guiSettings()->colors.fill;
+ _textDimData[dim].color2 = _vm->game() == GI_LOL ? _screen->_curDim->unkA : _vm->guiSettings()->colors.fill;
clearCurDim();
return res;
}
@@ -502,7 +561,7 @@ int TextDisplayer_rpg::clearDim(int dim) {
void TextDisplayer_rpg::clearCurDim() {
int d = _screen->curDimIndex();
const ScreenDim *tmp = _screen->getScreenDim(d);
- if (vm()->gameFlags().use16ColorMode) {
+ if (_vm->gameFlags().use16ColorMode) {
_screen->fillRect(tmp->sx << 3, tmp->sy, ((tmp->sx + tmp->w) << 3) - 2, (tmp->sy + tmp->h) - 2, _textDimData[d].color2);
} else
_screen->fillRect(tmp->sx << 3, tmp->sy, ((tmp->sx + tmp->w) << 3) - 1, (tmp->sy + tmp->h) - 1, _textDimData[d].color2);
@@ -512,40 +571,40 @@ void TextDisplayer_rpg::clearCurDim() {
}
void TextDisplayer_rpg::textPageBreak() {
- if (vm()->game() != GI_LOL)
- SWAP(vm()->_dialogueButtonLabelColor1, vm()->_dialogueButtonLabelColor2);
+ if (_vm->game() != GI_LOL)
+ SWAP(_vm->_dialogueButtonLabelColor1, _vm->_dialogueButtonLabelColor2);
int cp = _screen->setCurPage(0);
- Screen::FontId cf = _screen->setFont(vm()->gameFlags().use16ColorMode ? Screen::FID_SJIS_FNT : Screen::FID_6_FNT);
+ Screen::FontId cf = _screen->setFont((_vm->gameFlags().lang == Common::JA_JPN && _vm->gameFlags().use16ColorMode) ? Screen::FID_SJIS_FNT : Screen::FID_6_FNT);
- if (vm()->game() == GI_LOL)
- vm()->_timer->pauseSingleTimer(11, true);
+ if (_vm->game() == GI_LOL)
+ _vm->_timer->pauseSingleTimer(11, true);
- vm()->_fadeText = false;
+ _vm->_fadeText = false;
int resetPortraitAfterSpeechAnim = 0;
int updatePortraitSpeechAnimDuration = 0;
- if (vm()->_updateCharNum != -1) {
- resetPortraitAfterSpeechAnim = vm()->_resetPortraitAfterSpeechAnim;
- vm()->_resetPortraitAfterSpeechAnim = 0;
- updatePortraitSpeechAnimDuration = vm()->_updatePortraitSpeechAnimDuration;
- if (vm()->_updatePortraitSpeechAnimDuration > 36)
- vm()->_updatePortraitSpeechAnimDuration = 36;
+ if (_vm->_updateCharNum != -1) {
+ resetPortraitAfterSpeechAnim = _vm->_resetPortraitAfterSpeechAnim;
+ _vm->_resetPortraitAfterSpeechAnim = 0;
+ updatePortraitSpeechAnimDuration = _vm->_updatePortraitSpeechAnimDuration;
+ if (_vm->_updatePortraitSpeechAnimDuration > 36)
+ _vm->_updatePortraitSpeechAnimDuration = 36;
}
uint32 speechPartTime = 0;
- if (vm()->speechEnabled() && vm()->_activeVoiceFileTotalTime && _numCharsTotal)
- speechPartTime = vm()->_system->getMillis() + ((_numCharsPrinted * vm()->_activeVoiceFileTotalTime) / _numCharsTotal);
+ if (_vm->speechEnabled() && _vm->_activeVoiceFileTotalTime && _numCharsTotal)
+ speechPartTime = _vm->_system->getMillis() + ((_numCharsPrinted * _vm->_activeVoiceFileTotalTime) / _numCharsTotal);
const ScreenDim *dim = _screen->getScreenDim(_screen->curDimIndex());
int x = ((dim->sx + dim->w) << 3) - (_vm->_dialogueButtonWidth + 3);
int y = 0;
- int w = vm()->_dialogueButtonWidth;
+ int w = _vm->_dialogueButtonWidth;
- if (vm()->game() == GI_LOL) {
- if (vm()->_needSceneRestore && (vm()->_updateFlags & 2)) {
- if (vm()->_currentControlMode || !(vm()->_updateFlags & 2)) {
+ if (_vm->game() == GI_LOL) {
+ if (_vm->_needSceneRestore && (_vm->_updateFlags & 2)) {
+ if (_vm->_currentControlMode || !(_vm->_updateFlags & 2)) {
y = dim->sy + dim->h - 5;
} else {
x += 6;
@@ -555,49 +614,49 @@ void TextDisplayer_rpg::textPageBreak() {
y = dim->sy + dim->h - 10;
}
} else {
- y = vm()->guiSettings()->buttons.waitY[_waitButtonMode];
- x = vm()->guiSettings()->buttons.waitX[_waitButtonMode];
- w = vm()->guiSettings()->buttons.waitWidth[_waitButtonMode];
+ y = _vm->guiSettings()->buttons.waitY[_waitButtonMode];
+ x = _vm->guiSettings()->buttons.waitX[_waitButtonMode];
+ w = _vm->guiSettings()->buttons.waitWidth[_waitButtonMode];
}
- if (vm()->gameFlags().use16ColorMode) {
- vm()->gui_drawBox(x + 8, (y & ~7) - 1, 66, 10, 0xee, 0xcc, -1);
- _screen->printText(_pageBreakString, (x + 37 - (strlen(_pageBreakString) << 1) + 4) & ~3, (y + 2) & ~7, 0xc1, 0);
+ if (_vm->gameFlags().use16ColorMode) {
+ _vm->gui_drawBox(x + 8, (y & ~7) - 1, 66, 10, 0xEE, 0xCC, -1);
+ _screen->printText(_pageBreakString, (x + 37 - (strlen(_pageBreakString) << 1) + 4) & ~3, (y + 2) & ~7, 0xC1, 0);
} else {
- vm()->gui_drawBox(x, y, w, vm()->guiSettings()->buttons.height, vm()->guiSettings()->colors.frame1, vm()->guiSettings()->colors.frame2, vm()->guiSettings()->colors.fill);
- _screen->printText(_pageBreakString, x + (w >> 1) - (vm()->screen()->getTextWidth(_pageBreakString) >> 1), y + 2, vm()->_dialogueButtonLabelColor1, 0);
+ _vm->gui_drawBox(x, y, w, _vm->guiSettings()->buttons.height, _vm->guiSettings()->colors.frame1, _vm->guiSettings()->colors.frame2, _vm->guiSettings()->colors.fill);
+ _screen->printText(_pageBreakString, x + (w >> 1) - (_vm->screen()->getTextWidth(_pageBreakString) >> 1), y + 2, _vm->_dialogueButtonLabelColor1, 0);
}
- vm()->removeInputTop();
+ _vm->removeInputTop();
bool loop = true;
bool target = false;
do {
- int inputFlag = vm()->checkInput(0, false) & 0xFF;
- vm()->removeInputTop();
+ int inputFlag = _vm->checkInput(0, false) & 0xFF;
+ _vm->removeInputTop();
while (!inputFlag && !_vm->shouldQuit()) {
- vm()->update();
+ _vm->update();
- if (vm()->speechEnabled()) {
- if (((vm()->_system->getMillis() > speechPartTime) || (vm()->snd_updateCharacterSpeech() != 2)) && speechPartTime) {
+ if (_vm->speechEnabled()) {
+ if (((_vm->_system->getMillis() > speechPartTime) || (_vm->snd_updateCharacterSpeech() != 2)) && speechPartTime) {
loop = false;
- inputFlag = vm()->_keyMap[Common::KEYCODE_RETURN];
+ inputFlag = _vm->_keyMap[Common::KEYCODE_RETURN];
break;
}
}
- inputFlag = vm()->checkInput(0, false) & 0xFF;
- vm()->removeInputTop();
+ inputFlag = _vm->checkInput(0, false) & 0xFF;
+ _vm->removeInputTop();
}
- vm()->gui_notifyButtonListChanged();
+ _vm->gui_notifyButtonListChanged();
- if (inputFlag == vm()->_keyMap[Common::KEYCODE_SPACE] || inputFlag == vm()->_keyMap[Common::KEYCODE_RETURN]) {
+ if (inputFlag == _vm->_keyMap[Common::KEYCODE_SPACE] || inputFlag == _vm->_keyMap[Common::KEYCODE_RETURN]) {
loop = false;
} else if (inputFlag == 199 || inputFlag == 201) {
- if (vm()->posWithinRect(vm()->_mouseX, vm()->_mouseY, x, y, x + w, y + 9)) {
+ if (_vm->posWithinRect(_vm->_mouseX, _vm->_mouseY, x, y, x + w, y + 9)) {
if (_vm->game() == GI_LOL)
target = true;
else
@@ -609,7 +668,7 @@ void TextDisplayer_rpg::textPageBreak() {
}
} while (loop && !_vm->shouldQuit());
- if (vm()->gameFlags().use16ColorMode)
+ if (_vm->gameFlags().use16ColorMode)
_screen->fillRect(x + 8, y, x + 57, y + 9, _textDimData[_screen->curDimIndex()].color2);
else
_screen->fillRect(x, y, x + w - 1, y + 8, _textDimData[_screen->curDimIndex()].color2);
@@ -617,52 +676,52 @@ void TextDisplayer_rpg::textPageBreak() {
clearCurDim();
_screen->updateScreen();
- if (vm()->game() == GI_LOL)
- vm()->_timer->pauseSingleTimer(11, false);
+ if (_vm->game() == GI_LOL)
+ _vm->_timer->pauseSingleTimer(11, false);
- if (vm()->_updateCharNum != -1) {
- vm()->_resetPortraitAfterSpeechAnim = resetPortraitAfterSpeechAnim;
+ if (_vm->_updateCharNum != -1) {
+ _vm->_resetPortraitAfterSpeechAnim = resetPortraitAfterSpeechAnim;
if (updatePortraitSpeechAnimDuration > 36)
updatePortraitSpeechAnimDuration -= 36;
else
updatePortraitSpeechAnimDuration >>= 1;
- vm()->_updatePortraitSpeechAnimDuration = updatePortraitSpeechAnimDuration;
+ _vm->_updatePortraitSpeechAnimDuration = updatePortraitSpeechAnimDuration;
}
_screen->setFont(cf);
_screen->setCurPage(cp);
- if (vm()->game() != GI_LOL)
- SWAP(vm()->_dialogueButtonLabelColor1, vm()->_dialogueButtonLabelColor2);
+ if (_vm->game() != GI_LOL)
+ SWAP(_vm->_dialogueButtonLabelColor1, _vm->_dialogueButtonLabelColor2);
- vm()->removeInputTop();
+ _vm->removeInputTop();
}
void TextDisplayer_rpg::displayWaitButton() {
- vm()->_dialogueNumButtons = 1;
- vm()->_dialogueButtonString[0] = _pageBreakString;
- vm()->_dialogueButtonString[1] = 0;
- vm()->_dialogueButtonString[2] = 0;
- vm()->_dialogueHighlightedButton = 0;
+ _vm->_dialogueNumButtons = 1;
+ _vm->_dialogueButtonString[0] = _pageBreakString;
+ _vm->_dialogueButtonString[1] = 0;
+ _vm->_dialogueButtonString[2] = 0;
+ _vm->_dialogueHighlightedButton = 0;
- vm()->_dialogueButtonPosX = &vm()->guiSettings()->buttons.waitX[_waitButtonMode];
- vm()->_dialogueButtonPosY = &vm()->guiSettings()->buttons.waitY[_waitButtonMode];
- vm()->_dialogueButtonWidth = vm()->guiSettings()->buttons.waitWidth[_waitButtonMode];
- vm()->_dialogueButtonYoffs = 0;
+ _vm->_dialogueButtonPosX = &_vm->guiSettings()->buttons.waitX[_waitButtonMode];
+ _vm->_dialogueButtonPosY = &_vm->guiSettings()->buttons.waitY[_waitButtonMode];
+ _vm->_dialogueButtonWidth = _vm->guiSettings()->buttons.waitWidth[_waitButtonMode];
+ _vm->_dialogueButtonYoffs = 0;
- SWAP(vm()->_dialogueButtonLabelColor1, vm()->_dialogueButtonLabelColor2);
- vm()->drawDialogueButtons();
+ SWAP(_vm->_dialogueButtonLabelColor1, _vm->_dialogueButtonLabelColor2);
+ _vm->drawDialogueButtons();
- if (!vm()->shouldQuit())
- vm()->removeInputTop();
+ if (!_vm->shouldQuit())
+ _vm->removeInputTop();
- while (!vm()->processDialogue() && !vm()->shouldQuit()) {}
+ while (!_vm->processDialogue() && !_vm->shouldQuit()) {}
- _screen->fillRect(vm()->_dialogueButtonPosX[0], vm()->_dialogueButtonPosY[0], vm()->_dialogueButtonPosX[0] + vm()->_dialogueButtonWidth - 1, vm()->_dialogueButtonPosY[0] + vm()->guiSettings()->buttons.height - 1, vm()->guiSettings()->colors.fill);
+ _screen->fillRect(_vm->_dialogueButtonPosX[0], _vm->_dialogueButtonPosY[0], _vm->_dialogueButtonPosX[0] + _vm->_dialogueButtonWidth - 1, _vm->_dialogueButtonPosY[0] + _vm->guiSettings()->buttons.height - 1, _vm->guiSettings()->colors.fill);
_screen->updateScreen();
- vm()->_dialogueButtonWidth = 95;
- SWAP(vm()->_dialogueButtonLabelColor1, vm()->_dialogueButtonLabelColor2);
+ _vm->_dialogueButtonWidth = 95;
+ SWAP(_vm->_dialogueButtonLabelColor1, _vm->_dialogueButtonLabelColor2);
clearCurDim();
}
diff --git a/engines/kyra/text_rpg.h b/engines/kyra/text_rpg.h
index 5ad8899484..eb8617a371 100644
--- a/engines/kyra/text_rpg.h
+++ b/engines/kyra/text_rpg.h
@@ -79,7 +79,7 @@ protected:
uint32 _numCharsPrinted;
bool _printFlag;
- bool _sjisLineBreakFlag;
+ bool _sjisTextModeLineBreak;
char _pageBreakString[20];
char _scriptParaString[11];
diff --git a/engines/kyra/timer_eob.cpp b/engines/kyra/timer_eob.cpp
index 766fe453ab..effda22ac9 100644
--- a/engines/kyra/timer_eob.cpp
+++ b/engines/kyra/timer_eob.cpp
@@ -57,7 +57,7 @@ void EoBCoreEngine::setupTimers() {
void EoBCoreEngine::setCharEventTimer(int charIndex, uint32 countdown, int evnt, int updateExistingTimer) {
uint32 ntime = _system->getMillis() + countdown * _tickLength;
- uint8 timerId = 0x30 | (charIndex & 0x0f);
+ uint8 timerId = 0x30 | (charIndex & 0x0F);
EoBCharacter *c = &_characters[charIndex];
if (!_timer->isEnabled(timerId)) {
@@ -118,7 +118,7 @@ void EoBCoreEngine::setupCharacterTimers() {
if (!testCharacter(i, 1))
continue;
- uint32 nextTimer = 0xffffffff;
+ uint32 nextTimer = 0xFFFFFFFF;
for (int ii = 0; ii < 10; ii++) {
if (c->timers[ii] && c->timers[ii] < nextTimer)
@@ -126,7 +126,7 @@ void EoBCoreEngine::setupCharacterTimers() {
}
uint32 ctime = _system->getMillis();
- if (nextTimer == 0xffffffff)
+ if (nextTimer == 0xFFFFFFFF)
_timer->disable(0x30 | i);
else {
enableTimer(0x30 | i);
@@ -219,11 +219,11 @@ void EoBCoreEngine::timerProcessFlyingObjects(int timerNum) {
}
void EoBCoreEngine::timerProcessMonsters(int timerNum) {
- updateMonsters(timerNum & 0x0f);
+ updateMonsters(timerNum & 0x0F);
}
void EoBCoreEngine::timerSpecialCharacterUpdate(int timerNum) {
- int charIndex = timerNum & 0x0f;
+ int charIndex = timerNum & 0x0F;
EoBCharacter *c = &_characters[charIndex];
uint32 ctime = _system->getMillis();
@@ -309,13 +309,13 @@ void EoBCoreEngine::timerSpecialCharacterUpdate(int timerNum) {
_screen->setFont(of);
}
- uint32 nextTimer = 0xffffffff;
+ uint32 nextTimer = 0xFFFFFFFF;
for (int i = 0; i < 10; i++) {
if (c->timers[i] && c->timers[i] < nextTimer)
nextTimer = c->timers[i];
}
- if (nextTimer == 0xffffffff)
+ if (nextTimer == 0xFFFFFFFF)
_timer->disable(timerNum);
else
_timer->setCountdown(timerNum, (nextTimer - ctime) / _tickLength);
diff --git a/engines/kyra/timer_lol.cpp b/engines/kyra/timer_lol.cpp
index a3df8dbe00..9d0cc0dd72 100644
--- a/engines/kyra/timer_lol.cpp
+++ b/engines/kyra/timer_lol.cpp
@@ -49,7 +49,7 @@ void LoLEngine::setupTimers() {
}
void LoLEngine::timerProcessMonsters(int timerNum) {
- for (int i = timerNum & 0x0f; i < 30; i += 2)
+ for (int i = timerNum & 0x0F; i < 30; i += 2)
updateMonster(&_monsters[i]);
}
@@ -77,7 +77,7 @@ void LoLEngine::timerSpecialCharacterUpdate(int timerNum) {
if (_characters[i].characterUpdateDelay[ii] > eventsLeft)
eventsLeft = _characters[i].characterUpdateDelay[ii];
} else {
- _characters[i].flags &= 0xfffb;
+ _characters[i].flags &= 0xFFFB;
}
gui_drawCharPortraitWithStats(i);
@@ -89,7 +89,7 @@ void LoLEngine::timerSpecialCharacterUpdate(int timerNum) {
break;
case 2:
- _characters[i].flags &= 0xffbf;
+ _characters[i].flags &= 0xFFBF;
gui_drawCharPortraitWithStats(i);
break;
@@ -104,7 +104,7 @@ void LoLEngine::timerSpecialCharacterUpdate(int timerNum) {
break;
case 4:
- _characters[i].flags &= 0xfeff;
+ _characters[i].flags &= 0xFEFF;
_txt->printMessage(0, getLangString(0x4027), _characters[i].name);
gui_drawCharPortraitWithStats(i);
break;
@@ -114,7 +114,7 @@ void LoLEngine::timerSpecialCharacterUpdate(int timerNum) {
break;
case 6:
- _characters[i].flags &= 0xefff;
+ _characters[i].flags &= 0xEFFF;
gui_drawCharPortraitWithStats(i);
break;
@@ -146,7 +146,7 @@ void LoLEngine::timerProcessFlyingObjects(int timerNum) {
}
void LoLEngine::timerRunSceneAnimScript(int timerNum) {
- runLevelScript(0x401 + (timerNum & 0x0f), -1);
+ runLevelScript(0x401 + (timerNum & 0x0F), -1);
}
void LoLEngine::timerRegeneratePoints(int timerNum) {
diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp
index 471e83c9ed..081d94a050 100644
--- a/engines/kyra/vqa.cpp
+++ b/engines/kyra/vqa.cpp
@@ -126,8 +126,8 @@ void VQAMovie::decodeSND1(byte *inbuf, uint32 insize, byte *outbuf, uint32 outsi
while (outsize > 0) {
input = *inbuf++ << 2;
- code = (input >> 8) & 0xff;
- count = (input & 0xff) >> 2;
+ code = (input >> 8) & 0xFF;
+ count = (input & 0xFF) >> 2;
switch (code) {
case 2:
@@ -149,7 +149,7 @@ void VQAMovie::decodeSND1(byte *inbuf, uint32 insize, byte *outbuf, uint32 outsi
for (; count >= 0; count--) {
code = *inbuf++;
- curSample += WSTable4Bit[code & 0x0f];
+ curSample += WSTable4Bit[code & 0x0F];
curSample = CLIP<int16>(curSample, 0, 255);
*outbuf++ = curSample;
@@ -264,7 +264,7 @@ bool VQAMovie::open(const char *filename) {
_frameInfo = new uint32[_header.numFrames];
_frame = new byte[_header.width * _header.height];
- _codeBookSize = 0xf00 * _header.blockW * _header.blockH;
+ _codeBookSize = 0xF00 * _header.blockW * _header.blockH;
_codeBook = new byte[_codeBookSize];
_partialCodeBook = new byte[_codeBookSize];
memset(_codeBook, 0, _codeBookSize);
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index ee7a185ea1..7fab4521f7 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -213,7 +213,7 @@ void Hotspot::setAnimation(uint16 newAnimId) {
else {
tempAnim = r.getAnimation(newAnimId);
if (tempAnim == NULL)
- error("Hotspot %xh tried to set non-existant Animation Id: %xh", _hotspotId, newAnimId);
+ error("Hotspot %xh tried to set non-existent Animation Id: %xh", _hotspotId, newAnimId);
}
setAnimation(tempAnim);
diff --git a/engines/lure/menu.cpp b/engines/lure/menu.cpp
index 5a0dd26cba..93deecdcd6 100644
--- a/engines/lure/menu.cpp
+++ b/engines/lure/menu.cpp
@@ -31,7 +31,7 @@
#include "lure/events.h"
#include "lure/lure.h"
-#if defined(_WIN32_WCE) || defined(__SYMBIAN32__) || defined(WEBOS)
+#if defined(_WIN32_WCE) || defined(__SYMBIAN32__) || defined(WEBOS) || defined(__ANDROID__)
#define LURE_CLICKABLE_MENUS
#endif
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp
index 9a9313ece9..26d15dd025 100644
--- a/engines/lure/room.cpp
+++ b/engines/lure/room.cpp
@@ -549,7 +549,7 @@ void Room::setRoomNumber(uint16 newRoomNumber, bool showOverlay) {
_roomData = res.getRoom(newRoomNumber);
if (!_roomData)
- error("Tried to change to non-existant room: %d", newRoomNumber);
+ error("Tried to change to non-existent room: %d", newRoomNumber);
bool fadeFlag = (newRoomNumber != _roomNumber) && (_roomNumber != 0);
bool leaveFlag = _roomNumber != 999;
diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h
index fc7dfce9bb..87635bfc6a 100644
--- a/engines/mohawk/detection_tables.h
+++ b/engines/mohawk/detection_tables.h
@@ -239,6 +239,24 @@ static const MohawkGameDescription gameDescriptions[] = {
0,
},
+ // Myst Masterpiece Edition
+ // Polish Windows
+ // From pykman (Included in "Myst: Antologia")
+ {
+ {
+ "myst",
+ "Masterpiece Edition",
+ AD_ENTRY1("MYST.DAT", "4a05771b60f4a69869838d01e85c9e80"),
+ Common::PL_POL,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO1(GUIO_NOASPECT)
+ },
+ GType_MYST,
+ GF_ME,
+ 0,
+ },
+
// Riven: The Sequel to Myst
// Version 1.0 (5CD)
// From clone2727
@@ -348,6 +366,24 @@ static const MohawkGameDescription gameDescriptions[] = {
},
// Riven: The Sequel to Myst
+ // Version 1.02 (DVD, From "Myst: Antologia")
+ // From pykman
+ {
+ {
+ "riven",
+ "",
+ AD_ENTRY1("a_Data.MHK", "733a710cf5f848b441ec72d988ab8a3d"),
+ Common::PL_POL,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO1(GUIO_NOASPECT)
+ },
+ GType_RIVEN,
+ GF_DVD,
+ 0,
+ },
+
+ // Riven: The Sequel to Myst
// Version ? (Demo, From "Prince of Persia Collector's Edition")
// From Clone2727
{
diff --git a/engines/mohawk/installer_archive.cpp b/engines/mohawk/installer_archive.cpp
index 636b7ae476..5af95f27e3 100644
--- a/engines/mohawk/installer_archive.cpp
+++ b/engines/mohawk/installer_archive.cpp
@@ -133,4 +133,4 @@ Common::SeekableReadStream *InstallerArchive::createReadStreamForMember(const Co
return Common::decompressDCL(_stream, entry.compressedSize, entry.uncompressedSize);
}
-} // End of namespace Mohawk
+} // End of namespace Mohawk
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index a0671d18d5..2b0a45d4e6 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -40,6 +40,8 @@
#include "gui/message.h"
+#include "graphics/cursorman.h"
+
namespace Mohawk {
// read a null-terminated string from a stream
@@ -223,7 +225,7 @@ Common::Error MohawkEngine_LivingBooks::run() {
}
}
- if (found)
+ if (found && CursorMan.isVisible())
found->handleMouseDown(event.mouse);
break;
diff --git a/engines/mohawk/myst_stacks/mechanical.cpp b/engines/mohawk/myst_stacks/mechanical.cpp
index ce6f902851..43e9bcfed5 100644
--- a/engines/mohawk/myst_stacks/mechanical.cpp
+++ b/engines/mohawk/myst_stacks/mechanical.cpp
@@ -837,7 +837,7 @@ void Mechanical::fortressRotation_run() {
newRate = CLIP<double>(newRate, -2.5, 2.5);
- _vm->_video->setVideoRate(gears, Common::Rational(newRate * 1000.0, 1000));
+ _vm->_video->setVideoRate(gears, Common::Rational((int)(newRate * 1000.0), 1000));
_gearsWereRunning = true;
} else if (_gearsWereRunning) {
@@ -968,7 +968,7 @@ void Mechanical::fortressSimulation_run() {
newRate = CLIP<double>(newRate, -2.5, 2.5);
- _vm->_video->setVideoRate(holo, Common::Rational(newRate * 1000.0, 1000));
+ _vm->_video->setVideoRate(holo, Common::Rational((int)(newRate * 1000.0), 1000));
_gearsWereRunning = true;
} else if (_gearsWereRunning) {
diff --git a/engines/mohawk/resource.cpp b/engines/mohawk/resource.cpp
index f01375bacf..d7e829118a 100644
--- a/engines/mohawk/resource.cpp
+++ b/engines/mohawk/resource.cpp
@@ -464,4 +464,4 @@ bool DOSArchive_v2::openStream(Common::SeekableReadStream *stream) {
return true;
}
-} // End of namespace Mohawk
+} // End of namespace Mohawk
diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp
deleted file mode 100644
index f20e05771a..0000000000
--- a/engines/parallaction/disk.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-/* 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/iff_container.h"
-#include "common/textconsole.h"
-
-#include "parallaction/disk.h"
-#include "parallaction/graphics.h"
-
-namespace Parallaction {
-
-void ILBMLoader::setupBuffer(uint32 w, uint32 h) {
- _intBuffer = 0;
- switch (_bodyMode) {
- case BODYMODE_SURFACE:
- if (!_surf) {
- _surf = new Graphics::Surface;
- assert(_surf);
- }
- _surf->create(w, h, Graphics::PixelFormat::createFormatCLUT8());
- _mode = Graphics::ILBMDecoder::ILBM_UNPACK_PLANES;
- _intBuffer = (byte *)_surf->pixels;
- break;
-
- case BODYMODE_MASKBUFFER:
- if (!_maskBuffer) {
- _maskBuffer = new MaskBuffer;
- assert(_maskBuffer);
- }
- _maskBuffer->create(w, h);
- _mode = Graphics::ILBMDecoder::ILBM_2_PACK_PLANES;
- _intBuffer = _maskBuffer->data;
- break;
-
- case BODYMODE_PATHBUFFER:
- if (!_pathBuffer) {
- _pathBuffer = new PathBuffer;
- assert(_pathBuffer);
- }
- _pathBuffer->create(w, h);
- _mode = Graphics::ILBMDecoder::ILBM_1_PACK_PLANES;
- _intBuffer = _pathBuffer->data;
- break;
-
- default:
- error("Invalid bodyMode '%i' for ILBMLoader", _bodyMode);
- break;
- }
-}
-
-bool ILBMLoader::callback(Common::IFFChunk &chunk) {
- switch (chunk._type) {
- case ID_BMHD:
- _decoder.loadHeader(chunk._stream);
- break;
-
- case ID_CMAP:
- if (_palette) {
- chunk._stream->read(_palette, chunk._size);
- }
- break;
-
- case ID_CRNG:
- if (_crng) {
- PaletteFxRange *ptr = &_crng[_numCRNG];
- chunk._stream->read((byte *)ptr, chunk._size);
- ptr->_timer = FROM_BE_16(ptr->_timer);
- ptr->_step = FROM_BE_16(ptr->_step);
- ptr->_flags = FROM_BE_16(ptr->_flags);
- ++_numCRNG;
- }
- break;
-
- case ID_BODY:
- setupBuffer(_decoder._header.width, _decoder._header.height);
- assert(_intBuffer);
- _decoder.loadBitmap(_mode, _intBuffer, chunk._stream);
- return true; // stop the parser
- }
-
- return false;
-}
-
-void ILBMLoader::load(Common::ReadStream *in, bool disposeStream) {
- Common::IFFParser parser(in, disposeStream);
- Common::Functor1Mem< Common::IFFChunk&, bool, ILBMLoader > c(this, &ILBMLoader::callback);
- parser.parse(c);
-}
-
-ILBMLoader::ILBMLoader(uint32 bodyMode, byte *palette, PaletteFxRange *crng) {
- _bodyMode = bodyMode;
- _surf = 0;
- _maskBuffer = 0;
- _pathBuffer = 0;
- _palette = palette;
- _crng = crng;
- _numCRNG = 0;
-}
-
-ILBMLoader::ILBMLoader(Graphics::Surface *surf, byte *palette, PaletteFxRange *crng) {
- _bodyMode = ILBMLoader::BODYMODE_SURFACE;
- _surf = surf;
- _palette = palette;
- _crng = crng;
- _numCRNG = 0;
-}
-
-ILBMLoader::ILBMLoader(MaskBuffer *buffer) {
- _bodyMode = ILBMLoader::BODYMODE_MASKBUFFER;
- _maskBuffer = buffer;
- _palette = 0;
- _crng = 0;
- _numCRNG = 0;
-}
-
-ILBMLoader::ILBMLoader(PathBuffer *buffer) {
- _bodyMode = ILBMLoader::BODYMODE_PATHBUFFER;
- _pathBuffer = buffer;
- _palette = 0;
- _crng = 0;
- _numCRNG = 0;
-}
-
-
-
-}
diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h
index d1171c3179..63e33dcfbd 100644
--- a/engines/parallaction/disk.h
+++ b/engines/parallaction/disk.h
@@ -28,13 +28,10 @@
#include "common/archive.h"
#include "common/str.h"
-#include "graphics/iff.h"
-
namespace Common {
class FSDirectory;
class ReadStream;
class SeekableReadStream;
-struct IFFChunk;
}
namespace Graphics {
@@ -86,36 +83,6 @@ public:
virtual PathBuffer *loadPath(const char *name, uint32 w, uint32 h) { return 0; }
};
-struct PaletteFxRange;
-
-struct ILBMLoader {
- enum {
- BODYMODE_SURFACE,
- BODYMODE_MASKBUFFER,
- BODYMODE_PATHBUFFER
- };
- uint32 _bodyMode;
- Graphics::Surface *_surf;
- MaskBuffer *_maskBuffer;
- PathBuffer *_pathBuffer;
- byte *_palette;
- PaletteFxRange *_crng;
- uint32 _mode;
- byte* _intBuffer;
- uint32 _numCRNG;
- Graphics::ILBMDecoder _decoder;
-
- ILBMLoader(uint32 bodyMode, byte *palette = 0, PaletteFxRange *crng = 0);
- ILBMLoader(Graphics::Surface *surf, byte *palette = 0, PaletteFxRange *crng = 0);
- ILBMLoader(MaskBuffer *buffer);
- ILBMLoader(PathBuffer *buffer);
-
- bool callback(Common::IFFChunk &chunk);
- void setupBuffer(uint32 w, uint32 h);
- void load(Common::ReadStream *in, bool disposeStream = false);
-};
-
-
class Disk_ns : public Disk {
protected:
diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp
index 8988897456..3135c3e8c5 100644
--- a/engines/parallaction/disk_br.cpp
+++ b/engines/parallaction/disk_br.cpp
@@ -20,11 +20,10 @@
*
*/
-#include "graphics/iff.h"
-
#include "common/config-manager.h"
#include "common/fs.h"
#include "common/textconsole.h"
+#include "graphics/decoders/iff.h"
#include "parallaction/parallaction.h"
#include "parallaction/parser.h"
@@ -459,8 +458,9 @@ void AmigaDisk_br::adjustForPalette(Graphics::Surface &surf, int transparentColo
void AmigaDisk_br::loadBackground(BackgroundInfo& info, const char *filename) {
byte r,g,b;
- byte *p;
+ const byte *p;
Common::SeekableReadStream *stream;
+ Graphics::IFFDecoder decoder;
uint i;
stream = tryOpenFile("backs/" + Common::String(filename), ".ap");
@@ -488,15 +488,16 @@ void AmigaDisk_br::loadBackground(BackgroundInfo& info, const char *filename) {
}
stream = openFile("backs/" + Common::String(filename), ".bkg");
+ decoder.loadStream(*stream);
- byte pal[768];
- ILBMLoader loader(&info.bg, pal);
- loader.load(stream, true);
-
+ info.bg.copyFrom(*decoder.getSurface());
info.width = info.bg.w;
info.height = info.bg.h;
- p = pal;
+ // Overwrite the first color (transparent key) in the palette
+ p = decoder.getPalette();
+ info.palette.setEntry(0, p[0] >> 2, p[1] >> 2, p[2] >> 0);
+
for (i = 16; i < 32; i++) {
r = *p >> 2;
p++;
@@ -507,9 +508,6 @@ void AmigaDisk_br::loadBackground(BackgroundInfo& info, const char *filename) {
info.palette.setEntry(i, r, g, b);
}
- // Overwrite the first color (transparent key) in the palette
- info.palette.setEntry(0, pal[0] >> 2, pal[1] >> 2, pal[2] >> 0);
-
// background data is drawn used the upper portion of the palette
adjustForPalette(info.bg);
}
@@ -546,10 +544,15 @@ MaskBuffer *AmigaDisk_br::loadMask(const char *name, uint32 w, uint32 h) {
return 0;
}
- ILBMLoader loader(ILBMLoader::BODYMODE_MASKBUFFER);
- loader.load(stream, true);
+ Graphics::IFFDecoder decoder;
+ decoder.setNumRelevantPlanes(2); // use only 2 first bits from each pixels
+ decoder.setPixelPacking(true); // pack 4 2bit pixels into 1 byte
+ decoder.loadStream(*stream);
- MaskBuffer *buffer = loader._maskBuffer;
+ MaskBuffer *buffer = new MaskBuffer;
+ // surface width was shrunk to 1/4th of the bitmap width due to the pixel packing
+ buffer->create(decoder.getSurface()->w * 4, decoder.getSurface()->h);
+ memcpy(buffer->data, decoder.getSurface()->pixels, buffer->size);
buffer->bigEndian = true;
finalpass(buffer->data, buffer->size);
return buffer;
@@ -580,12 +583,12 @@ GfxObj* AmigaDisk_br::loadStatic(const char* name) {
Common::String sName = name;
Common::SeekableReadStream *stream = openFile("ras/" + sName, ".ras");
+ Graphics::IFFDecoder decoder;
+ decoder.loadStream(*stream);
- ILBMLoader loader(ILBMLoader::BODYMODE_SURFACE);
- loader.load(stream, true);
-
- Graphics::Surface* surf = loader._surf;
+ Graphics::Surface *surf = new Graphics::Surface;
assert(surf);
+ surf->copyFrom(*decoder.getSurface());
// Static pictures are drawn used the upper half of the palette: this must be
// done before shadow mask is applied. This way, only really transparent pixels
@@ -717,23 +720,23 @@ GfxObj* AmigaDisk_br::loadObjects(const char *name, uint8 part) {
debugC(5, kDebugDisk, "AmigaDisk_br::loadObjects");
Common::SeekableReadStream *stream = openFile(name);
- ILBMLoader loader(ILBMLoader::BODYMODE_SURFACE);
- loader.load(stream, true);
+ Graphics::IFFDecoder decoder;
+ decoder.loadStream(*stream);
uint16 max = objectsMax[part];
if (_vm->getFeatures() & GF_DEMO)
max = 72;
byte *data = new byte[max * 2601];
- byte *srcPtr = (byte *)loader._surf->getBasePtr(0,0);
- int w = loader._surf->w;
+ const byte *srcPtr = (const byte *)decoder.getSurface()->getBasePtr(0,0);
+ int w = decoder.getSurface()->w;
// Convert to the expected display format
for (int i = 0; i < max; i++) {
uint16 x = (i % 8) * 51;
uint16 y = (i / 8) * 51;
- byte *src = srcPtr + y * w + x;
+ const byte *src = srcPtr + y * w + x;
byte *dst = data + i * 2601;
for (int h = 0; h < 51; h++) {
memcpy(dst, src, 51);
@@ -741,7 +744,6 @@ GfxObj* AmigaDisk_br::loadObjects(const char *name, uint8 part) {
dst += 51;
}
}
- delete loader._surf;
return new GfxObj(0, new Cnv(max, 51, 51, data, true));
}
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index bad854525d..f03f16ca37 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -22,9 +22,11 @@
#include "common/config-manager.h"
#include "common/fs.h"
+#include "common/iff_container.h"
#include "common/memstream.h"
#include "common/substream.h"
#include "common/textconsole.h"
+#include "graphics/decoders/iff.h"
#include "parallaction/parser.h"
#include "parallaction/parallaction.h"
@@ -312,7 +314,7 @@ void DosDisk_ns::decodeCnv(byte *data, uint16 numFrames, uint16 width, uint16 he
int32 decsize = numFrames * width * height;
bool packed = (stream->size() - stream->pos()) != decsize;
if (packed) {
- Graphics::PackBitsReadStream decoder(*stream);
+ Common::PackBitsReadStream decoder(*stream);
decoder.read(data, decsize);
} else {
stream->read(data, decsize);
@@ -914,17 +916,15 @@ void AmigaDisk_ns::buildMask(byte* buf) {
void AmigaDisk_ns::loadBackground(BackgroundInfo& info, const char *name) {
- PaletteFxRange ranges[6];
- byte pal[768];
-
Common::SeekableReadStream *s = openFile(name);
- ILBMLoader loader(&info.bg, pal, ranges);
- loader.load(s, true);
+ Graphics::IFFDecoder decoder;
+ decoder.loadStream(*s);
+ info.bg.copyFrom(*decoder.getSurface());
info.width = info.bg.w;
info.height = info.bg.h;
- byte *p = pal;
+ const byte *p = decoder.getPalette();
for (uint i = 0; i < 32; i++) {
byte r = *p >> 2;
p++;
@@ -935,8 +935,15 @@ void AmigaDisk_ns::loadBackground(BackgroundInfo& info, const char *name) {
info.palette.setEntry(i, r, g, b);
}
- for (uint j = 0; j < 6; j++) {
- info.setPaletteRange(j, ranges[j]);
+ const Common::Array<Graphics::IFFDecoder::PaletteRange> &paletteRanges = decoder.getPaletteRanges();
+ for (uint j = 0; j < 6 && j < paletteRanges.size(); j++) {
+ PaletteFxRange range;
+ range._timer = paletteRanges[j].timer;
+ range._step = paletteRanges[j].step;
+ range._flags = paletteRanges[j].flags;
+ range._first = paletteRanges[j].first;
+ range._last = paletteRanges[j].last;
+ info.setPaletteRange(j, range);
}
}
@@ -952,19 +959,25 @@ void AmigaDisk_ns::loadMask_internal(BackgroundInfo& info, const char *name) {
return; // no errors if missing mask files: not every location has one
}
- byte pal[768];
- ILBMLoader loader(ILBMLoader::BODYMODE_MASKBUFFER, pal);
- loader.load(s, true);
+ Graphics::IFFDecoder decoder;
+ decoder.setNumRelevantPlanes(2); // use only 2 first bits from each pixel
+ decoder.setPixelPacking(true); // pack 4 2bit pixels into 1 byte
+ decoder.loadStream(*s);
+ const byte *p = decoder.getPalette();
byte r, g, b;
for (uint i = 0; i < 4; i++) {
- r = pal[i*3];
- g = pal[i*3+1];
- b = pal[i*3+2];
+ r = p[i*3];
+ g = p[i*3+1];
+ b = p[i*3+2];
info.layers[i] = (((r << 4) & 0xF00) | (g & 0xF0) | (b >> 4)) & 0xFF;
}
- info._mask = loader._maskBuffer;
+ info._mask = new MaskBuffer;
+ // surface width was shrunk to 1/4th of the bitmap width due to the pixel packing
+ info._mask->create(decoder.getSurface()->w * 4, decoder.getSurface()->h);
+ memcpy(info._mask->data, decoder.getSurface()->pixels, info._mask->size);
+ info._mask->bigEndian = true;
}
void AmigaDisk_ns::loadPath_internal(BackgroundInfo& info, const char *name) {
@@ -977,9 +990,15 @@ void AmigaDisk_ns::loadPath_internal(BackgroundInfo& info, const char *name) {
return; // no errors if missing path files: not every location has one
}
- ILBMLoader loader(ILBMLoader::BODYMODE_PATHBUFFER);
- loader.load(s, true);
- info._path = loader._pathBuffer;
+ Graphics::IFFDecoder decoder;
+ decoder.setNumRelevantPlanes(1); // use only first bit from each pixel
+ decoder.setPixelPacking(true); // pack 8 1bit pixels into 1 byte
+ decoder.loadStream(*s);
+
+ info._path = new PathBuffer;
+ // surface width was shrunk to 1/8th of the bitmap width due to the pixel packing
+ info._path->create(decoder.getSurface()->w * 8, decoder.getSurface()->h);
+ memcpy(info._path->data, decoder.getSurface()->pixels, info._path->size);
info._path->bigEndian = true;
}
diff --git a/engines/parallaction/module.mk b/engines/parallaction/module.mk
index 36572a51df..f8a4e0b9a3 100644
--- a/engines/parallaction/module.mk
+++ b/engines/parallaction/module.mk
@@ -8,7 +8,6 @@ MODULE_OBJS := \
debug.o \
detection.o \
dialogue.o \
- disk.o \
disk_br.o \
disk_ns.o \
exec.o \
diff --git a/engines/pegasus/detection.cpp b/engines/pegasus/detection.cpp
index 908005b665..ba631148d5 100644
--- a/engines/pegasus/detection.cpp
+++ b/engines/pegasus/detection.cpp
@@ -119,12 +119,12 @@ SaveStateList PegasusMetaEngine::listSaves(const char *target) const {
// The original had no pattern, so the user must rename theirs
// Note that we ignore the target because saves are compatible between
// all versions
- Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles("pegasus-*.sav");
+ Common::StringArray fileNames = Pegasus::PegasusEngine::listSaveFiles();
SaveStateList saveList;
- for (uint32 i = 0; i < filenames.size(); i++) {
+ for (uint32 i = 0; i < fileNames.size(); i++) {
// Isolate the description from the file name
- Common::String desc = filenames[i].c_str() + 8;
+ Common::String desc = fileNames[i].c_str() + 8;
for (int j = 0; j < 4; j++)
desc.deleteLastChar();
@@ -136,8 +136,8 @@ SaveStateList PegasusMetaEngine::listSaves(const char *target) const {
void PegasusMetaEngine::removeSaveState(const char *target, int slot) const {
// See listSaves() for info on the pattern
- Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles("pegasus-*.sav");
- g_system->getSavefileManager()->removeSavefile(filenames[slot].c_str());
+ Common::StringArray fileNames = Pegasus::PegasusEngine::listSaveFiles();
+ g_system->getSavefileManager()->removeSavefile(fileNames[slot].c_str());
}
bool PegasusMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
diff --git a/engines/pegasus/elements.cpp b/engines/pegasus/elements.cpp
index c84d555444..87fb69a557 100644
--- a/engines/pegasus/elements.cpp
+++ b/engines/pegasus/elements.cpp
@@ -259,8 +259,8 @@ void FrameSequence::openFrameSequence() {
_frameTimes.clear();
for (uint32 i = 0; i < _numFrames; i++) {
TimeValue time = res->readUint32BE();
- _duration += time;
_frameTimes.push_back(_duration);
+ _duration += time;
}
setScale(scale);
diff --git a/engines/pegasus/energymonitor.cpp b/engines/pegasus/energymonitor.cpp
index 8aa77eb341..be9d205360 100644
--- a/engines/pegasus/energymonitor.cpp
+++ b/engines/pegasus/energymonitor.cpp
@@ -262,9 +262,9 @@ void EnergyMonitor::calibrateEnergyBar() {
_energyLight.setCurrentFrameIndex(0);
_energyLight.hide();
- show();
setEnergyValue(0);
setEnergyDrainRate(-(int32)kMaxJMPEnergy / 2);
+ show();
// Make sure warning light is hidden...
_energyLight.hide();
diff --git a/engines/pegasus/neighborhood/mars/mars.cpp b/engines/pegasus/neighborhood/mars/mars.cpp
index 34c9e3d0f8..aa7ccd596c 100644
--- a/engines/pegasus/neighborhood/mars/mars.cpp
+++ b/engines/pegasus/neighborhood/mars/mars.cpp
@@ -1035,7 +1035,6 @@ void Mars::checkContinuePoint(const RoomID room, const DirectionConstant directi
case MakeRoomView(kMars51, kEast):
case MakeRoomView(kMars56, kEast):
case MakeRoomView(kMars60, kWest):
- case MakeRoomView(kMarsMaze004, kWest):
case MakeRoomView(kMarsMaze009, kWest):
case MakeRoomView(kMarsMaze012, kWest):
case MakeRoomView(kMarsMaze037, kWest):
@@ -1059,6 +1058,11 @@ void Mars::checkContinuePoint(const RoomID room, const DirectionConstant directi
case MakeRoomView(kMarsMaze199, kWest):
makeContinuePoint();
break;
+ case MakeRoomView(kMarsMaze004, kWest):
+ // WORKAROUND: See Mars::arriveAt() for more details.
+ if (GameState.isTakenItemID(kCardBomb))
+ makeContinuePoint();
+ break;
case MakeRoomView(kMars05, kEast):
case MakeRoomView(kMars06, kEast):
case MakeRoomView(kMars07, kEast):
@@ -1393,6 +1397,13 @@ void Mars::arriveAt(const RoomID room, const DirectionConstant direction) {
case MakeRoomView(kMarsRobotShuttle, kEast):
setCurrentActivation(kActivationRobotHeadClosed);
break;
+ case MakeRoomView(kMarsMaze004, kWest):
+ // WORKAROUND: You're not supposed to continue through the maze without the
+ // bomb or the game will not be completable. We're using the previously unused
+ // bomb death here to prevent progress (you didn't find the bomb, after all).
+ if (!GameState.isTakenItemID(kCardBomb))
+ didntFindBomb();
+ break;
case MakeRoomView(kMarsMaze007, kNorth):
launchMaze007Robot();
break;
@@ -2643,7 +2654,7 @@ void Mars::startUpFromSpaceChase() {
// Open the spot sounds movie again...
_spotSounds.initFromQuickTime(getSoundSpotsName());
- _spotSounds.setVolume(_vm->getSoundFXLevel());;
+ _spotSounds.setVolume(_vm->getSoundFXLevel());
initOnePicture(&_shuttleInterface1, "Images/Mars/MCmain1.pict", kShuttleBackgroundOrder, kShuttle1Left,
kShuttle1Top, true);
diff --git a/engines/pegasus/neighborhood/mars/reactor.cpp b/engines/pegasus/neighborhood/mars/reactor.cpp
index 334fb98879..3a7ef9d7eb 100644
--- a/engines/pegasus/neighborhood/mars/reactor.cpp
+++ b/engines/pegasus/neighborhood/mars/reactor.cpp
@@ -244,9 +244,9 @@ void ReactorHistory::draw(const Common::Rect &) {
static const CoordType kColorTops[5] = {
0,
kColorHeights[0],
- kColorHeights[0] + kColorHeights[1],
- kColorHeights[0] + kColorHeights[1] + kColorHeights[2],
- kColorHeights[0] + kColorHeights[1] + kColorHeights[2] + kColorHeights[3],
+ (CoordType)(kColorHeights[0] + kColorHeights[1]),
+ (CoordType)(kColorHeights[0] + kColorHeights[1] + kColorHeights[2]),
+ (CoordType)(kColorHeights[0] + kColorHeights[1] + kColorHeights[2] + kColorHeights[3]),
};
if (_colors.isSurfaceValid() && _digits.isSurfaceValid()) {
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 98f0553783..449fa20579 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -616,7 +616,7 @@ void PegasusEngine::loadFromContinuePoint() {
// Failure to load a continue point is fatal
if (!_continuePoint)
- error("Attempting to load from non-existant continue point");
+ error("Attempting to load from non-existent continue point");
_continuePoint->seek(0);
@@ -639,9 +639,15 @@ void PegasusEngine::writeContinueStream(Common::WriteStream *stream) {
delete[] data;
}
+Common::StringArray PegasusEngine::listSaveFiles() {
+ Common::StringArray fileNames = g_system->getSavefileManager()->listSavefiles("pegasus-*.sav");
+ Common::sort(fileNames.begin(), fileNames.end());
+ return fileNames;
+}
+
Common::Error PegasusEngine::loadGameState(int slot) {
- Common::StringArray filenames = _saveFileMan->listSavefiles("pegasus-*.sav");
- Common::InSaveFile *loadFile = _saveFileMan->openForLoading(filenames[slot]);
+ Common::StringArray fileNames = listSaveFiles();
+ Common::InSaveFile *loadFile = _saveFileMan->openForLoading(fileNames[slot]);
if (!loadFile)
return Common::kUnknownError;
@@ -651,7 +657,23 @@ Common::Error PegasusEngine::loadGameState(int slot) {
return valid ? Common::kNoError : Common::kUnknownError;
}
+static bool isValidSaveFileChar(char c) {
+ // Limit it to letters, digits, and a few other characters that should be safe
+ return Common::isAlnum(c) || c == ' ' || c == '_' || c == '+' || c == '-' || c == '.';
+}
+
+static bool isValidSaveFileName(const Common::String &desc) {
+ for (uint32 i = 0; i < desc.size(); i++)
+ if (!isValidSaveFileChar(desc[i]))
+ return false;
+
+ return true;
+}
+
Common::Error PegasusEngine::saveGameState(int slot, const Common::String &desc) {
+ if (!isValidSaveFileName(desc))
+ return Common::Error(Common::kCreatingFileFailed, _("Invalid save file name"));
+
Common::String output = Common::String::format("pegasus-%s.sav", desc.c_str());
Common::OutSaveFile *saveFile = _saveFileMan->openForSaving(output, false);
if (!saveFile)
@@ -669,19 +691,35 @@ void PegasusEngine::receiveNotification(Notification *notification, const Notifi
case kGameStartingFlag: {
useMenu(new MainMenu());
- if (!isDemo()) {
+ if (isDemo()) {
+ // Start playing the music earlier here
+ ((MainMenu *)_gameMenu)->startMainMenuLoop();
+
+ // Show the intro splash screen
+ showTempScreen("Images/Demo/NGsplashScrn.pict");
+
+ if (shouldQuit()) {
+ useMenu(0);
+ return;
+ }
+
+ // Fade out and then back in with the main menu
+ _gfx->doFadeOutSync();
+ _gfx->updateDisplay();
+ _gfx->doFadeInSync();
+ } else {
+ // Display the intro
runIntro();
resetIntroTimer();
- } else {
- showTempScreen("Images/Demo/NGsplashScrn.pict");
- }
- if (shouldQuit())
- return;
+ if (shouldQuit())
+ return;
- _gfx->invalRect(Common::Rect(0, 0, 640, 480));
- _gfx->updateDisplay();
- ((MainMenu *)_gameMenu)->startMainMenuLoop();
+ // Now display the main menu
+ _gfx->invalRect(Common::Rect(0, 0, 640, 480));
+ _gfx->updateDisplay();
+ ((MainMenu *)_gameMenu)->startMainMenuLoop();
+ }
break;
}
case kPlayerDiedFlag:
diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h
index a8f2e1ffca..246414a9d0 100644
--- a/engines/pegasus/pegasus.h
+++ b/engines/pegasus/pegasus.h
@@ -30,6 +30,7 @@
#include "common/macresman.h"
#include "common/rect.h"
#include "common/scummsys.h"
+#include "common/str-array.h"
#include "common/system.h"
#include "common/util.h"
@@ -195,6 +196,7 @@ public:
bool saveRequested() const { return _saveRequested; }
void requestLoad() { _loadRequested = true; }
bool loadRequested() const { return _loadRequested; }
+ static Common::StringArray listSaveFiles();
protected:
Common::Error run();
diff --git a/engines/pegasus/sound.cpp b/engines/pegasus/sound.cpp
index bf15858e80..5b437b81d4 100644
--- a/engines/pegasus/sound.cpp
+++ b/engines/pegasus/sound.cpp
@@ -87,6 +87,9 @@ void Sound::playSound() {
stopSound();
+ // Make sure the sound is back at the beginning before we play it
+ _stream->rewind();
+
if (_fader)
setVolume(_fader->getFaderValue());
diff --git a/engines/pegasus/timers.cpp b/engines/pegasus/timers.cpp
index 3b875038cc..50cc9bc6d8 100644
--- a/engines/pegasus/timers.cpp
+++ b/engines/pegasus/timers.cpp
@@ -73,13 +73,8 @@ TimeBase::TimeBase(const TimeScale preferredScale) {
}
TimeBase::~TimeBase() {
- if (_master)
- _master->_slaves.remove(this);
-
((PegasusEngine *)g_engine)->removeTimeBase(this);
disposeAllCallBacks();
-
- // TODO: Remove slaves? Make them remove themselves?
}
void TimeBase::setTime(const TimeValue time, const TimeScale scale) {
@@ -88,20 +83,23 @@ void TimeBase::setTime(const TimeValue time, const TimeScale scale) {
}
TimeValue TimeBase::getTime(const TimeScale scale) {
+ // HACK: Emulate the master TimeBase code here for the one case that needs it in the
+ // game. Note that none of the master TimeBase code in this file should actually be
+ // used as a reference for anything ever.
+ if (_master)
+ return _master->getTime(scale);
+
return _time.getNumerator() * ((scale == 0) ? _preferredScale : scale) / _time.getDenominator();
}
void TimeBase::setRate(const Common::Rational rate) {
_rate = rate;
+ _lastMillis = 0;
if (_rate == 0)
_paused = false;
}
-Common::Rational TimeBase::getEffectiveRate() const {
- return _rate * ((_master == 0) ? 1 : _master->getEffectiveRate());
-}
-
void TimeBase::start() {
if (_paused)
_pausedRate = 1;
@@ -192,18 +190,15 @@ TimeValue TimeBase::getDuration(const TimeScale scale) const {
}
void TimeBase::setMasterTimeBase(TimeBase *tb) {
- // TODO: We're just ignoring the master (except for effective rate)
- // for now to simplify things
- if (_master)
- _master->_slaves.remove(this);
-
_master = tb;
-
- if (_master)
- _master->_slaves.push_back(this);
}
void TimeBase::updateTime() {
+ if (_master) {
+ _master->updateTime();
+ return;
+ }
+
if (_lastMillis == 0) {
_lastMillis = g_system->getMillis();
} else {
@@ -211,7 +206,7 @@ void TimeBase::updateTime() {
if (_lastMillis == curTime) // No change
return;
- _time += Common::Rational(curTime - _lastMillis, 1000) * getEffectiveRate();
+ _time += Common::Rational(curTime - _lastMillis, 1000) * getRate();
_lastMillis = curTime;
}
}
@@ -233,8 +228,6 @@ void TimeBase::checkCallBacks() {
else if (_time <= startTime)
_time = startTime;
- // TODO: Update the slaves?
-
Common::Rational time = Common::Rational(getTime(), getScale());
// Check if we've triggered any callbacks
diff --git a/engines/pegasus/timers.h b/engines/pegasus/timers.h
index bcdca6e860..944930d21b 100644
--- a/engines/pegasus/timers.h
+++ b/engines/pegasus/timers.h
@@ -26,7 +26,6 @@
#ifndef PEGASUS_TIMERS_H
#define PEGASUS_TIMERS_H
-#include "common/list.h"
#include "common/rational.h"
#include "common/func.h"
@@ -122,11 +121,6 @@ protected:
Common::Rational _time;
uint32 _lastMillis, _pauseStart;
-
-private:
- Common::Rational getEffectiveRate() const;
-
- Common::List<TimeBase *> _slaves;
};
// Type passed to initCallBack()
diff --git a/engines/plugins_table.h b/engines/plugins_table.h
index 010de0d5e2..e5ac5efeb4 100644
--- a/engines/plugins_table.h
+++ b/engines/plugins_table.h
@@ -35,6 +35,9 @@ LINK_PLUGIN(GOB)
#if PLUGIN_ENABLED_STATIC(GROOVIE)
LINK_PLUGIN(GROOVIE)
#endif
+#if PLUGIN_ENABLED_STATIC(HOPKINS)
+LINK_PLUGIN(HOPKINS)
+#endif
#if PLUGIN_ENABLED_STATIC(HUGO)
LINK_PLUGIN(HUGO)
#endif
diff --git a/engines/queen/display.cpp b/engines/queen/display.cpp
index cd9a1075fa..d7b20c203e 100644
--- a/engines/queen/display.cpp
+++ b/engines/queen/display.cpp
@@ -29,6 +29,7 @@
#include "graphics/cursorman.h"
#include "graphics/palette.h"
#include "graphics/surface.h"
+#include "graphics/decoders/iff.h"
#include "graphics/decoders/pcx.h"
#include "queen/display.h"
@@ -701,7 +702,7 @@ void Display::setupPanel() {
uint8 *data = _vm->resource()->loadFile(dataName, 0, &dataSize);
if (_vm->resource()->getPlatform() == Common::kPlatformAmiga) {
- decodeLBM(data, dataSize, _panelBuf, PANEL_W, &panelWidth, &panelHeight, _pal.panel, 0, 32, 144);
+ decodeIFF(data, dataSize, _panelBuf, PANEL_W, &panelWidth, &panelHeight, _pal.panel, 0, 32, 144);
} else {
WRITE_LE_UINT16(data + 14, PANEL_H - 10);
decodePCX(data, dataSize, _panelBuf + PANEL_W * 10, PANEL_W, &panelWidth, &panelHeight, _pal.panel, 144, 256);
@@ -720,7 +721,7 @@ void Display::setupNewRoom(const char *name, uint16 room) {
uint8 *data = _vm->resource()->loadFile(dataName, 0, &dataSize);
if (_vm->resource()->getPlatform() == Common::kPlatformAmiga) {
- decodeLBM(data, dataSize, _backdropBuf, BACKDROP_W, &_bdWidth, &_bdHeight, _pal.room, 0, 32);
+ decodeIFF(data, dataSize, _backdropBuf, BACKDROP_W, &_bdWidth, &_bdHeight, _pal.room, 0, 32);
if (_bdHeight < BACKDROP_H) {
memset(_backdropBuf + _bdHeight * BACKDROP_W, 0, (BACKDROP_H - _bdHeight) * BACKDROP_W);
}
@@ -828,73 +829,22 @@ void Display::decodePCX(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dst
memcpy(dst + y * dstPitch, pcxSurface->getBasePtr(0, y), pcxSurface->w);
}
-void Display::decodeLBM(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dstPitch, uint16 *w, uint16 *h, uint8 *pal, uint16 palStart, uint16 palEnd, uint8 colorBase) {
- int planeCount = 0, planePitch = 0;
- const uint8 *srcEnd = src + srcSize;
- src += 12;
- while (src < srcEnd) {
- uint32 type = READ_BE_UINT32(src);
- uint32 size = READ_BE_UINT32(src + 4);
- src += 8;
- switch (type) {
- case MKTAG('B','M','H','D'): {
- *w = READ_BE_UINT16(src + 0);
- *h = READ_BE_UINT16(src + 2);
- planeCount = src[8];
- planePitch = ((*w + 15) >> 4) * 2;
- }
- break;
- case MKTAG('C','M','A','P'): {
- assert(palStart <= palEnd && palEnd <= size / 3);
- memcpy(pal, src + palStart * 3, (palEnd - palStart) * 3);
- }
- break;
- case MKTAG('B','O','D','Y'): {
- uint32 planarSize = (*h) * planeCount * planePitch;
- uint8 *planarBuf = new uint8[planarSize];
- uint8 *dstPlanar = planarBuf;
- for (int y = 0; y < *h; ++y) {
- for (int p = 0; p < planeCount; ++p) {
- const uint8 *end = dstPlanar + planePitch;
- while (dstPlanar < end) {
- int code = (int8)*src++;
- if (code != -128) {
- if (code < 0) {
- code = -code + 1;
- memset(dstPlanar, *src++, code);
- } else {
- ++code;
- memcpy(dstPlanar, src, code);
- src += code;
- }
- dstPlanar += code;
- }
- }
- }
- }
- src = planarBuf;
- for (int y = 0; y < *h; ++y) {
- for (int x = 0; x < *w / 8; ++x) {
- for (int b = 0; b < 8; ++b) {
- const uint8 mask = (1 << (7 - b));
- uint8 color = 0;
- for (int p = 0; p < planeCount; ++p) {
- if (src[planePitch * p + x] & mask) {
- color |= 1 << p;
- }
- }
- dst[x * 8 + b] = colorBase + color;
- }
- }
- src += planeCount * planePitch;
- dst += dstPitch;
- }
- delete[] planarBuf;
- }
- return;
- }
- src += size;
- }
+void Display::decodeIFF(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dstPitch, uint16 *w, uint16 *h, uint8 *pal, uint16 palStart, uint16 palEnd, uint8 colorBase) {
+ Common::MemoryReadStream str(src, srcSize);
+
+ ::Graphics::IFFDecoder iff;
+ if (!iff.loadStream(str))
+ error("Error while reading IFF image");
+
+ const ::Graphics::Surface *iffSurface = iff.getSurface();
+ *w = iffSurface->w;
+ *h = iffSurface->h;
+
+ assert(palStart <= palEnd && palEnd <= 256);
+ memcpy(pal, iff.getPalette() + palStart * 3, (palEnd - palStart) * 3);
+ for (uint16 y = 0; y < iffSurface->h; y++)
+ for(uint16 x = 0; x < iffSurface->w; x++)
+ dst[(y * dstPitch) + x] = *(const byte *)iffSurface->getBasePtr(x, y) + colorBase;
}
void Display::horizontalScrollUpdate(int16 xCamera) {
diff --git a/engines/queen/display.h b/engines/queen/display.h
index 4256b19d72..8a8aaef5a6 100644
--- a/engines/queen/display.h
+++ b/engines/queen/display.h
@@ -116,8 +116,8 @@ public:
//! decode PCX picture data
void decodePCX(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dstPitch, uint16 *w, uint16 *h, uint8 *pal, uint16 palStart, uint16 palEnd);
- //! decode ILBM picture data
- void decodeLBM(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dstPitch, uint16 *w, uint16 *h, uint8 *pal, uint16 palStart, uint16 palEnd, uint8 colorBase = 0);
+ //! decode IFF picture data
+ void decodeIFF(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dstPitch, uint16 *w, uint16 *h, uint8 *pal, uint16 palStart, uint16 palEnd, uint8 colorBase = 0);
void horizontalScrollUpdate(int16 xCamera);
void horizontalScroll(int16 scroll);
diff --git a/engines/queen/sound.cpp b/engines/queen/sound.cpp
index ac58dda728..6731a51e04 100644
--- a/engines/queen/sound.cpp
+++ b/engines/queen/sound.cpp
@@ -246,8 +246,8 @@ void PCSound::playSong(int16 songNum) {
if (!musicOn())
return;
- int override = (_vm->resource()->isDemo()) ? _songDemo[songNum - 1].override : _song[songNum - 1].override;
- switch (override) {
+ int overrideCmd = (_vm->resource()->isDemo()) ? _songDemo[songNum - 1].overrideCmd : _song[songNum - 1].overrideCmd;
+ switch (overrideCmd) {
// Override all songs
case 1:
break;
@@ -771,4 +771,4 @@ bool AmigaSound::playSpecialSfx(int16 sfx) {
return true;
}
-} //End of namespace Queen
+} // End of namespace Queen
diff --git a/engines/queen/sound.h b/engines/queen/sound.h
index 371500f356..6a5dfc2c28 100644
--- a/engines/queen/sound.h
+++ b/engines/queen/sound.h
@@ -39,7 +39,7 @@ struct SongData {
int16 volume;
int16 tempo;
int16 reverb;
- int16 override;
+ int16 overrideCmd;
int16 ignore;
};
diff --git a/engines/saga/resource.cpp b/engines/saga/resource.cpp
index 1b0dfa2f22..8025a949d4 100644
--- a/engines/saga/resource.cpp
+++ b/engines/saga/resource.cpp
@@ -200,15 +200,15 @@ bool Resource::createContexts() {
//// Detect and add voice files /////////////////////////////////////////////
SoundFileInfo voiceFiles[] = {
- { GID_ITE, "voices.rsc", false , (_soundFileName[0] == 0) ? GAME_SOUNDFILE : 0},
- { GID_ITE, "voices.cmp", true , (_soundFileName[0] == 0) ? GAME_SOUNDFILE : 0},
- { GID_ITE, "voicesd.rsc", false , (_soundFileName[0] == 0) ? GAME_SOUNDFILE : 0},
- { GID_ITE, "voicesd.cmp", true , (_soundFileName[0] == 0) ? GAME_SOUNDFILE : 0},
+ { GID_ITE, "voices.rsc", false , (uint16)((_soundFileName[0] == 0) ? GAME_SOUNDFILE : 0)},
+ { GID_ITE, "voices.cmp", true , (uint16)((_soundFileName[0] == 0) ? GAME_SOUNDFILE : 0)},
+ { GID_ITE, "voicesd.rsc", false , (uint16)((_soundFileName[0] == 0) ? GAME_SOUNDFILE : 0)},
+ { GID_ITE, "voicesd.cmp", true , (uint16)((_soundFileName[0] == 0) ? GAME_SOUNDFILE : 0)},
// The resources in the Wyrmkeep combined Windows/Mac/Linux CD version are little endian, but
// the voice file is big endian. If we got such a version with mixed files, mark this voice file
// as big endian
- { GID_ITE, "inherit the earth voices", false , _vm->isBigEndian() ? 0 : GAME_SWAPENDIAN},
- { GID_ITE, "inherit the earth voices.cmp", true , _vm->isBigEndian() ? 0 : GAME_SWAPENDIAN},
+ { GID_ITE, "inherit the earth voices", false , (uint16)(_vm->isBigEndian() ? 0 : GAME_SWAPENDIAN)},
+ { GID_ITE, "inherit the earth voices.cmp", true , (uint16)(_vm->isBigEndian() ? 0 : GAME_SWAPENDIAN)},
{ GID_ITE, "ite voices.bin", false , GAME_MACBINARY},
#ifdef ENABLE_IHNM
{ GID_IHNM, "voicess.res", false , 0},
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index 35d923f821..75876b1c90 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -41,9 +41,10 @@
#include "saga/actor.h"
#include "saga/resource.h"
-#include "graphics/iff.h"
#include "common/util.h"
+#include "graphics/decoders/iff.h"
+
namespace Saga {
static int initSceneDoors[SCENE_DOORS_MAX] = {
@@ -450,11 +451,11 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy
debug(5, "Scene::changeScene(%d, %d, %d, %d)", sceneNumber, actorsEntrance, transitionType, chapter);
// This is used for latter ITE demos where all places on world map except
- // Tent Faire are substituted with LBM picture and short description
+ // Tent Faire are substituted with IFF picture and short description
if (_vm->_hasITESceneSubstitutes) {
for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++) {
if (sceneSubstitutes[i].sceneId == sceneNumber) {
- byte *pal, colors[768];
+ const byte *pal;
Common::File file;
Rect rect;
PalEntry cPal[PAL_ENTRIES];
@@ -462,12 +463,12 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy
_vm->_interface->setMode(kPanelSceneSubstitute);
if (file.open(sceneSubstitutes[i].image)) {
- Graphics::Surface bbmBuffer;
- Graphics::decodePBM(file, bbmBuffer, colors);
- pal = colors;
- rect.setWidth(bbmBuffer.w);
- rect.setHeight(bbmBuffer.h);
- _vm->_gfx->drawRegion(rect, (const byte*)bbmBuffer.pixels);
+ Graphics::IFFDecoder decoder;
+ decoder.loadStream(file);
+ pal = decoder.getPalette();
+ rect.setWidth(decoder.getSurface()->w);
+ rect.setHeight(decoder.getSurface()->h);
+ _vm->_gfx->drawRegion(rect, (const byte *)decoder.getSurface()->pixels);
for (int j = 0; j < PAL_ENTRIES; j++) {
cPal[j].red = *pal++;
cPal[j].green = *pal++;
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 5ae8245e5a..1bf3323a7b 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -3633,6 +3633,8 @@ bool Console::cmdAddresses(int argc, const char **argv) {
DebugPrintf(" - ?obj -- Looks up an object with the specified name, uses its address. This will abort if\n");
DebugPrintf(" the object name is ambiguous; in that case, a list of addresses and indices is provided.\n");
DebugPrintf(" ?obj.idx may be used to disambiguate 'obj' by the index 'idx'.\n");
+ DebugPrintf(" Underscores are used as substitute characters for spaces in object names.\n");
+ DebugPrintf(" For example, an object named \"Glass Jar\" can be accessed as \"Glass_Jar\".\n");
return true;
}
@@ -3764,6 +3766,8 @@ static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeV
charsCountObject++;
if ((*strLoop >= 'I') && (*strLoop <= 'Z'))
charsCountObject++;
+ if (*strLoop == '_') // underscores are used as substitutes for spaces in object names
+ charsCountObject++;
}
strLoop++;
}
@@ -3836,10 +3840,16 @@ static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeV
index = strtol(tmp + 1, &endptr, 16);
if (*endptr)
return -1;
- // Chop of the index
+ // Chop off the index
str_objname = Common::String(str_objname.c_str(), tmp);
}
+ // Replace all underscores in the name with spaces
+ for (uint i = 0; i < str_objname.size(); i++) {
+ if (str_objname[i] == '_')
+ str_objname.setChar(' ', i);
+ }
+
// Now all values are available; iterate over all objects.
*dest = s->_segMan->findObjectByName(str_objname, index);
if (dest->isNull())
diff --git a/engines/sci/decompressor.cpp b/engines/sci/decompressor.cpp
index 82af6eca43..306825008d 100644
--- a/engines/sci/decompressor.cpp
+++ b/engines/sci/decompressor.cpp
@@ -590,6 +590,8 @@ void DecompressorLZW::reorderView(byte *src, byte *dest) {
if (celindex < cel_total) {
warning("View decompression generated too few (%d / %d) headers", celindex, cel_total);
+ free(cc_pos);
+ free(cc_lengths);
return;
}
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 736d0b7ddc..9fd1d41f4a 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -1522,6 +1522,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::ES_ESP, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ // King's Quest 6 - Italian DOS Floppy (supplied by guybrush79 in bug report #3606719)
+ {"kq6", "", {
+ {"resource.map", 0, "48c9fc8e96cbdac078ca7d3df274e29a", 8942},
+ {"resource.000", 0, "d3358ba7306378aed83d02b5c3f11311", 8531908},
+ {"resource.msg", 0, "b7e8220be596fd6a9287eae5a8fd354a", 279886},
+ AD_LISTEND},
+ Common::IT_ITA, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
// King's Quest 6 - English DOS CD (from the King's Quest Collection)
// Executable scanning reports "1.cfs.158", VERSION file reports "1.034 9/11/94 - KQ6 version 1.000.00G"
// SCI interpreter version 1.001.054
@@ -3646,7 +3654,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "ed90a8e3ccc53af6633ff6ab58392bae", 7054},
{"resource.000", 0, "63247e3901ab8963d4eece73747832e0", 5157378},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD, GUIO5(GUIO_MIDIGM, GAMEOPTION_SQ4_SILVER_CURSORS, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_CD, GUIO4(GAMEOPTION_SQ4_SILVER_CURSORS, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 4 - English Windows CD (from the Space Quest Collection)
// Executable scanning reports "1.001.064", VERSION file reports "1.0"
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index f985a69ebc..e3ebce80fb 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -427,18 +427,23 @@ reg_t kUpdatePlane(EngineState *s, int argc, reg_t *argv);
reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv);
reg_t kGetHighPlanePri(EngineState *s, int argc, reg_t *argv);
reg_t kFrameOut(EngineState *s, int argc, reg_t *argv);
+
reg_t kIsOnMe(EngineState *s, int argc, reg_t *argv); // kOnMe for SCI2, kIsOnMe for SCI2.1
+reg_t kInPolygon(EngineState *s, int argc, reg_t *argv);
+reg_t kObjectIntersect(EngineState *s, int argc, reg_t *argv);
+
reg_t kListIndexOf(EngineState *s, int argc, reg_t *argv);
reg_t kListEachElementDo(EngineState *s, int argc, reg_t *argv);
reg_t kListFirstTrue(EngineState *s, int argc, reg_t *argv);
reg_t kListAllTrue(EngineState *s, int argc, reg_t *argv);
-reg_t kInPolygon(EngineState *s, int argc, reg_t *argv);
-reg_t kObjectIntersect(EngineState *s, int argc, reg_t *argv);
+
reg_t kEditText(EngineState *s, int argc, reg_t *argv);
reg_t kMakeSaveCatName(EngineState *s, int argc, reg_t *argv);
reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv);
reg_t kSetScroll(EngineState *s, int argc, reg_t *argv);
reg_t kPalCycle(EngineState *s, int argc, reg_t *argv);
+reg_t kPalVaryUnknown(EngineState *s, int argc, reg_t *argv);
+reg_t kPalVaryUnknown2(EngineState *s, int argc, reg_t *argv);
// SCI2.1 Kernel Functions
reg_t kText(EngineState *s, int argc, reg_t *argv);
@@ -513,7 +518,6 @@ reg_t kPalVaryDeinit(EngineState *s, int argc, reg_t *argv);
reg_t kPalVaryChangeTarget(EngineState *s, int argc, reg_t *argv);
reg_t kPalVaryChangeTicks(EngineState *s, int argc, reg_t *argv);
reg_t kPalVaryPauseResume(EngineState *s, int argc, reg_t *argv);
-reg_t kPalVaryUnknown(EngineState *s, int argc, reg_t *argv);
reg_t kPaletteSetFromResource(EngineState *s, int argc, reg_t *argv);
reg_t kPaletteSetFlag(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index d0c9b9b1cf..d7858180f1 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -156,7 +156,7 @@ static const SciKernelMapSubEntry kDoSound_subops[] = {
// signature for SCI21 should be "o"
{ SIG_SOUNDSCI21, 9, MAP_CALL(DoSoundStop), NULL, NULL },
{ SIG_SOUNDSCI21, 10, MAP_CALL(DoSoundPause), NULL, NULL },
- { SIG_SOUNDSCI21, 11, MAP_CALL(DoSoundFade), NULL, NULL },
+ { SIG_SOUNDSCI21, 11, MAP_CALL(DoSoundFade), NULL, kDoSoundFade_workarounds },
{ SIG_SOUNDSCI21, 12, MAP_CALL(DoSoundSetHold), NULL, NULL },
{ SIG_SOUNDSCI21, 13, MAP_CALL(DoSoundDummy), NULL, NULL },
{ SIG_SOUNDSCI21, 14, MAP_CALL(DoSoundSetVolume), NULL, NULL },
@@ -202,7 +202,10 @@ static const SciKernelMapSubEntry kPalVary_subops[] = {
{ SIG_SCIALL, 4, MAP_CALL(PalVaryChangeTarget), "i", NULL },
{ SIG_SCIALL, 5, MAP_CALL(PalVaryChangeTicks), "i", NULL },
{ SIG_SCIALL, 6, MAP_CALL(PalVaryPauseResume), "i", NULL },
+#ifdef ENABLE_SCI32
{ SIG_SCI32, 8, MAP_CALL(PalVaryUnknown), "i", NULL },
+ { SIG_SCI32, 9, MAP_CALL(PalVaryUnknown2), "i", NULL },
+#endif
SCI_SUBOPENTRY_TERMINATOR
};
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index e977f15c0c..09ea35e792 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -770,7 +770,10 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) {
return NULL_REG;
} else if (virtualId < SAVEGAMEID_OFFICIALRANGE_START) {
// virtualId is low, we assume that scripts expect us to create new slot
- if (virtualId == s->_lastSaveVirtualId) {
+ if (g_sci->getGameId() == GID_JONES) {
+ // Jones has one save slot only
+ savegameId = 0;
+ } else if (virtualId == s->_lastSaveVirtualId) {
// if last virtual id is the same as this one, we assume that caller wants to overwrite last save
savegameId = s->_lastSaveNewId;
} else {
@@ -848,12 +851,17 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) {
} else {
if (argv[2].isNull())
error("kRestoreGame: called with parameter 2 being NULL");
- // Real call from script, we need to adjust ID
- if ((savegameId < SAVEGAMEID_OFFICIALRANGE_START) || (savegameId > SAVEGAMEID_OFFICIALRANGE_END)) {
- warning("Savegame ID %d is not allowed", savegameId);
- return TRUE_REG;
+ if (g_sci->getGameId() == GID_JONES) {
+ // Jones has one save slot only
+ savegameId = 0;
+ } else {
+ // Real call from script, we need to adjust ID
+ if ((savegameId < SAVEGAMEID_OFFICIALRANGE_START) || (savegameId > SAVEGAMEID_OFFICIALRANGE_END)) {
+ warning("Savegame ID %d is not allowed", savegameId);
+ return TRUE_REG;
+ }
+ savegameId -= SAVEGAMEID_OFFICIALRANGE_START;
}
- savegameId -= SAVEGAMEID_OFFICIALRANGE_START;
}
s->r_acc = NULL_REG; // signals success
@@ -922,10 +930,16 @@ reg_t kCheckSaveGame(EngineState *s, int argc, reg_t *argv) {
if (virtualId == 0)
return NULL_REG;
- // Find saved-game
- if ((virtualId < SAVEGAMEID_OFFICIALRANGE_START) || (virtualId > SAVEGAMEID_OFFICIALRANGE_END))
- error("kCheckSaveGame: called with invalid savegameId");
- uint savegameId = virtualId - SAVEGAMEID_OFFICIALRANGE_START;
+ uint savegameId = 0;
+ if (g_sci->getGameId() == GID_JONES) {
+ // Jones has one save slot only
+ } else {
+ // Find saved game
+ if ((virtualId < SAVEGAMEID_OFFICIALRANGE_START) || (virtualId > SAVEGAMEID_OFFICIALRANGE_END))
+ error("kCheckSaveGame: called with invalid savegame ID (%d)", virtualId);
+ savegameId = virtualId - SAVEGAMEID_OFFICIALRANGE_START;
+ }
+
int savegameNr = findSavegame(saves, savegameId);
if (savegameNr == -1)
return NULL_REG;
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index da377319c0..a65bcc215e 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -722,11 +722,6 @@ reg_t kPalVaryPauseResume(EngineState *s, int argc, reg_t *argv) {
return NULL_REG;
}
-reg_t kPalVaryUnknown(EngineState *s, int argc, reg_t *argv) {
- // Unknown (seems to be SCI32 exclusive)
- return NULL_REG;
-}
-
reg_t kAssertPalette(EngineState *s, int argc, reg_t *argv) {
GuiResourceId paletteId = argv[0].toUint16();
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index 8b3afeef99..cd735d1233 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -323,19 +323,29 @@ reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv) {
uint16 op = argv[0].toUint16();
switch (op) {
case 0: // Init
+ // TODO: Init reads the nsLeft, nsTop, nsRight, nsBottom,
+ // borderColor, fore, back, mode, font, plane selectors
+ // from the window in argv[1].
g_sci->_gfxFrameout->initScrollText(argv[2].toUint16()); // maxItems
g_sci->_gfxFrameout->clearScrollTexts();
return argv[1]; // kWindow
case 1: // Show message, called by ScrollableWindow::addString
case 14: // Modify message, called by ScrollableWindow::modifyString
- // 5 or 6 parameters
- // Seems to be called with 5 parameters when the narrator speaks, and
- // with 6 when Roger speaks
+ // TODO: The parameters in Modify are shifted by one: the first
+ // argument is the handle of the text to modify. The others
+ // are as Add.
{
Common::String text = s->_segMan->getString(argv[2]);
- uint16 x = 0;//argv[3].toUint16(); // TODO: can't be x (values are all wrong)
- uint16 y = 0;//argv[4].toUint16(); // TODO: can't be y (values are all wrong)
- // TODO: argv[5] is an optional unknown parameter (an integer set to 0)
+ uint16 x = 0;
+ uint16 y = 0;
+ // TODO: argv[3] is font
+ // TODO: argv[4] is color
+ // TODO: argv[5] is alignment (0 = left, 1 = center, 2 = right)
+ // font,color,alignment may also be -1. (Maybe same as previous?)
+ // TODO: argv[6] is an optional bool, defaulting to true if not present.
+ // If true, the old contents are scrolled out of view.
+ // TODO: Return a handle of the inserted text. (Used for modify/insert)
+ // This handle looks like it should also be usable by kString.
g_sci->_gfxFrameout->addScrollTextEntry(text, kWindow, x, y, (op == 14));
}
break;
@@ -363,22 +373,27 @@ reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv) {
g_sci->_gfxFrameout->lastScrollText();
break;
case 9: // Resize, called by ScrollableWindow::resize and ScrollerWindow::resize
- // TODO
+ // TODO: This reads the nsLeft, nsTop, nsRight, nsBottom
+ // selectors from the SCI object passed in argv[2].
kStub(s, argc, argv);
break;
case 10: // Where, called by ScrollableWindow::where
- // TODO
- // argv[2] is an unknown integer
+ // TODO:
+ // Gives the current relative scroll location as a fraction
+ // with argv[2] as the denominator. (Return value is the numerator.)
// Silenced the warnings because of the high amount of console spam
//kStub(s, argc, argv);
break;
case 11: // Go, called by ScrollableWindow::scrollTo
- // 2 extra parameters here
- // TODO
+ // TODO:
+ // Two arguments provide a fraction: argv[2] is num., argv[3] is denom.
+ // Scrolls to the relative location given by the fraction.
kStub(s, argc, argv);
break;
case 12: // Insert, called by ScrollableWindow::insertString
- // 3 extra parameters here
+ // 5 extra parameters here:
+ // handle of insert location (new string takes that position).
+ // text, font, color, alignment
// TODO
kStub(s, argc, argv);
break;
@@ -668,6 +683,22 @@ reg_t kSetScroll(EngineState *s, int argc, reg_t *argv) {
return kStub(s, argc, argv);
}
+reg_t kPalVaryUnknown(EngineState *s, int argc, reg_t *argv) {
+ // TODO: Unknown (seems to be SCI32 exclusive)
+ return kStub(s, argc, argv);
+}
+
+reg_t kPalVaryUnknown2(EngineState *s, int argc, reg_t *argv) {
+ // TODO: Unknown (seems to be SCI32 exclusive)
+ // It seems to be related to the day/night palette effects in QFG4, and
+ // accepts a palette resource ID. It is triggered right when the night
+ // effect is initially applied (when exiting the caves).
+ // In QFG4, there are two scene palettes: 790 for night, and 791 for day.
+ // Initially, the game starts at night time, but this is called with the
+ // ID of the day time palette (i.e. 791).
+ return kStub(s, argc, argv);
+}
+
reg_t kPalCycle(EngineState *s, int argc, reg_t *argv) {
// Examples: GK1 room 480 (Bayou ritual), LSL6 room 100 (title screen)
diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp
index 4b8fadbb84..b2aaa01b45 100644
--- a/engines/sci/engine/kmath.cpp
+++ b/engines/sci/engine/kmath.cpp
@@ -77,18 +77,7 @@ reg_t kSqrt(EngineState *s, int argc, reg_t *argv) {
return make_reg(0, (int16) sqrt((float) ABS(argv[0].toSint16())));
}
-/**
- * Returns the angle (in degrees) between the two points determined by (x1, y1)
- * and (x2, y2). The angle ranges from 0 to 359 degrees.
- * What this function does is pretty simple but apparently the original is not
- * accurate.
- */
-uint16 kGetAngleWorker(int16 x1, int16 y1, int16 x2, int16 y2) {
- // SCI1 games (QFG2 and newer) use a simple atan implementation. SCI0 games
- // use a somewhat less accurate calculation (below).
- if (getSciVersion() >= SCI_VERSION_1_EGA_ONLY)
- return (int16)(360 - atan2((double)(x1 - x2), (double)(y1 - y2)) * 57.2958) % 360;
-
+uint16 kGetAngle_SCI0(int16 x1, int16 y1, int16 x2, int16 y2) {
int16 xRel = x2 - x1;
int16 yRel = y1 - y2; // y-axis is mirrored.
int16 angle;
@@ -118,6 +107,75 @@ uint16 kGetAngleWorker(int16 x1, int16 y1, int16 x2, int16 y2) {
return angle;
}
+// atan2 for first octant, x >= y >= 0. Returns [0,45] (inclusive)
+int kGetAngle_SCI1_atan2_base(int y, int x) {
+ if (x == 0)
+ return 0;
+
+ // fixed point tan(a)
+ int tan_fp = 10000 * y / x;
+
+ if ( tan_fp >= 1000 ) {
+ // For tan(a) >= 0.1, interpolate between multiples of 5 degrees
+
+ // 10000 * tan([5, 10, 15, 20, 25, 30, 35, 40, 45])
+ const int tan_table[] = { 875, 1763, 2679, 3640, 4663, 5774,
+ 7002, 8391, 10000 };
+
+ // Look up tan(a) in our table
+ int i = 1;
+ while (tan_fp > tan_table[i]) ++i;
+
+ // The angle a is between 5*i and 5*(i+1). We linearly interpolate.
+ int dist = tan_table[i] - tan_table[i-1];
+ int interp = (5 * (tan_fp - tan_table[i-1]) + dist/2) / dist;
+ return 5*i + interp;
+ } else {
+ // for tan(a) < 0.1, tan(a) is approximately linear in a.
+ // tan'(0) = 1, so in degrees the slope of atan is 180/pi = 57.29...
+ return (57 * y + x/2) / x;
+ }
+}
+
+int kGetAngle_SCI1_atan2(int y, int x) {
+ if (y < 0) {
+ int a = kGetAngle_SCI1_atan2(-y, -x);
+ if (a == 180)
+ return 0;
+ else
+ return 180 + a;
+ }
+ if (x < 0)
+ return 90 + kGetAngle_SCI1_atan2(-x, y);
+ if (y > x)
+ return 90 - kGetAngle_SCI1_atan2_base(x, y);
+ else
+ return kGetAngle_SCI1_atan2_base(y, x);
+
+}
+
+uint16 kGetAngle_SCI1(int16 x1, int16 y1, int16 x2, int16 y2) {
+ // We flip things around to get into the standard atan2 coordinate system
+ return kGetAngle_SCI1_atan2(x2 - x1, y1 - y2);
+
+}
+
+/**
+ * Returns the angle (in degrees) between the two points determined by (x1, y1)
+ * and (x2, y2). The angle ranges from 0 to 359 degrees.
+ * What this function does is pretty simple but apparently the original is not
+ * accurate.
+ */
+
+uint16 kGetAngleWorker(int16 x1, int16 y1, int16 x2, int16 y2) {
+ if (getSciVersion() >= SCI_VERSION_1_EGA_ONLY)
+ return kGetAngle_SCI1(x1, y1, x2, y2);
+ else
+ return kGetAngle_SCI0(x1, y1, x2, y2);
+}
+
+
+
reg_t kGetAngle(EngineState *s, int argc, reg_t *argv) {
// Based on behavior observed with a test program created with
// SCI Studio.
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index c4db0b891c..65e139e1ee 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -155,30 +155,47 @@ reg_t kReadNumber(EngineState *s, int argc, reg_t *argv) {
source++; /* Skip whitespace */
int16 result = 0;
+ int16 sign = 1;
+ if (*source == '-') {
+ sign = -1;
+ source++;
+ }
if (*source == '$') {
// Hexadecimal input
- result = (int16)strtol(source + 1, NULL, 16);
+ source++;
+ char c;
+ while ((c = *source++) != 0) {
+ int16 x = 0;
+ if ((c >= '0') && (c <= '9'))
+ x = c - '0';
+ else if ((c >= 'a') && (c <= 'f'))
+ x = c - 'a' + 10;
+ else if ((c >= 'A') && (c <= 'F'))
+ x = c - 'A' + 10;
+ else
+ // Stop if we encounter anything other than a digit (like atoi)
+ break;
+ result *= 16;
+ result += x;
+ }
} else {
// Decimal input. We can not use strtol/atoi in here, because while
// Sierra used atoi, it was a non standard compliant atoi, that didn't
// do clipping. In SQ4 we get the door code in here and that's even
// larger than uint32!
- if (*source == '-') {
- // FIXME: Setting result to -1 does _not_ negate the output.
- result = -1;
- source++;
- }
- while (*source) {
- if ((*source < '0') || (*source > '9'))
+ char c;
+ while ((c = *source++) != 0) {
+ if ((c < '0') || (c > '9'))
// Stop if we encounter anything other than a digit (like atoi)
break;
result *= 10;
- result += *source - 0x30;
- source++;
+ result += c - '0';
}
}
+ result *= sign;
+
return make_reg(0, result);
}
@@ -489,6 +506,7 @@ reg_t kGetMessage(EngineState *s, int argc, reg_t *argv) {
reg_t kMessage(EngineState *s, int argc, reg_t *argv) {
uint func = argv[0].toUint16();
+ uint16 module = (argc >= 2) ? argv[1].toUint16() : 0;
#ifdef ENABLE_SCI32
if (getSciVersion() >= SCI_VERSION_2) {
@@ -518,19 +536,44 @@ reg_t kMessage(EngineState *s, int argc, reg_t *argv) {
if (argc >= 6)
tuple = MessageTuple(argv[2].toUint16(), argv[3].toUint16(), argv[4].toUint16(), argv[5].toUint16());
+ // WORKAROUND for a script bug in Pepper. When using objects together,
+ // there is code inside script 894 that shows appropriate messages.
+ // In the case of the jar of cabbage (noun 26), the relevant message
+ // shown when using any object with it is missing. This leads to the
+ // script code being triggered, which modifies the jar's noun and
+ // message selectors, and renders it useless. Thus, when using any
+ // object with the jar of cabbage, it's effectively corrupted, and
+ // can't be used on the goat to empty it, therefore the game reaches
+ // an unsolvable state. It's almost impossible to patch the offending
+ // script, as it is used in many cases. But we can prevent the
+ // corruption of the jar here: if the message is found, the offending
+ // code is never reached and the jar is never corrupted. To do this,
+ // we substitute all verbs on the cabbage jar with the default verb,
+ // which shows the "Cannot use this object with the jar" message, and
+ // never triggers the offending script code that corrupts the object.
+ // This only affects the jar of cabbage - any other object, including
+ // the empty jar has a different noun, thus it's unaffected.
+ // Fixes bug #3601090.
+ // NOTE: To fix a corrupted jar object, type "send Glass_Jar message 52"
+ // in the debugger.
+ if (g_sci->getGameId() == GID_PEPPER && func == 0 && argc >= 6 && module == 894 &&
+ tuple.noun == 26 && tuple.cond == 0 && tuple.seq == 1 &&
+ !s->_msgState->getMessage(module, tuple, NULL_REG))
+ tuple.verb = 0;
+
switch (func) {
case K_MESSAGE_GET:
- return make_reg(0, s->_msgState->getMessage(argv[1].toUint16(), tuple, (argc == 7 ? argv[6] : NULL_REG)));
+ return make_reg(0, s->_msgState->getMessage(module, tuple, (argc == 7 ? argv[6] : NULL_REG)));
case K_MESSAGE_NEXT:
return make_reg(0, s->_msgState->nextMessage((argc == 2 ? argv[1] : NULL_REG)));
case K_MESSAGE_SIZE:
- return make_reg(0, s->_msgState->messageSize(argv[1].toUint16(), tuple));
+ return make_reg(0, s->_msgState->messageSize(module, tuple));
case K_MESSAGE_REFCOND:
case K_MESSAGE_REFVERB:
case K_MESSAGE_REFNOUN: {
MessageTuple t;
- if (s->_msgState->messageRef(argv[1].toUint16(), tuple, t)) {
+ if (s->_msgState->messageRef(module, tuple, t)) {
switch (func) {
case K_MESSAGE_REFCOND:
return make_reg(0, t.cond);
@@ -545,9 +588,9 @@ reg_t kMessage(EngineState *s, int argc, reg_t *argv) {
}
case K_MESSAGE_LASTMESSAGE: {
MessageTuple msg;
- int module;
+ int lastModule;
- s->_msgState->lastQuery(module, msg);
+ s->_msgState->lastQuery(lastModule, msg);
bool ok = false;
@@ -556,7 +599,7 @@ reg_t kMessage(EngineState *s, int argc, reg_t *argv) {
if (buffer) {
ok = true;
- WRITE_LE_UINT16(buffer, module);
+ WRITE_LE_UINT16(buffer, lastModule);
WRITE_LE_UINT16(buffer + 2, msg.noun);
WRITE_LE_UINT16(buffer + 4, msg.verb);
WRITE_LE_UINT16(buffer + 6, msg.cond);
@@ -567,7 +610,7 @@ reg_t kMessage(EngineState *s, int argc, reg_t *argv) {
if (buffer) {
ok = true;
- buffer[0] = make_reg(0, module);
+ buffer[0] = make_reg(0, lastModule);
buffer[1] = make_reg(0, msg.noun);
buffer[2] = make_reg(0, msg.verb);
buffer[3] = make_reg(0, msg.cond);
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp
index a92d572d35..5b297ac5cf 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -203,6 +203,44 @@ bool MessageState::getRecord(CursorStack &stack, bool recurse, MessageRecord &re
while (1) {
MessageTuple &t = stack.top();
+ // Fix known incorrect message tuples
+ if (g_sci->getGameId() == GID_QFG1VGA && stack.getModule() == 322 &&
+ t.noun == 14 && t.verb == 1 && t.cond == 19 && t.seq == 1) {
+ // Talking to Kaspar the shopkeeper - bug #3604944
+ t.verb = 2;
+ }
+
+ if (g_sci->getGameId() == GID_PQ1 && stack.getModule() == 38 &&
+ t.noun == 10 && t.verb == 4 && t.cond == 8 && t.seq == 1) {
+ // Using the hand icon on Keith in the Blue Room - bug #3605654
+ t.cond = 9;
+ }
+
+ if (g_sci->getGameId() == GID_PQ1 && stack.getModule() == 38 &&
+ t.noun == 10 && t.verb == 1 && t.cond == 0 && t.seq == 1) {
+ // Using the eye icon on Keith in the Blue Room - bug #3605654
+ t.cond = 13;
+ }
+
+ // Fill in known missing message tuples
+ if (g_sci->getGameId() == GID_SQ4 && stack.getModule() == 16 &&
+ t.noun == 7 && t.verb == 0 && t.cond == 3 && t.seq == 1) {
+ // This fixes the error message shown when speech and subtitles are
+ // enabled simultaneously in SQ4 - the (very) long dialog when Roger
+ // is talking with the aliens is missing - bug #3538416.
+ record.tuple = t;
+ record.refTuple = MessageTuple();
+ record.talker = 7; // Roger
+ // The missing text is just too big to fit in one speech bubble, and
+ // if it's added here manually and drawn on screen, it's painted over
+ // the entrance in the back where the Sequel Police enters, so it
+ // looks very ugly. Perhaps this is why this particular text is missing,
+ // as the text shown in this screen is very short (one-liners).
+ // Just output an empty string here instead of showing an error.
+ record.string = "";
+ return true;
+ }
+
if (!reader->findRecord(t, record)) {
// Tuple not found
if (recurse && (stack.size() > 1)) {
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 8639b6ef71..c928cf3569 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -883,12 +883,38 @@ const uint16 qfg1vgaPatchDialogHeader[] = {
PATCH_END
};
+// When clicking on the crusher in room 331, Ego approaches him to talk to him,
+// an action that is handled by moveToCrusher::changeState in script 331. The
+// scripts set Ego to move close to the crusher, but when Ego is running instead
+// of walking, the target coordinates specified by script 331 are never reached,
+// as Ego is making larger steps, and never reaches the required spot. This is an
+// edge case that can occur when Ego is set to run. Normally, when clicking on
+// the crusher, ego is supposed to move close to position 79, 165. We change it
+// to 85, 165, which is not an edge case thus the freeze is avoided.
+// Fixes bug #3585189.
+const byte qfg1vgaSignatureMoveToCrusher[] = {
+ 9,
+ 0x51, 0x1f, // class Motion
+ 0x36, // push
+ 0x39, 0x4f, // pushi 4f (79 - x)
+ 0x38, 0xa5, 0x00, // pushi 00a5 (165 - y)
+ 0x7c, // pushSelf
+ 0
+};
+
+const uint16 qfg1vgaPatchMoveToCrusher[] = {
+ PATCH_ADDTOOFFSET | +3,
+ 0x39, 0x55, // pushi 55 (85 - x)
+ PATCH_END
+};
+
// script, description, magic DWORD, adjust
const SciScriptSignature qfg1vgaSignatures[] = {
{ 215, "fight event issue", 1, PATCH_MAGICDWORD(0x6d, 0x76, 0x51, 0x07), -1, qfg1vgaSignatureFightEvents, qfg1vgaPatchFightEvents },
{ 216, "weapon master event issue", 1, PATCH_MAGICDWORD(0x6d, 0x76, 0x51, 0x07), -1, qfg1vgaSignatureFightEvents, qfg1vgaPatchFightEvents },
{ 814, "window text temp space", 1, PATCH_MAGICDWORD(0x3f, 0xba, 0x87, 0x00), 0, qfg1vgaSignatureTempSpace, qfg1vgaPatchTempSpace },
{ 814, "dialog header offset", 3, PATCH_MAGICDWORD(0x5b, 0x04, 0x80, 0x36), 0, qfg1vgaSignatureDialogHeader, qfg1vgaPatchDialogHeader },
+ { 331, "moving to crusher", 1, PATCH_MAGICDWORD(0x51, 0x1f, 0x36, 0x39), 0, qfg1vgaSignatureMoveToCrusher, qfg1vgaPatchMoveToCrusher },
SCI_SIGNATUREENTRY_TERMINATOR
};
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index b2f22aa985..277437109c 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -79,7 +79,7 @@ reg_t disassemble(EngineState *s, reg32_t pos, bool printBWTag, bool printByteco
Kernel *kernel = g_sci->getKernel();
if (!mobj) {
- warning("Disassembly failed: Segment %04x non-existant or not a script", pos.getSegment());
+ warning("Disassembly failed: Segment %04x non-existent or not a script", pos.getSegment());
return retval;
} else
script_entity = (Script *)mobj;
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index db510c2545..6af6326042 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -51,8 +51,8 @@ const SciWorkaroundEntry arithmeticWorkarounds[] = {
// gameID, room,script,lvl, object-name, method-name, call,index, workaround
const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_CASTLEBRAIN, 280, 280, 0, "programmer", "dispatchEvent", -1, 0, { WORKAROUND_FAKE, 0xf } }, // pressing 'q' on the computer screen in the robot room, and closing the help dialog that pops up (bug #3039656). Moves the cursor to the view with the ID returned (in this case, the robot hand)
- { GID_CNICK_KQ, 200, 0, 1, "Character", "say", -1, -1, { WORKAROUND_FAKE, 0 } }, // checkers, like in hoyle 3 - temps 504 and 505
- { GID_CNICK_KQ, -1, 700, 0, "gcWindow", "open", -1, -1, { WORKAROUND_FAKE, 0 } }, // when entering control menu, like in hoyle 3
+ { GID_CNICK_KQ, -1, 0, 1, "Character", "say", -1, -1, { WORKAROUND_FAKE, 0 } }, // checkers/backgammon, like in hoyle 3 - temps 504 and 505 - bug #3606025
+ { GID_CNICK_KQ, -1, 700, 0, "gcWindow", "open", -1, -1, { WORKAROUND_FAKE, 0 } }, // when entering the control menu, like in hoyle 3
{ GID_CNICK_LONGBOW, 0, 0, 0, "RH Budget", "init", -1, 1, { WORKAROUND_FAKE, 0 } }, // when starting the game
{ GID_ECOQUEST, -1, -1, 0, NULL, "doVerb", -1, 0, { WORKAROUND_FAKE, 0 } }, // almost clicking anywhere triggers this in almost all rooms
{ GID_FANMADE, 516, 979, 0, "", "export 0", -1, 20, { WORKAROUND_FAKE, 0 } }, // Happens in Grotesteing after the logos
@@ -140,7 +140,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_QFG2, 260, 260, 0, "jabbarS", "changeState",0x2d22, -1, { WORKAROUND_FAKE, 0 } }, // During the thief's first mission (in the house), just before Jabbar is about to enter the house (where you have to hide in the wardrobe), bug #3040469, temps 1 and 2
{ GID_QFG2, 500, 500, 0, "lightNextCandleS", "changeState", -1, -1, { WORKAROUND_FAKE, 0 } }, // Inside the last room, while Ad Avis performs the ritual to summon the genie - bug #3148418
{ GID_QFG2, -1, 700, 0, NULL, "showSign", -1, 10, { WORKAROUND_FAKE, 0 } }, // Occurs sometimes when reading a sign in Raseir, Shapeir et al - bugs #3272735, #3275413
- { GID_QFG3, 510, 510, 0, "awardPrize", "changeState", -1, 0, { WORKAROUND_FAKE, 0 } }, // Simbani warrior challenge, after throwing the spears and retrieving the ring - bug #3049435
+ { GID_QFG3, 510, 510, 0, "awardPrize", "changeState", -1, 0, { WORKAROUND_FAKE, 1 } }, // Simbani warrior challenge, after throwing the spears and retrieving the ring - bug #3049435. Must be non-zero, otherwise the prize is awarded twice - bug #3575570.
{ GID_QFG3, 140, 140, 0, "rm140", "init", 0x1008, 0, { WORKAROUND_FAKE, 0 } }, // when importing a character and selecting the previous profession - bug #3040460
{ GID_QFG3, 330, 330, -1, "Teller", "doChild", -1, -1, { WORKAROUND_FAKE, 0 } }, // when talking to King Rajah about "Rajah" (bug #3036390, temp 1) or "Tarna" (temp 0), or when clicking on yourself and saying "Greet" (bug #3039774, temp 1)
{ GID_QFG3, 700, 700, -1, "monsterIsDead", "changeState", -1, 0, { WORKAROUND_FAKE, 0 } }, // in the jungle, after winning any fight, bug #3040624
@@ -151,6 +151,8 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_QFG4, -1, 15, -1, "charInitScreen", "dispatchEvent", -1, 5, { WORKAROUND_FAKE, 0 } }, // floppy version, when viewing the character screen
{ GID_QFG4, -1, 64917, -1, "controlPlane", "setBitmap", -1, 3, { WORKAROUND_FAKE, 0 } }, // floppy version, when entering the game menu
{ GID_QFG4, -1, 64917, -1, "Plane", "setBitmap", -1, 3, { WORKAROUND_FAKE, 0 } }, // floppy version, happens sometimes in fight scenes
+ { GID_QFG4, 520, 64950, 0, "fLake2", "handleEvent", -1, 0, { WORKAROUND_FAKE, 0 } }, // CD version, at the lake, when meeting the Rusalka and attempting to leave
+ { GID_QFG4, 800, 64950, 0, "View", "handleEvent", -1, 0, { WORKAROUND_FAKE, 0 } }, // CD version, in the room with the spider pillar, when climbing on the pillar
{ GID_RAMA, 12, 64950, -1, "InterfaceFeature", "handleEvent", -1, 0, { WORKAROUND_FAKE, 0 } }, // Demo, right when it starts
{ GID_RAMA, 12, 64950, -1, "hiliteOptText", "handleEvent", -1, 0, { WORKAROUND_FAKE, 0 } }, // Demo, right when it starts
{ GID_RAMA, 12, 64950, -1, "View", "handleEvent", -1, 0, { WORKAROUND_FAKE, 0 } }, // Demo, right when it starts
@@ -246,6 +248,7 @@ const SciWorkaroundEntry kDoSoundFade_workarounds[] = {
{ GID_KQ5, 213, 989, 0, "globalSound3", "fade", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // english floppy: when bandits leave the secret temple, parameter 4 is an object - bug #3037594
{ GID_KQ6, 105, 989, 0, "globalSound", "fade", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // floppy: during intro, parameter 4 is an object
{ GID_KQ6, 460, 989, 0, "globalSound2", "fade", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // after pulling the black widow's web on the isle of wonder, parameter 4 is an object - bug #3034567
+ { GID_QFG4, -1, 64989, 0, "longSong", "fade", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // CD version: many places, parameter 4 is an object (longSong)
SCI_WORKAROUNDENTRY_TERMINATOR
};
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index 14443db1e2..7318fe2f68 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -160,9 +160,15 @@ SciEvent EventManager::getScummVMEvent() {
noEvent.mousePos = input.mousePos = mousePos;
- if (!found || ev.type == Common::EVENT_MOUSEMOVE)
- return noEvent;
+ if (!found || ev.type == Common::EVENT_MOUSEMOVE) {
+ int modifiers = em->getModifierState();
+ noEvent.modifiers =
+ ((modifiers & Common::KBD_ALT) ? SCI_KEYMOD_ALT : 0) |
+ ((modifiers & Common::KBD_CTRL) ? SCI_KEYMOD_CTRL : 0) |
+ ((modifiers & Common::KBD_SHIFT) ? SCI_KEYMOD_LSHIFT | SCI_KEYMOD_RSHIFT : 0);
+ return noEvent;
+ }
if (ev.type == Common::EVENT_QUIT) {
input.type = SCI_EVENT_QUIT;
return input;
diff --git a/engines/sci/graphics/animate.h b/engines/sci/graphics/animate.h
index 5e2e39ea1a..52da7d6ec6 100644
--- a/engines/sci/graphics/animate.h
+++ b/engines/sci/graphics/animate.h
@@ -51,7 +51,6 @@ enum ViewScaleSignals {
kScaleSignalDoScaling = 0x0001, // enables scaling when drawing that cel (involves scaleX and scaleY)
kScaleSignalGlobalScaling = 0x0002, // means that global scaling shall get applied on that cel (sets scaleX/scaleY)
kScaleSignalHoyle4SpecialHandling = 0x0004 // HOYLE4-exclusive: special handling inside kAnimate, is used when giving out cards
-
};
struct AnimateEntry {
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 8b7fa2c384..5f65762685 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -349,6 +349,36 @@ void GfxFrameout::deletePlaneLine(reg_t object, reg_t hunkId) {
}
}
+// Adapted from GfxAnimate::applyGlobalScaling()
+void GfxFrameout::applyGlobalScaling(FrameoutEntry *itemEntry, Common::Rect planeRect, int16 celHeight) {
+ // Global scaling uses global var 2 and some other stuff to calculate scaleX/scaleY
+ int16 maxScale = readSelectorValue(_segMan, itemEntry->object, SELECTOR(maxScale));
+ int16 maxCelHeight = (maxScale * celHeight) >> 7;
+ reg_t globalVar2 = g_sci->getEngineState()->variables[VAR_GLOBAL][2]; // current room object
+ int16 vanishingY = readSelectorValue(_segMan, globalVar2, SELECTOR(vanishingY));
+
+ int16 fixedPortY = planeRect.bottom - vanishingY;
+ int16 fixedEntryY = itemEntry->y - vanishingY;
+ if (!fixedEntryY)
+ fixedEntryY = 1;
+
+ if ((celHeight == 0) || (fixedPortY == 0))
+ error("global scaling panic");
+
+ itemEntry->scaleY = (maxCelHeight * fixedEntryY) / fixedPortY;
+ itemEntry->scaleY = (itemEntry->scaleY * maxScale) / celHeight;
+
+ // Make sure that the calculated value is sane
+ if (itemEntry->scaleY < 1 /*|| itemEntry->scaleY > 128*/)
+ itemEntry->scaleY = 128;
+
+ itemEntry->scaleX = itemEntry->scaleY;
+
+ // and set objects scale selectors
+ //writeSelectorValue(_segMan, itemEntry->object, SELECTOR(scaleX), itemEntry->scaleX);
+ //writeSelectorValue(_segMan, itemEntry->object, SELECTOR(scaleY), itemEntry->scaleY);
+}
+
void GfxFrameout::kernelAddScreenItem(reg_t object) {
// Ignore invalid items
if (!_segMan->isObject(object)) {
@@ -390,8 +420,15 @@ void GfxFrameout::kernelUpdateScreenItem(reg_t object) {
itemEntry->priority = itemEntry->y;
itemEntry->signal = readSelectorValue(_segMan, object, SELECTOR(signal));
- itemEntry->scaleX = readSelectorValue(_segMan, object, SELECTOR(scaleX));
- itemEntry->scaleY = readSelectorValue(_segMan, object, SELECTOR(scaleY));
+ itemEntry->scaleSignal = readSelectorValue(_segMan, object, SELECTOR(scaleSignal));
+
+ if (itemEntry->scaleSignal & kScaleSignalDoScaling32) {
+ itemEntry->scaleX = readSelectorValue(_segMan, object, SELECTOR(scaleX));
+ itemEntry->scaleY = readSelectorValue(_segMan, object, SELECTOR(scaleY));
+ } else {
+ itemEntry->scaleX = 128;
+ itemEntry->scaleY = 128;
+ }
itemEntry->visible = true;
// Check if the entry can be hidden
@@ -650,7 +687,13 @@ void GfxFrameout::kernelFrameout() {
_paint32->fillRect(it->planeRect, it->planeBack);
_coordAdjuster->pictureSetDisplayArea(it->planeRect);
- _palette->drewPicture(it->pictureId);
+ // Invoking drewPicture() with an invalid picture ID in SCI32 results in
+ // invalidating the palVary palette when a palVary effect is active. This
+ // is quite obvious in QFG4, where the day time palette is incorrectly
+ // shown when exiting the caves, and the correct night time palette
+ // flashes briefly each time that kPalVaryInit is called.
+ if (it->pictureId != 0xFFFF)
+ _palette->drewPicture(it->pictureId);
FrameoutList itemList;
@@ -699,6 +742,14 @@ void GfxFrameout::kernelFrameout() {
// TODO: maybe we should clip the cels rect with this, i'm not sure
// the only currently known usage is game menu of gk1
} else if (view) {
+ // Process global scaling, if needed.
+ // TODO: Seems like SCI32 always processes global scaling for scaled objects
+ // TODO: We can only process symmetrical scaling for now (i.e. same value for scaleX/scaleY)
+ if ((itemEntry->scaleSignal & kScaleSignalDoScaling32) &&
+ !(itemEntry->scaleSignal & kScaleSignalDisableGlobalScaling32) &&
+ (itemEntry->scaleX == itemEntry->scaleY))
+ applyGlobalScaling(itemEntry, it->planeRect, view->getHeight(itemEntry->loopNo, itemEntry->celNo));
+
if ((itemEntry->scaleX == 128) && (itemEntry->scaleY == 128))
view->getCelRect(itemEntry->loopNo, itemEntry->celNo,
itemEntry->x, itemEntry->y, itemEntry->z, itemEntry->celRect);
@@ -711,14 +762,6 @@ void GfxFrameout::kernelFrameout() {
// Translate back to actual coordinate within scrollable plane
nsRect.translate(it->planeOffsetX, it->planeOffsetY);
- if (view && view->isSci2Hires()) {
- view->adjustBackUpscaledCoordinates(nsRect.top, nsRect.left);
- view->adjustBackUpscaledCoordinates(nsRect.bottom, nsRect.right);
- } else if (getSciVersion() >= SCI_VERSION_2_1) {
- _coordAdjuster->fromDisplayToScript(nsRect.top, nsRect.left);
- _coordAdjuster->fromDisplayToScript(nsRect.bottom, nsRect.right);
- }
-
if (g_sci->getGameId() == GID_PHANTASMAGORIA2) {
// HACK: Some (?) objects in Phantasmagoria 2 have no NS rect. Skip them for now.
// TODO: Remove once we figure out how Phantasmagoria 2 draws objects on screen.
@@ -726,7 +769,15 @@ void GfxFrameout::kernelFrameout() {
continue;
}
- g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
+ if (view && view->isSci2Hires()) {
+ view->adjustBackUpscaledCoordinates(nsRect.top, nsRect.left);
+ view->adjustBackUpscaledCoordinates(nsRect.bottom, nsRect.right);
+ g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
+ } else if (getSciVersion() >= SCI_VERSION_2_1 && _resMan->detectHires()) {
+ _coordAdjuster->fromDisplayToScript(nsRect.top, nsRect.left);
+ _coordAdjuster->fromDisplayToScript(nsRect.bottom, nsRect.right);
+ g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
+ }
}
// Don't attempt to draw sprites that are outside the visible
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h
index 5fd2824224..5ef770486f 100644
--- a/engines/sci/graphics/frameout.h
+++ b/engines/sci/graphics/frameout.h
@@ -97,11 +97,18 @@ struct ScrollTextEntry {
typedef Common::Array<ScrollTextEntry> ScrollTextList;
+enum ViewScaleSignals32 {
+ kScaleSignalDoScaling32 = 0x0001, // enables scaling when drawing that cel (involves scaleX and scaleY)
+ kScaleSignalUnk1 = 0x0002, // unknown
+ kScaleSignalDisableGlobalScaling32 = 0x0004
+};
+
class GfxCache;
class GfxCoordAdjuster32;
class GfxPaint32;
class GfxPalette;
class GfxScreen;
+
/**
* Frameout class, kFrameout and relevant functions for SCI32 games
*/
@@ -113,6 +120,7 @@ public:
void kernelAddPlane(reg_t object);
void kernelUpdatePlane(reg_t object);
void kernelDeletePlane(reg_t object);
+ void applyGlobalScaling(FrameoutEntry *itemEntry, Common::Rect planeRect, int16 celHeight);
void kernelAddScreenItem(reg_t object);
void kernelUpdateScreenItem(reg_t object);
void kernelDeleteScreenItem(reg_t object);
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp
index bfecc296a2..e5b734782c 100644
--- a/engines/sci/graphics/menu.cpp
+++ b/engines/sci/graphics/menu.cpp
@@ -314,7 +314,7 @@ void GfxMenu::kernelSetAttribute(uint16 menuId, uint16 itemId, uint16 attributeI
reg_t GfxMenu::kernelGetAttribute(uint16 menuId, uint16 itemId, uint16 attributeId) {
GuiMenuItemEntry *itemEntry = findItem(menuId, itemId);
if (!itemEntry)
- error("Tried to getAttribute() on non-existant menu-item %d:%d", menuId, itemId);
+ error("Tried to getAttribute() on non-existent menu-item %d:%d", menuId, itemId);
switch (attributeId) {
case SCI_MENU_ATTRIBUTE_ENABLED:
if (itemEntry->enabled)
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index 52d44647e2..9b6eff6edc 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -722,11 +722,6 @@ void GfxPalette::kernelRestore(reg_t memoryHandle) {
}
void GfxPalette::kernelAssertPalette(GuiResourceId resourceId) {
- // Sometimes invalid viewIds are asked for, ignore those (e.g. qfg1vga)
- //if (!_resMan->testResource(ResourceId(kResourceTypeView, resourceId)))
- // return;
- // maybe we took the wrong parameter before, if this causes invalid view again, enable to commented out code again
-
GfxView *view = g_sci->_gfxCache->getView(resourceId);
Palette *viewPalette = view->getPalette();
if (viewPalette) {
diff --git a/engines/sci/graphics/portrait.cpp b/engines/sci/graphics/portrait.cpp
index 8cd8cdb033..d5227126e2 100644
--- a/engines/sci/graphics/portrait.cpp
+++ b/engines/sci/graphics/portrait.cpp
@@ -193,7 +193,7 @@ void Portrait::doit(Common::Point position, uint16 resourceId, uint16 noun, uint
drawBitmap(syncCue);
bitsShow();
} else {
- warning("kPortrait: sync information tried to draw non-existant %d", syncCue);
+ warning("kPortrait: sync information tried to draw non-existent %d", syncCue);
}
}
}
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index 37eb37b292..a3d01753ff 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -234,15 +234,9 @@ void MidiPlayer_Midi::controlChange(int channel, int control, int value) {
}
break;
case 0x0a:
- if (_channels[channel].pan == value)
- return;
-
_channels[channel].pan = value;
break;
case 0x40:
- if (_channels[channel].hold == value)
- return;
-
_channels[channel].hold = value;
break;
case 0x4b: // voice mapping
@@ -250,9 +244,6 @@ void MidiPlayer_Midi::controlChange(int channel, int control, int value) {
case 0x4e: // velocity
break;
case 0x7b:
- if (!_channels[channel].playing)
- return;
-
_channels[channel].playing = false;
default:
break;
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index a8a65d2aa4..913ba32cba 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -485,6 +485,8 @@ void SciMusic::soundPlay(MusicEntry *pSnd) {
// Stop any in progress music fading, as that will reset the
// volume of the sound channels that the faded song occupies..
// Fixes bug #3266480 and partially fixes bug #3041738.
+ // CHECKME: Is this the right thing to do? Are these
+ // overlapping channels not a deeper underlying problem?
for (uint i = 0; i < playListCount; i++) {
// Is another MIDI song being faded down? If yes, stop it
// immediately instead
@@ -495,6 +497,7 @@ void SciMusic::soundPlay(MusicEntry *pSnd) {
_playList[i]->pMidiParser->stop();
freeChannels(_playList[i]);
_playList[i]->fadeStep = 0;
+ _playList[i]->fadeCompleted = true;
}
}
}
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 7782ab4e48..873a16cc73 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -116,7 +116,7 @@ void SoundCommandParser::processInitSound(reg_t obj) {
newSound->resourceId = resourceId;
newSound->soundObj = obj;
newSound->loop = readSelectorValue(_segMan, obj, SELECTOR(loop));
- newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(pri)) & 0xFF;
+ newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(priority)) & 0xFF;
if (_soundVersion >= SCI_VERSION_1_EARLY)
newSound->volume = CLIP<int>(readSelectorValue(_segMan, obj, SELECTOR(vol)), 0, MUSIC_VOLUME_MAX);
newSound->reverb = -1; // initialize to SCI invalid, it'll be set correctly in soundInitSnd() below
@@ -177,6 +177,18 @@ void SoundCommandParser::processPlaySound(reg_t obj) {
writeSelectorValue(_segMan, obj, SELECTOR(state), kSoundPlaying);
}
+ // WORKAROUND: Songs 1840, 1843 and 1849 in the Windows version of KQ5CD
+ // are all missing their channel 15 (all played during its ending
+ // sequences, when fighting with Mordack). This makes the game scripts
+ // wait indefinitely for the missing signals in these songs. In the
+ // original interpreter, this bug manifests as an "Out of heap" error. We
+ // signal the game scripts to stop waiting forever by setting the song's
+ // dataInc selector to something other than 0. This causes Mordack's
+ // appearing animation to occur a bit earlier than expected, but at least
+ // the game doesn't freeze at that point. Fixes bug #3605269.
+ if (g_sci->getGameId() == GID_KQ5 && (resourceId == 1840 || resourceId == 1843 || resourceId == 1849))
+ musicSlot->dataInc = 1;
+
musicSlot->loop = readSelectorValue(_segMan, obj, SELECTOR(loop));
musicSlot->priority = readSelectorValue(_segMan, obj, SELECTOR(priority));
// Reset hold when starting a new song. kDoSoundSetHold is always called after
@@ -189,6 +201,10 @@ void SoundCommandParser::processPlaySound(reg_t obj) {
resourceId, musicSlot->loop, musicSlot->priority, musicSlot->volume);
_music->soundPlay(musicSlot);
+
+ // Reset any left-over signals
+ musicSlot->signal = 0;
+ musicSlot->fadeStep = 0;
}
reg_t SoundCommandParser::kDoSoundRestore(int argc, reg_t *argv, reg_t acc) {
@@ -255,7 +271,7 @@ void SoundCommandParser::processStopSound(reg_t obj, bool sampleFinishedPlaying)
writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
musicSlot->dataInc = 0;
- musicSlot->signal = 0;
+ musicSlot->signal = SIGNAL_OFFSET;
_music->soundStop(musicSlot);
}
@@ -373,44 +389,27 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) {
case 4: // SCI01+
case 5: // SCI1+ (SCI1 late sound scheme), with fade and continue
- if (argc == 5) {
- // TODO: We currently treat this argument as a boolean, but may
- // have to handle different non-zero values differently. (e.g.,
- // some KQ6 scripts pass 3 here).
- // There is a script bug in KQ6, room 460 (the room with the flying
- // books). An object is passed here, which should not be treated as
- // a true flag. Fixes bugs #3555404 and #3291115.
- musicSlot->stopAfterFading = (argv[4].isNumber() && argv[4].toUint16() != 0);
- } else {
- musicSlot->stopAfterFading = false;
- }
-
musicSlot->fadeTo = CLIP<uint16>(argv[1].toUint16(), 0, MUSIC_VOLUME_MAX);
// Check if the song is already at the requested volume. If it is, don't
// perform any fading. Happens for example during the intro of Longbow.
- if (musicSlot->fadeTo != musicSlot->volume) {
- // sometimes we get objects in that position, fix it up (ffs. workarounds)
- if (!argv[1].getSegment())
- musicSlot->fadeStep = volume > musicSlot->fadeTo ? -argv[3].toUint16() : argv[3].toUint16();
- else
- musicSlot->fadeStep = volume > musicSlot->fadeTo ? -5 : 5;
- musicSlot->fadeTickerStep = argv[2].toUint16() * 16667 / _music->soundGetTempo();
- } else {
- // Stop the music, if requested. Fixes bug #3555404.
- if (musicSlot->stopAfterFading)
- processStopSound(obj, false);
- }
+ if (musicSlot->fadeTo == musicSlot->volume)
+ return acc;
+ // sometimes we get objects in that position, fix it up (ffs. workarounds)
+ if (!argv[1].getSegment())
+ musicSlot->fadeStep = volume > musicSlot->fadeTo ? -argv[3].toUint16() : argv[3].toUint16();
+ else
+ musicSlot->fadeStep = volume > musicSlot->fadeTo ? -5 : 5;
+ musicSlot->fadeTickerStep = argv[2].toUint16() * 16667 / _music->soundGetTempo();
musicSlot->fadeTicker = 0;
- // WORKAROUND/HACK: In the labyrinth in KQ6, when falling in the pit and
- // lighting the lantern, the game scripts perform a fade in of the game
- // music, but set it to stop after fading. Remove that flag here. This is
- // marked as both a workaround and a hack because this issue could be a
- // problem with our fading code and an incorrect handling of that
- // parameter, or a script bug in that scene. Fixes bug #3267956.
- if (g_sci->getGameId() == GID_KQ6 && g_sci->getEngineState()->currentRoomNumber() == 406 &&
- musicSlot->resourceId == 400)
+ // argv[4] is a boolean. Scripts sometimes pass strange values,
+ // but SSCI only checks for zero/non-zero. (Verified in KQ6.)
+ // KQ6 room 460 even passes an object, but treating this as 'true'
+ // seems fine in that case.
+ if (argc == 5)
+ musicSlot->stopAfterFading = !argv[4].isNull();
+ else
musicSlot->stopAfterFading = false;
break;
@@ -441,7 +440,7 @@ reg_t SoundCommandParser::kDoSoundUpdate(int argc, reg_t *argv, reg_t acc) {
int16 objVol = CLIP<int>(readSelectorValue(_segMan, obj, SELECTOR(vol)), 0, 255);
if (objVol != musicSlot->volume)
_music->soundSetVolume(musicSlot, objVol);
- uint32 objPrio = readSelectorValue(_segMan, obj, SELECTOR(pri));
+ uint32 objPrio = readSelectorValue(_segMan, obj, SELECTOR(priority));
if (objPrio != musicSlot->priority)
_music->soundSetPriority(musicSlot, objPrio);
return acc;
@@ -501,12 +500,15 @@ void SoundCommandParser::processUpdateCues(reg_t obj) {
processStopSound(obj, false);
}
} else {
- // Slot actually has no data (which would mean that a sound-resource w/
- // unsupported data is used.
- // (example lsl5 - sound resource 744 - it's Roland exclusive
- writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
- // If we don't set signal here, at least the switch to the mud wrestling
- // room in lsl5 will not work.
+ // The sound slot has no data for the currently selected sound card.
+ // An example can be found during the mud wrestling scene in LSL5, room
+ // 730: sound 744 (a splat sound heard when Lana Luscious jumps in the
+ // mud) only contains MIDI channel data. If a non-MIDI sound card is
+ // selected (like Adlib), then the scene freezes. We also need to stop
+ // the sound at this point, otherwise KQ6 Mac breaks because the rest
+ // of the object needs to be reset to avoid a continuous stream of
+ // sound cues.
+ processStopSound(obj, true); // this also sets the signal selector
}
if (musicSlot->fadeCompleted) {
@@ -515,6 +517,8 @@ void SoundCommandParser::processUpdateCues(reg_t obj) {
// fireworks).
// It is also needed in other games, e.g. LSL6 when talking to the
// receptionist (bug #3192166).
+ // CHECKME: At least kq5cd/win and kq6 set signal to 0xFE here, but
+ // kq5cd/dos does not set signal at all. Needs more investigation.
writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
if (_soundVersion <= SCI_VERSION_0_LATE) {
processStopSound(obj, false);
diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index 3120017db6..9f6206439d 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -705,6 +705,7 @@ static const GameFilenamePattern gameFilenamesTable[] = {
{ "freddi4", "FF4 demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },
{ "freddi4", "Freddi 4", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },
{ "freddi4", "Freddi 4 Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },
+ { "freddi4", "FreddiCMP", kGenHEPC, Common::IT_ITA, Common::kPlatformWindows, 0 },
{ "freddi4", "FreddiGS", kGenHEPC, Common::DE_DEU, UNK, 0 },
{ "freddi4", "FreddiGS", kGenHEMac, Common::DE_DEU, Common::kPlatformMacintosh, 0 },
{ "freddi4", "FreddiHRBG", kGenHEPC, Common::EN_GRB, UNK, 0 },
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index ffff329036..50ff0b3988 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -3609,7 +3609,7 @@ void Gdi::unkDecode9(byte *dst, int dstPitch, const byte *src, int height) const
int i;
uint buffer = 0, mask = 128;
int h = height;
- i = run = 0;
+ run = 0;
int x = 8;
for (;;) {
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index f94b74ac45..1afb1b4074 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -804,7 +804,7 @@ void ScummEngine_v80he::createSound(int snd1id, int snd2id) {
byte *snd1Ptr, *snd2Ptr;
byte *sbng1Ptr, *sbng2Ptr;
byte *sdat1Ptr, *sdat2Ptr;
- byte *src, *dst, *tmp;
+ byte *src, *dst;
int len, offs, size;
int sdat1size, sdat2size;
@@ -844,6 +844,7 @@ void ScummEngine_v80he::createSound(int snd1id, int snd2id) {
if (sbng1Ptr != NULL && sbng2Ptr != NULL) {
if (chan != -1 && ((SoundHE *)_sound)->_heChannel[chan].codeOffs > 0) {
+ // Copy any code left over to the beginning of the code block
int curOffs = ((SoundHE *)_sound)->_heChannel[chan].codeOffs;
src = snd1Ptr + curOffs;
@@ -851,29 +852,33 @@ void ScummEngine_v80he::createSound(int snd1id, int snd2id) {
size = READ_BE_UINT32(sbng1Ptr + 4);
len = sbng1Ptr - snd1Ptr + size - curOffs;
- byte *data = (byte *)malloc(len);
- memcpy(data, src, len);
- memcpy(dst, data, len);
- free(data);
+ memmove(dst, src, len);
+ // Now seek to the end of this code block
dst = sbng1Ptr + 8;
while ((size = READ_LE_UINT16(dst)) != 0)
dst += size;
} else {
+ // We're going to overwrite the code block completely
dst = sbng1Ptr + 8;
}
- ((SoundHE *)_sound)->_heChannel[chan].codeOffs = sbng1Ptr - snd1Ptr + 8;
+ // Reset the current code offset to the beginning of the code block
+ if (chan >= 0)
+ ((SoundHE *)_sound)->_heChannel[chan].codeOffs = sbng1Ptr - snd1Ptr + 8;
- tmp = sbng2Ptr + 8;
+ // Seek to the end of the code block for sound 2
+ byte *tmp = sbng2Ptr + 8;
while ((offs = READ_LE_UINT16(tmp)) != 0) {
tmp += offs;
}
+ // Copy the code block for sound 2 to the code block for sound 1
src = sbng2Ptr + 8;
len = tmp - sbng2Ptr - 6;
memcpy(dst, src, len);
+ // Rewrite the time for this new code block to be after the sound 1 code block
int32 time;
while ((size = READ_LE_UINT16(dst)) != 0) {
time = READ_LE_UINT32(dst + 2);
@@ -883,6 +888,7 @@ void ScummEngine_v80he::createSound(int snd1id, int snd2id) {
}
}
+ // Find the data pointers and sizes
if (findSoundTag(MKTAG('d','a','t','a'), snd1Ptr)) {
sdat1Ptr = findSoundTag(MKTAG('d','a','t','a'), snd1Ptr);
assert(sdat1Ptr);
@@ -906,6 +912,8 @@ void ScummEngine_v80he::createSound(int snd1id, int snd2id) {
sdat1size = _sndDataSize - _sndPtrOffs;
if (sdat2size < sdat1size) {
+ // We have space leftover at the end of sound 1
+ // -> Just append sound 2
src = sdat2Ptr + 8;
dst = sdat1Ptr + 8 + _sndPtrOffs;
len = sdat2size;
@@ -915,6 +923,8 @@ void ScummEngine_v80he::createSound(int snd1id, int snd2id) {
_sndPtrOffs += sdat2size;
_sndTmrOffs += sdat2size;
} else {
+ // We might not have enough space leftover at the end of sound 1
+ // -> Append as much of possible of sound 2 to sound 1
src = sdat2Ptr + 8;
dst = sdat1Ptr + 8 + _sndPtrOffs;
len = sdat1size;
@@ -922,6 +932,8 @@ void ScummEngine_v80he::createSound(int snd1id, int snd2id) {
memcpy(dst, src, len);
if (sdat2size != sdat1size) {
+ // We don't have enough space
+ // -> Start overwriting the beginning of the sound again
src = sdat2Ptr + 8 + sdat1size;
dst = sdat1Ptr + 8;
len = sdat2size - sdat1size;
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index b69ce552bc..a875702383 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -1741,10 +1741,10 @@ void IMuseInternal::copyGlobalInstrument(byte slot, Instrument *dest) {
// In case we have an valid instrument set up, copy it to the part.
_global_instruments[slot].copy_to(dest);
} else if (_pcSpeaker) {
- debug(0, "Trying to use non-existant global PC Speaker instrument %d", slot);
+ debug(0, "Trying to use non-existent global PC Speaker instrument %d", slot);
dest->pcspk(defaultInstr);
} else {
- debug(0, "Trying to use non-existant global AdLib instrument %d", slot);
+ debug(0, "Trying to use non-existent global AdLib instrument %d", slot);
dest->adlib(defaultInstr);
}
}
diff --git a/engines/scumm/insane/insane_ben.cpp b/engines/scumm/insane/insane_ben.cpp
index 48aaab505a..9d11f14e4e 100644
--- a/engines/scumm/insane/insane_ben.cpp
+++ b/engines/scumm/insane/insane_ben.cpp
@@ -634,7 +634,7 @@ void Insane::actor02Reaction(int32 buttons) {
_actor[0].newFacingFlag = 1;
_actor[0].kicking = false;
if ((_actor[0].act[2].frame == 3) && (calcEnemyDamage(0, 0) == 1)) {
- _actor[1].damage = weaponDamage(0);
+ _actor[1].damage += weaponDamage(0);
smlayer_startSfx(64);
_actor[1].cursorX = 320;
}
@@ -805,7 +805,7 @@ void Insane::actor02Reaction(int32 buttons) {
if ((_actor[1].x - _actor[0].x <= weaponMaxRange(0)) &&
(_actor[1].x - _actor[0].x >= weaponMinRange(0))) {
smlayer_startSfx(76);
- _actor[1].damage = weaponDamage(0);
+ _actor[1].damage += weaponDamage(0);
}
break;
default:
@@ -813,7 +813,7 @@ void Insane::actor02Reaction(int32 buttons) {
smlayer_startSfx(76);
break;
}
- smlayer_setActorFacing(0, 2, 21,180);
+ smlayer_setActorFacing(0, 2, 21, 180);
_actor[0].act[2].state = 17;
}
_actor[0].act[2].tilt = calcTilt(_actor[0].tilt);
@@ -855,7 +855,7 @@ void Insane::actor02Reaction(int32 buttons) {
break;
case INV_CHAINSAW:
if (_actor[1].kicking || _actor[1].field_44)
- _actor[0].act[2].state = 20;
+ _actor[0].act[2].state = 106;
else {
smlayer_setActorFacing(0, 2, 20, 180);
_actor[0].act[2].state = 20;
@@ -1170,11 +1170,12 @@ void Insane::actor02Reaction(int32 buttons) {
if (!smlayer_actorNeedRedraw(0, 2)) {
switchBenWeapon();
- _actor[0].act[2].tilt = 0;
+ _actor[0].act[2].state = 1;
}
_actor[0].act[2].tilt = calcTilt(_actor[0].tilt);
break;
case 36:
+ _actor[0].lost = true;
smlayer_setActorLayer(0, 2, 5);
_actor[0].kicking = false;
if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
diff --git a/engines/scumm/insane/insane_enemy.cpp b/engines/scumm/insane/insane_enemy.cpp
index 913f761f31..8107956646 100644
--- a/engines/scumm/insane/insane_enemy.cpp
+++ b/engines/scumm/insane/insane_enemy.cpp
@@ -266,6 +266,8 @@ int32 Insane::enemy1handler(int32 actor1, int32 actor2, int32 probability) {
_enHdlVar[EN_ROTT2][0] = 0;
else
_enHdlVar[EN_ROTT2][0] = 1;
+ } else {
+ _enHdlVar[EN_ROTT2][0] = 1;
}
_enHdlVar[EN_ROTT2][1] = 0;
_enHdlVar[EN_ROTT2][2] = _vm->_rnd.getRandomNumber(probability * 2 - 1);
@@ -310,7 +312,7 @@ int32 Insane::enemy1handler(int32 actor1, int32 actor2, int32 probability) {
retval = 1;
}
if (_actor[actor2].kicking) {
- if (weaponMaxRange(actor2) <= dist)
+ if (weaponMaxRange(actor2) >= dist)
if (_vm->_rnd.getRandomNumber(probability * 2 - 1) <= 1)
retval = 1;
}
@@ -369,6 +371,8 @@ int32 Insane::enemy1handler(int32 actor1, int32 actor2, int32 probability) {
_actor[actor1].cursorX = 320;
else if (act1x > 280)
_actor[actor1].cursorX = -160;
+ else if (_actor[actor1].defunct)
+ _actor[actor1].cursorX = 0;
// Shift+V cheat to win the battle
if (_vm->getKeyState('V') && !_beenCheated &&
@@ -410,7 +414,9 @@ int32 Insane::enemy2handler(int32 actor1, int32 actor2, int32 probability) {
_enHdlVar[EN_ROTT3][0] = 0;
else
_enHdlVar[EN_ROTT3][0] = 1;
- }
+ } else
+ _enHdlVar[EN_ROTT3][0] = 1;
+
_enHdlVar[EN_ROTT3][1] = 0;
_enHdlVar[EN_ROTT3][2] = _vm->_rnd.getRandomNumber(probability * 2 - 1);
}
@@ -453,7 +459,7 @@ int32 Insane::enemy2handler(int32 actor1, int32 actor2, int32 probability) {
retval = 1;
}
if (_actor[actor2].kicking) {
- if (weaponMaxRange(actor2) >= dist)
+ if (weaponMaxRange(actor2) <= dist)
if (_vm->_rnd.getRandomNumber(probability * 2 - 1) <= 1)
retval = 1;
}
@@ -553,9 +559,12 @@ int32 Insane::enemy3handler(int32 actor1, int32 actor2, int32 probability) {
if (!_actor[actor1].defunct) {
if (_enHdlVar[EN_VULTF1][1] > _enHdlVar[EN_VULTF1][2]) {
- if ((act1damage - act2damage >= 30) && (_vm->_rnd.getRandomNumber(probability - 1) != 1))
- _enHdlVar[EN_VULTF1][0] = 0;
- else
+ if (act1damage - act2damage >= 30) {
+ if (_vm->_rnd.getRandomNumber(probability - 1) != 1)
+ _enHdlVar[EN_VULTF1][0] = 0;
+ else
+ _enHdlVar[EN_VULTF1][0] = 1;
+ } else
_enHdlVar[EN_VULTF1][0] = 1;
_enHdlVar[EN_VULTF1][1] = 0;
@@ -714,7 +723,9 @@ int32 Insane::enemy4handler(int32 actor1, int32 actor2, int32 probability) {
_enHdlVar[EN_VULTM1][0] = 0;
else
_enHdlVar[EN_VULTM1][0] = 1;
- }
+ } else
+ _enHdlVar[EN_VULTM1][0] = 1;
+
_enHdlVar[EN_VULTM1][1] = 0;
_enHdlVar[EN_VULTM1][2] = _vm->_rnd.getRandomNumber(probability * 2 - 1);
}
@@ -757,7 +768,7 @@ int32 Insane::enemy4handler(int32 actor1, int32 actor2, int32 probability) {
retval = 1;
}
if (_actor[actor2].kicking) {
- if (weaponMaxRange(actor2) >= dist) // that's weird but original is >=
+ if (weaponMaxRange(actor2) >= dist)
if (_vm->_rnd.getRandomNumber(probability * 2 - 1) <= 1)
retval = 1;
}
@@ -792,12 +803,12 @@ int32 Insane::enemy4handler(int32 actor1, int32 actor2, int32 probability) {
case 3:
prepareScenePropScene(44, 0, 0);
break;
- case 9:
+ case 9: // Original is 10 here which never happens
prepareScenePropScene(45, 0, 0);
break;
}
} else {
- if (weaponMaxRange(actor2) <= dist) {
+ if (weaponMaxRange(actor2) >= dist) {
switch (_vm->_rnd.getRandomNumber(9)) {
case 3:
if (!_enemyState[EN_VULTM1][3]) {
@@ -805,7 +816,7 @@ int32 Insane::enemy4handler(int32 actor1, int32 actor2, int32 probability) {
prepareScenePropScene(42, 0, 0);
}
break;
- case 9:
+ case 9: // Original is 10 here which never happens
if (!_enemyState[EN_VULTM1][4]) {
_enemyState[EN_VULTM1][4] = 1;
prepareScenePropScene(43, 0, 0);
@@ -901,12 +912,8 @@ int32 Insane::enemy5handler(int32 actor1, int32 actor2, int32 probability) {
retval = 1;
} else {
if (weaponMaxRange(actor2) >= dist && _actor[actor2].weapon == INV_CHAINSAW) {
- if (!_actor[actor2].kicking) {
- if (_vm->_rnd.getRandomNumber(probability - 1) == 1)
- retval = 1;
- } else {
+ if (_actor[actor2].kicking || (_vm->_rnd.getRandomNumber(probability - 1) == 1))
retval = 1;
- }
}
_actor[actor1].cursorX = 0;
if (_enHdlVar[EN_VULTF2][0] >= 100)
@@ -944,7 +951,7 @@ int32 Insane::enemy5handler(int32 actor1, int32 actor2, int32 probability) {
prepareScenePropScene(11, 0, 0);
_enemyState[EN_VULTF2][2] = 1;
break;
- case 9:
+ case 9: // Original is 10
_enemyState[EN_VULTF2][1] = 1;
prepareScenePropScene(10, 0, 0);
break;
@@ -969,9 +976,6 @@ int32 Insane::enemy5handler(int32 actor1, int32 actor2, int32 probability) {
}
}
- if (_actor[actor1].defunct)
- _actor[actor1].cursorX = 0;
-
if (_actor[actor1].weapon == -1)
retval = 2;
@@ -981,6 +985,8 @@ int32 Insane::enemy5handler(int32 actor1, int32 actor2, int32 probability) {
_actor[actor1].cursorX = 320;
else if (act1x > 280)
_actor[actor1].cursorX = -160;
+ else if (_actor[actor1].defunct)
+ _actor[actor1].cursorX = 0;
_enHdlVar[EN_VULTF2][2] = _enHdlVar[EN_VULTF2][1];
_enHdlVar[EN_VULTF2][0]++;
@@ -1106,10 +1112,14 @@ int32 Insane::enemy6handler(int32 actor1, int32 actor2, int32 probability) {
_actor[actor1].cursorX = 320;
else if (act1x > 280)
_actor[actor1].cursorX = -160;
+ else
+ _actor[actor1].cursorX = 0;
if (_actor[actor1].weapon == -1)
retval = 2;
+ _enHdlVar[EN_VULTM2][0]++;
+
// Shift+V cheat to win the battle
if (_vm->getKeyState('V') && !_beenCheated &&
!_actor[0].lost && !_actor[1].lost) {
@@ -1892,6 +1902,7 @@ void Insane::actor12Reaction(int32 buttons) {
break;
}
}
+ _actor[1].kicking = true;
_actor[1].act[2].tilt = calcTilt(_actor[1].tilt);
break;
case 20:
@@ -1932,6 +1943,7 @@ void Insane::actor12Reaction(int32 buttons) {
_actor[1].kicking = false;
if (_actor[1].act[2].frame >= 5) {
smlayer_setActorFacing(1, 2, 25, 180);
+ smlayer_setActorLayer(1, 2, 5);
_actor[1].act[2].state = 65;
}
_actor[1].act[2].tilt = calcTilt(_actor[1].tilt);
@@ -2012,7 +2024,6 @@ void Insane::actor12Reaction(int32 buttons) {
} else {
smlayer_setActorFacing(1, 2, 20, 180);
_actor[1].act[2].state = 28;
- break;
}
}
_actor[1].act[2].tilt = calcTilt(_actor[1].tilt);
@@ -2063,10 +2074,8 @@ void Insane::actor12Reaction(int32 buttons) {
smlayer_setActorLayer(1, 2, 5);
_actor[1].kicking = false;
- if (!smlayer_actorNeedRedraw(1, 2)) {
+ if (!smlayer_actorNeedRedraw(1, 2))
switchEnemyWeapon();
- _actor[1].act[2].tilt = 0;
- }
_actor[1].act[2].tilt = calcTilt(_actor[1].tilt);
break;
case 36:
@@ -2156,16 +2165,8 @@ void Insane::actor12Reaction(int32 buttons) {
_actor[1].kicking = false;
_actor[1].act[2].tilt = calcTilt(_actor[1].tilt);
break;
+ case 62:
case 65:
- smlayer_setActorLayer(1, 2, 5);
- if (_actor[1].act[2].animTilt) {
- smlayer_setActorFacing(1, 2, 25, 180);
- _actor[1].act[2].animTilt = 0;
- }
- _actor[1].weaponClass = 1;
- _actor[1].kicking = false;
- _actor[1].act[2].tilt = calcTilt(_actor[1].tilt);
- break;
case 66:
smlayer_setActorLayer(1, 2, 5);
if (_actor[1].act[2].animTilt) {
@@ -2322,6 +2323,7 @@ void Insane::actor12Reaction(int32 buttons) {
smlayer_startSfx(100);
_actor[1].act[2].state = 90;
_actor[1].act[2].tilt = calcTilt(_actor[1].tilt);
+ smlayer_setActorLayer(1, 2, 26);
break;
case 90:
smlayer_setActorLayer(1, 2, 26);
@@ -2343,6 +2345,7 @@ void Insane::actor12Reaction(int32 buttons) {
_actor[1].kicking = false;
break;
case 92:
+ case 96:
smlayer_setActorLayer(1, 2, 5);
_actor[1].kicking = false;
break;
@@ -2353,6 +2356,7 @@ void Insane::actor12Reaction(int32 buttons) {
smlayer_setActorFacing(1, 2, 18, 180);
_actor[1].act[2].state = 94;
_actor[1].act[2].tilt = calcTilt(_actor[1].tilt);
+ smlayer_startSfx(102);
break;
case 94:
smlayer_setActorLayer(1, 2, 4);
@@ -2529,7 +2533,6 @@ void Insane::actor12Reaction(int32 buttons) {
_actor[1].act[0].room = 0;
_actor[1].cursorX = 0;
_actor[1].act[2].state = 116;
- smlayer_startVoice(232);
break;
case 116:
smlayer_setActorLayer(1, 2, 25);
diff --git a/engines/scumm/player_v3m.cpp b/engines/scumm/player_v3m.cpp
index e61463128a..0f222d84fe 100644
--- a/engines/scumm/player_v3m.cpp
+++ b/engines/scumm/player_v3m.cpp
@@ -147,7 +147,19 @@ bool Player_V3M::loadMusic(const byte *ptr) {
return false;
}
- assert(ptr[4] == 's' && ptr[5] == 'o');
+ if (ptr[4] != 's' || ptr[5] != 'o') {
+ // Like the original we ignore all sound resources which do not have
+ // a 'so' tag in them.
+ // See bug #3602239 ("Mac Loom crashes using opening spell on
+ // gravestone") for a case where this is required. Loom Mac tries to
+ // play resource 11 here. This resource is no Mac sound resource
+ // though, it is a PC Speaker resource. A test with the original
+ // interpreter also has shown that no sound is played while the
+ // screen is shaking.
+ debug(5, "Player_V3M::loadMusic: Skipping unknown music type %02X%02X", ptr[4], ptr[5]);
+ resource.close();
+ return false;
+ }
uint i;
for (i = 0; i < 5; i++) {
diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h
index 4bfa7d0e71..7b2ff91ad3 100644
--- a/engines/scumm/saveload.h
+++ b/engines/scumm/saveload.h
@@ -74,7 +74,7 @@ namespace Scumm {
* what POD means refer to <http://en.wikipedia.org/wiki/Plain_Old_Data_Structures> or
* to <http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=32&rl=1>)
*/
-#define OFFS(type,item) (((ptrdiff_t)(&((type *)42)->type::item))-42)
+#define OFFS(type,item) ((uint32)(((ptrdiff_t)(&((type *)42)->type::item))-42))
/**
* Similar to the OFFS macro, this macro computes the size (in bytes) of a
@@ -84,19 +84,19 @@ namespace Scumm {
// Any item that is still in use automatically gets a maxVersion equal to CURRENT_VER
#define MKLINE(type,item,saveas,minVer) {OFFS(type,item),saveas,SIZE(type,item),minVer,CURRENT_VER}
-#define MKARRAY(type,item,saveas,dim,minVer) {OFFS(type,item),128|saveas,SIZE(type,item),minVer,CURRENT_VER}, {dim,1,0,0,0}
-#define MKARRAY2(type,item,saveas,dim,dim2,rowlen,minVer) {OFFS(type,item),128|saveas,SIZE(type,item),minVer,CURRENT_VER}, {dim,dim2,rowlen,0,0}
+#define MKARRAY(type,item,saveas,dim,minVer) {OFFS(type,item),128|saveas,SIZE(type,item),minVer,CURRENT_VER}, {(uint32)(dim),1,0,0,0}
+#define MKARRAY2(type,item,saveas,dim,dim2,rowlen,minVer) {OFFS(type,item),128|saveas,SIZE(type,item),minVer,CURRENT_VER}, {(uint32)(dim),(uint32)(dim2),(uint16)(rowlen),0,0}
// Use this if you have an entry that used to be smaller:
#define MKLINE_OLD(type,item,saveas,minVer,maxVer) {OFFS(type,item),saveas,SIZE(type,item),minVer,maxVer}
-#define MKARRAY_OLD(type,item,saveas,dim,minVer,maxVer) {OFFS(type,item),128|saveas,SIZE(type,item),minVer,maxVer}, {dim,1,0,0,0}
-#define MKARRAY2_OLD(type,item,saveas,dim,dim2,rowlen,minVer,maxVer) {OFFS(type,item),128|saveas,SIZE(type,item),minVer,maxVer}, {dim,dim2,rowlen,0,0}
+#define MKARRAY_OLD(type,item,saveas,dim,minVer,maxVer) {OFFS(type,item),128|saveas,SIZE(type,item),minVer,maxVer}, {(uint32)(dim),1,0,0,0}
+#define MKARRAY2_OLD(type,item,saveas,dim,dim2,rowlen,minVer,maxVer) {OFFS(type,item),128|saveas,SIZE(type,item),minVer,maxVer}, {(uint32)(dim),(uint32)(dim2),(uint16)(rowlen),0,0}
// An obsolete item/array, to be ignored upon load. We retain the type/item params to make it easier to debug.
// Obsolete items have size == 0.
#define MK_OBSOLETE(type,item,saveas,minVer,maxVer) {0,saveas,0,minVer,maxVer}
-#define MK_OBSOLETE_ARRAY(type,item,saveas,dim,minVer,maxVer) {0,128|saveas,0,minVer,maxVer}, {dim,1,0,0,0}
-#define MK_OBSOLETE_ARRAY2(type,item,saveas,dim,dim2,rowlen,minVer,maxVer) {0,128|saveas,0,minVer,maxVer}, {dim,dim2,rowlen,0,0}
+#define MK_OBSOLETE_ARRAY(type,item,saveas,dim,minVer,maxVer) {0,128|saveas,0,minVer,maxVer}, {(uint32)(dim),1,0,0,0}
+#define MK_OBSOLETE_ARRAY2(type,item,saveas,dim,dim2,rowlen,minVer,maxVer) {0,128|saveas,0,minVer,maxVer}, {(uint32)(dim),(uint32)(dim2),(uint16)(rowlen),0,0}
// End marker
#define MKEND() {0xFFFF,0xFF,0xFF,0,0}
diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h
index d4eefe8c28..faa03b3fbb 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 Sat Jul 07 23:39:27 2012
+ This file was generated by the md5table tool on Fri Apr 05 21:06:17 2013
DO NOT EDIT MANUALLY!
*/
@@ -195,6 +195,7 @@ static const MD5Table md5table[] = {
{ "46b53fd430adcfbed791b48a0d4b079f", "funpack", "", "", -1, Common::EN_ANY, Common::kPlatformPC },
{ "470c45b636139bb40716daa1c7edaad0", "loom", "EGA", "EGA", -1, Common::DE_DEU, Common::kPlatformPC },
{ "477dbafbd66a53c98416dc01aef019ad", "monkey", "EGA", "EGA", -1, Common::IT_ITA, Common::kPlatformPC },
+ { "47e041521d35c7a801bb1c010d84da9d", "freddi4", "HE 99", "Demo", -1, Common::IT_ITA, Common::kPlatformWindows },
{ "47e75b1bdcb44c78cb94883d1731ccf8", "fbear", "HE 62", "Demo", 6203, Common::EN_ANY, Common::kPlatformPC },
{ "48b9f04b348bc5013327753f0d12a144", "loom", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformAmiga },
{ "49210e124e4c2b30f1290a9ef6306301", "monkey", "EGA", "EGA", 8357, Common::EN_ANY, Common::kPlatformPC },
@@ -407,6 +408,7 @@ static const MD5Table md5table[] = {
{ "95be99181bd0f10fef4872c2d4a771cb", "zak", "V1", "", -1, Common::DE_DEU, Common::kPlatformC64 },
{ "96a3069a3c63caa7329588ce1fef41ee", "spyozon", "", "", -1, Common::RU_RUS, Common::kPlatformUnknown },
{ "9708cf716ed8bcc9ff3fcfc69413b746", "puttputt", "HE 62", "", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "9778341eefc6feb447ca07e7be21791c", "puttrace", "HE 99", "Demo", -1, Common::IT_ITA, Common::kPlatformWindows },
{ "9781422e4288dbc090720e4563168ba7", "puttzoo", "", "", -1, Common::FR_FRA, Common::kPlatformWindows },
{ "981e1e1891f2be7e25a01f50ae55a5af", "puttrace", "HE 98", "", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "98744fe66ff730e8c2b3b1f58803ab0b", "atlantis", "Floppy", "Demo", -1, Common::EN_ANY, Common::kPlatformPC },
@@ -594,6 +596,7 @@ static const MD5Table md5table[] = {
{ "e72bb4c2b613db2cf50f89ff6350e70a", "ft", "", "", -1, Common::ES_ESP, Common::kPlatformUnknown },
{ "e781230da44a44e2f0770edb2b3b3633", "maniac", "V2", "V2", -1, Common::EN_ANY, Common::kPlatformAmiga },
{ "e8d0697906e53fee8b7e9f5652696da8", "atlantis", "", "CD", 11915, Common::JA_JPN, Common::kPlatformPC },
+ { "e9271b3d0694c7101f10d675ab7c0133", "freddi4", "HE 99", "", -1, Common::IT_ITA, Common::kPlatformWindows },
{ "e94c7cc3686fce406d3c91b5eae5a72d", "zak", "V2", "V2", -1, Common::EN_ANY, Common::kPlatformAmiga },
{ "e95cf980719c0be078fb68a67af97b4a", "funpack", "", "", -1, Common::JA_JPN, Common::kPlatform3DO },
{ "e98b982ceaf9d253d730bde8903233d6", "monkey", "EGA", "EGA", -1, Common::DE_DEU, Common::kPlatformPC },
diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp
index cf9bd55b1a..ee165934a0 100644
--- a/engines/sky/compact.cpp
+++ b/engines/sky/compact.cpp
@@ -34,7 +34,7 @@ namespace Sky {
#define SKY_CPT_SIZE 419427
-#define OFFS(type,item) (((ptrdiff_t)(&((type *)42)->item))-42)
+#define OFFS(type,item) ((uint32)(((ptrdiff_t)(&((type *)42)->item))-42))
#define MK32(type,item) OFFS(type, item),0,0,0
#define MK16(type,item) OFFS(type, item),0
#define MK32_A5(type, item) MK32(type, item[0]), MK32(type, item[1]), \
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index 6f5da32bc4..216d801f3e 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -376,10 +376,10 @@ bool GraphicEngine::saveThumbnailScreenshot(const Common::String &filename) {
void GraphicEngine::ARGBColorToLuaColor(lua_State *L, uint color) {
lua_Number components[4] = {
- (color >> 16) & 0xff, // Rot
- (color >> 8) & 0xff, // Grќn
- color & 0xff, // Blau
- color >> 24, // Alpha
+ (lua_Number)((color >> 16) & 0xff), // Rot
+ (lua_Number)((color >> 8) & 0xff), // Grќn
+ (lua_Number)(color & 0xff), // Blau
+ (lua_Number)(color >> 24), // Alpha
};
lua_newtable(L);
diff --git a/engines/sword25/util/lua/ldo.cpp b/engines/sword25/util/lua/ldo.cpp
index 5d9667f4f0..c162a62e98 100644
--- a/engines/sword25/util/lua/ldo.cpp
+++ b/engines/sword25/util/lua/ldo.cpp
@@ -6,12 +6,10 @@
// FIXME: LUAI_THROW and LUAI_TRY use either throw/catch or setjmp/longjmp.
-// Neither of these is supported in ScummVM. So we need to come up
-// with a replacement. The most simple, direct and crude approach:
-// Replace "throw" with an "error()" call. Of course we only
-// would want to do that if this actually never happens...
-#define FORBIDDEN_SYMBOL_EXCEPTION_setjmp
-#define FORBIDDEN_SYMBOL_EXCEPTION_longjmp
+// Neither of these is supported in ScummVM. Calls to LUAI_THROW have been
+// replaced with error() in ScummVM, but the calls to LUAI_TRY remain
+#define FORBIDDEN_SYMBOL_EXCEPTION_setjmp // for LUAI_TRY, i.e. try()
+#define FORBIDDEN_SYMBOL_EXCEPTION_longjmp // for LUAI_TRY and LUAI_THROW, i.e. throw()
#include "common/textconsole.h"
@@ -103,12 +101,10 @@ static void resetstack (lua_State *L, int status) {
void luaD_throw (lua_State *L, int errcode) {
if (L->errorJmp) {
L->errorJmp->status = errcode;
- // FIXME: LUAI_THROW and LUAI_TRY use either throw/catch or setjmp/longjmp.
- // Neither of these is supported in ScummVM. So we need to come up
- // with a replacement. The most simple, direct and crude approach:
- // Replace "throw" with an "error()" call. Of course we only
- // would want to do that if this actually never happens...
- LUAI_THROW(L, L->errorJmp);
+ // LUAI_THROW has been replaced with an error message in ScummVM, together
+ // with the LUA error code and description
+ //LUAI_THROW(L, L->errorJmp);
+ error("LUA error occured, error code is %d (%s)", errcode, luaErrorDescription[errcode]);
}
else {
L->status = cast_byte(errcode);
@@ -129,9 +125,8 @@ int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) {
L->errorJmp = &lj;
// FIXME: LUAI_THROW and LUAI_TRY use either throw/catch or setjmp/longjmp.
// Neither of these is supported in ScummVM. So we need to come up
- // with a replacement. The most simple, direct and crude approach:
- // Replace "throw" with an "error()" call. Of course we only
- // would want to do that if this actually never happens...
+ // with a replacement. Calls to LUAI_THROW have been replaced with error()
+ // in ScummVM, but the calls to LUAI_TRY remain
LUAI_TRY(L, &lj,
(*f)(L, ud);
);
diff --git a/engines/sword25/util/lua/lua.h b/engines/sword25/util/lua/lua.h
index 08ad80d70f..768ec1ad74 100644
--- a/engines/sword25/util/lua/lua.h
+++ b/engines/sword25/util/lua/lua.h
@@ -48,6 +48,15 @@
#define LUA_ERRMEM 4
#define LUA_ERRERR 5
+// Added in ScummVM. Refer to http://www.lua.org/manual/5.1/manual.html
+static const char* luaErrorDescription[] = {
+ "No error",
+ "Coroutine yield", // not an actual error, see lua_resume
+ "Runtime error",
+ "Syntax error during pre-compilation", // refer to lua_load
+ "Memory allocation error",
+ "Error while running the error handler function"
+};
typedef struct lua_State lua_State;
diff --git a/engines/sword25/util/lua/luaconf.h b/engines/sword25/util/lua/luaconf.h
index 53d0f55290..fb85983998 100644
--- a/engines/sword25/util/lua/luaconf.h
+++ b/engines/sword25/util/lua/luaconf.h
@@ -621,7 +621,7 @@ union luai_Cast { double l_d; long l_l; };
#else
/* default handling with long jumps */
-#define LUAI_THROW(L,c) longjmp((c)->b, 1)
+//#define LUAI_THROW(L,c) longjmp((c)->b, 1) // replaced with error() in ScummVM
#define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a }
#define luai_jmpbuf jmp_buf
diff --git a/engines/testbed/config-params.cpp b/engines/testbed/config-params.cpp
index d7ead48f63..e89da0b07f 100644
--- a/engines/testbed/config-params.cpp
+++ b/engines/testbed/config-params.cpp
@@ -69,4 +69,4 @@ void ConfigParams::deleteWriteStream() {
}
}
-} // End of namespace Testbed
+} // End of namespace Testbed
diff --git a/engines/testbed/config.cpp b/engines/testbed/config.cpp
index 6bd4c82b41..6b56616c9b 100644
--- a/engines/testbed/config.cpp
+++ b/engines/testbed/config.cpp
@@ -304,4 +304,4 @@ void TestbedConfigManager::selectTestsuites() {
_configFileInterface.clear();
}
-} // End of namespace Testbed
+} // End of namespace Testbed
diff --git a/engines/testbed/sound.cpp b/engines/testbed/sound.cpp
index bb7ae2c055..5af1d8ca31 100644
--- a/engines/testbed/sound.cpp
+++ b/engines/testbed/sound.cpp
@@ -277,4 +277,4 @@ SoundSubsystemTestSuite::SoundSubsystemTestSuite() {
addTest("SampleRates", &SoundSubsystem::sampleRates, true);
}
-} // End of namespace Testbed
+} // End of namespace Testbed
diff --git a/engines/tinsel/bg.cpp b/engines/tinsel/bg.cpp
index ed15bfef2a..9f1f2c43f4 100644
--- a/engines/tinsel/bg.cpp
+++ b/engines/tinsel/bg.cpp
@@ -153,7 +153,7 @@ static void BGmainProcess(CORO_PARAM, const void *param) {
}
if (g_bDoFadeIn) {
- FadeInFast(NULL);
+ FadeInFast();
g_bDoFadeIn = false;
} else if (TinselV2)
PokeInTagColor();
diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h
index f6b1487561..4762acfe2c 100644
--- a/engines/tinsel/detection_tables.h
+++ b/engines/tinsel/detection_tables.h
@@ -490,7 +490,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
GID_DW1,
0,
- GF_SCNFILES,
+ GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT,
TINSEL_V1,
},
diff --git a/engines/tinsel/dw.h b/engines/tinsel/dw.h
index 21f6db946e..34f05ab8c2 100644
--- a/engines/tinsel/dw.h
+++ b/engines/tinsel/dw.h
@@ -91,7 +91,7 @@ typedef int HPOLYGON;
#define MAX_SAVED_ALIVES 512 // Saves actors'lives
#define MAX_SAVED_ACTOR_Z 512 // Saves actors' Z-ness
-// Legal non-existant entrance number for LoadScene()
+// Legal non-existent entrance number for LoadScene()
#define NO_ENTRY_NUM (-3458) // Magic unlikely number
diff --git a/engines/tinsel/faders.cpp b/engines/tinsel/faders.cpp
index e9517103a9..b772e37b47 100644
--- a/engines/tinsel/faders.cpp
+++ b/engines/tinsel/faders.cpp
@@ -137,9 +137,8 @@ static void FadeProcess(CORO_PARAM, const void *param) {
* Generic palette fader/unfader. Creates a 'FadeProcess' process
* for each palette that is to fade.
* @param multTable Fixed point color multiplier table
- * @param noFadeTable List of palettes not to fade
*/
-static void Fader(const long multTable[], SCNHANDLE noFadeTable[]) {
+static void Fader(const long multTable[]) {
PALQ *pPal; // palette manager iterator
if (TinselV2) {
@@ -151,84 +150,61 @@ static void Fader(const long multTable[], SCNHANDLE noFadeTable[]) {
// create a process for each palette in the palette queue
for (pPal = GetNextPalette(NULL); pPal != NULL; pPal = GetNextPalette(pPal)) {
- bool bFade = true;
- // assume we want to fade this palette
-
- // is palette in the list of palettes not to fade
- if (noFadeTable != NULL) {
- // there is a list of palettes not to fade
- for (int i = 0; noFadeTable[i] != 0; i++) {
- if (pPal->hPal == noFadeTable[i]) {
- // palette is in the list - dont fade it
- bFade = false;
-
- // leave loop prematurely
- break;
- }
- }
- }
-
- if (bFade) {
- FADE fade;
+ FADE fade;
- // fill in FADE struct
- fade.pColorMultTable = multTable;
- fade.pPalQ = pPal;
+ // fill in FADE struct
+ fade.pColorMultTable = multTable;
+ fade.pPalQ = pPal;
- // create a fader process for this palette
- CoroScheduler.createProcess(PID_FADER, FadeProcess, (void *)&fade, sizeof(FADE));
- }
+ // create a fader process for this palette
+ CoroScheduler.createProcess(PID_FADER, FadeProcess, (void *)&fade, sizeof(FADE));
}
}
/**
* Fades a list of palettes down to black.
- * 'noFadeTable' is a NULL terminated list of palettes not to fade.
*/
-void FadeOutMedium(SCNHANDLE noFadeTable[]) {
+void FadeOutMedium() {
// Fixed point fade multiplier table
static const long fadeout[] = {0xea00, 0xd000, 0xb600, 0x9c00,
0x8200, 0x6800, 0x4e00, 0x3400, 0x1a00, 0, -1};
// call generic fader
- Fader(fadeout, noFadeTable);
+ Fader(fadeout);
}
/**
* Fades a list of palettes down to black.
- * @param noFadeTable A NULL terminated list of palettes not to fade.
*/
-void FadeOutFast(SCNHANDLE noFadeTable[]) {
+void FadeOutFast() {
// Fixed point fade multiplier table
static const long fadeout[] = {0xd000, 0xa000, 0x7000, 0x4000, 0x1000, 0, -1};
// call generic fader
- Fader(fadeout, noFadeTable);
+ Fader(fadeout);
}
/**
* Fades a list of palettes from black to their current colors.
- * 'noFadeTable' is a NULL terminated list of palettes not to fade.
*/
-void FadeInMedium(SCNHANDLE noFadeTable[]) {
+void FadeInMedium() {
// Fade multiplier table
static const long fadein[] = {0, 0x1a00, 0x3400, 0x4e00, 0x6800,
0x8200, 0x9c00, 0xb600, 0xd000, 0xea00, 0x10000L, -1};
// call generic fader
- Fader(fadein, noFadeTable);
+ Fader(fadein);
}
/**
* Fades a list of palettes from black to their current colors.
- * @param noFadeTable A NULL terminated list of palettes not to fade.
*/
-void FadeInFast(SCNHANDLE noFadeTable[]) {
+void FadeInFast() {
// Fade multiplier table
static const long fadein[] = {0, 0x1000, 0x4000, 0x7000, 0xa000, 0xd000, 0x10000L, -1};
// call generic fader
- Fader(fadein, noFadeTable);
+ Fader(fadein);
}
void PokeInTagColor() {
diff --git a/engines/tinsel/faders.h b/engines/tinsel/faders.h
index dc0b903d7e..f7db902fe5 100644
--- a/engines/tinsel/faders.h
+++ b/engines/tinsel/faders.h
@@ -39,14 +39,10 @@ namespace Tinsel {
|* Fader Function Prototypes *|
\*----------------------------------------------------------------------*/
-// usefull palette faders - they all need a list of palettes that
-// should not be faded. This parameter can be
-// NULL - fade all palettes.
-
-void FadeOutMedium(SCNHANDLE noFadeTable[]);
-void FadeOutFast(SCNHANDLE noFadeTable[]);
-void FadeInMedium(SCNHANDLE noFadeTable[]);
-void FadeInFast(SCNHANDLE noFadeTable[]);
+void FadeOutMedium();
+void FadeOutFast();
+void FadeInMedium();
+void FadeInFast();
void PokeInTagColor();
} // End of namespace Tinsel
diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp
index b917775360..ef8a10221b 100644
--- a/engines/tinsel/graphics.cpp
+++ b/engines/tinsel/graphics.cpp
@@ -272,7 +272,7 @@ static void MacDrawTiles(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply
tempDest += rptLength;
}
- int overflow = (copyBytes % 2) == 0 ? 0 : 2 - (copyBytes % 2);
+ int overflow = (copyBytes & 1);
x += runLength;
srcP += runLength + overflow;
}
diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp
index dab2a897fc..3144ea7f94 100644
--- a/engines/tinsel/music.cpp
+++ b/engines/tinsel/music.cpp
@@ -135,10 +135,6 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) {
if (ConfMan.hasKey("mute"))
mute = ConfMan.getBool("mute");
- // The Macintosh version of DW1 uses raw PCM for music
- if (TinselV1Mac)
- return _vm->_sound->playDW1MacMusic(dwFileOffset);
-
SetMidiVolume(mute ? 0 : _vm->_config->_musicVolume);
// the index and length of the last tune loaded
@@ -191,43 +187,48 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) {
// move to correct position in the file
midiStream.seek(dwFileOffset, SEEK_SET);
- // read the length of the sequence
- dwSeqLen = midiStream.readUint32LE();
-
- // make sure buffer is large enough for this sequence
- assert(dwSeqLen > 0 && dwSeqLen <= g_midiBuffer.size);
-
- // stop any currently playing tune
- _vm->_midiMusic->stop();
-
- // read the sequence. This needs to be read again before playSEQ() is
- // called even if the music is restarting, as playSEQ() reads the file
- // name off the buffer itself. However, that function adds SMF headers
- // to the buffer, thus if it's read again, the SMF headers will be read
- // and the filename will always be 'MThd'.
- if (midiStream.read(g_midiBuffer.pDat, dwSeqLen) != dwSeqLen)
- error(FILE_IS_CORRUPT, MIDI_FILE);
-
- midiStream.close();
+ if (TinselV1Mac) {
+ // The Macintosh version of DW1 uses raw PCM for music
+ dwSeqLen = midiStream.readUint32BE();
+ _vm->_sound->playDW1MacMusic(midiStream, dwSeqLen);
+ } else {
+ dwSeqLen = midiStream.readUint32LE();
+
+ // make sure buffer is large enough for this sequence
+ assert(dwSeqLen > 0 && dwSeqLen <= g_midiBuffer.size);
+
+ // stop any currently playing tune
+ _vm->_midiMusic->stop();
+
+ // read the sequence. This needs to be read again before playSEQ() is
+ // called even if the music is restarting, as playSEQ() reads the file
+ // name off the buffer itself. However, that function adds SMF headers
+ // to the buffer, thus if it's read again, the SMF headers will be read
+ // and the filename will always be 'MThd'.
+ if (midiStream.read(g_midiBuffer.pDat, dwSeqLen) != dwSeqLen)
+ error(FILE_IS_CORRUPT, MIDI_FILE);
+
+ // WORKAROUND for bug #2820054 "DW1: No intro music at first start on Wii",
+ // which actually affects all ports, since it's specific to the GRA version.
+ //
+ // The GRA version does not seem to set the channel volume at all for the first
+ // intro track, thus we need to do that here. We only initialize the channels
+ // used in that sequence. And we are using 127 as default channel volume.
+ //
+ // Only in the GRA version dwFileOffset can be "38888", just to be sure, we
+ // check for the SCN files feature flag not being set though.
+ if (_vm->getGameID() == GID_DW1 && dwFileOffset == 38888 && !(_vm->getFeatures() & GF_SCNFILES)) {
+ _vm->_midiMusic->send(0x7F07B0 | 3);
+ _vm->_midiMusic->send(0x7F07B0 | 5);
+ _vm->_midiMusic->send(0x7F07B0 | 8);
+ _vm->_midiMusic->send(0x7F07B0 | 10);
+ _vm->_midiMusic->send(0x7F07B0 | 13);
+ }
- // WORKAROUND for bug #2820054 "DW1: No intro music at first start on Wii",
- // which actually affects all ports, since it's specific to the GRA version.
- //
- // The GRA version does not seem to set the channel volume at all for the first
- // intro track, thus we need to do that here. We only initialize the channels
- // used in that sequence. And we are using 127 as default channel volume.
- //
- // Only in the GRA version dwFileOffset can be "38888", just to be sure, we
- // check for the SCN files feature flag not being set though.
- if (_vm->getGameID() == GID_DW1 && dwFileOffset == 38888 && !(_vm->getFeatures() & GF_SCNFILES)) {
- _vm->_midiMusic->send(0x7F07B0 | 3);
- _vm->_midiMusic->send(0x7F07B0 | 5);
- _vm->_midiMusic->send(0x7F07B0 | 8);
- _vm->_midiMusic->send(0x7F07B0 | 10);
- _vm->_midiMusic->send(0x7F07B0 | 13);
+ _vm->_midiMusic->playMIDI(dwSeqLen, bLoop);
}
- _vm->_midiMusic->playMIDI(dwSeqLen, bLoop);
+ midiStream.close();
return true;
}
@@ -281,68 +282,89 @@ void SetMidiVolume(int vol) {
void OpenMidiFiles() {
Common::File midiStream;
- // Demo version has no midi file
- if (TinselV0 || TinselV2)
- return;
+ if (TinselV0) {
+ // The early demo version of DW1 doesn't have MIDI
+ } else if (TinselV2) {
+ // DW2 uses a different music mechanism
+ } else if (TinselV1Mac) {
+ // open MIDI sequence file in binary mode
+ if (!midiStream.open(MIDI_FILE))
+ error(CANNOT_FIND_FILE, MIDI_FILE);
- // The Macintosh version of DW1 does not use MIDI for music.
- // It uses PCM music instead, which is quite big to be preloaded here.
- if (TinselV1Mac)
- return;
+ uint32 curTrack = 1;
+ uint32 songLength = 0;
+ int32 fileSize = midiStream.size();
- if (g_midiBuffer.pDat)
- // already allocated
- return;
+ // Init
+ for (int i = 0; i < ARRAYSIZE(g_midiOffsets); i++)
+ g_midiOffsets[i] = 0;
- // open MIDI sequence file in binary mode
- if (!midiStream.open(MIDI_FILE))
- error(CANNOT_FIND_FILE, MIDI_FILE);
+ midiStream.skip(4); // skip file header
- // gen length of the largest sequence
- g_midiBuffer.size = midiStream.readUint32LE();
- if (midiStream.eos() || midiStream.err())
- error(FILE_IS_CORRUPT, MIDI_FILE);
-
- if (g_midiBuffer.size) {
- // allocate a buffer big enough for the largest MIDI sequence
- if ((g_midiBuffer.pDat = (uint8 *)malloc(g_midiBuffer.size)) != NULL) {
- // clear out the buffer
- memset(g_midiBuffer.pDat, 0, g_midiBuffer.size);
-// VMM_lock(midiBuffer.pDat, midiBuffer.size);
- } else {
- //mSeqHandle = NULL;
+ while (!midiStream.eos() && !midiStream.err() && midiStream.pos() != fileSize) {
+ assert(curTrack < ARRAYSIZE(g_midiOffsets));
+ g_midiOffsets[curTrack] = midiStream.pos();
+ //debug("%d: %d", curTrack, g_midiOffsets[curTrack]);
+
+ songLength = midiStream.readUint32BE();
+ midiStream.skip(songLength);
+
+ curTrack++;
}
- }
- // Now scan through the contents of the MIDI file to find the offset
- // of each individual track, in order to create a mapping from MIDI
- // offset to track number, for the enhanced MIDI soundtrack.
- // The first song is always at position 4. The subsequent ones are
- // calculated dynamically.
- uint32 curOffset = 4;
- uint32 curTrack = 0;
- uint32 songLength = 0;
+ midiStream.close();
+ } else {
+ if (g_midiBuffer.pDat)
+ // already allocated
+ return;
+
+ // open MIDI sequence file in binary mode
+ if (!midiStream.open(MIDI_FILE))
+ error(CANNOT_FIND_FILE, MIDI_FILE);
+
+ // get length of the largest sequence
+ g_midiBuffer.size = midiStream.readUint32LE();
+ if (midiStream.eos() || midiStream.err())
+ error(FILE_IS_CORRUPT, MIDI_FILE);
+
+ if (g_midiBuffer.size) {
+ // allocate a buffer big enough for the largest MIDI sequence
+ if ((g_midiBuffer.pDat = (uint8 *)malloc(g_midiBuffer.size)) != NULL) {
+ // clear out the buffer
+ memset(g_midiBuffer.pDat, 0, g_midiBuffer.size);
+ }
+ }
- // Init
- for (int i = 0; i < ARRAYSIZE(g_midiOffsets); i++)
- g_midiOffsets[i] = 0;
+ // Now scan through the contents of the MIDI file to find the offset
+ // of each individual track, in order to create a mapping from MIDI
+ // offset to track number, for the enhanced MIDI soundtrack.
+ // The first song is always at position 4. The subsequent ones are
+ // calculated dynamically.
+ uint32 curOffset = 4;
+ uint32 curTrack = 0;
+ uint32 songLength = 0;
+
+ // Init
+ for (int i = 0; i < ARRAYSIZE(g_midiOffsets); i++)
+ g_midiOffsets[i] = 0;
+
+ while (!midiStream.eos() && !midiStream.err()) {
+ if (curOffset + (4 * curTrack) >= (uint32)midiStream.size())
+ break;
- while (!midiStream.eos() && !midiStream.err()) {
- if (curOffset + (4 * curTrack) >= (uint32)midiStream.size())
- break;
+ assert(curTrack < ARRAYSIZE(g_midiOffsets));
+ g_midiOffsets[curTrack] = curOffset + (4 * curTrack);
+ //debug("%d: %d", curTrack, midiOffsets[curTrack]);
- assert(curTrack < ARRAYSIZE(g_midiOffsets));
- g_midiOffsets[curTrack] = curOffset + (4 * curTrack);
- //debug("%d: %d", curTrack, midiOffsets[curTrack]);
+ songLength = midiStream.readUint32LE();
+ curOffset += songLength;
+ midiStream.skip(songLength);
- songLength = midiStream.readUint32LE();
- curOffset += songLength;
- midiStream.skip(songLength);
+ curTrack++;
+ }
- curTrack++;
+ midiStream.close();
}
-
- midiStream.close();
}
void DeleteMidiBuffer() {
diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp
index 04018172c0..505cb21adb 100644
--- a/engines/tinsel/palette.cpp
+++ b/engines/tinsel/palette.cpp
@@ -72,8 +72,6 @@ static VIDEO_DAC_Q *g_pDAChead;
/** the translucent palette lookup table */
uint8 g_transPalette[MAX_COLORS]; // used in graphics.cpp
-uint8 g_ghostPalette[MAX_COLORS];
-
static int g_translucentIndex = 228;
static int g_talkIndex = 233;
@@ -170,10 +168,14 @@ void PalettesToVideoDAC() {
pal[i * 3 + 2] = TINSEL_GetBValue(pColors[i]);
}
- // In DW1 Mac, color 254 should be black, like in the PC version.
- // We fix it here.
+ // Swap black/white colors in the Mac version.
+ // We need to swap the current black/white values so that screen fade
+ // in/out is done correctly.
if (TinselV1Mac) {
- pal[254 * 3 + 0] = pal[254 * 3 + 1] = pal[254 * 3 + 2] = 0;
+ byte macWhite = pal[ 0 * 3 + 0];
+ byte macBlack = pal[254 * 3 + 0];
+ pal[254 * 3 + 0] = pal[254 * 3 + 1] = pal[254 * 3 + 2] = macWhite;
+ pal[ 0 * 3 + 0] = pal[ 0 * 3 + 1] = pal[ 0 * 3 + 2] = macBlack;
}
// update the system palette
@@ -552,7 +554,8 @@ void CreateTranslucentPalette(SCNHANDLE hPalette) {
// leave background color alone
g_transPalette[0] = 0;
- for (uint i = 0; i < FROM_32(pPal->numColors); i++) {
+ int32 numColors = FROM_32(pPal->numColors);
+ for (int32 i = 0; i < numColors; i++) {
// get the RGB color model values
uint8 red = TINSEL_GetRValue(pPal->palRGB[i]);
uint8 green = TINSEL_GetGValue(pPal->palRGB[i]);
@@ -564,41 +567,13 @@ void CreateTranslucentPalette(SCNHANDLE hPalette) {
// map the Value field to one of the 4 colors reserved for the translucent palette
val /= 63;
- g_transPalette[i + 1] = (uint8)((val == 0) ? 0 : val +
+ byte blackColorIndex = (!TinselV1Mac) ? 0 : 255;
+ g_transPalette[i + 1] = (uint8)((val == 0) ? blackColorIndex : val +
(TinselV2 ? TranslucentColor() : COL_HILIGHT) - 1);
}
}
/**
- * Creates the ghost palette
- */
-void CreateGhostPalette(SCNHANDLE hPalette) {
- // get a pointer to the palette
- PALETTE *pPal = (PALETTE *)LockMem(hPalette);
- int i;
-
- // leave background color alone
- g_ghostPalette[0] = 0;
-
- for (i = 0; i < (int)FROM_32(pPal->numColors); i++) {
- // get the RGB color model values
- uint8 red = TINSEL_GetRValue(pPal->palRGB[i]);
- uint8 green = TINSEL_GetGValue(pPal->palRGB[i]);
- uint8 blue = TINSEL_GetBValue(pPal->palRGB[i]);
-
- // calculate the Value field of the HSV color model
- unsigned val = (red > green) ? red : green;
- val = (val > blue) ? val : blue;
-
- // map the Value field to one of the 4 colors reserved for the translucent palette
- val /= 64;
- assert(/*val >= 0 &&*/ val <= 3);
- g_ghostPalette[i + 1] = (uint8)(val + SysVar(ISV_GHOST_BASE));
- }
-}
-
-
-/**
* Returns an adjusted color RGB
* @param color Color to scale
*/
diff --git a/engines/tinsel/palette.h b/engines/tinsel/palette.h
index 49a78ae236..c57b8df2ba 100644
--- a/engines/tinsel/palette.h
+++ b/engines/tinsel/palette.h
@@ -107,7 +107,7 @@ void PaletteStats(); // Shows the maximum number of palettes used at once
void psxPaletteMapper(PALQ *originalPal, uint8 *psxClut, byte *mapperTable); // Maps PSX CLUTs to original palette in resource file
-void PalettesToVideoDAC(); // Update the video DAC with palettes currently the the DAC queue
+void PalettesToVideoDAC(); // Update the video DAC with palettes currently in the DAC queue
void UpdateDACqueueHandle(
int posInDAC, // position in video DAC
@@ -146,8 +146,6 @@ void FadingPalette(PALQ *pPalQ, bool bFading);
void CreateTranslucentPalette(SCNHANDLE BackPal);
-void CreateGhostPalette(SCNHANDLE hPalette);
-
void NoFadingPalettes(); // All fading processes have just been killed
void DimPartPalette(
diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp
index 2ef92d853f..acff196916 100644
--- a/engines/tinsel/saveload.cpp
+++ b/engines/tinsel/saveload.cpp
@@ -540,8 +540,8 @@ static void SaveFailure(Common::OutSaveFile *f) {
if (f) {
delete f;
_vm->getSaveFileMan()->removeSavefile(g_SaveSceneName);
- g_SaveSceneName = NULL; // Invalidate save name
}
+ g_SaveSceneName = NULL; // Invalidate save name
GUI::MessageDialog dialog(_("Failed to save game state to file."));
dialog.runModal();
}
diff --git a/engines/tinsel/savescn.cpp b/engines/tinsel/savescn.cpp
index 0c0cc5c81e..d2537169f7 100644
--- a/engines/tinsel/savescn.cpp
+++ b/engines/tinsel/savescn.cpp
@@ -303,7 +303,7 @@ static int DoRestoreSceneFrame(SAVED_DATA *sd, int n) {
switch (n) {
case RS_COUNT + COUNTOUT_COUNT:
// Trigger pre-load and fade and start countdown
- FadeOutFast(NULL);
+ FadeOutFast();
break;
case RS_COUNT:
@@ -360,7 +360,6 @@ static int DoRestoreSceneFrame(SAVED_DATA *sd, int n) {
RestoreActorZ(sd->savedActorZ);
RestoreZpositions(sd->zPositions);
RestoreSysVars(sd->SavedSystemVars);
- CreateGhostPalette(BgPal());
RestoreActors(sd->NumSavedActors, sd->SavedActorInfo);
RestoreSoundReels(sd->SavedSoundReels);
return 1;
diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp
index 9181f85afb..b652e394a0 100644
--- a/engines/tinsel/scene.cpp
+++ b/engines/tinsel/scene.cpp
@@ -286,7 +286,7 @@ static void LoadScene(SCNHANDLE scene, int entry) {
}
if (i == ss->numEntrance)
- error("Non-existant scene entry number");
+ error("Non-existent scene entry number");
if (ss->hSceneScript) {
init.event = STARTUP;
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index 03aa3767c4..cadc754de6 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -177,15 +177,7 @@ bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::Sound
return true;
}
-bool SoundManager::playDW1MacMusic(int dwFileOffset) {
- Common::File s;
-
- if (!s.open("midi.dat"))
- error(CANNOT_FIND_FILE, "midi.dat");
-
- s.seek(dwFileOffset);
- uint32 length = s.readUint32BE();
-
+void SoundManager::playDW1MacMusic(Common::File &s, uint32 length) {
// TODO: It's a bad idea to load the music track in a buffer.
// We should use a SubReadStream instead, and keep midi.dat open.
// However, the track lengths aren't that big (about 1-4MB),
@@ -195,28 +187,20 @@ bool SoundManager::playDW1MacMusic(int dwFileOffset) {
// read all of the sample
if (s.read(soundData, length) != length)
- error(FILE_IS_CORRUPT, "midi.dat");
+ error(FILE_IS_CORRUPT, MIDI_FILE);
Common::SeekableReadStream *memStream = new Common::MemoryReadStream(soundData, length);
Audio::SoundHandle *handle = &_channels[kChannelDW1MacMusic].handle;
- //_channels[kChannelDW1MacMusic].sampleNum = dwFileOffset;
// Stop any previously playing music track
_vm->_mixer->stopHandle(*handle);
- // FIXME: Should set this in a different place ;)
- _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, _vm->_config->_musicVolume);
-
// TODO: Compression support (MP3/OGG/FLAC) for midi.dat in DW1 Mac
Audio::RewindableAudioStream *musicStream = Audio::makeRawStream(memStream, 22050, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
if (musicStream)
_vm->_mixer->playStream(Audio::Mixer::kMusicSoundType, handle, Audio::makeLoopingAudioStream(musicStream, 0));
-
- s.close();
-
- return true;
}
// playSample for DiscWorld 2
@@ -289,7 +273,7 @@ bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int p
uint32 dwSampleIndex = _sampleIndex[id];
if (dwSampleIndex == 0) {
- warning("Tinsel2 playSample, non-existant sample %d", id);
+ warning("Tinsel2 playSample, non-existent sample %d", id);
return false;
}
diff --git a/engines/tinsel/sound.h b/engines/tinsel/sound.h
index 8510c1618f..c68d9cb71e 100644
--- a/engines/tinsel/sound.h
+++ b/engines/tinsel/sound.h
@@ -109,7 +109,7 @@ public:
bool playSample(int id, Audio::Mixer::SoundType type, Audio::SoundHandle *handle = 0);
bool playSample(int id, int sub, bool bLooped, int x, int y, int priority,
Audio::Mixer::SoundType type, Audio::SoundHandle *handle = 0);
- bool playDW1MacMusic(int dwFileOffset);
+ void playDW1MacMusic(Common::File &s, uint32 length);
void stopAllSamples(); // Stops any currently playing sample
void stopSpecSample(int id, int sub = 0); // Stops a specific sample
diff --git a/engines/tinsel/timers.cpp b/engines/tinsel/timers.cpp
index d3a7446565..36986ccb47 100644
--- a/engines/tinsel/timers.cpp
+++ b/engines/tinsel/timers.cpp
@@ -106,7 +106,7 @@ static TIMER *findTimer(int num) {
*/
static TIMER *allocateTimer(int num) {
assert(num); // zero is not allowed as a timer number
- assert(!findTimer(num)); // Allocating already existant timer
+ assert(!findTimer(num)); // Allocating already existent timer
for (int i = 0; i < MAX_TIMERS; i++) {
if (!g_timers[i].tno) {
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp
index 6a396b9b01..34aa64a609 100644
--- a/engines/tinsel/tinlib.cpp
+++ b/engines/tinsel/tinlib.cpp
@@ -1151,14 +1151,14 @@ static void FaceTag(int actor, HPOLYGON hp) {
* FadeIn
*/
static void FadeIn() {
- FadeInMedium(NULL);
+ FadeInMedium();
}
/**
* FadeOut
*/
static void FadeOut() {
- FadeOutMedium(NULL);
+ FadeOutMedium();
}
/**
@@ -1198,7 +1198,6 @@ static void Ghost(int actor, int tColor, int tPalOffset) {
SetSysVar(ISV_GHOST_ACTOR, actor);
SetSysVar(ISV_GHOST_COLOR, tColor);
SetSysVar(ISV_GHOST_BASE, tPalOffset);
- CreateGhostPalette(BgPal());
}
/**
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index e836fdff1f..9075e1adb1 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -666,7 +666,7 @@ bool ChangeScene(bool bReset) {
default:
// Trigger pre-load and fade and start countdown
CountOut = COUNTOUT_COUNT;
- FadeOutFast(NULL);
+ FadeOutFast();
if (TinselV2)
_vm->_pcmMusic->startFadeOut(COUNTOUT_COUNT);
break;
diff --git a/engines/toltecs/console.cpp b/engines/toltecs/console.cpp
new file mode 100644
index 0000000000..f3394909ed
--- /dev/null
+++ b/engines/toltecs/console.cpp
@@ -0,0 +1,79 @@
+/* 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 "gui/debugger.h"
+
+#include "toltecs/console.h"
+//#include "toltecs/palette.h"
+#include "toltecs/resource.h"
+//#include "toltecs/sound.h"
+#include "toltecs/toltecs.h"
+
+namespace Toltecs {
+
+Console::Console(ToltecsEngine *vm) : GUI::Debugger(), _vm(vm) {
+ DCmd_Register("room", WRAP_METHOD(Console, Cmd_Room));
+ DCmd_Register("dump", WRAP_METHOD(Console, Cmd_Dump));
+}
+
+Console::~Console() {
+}
+
+bool Console::Cmd_Room(int argc, const char **argv) {
+ if (argc < 2) {
+ DebugPrintf("Current room number is %d\n", _vm->_sceneResIndex);
+#if 0
+ DebugPrintf("Calling this command with the room number changes the room\n");
+ DebugPrintf("WARNING: It's a bad idea to warp to rooms with this, as the room object scripts are not loaded\n");
+#endif
+ return true;
+#if 0
+ } else {
+ int roomNum = atoi(argv[1]);
+
+ // sfClearPaletteFragments
+ _vm->_palette->clearFragments();
+
+ // sfLoadScene
+ _vm->_sound->stopAll();
+ _vm->_res->purgeCache();
+ _vm->loadScene(roomNum);
+#endif
+ }
+
+ return false;
+}
+
+bool Console::Cmd_Dump(int argc, const char **argv) {
+ if (argc < 2) {
+ DebugPrintf("Usage: dump <resource number>\n");
+ return true;
+ }
+
+ int resNum = atoi(argv[1]);
+ _vm->_arc->dump(resNum);
+ DebugPrintf("Resource %d has been dumped to disk\n", resNum);
+
+ return true;
+}
+
+} // End of namespace Toltecs
diff --git a/engines/toltecs/console.h b/engines/toltecs/console.h
new file mode 100644
index 0000000000..bcdfd0cf04
--- /dev/null
+++ b/engines/toltecs/console.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.
+ *
+ */
+
+#ifndef TOLTECS_CONSOLE_H
+#define TOLTECS_CONSOLE_H
+
+#include "gui/debugger.h"
+
+namespace Toltecs {
+
+class ToltecsEngine;
+
+class Console : public GUI::Debugger {
+public:
+ Console(ToltecsEngine *vm);
+ virtual ~Console(void);
+
+private:
+ ToltecsEngine *_vm;
+
+ bool Cmd_Dump(int argc, const char **argv);
+ bool Cmd_Room(int argc, const char **argv);
+};
+
+} // End of namespace Toltecs
+#endif
diff --git a/engines/toltecs/detection.cpp b/engines/toltecs/detection.cpp
index c1a57638c2..788f813762 100644
--- a/engines/toltecs/detection.cpp
+++ b/engines/toltecs/detection.cpp
@@ -24,6 +24,8 @@
#include "base/plugins.h"
#include "engines/advancedDetector.h"
+
+#include "common/translation.h"
#include "common/savefile.h"
#include "common/str-array.h"
#include "common/system.h"
@@ -97,19 +99,6 @@ static const ToltecsGameDescription gameDescriptions[] = {
},
{
- // 3 Skulls of the Toltecs German Demo version
- {
- "toltecs",
- 0,
- AD_ENTRY1s("WESTERN", "1c85e82712d24f1d5c1ea2a66ddd75c2", 47730038),
- Common::DE_DEU,
- Common::kPlatformPC,
- ADGF_NO_FLAGS,
- GUIO1(GUIO_NONE)
- },
- },
-
- {
// 3 Skulls of the Toltecs French version
{
"toltecs",
@@ -149,11 +138,44 @@ static const ToltecsGameDescription gameDescriptions[] = {
},
},
+ {
+ // 3 Skulls of the Toltecs English Demo version
+ {
+ "toltecs",
+ 0,
+ AD_ENTRY1s("WESTERN", "53a0abd1c0bc5cad8ba18f0e56877705", 46241833),
+ Common::EN_ANY,
+ Common::kPlatformPC,
+ ADGF_DEMO,
+ GUIO1(GUIO_NONE)
+ },
+ },
+
+ {
+ // 3 Skulls of the Toltecs German Demo version
+ {
+ "toltecs",
+ 0,
+ AD_ENTRY1s("WESTERN", "1c85e82712d24f1d5c1ea2a66ddd75c2", 47730038),
+ Common::DE_DEU,
+ Common::kPlatformPC,
+ ADGF_DEMO,
+ GUIO1(GUIO_NONE)
+ },
+ },
+
{ AD_TABLE_END_MARKER }
};
} // End of namespace Toltecs
+static const ExtraGuiOption toltecsExtraGuiOption = {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens, instead of the ScummVM ones"),
+ "originalsaveload",
+ false
+};
+
class ToltecsMetaEngine : public AdvancedMetaEngine {
public:
ToltecsMetaEngine() : AdvancedMetaEngine(Toltecs::gameDescriptions, sizeof(Toltecs::ToltecsGameDescription), toltecsGames) {
@@ -170,6 +192,7 @@ public:
virtual bool hasFeature(MetaEngineFeature f) const;
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
+ virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const;
SaveStateList listSaves(const char *target) const;
virtual int getMaximumSaveSlot() const;
void removeSaveState(const char *target, int slot) const;
@@ -202,6 +225,12 @@ bool ToltecsMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADG
return gd != 0;
}
+const ExtraGuiOptions ToltecsMetaEngine::getExtraGuiOptions(const Common::String &target) const {
+ ExtraGuiOptions options;
+ options.push_back(toltecsExtraGuiOption);
+ return options;
+}
+
SaveStateList ToltecsMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
Toltecs::ToltecsEngine::SaveHeader header;
@@ -295,7 +324,7 @@ SaveStateDescriptor ToltecsMetaEngine::querySaveMetaInfos(const char *target, in
}
return SaveStateDescriptor();
-} // End of namespace Toltecs
+} // End of namespace Toltecs
#if PLUGIN_ENABLED_DYNAMIC(TOLTECS)
REGISTER_PLUGIN_DYNAMIC(TOLTECS, PLUGIN_TYPE_ENGINE, ToltecsMetaEngine);
diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp
index 6e23ff988f..b52d7dad82 100644
--- a/engines/toltecs/menu.cpp
+++ b/engines/toltecs/menu.cpp
@@ -22,9 +22,12 @@
*/
#include "audio/mixer.h"
-#include "common/savefile.h"
+#include "common/savefile.h"
#include "common/config-manager.h"
+#include "common/translation.h"
+
+#include "gui/saveload.h"
#include "toltecs/toltecs.h"
#include "toltecs/menu.h"
@@ -41,9 +44,6 @@ MenuSystem::~MenuSystem() {
}
int MenuSystem::run(MenuID menuId) {
-
- //debug("MenuSystem::run()");
-
_background = new Graphics::Surface();
_background->create(640, 400, Graphics::PixelFormat::createFormatCLUT8());
@@ -62,13 +62,12 @@ int MenuSystem::run(MenuID menuId) {
_needRedraw = false;
- // TODO: buildColorTransTable2
_vm->_palette->buildColorTransTable(0, 16, 7);
_vm->_screen->_renderQueue->clear();
// Draw the menu background and frame
_vm->_screen->blastSprite(0x140 + _vm->_cameraX, 0x175 + _vm->_cameraY, 0, 1, 0x4000);
- shadeRect(60, 39, 520, 246, 30, 94);
+ shadeRect(60, 39, 520, 247, 225, 229);
memcpy(_background->pixels, _vm->_screen->_frontScreen, 640 * 400);
@@ -91,7 +90,6 @@ int MenuSystem::run(MenuID menuId) {
}
void MenuSystem::update() {
-
if (_currMenuID != _newMenuID) {
_currMenuID = _newMenuID;
//debug("_currMenuID = %d", _currMenuID);
@@ -103,16 +101,13 @@ void MenuSystem::update() {
if (_needRedraw) {
//_vm->_system->copyRectToScreen(_vm->_screen->_frontScreen + 39 * 640 + 60, 640, 60, 39, 520, 247);
_vm->_system->copyRectToScreen(_vm->_screen->_frontScreen, 640, 0, _top, 640, 400 - _top);
- //debug("redraw");
_needRedraw = false;
}
_vm->_system->delayMillis(5);
-
}
void MenuSystem::handleEvents() {
-
Common::Event event;
Common::EventManager *eventMan = _vm->_system->getEventManager();
while (eventMan->pollEvent(event)) {
@@ -126,18 +121,18 @@ void MenuSystem::handleEvents() {
case Common::EVENT_MOUSEMOVE:
handleMouseMove(event.mouse.x, event.mouse.y);
break;
- case Common::EVENT_LBUTTONDOWN:
+ case Common::EVENT_LBUTTONUP:
handleMouseClick(event.mouse.x, event.mouse.y);
break;
default:
break;
}
}
-
}
void MenuSystem::addClickTextItem(ItemID id, int x, int y, int w, uint fontNum, const char *caption, byte defaultColor, byte activeColor) {
Item item;
+ item.enabled = true;
item.id = id;
item.defaultColor = defaultColor;
item.activeColor = activeColor;
@@ -202,7 +197,7 @@ void MenuSystem::handleKeyDown(const Common::KeyState& kbd) {
ItemID MenuSystem::findItemAt(int x, int y) {
for (Common::Array<Item>::iterator iter = _items.begin(); iter != _items.end(); iter++) {
- if ((*iter).rect.contains(x, y - _top))
+ if ((*iter).enabled && (*iter).rect.contains(x, y - _top))
return (*iter).id;
}
return kItemIdNone;
@@ -220,6 +215,8 @@ void MenuSystem::setItemCaption(Item *item, const char *caption) {
Font font(_vm->_res->load(_vm->_screen->getFontResIndex(item->fontNum))->data);
int width = font.getTextWidth((const byte*)caption);
int height = font.getHeight();
+ if (width & 1)
+ width++;
item->rect = Common::Rect(item->x, item->y - height, item->x + width, item->y);
if (item->w) {
item->rect.translate(item->w - width / 2, 0);
@@ -236,59 +233,87 @@ void MenuSystem::initMenu(MenuID menuID) {
switch (menuID) {
case kMenuIdMain:
- drawString(0, 74, 320, 1, 229, _vm->getSysString(kStrWhatCanIDoForYou));
- addClickTextItem(kItemIdLoad, 0, 115, 320, 0, _vm->getSysString(kStrLoad), 229, 255);
- addClickTextItem(kItemIdSave, 0, 135, 320, 0, _vm->getSysString(kStrSave), 229, 255);
- addClickTextItem(kItemIdToggleText, 0, 165, 320, 0, _vm->getSysString(_vm->_cfgText ? kStrTextOn : kStrTextOff), 229, 255);
- addClickTextItem(kItemIdToggleVoices, 0, 185, 320, 0, _vm->getSysString(_vm->_cfgVoices ? kStrVoicesOn : kStrVoicesOff), 229, 255);
- addClickTextItem(kItemIdVolumesMenu, 0, 215, 320, 0, _vm->getSysString(kStrVolume), 229, 255);
- addClickTextItem(kItemIdPlay, 0, 245, 320, 0, _vm->getSysString(kStrPlay), 229, 255);
- addClickTextItem(kItemIdQuit, 0, 275, 320, 0, _vm->getSysString(kStrQuit), 229, 255);
+ drawString(0, 75, 320, 1, 229, _vm->getSysString(kStrWhatCanIDoForYou));
+ addClickTextItem(kItemIdLoad, 0, 116, 320, 0, _vm->getSysString(kStrLoad), 253, 255);
+ addClickTextItem(kItemIdSave, 0, 136, 320, 0, _vm->getSysString(kStrSave), 253, 255);
+ addClickTextItem(kItemIdToggleText, 0, 166, 320, 0, _vm->getSysString(_vm->_cfgText ? kStrTextOn : kStrTextOff), 253, 255);
+ addClickTextItem(kItemIdToggleVoices, 0, 186, 320, 0, _vm->getSysString(_vm->_cfgVoices ? kStrVoicesOn : kStrVoicesOff), 253, 255);
+ addClickTextItem(kItemIdVolumesMenu, 0, 216, 320, 0, _vm->getSysString(kStrVolume), 253, 255);
+ addClickTextItem(kItemIdPlay, 0, 246, 320, 0, _vm->getSysString(kStrPlay), 253, 255);
+ addClickTextItem(kItemIdQuit, 0, 276, 320, 0, _vm->getSysString(kStrQuit), 253, 255);
break;
case kMenuIdLoad:
- drawString(0, 74, 320, 1, 229, _vm->getSysString(kStrLoadGame));
- addClickTextItem(kItemIdSavegameUp, 0, 155, 545, 1, "^", 255, 253);
- addClickTextItem(kItemIdSavegameDown, 0, 195, 545, 1, "\\", 255, 253);
- addClickTextItem(kItemIdCancel, 0, 275, 320, 0, _vm->getSysString(kStrCancel), 255, 253);
- for (int i = 1; i <= 7; i++) {
- Common::String saveDesc = Common::String::format("SAVEGAME %d", i);
- addClickTextItem((ItemID)(kItemIdSavegame1 + i - 1), 0, 115 + 20 * (i - 1), 300, 0, saveDesc.c_str(), 231, 234);
+ if (ConfMan.getBool("originalsaveload")) {
+ shadeRect(80, 92, 440, 141, 226, 225);
+ drawString(0, 75, 320, 1, 229, _vm->getSysString(kStrLoadGame));
+ addClickTextItem(kItemIdSavegameUp, 0, 156, 545, 1, "^", 253, 255);
+ addClickTextItem(kItemIdSavegameDown, 0, 196, 545, 1, "\\", 253, 255);
+ addClickTextItem(kItemIdCancel, 0, 276, 320, 0, _vm->getSysString(kStrCancel), 253, 255);
+ for (int i = 1; i <= 7; i++) {
+ Common::String saveDesc = Common::String::format("SAVEGAME %d", i);
+ addClickTextItem((ItemID)(kItemIdSavegame1 + i - 1), 0, 116 + 20 * (i - 1), 300, 0, saveDesc.c_str(), 231, 234);
+ }
+ loadSavegamesList();
+ setSavegameCaptions(true);
+ } else {
+ GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
+ int slot = dialog->runModalWithCurrentTarget();
+ delete dialog;
+
+ if (slot >= 0)
+ _vm->requestLoadgame(slot);
+
+ _running = false;
}
- loadSavegamesList();
- setSavegameCaptions();
break;
case kMenuIdSave:
- drawString(0, 74, 320, 1, 229, _vm->getSysString(kStrSaveGame));
- addClickTextItem(kItemIdSavegameUp, 0, 155, 545, 1, "^", 255, 253);
- addClickTextItem(kItemIdSavegameDown, 0, 195, 545, 1, "\\", 255, 253);
- addClickTextItem(kItemIdCancel, 0, 275, 320, 0, _vm->getSysString(kStrCancel), 255, 253);
- for (int i = 1; i <= 7; i++) {
- Common::String saveDesc = Common::String::format("SAVEGAME %d", i);
- addClickTextItem((ItemID)(kItemIdSavegame1 + i - 1), 0, 115 + 20 * (i - 1), 300, 0, saveDesc.c_str(), 231, 234);
+ if (ConfMan.getBool("originalsaveload")) {
+ shadeRect(80, 92, 440, 141, 226, 225);
+ drawString(0, 75, 320, 1, 229, _vm->getSysString(kStrSaveGame));
+ addClickTextItem(kItemIdSavegameUp, 0, 156, 545, 1, "^", 253, 255);
+ addClickTextItem(kItemIdSavegameDown, 0, 196, 545, 1, "\\", 253, 255);
+ addClickTextItem(kItemIdCancel, 0, 276, 320, 0, _vm->getSysString(kStrCancel), 253, 255);
+ for (int i = 1; i <= 7; i++) {
+ Common::String saveDesc = Common::String::format("SAVEGAME %d", i);
+ addClickTextItem((ItemID)(kItemIdSavegame1 + i - 1), 0, 116 + 20 * (i - 1), 300, 0, saveDesc.c_str(), 231, 234);
+ }
+ newSlotNum = loadSavegamesList() + 1;
+ _savegames.push_back(SavegameItem(newSlotNum, Common::String::format("GAME %04d", _savegames.size())));
+ setSavegameCaptions(true);
+ } else {
+ GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
+ int slot = dialog->runModalWithCurrentTarget();
+ Common::String desc = dialog->getResultString();
+ if (desc.empty()) {
+ // Create our own description for the saved game, the user didn't enter one
+ desc = dialog->createDefaultSaveDescription(slot);
+ }
+
+ if (slot >= 0)
+ _vm->requestSavegame(slot, desc);
+
+ _running = false;
}
- newSlotNum = loadSavegamesList() + 1;
- _savegames.push_back(SavegameItem(newSlotNum, Common::String::format("GAME %03d", _savegames.size() + 1)));
- setSavegameCaptions();
break;
case kMenuIdVolumes:
- drawString(0, 74, 320, 1, 229, _vm->getSysString(kStrAdjustVolume));
- drawString(0, 130, 200, 0, 246, _vm->getSysString(kStrMaster));
- drawString(0, 155, 200, 0, 244, _vm->getSysString(kStrVoices));
- drawString(0, 180, 200, 0, 244, _vm->getSysString(kStrMusic));
- drawString(0, 205, 200, 0, 244, _vm->getSysString(kStrSoundFx));
- drawString(0, 230, 200, 0, 244, _vm->getSysString(kStrBackground));
- addClickTextItem(kItemIdDone, 0, 275, 200, 0, _vm->getSysString(kStrDone), 229, 253);
- addClickTextItem(kItemIdCancel, 0, 275, 440, 0, _vm->getSysString(kStrCancel), 229, 253);
- addClickTextItem(kItemIdMasterDown, 0, 130 + 25 * 0, 348, 1, "[", 229, 253);
- addClickTextItem(kItemIdVoicesDown, 0, 130 + 25 * 1, 348, 1, "[", 229, 253);
- addClickTextItem(kItemIdMusicDown, 0, 130 + 25 * 2, 348, 1, "[", 229, 253);
- addClickTextItem(kItemIdSoundFXDown, 0, 130 + 25 * 3, 348, 1, "[", 229, 253);
- addClickTextItem(kItemIdBackgroundDown, 0, 130 + 25 * 4, 348, 1, "[", 229, 253);
- addClickTextItem(kItemIdMasterUp, 0, 130 + 25 * 0, 372, 1, "]", 229, 253);
- addClickTextItem(kItemIdVoicesUp, 0, 130 + 25 * 1, 372, 1, "]", 229, 253);
- addClickTextItem(kItemIdMusicUp, 0, 130 + 25 * 2, 372, 1, "]", 229, 253);
- addClickTextItem(kItemIdSoundFXUp, 0, 130 + 25 * 3, 372, 1, "]", 229, 253);
- addClickTextItem(kItemIdBackgroundUp, 0, 130 + 25 * 4, 372, 1, "]", 229, 253);
+ drawString(0, 75, 320, 1, 229, _vm->getSysString(kStrAdjustVolume));
+ drawString(0, 131, 200, 0, 246, _vm->getSysString(kStrMaster));
+ drawString(0, 156, 200, 0, 244, _vm->getSysString(kStrVoices));
+ drawString(0, 181, 200, 0, 244, _vm->getSysString(kStrMusic));
+ drawString(0, 206, 200, 0, 244, _vm->getSysString(kStrSoundFx));
+ drawString(0, 231, 200, 0, 244, _vm->getSysString(kStrBackground));
+ addClickTextItem(kItemIdDone, 0, 276, 200, 0, _vm->getSysString(kStrDone), 253, 255);
+ addClickTextItem(kItemIdCancel, 0, 276, 440, 0, _vm->getSysString(kStrCancel), 253, 255);
+ addClickTextItem(kItemIdMasterDown, 0, 131 + 25 * 0, 348, 1, "[", 243, 246);
+ addClickTextItem(kItemIdVoicesDown, 0, 131 + 25 * 1, 348, 1, "[", 243, 246);
+ addClickTextItem(kItemIdMusicDown, 0, 131 + 25 * 2, 348, 1, "[", 243, 246);
+ addClickTextItem(kItemIdSoundFXDown, 0, 131 + 25 * 3, 348, 1, "[", 243, 246);
+ addClickTextItem(kItemIdBackgroundDown, 0, 131 + 25 * 4, 348, 1, "[", 243, 246);
+ addClickTextItem(kItemIdMasterUp, 0, 131 + 25 * 0, 372, 1, "]", 243, 246);
+ addClickTextItem(kItemIdVoicesUp, 0, 131 + 25 * 1, 372, 1, "]", 243, 246);
+ addClickTextItem(kItemIdMusicUp, 0, 131 + 25 * 2, 372, 1, "]", 243, 246);
+ addClickTextItem(kItemIdSoundFXUp, 0, 131 + 25 * 3, 372, 1, "]", 243, 246);
+ addClickTextItem(kItemIdBackgroundUp, 0, 131 + 25 * 4, 372, 1, "]", 243, 246);
drawVolumeBar(kItemIdMaster);
drawVolumeBar(kItemIdVoices);
drawVolumeBar(kItemIdMusic);
@@ -300,9 +325,36 @@ void MenuSystem::initMenu(MenuID menuID) {
}
for (Common::Array<Item>::iterator iter = _items.begin(); iter != _items.end(); iter++) {
- drawItem((*iter).id, false);
+ if ((*iter).enabled)
+ drawItem((*iter).id, false);
}
+ // Check if the mouse is already over an item
+ _currItemID = kItemIdNone;
+ Common::Point mousePos = _vm->_system->getEventManager()->getMousePos();
+ handleMouseMove(mousePos.x, mousePos.y);
+}
+
+void MenuSystem::enableItem(ItemID id) {
+ Item *item = getItem(id);
+ if (item) {
+ item->enabled = true;
+ drawItem(id, false);
+ _currItemID = kItemIdNone;
+ Common::Point mousePos = _vm->_system->getEventManager()->getMousePos();
+ handleMouseMove(mousePos.x, mousePos.y);
+ }
+}
+
+void MenuSystem::disableItem(ItemID id) {
+ Item *item = getItem(id);
+ if (item) {
+ item->enabled = false;
+ restoreRect(item->rect.left, item->rect.top, item->rect.width(), item->rect.height());
+ if (_currItemID == id) {
+ _currItemID = kItemIdNone;
+ }
+ }
}
void MenuSystem::enterItem(ItemID id) {
@@ -433,14 +485,16 @@ void MenuSystem::drawString(int16 x, int16 y, int w, uint fontNum, byte color, c
fontNum = _vm->_screen->getFontResIndex(fontNum);
Font font(_vm->_res->load(fontNum)->data);
if (w) {
- x = x + w - font.getTextWidth((const byte*)text) / 2;
+ int width = font.getTextWidth((const byte*)text);
+ if (width & 1)
+ width++;
+ x = x + w - width / 2;
}
_vm->_screen->drawString(x, y - font.getHeight(), color, fontNum, (const byte*)text, -1, NULL, true);
_needRedraw = true;
}
int MenuSystem::loadSavegamesList() {
-
int maxSlotNum = -1;
_savegameListTopIndex = 0;
@@ -483,17 +537,32 @@ MenuSystem::SavegameItem *MenuSystem::getSavegameItemByID(ItemID id) {
return NULL;
}
-void MenuSystem::setSavegameCaptions() {
- uint index = _savegameListTopIndex;
+void MenuSystem::setSavegameCaptions(bool scrollToBottom) {
+ int size = _savegames.size();
+ if (scrollToBottom && size > 0) {
+ while (_savegameListTopIndex + 7 <= size)
+ _savegameListTopIndex += 6;
+ }
+ int index = _savegameListTopIndex;
for (int i = 1; i <= 7; i++)
- setItemCaption(getItem((ItemID)(kItemIdSavegame1 + i - 1)), index < _savegames.size() ? _savegames[index++]._description.c_str() : "");
+ setItemCaption(getItem((ItemID)(kItemIdSavegame1 + i - 1)), index < size ? _savegames[index++]._description.c_str() : "");
+ if (_savegameListTopIndex == 0) {
+ disableItem(kItemIdSavegameUp);
+ } else {
+ enableItem(kItemIdSavegameUp);
+ }
+ if (_savegameListTopIndex + 7 > size) {
+ disableItem(kItemIdSavegameDown);
+ } else {
+ enableItem(kItemIdSavegameDown);
+ }
}
void MenuSystem::scrollSavegames(int delta) {
int newPos = CLIP<int>(_savegameListTopIndex + delta, 0, _savegames.size() - 1);
_savegameListTopIndex = newPos;
restoreRect(80, 92, 440, 140);
- setSavegameCaptions();
+ setSavegameCaptions(false);
for (int i = 1; i <= 7; i++)
drawItem((ItemID)(kItemIdSavegame1 + i - 1), false);
}
@@ -574,7 +643,6 @@ void MenuSystem::drawVolumeBar(ItemID itemID) {
text[volume] = 0;
drawString(0, y, w, 0, 246, text);
-
}
void MenuSystem::changeVolumeBar(ItemID itemID, int delta) {
diff --git a/engines/toltecs/menu.h b/engines/toltecs/menu.h
index a72205c2e5..a5eca7c8ff 100644
--- a/engines/toltecs/menu.h
+++ b/engines/toltecs/menu.h
@@ -84,6 +84,7 @@ public:
protected:
struct Item {
+ bool enabled;
Common::Rect rect;
ItemID id;
Common::String caption;
@@ -130,6 +131,9 @@ protected:
void initMenu(MenuID menuID);
+ void enableItem(ItemID id);
+ void disableItem(ItemID id);
+
void enterItem(ItemID id);
void leaveItem(ItemID id);
void clickItem(ItemID id);
@@ -141,7 +145,7 @@ protected:
SavegameItem *getSavegameItemByID(ItemID id);
int loadSavegamesList();
- void setSavegameCaptions();
+ void setSavegameCaptions(bool scrollToBottom);
void scrollSavegames(int delta);
void clickSavegameItem(ItemID id);
void setCfgText(bool value, bool active);
diff --git a/engines/toltecs/module.mk b/engines/toltecs/module.mk
index aa4a6f376b..0de1eef733 100644
--- a/engines/toltecs/module.mk
+++ b/engines/toltecs/module.mk
@@ -2,6 +2,7 @@ MODULE := engines/toltecs
MODULE_OBJS = \
animation.o \
+ console.o \
detection.o \
menu.o \
microtiles.o \
diff --git a/engines/toltecs/movie.cpp b/engines/toltecs/movie.cpp
index 35accb5d93..8bc00511e9 100644
--- a/engines/toltecs/movie.cpp
+++ b/engines/toltecs/movie.cpp
@@ -45,14 +45,13 @@ enum ChunkTypes {
kChunkStopSubtitles = 8
};
-MoviePlayer::MoviePlayer(ToltecsEngine *vm) : _vm(vm) {
+MoviePlayer::MoviePlayer(ToltecsEngine *vm) : _vm(vm), _isPlaying(false) {
}
MoviePlayer::~MoviePlayer() {
}
void MoviePlayer::playMovie(uint resIndex) {
-
const uint32 subtitleSlot = kMaxScriptSlots - 1;
int16 savedSceneWidth = _vm->_sceneWidth;
int16 savedSceneHeight = _vm->_sceneHeight;
@@ -62,6 +61,7 @@ void MoviePlayer::playMovie(uint resIndex) {
int16 savedGuiHeight = _vm->_guiHeight;
byte moviePalette[768];
+ _isPlaying = true;
_vm->_isSaveAllowed = false;
memset(moviePalette, 0, sizeof(moviePalette));
@@ -99,15 +99,16 @@ void MoviePlayer::playMovie(uint resIndex) {
byte *chunkBuffer = NULL;
uint32 chunkBufferSize = 0;
uint32 frame = 0;
+ bool abortMovie = false;
- while (_chunkCount--) {
+ while (_chunkCount-- && !abortMovie) {
byte chunkType = _vm->_arc->readByte();
uint32 chunkSize = _vm->_arc->readUint32LE();
debug(0, "chunkType = %d; chunkSize = %d", chunkType, chunkSize);
// Skip audio chunks - we've already queued them in
- // fetchAudioChunks() above
+ // fetchAudioChunks()
if (chunkType == kChunkAudio) {
_vm->_arc->skip(chunkSize);
} else {
@@ -136,7 +137,8 @@ void MoviePlayer::playMovie(uint resIndex) {
if (_vm->_screen->_shakeActive && _vm->_screen->updateShakeScreen()) {
_vm->_screen->_fullRefresh = true;
}
- _vm->updateInput();
+ if (!handleInput())
+ abortMovie = true;
_vm->drawScreen();
// Note: drawScreen() calls delayMillis()
}
@@ -153,10 +155,11 @@ void MoviePlayer::playMovie(uint resIndex) {
// Already processed
break;
case kChunkShowSubtitle:
- if (_vm->_cfgText) {
- memcpy(_vm->_script->getSlotData(subtitleSlot), chunkBuffer, chunkSize);
- _vm->_screen->updateTalkText(subtitleSlot, 0);
- }
+ memcpy(_vm->_script->getSlotData(subtitleSlot), chunkBuffer, chunkSize);
+ // The last character of the subtitle determines if it should
+ // always be displayed or not. If it's 0xFF, it should always be
+ // displayed, otherwise, if it's 0xFE, it can be toggled.
+ _vm->_screen->updateTalkText(subtitleSlot, 0, (chunkBuffer[chunkSize - 1] == 0xFF));
break;
case kChunkShakeScreen: // start/stop shakescreen effect
if (chunkBuffer[0] == 0xFF)
@@ -180,7 +183,7 @@ void MoviePlayer::playMovie(uint resIndex) {
}
if (!handleInput())
- break;
+ abortMovie = true;
}
delete[] chunkBuffer;
@@ -200,10 +203,10 @@ void MoviePlayer::playMovie(uint resIndex) {
_vm->_guiHeight = savedGuiHeight;
_vm->_isSaveAllowed = true;
+ _isPlaying = false;
}
void MoviePlayer::fetchAudioChunks() {
-
uint32 startOfs = _vm->_arc->pos();
uint32 chunkCount = _chunkCount;
uint prefetchChunkCount = 0;
@@ -214,7 +217,7 @@ void MoviePlayer::fetchAudioChunks() {
while (chunkCount-- && prefetchChunkCount < _framesPerSoundChunk / 2) {
byte chunkType = _vm->_arc->readByte();
uint32 chunkSize = _vm->_arc->readUint32LE();
- if (chunkType == 4) {
+ if (chunkType == kChunkAudio) {
byte *chunkBuffer = (byte *)malloc(chunkSize);
_vm->_arc->read(chunkBuffer, chunkSize);
_audioStream->queueBuffer(chunkBuffer, chunkSize, DisposeAfterUse::YES, Audio::FLAG_UNSIGNED);
@@ -229,7 +232,6 @@ void MoviePlayer::fetchAudioChunks() {
_lastPrefetchOfs = _vm->_arc->pos();
_vm->_arc->seek(startOfs, SEEK_SET);
-
}
void MoviePlayer::unpackPalette(byte *source, byte *dest, int elemCount, int elemSize) {
@@ -249,10 +251,12 @@ void MoviePlayer::unpackPalette(byte *source, byte *dest, int elemCount, int ele
}
void MoviePlayer::unpackRle(byte *source, byte *dest) {
- int size = 256000;
+ int size = 256000; // 640x400
+ //int packedSize = 0;
while (size > 0) {
byte a = *source++;
byte b = *source++;
+ //packedSize += 2;
if (a == 0) {
dest += b;
size -= b;
@@ -262,6 +266,7 @@ void MoviePlayer::unpackRle(byte *source, byte *dest) {
size -= a;
}
}
+ //debug("Packed RLE size: %d", packedSize);
}
bool MoviePlayer::handleInput() {
@@ -272,12 +277,15 @@ bool MoviePlayer::handleInput() {
case Common::EVENT_KEYDOWN:
if (event.kbd.keycode == Common::KEYCODE_ESCAPE)
return false;
+ if (event.kbd.keycode == Common::KEYCODE_F10) {
+ // TODO: The original would bring up a stripped down
+ // main menu dialog, without the save/restore options.
+ }
break;
case Common::EVENT_LBUTTONDOWN:
case Common::EVENT_RBUTTONDOWN:
return false;
case Common::EVENT_QUIT:
- _vm->quitGame();
return false;
default:
break;
diff --git a/engines/toltecs/movie.h b/engines/toltecs/movie.h
index 8fa48975d7..c1ed6d7ba0 100644
--- a/engines/toltecs/movie.h
+++ b/engines/toltecs/movie.h
@@ -37,11 +37,15 @@ public:
void playMovie(uint resIndex);
+ bool isPlaying() { return _isPlaying; }
+
protected:
ToltecsEngine *_vm;
Audio::QueuingAudioStream *_audioStream;
Audio::SoundHandle _audioStreamHandle;
+ bool _isPlaying;
+
uint32 _chunkCount, _frameCount, _lastPrefetchOfs;
uint32 _soundChunkFramesLeft, _framesPerSoundChunk;
diff --git a/engines/toltecs/palette.cpp b/engines/toltecs/palette.cpp
index 74683c6d7a..b93bb8b510 100644
--- a/engines/toltecs/palette.cpp
+++ b/engines/toltecs/palette.cpp
@@ -32,6 +32,8 @@ namespace Toltecs {
Palette::Palette(ToltecsEngine *vm) : _vm(vm) {
clearFragments();
+ memset(_mainPalette, 0, sizeof(_mainPalette));
+ memset(_animPalette, 0, sizeof(_animPalette));
memset(_colorTransTable, 0, sizeof(_colorTransTable));
}
@@ -138,52 +140,48 @@ void Palette::clearFragments() {
_fragments.clear();
}
+byte Palette::getMatchingColor(byte r, byte g, byte b) {
+ int bestIndex = 0;
+ uint16 bestMatch = 0xFFFF;
+
+ for (int j = 0; j < 256; j++) {
+ byte distance = ABS(_mainPalette[j * 3 + 0] - r) + ABS(_mainPalette[j * 3 + 1] - g) + ABS(_mainPalette[j * 3 + 2] - b);
+ byte maxColor = MAX(_mainPalette[j * 3 + 0], MAX(_mainPalette[j * 3 + 1], _mainPalette[j * 3 + 2]));
+ uint16 match = (distance << 8) | maxColor;
+ if (match < bestMatch) {
+ bestMatch = match;
+ bestIndex = j;
+ }
+ }
+
+ return bestIndex;
+}
+
void Palette::buildColorTransTable(byte limit, int8 deltaValue, byte mask) {
byte r = 0, g = 0, b = 0;
mask &= 7;
- for (int i = 0; i < 256; i++) {
-
- if (deltaValue < 0) {
- // TODO (probably unused)
- warning("Palette::buildColorTransTable(%d, %d, %02X) not yet implemented!", limit, deltaValue, mask);
- } else {
- r = _mainPalette[i * 3 + 0];
- g = _mainPalette[i * 3 + 1];
- b = _mainPalette[i * 3 + 2];
- if (MAX(r, MAX(b, g)) >= limit) {
- if ((mask & 1) && r >= deltaValue)
- r -= deltaValue;
- if ((mask & 2) && g >= deltaValue)
- g -= deltaValue;
- if ((mask & 4) && b >= deltaValue)
- b -= deltaValue;
- }
- }
+ if (deltaValue < 0) // unused
+ error("buildColorTransTable called with a negative delta value(limit %d, delta %d, mask %02X)", limit, deltaValue, mask);
- int bestIndex = 0;
- uint16 bestMatch = 0xFFFF;
-
- for (int j = 0; j < 256; j++) {
- byte distance = ABS(_mainPalette[j * 3 + 0] - r) + ABS(_mainPalette[j * 3 + 1] - g) + ABS(_mainPalette[j * 3 + 2] - b);
- byte maxColor = MAX(_mainPalette[j * 3 + 0], MAX(_mainPalette[j * 3 + 1], _mainPalette[j * 3 + 2]));
- uint16 match = (distance << 8) | maxColor;
- if (match < bestMatch) {
- bestMatch = match;
- bestIndex = j;
- }
+ for (int i = 0; i < 256; i++) {
+ r = _mainPalette[i * 3 + 0];
+ g = _mainPalette[i * 3 + 1];
+ b = _mainPalette[i * 3 + 2];
+ if (MAX(r, MAX(b, g)) >= limit) {
+ if ((mask & 1) && r >= deltaValue)
+ r -= deltaValue;
+ if ((mask & 2) && g >= deltaValue)
+ g -= deltaValue;
+ if ((mask & 4) && b >= deltaValue)
+ b -= deltaValue;
}
- _colorTransTable[i] = bestIndex;
-
+ _colorTransTable[i] = getMatchingColor(r, g, b);
}
}
-void Palette::buildColorTransTable2(byte limit, int8 deltaValue, byte mask) {
- // TODO
-}
-
void Palette::saveState(Common::WriteStream *out) {
// Save currently active palette
byte palette[768];
diff --git a/engines/toltecs/palette.h b/engines/toltecs/palette.h
index 570f51777e..4777a82699 100644
--- a/engines/toltecs/palette.h
+++ b/engines/toltecs/palette.h
@@ -50,8 +50,8 @@ public:
uint16 findFragment(int16 id);
void clearFragments();
+ byte getMatchingColor(byte r, byte g, byte b);
void buildColorTransTable(byte limit, int8 deltaValue, byte mask);
- void buildColorTransTable2(byte limit, int8 deltaValue, byte mask);
byte getColorTransPixel(byte pixel) const { return _colorTransTable[pixel]; }
byte *getMainPalette() { return _mainPalette; }
diff --git a/engines/toltecs/resource.cpp b/engines/toltecs/resource.cpp
index 0b9f7c8fcd..d66075004b 100644
--- a/engines/toltecs/resource.cpp
+++ b/engines/toltecs/resource.cpp
@@ -61,16 +61,11 @@ uint32 ArchiveReader::getResourceSize(uint resIndex) {
return _offsets[resIndex + 1] - _offsets[resIndex];
}
-void ArchiveReader::dump(uint resIndex, const char *prefix) {
+void ArchiveReader::dump(uint resIndex) {
int32 resourceSize = getResourceSize(resIndex);
byte *data = new byte[resourceSize];
- Common::String fn;
-
- if (prefix)
- fn = Common::String::format("%s_%04X.0", prefix, resIndex);
- else
- fn = Common::String::format("%04X.0", resIndex);
+ Common::String fn = Common::String::format("toltecs_res.%03d", resIndex);
openResource(resIndex);
read(data, resourceSize);
@@ -112,11 +107,13 @@ Resource *ResourceCache::load(uint resIndex) {
} else {
debug(1, "ResourceCache::load(%d) From disk", resIndex);
+ int32 curPos = _vm->_arc->pos();
Resource *resItem = new Resource();
resItem->size = _vm->_arc->openResource(resIndex);
resItem->data = new byte[resItem->size];
_vm->_arc->read(resItem->data, resItem->size);
_vm->_arc->closeResource();
+ _vm->_arc->seek(curPos);
_cache[resIndex] = resItem;
diff --git a/engines/toltecs/resource.h b/engines/toltecs/resource.h
index 3fed2e11ca..3d45d9fb1b 100644
--- a/engines/toltecs/resource.h
+++ b/engines/toltecs/resource.h
@@ -50,7 +50,7 @@ public:
// Returns the size of the resource
uint32 getResourceSize(uint resIndex);
- void dump(uint resIndex, const char *prefix = NULL);
+ void dump(uint resIndex);
protected:
uint32 *_offsets;
diff --git a/engines/toltecs/screen.cpp b/engines/toltecs/screen.cpp
index c8d6740b02..1cd2373b43 100644
--- a/engines/toltecs/screen.cpp
+++ b/engines/toltecs/screen.cpp
@@ -33,7 +33,6 @@
namespace Toltecs {
Screen::Screen(ToltecsEngine *vm) : _vm(vm) {
-
_frontScreen = new byte[268800];
_backScreen = new byte[870400];
@@ -68,16 +67,13 @@ Screen::Screen(ToltecsEngine *vm) : _vm(vm) {
_renderQueue = new RenderQueue(_vm);
_fullRefresh = false;
_guiRefresh = false;
-
}
Screen::~Screen() {
-
delete[] _frontScreen;
delete[] _backScreen;
delete _renderQueue;
-
}
void Screen::unpackRle(byte *source, byte *dest, uint16 width, uint16 height) {
@@ -120,7 +116,6 @@ void Screen::loadMouseCursor(uint resIndex) {
}
void Screen::drawGuiImage(int16 x, int16 y, uint resIndex) {
-
byte *imageData = _vm->_res->load(resIndex)->data;
int16 headerSize = READ_LE_UINT16(imageData);
int16 width = imageData[2];
@@ -153,7 +148,6 @@ void Screen::drawGuiImage(int16 x, int16 y, uint resIndex) {
}
_guiRefresh = true;
-
}
void Screen::startShakeScreen(int16 shakeCounter) {
@@ -185,7 +179,6 @@ bool Screen::updateShakeScreen() {
}
void Screen::addStaticSprite(byte *spriteItem) {
-
DrawRequest drawRequest;
memset(&drawRequest, 0, sizeof(drawRequest));
@@ -200,11 +193,9 @@ void Screen::addStaticSprite(byte *spriteItem) {
debug(0, "Screen::addStaticSprite() x = %d; y = %d; baseColor = %d; resIndex = %d; flags = %04X", drawRequest.x, drawRequest.y, drawRequest.baseColor, drawRequest.resIndex, drawRequest.flags);
addDrawRequest(drawRequest);
-
}
void Screen::addAnimatedSprite(int16 x, int16 y, int16 fragmentId, byte *data, int16 *spriteArray, bool loop, int mode) {
-
//debug(0, "Screen::addAnimatedSprite(%d, %d, %d)", x, y, fragmentId);
DrawRequest drawRequest;
@@ -257,9 +248,7 @@ void Screen::addAnimatedSprite(int16 x, int16 y, int16 fragmentId, byte *data, i
WRITE_LE_UINT16(spriteItem + 0, loopNum);
WRITE_LE_UINT16(spriteItem + 4, frameNum);
-
}
-
}
void Screen::clearSprites() {
@@ -267,7 +256,6 @@ void Screen::clearSprites() {
}
void Screen::blastSprite(int16 x, int16 y, int16 fragmentId, int16 resIndex, uint16 flags) {
-
DrawRequest drawRequest;
SpriteDrawItem sprite;
@@ -283,11 +271,9 @@ void Screen::blastSprite(int16 x, int16 y, int16 fragmentId, int16 resIndex, uin
sprite.y -= _vm->_cameraY;
drawSprite(sprite);
}
-
}
void Screen::updateVerbLine(int16 slotIndex, int16 slotOffset) {
-
debug(0, "Screen::updateVerbLine() _verbLineNum = %d; _verbLineX = %d; _verbLineY = %d; _verbLineWidth = %d; _verbLineCount = %d",
_verbLineNum, _verbLineX, _verbLineY, _verbLineWidth, _verbLineCount);
@@ -339,7 +325,7 @@ void Screen::updateVerbLine(int16 slotIndex, int16 slotOffset) {
wrapState.len1 -= len;
wrapState.len2 = len + 1;
- drawGuiText(_verbLineX - 1 - (wrapState.width / 2), y, 0xF9, 0xFF, _fontResIndexArray[0], wrapState);
+ drawGuiText(_verbLineX - 1 - (wrapState.width / 2), y - 1, 0xF9, 0xFF, _fontResIndexArray[0], wrapState);
wrapState.destString = wrapState.textBuffer;
wrapState.width = 0;
@@ -354,14 +340,12 @@ void Screen::updateVerbLine(int16 slotIndex, int16 slotOffset) {
wrapState.len1 -= len;
wrapState.len2 = len;
- drawGuiText(_verbLineX - 1 - (wrapState.width / 2), y, 0xF9, 0xFF, _fontResIndexArray[0], wrapState);
+ drawGuiText(_verbLineX - 1 - (wrapState.width / 2), y - 1, 0xF9, 0xFF, _fontResIndexArray[0], wrapState);
_guiRefresh = true;
-
}
-void Screen::updateTalkText(int16 slotIndex, int16 slotOffset) {
-
+void Screen::updateTalkText(int16 slotIndex, int16 slotOffset, bool alwaysDisplayed) {
int16 x, y, maxWidth, width, length;
byte durationModifier = 1;
byte *textData = _vm->_script->getSlotData(slotIndex) + slotOffset;
@@ -370,6 +354,7 @@ void Screen::updateTalkText(int16 slotIndex, int16 slotOffset) {
item->fontNum = 0;
item->color = _talkTextFontColor;
+ item->alwaysDisplayed = alwaysDisplayed;
x = CLIP<int16>(_talkTextX - _vm->_cameraX, 120, _talkTextMaxWidth);
y = CLIP<int16>(_talkTextY - _vm->_cameraY, 4, _vm->_cameraHeight - 16);
@@ -455,11 +440,9 @@ void Screen::updateTalkText(int16 slotIndex, int16 slotOffset) {
textDurationMultiplier += 100;
}
item->duration = 4 * textDurationMultiplier * durationModifier;
-
}
void Screen::addTalkTextRect(Font &font, int16 x, int16 &y, int16 length, int16 width, TalkTextItem *item) {
-
if (width > 0) {
TextRect *textRect = &item->lines[item->lineCount];
width = width + 1 - font.getSpacing();
@@ -472,7 +455,6 @@ void Screen::addTalkTextRect(Font &font, int16 x, int16 &y, int16 length, int16
}
y += font.getHeight() - 1;
-
}
void Screen::addTalkTextItemsToRenderQueue() {
@@ -488,7 +470,7 @@ void Screen::addTalkTextItemsToRenderQueue() {
if (item->duration < 0)
item->duration = 0;
- if (!_vm->_cfgText)
+ if (!_vm->_cfgText && !item->alwaysDisplayed)
return;
for (byte j = 0; j < item->lineCount; j++) {
@@ -499,10 +481,27 @@ void Screen::addTalkTextItemsToRenderQueue() {
}
}
+bool Screen::isTalkTextActive(int16 slotIndex) {
+ for (int16 i = 0; i <= _talkTextItemNum; i++) {
+ if (_talkTextItems[i].slotIndex == slotIndex && _talkTextItems[i].duration > 0)
+ return true;
+ }
+
+ return false;
+}
+
int16 Screen::getTalkTextDuration() {
return _talkTextItems[_talkTextItemNum].duration;
}
+void Screen::finishTalkTextItem(int16 slotIndex) {
+ for (int16 i = 0; i <= _talkTextItemNum; i++) {
+ if (_talkTextItems[i].slotIndex == slotIndex) {
+ _talkTextItems[i].duration = 0;
+ }
+ }
+}
+
void Screen::finishTalkTextItems() {
for (int16 i = 0; i <= _talkTextItemNum; i++) {
_talkTextItems[i].duration = 0;
@@ -524,7 +523,6 @@ void Screen::registerFont(uint fontIndex, uint resIndex) {
}
void Screen::drawGuiTextMulti(byte *textData) {
-
int16 x = 0, y = 0;
// Really strange stuff.
@@ -554,12 +552,11 @@ void Screen::drawGuiTextMulti(byte *textData) {
wrapState.width = 0;
wrapState.len1 = 0;
wrapState.len2 = wrapGuiText(_fontResIndexArray[1], 640, wrapState);
- drawGuiText(x - wrapState.width / 2, y, _fontColor1, _fontColor2, _fontResIndexArray[1], wrapState);
+ drawGuiText(x - wrapState.width / 2, y - 1, _fontColor1, _fontColor2, _fontResIndexArray[1], wrapState);
}
} while (*wrapState.sourceString != 0xFF);
_guiRefresh = true;
-
}
int16 Screen::wrapGuiText(uint fontResIndex, int maxWidth, GuiTextWrapState &wrapState) {
@@ -582,7 +579,6 @@ int16 Screen::wrapGuiText(uint fontResIndex, int maxWidth, GuiTextWrapState &wra
}
return len;
-
}
void Screen::drawGuiText(int16 x, int16 y, byte fontColor1, byte fontColor2, uint fontResIndex, GuiTextWrapState &wrapState) {
@@ -593,11 +589,9 @@ void Screen::drawGuiText(int16 x, int16 y, byte fontColor1, byte fontColor2, uin
x = drawString(x + 1, y + _vm->_cameraHeight, fontColor1, fontResIndex, wrapState.textBuffer, wrapState.len1, &ywobble, false);
x = drawString(x, y + _vm->_cameraHeight, fontColor2, fontResIndex, wrapState.textBuffer + wrapState.len1, wrapState.len2, &ywobble, false);
-
}
int16 Screen::drawString(int16 x, int16 y, byte color, uint fontResIndex, const byte *text, int len, int16 *ywobble, bool outline) {
-
//debug(0, "Screen::drawString(%d, %d, %d, %d)", x, y, color, fontResIndex);
Font font(_vm->_res->load(fontResIndex)->data);
@@ -614,7 +608,7 @@ int16 Screen::drawString(int16 x, int16 y, byte color, uint fontResIndex, const
if (ch <= 0x20) {
x += font.getWidth();
} else {
- drawChar(font, _frontScreen, x, y - yadd, ch, color, outline);
+ drawChar(font, _frontScreen, x, y + yadd, ch, color, outline);
x += font.getCharWidth(ch) + font.getSpacing() - 1;
yadd = -yadd;
}
@@ -624,11 +618,9 @@ int16 Screen::drawString(int16 x, int16 y, byte color, uint fontResIndex, const
*ywobble = yadd;
return x;
-
}
void Screen::drawChar(const Font &font, byte *dest, int16 x, int16 y, byte ch, byte color, bool outline) {
-
int16 charWidth, charHeight;
byte *charData;
@@ -657,11 +649,9 @@ void Screen::drawChar(const Font &font, byte *dest, int16 x, int16 y, byte ch, b
}
dest += 640 - charWidth;
}
-
}
void Screen::drawSurface(int16 x, int16 y, Graphics::Surface *surface) {
-
int16 skipX = 0;
int16 width = surface->w;
int16 height = surface->h;
@@ -706,11 +696,9 @@ void Screen::drawSurface(int16 x, int16 y, Graphics::Surface *surface) {
frontScreen += 640 - width;
surfacePixels += surface->w - width - skipX;
}
-
}
void Screen::saveState(Common::WriteStream *out) {
-
// Save verb line
out->writeUint16LE(_verbLineNum);
out->writeUint16LE(_verbLineX);
@@ -757,11 +745,9 @@ void Screen::saveState(Common::WriteStream *out) {
out->writeUint32LE(_fontResIndexArray[i]);
out->writeByte(_fontColor1);
out->writeByte(_fontColor2);
-
}
void Screen::loadState(Common::ReadStream *in) {
-
// Load verb line
_verbLineNum = in->readUint16LE();
_verbLineX = in->readUint16LE();
@@ -786,6 +772,7 @@ void Screen::loadState(Common::ReadStream *in) {
_talkTextItems[i].fontNum = in->readUint16LE();
_talkTextItems[i].color = in->readByte();
_talkTextItems[i].lineCount = in->readByte();
+ _talkTextItems[i].alwaysDisplayed = false;
for (int j = 0; j < _talkTextItems[i].lineCount; j++) {
_talkTextItems[i].lines[j].x = in->readUint16LE();
_talkTextItems[i].lines[j].y = in->readUint16LE();
@@ -809,7 +796,6 @@ void Screen::loadState(Common::ReadStream *in) {
_fontResIndexArray[i] = in->readUint32LE();
_fontColor1 = in->readByte();
_fontColor2 = in->readByte();
-
}
} // End of namespace Toltecs
diff --git a/engines/toltecs/screen.h b/engines/toltecs/screen.h
index 788cde50c6..52f412251e 100644
--- a/engines/toltecs/screen.h
+++ b/engines/toltecs/screen.h
@@ -136,6 +136,7 @@ struct TalkTextItem {
byte color;
byte lineCount;
TextRect lines[15];
+ bool alwaysDisplayed;
};
struct GuiTextWrapState {
@@ -177,10 +178,12 @@ public:
void updateVerbLine(int16 slotIndex, int16 slotOffset);
// Talk text
- void updateTalkText(int16 slotIndex, int16 slotOffset);
+ void updateTalkText(int16 slotIndex, int16 slotOffset, bool alwaysDisplayed);
void addTalkTextRect(Font &font, int16 x, int16 &y, int16 length, int16 width, TalkTextItem *item);
void addTalkTextItemsToRenderQueue();
int16 getTalkTextDuration();
+ bool isTalkTextActive(int16 slotIndex);
+ void finishTalkTextItem(int16 slotIndex);
void finishTalkTextItems();
void keepTalkTextItemsAlive();
diff --git a/engines/toltecs/script.cpp b/engines/toltecs/script.cpp
index 5e8617bc43..07d74ac369 100644
--- a/engines/toltecs/script.cpp
+++ b/engines/toltecs/script.cpp
@@ -40,6 +40,22 @@
namespace Toltecs {
+static const VarType varTypes[] = {
+ vtByte, vtWord, vtWord, vtByte, vtWord, // 0 - 4
+ vtWord, vtWord, vtWord, vtWord, vtWord, // 5 - 9
+ vtWord, vtWord, vtByte, vtWord, vtWord, // 10 - 14
+ vtWord, vtWord, vtWord, vtWord, vtWord, // 15 - 19
+ vtWord, vtWord // 20 - 21
+};
+
+static const char *varNames[] = {
+ "mouseDisabled", "mouseY", "mouseX", "mouseButton", "verbLineY", // 0 - 4
+ "verbLineX", "verbLineWidth", "verbLineCount", "verbLineNum", "talkTextItemNum", // 5 - 9
+ "talkTextY", "talkTextX", "talkTextFontColor", "cameraY", "cameraX", // 10 - 14
+ "walkSpeedY", "walkSpeedX", "flag01", "sceneResIndex", "guiHeight", // 15 - 19
+ "sceneHeight", "sceneWidth" // 20 - 21
+};
+
ScriptInterpreter::ScriptInterpreter(ToltecsEngine *vm) : _vm(vm) {
_stack = new byte[kScriptStackSize];
@@ -154,6 +170,17 @@ void ScriptInterpreter::setupScriptFunctions() {
}
void ScriptInterpreter::loadScript(uint resIndex, uint slotIndex) {
+ if (_slots[slotIndex].resIndex && _slots[slotIndex].resIndex != resIndex && _vm->_screen->isTalkTextActive(slotIndex)) {
+ // WORKAROUND: This happens when examining the assembled
+ // pickaxe. It could lead to random characters being printed,
+ // or possibly even crashes, when subtitles are enabled.
+ //
+ // According to johndoe and he said there may be some bug or
+ // missing feature that causes this situation to happen at all,
+ // but he was ok with this workaround for now.
+ warning("Possible script bug: Loading script %d into slot %d that has an active talk text, probably for script %d", resIndex, slotIndex, _slots[slotIndex].resIndex);
+ _vm->_screen->finishTalkTextItem(slotIndex);
+ }
delete[] _slots[slotIndex].data;
@@ -162,7 +189,6 @@ void ScriptInterpreter::loadScript(uint resIndex, uint slotIndex) {
_slots[slotIndex].size = scriptResource->size;
_slots[slotIndex].data = new byte[_slots[slotIndex].size];
memcpy(_slots[slotIndex].data, scriptResource->data, _slots[slotIndex].size);
-
}
void ScriptInterpreter::setMainScript(uint slotIndex) {
@@ -228,10 +254,9 @@ int16 ScriptInterpreter::readInt16() {
}
void ScriptInterpreter::execOpcode(byte opcode) {
-
int16 ofs;
- debug(1, "opcode = %d", opcode);
+ debug(2, "opcode = %d", opcode);
switch (opcode) {
case 0:
@@ -239,35 +264,32 @@ void ScriptInterpreter::execOpcode(byte opcode) {
// ok
_subCode = _code;
byte length = readByte();
- debug(1, "length = %d", length);
+ if (length == 0) {
+ warning("Possible script bug detected - opcode length is 0 when calling script function");
+ return;
+ }
+ debug(2, "length = %d", length);
uint16 index = readInt16();
- debug(1, "callScriptFunction %d", index);
execScriptFunction(index);
_code += length - 2;
break;
}
case 1:
- // ok
_regs.reg0 = readInt16();
break;
case 2:
- // ok
_regs.reg1 = readInt16();
break;
case 3:
- // ok
_regs.reg3 = readInt16();
break;
case 4:
- // ok
_regs.reg5 = _regs.reg0;
break;
case 5:
- // ok
_regs.reg3 = _regs.reg0;
break;
case 6:
- // ok
_regs.reg1 = _regs.reg0;
break;
case 7:
@@ -468,72 +490,14 @@ void ScriptInterpreter::execOpcode(byte opcode) {
}
void ScriptInterpreter::execScriptFunction(uint16 index) {
- debug(4, "execScriptFunction(%d)", index);
if (index >= _scriptFuncs.size())
error("ScriptInterpreter::execScriptFunction() Invalid script function index %d", index);
- debug(4, "%s", _scriptFuncNames[index]);
+ debug(1, "execScriptFunction %s (%d)", _scriptFuncNames[index], index);
(*_scriptFuncs[index])();
}
-VarType ScriptInterpreter::getGameVarType(uint variable) {
- switch (variable) {
- case 0: return vtByte;
- case 1: return vtWord;
- case 2: return vtWord;
- case 3: return vtByte;
- case 4: return vtWord;
- case 5: return vtWord;
- case 6: return vtWord;
- case 7: return vtWord;
- case 8: return vtWord;
- case 9: return vtWord;
- case 10: return vtWord;
- case 11: return vtWord;
- case 12: return vtByte;
- case 13: return vtWord;
- case 14: return vtWord;
- case 15: return vtWord;
- case 16: return vtWord;
- case 17: return vtWord;
- case 18: return vtWord;
- case 19: return vtWord;
- case 20: return vtWord;
- case 21: return vtWord;
- default:
- error("Invalid game variable");
- }
-}
-
-const char *getVarName(uint variable) {
- switch (variable) {
- case 0: return "mouseDisabled";
- case 1: return "mouseY";
- case 2: return "mouseX";
- case 3: return "mouseButton";
- case 4: return "verbLineY";
- case 5: return "verbLineX";
- case 6: return "verbLineWidth";
- case 7: return "verbLineCount";
- case 8: return "verbLineNum";
- case 9: return "talkTextItemNum";
- case 10: return "talkTextY";
- case 11: return "talkTextX";
- case 12: return "talkTextFontColor";
- case 13: return "cameraY";
- case 14: return "cameraX";
- case 15: return "walkSpeedY";
- case 16: return "walkSpeedX";
- case 17: return "flag01";
- case 18: return "sceneResIndex";
- case 19: return "guiHeight";
- case 20: return "sceneHeight";
- case 21: return "sceneWidth";
- }
- return "(invalid)";
-}
-
int16 ScriptInterpreter::getGameVar(uint variable) {
- debug(0, "ScriptInterpreter::getGameVar(%d{%s})", variable, getVarName(variable));
+ debug(2, "ScriptInterpreter::getGameVar(%d{%s})", variable, varNames[variable]);
switch (variable) {
case 0: return _vm->_mouseDisabled;
@@ -559,13 +523,13 @@ int16 ScriptInterpreter::getGameVar(uint variable) {
case 20: return _vm->_sceneHeight;
case 21: return _vm->_sceneWidth;
default:
- warning("Getting unimplemented game variable %s (%d)", getVarName(variable), variable);
+ warning("Getting unimplemented game variable %s (%d)", varNames[variable], variable);
return 0;
}
}
void ScriptInterpreter::setGameVar(uint variable, int16 value) {
- debug(0, "ScriptInterpreter::setGameVar(%d{%s}, %d)", variable, getVarName(variable), value);
+ debug(2, "ScriptInterpreter::setGameVar(%d{%s}, %d)", variable, varNames[variable], value);
switch (variable) {
case 0:
@@ -632,10 +596,9 @@ void ScriptInterpreter::setGameVar(uint variable, int16 value) {
case 1:
case 2:
default:
- warning("Setting unimplemented game variable %s (%d) to %d", getVarName(variable), variable, value);
+ warning("Setting unimplemented game variable %s (%d) to %d", varNames[variable], variable, value);
break;
}
-
}
byte ScriptInterpreter::arg8(int16 offset) {
@@ -657,32 +620,31 @@ int16 ScriptInterpreter::popInt16() {
}
void ScriptInterpreter::localWrite8(int16 offset, byte value) {
- //debug(1, "localWrite8(%d, %d)", offset, value);
+ //debug(2, "localWrite8(%d, %d)", offset, value);
_localData[offset] = value;
}
byte ScriptInterpreter::localRead8(int16 offset) {
- //debug(1, "localRead8(%d) -> %d", offset, _localData[offset]);
+ //debug(2, "localRead8(%d) -> %d", offset, _localData[offset]);
return _localData[offset];
}
void ScriptInterpreter::localWrite16(int16 offset, int16 value) {
- //debug(1, "localWrite16(%d, %d)", offset, value);
+ //debug(2, "localWrite16(%d, %d)", offset, value);
WRITE_LE_UINT16(&_localData[offset], value);
}
int16 ScriptInterpreter::localRead16(int16 offset) {
- //debug(1, "localRead16(%d) -> %d", offset, (int16)READ_LE_UINT16(&_localData[offset]));
+ //debug(2, "localRead16(%d) -> %d", offset, (int16)READ_LE_UINT16(&_localData[offset]));
return (int16)READ_LE_UINT16(&_localData[offset]);
}
byte *ScriptInterpreter::localPtr(int16 offset) {
- //debug(1, "localPtr(%d)", offset);
+ //debug(2, "localPtr(%d)", offset);
return &_localData[offset];
}
void ScriptInterpreter::saveState(Common::WriteStream *out) {
-
// Save registers
out->writeUint16LE(_regs.reg0);
out->writeUint16LE(_regs.reg1);
@@ -708,11 +670,9 @@ void ScriptInterpreter::saveState(Common::WriteStream *out) {
// Save IP
out->writeUint16LE((int16)(_code - getSlotData(_regs.reg4)));
-
}
void ScriptInterpreter::loadState(Common::ReadStream *in) {
-
// Load registers
_regs.reg0 = in->readUint16LE();
_regs.reg1 = in->readUint16LE();
@@ -741,7 +701,6 @@ void ScriptInterpreter::loadState(Common::ReadStream *in) {
// Load IP
_code = getSlotData(_regs.reg4) + in->readUint16LE();
-
}
void ScriptInterpreter::sfNop() {
@@ -755,7 +714,9 @@ void ScriptInterpreter::sfGetGameVar() {
void ScriptInterpreter::sfSetGameVar() {
int16 varIndex = arg16(3);
- VarType varType = getGameVarType(varIndex);
+ assert(varIndex <= 21);
+
+ VarType varType = varTypes[varIndex];
int16 value = 0;
if (varType == vtByte)
value = arg8(5);
@@ -810,8 +771,7 @@ void ScriptInterpreter::sfSetDeltaAnimPalette() {
}
void ScriptInterpreter::sfSetUnkPaletteEffect() {
- // TODO
- debug("ScriptInterpreter::sfSetUnkPaletteEffect");
+ error("ScriptInterpreter::sfSetUnkPaletteEffect called"); // unused
}
void ScriptInterpreter::sfBuildColorTransTable() {
@@ -992,7 +952,8 @@ void ScriptInterpreter::sfStopShakeScreen() {
void ScriptInterpreter::sfStartSequence() {
int16 sequenceResIndex = arg16(3);
- //debug("ScriptInterpreter::sfStartSequence(%d)", sequenceResIndex);
+ debug(1, "ScriptInterpreter::sfStartSequence(%d)", sequenceResIndex);
+
if (sequenceResIndex >= 0) {
//_vm->_arc->dump(sequenceResIndex, "music"); // DEBUG: Dump music so we know what's in there
@@ -1001,7 +962,6 @@ void ScriptInterpreter::sfStartSequence() {
}
void ScriptInterpreter::sfEndSequence() {
- //debug("ScriptInterpreter::sfEndSequence");
_vm->_music->stopSequence();
}
@@ -1029,9 +989,8 @@ void ScriptInterpreter::sfHandleInput() {
if (_vm->_rightButtonDown) {
keyCode = 1;
} else {
- /* Convert keyboard scancode to IBM PC scancode
- Only scancodes known to be used (so far) are converted
- */
+ // Convert keyboard scancode to IBM PC scancode.
+ // Only scancodes known to be used (so far) are converted.
switch (_vm->_keyState.keycode) {
case Common::KEYCODE_ESCAPE:
keyCode = 1;
@@ -1050,11 +1009,13 @@ void ScriptInterpreter::sfRunOptionsScreen() {
_vm->showMenu(kMenuIdMain);
}
-/* NOTE: The opcodes sfPrecacheSprites, sfPrecacheSounds1, sfPrecacheSounds2 and
- sfDeletePrecachedFiles were used by the original engine to handle precaching
- of data so the game doesn't stall while playing (due to the slow speed of
- CD-Drives back then). This is not needed in ScummVM since all supported
- systems are fast enough to load data in-game. */
+/**
+ * NOTE: The opcodes sfPrecacheSprites, sfPrecacheSounds1, sfPrecacheSounds2 and
+ * sfDeletePrecachedFiles were used by the original engine to handle precaching
+ * of data so the game doesn't stall while playing (due to the slow speed of
+ * CD-Drives back then). This is not needed in ScummVM since all supported
+ * systems are fast enough to load data in-game.
+ */
void ScriptInterpreter::sfPrecacheSprites() {
// See note above
diff --git a/engines/toltecs/script.h b/engines/toltecs/script.h
index 89dca4598f..4c880dfef5 100644
--- a/engines/toltecs/script.h
+++ b/engines/toltecs/script.h
@@ -49,7 +49,6 @@ public:
byte *getSlotData(int slotIndex) const { return _slots[slotIndex].data; }
- VarType getGameVarType(uint variable);
int16 getGameVar(uint variable);
void setGameVar(uint variable, int16 value);
diff --git a/engines/toltecs/sound.cpp b/engines/toltecs/sound.cpp
index 4b281392e5..8afc0e7890 100644
--- a/engines/toltecs/sound.cpp
+++ b/engines/toltecs/sound.cpp
@@ -103,8 +103,7 @@ void Sound::internalPlaySound(int16 resIndex, int16 type, int16 volume, int16 pa
}
}
} else {
-
- if (type == -3) {
+ if (type == kChannelTypeSpeech) {
// Stop speech and play new sound
stopSpeech();
}
@@ -137,10 +136,8 @@ void Sound::internalPlaySound(int16 resIndex, int16 type, int16 volume, int16 pa
_vm->_mixer->playStream(soundType, &channels[freeChannel].handle,
stream, -1, volume, panning);
- }
-
- }
-
+ } // if (freeChannel >= 0)
+ } // resIndex
}
void Sound::updateSpeech() {
diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp
index 9f3a10a03b..1a399dacc0 100644
--- a/engines/toltecs/toltecs.cpp
+++ b/engines/toltecs/toltecs.cpp
@@ -39,6 +39,7 @@
#include "toltecs/toltecs.h"
#include "toltecs/animation.h"
+#include "toltecs/console.h"
#include "toltecs/menu.h"
#include "toltecs/movie.h"
#include "toltecs/music.h"
@@ -62,6 +63,9 @@ struct GameSettings {
};
ToltecsEngine::ToltecsEngine(OSystem *syst, const ToltecsGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
+ // Assign default values to the config manager, in case settings are missing
+ ConfMan.registerDefault("originalsaveload", "false");
+
_rnd = new Common::RandomSource("toltecs");
}
@@ -123,6 +127,7 @@ Common::Error ToltecsEngine::run() {
_menuSystem = new MenuSystem(this);
_sound = new Sound(this);
+ _console = new Console(this);
_cfgText = ConfMan.getBool("subtitles");
_cfgVoices = !ConfMan.getBool("speech_mute");
@@ -176,6 +181,7 @@ Common::Error ToltecsEngine::run() {
_music->stopSequence();
_sound->stopAll();
+ delete _console;
delete _arc;
delete _res;
delete _screen;
@@ -215,7 +221,6 @@ void ToltecsEngine::requestLoadgame(int slotNum) {
}
void ToltecsEngine::loadScene(uint resIndex) {
-
Resource *sceneResource = _res->load(resIndex);
byte *scene = sceneResource->data;
@@ -250,13 +255,10 @@ void ToltecsEngine::loadScene(uint resIndex) {
_screen->_fullRefresh = true;
_screen->_renderQueue->clear();
-
}
void ToltecsEngine::updateScreen() {
-
_sound->updateSpeech();
-
_screen->updateShakeScreen();
// TODO: Set quit flag
@@ -289,7 +291,6 @@ void ToltecsEngine::updateScreen() {
_counter02 = (currUpdateTime - prevUpdateTime) / 13;
} while (_counter02 == 0);
prevUpdateTime = currUpdateTime;
-
}
void ToltecsEngine::drawScreen() {
@@ -310,6 +311,7 @@ void ToltecsEngine::drawScreen() {
_screen->_guiRefresh = false;
}
+ _console->onFrame();
_system->updateScreen();
_system->delayMillis(10);
@@ -317,7 +319,6 @@ void ToltecsEngine::drawScreen() {
}
void ToltecsEngine::updateInput() {
-
Common::Event event;
Common::EventManager *eventMan = _system->getEventManager();
while (eventMan->pollEvent(event)) {
@@ -327,6 +328,9 @@ void ToltecsEngine::updateInput() {
//debug("key: flags = %02X; keycode = %d", _keyState.flags, _keyState.keycode);
+ if (event.kbd.hasFlags(Common::KBD_CTRL) && event.kbd.keycode == Common::KEYCODE_d)
+ _console->attach();
+
switch (event.kbd.keycode) {
case Common::KEYCODE_F5:
showMenu(kMenuIdSave);
@@ -350,9 +354,6 @@ void ToltecsEngine::updateInput() {
case Common::EVENT_KEYUP:
_keyState.reset();
break;
- case Common::EVENT_QUIT:
- quitGame();
- break;
case Common::EVENT_MOUSEMOVE:
_mouseX = event.mouse.x;
_mouseY = event.mouse.y;
@@ -408,9 +409,7 @@ void ToltecsEngine::updateInput() {
_mouseWaitForRelease = false;
_mouseButton = 0;
}
-
}
-
}
void ToltecsEngine::setGuiHeight(int16 guiHeight) {
@@ -478,7 +477,6 @@ void ToltecsEngine::scrollCameraRight(int16 delta) {
}
void ToltecsEngine::updateCamera() {
-
if (_cameraX != _newCameraX) {
_cameraX = _newCameraX;
_screen->_fullRefresh = true;
@@ -492,13 +490,16 @@ void ToltecsEngine::updateCamera() {
}
//debug(0, "ToltecsEngine::updateCamera() _cameraX = %d; _cameraY = %d", _cameraX, _cameraY);
-
}
void ToltecsEngine::talk(int16 slotIndex, int16 slotOffset) {
-
byte *scanData = _script->getSlotData(slotIndex) + slotOffset;
+ // If there's another talk text at the requested slot and it's still
+ // active, don't overwrite it. Fixes bug #3600166.
+ if (_screen->isTalkTextActive(slotIndex))
+ return;
+
while (*scanData < 0xF0) {
if (*scanData == 0x19) {
scanData++;
@@ -518,19 +519,18 @@ void ToltecsEngine::talk(int16 slotIndex, int16 slotOffset) {
debug(0, "ToltecsEngine::talk() playSound(resIndex: %d)", resIndex);
_sound->playSpeech(resIndex);
}
+
if (_doText) {
- _screen->updateTalkText(slotIndex, slotOffset);
+ _screen->updateTalkText(slotIndex, slotOffset, false);
} else {
_screen->keepTalkTextItemsAlive();
}
} else {
- _screen->updateTalkText(slotIndex, slotOffset);
+ _screen->updateTalkText(slotIndex, slotOffset, true);
}
-
}
void ToltecsEngine::walk(byte *walkData) {
-
int16 xdelta, ydelta, v8, v10, v11;
int16 xstep, ystep;
ScriptWalk walkInfo;
@@ -613,7 +613,6 @@ void ToltecsEngine::walk(byte *walkData) {
WRITE_LE_UINT16(walkData + 14, walkInfo.xerror);
WRITE_LE_UINT16(walkData + 16, walkInfo.mulValue);
WRITE_LE_UINT16(walkData + 18, walkInfo.scaling);
-
}
int16 ToltecsEngine::findRectAtPoint(byte *rectData, int16 x, int16 y, int16 index, int16 itemSize,
diff --git a/engines/toltecs/toltecs.h b/engines/toltecs/toltecs.h
index b95a4f77cb..0be2d2a646 100644
--- a/engines/toltecs/toltecs.h
+++ b/engines/toltecs/toltecs.h
@@ -42,6 +42,7 @@ struct ToltecsGameDescription;
class AnimationPlayer;
class ArchiveReader;
+class Console;
class Input;
class MenuSystem;
class MoviePlayer;
@@ -144,6 +145,7 @@ public:
AnimationPlayer *_anim;
ArchiveReader *_arc;
+ Console *_console;
Input *_input;
MenuSystem *_menuSystem;
MoviePlayer *_moviePlayer;
diff --git a/engines/toon/toon.h b/engines/toon/toon.h
index d40c489011..0ff351804f 100644
--- a/engines/toon/toon.h
+++ b/engines/toon/toon.h
@@ -316,12 +316,11 @@ public:
}
Common::Error saveGameState(int slot, const Common::String &desc) {
-
- return (saveGame(slot, desc) ? Common::kWritingFailed : Common::kNoError);
+ return (saveGame(slot, desc) ? Common::kNoError : Common::kWritingFailed);
}
Common::Error loadGameState(int slot) {
- return (loadGame(slot) ? Common::kReadingFailed : Common::kNoError);
+ return (loadGame(slot) ? Common::kNoError : Common::kReadingFailed);
}
bool hasFeature(EngineFeature f) const {
diff --git a/engines/wintermute/ad/ad_actor.cpp b/engines/wintermute/ad/ad_actor.cpp
index 74fb4a5ae2..1346a090f6 100644
--- a/engines/wintermute/ad/ad_actor.cpp
+++ b/engines/wintermute/ad/ad_actor.cpp
@@ -57,15 +57,15 @@ AdActor::AdActor(BaseGame *inGame) : AdTalkHolder(inGame) {
_type = OBJECT_ACTOR;
_dir = DI_LEFT;
- _walkSprite = NULL;
- _standSprite = NULL;
- _turnLeftSprite = NULL;
- _turnRightSprite = NULL;
+ _walkSprite = nullptr;
+ _standSprite = nullptr;
+ _turnLeftSprite = nullptr;
+ _turnRightSprite = nullptr;
_targetPoint = new BasePoint;
_afterWalkDir = DI_NONE;
- _animSprite2 = NULL;
+ _animSprite2 = nullptr;
setDefaultAnimNames();
}
@@ -84,19 +84,19 @@ bool AdActor::setDefaultAnimNames() {
AdActor::~AdActor() {
delete _path;
delete _targetPoint;
- _path = NULL;
- _targetPoint = NULL;
+ _path = nullptr;
+ _targetPoint = nullptr;
delete _walkSprite;
delete _standSprite;
delete _turnLeftSprite;
delete _turnRightSprite;
- _walkSprite = NULL;
- _standSprite = NULL;
- _turnLeftSprite = NULL;
- _turnRightSprite = NULL;
+ _walkSprite = nullptr;
+ _standSprite = nullptr;
+ _turnLeftSprite = nullptr;
+ _turnRightSprite = nullptr;
- _animSprite2 = NULL; // ref only
+ _animSprite2 = nullptr; // ref only
for (uint32 i = 0; i < _talkSprites.size(); i++) {
delete _talkSprites[i];
@@ -110,7 +110,7 @@ AdActor::~AdActor() {
for (uint32 i = 0; i < _anims.size(); i++) {
delete _anims[i];
- _anims[i] = NULL;
+ _anims[i] = nullptr;
}
_anims.clear();
@@ -120,7 +120,7 @@ AdActor::~AdActor() {
//////////////////////////////////////////////////////////////////////////
bool AdActor::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdActor::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -232,7 +232,7 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) {
}
AdGame *adGame = (AdGame *)_gameRef;
- AdSpriteSet *spr = NULL;
+ AdSpriteSet *spr = nullptr;
int ar = 0, ag = 0, ab = 0, alpha = 0;
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)&params)) > 0) {
switch (cmd) {
@@ -287,7 +287,7 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) {
case TOKEN_WALK:
delete _walkSprite;
- _walkSprite = NULL;
+ _walkSprite = nullptr;
spr = new AdSpriteSet(_gameRef, this);
if (!spr || DID_FAIL(spr->loadBuffer(params, true, adGame->_texWalkLifeTime, CACHE_HALF))) {
cmd = PARSERR_GENERIC;
@@ -316,7 +316,7 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) {
case TOKEN_STAND:
delete _standSprite;
- _standSprite = NULL;
+ _standSprite = nullptr;
spr = new AdSpriteSet(_gameRef, this);
if (!spr || DID_FAIL(spr->loadBuffer(params, true, adGame->_texStandLifeTime))) {
cmd = PARSERR_GENERIC;
@@ -327,7 +327,7 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) {
case TOKEN_TURN_LEFT:
delete _turnLeftSprite;
- _turnLeftSprite = NULL;
+ _turnLeftSprite = nullptr;
spr = new AdSpriteSet(_gameRef, this);
if (!spr || DID_FAIL(spr->loadBuffer(params, true))) {
cmd = PARSERR_GENERIC;
@@ -338,7 +338,7 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) {
case TOKEN_TURN_RIGHT:
delete _turnRightSprite;
- _turnRightSprite = NULL;
+ _turnRightSprite = nullptr;
spr = new AdSpriteSet(_gameRef, this);
if (!spr || DID_FAIL(spr->loadBuffer(params, true))) {
cmd = PARSERR_GENERIC;
@@ -356,7 +356,7 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) {
_cursor = new BaseSprite(_gameRef);
if (!_cursor || DID_FAIL(_cursor->loadFile((char *)params))) {
delete _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -392,15 +392,15 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) {
case TOKEN_BLOCKED_REGION: {
delete _blockRegion;
delete _currentBlockRegion;
- _blockRegion = NULL;
- _currentBlockRegion = NULL;
+ _blockRegion = nullptr;
+ _currentBlockRegion = nullptr;
BaseRegion *rgn = new BaseRegion(_gameRef);
BaseRegion *crgn = new BaseRegion(_gameRef);
if (!rgn || !crgn || DID_FAIL(rgn->loadBuffer(params, false))) {
delete _blockRegion;
delete _currentBlockRegion;
- _blockRegion = NULL;
- _currentBlockRegion = NULL;
+ _blockRegion = nullptr;
+ _currentBlockRegion = nullptr;
cmd = PARSERR_GENERIC;
} else {
_blockRegion = rgn;
@@ -413,15 +413,15 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) {
case TOKEN_WAYPOINTS: {
delete _wptGroup;
delete _currentWptGroup;
- _wptGroup = NULL;
- _currentWptGroup = NULL;
+ _wptGroup = nullptr;
+ _currentWptGroup = nullptr;
AdWaypointGroup *wpt = new AdWaypointGroup(_gameRef);
AdWaypointGroup *cwpt = new AdWaypointGroup(_gameRef);
if (!wpt || !cwpt || DID_FAIL(wpt->loadBuffer(params, false))) {
delete _wptGroup;
delete _currentWptGroup;
- _wptGroup = NULL;
- _currentWptGroup = NULL;
+ _wptGroup = nullptr;
+ _currentWptGroup = nullptr;
cmd = PARSERR_GENERIC;
} else {
_wptGroup = wpt;
@@ -502,7 +502,7 @@ void AdActor::turnTo(TDirection dir) {
_targetDir = dir;
_state = delta < 0 ? STATE_TURNING_LEFT : STATE_TURNING_RIGHT;
- _tempSprite2 = NULL;
+ _tempSprite2 = nullptr;
}
@@ -566,7 +566,7 @@ bool AdActor::display() {
_currentSprite->display(_posX,
_posY,
- reg ? _registerAlias : NULL,
+ reg ? _registerAlias : nullptr,
scaleX,
scaleY,
alpha,
@@ -589,26 +589,26 @@ bool AdActor::display() {
//////////////////////////////////////////////////////////////////////////
bool AdActor::update() {
- _currentSprite = NULL;
+ _currentSprite = nullptr;
if (_state == STATE_READY) {
if (_animSprite) {
delete _animSprite;
- _animSprite = NULL;
+ _animSprite = nullptr;
}
if (_animSprite2) {
- _animSprite2 = NULL;
+ _animSprite2 = nullptr;
}
}
// finished playing animation?
- if (_state == STATE_PLAYING_ANIM && _animSprite != NULL && _animSprite->isFinished()) {
+ if (_state == STATE_PLAYING_ANIM && _animSprite != nullptr && _animSprite->isFinished()) {
_state = _nextState;
_nextState = STATE_READY;
_currentSprite = _animSprite;
}
- if (_state == STATE_PLAYING_ANIM_SET && _animSprite2 != NULL && _animSprite2->isFinished()) {
+ if (_state == STATE_PLAYING_ANIM_SET && _animSprite2 != nullptr && _animSprite2->isFinished()) {
_state = _nextState;
_nextState = STATE_READY;
_currentSprite = _animSprite2;
@@ -649,7 +649,7 @@ bool AdActor::update() {
//////////////////////////////////////////////////////////////////////////
case STATE_TURNING_LEFT:
- if (_tempSprite2 == NULL || _tempSprite2->isFinished()) {
+ if (_tempSprite2 == nullptr || _tempSprite2->isFinished()) {
if (_dir > 0) {
_dir = (TDirection)(_dir - 1);
} else {
@@ -657,7 +657,7 @@ bool AdActor::update() {
}
if (_dir == _targetDir) {
- _tempSprite2 = NULL;
+ _tempSprite2 = nullptr;
_state = _nextState;
_nextState = STATE_READY;
} else {
@@ -686,7 +686,7 @@ bool AdActor::update() {
//////////////////////////////////////////////////////////////////////////
case STATE_TURNING_RIGHT:
- if (_tempSprite2 == NULL || _tempSprite2->isFinished()) {
+ if (_tempSprite2 == nullptr || _tempSprite2->isFinished()) {
_dir = (TDirection)(_dir + 1);
if ((int)_dir >= (int)NUM_DIRECTIONS) {
@@ -694,7 +694,7 @@ bool AdActor::update() {
}
if (_dir == _targetDir) {
- _tempSprite2 = NULL;
+ _tempSprite2 = nullptr;
_state = _nextState;
_nextState = STATE_READY;
} else {
@@ -753,10 +753,10 @@ bool AdActor::update() {
}
bool timeIsUp = (_sentence->_sound && _sentence->_soundStarted && (!_sentence->_sound->isPlaying() && !_sentence->_sound->isPaused())) || (!_sentence->_sound && _sentence->_duration <= _gameRef->_timer - _sentence->_startTime);
- if (_tempSprite2 == NULL || _tempSprite2->isFinished() || (/*_tempSprite2->_looping &&*/ timeIsUp)) {
+ if (_tempSprite2 == nullptr || _tempSprite2->isFinished() || (/*_tempSprite2->_looping &&*/ timeIsUp)) {
if (timeIsUp) {
_sentence->finish();
- _tempSprite2 = NULL;
+ _tempSprite2 = nullptr;
_state = _nextState;
_nextState = STATE_READY;
} else {
@@ -821,7 +821,7 @@ bool AdActor::update() {
void AdActor::followPath() {
// skip current position
_path->getFirst();
- while (_path->getCurrent() != NULL) {
+ while (_path->getCurrent() != nullptr) {
if (_path->getCurrent()->x != _posX || _path->getCurrent()->y != _posY) {
break;
}
@@ -829,7 +829,7 @@ void AdActor::followPath() {
}
// are there points to follow?
- if (_path->getCurrent() != NULL) {
+ if (_path->getCurrent() != nullptr) {
_state = STATE_FOLLOWING_PATH;
initLine(BasePoint(_posX, _posY), *_path->getCurrent());
} else {
@@ -896,7 +896,7 @@ void AdActor::getNextStep() {
if (_pFCount == 0) {
- if (_path->getNext() == NULL) {
+ if (_path->getNext() == nullptr) {
_posX = _targetPoint->x;
_posY = _targetPoint->y;
@@ -1040,17 +1040,17 @@ bool AdActor::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
if (scumm_stricmp(_anims[i]->getName(), animName) == 0) {
// invalidate sprites in use
if (_anims[i]->containsSprite(_tempSprite2)) {
- _tempSprite2 = NULL;
+ _tempSprite2 = nullptr;
}
if (_anims[i]->containsSprite(_currentSprite)) {
- _currentSprite = NULL;
+ _currentSprite = nullptr;
}
if (_anims[i]->containsSprite(_animSprite2)) {
- _animSprite2 = NULL;
+ _animSprite2 = nullptr;
}
delete _anims[i];
- _anims[i] = NULL;
+ _anims[i] = nullptr;
_anims.remove_at(i);
i--;
found = true;
@@ -1066,7 +1066,7 @@ bool AdActor::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
else if (strcmp(name, "HasAnim") == 0) {
stack->correctParams(1);
const char *animName = stack->pop()->getString();
- stack->pushBool(getAnimByName(animName) != NULL);
+ stack->pushBool(getAnimByName(animName) != nullptr);
return STATUS_OK;
} else {
return AdTalkHolder::scCallMethod(script, stack, thisStack, name);
@@ -1231,7 +1231,7 @@ BaseSprite *AdActor::getTalkStance(const char *stance) {
if (DID_FAIL(res)) {
_gameRef->LOG(res, "AdActor::GetTalkStance: error loading talk sprite (object:\"%s\" sprite:\"%s\")", getName(), _forcedTalkAnimName);
delete _animSprite;
- _animSprite = NULL;
+ _animSprite = nullptr;
} else {
return _animSprite;
}
@@ -1244,7 +1244,7 @@ BaseSprite *AdActor::getTalkStance(const char *stance) {
}
// new way
- BaseSprite *ret = NULL;
+ BaseSprite *ret = nullptr;
// do we have an animation with this name?
AdSpriteSet *anim = getAnimByName(stance);
@@ -1280,9 +1280,9 @@ BaseSprite *AdActor::getTalkStance(const char *stance) {
//////////////////////////////////////////////////////////////////////////
BaseSprite *AdActor::getTalkStanceOld(const char *stance) {
- BaseSprite *ret = NULL;
+ BaseSprite *ret = nullptr;
- if (stance != NULL) {
+ if (stance != nullptr) {
// search special stances
for (uint32 i = 0; i < _talkSpritesEx.size(); i++) {
if (scumm_stricmp(_talkSpritesEx[i]->getName(), stance) == 0) {
@@ -1290,7 +1290,7 @@ BaseSprite *AdActor::getTalkStanceOld(const char *stance) {
break;
}
}
- if (ret == NULL) {
+ if (ret == nullptr) {
// search generic stances
for (uint32 i = 0; i < _talkSprites.size(); i++) {
if (scumm_stricmp(_talkSprites[i]->getName(), stance) == 0) {
@@ -1302,7 +1302,7 @@ BaseSprite *AdActor::getTalkStanceOld(const char *stance) {
}
// not a valid stance? get a random one
- if (ret == NULL) {
+ if (ret == nullptr) {
if (_talkSprites.size() < 1) {
ret = _standSprite->getSprite(_dir);
} else {
@@ -1378,7 +1378,7 @@ TDirection AdActor::angleToDirection(int angle) {
//////////////////////////////////////////////////////////////////////////
int AdActor::getHeight() {
// if no current sprite is set, set some
- if (_currentSprite == NULL) {
+ if (_currentSprite == nullptr) {
if (_standSprite) {
_currentSprite = _standSprite->getSprite(_dir);
} else {
@@ -1400,7 +1400,7 @@ AdSpriteSet *AdActor::getAnimByName(const Common::String &animName) {
return _anims[i];
}
}
- return NULL;
+ return nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -1411,7 +1411,7 @@ bool AdActor::mergeAnims(const char *animsFilename) {
byte *fileBuffer = BaseFileManager::getEngineInstance()->readWholeFile(animsFilename);
- if (fileBuffer == NULL) {
+ if (fileBuffer == nullptr) {
_gameRef->LOG(0, "AdActor::MergeAnims failed for file '%s'", animsFilename);
return STATUS_FAILED;
}
diff --git a/engines/wintermute/ad/ad_actor.h b/engines/wintermute/ad/ad_actor.h
index 543c9d063a..bcec9db319 100644
--- a/engines/wintermute/ad/ad_actor.h
+++ b/engines/wintermute/ad/ad_actor.h
@@ -54,7 +54,7 @@ public:
virtual bool update();
virtual bool display();
virtual void turnTo(TDirection dir);
- AdActor(BaseGame *inGame/*=NULL*/);
+ AdActor(BaseGame *inGame/*=nullptr*/);
virtual ~AdActor();
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
diff --git a/engines/wintermute/ad/ad_entity.cpp b/engines/wintermute/ad/ad_entity.cpp
index 2c331de964..259b68f291 100644
--- a/engines/wintermute/ad/ad_entity.cpp
+++ b/engines/wintermute/ad/ad_entity.cpp
@@ -61,13 +61,13 @@ IMPLEMENT_PERSISTENT(AdEntity, false)
AdEntity::AdEntity(BaseGame *inGame) : AdTalkHolder(inGame) {
_type = OBJECT_ENTITY;
_subtype = ENTITY_NORMAL;
- _region = NULL;
- _item = NULL;
+ _region = nullptr;
+ _item = nullptr;
_walkToX = _walkToY = 0;
_walkToDir = DI_NONE;
- _theora = NULL;
+ _theora = nullptr;
}
@@ -76,10 +76,10 @@ AdEntity::~AdEntity() {
_gameRef->unregisterObject(_region);
delete _theora;
- _theora = NULL;
+ _theora = nullptr;
delete[] _item;
- _item = NULL;
+ _item = nullptr;
}
int32 AdEntity::getWalkToX() const {
@@ -101,7 +101,7 @@ const char *AdEntity::getItemName() const {
//////////////////////////////////////////////////////////////////////////
bool AdEntity::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdEntity::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -225,7 +225,7 @@ bool AdEntity::loadBuffer(byte *buffer, bool complete) {
}
AdGame *adGame = (AdGame *)_gameRef;
- BaseSprite *spr = NULL;
+ BaseSprite *spr = nullptr;
int ar = 0, ag = 0, ab = 0, alpha = 0;
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)&params)) > 0) {
switch (cmd) {
@@ -245,7 +245,7 @@ bool AdEntity::loadBuffer(byte *buffer, bool complete) {
case TOKEN_SPRITE: {
delete _sprite;
- _sprite = NULL;
+ _sprite = nullptr;
spr = new BaseSprite(_gameRef, this);
if (!spr || DID_FAIL(spr->loadFile((char *)params))) {
cmd = PARSERR_GENERIC;
@@ -335,7 +335,7 @@ bool AdEntity::loadBuffer(byte *buffer, bool complete) {
_cursor = new BaseSprite(_gameRef);
if (!_cursor || DID_FAIL(_cursor->loadFile((char *)params))) {
delete _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -348,7 +348,7 @@ bool AdEntity::loadBuffer(byte *buffer, bool complete) {
if (_region) {
_gameRef->unregisterObject(_region);
}
- _region = NULL;
+ _region = nullptr;
BaseRegion *rgn = new BaseRegion(_gameRef);
if (!rgn || DID_FAIL(rgn->loadBuffer(params, false))) {
cmd = PARSERR_GENERIC;
@@ -361,16 +361,16 @@ bool AdEntity::loadBuffer(byte *buffer, bool complete) {
case TOKEN_BLOCKED_REGION: {
delete _blockRegion;
- _blockRegion = NULL;
+ _blockRegion = nullptr;
delete _currentBlockRegion;
- _currentBlockRegion = NULL;
+ _currentBlockRegion = nullptr;
BaseRegion *rgn = new BaseRegion(_gameRef);
BaseRegion *crgn = new BaseRegion(_gameRef);
if (!rgn || !crgn || DID_FAIL(rgn->loadBuffer(params, false))) {
delete _blockRegion;
- _blockRegion = NULL;
+ _blockRegion = nullptr;
delete _currentBlockRegion;
- _currentBlockRegion = NULL;
+ _currentBlockRegion = nullptr;
cmd = PARSERR_GENERIC;
} else {
_blockRegion = rgn;
@@ -382,16 +382,16 @@ bool AdEntity::loadBuffer(byte *buffer, bool complete) {
case TOKEN_WAYPOINTS: {
delete _wptGroup;
- _wptGroup = NULL;
+ _wptGroup = nullptr;
delete _currentWptGroup;
- _currentWptGroup = NULL;
+ _currentWptGroup = nullptr;
AdWaypointGroup *wpt = new AdWaypointGroup(_gameRef);
AdWaypointGroup *cwpt = new AdWaypointGroup(_gameRef);
if (!wpt || !cwpt || DID_FAIL(wpt->loadBuffer(params, false))) {
delete _wptGroup;
- _wptGroup = NULL;
+ _wptGroup = nullptr;
delete _currentWptGroup;
- _currentWptGroup = NULL;
+ _currentWptGroup = nullptr;
cmd = PARSERR_GENERIC;
} else {
_wptGroup = wpt;
@@ -408,7 +408,7 @@ bool AdEntity::loadBuffer(byte *buffer, bool complete) {
case TOKEN_SUBTYPE: {
if (scumm_stricmp((char *)params, "sound") == 0) {
delete _sprite;
- _sprite = NULL;
+ _sprite = nullptr;
if (_gameRef->_editorMode) {
spr = new BaseSprite(_gameRef, this);
if (!spr || DID_FAIL(spr->loadFile("entity_sound.sprite"))) {
@@ -565,7 +565,7 @@ bool AdEntity::display() {
} else if (_currentSprite) {
_currentSprite->display(_posX,
_posY,
- (reg || _editorAlwaysRegister) ? _registerAlias : NULL,
+ (reg || _editorAlwaysRegister) ? _registerAlias : nullptr,
scaleX,
scaleY,
alpha,
@@ -585,15 +585,15 @@ bool AdEntity::display() {
//////////////////////////////////////////////////////////////////////////
bool AdEntity::update() {
- _currentSprite = NULL;
+ _currentSprite = nullptr;
if (_state == STATE_READY && _animSprite) {
delete _animSprite;
- _animSprite = NULL;
+ _animSprite = nullptr;
}
// finished playing animation?
- if (_state == STATE_PLAYING_ANIM && _animSprite != NULL && _animSprite->isFinished()) {
+ if (_state == STATE_PLAYING_ANIM && _animSprite != nullptr && _animSprite->isFinished()) {
_state = STATE_READY;
_currentSprite = _animSprite;
}
@@ -628,10 +628,10 @@ bool AdEntity::update() {
}
bool timeIsUp = (_sentence->_sound && _sentence->_soundStarted && (!_sentence->_sound->isPlaying() && !_sentence->_sound->isPaused())) || (!_sentence->_sound && _sentence->_duration <= _gameRef->_timer - _sentence->_startTime);
- if (_tempSprite2 == NULL || _tempSprite2->isFinished() || (/*_tempSprite2->_looping &&*/ timeIsUp)) {
+ if (_tempSprite2 == nullptr || _tempSprite2->isFinished() || (/*_tempSprite2->_looping &&*/ timeIsUp)) {
if (timeIsUp) {
_sentence->finish();
- _tempSprite2 = NULL;
+ _tempSprite2 = nullptr;
_state = STATE_READY;
} else {
_tempSprite2 = getTalkStance(_sentence->getNextStance());
@@ -673,7 +673,7 @@ bool AdEntity::update() {
if (_theora->isFinished()) {
_theora->stop();
delete _theora;
- _theora = NULL;
+ _theora = nullptr;
}
}
@@ -737,7 +737,7 @@ bool AdEntity::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
if (_theora) {
_theora->stop();
delete _theora;
- _theora = NULL;
+ _theora = nullptr;
stack->pushBool(true);
} else {
stack->pushBool(false);
@@ -830,7 +830,7 @@ bool AdEntity::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
stack->correctParams(0);
if (_region) {
_gameRef->unregisterObject(_region);
- _region = NULL;
+ _region = nullptr;
stack->pushBool(true);
} else {
stack->pushBool(false);
@@ -1071,7 +1071,7 @@ int AdEntity::getHeight() {
if (_region && !_sprite) {
return _region->_rect.bottom - _region->_rect.top;
} else {
- if (_currentSprite == NULL) {
+ if (_currentSprite == nullptr) {
_currentSprite = _sprite;
}
return AdObject::getHeight();
@@ -1117,15 +1117,15 @@ void AdEntity::setItem(const char *itemName) {
//////////////////////////////////////////////////////////////////////////
bool AdEntity::setSprite(const char *filename) {
if (_currentSprite == _sprite) {
- _currentSprite = NULL;
+ _currentSprite = nullptr;
}
delete _sprite;
- _sprite = NULL;
+ _sprite = nullptr;
BaseSprite *spr = new BaseSprite(_gameRef, this);
if (!spr || DID_FAIL(spr->loadFile(filename))) {
delete _sprite;
- _sprite = NULL;
+ _sprite = nullptr;
return STATUS_FAILED;
} else {
_sprite = spr;
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index 29e932a586..b9775ba7d1 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -69,22 +69,22 @@ IMPLEMENT_PERSISTENT(AdGame, true)
//////////////////////////////////////////////////////////////////////////
AdGame::AdGame(const Common::String &gameId) : BaseGame(gameId) {
- _responseBox = NULL;
- _inventoryBox = NULL;
+ _responseBox = nullptr;
+ _inventoryBox = nullptr;
_scene = new AdScene(_gameRef);
_scene->setName("");
registerObject(_scene);
- _prevSceneName = NULL;
- _prevSceneFilename = NULL;
- _scheduledScene = NULL;
+ _prevSceneName = nullptr;
+ _prevSceneFilename = nullptr;
+ _scheduledScene = nullptr;
_scheduledFadeIn = false;
_stateEx = GAME_NORMAL;
- _selectedItem = NULL;
+ _selectedItem = nullptr;
_texItemLifeTime = 10000;
@@ -94,17 +94,17 @@ AdGame::AdGame(const Common::String &gameId) : BaseGame(gameId) {
_talkSkipButton = TALK_SKIP_LEFT;
- _sceneViewport = NULL;
+ _sceneViewport = nullptr;
_initialScene = true;
- _debugStartupScene = NULL;
- _startupScene = NULL;
+ _debugStartupScene = nullptr;
+ _startupScene = nullptr;
_invObject = new AdObject(this);
_inventoryOwner = _invObject;
_tempDisableSaveState = false;
- _itemsFile = NULL;
+ _itemsFile = nullptr;
_smartItemCursor = false;
@@ -122,7 +122,7 @@ AdGame::~AdGame() {
bool AdGame::cleanup() {
for (uint32 i = 0; i < _objects.size(); i++) {
unregisterObject(_objects[i]);
- _objects[i] = NULL;
+ _objects[i] = nullptr;
}
_objects.clear();
@@ -139,7 +139,7 @@ bool AdGame::cleanup() {
unregisterObject(_scene);
- _scene = NULL;
+ _scene = nullptr;
// remove items
for (uint32 i = 0; i < _items.size(); i++) {
@@ -150,7 +150,7 @@ bool AdGame::cleanup() {
// clear remaining inventories
delete _invObject;
- _invObject = NULL;
+ _invObject = nullptr;
for (uint32 i = 0; i < _inventories.size(); i++) {
delete _inventories[i];
@@ -160,12 +160,12 @@ bool AdGame::cleanup() {
if (_responseBox) {
_gameRef->unregisterObject(_responseBox);
- _responseBox = NULL;
+ _responseBox = nullptr;
}
if (_inventoryBox) {
_gameRef->unregisterObject(_inventoryBox);
- _inventoryBox = NULL;
+ _inventoryBox = nullptr;
}
delete[] _prevSceneName;
@@ -173,15 +173,15 @@ bool AdGame::cleanup() {
delete[] _scheduledScene;
delete[] _debugStartupScene;
delete[] _itemsFile;
- _prevSceneName = NULL;
- _prevSceneFilename = NULL;
- _scheduledScene = NULL;
- _debugStartupScene = NULL;
- _startupScene = NULL;
- _itemsFile = NULL;
+ _prevSceneName = nullptr;
+ _prevSceneFilename = nullptr;
+ _scheduledScene = nullptr;
+ _debugStartupScene = nullptr;
+ _startupScene = nullptr;
+ _itemsFile = nullptr;
delete _sceneViewport;
- _sceneViewport = NULL;
+ _sceneViewport = nullptr;
for (uint32 i = 0; i < _sceneStates.size(); i++) {
delete _sceneStates[i];
@@ -207,9 +207,9 @@ bool AdGame::initLoop() {
if (_scheduledScene && _transMgr->isReady()) {
changeScene(_scheduledScene, _scheduledFadeIn);
delete[] _scheduledScene;
- _scheduledScene = NULL;
+ _scheduledScene = nullptr;
- _gameRef->_activeObject = NULL;
+ _gameRef->_activeObject = nullptr;
}
@@ -258,7 +258,7 @@ bool AdGame::removeObject(AdObject *object) {
//////////////////////////////////////////////////////////////////////////
bool AdGame::changeScene(const char *filename, bool fadeIn) {
- if (_scene == NULL) {
+ if (_scene == nullptr) {
_scene = new AdScene(_gameRef);
registerObject(_scene);
} else {
@@ -297,7 +297,7 @@ bool AdGame::changeScene(const char *filename, bool fadeIn) {
// invalidate references to the original scene
for (uint32 i = 0; i < _objects.size(); i++) {
_objects[i]->invalidateCurrRegions();
- _objects[i]->_stickRegion = NULL;
+ _objects[i]->_stickRegion = nullptr;
}
_scene->loadState();
@@ -385,7 +385,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
stack->pushNative(act, true);
} else {
delete act;
- act = NULL;
+ act = nullptr;
stack->pushNULL();
}
return STATUS_OK;
@@ -402,7 +402,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
stack->pushNative(ent, true);
} else {
delete ent;
- ent = NULL;
+ ent = nullptr;
stack->pushNULL();
}
return STATUS_OK;
@@ -463,7 +463,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
stack->correctParams(1);
ScValue *val = stack->pop();
- AdItem *item = NULL;
+ AdItem *item = nullptr;
if (val->isNative()) {
item = (AdItem *)val->getNative();
} else {
@@ -485,7 +485,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
stack->correctParams(1);
ScValue *val = stack->pop();
- AdItem *item = NULL;
+ AdItem *item = nullptr;
if (val->isInt()) {
int index = val->getInt();
if (index >= 0 && index < (int32)_items.size()) {
@@ -639,7 +639,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
branchName = val->getString();
}
- startDlgBranch(branchName.c_str(), script->_filename == NULL ? "" : script->_filename, script->_threadEvent == NULL ? "" : script->_threadEvent);
+ startDlgBranch(branchName.c_str(), script->_filename == nullptr ? "" : script->_filename, script->_threadEvent == nullptr ? "" : script->_threadEvent);
stack->pushNULL();
return STATUS_OK;
@@ -651,12 +651,12 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
else if (strcmp(name, "EndDlgBranch") == 0) {
stack->correctParams(1);
- const char *branchName = NULL;
+ const char *branchName = nullptr;
ScValue *val = stack->pop();
if (!val->isNULL()) {
branchName = val->getString();
}
- endDlgBranch(branchName, script->_filename == NULL ? "" : script->_filename, script->_threadEvent == NULL ? "" : script->_threadEvent);
+ endDlgBranch(branchName, script->_filename == nullptr ? "" : script->_filename, script->_threadEvent == nullptr ? "" : script->_threadEvent);
stack->pushNULL();
@@ -777,7 +777,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
stack->pushBool(true);
} else {
delete _responseBox;
- _responseBox = NULL;
+ _responseBox = nullptr;
stack->pushBool(false);
}
return STATUS_OK;
@@ -797,7 +797,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
stack->pushBool(true);
} else {
delete _inventoryBox;
- _inventoryBox = NULL;
+ _inventoryBox = nullptr;
stack->pushBool(false);
}
return STATUS_OK;
@@ -1036,7 +1036,7 @@ ScValue *AdGame::scGetProperty(const Common::String &name) {
// ChangingScene
//////////////////////////////////////////////////////////////////////////
else if (name == "ChangingScene") {
- _scValue->setBool(_scheduledScene != NULL);
+ _scValue->setBool(_scheduledScene != nullptr);
return _scValue;
}
@@ -1066,10 +1066,10 @@ bool AdGame::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "SelectedItem") == 0) {
if (value->isNULL()) {
- _selectedItem = NULL;
+ _selectedItem = nullptr;
} else {
if (value->isNative()) {
- _selectedItem = NULL;
+ _selectedItem = nullptr;
for (uint32 i = 0; i < _items.size(); i++) {
if (_items[i] == value->getNative()) {
_selectedItem = (AdItem *)value->getNative();
@@ -1158,9 +1158,9 @@ bool AdGame::scSetProperty(const char *name, ScValue *value) {
// StartupScene
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "StartupScene") == 0) {
- if (value == NULL) {
+ if (value == nullptr) {
delete[] _startupScene;
- _startupScene = NULL;
+ _startupScene = nullptr;
} else {
BaseUtils::setString(&_startupScene, value->getString());
}
@@ -1242,7 +1242,7 @@ bool AdGame::showCursor() {
//////////////////////////////////////////////////////////////////////////
bool AdGame::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdGame::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -1316,7 +1316,7 @@ bool AdGame::loadBuffer(byte *buffer, bool complete) {
registerObject(_responseBox);
} else {
delete _responseBox;
- _responseBox = NULL;
+ _responseBox = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -1328,7 +1328,7 @@ bool AdGame::loadBuffer(byte *buffer, bool complete) {
registerObject(_inventoryBox);
} else {
delete _inventoryBox;
- _inventoryBox = NULL;
+ _inventoryBox = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -1338,7 +1338,7 @@ bool AdGame::loadBuffer(byte *buffer, bool complete) {
BaseUtils::setString(&_itemsFile, (char *)params2);
if (DID_FAIL(loadItemsFile(_itemsFile))) {
delete[] _itemsFile;
- _itemsFile = NULL;
+ _itemsFile = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -1456,7 +1456,7 @@ bool AdGame::persist(BasePersistenceManager *persistMgr) {
//////////////////////////////////////////////////////////////////////////
void AdGame::setPrevSceneName(const char *name) {
delete[] _prevSceneName;
- _prevSceneName = NULL;
+ _prevSceneName = nullptr;
if (name) {
_prevSceneName = new char[strlen(name) + 1];
if (_prevSceneName) {
@@ -1469,7 +1469,7 @@ void AdGame::setPrevSceneName(const char *name) {
//////////////////////////////////////////////////////////////////////////
void AdGame::setPrevSceneFilename(const char *name) {
delete[] _prevSceneFilename;
- _prevSceneFilename = NULL;
+ _prevSceneFilename = nullptr;
if (name) {
_prevSceneFilename = new char[strlen(name) + 1];
if (_prevSceneFilename) {
@@ -1482,7 +1482,7 @@ void AdGame::setPrevSceneFilename(const char *name) {
//////////////////////////////////////////////////////////////////////////
bool AdGame::scheduleChangeScene(const char *filename, bool fadeIn) {
delete[] _scheduledScene;
- _scheduledScene = NULL;
+ _scheduledScene = nullptr;
if (_scene && !_scene->_initialized) {
return changeScene(filename, fadeIn);
@@ -1499,7 +1499,7 @@ bool AdGame::scheduleChangeScene(const char *filename, bool fadeIn) {
//////////////////////////////////////////////////////////////////////////
bool AdGame::getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *extMinor) {
- BaseGame::getVersion(verMajor, verMinor, NULL, NULL);
+ BaseGame::getVersion(verMajor, verMinor, nullptr, nullptr);
if (extMajor) {
*extMajor = 0;
@@ -1515,7 +1515,7 @@ bool AdGame::getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *ex
//////////////////////////////////////////////////////////////////////////
bool AdGame::loadItemsFile(const char *filename, bool merge) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdGame::LoadItemsFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -1567,7 +1567,7 @@ bool AdGame::loadItemsBuffer(byte *buffer, bool merge) {
addItem(item);
} else {
delete item;
- item = NULL;
+ item = nullptr;
cmd = PARSERR_GENERIC;
}
}
@@ -1615,7 +1615,7 @@ AdSceneState *AdGame::getSceneState(const char *filename, bool saving) {
return ret;
} else {
delete[] filenameCor;
- return NULL;
+ return nullptr;
}
}
@@ -1635,7 +1635,7 @@ bool AdGame::windowLoadHook(UIWindow *win, char **buffer, char **params) {
UIEntity *ent = new UIEntity(_gameRef);
if (!ent || DID_FAIL(ent->loadBuffer((byte *)*params, false))) {
delete ent;
- ent = NULL;
+ ent = nullptr;
cmd = PARSERR_GENERIC;
} else {
ent->_parent = win;
@@ -1689,12 +1689,12 @@ bool AdGame::startDlgBranch(const char *branchName, const char *scriptName, cons
//////////////////////////////////////////////////////////////////////////
bool AdGame::endDlgBranch(const char *branchName, const char *scriptName, const char *eventName) {
- char *name = NULL;
+ char *name = nullptr;
bool deleteName = false;
- if (branchName == NULL && _dlgPendingBranches.size() > 0) {
+ if (branchName == nullptr && _dlgPendingBranches.size() > 0) {
name = _dlgPendingBranches[_dlgPendingBranches.size() - 1];
} else {
- if (branchName != NULL) {
+ if (branchName != nullptr) {
name = new char[strlen(branchName) + 1 + strlen(scriptName) + 1 + strlen(eventName) + 1];
if (name) {
sprintf(name, "%s.%s.%s", branchName, scriptName, eventName);
@@ -1703,7 +1703,7 @@ bool AdGame::endDlgBranch(const char *branchName, const char *scriptName, const
}
}
- if (name == NULL) {
+ if (name == nullptr) {
return STATUS_OK;
}
@@ -1719,7 +1719,7 @@ bool AdGame::endDlgBranch(const char *branchName, const char *scriptName, const
for (uint32 i = startIndex; i < _dlgPendingBranches.size(); i++) {
//ClearBranchResponses(_dlgPendingBranches[i]);
delete[] _dlgPendingBranches[i];
- _dlgPendingBranches[i] = NULL;
+ _dlgPendingBranches[i] = nullptr;
}
_dlgPendingBranches.remove_at(startIndex, _dlgPendingBranches.size() - startIndex);
}
@@ -1760,7 +1760,7 @@ bool AdGame::addBranchResponse(int id) {
}
AdResponseContext *r = new AdResponseContext(_gameRef);
r->_id = id;
- r->setContext(_dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : NULL);
+ r->setContext(_dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : nullptr);
_responsesBranch.add(r);
return STATUS_OK;
}
@@ -1768,10 +1768,10 @@ bool AdGame::addBranchResponse(int id) {
//////////////////////////////////////////////////////////////////////////
bool AdGame::branchResponseUsed(int id) {
- char *context = _dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : NULL;
+ char *context = _dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : nullptr;
for (uint32 i = 0; i < _responsesBranch.size(); i++) {
if (_responsesBranch[i]->_id == id) {
- if ((context == NULL && _responsesBranch[i]->_context == NULL) || scumm_stricmp(context, _responsesBranch[i]->_context) == 0) {
+ if ((context == nullptr && _responsesBranch[i]->_context == nullptr) || scumm_stricmp(context, _responsesBranch[i]->_context) == 0) {
return true;
}
}
@@ -1787,7 +1787,7 @@ bool AdGame::addGameResponse(int id) {
}
AdResponseContext *r = new AdResponseContext(_gameRef);
r->_id = id;
- r->setContext(_dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : NULL);
+ r->setContext(_dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : nullptr);
_responsesGame.add(r);
return STATUS_OK;
}
@@ -1795,11 +1795,11 @@ bool AdGame::addGameResponse(int id) {
//////////////////////////////////////////////////////////////////////////
bool AdGame::gameResponseUsed(int id) {
- char *context = _dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : NULL;
+ char *context = _dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : nullptr;
for (uint32 i = 0; i < _responsesGame.size(); i++) {
AdResponseContext *respContext = _responsesGame[i];
if (respContext->_id == id) {
- if ((context == NULL && respContext->_context == NULL) || ((context != NULL && respContext->_context != NULL) && scumm_stricmp(context, respContext->_context) == 0)) {
+ if ((context == nullptr && respContext->_context == nullptr) || ((context != nullptr && respContext->_context != nullptr) && scumm_stricmp(context, respContext->_context) == 0)) {
return true;
}
}
@@ -1810,11 +1810,11 @@ bool AdGame::gameResponseUsed(int id) {
//////////////////////////////////////////////////////////////////////////
bool AdGame::resetResponse(int id) {
- char *context = _dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : NULL;
+ char *context = _dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : nullptr;
for (uint32 i = 0; i < _responsesGame.size(); i++) {
if (_responsesGame[i]->_id == id) {
- if ((context == NULL && _responsesGame[i]->_context == NULL) || scumm_stricmp(context, _responsesGame[i]->_context) == 0) {
+ if ((context == nullptr && _responsesGame[i]->_context == nullptr) || scumm_stricmp(context, _responsesGame[i]->_context) == 0) {
delete _responsesGame[i];
_responsesGame.remove_at(i);
break;
@@ -1824,7 +1824,7 @@ bool AdGame::resetResponse(int id) {
for (uint32 i = 0; i < _responsesBranch.size(); i++) {
if (_responsesBranch[i]->_id == id) {
- if ((context == NULL && _responsesBranch[i]->_context == NULL) || scumm_stricmp(context, _responsesBranch[i]->_context) == 0) {
+ if ((context == nullptr && _responsesBranch[i]->_context == nullptr) || scumm_stricmp(context, _responsesBranch[i]->_context) == 0) {
delete _responsesBranch[i];
_responsesBranch.remove_at(i);
break;
@@ -1863,7 +1863,7 @@ bool AdGame::displayContent(bool doUpdate, bool displayAll) {
}
if (_theoraPlayer->isFinished()) {
delete _theoraPlayer;
- _theoraPlayer = NULL;
+ _theoraPlayer = nullptr;
}
} else {
@@ -1912,7 +1912,7 @@ bool AdGame::displayContent(bool doUpdate, bool displayAll) {
_loadingIcon->display(_loadingIconX, _loadingIconY);
if (!_loadingIconPersistent) {
delete _loadingIcon;
- _loadingIcon = NULL;
+ _loadingIcon = nullptr;
}
}
@@ -1965,7 +1965,7 @@ AdItem *AdGame::getItemByName(const char *name) {
return _items[i];
}
}
- return NULL;
+ return nullptr;
}
@@ -2026,7 +2026,7 @@ bool AdGame::deleteItem(AdItem *item) {
}
if (_selectedItem == item) {
- _selectedItem = NULL;
+ _selectedItem = nullptr;
}
_scene->handleItemAssociations(item->getName(), false);
@@ -2115,7 +2115,7 @@ char *AdGame::findSpeechFile(char *stringID) {
}
}
delete[] ret;
- return NULL;
+ return nullptr;
}
@@ -2145,14 +2145,14 @@ bool AdGame::onMouseLeftDown() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("LeftClick"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("LeftClick");
} else if (_state == GAME_RUNNING && _scene && _scene->pointInViewport(_mousePos.x, _mousePos.y)) {
_scene->applyEvent("LeftClick");
}
}
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_gameRef->_capturedObject = _gameRef->_activeObject;
}
_mouseLeftDown = true;
@@ -2168,12 +2168,12 @@ bool AdGame::onMouseLeftUp() {
}
BasePlatform::releaseCapture();
- _capturedObject = NULL;
+ _capturedObject = nullptr;
_mouseLeftDown = false;
bool handled = /*_state==GAME_RUNNING &&*/ DID_SUCCEED(applyEvent("LeftRelease"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("LeftRelease");
} else if (_state == GAME_RUNNING && _scene && _scene->pointInViewport(_mousePos.x, _mousePos.y)) {
_scene->applyEvent("LeftRelease");
@@ -2198,7 +2198,7 @@ bool AdGame::onMouseLeftDblClick() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("LeftDoubleClick"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("LeftDoubleClick");
} else if (_state == GAME_RUNNING && _scene && _scene->pointInViewport(_mousePos.x, _mousePos.y)) {
_scene->applyEvent("LeftDoubleClick");
@@ -2229,7 +2229,7 @@ bool AdGame::onMouseRightDown() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("RightClick"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("RightClick");
} else if (_state == GAME_RUNNING && _scene && _scene->pointInViewport(_mousePos.x, _mousePos.y)) {
_scene->applyEvent("RightClick");
@@ -2246,7 +2246,7 @@ bool AdGame::onMouseRightUp() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("RightRelease"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("RightRelease");
} else if (_state == GAME_RUNNING && _scene && _scene->pointInViewport(_mousePos.x, _mousePos.y)) {
_scene->applyEvent("RightRelease");
@@ -2272,7 +2272,7 @@ bool AdGame::displayDebugInfo() {
//////////////////////////////////////////////////////////////////////////
bool AdGame::onScriptShutdown(ScScript *script) {
if (_responseBox && _responseBox->_waitingScript == script) {
- _responseBox->_waitingScript = NULL;
+ _responseBox->_waitingScript = nullptr;
}
return STATUS_OK;
diff --git a/engines/wintermute/ad/ad_inventory.cpp b/engines/wintermute/ad/ad_inventory.cpp
index 72f8fa0fb4..e9b6e56f16 100644
--- a/engines/wintermute/ad/ad_inventory.cpp
+++ b/engines/wintermute/ad/ad_inventory.cpp
@@ -50,12 +50,12 @@ AdInventory::~AdInventory() {
//////////////////////////////////////////////////////////////////////////
bool AdInventory::insertItem(const char *name, const char *insertAfter) {
- if (name == NULL) {
+ if (name == nullptr) {
return STATUS_FAILED;
}
AdItem *item = ((AdGame *)_gameRef)->getItemByName(name);
- if (item == NULL) {
+ if (item == nullptr) {
return STATUS_FAILED;
}
@@ -84,14 +84,14 @@ bool AdInventory::insertItem(const char *name, const char *insertAfter) {
//////////////////////////////////////////////////////////////////////////
bool AdInventory::removeItem(const char *name) {
- if (name == NULL) {
+ if (name == nullptr) {
return STATUS_FAILED;
}
for (uint32 i = 0; i < _takenItems.size(); i++) {
if (scumm_stricmp(_takenItems[i]->getName(), name) == 0) {
if (((AdGame *)_gameRef)->_selectedItem == _takenItems[i]) {
- ((AdGame *)_gameRef)->_selectedItem = NULL;
+ ((AdGame *)_gameRef)->_selectedItem = nullptr;
}
_takenItems.remove_at(i);
return STATUS_OK;
@@ -105,14 +105,14 @@ bool AdInventory::removeItem(const char *name) {
//////////////////////////////////////////////////////////////////////////
bool AdInventory::removeItem(AdItem *item) {
- if (item == NULL) {
+ if (item == nullptr) {
return STATUS_FAILED;
}
for (uint32 i = 0; i < _takenItems.size(); i++) {
if (_takenItems[i] == item) {
if (((AdGame *)_gameRef)->_selectedItem == _takenItems[i]) {
- ((AdGame *)_gameRef)->_selectedItem = NULL;
+ ((AdGame *)_gameRef)->_selectedItem = nullptr;
}
_takenItems.remove_at(i);
return STATUS_OK;
diff --git a/engines/wintermute/ad/ad_inventory.h b/engines/wintermute/ad/ad_inventory.h
index 4017d914bc..f226a65612 100644
--- a/engines/wintermute/ad/ad_inventory.h
+++ b/engines/wintermute/ad/ad_inventory.h
@@ -40,7 +40,7 @@ public:
DECLARE_PERSISTENT(AdInventory, BaseObject)
bool removeItem(const char *name);
bool removeItem(AdItem *Item);
- bool insertItem(const char *name, const char *insertAfter = NULL);
+ bool insertItem(const char *name, const char *insertAfter = nullptr);
AdInventory(BaseGame *inGame);
virtual ~AdInventory();
BaseArray<AdItem *> _takenItems;
diff --git a/engines/wintermute/ad/ad_inventory_box.cpp b/engines/wintermute/ad/ad_inventory_box.cpp
index 7ae8ff8d69..194d975155 100644
--- a/engines/wintermute/ad/ad_inventory_box.cpp
+++ b/engines/wintermute/ad/ad_inventory_box.cpp
@@ -54,8 +54,8 @@ AdInventoryBox::AdInventoryBox(BaseGame *inGame) : BaseObject(inGame) {
_itemWidth = _itemHeight = 50;
_scrollBy = 1;
- _window = NULL;
- _closeButton = NULL;
+ _window = nullptr;
+ _closeButton = nullptr;
_hideSelected = false;
@@ -67,10 +67,10 @@ AdInventoryBox::AdInventoryBox(BaseGame *inGame) : BaseObject(inGame) {
//////////////////////////////////////////////////////////////////////////
AdInventoryBox::~AdInventoryBox() {
_gameRef->unregisterObject(_window);
- _window = NULL;
+ _window = nullptr;
delete _closeButton;
- _closeButton = NULL;
+ _closeButton = nullptr;
}
@@ -166,7 +166,7 @@ bool AdInventoryBox::display() {
//////////////////////////////////////////////////////////////////////////
bool AdInventoryBox::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdInventoryBox::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -256,7 +256,7 @@ bool AdInventoryBox::loadBuffer(byte *buffer, bool complete) {
_window = new UIWindow(_gameRef);
if (!_window || DID_FAIL(_window->loadBuffer(params, false))) {
delete _window;
- _window = NULL;
+ _window = nullptr;
cmd = PARSERR_GENERIC;
} else {
_gameRef->registerObject(_window);
diff --git a/engines/wintermute/ad/ad_item.cpp b/engines/wintermute/ad/ad_item.cpp
index 427b1c7db4..8534956120 100644
--- a/engines/wintermute/ad/ad_item.cpp
+++ b/engines/wintermute/ad/ad_item.cpp
@@ -49,8 +49,8 @@ IMPLEMENT_PERSISTENT(AdItem, false)
//////////////////////////////////////////////////////////////////////////
AdItem::AdItem(BaseGame *inGame) : AdTalkHolder(inGame) {
- _spriteHover = NULL;
- _cursorNormal = _cursorHover = NULL;
+ _spriteHover = nullptr;
+ _cursorNormal = _cursorHover = nullptr;
_cursorCombined = true;
_inInventory = false;
@@ -60,7 +60,7 @@ AdItem::AdItem(BaseGame *inGame) : AdTalkHolder(inGame) {
_amountOffsetX = 0;
_amountOffsetY = 0;
_amountAlign = TAL_RIGHT;
- _amountString = NULL;
+ _amountString = nullptr;
_state = STATE_READY;
@@ -73,19 +73,19 @@ AdItem::~AdItem() {
delete _spriteHover;
delete _cursorNormal;
delete _cursorHover;
- _spriteHover = NULL;
- _cursorNormal = NULL;
- _cursorHover = NULL;
+ _spriteHover = nullptr;
+ _cursorNormal = nullptr;
+ _cursorHover = nullptr;
delete[] _amountString;
- _amountString = NULL;
+ _amountString = nullptr;
}
//////////////////////////////////////////////////////////////////////////
bool AdItem::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdItem::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -272,7 +272,7 @@ bool AdItem::loadBuffer(byte *buffer, bool complete) {
_cursorNormal = new BaseSprite(_gameRef);
if (!_cursorNormal || DID_FAIL(_cursorNormal->loadFile((char *)params, ((AdGame *)_gameRef)->_texItemLifeTime))) {
delete _cursorNormal;
- _cursorNormal = NULL;
+ _cursorNormal = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -282,7 +282,7 @@ bool AdItem::loadBuffer(byte *buffer, bool complete) {
_cursorHover = new BaseSprite(_gameRef);
if (!_cursorHover || DID_FAIL(_cursorHover->loadFile((char *)params, ((AdGame *)_gameRef)->_texItemLifeTime))) {
delete _cursorHover;
- _cursorHover = NULL;
+ _cursorHover = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -332,15 +332,15 @@ bool AdItem::loadBuffer(byte *buffer, bool complete) {
//////////////////////////////////////////////////////////////////////////
bool AdItem::update() {
- _currentSprite = NULL;
+ _currentSprite = nullptr;
if (_state == STATE_READY && _animSprite) {
delete _animSprite;
- _animSprite = NULL;
+ _animSprite = nullptr;
}
// finished playing animation?
- if (_state == STATE_PLAYING_ANIM && _animSprite != NULL && _animSprite->isFinished()) {
+ if (_state == STATE_PLAYING_ANIM && _animSprite != nullptr && _animSprite->isFinished()) {
_state = STATE_READY;
_currentSprite = _animSprite;
}
@@ -379,10 +379,10 @@ bool AdItem::update() {
}
bool timeIsUp = (_sentence->_sound && _sentence->_soundStarted && (!_sentence->_sound->isPlaying() && !_sentence->_sound->isPaused())) || (!_sentence->_sound && _sentence->_duration <= _gameRef->_timer - _sentence->_startTime);
- if (_tempSprite2 == NULL || _tempSprite2->isFinished() || (/*_tempSprite2->_looping &&*/ timeIsUp)) {
+ if (_tempSprite2 == nullptr || _tempSprite2->isFinished() || (/*_tempSprite2->_looping &&*/ timeIsUp)) {
if (timeIsUp) {
_sentence->finish();
- _tempSprite2 = NULL;
+ _tempSprite2 = nullptr;
_state = STATE_READY;
} else {
_tempSprite2 = getTalkStance(_sentence->getNextStance());
@@ -435,7 +435,7 @@ bool AdItem::display(int x, int y) {
}
amountX += _amountOffsetX;
- BaseFont *font = _font ? _font : _gameRef->_systemFont;
+ BaseFont *font = _font ? _font : _gameRef->getSystemFont();
if (font) {
if (_amountString) {
font->drawText((byte *)_amountString, amountX, amountY, width, _amountAlign);
@@ -469,7 +469,7 @@ bool AdItem::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
const char *filename = stack->pop()->getString();
delete _spriteHover;
- _spriteHover = NULL;
+ _spriteHover = nullptr;
BaseSprite *spr = new BaseSprite(_gameRef, this);
if (!spr || DID_FAIL(spr->loadFile(filename))) {
stack->pushBool(false);
@@ -520,7 +520,7 @@ bool AdItem::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
const char *filename = stack->pop()->getString();
delete _cursorNormal;
- _cursorNormal = NULL;
+ _cursorNormal = nullptr;
BaseSprite *spr = new BaseSprite(_gameRef);
if (!spr || DID_FAIL(spr->loadFile(filename))) {
stack->pushBool(false);
@@ -569,7 +569,7 @@ bool AdItem::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
const char *filename = stack->pop()->getString();
delete _cursorHover;
- _cursorHover = NULL;
+ _cursorHover = nullptr;
BaseSprite *spr = new BaseSprite(_gameRef);
if (!spr || DID_FAIL(spr->loadFile(filename))) {
stack->pushBool(false);
@@ -753,7 +753,7 @@ bool AdItem::scSetProperty(const char *name, ScValue *value) {
else if (strcmp(name, "AmountString") == 0) {
if (value->isNULL()) {
delete[] _amountString;
- _amountString = NULL;
+ _amountString = nullptr;
} else {
BaseUtils::setString(&_amountString, value->getString());
}
diff --git a/engines/wintermute/ad/ad_layer.cpp b/engines/wintermute/ad/ad_layer.cpp
index 209c12b7a2..7bf79e4ae5 100644
--- a/engines/wintermute/ad/ad_layer.cpp
+++ b/engines/wintermute/ad/ad_layer.cpp
@@ -63,7 +63,7 @@ AdLayer::~AdLayer() {
//////////////////////////////////////////////////////////////////////////
bool AdLayer::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdLayer::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -174,8 +174,8 @@ bool AdLayer::loadBuffer(byte *buffer, bool complete) {
cmd = PARSERR_GENERIC;
delete region;
delete node;
- region = NULL;
- node = NULL;
+ region = nullptr;
+ node = nullptr;
} else {
node->setRegion(region);
_nodes.add(node);
@@ -193,8 +193,8 @@ bool AdLayer::loadBuffer(byte *buffer, bool complete) {
cmd = PARSERR_GENERIC;
delete entity;
delete node;
- entity = NULL;
- node = NULL;
+ entity = nullptr;
+ node = nullptr;
} else {
node->setEntity(entity);
_nodes.add(node);
@@ -339,7 +339,7 @@ bool AdLayer::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
stack->correctParams(1);
ScValue *val = stack->pop();
- AdSceneNode *toDelete = NULL;
+ AdSceneNode *toDelete = nullptr;
if (val->isNative()) {
BaseScriptable *temp = val->getNative();
for (uint32 i = 0; i < _nodes.size(); i++) {
@@ -354,7 +354,7 @@ bool AdLayer::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
toDelete = _nodes[index];
}
}
- if (toDelete == NULL) {
+ if (toDelete == nullptr) {
stack->pushBool(false);
return STATUS_OK;
}
@@ -362,7 +362,7 @@ bool AdLayer::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
for (uint32 i = 0; i < _nodes.size(); i++) {
if (_nodes[i] == toDelete) {
delete _nodes[i];
- _nodes[i] = NULL;
+ _nodes[i] = nullptr;
_nodes.remove_at(i);
break;
}
diff --git a/engines/wintermute/ad/ad_node_state.cpp b/engines/wintermute/ad/ad_node_state.cpp
index 493156c750..34e220569f 100644
--- a/engines/wintermute/ad/ad_node_state.cpp
+++ b/engines/wintermute/ad/ad_node_state.cpp
@@ -42,14 +42,14 @@ IMPLEMENT_PERSISTENT(AdNodeState, false)
//////////////////////////////////////////////////////////////////////////
AdNodeState::AdNodeState(BaseGame *inGame) : BaseClass(inGame) {
- _name = NULL;
+ _name = nullptr;
_active = false;
for (int i = 0; i < 7; i++) {
- _caption[i] = NULL;
+ _caption[i] = nullptr;
}
_alphaColor = 0;
- _filename = NULL;
- _cursor = NULL;
+ _filename = nullptr;
+ _cursor = nullptr;
}
@@ -58,12 +58,12 @@ AdNodeState::~AdNodeState() {
delete[] _name;
delete[] _filename;
delete[] _cursor;
- _name = NULL;
- _filename = NULL;
- _cursor = NULL;
+ _name = nullptr;
+ _filename = nullptr;
+ _cursor = nullptr;
for (int i = 0; i < 7; i++) {
delete[] _caption[i];
- _caption[i] = NULL;
+ _caption[i] = nullptr;
}
}
@@ -71,7 +71,7 @@ AdNodeState::~AdNodeState() {
//////////////////////////////////////////////////////////////////////////
void AdNodeState::setName(const char *name) {
delete[] _name;
- _name = NULL;
+ _name = nullptr;
BaseUtils::setString(&_name, name);
}
@@ -79,7 +79,7 @@ void AdNodeState::setName(const char *name) {
//////////////////////////////////////////////////////////////////////////
void AdNodeState::setFilename(const char *filename) {
delete[] _filename;
- _filename = NULL;
+ _filename = nullptr;
BaseUtils::setString(&_filename, filename);
}
@@ -87,7 +87,7 @@ void AdNodeState::setFilename(const char *filename) {
//////////////////////////////////////////////////////////////////////////
void AdNodeState::setCursor(const char *filename) {
delete[] _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
BaseUtils::setString(&_cursor, filename);
}
@@ -132,7 +132,7 @@ const char *AdNodeState::getCaption(int caseVal) {
if (caseVal == 0) {
caseVal = 1;
}
- if (caseVal < 1 || caseVal > 7 || _caption[caseVal - 1] == NULL) {
+ if (caseVal < 1 || caseVal > 7 || _caption[caseVal - 1] == nullptr) {
return "";
} else {
return _caption[caseVal - 1];
diff --git a/engines/wintermute/ad/ad_object.cpp b/engines/wintermute/ad/ad_object.cpp
index a940b33805..a41ed9fbc3 100644
--- a/engines/wintermute/ad/ad_object.cpp
+++ b/engines/wintermute/ad/ad_object.cpp
@@ -65,27 +65,27 @@ AdObject::AdObject(BaseGame *inGame) : BaseObject(inGame) {
_active = true;
_drawn = false;
- _currentSprite = NULL;
- _animSprite = NULL;
- _tempSprite2 = NULL;
+ _currentSprite = nullptr;
+ _animSprite = nullptr;
+ _tempSprite2 = nullptr;
- _font = NULL;
+ _font = nullptr;
- _sentence = NULL;
+ _sentence = nullptr;
- _forcedTalkAnimName = NULL;
+ _forcedTalkAnimName = nullptr;
_forcedTalkAnimUsed = false;
- _blockRegion = NULL;
- _wptGroup = NULL;
+ _blockRegion = nullptr;
+ _wptGroup = nullptr;
- _currentBlockRegion = NULL;
- _currentWptGroup = NULL;
+ _currentBlockRegion = nullptr;
+ _currentWptGroup = nullptr;
_ignoreItems = false;
_sceneIndependent = false;
- _stickRegion = NULL;
+ _stickRegion = nullptr;
_subtitlesModRelative = true;
_subtitlesModX = 0;
@@ -93,13 +93,13 @@ AdObject::AdObject(BaseGame *inGame) : BaseObject(inGame) {
_subtitlesWidth = 0;
_subtitlesModXCenter = true;
- _inventory = NULL;
+ _inventory = nullptr;
for (int i = 0; i < MAX_NUM_REGIONS; i++) {
- _currentRegions[i] = NULL;
+ _currentRegions[i] = nullptr;
}
- _partEmitter = NULL;
+ _partEmitter = nullptr;
_partFollowParent = false;
_partOffsetX = _partOffsetY = 0;
@@ -109,26 +109,26 @@ AdObject::AdObject(BaseGame *inGame) : BaseObject(inGame) {
//////////////////////////////////////////////////////////////////////////
AdObject::~AdObject() {
- _currentSprite = NULL; // reference only, don't delete
+ _currentSprite = nullptr; // reference only, don't delete
delete _animSprite;
- _animSprite = NULL;
+ _animSprite = nullptr;
delete _sentence;
- _sentence = NULL;
+ _sentence = nullptr;
delete[] _forcedTalkAnimName;
- _forcedTalkAnimName = NULL;
+ _forcedTalkAnimName = nullptr;
delete _blockRegion;
- _blockRegion = NULL;
+ _blockRegion = nullptr;
delete _wptGroup;
- _wptGroup = NULL;
+ _wptGroup = nullptr;
delete _currentBlockRegion;
- _currentBlockRegion = NULL;
+ _currentBlockRegion = nullptr;
delete _currentWptGroup;
- _currentWptGroup = NULL;
+ _currentWptGroup = nullptr;
- _tempSprite2 = NULL; // reference only
- _stickRegion = NULL;
+ _tempSprite2 = nullptr; // reference only
+ _stickRegion = nullptr;
if (_font) {
_gameRef->_fontStorage->removeFont(_font);
@@ -136,7 +136,7 @@ AdObject::~AdObject() {
if (_inventory) {
((AdGame *)_gameRef)->unregisterInventory(_inventory);
- _inventory = NULL;
+ _inventory = nullptr;
}
if (_partEmitter) {
@@ -159,7 +159,7 @@ AdObject::~AdObject() {
//////////////////////////////////////////////////////////////////////////
bool AdObject::playAnim(const char *filename) {
delete _animSprite;
- _animSprite = NULL;
+ _animSprite = nullptr;
_animSprite = new BaseSprite(_gameRef, this);
if (!_animSprite) {
_gameRef->LOG(0, "AdObject::PlayAnim: error creating temp sprite (object:\"%s\" sprite:\"%s\")", getName(), filename);
@@ -169,7 +169,7 @@ bool AdObject::playAnim(const char *filename) {
if (DID_FAIL(res)) {
_gameRef->LOG(res, "AdObject::PlayAnim: error loading temp sprite (object:\"%s\" sprite:\"%s\")", getName(), filename);
delete _animSprite;
- _animSprite = NULL;
+ _animSprite = nullptr;
return res;
}
_state = STATE_PLAYING_ANIM;
@@ -274,7 +274,7 @@ bool AdObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
int duration = stack->pop()->getInt();
ScValue *valStances = stack->pop();
- const char *stances = valStances->isNULL() ? NULL : valStances->getString();
+ const char *stances = valStances->isNULL() ? nullptr : valStances->getString();
int align = 0;
ScValue *val = stack->pop();
@@ -286,7 +286,7 @@ bool AdObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
align = MIN(MAX(0, align), NUM_TEXT_ALIGN - 1);
- const char *sound = soundVal->isNULL() ? NULL : soundVal->getString();
+ const char *sound = soundVal->isNULL() ? nullptr : soundVal->getString();
talk(text, sound, duration, stances, (TTextAlign)align);
if (strcmp(name, "TalkAsync") != 0) {
@@ -309,7 +309,7 @@ bool AdObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
uint32 i;
ScValue *val = stack->pop();
if (val->isNULL() || !main) {
- _stickRegion = NULL;
+ _stickRegion = nullptr;
regFound = true;
} else if (val->isString()) {
const char *regionName = val->getString();
@@ -334,7 +334,7 @@ bool AdObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
}
if (!regFound) {
- _stickRegion = NULL;
+ _stickRegion = nullptr;
}
stack->pushBool(regFound);
return STATUS_OK;
@@ -348,7 +348,7 @@ bool AdObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
ScValue *val = stack->pop();
if (val->isNULL()) {
- setFont(NULL);
+ setFont(nullptr);
} else {
setFont(val->getString());
}
@@ -385,7 +385,7 @@ bool AdObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
if (!val->isNULL()) {
const char *itemName = val->getString();
val = stack->pop();
- const char *insertAfter = val->isNULL() ? NULL : val->getString();
+ const char *insertAfter = val->isNULL() ? nullptr : val->getString();
if (DID_FAIL(_inventory->insertItem(itemName, insertAfter))) {
script->runtimeError("Cannot add item '%s' to inventory", itemName);
} else {
@@ -512,7 +512,7 @@ bool AdObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
stack->correctParams(0);
if (_partEmitter) {
_gameRef->unregisterObject(_partEmitter);
- _partEmitter = NULL;
+ _partEmitter = nullptr;
}
stack->pushNULL();
@@ -533,7 +533,7 @@ bool AdObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
AdEntity *ent = new AdEntity(_gameRef);
if (DID_FAIL(res = ent->loadFile(filename))) {
delete ent;
- ent = NULL;
+ ent = nullptr;
script->runtimeError("AddAttachment() failed loading entity '%s'", filename);
stack->pushBool(false);
} else {
@@ -611,7 +611,7 @@ bool AdObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
stack->correctParams(1);
ScValue *val = stack->pop();
- AdObject *ret = NULL;
+ AdObject *ret = nullptr;
if (val->isInt()) {
int index = val->getInt();
int currIndex = 0;
@@ -645,7 +645,7 @@ bool AdObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
}
}
- if (ret != NULL) {
+ if (ret != nullptr) {
stack->pushNative(ret, true);
} else {
stack->pushNULL();
@@ -851,9 +851,9 @@ bool AdObject::setFont(const char *filename) {
}
if (filename) {
_font = _gameRef->_fontStorage->addFont(filename);
- return _font == NULL ? STATUS_FAILED : STATUS_OK;
+ return _font == nullptr ? STATUS_FAILED : STATUS_OK;
} else {
- _font = NULL;
+ _font = nullptr;
return STATUS_OK;
}
}
@@ -893,12 +893,12 @@ void AdObject::talk(const char *text, const char *sound, uint32 duration, const
if (_forcedTalkAnimName && _forcedTalkAnimUsed) {
delete[] _forcedTalkAnimName;
- _forcedTalkAnimName = NULL;
+ _forcedTalkAnimName = nullptr;
_forcedTalkAnimUsed = false;
}
delete(_sentence->_sound);
- _sentence->_sound = NULL;
+ _sentence->_sound = nullptr;
_sentence->setText(text);
_gameRef->_stringTable->expand(&_sentence->_text);
@@ -907,7 +907,7 @@ void AdObject::talk(const char *text, const char *sound, uint32 duration, const
_sentence->_align = Align;
_sentence->_startTime = _gameRef->_timer;
_sentence->_currentStance = -1;
- _sentence->_font = _font == NULL ? _gameRef->_systemFont : _font;
+ _sentence->_font = _font == nullptr ? _gameRef->getSystemFont() : _font;
_sentence->_freezable = _freezable;
// try to locate speech file automatically
@@ -1012,9 +1012,9 @@ void AdObject::talk(const char *text, const char *sound, uint32 duration, const
//////////////////////////////////////////////////////////////////////////
bool AdObject::reset() {
- if (_state == STATE_PLAYING_ANIM && _animSprite != NULL) {
+ if (_state == STATE_PLAYING_ANIM && _animSprite != nullptr) {
delete _animSprite;
- _animSprite = NULL;
+ _animSprite = nullptr;
} else if (_state == STATE_TALKING && _sentence) {
_sentence->finish();
}
@@ -1157,7 +1157,7 @@ bool AdObject::afterMove() {
bool regFound = false;
for (int j = 0; j < MAX_NUM_REGIONS; j++) {
if (_currentRegions[j] == newRegions[i]) {
- _currentRegions[j] = NULL;
+ _currentRegions[j] = nullptr;
regFound = true;
break;
}
@@ -1180,7 +1180,7 @@ bool AdObject::afterMove() {
//////////////////////////////////////////////////////////////////////////
bool AdObject::invalidateCurrRegions() {
for (int i = 0; i < MAX_NUM_REGIONS; i++) {
- _currentRegions[i] = NULL;
+ _currentRegions[i] = nullptr;
}
return STATUS_OK;
}
diff --git a/engines/wintermute/ad/ad_object.h b/engines/wintermute/ad/ad_object.h
index 2a437c7e09..39480e3446 100644
--- a/engines/wintermute/ad/ad_object.h
+++ b/engines/wintermute/ad/ad_object.h
@@ -60,7 +60,7 @@ public:
virtual bool updateSounds();
bool reset();
DECLARE_PERSISTENT(AdObject, BaseObject)
- virtual void talk(const char *text, const char *sound = NULL, uint32 duration = 0, const char *stances = NULL, TTextAlign align = TAL_CENTER);
+ virtual void talk(const char *text, const char *sound = nullptr, uint32 duration = 0, const char *stances = nullptr, TTextAlign align = TAL_CENTER);
virtual int getHeight();
bool setFont(const char *filename);
diff --git a/engines/wintermute/ad/ad_path.cpp b/engines/wintermute/ad/ad_path.cpp
index c931213456..afdd29828c 100644
--- a/engines/wintermute/ad/ad_path.cpp
+++ b/engines/wintermute/ad/ad_path.cpp
@@ -64,7 +64,7 @@ BasePoint *AdPath::getFirst() {
_currIndex = 0;
return _points[_currIndex];
} else {
- return NULL;
+ return nullptr;
}
}
@@ -75,7 +75,7 @@ BasePoint *AdPath::getNext() {
if (_currIndex < (int32)_points.size()) {
return _points[_currIndex];
} else {
- return NULL;
+ return nullptr;
}
}
@@ -85,7 +85,7 @@ BasePoint *AdPath::getCurrent() {
if (_currIndex >= 0 && _currIndex < (int32)_points.size()) {
return _points[_currIndex];
} else {
- return NULL;
+ return nullptr;
}
}
diff --git a/engines/wintermute/ad/ad_path_point.cpp b/engines/wintermute/ad/ad_path_point.cpp
index a36648eb69..f3ccd264b1 100644
--- a/engines/wintermute/ad/ad_path_point.cpp
+++ b/engines/wintermute/ad/ad_path_point.cpp
@@ -39,7 +39,7 @@ AdPathPoint::AdPathPoint() {
_distance = 0;
_marked = false;
- _origin = NULL;
+ _origin = nullptr;
}
@@ -50,13 +50,13 @@ AdPathPoint::AdPathPoint(int initX, int initY, int initDistance) {
_distance = initDistance;
_marked = false;
- _origin = NULL;
+ _origin = nullptr;
}
//////////////////////////////////////////////////////////////////////////
AdPathPoint::~AdPathPoint() {
- _origin = NULL;
+ _origin = nullptr;
}
diff --git a/engines/wintermute/ad/ad_region.cpp b/engines/wintermute/ad/ad_region.cpp
index daf0c89606..acd5f13397 100644
--- a/engines/wintermute/ad/ad_region.cpp
+++ b/engines/wintermute/ad/ad_region.cpp
@@ -70,7 +70,7 @@ bool AdRegion::hasDecoration() const {
//////////////////////////////////////////////////////////////////////////
bool AdRegion::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdRegion::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
diff --git a/engines/wintermute/ad/ad_response.cpp b/engines/wintermute/ad/ad_response.cpp
index a2225f2632..e4993b9ad4 100644
--- a/engines/wintermute/ad/ad_response.cpp
+++ b/engines/wintermute/ad/ad_response.cpp
@@ -38,10 +38,10 @@ IMPLEMENT_PERSISTENT(AdResponse, false)
//////////////////////////////////////////////////////////////////////////
AdResponse::AdResponse(BaseGame *inGame) : BaseObject(inGame) {
- _text = NULL;
- _textOrig = NULL;
- _icon = _iconHover = _iconPressed = NULL;
- _font = NULL;
+ _text = nullptr;
+ _textOrig = nullptr;
+ _icon = _iconHover = _iconPressed = nullptr;
+ _font = nullptr;
_iD = 0;
_responseType = RESPONSE_ALWAYS;
}
@@ -54,11 +54,11 @@ AdResponse::~AdResponse() {
delete _icon;
delete _iconHover;
delete _iconPressed;
- _text = NULL;
- _textOrig = NULL;
- _icon = NULL;
- _iconHover = NULL;
- _iconPressed = NULL;
+ _text = nullptr;
+ _textOrig = nullptr;
+ _icon = nullptr;
+ _iconHover = nullptr;
+ _iconPressed = nullptr;
if (_font) {
_gameRef->_fontStorage->removeFont(_font);
}
@@ -79,7 +79,7 @@ bool AdResponse::setIcon(const char *filename) {
if (!_icon || DID_FAIL(_icon->loadFile(filename))) {
_gameRef->LOG(0, "AdResponse::setIcon failed for file '%s'", filename);
delete _icon;
- _icon = NULL;
+ _icon = nullptr;
return STATUS_FAILED;
}
return STATUS_OK;
@@ -105,7 +105,7 @@ bool AdResponse::setIconHover(const char *filename) {
if (!_iconHover || DID_FAIL(_iconHover->loadFile(filename))) {
_gameRef->LOG(0, "AdResponse::setIconHover failed for file '%s'", filename);
delete _iconHover;
- _iconHover = NULL;
+ _iconHover = nullptr;
return STATUS_FAILED;
}
return STATUS_OK;
@@ -119,7 +119,7 @@ bool AdResponse::setIconPressed(const char *filename) {
if (!_iconPressed || DID_FAIL(_iconPressed->loadFile(filename))) {
_gameRef->LOG(0, "AdResponse::setIconPressed failed for file '%s'", filename);
delete _iconPressed;
- _iconPressed = NULL;
+ _iconPressed = nullptr;
return STATUS_FAILED;
}
return STATUS_OK;
diff --git a/engines/wintermute/ad/ad_response_box.cpp b/engines/wintermute/ad/ad_response_box.cpp
index 45fd33d222..c891d2a019 100644
--- a/engines/wintermute/ad/ad_response_box.cpp
+++ b/engines/wintermute/ad/ad_response_box.cpp
@@ -52,9 +52,9 @@ IMPLEMENT_PERSISTENT(AdResponseBox, false)
//////////////////////////////////////////////////////////////////////////
AdResponseBox::AdResponseBox(BaseGame *inGame) : BaseObject(inGame) {
- _font = _fontHover = NULL;
+ _font = _fontHover = nullptr;
- _window = NULL;
+ _window = nullptr;
_shieldWindow = new UIWindow(_gameRef);
_horizontal = false;
@@ -62,9 +62,9 @@ AdResponseBox::AdResponseBox(BaseGame *inGame) : BaseObject(inGame) {
_scrollOffset = 0;
_spacing = 0;
- _waitingScript = NULL;
- _lastResponseText = NULL;
- _lastResponseTextOrig = NULL;
+ _waitingScript = nullptr;
+ _lastResponseText = nullptr;
+ _lastResponseTextOrig = nullptr;
_verticalAlign = VAL_BOTTOM;
_align = TAL_LEFT;
@@ -75,13 +75,13 @@ AdResponseBox::AdResponseBox(BaseGame *inGame) : BaseObject(inGame) {
AdResponseBox::~AdResponseBox() {
delete _window;
- _window = NULL;
+ _window = nullptr;
delete _shieldWindow;
- _shieldWindow = NULL;
+ _shieldWindow = nullptr;
delete[] _lastResponseText;
- _lastResponseText = NULL;
+ _lastResponseText = nullptr;
delete[] _lastResponseTextOrig;
- _lastResponseTextOrig = NULL;
+ _lastResponseTextOrig = nullptr;
if (_font) {
_gameRef->_fontStorage->removeFont(_font);
@@ -93,7 +93,7 @@ AdResponseBox::~AdResponseBox() {
clearResponses();
clearButtons();
- _waitingScript = NULL;
+ _waitingScript = nullptr;
}
uint32 AdResponseBox::getNumResponses() const {
@@ -121,11 +121,11 @@ void AdResponseBox::clearButtons() {
//////////////////////////////////////////////////////////////////////////
bool AdResponseBox::invalidateButtons() {
for (uint32 i = 0; i < _respButtons.size(); i++) {
- _respButtons[i]->_image = NULL;
- _respButtons[i]->_cursor = NULL;
- _respButtons[i]->_font = NULL;
- _respButtons[i]->_fontHover = NULL;
- _respButtons[i]->_fontPress = NULL;
+ _respButtons[i]->_image = nullptr;
+ _respButtons[i]->_cursor = nullptr;
+ _respButtons[i]->_font = nullptr;
+ _respButtons[i]->_fontHover = nullptr;
+ _respButtons[i]->_fontPress = nullptr;
_respButtons[i]->setText("");
}
return STATUS_OK;
@@ -163,8 +163,8 @@ bool AdResponseBox::createButtons() {
// textual
else {
btn->setText(_responses[i]->_text);
- btn->_font = (_font == NULL) ? _gameRef->_systemFont : _font;
- btn->_fontHover = (_fontHover == NULL) ? _gameRef->_systemFont : _fontHover;
+ btn->_font = (_font == nullptr) ? _gameRef->getSystemFont() : _font;
+ btn->_fontHover = (_fontHover == nullptr) ? _gameRef->getSystemFont() : _fontHover;
btn->_fontPress = btn->_fontHover;
btn->_align = _align;
@@ -210,7 +210,7 @@ bool AdResponseBox::createButtons() {
//////////////////////////////////////////////////////////////////////////
bool AdResponseBox::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdResponseBox::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -287,7 +287,7 @@ bool AdResponseBox::loadBuffer(byte *buffer, bool complete) {
_window = new UIWindow(_gameRef);
if (!_window || DID_FAIL(_window->loadBuffer(params, false))) {
delete _window;
- _window = NULL;
+ _window = nullptr;
cmd = PARSERR_GENERIC;
} else if (_shieldWindow) {
_shieldWindow->_parent = _window;
@@ -355,7 +355,7 @@ bool AdResponseBox::loadBuffer(byte *buffer, bool complete) {
_cursor = new BaseSprite(_gameRef);
if (!_cursor || DID_FAIL(_cursor->loadFile((char *)params))) {
delete _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -551,7 +551,7 @@ bool AdResponseBox::listen(BaseScriptHolder *param1, uint32 param2) {
_waitingScript->_stack->pushInt(_responses[param2]->_iD);
}
handleResponse(_responses[param2]);
- _waitingScript = NULL;
+ _waitingScript = nullptr;
_gameRef->_state = GAME_RUNNING;
((AdGame *)_gameRef)->_stateEx = GAME_NORMAL;
_ready = true;
@@ -683,9 +683,9 @@ BaseObject *AdResponseBox::getNextAccessObject(BaseObject *currObject) {
getObjects(objects, true);
if (objects.size() == 0) {
- return NULL;
+ return nullptr;
} else {
- if (currObject != NULL) {
+ if (currObject != nullptr) {
for (uint32 i = 0; i < objects.size(); i++) {
if (objects[i] == currObject) {
if (i < objects.size() - 1) {
@@ -698,7 +698,7 @@ BaseObject *AdResponseBox::getNextAccessObject(BaseObject *currObject) {
}
return objects[0];
}
- return NULL;
+ return nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -707,9 +707,9 @@ BaseObject *AdResponseBox::getPrevAccessObject(BaseObject *currObject) {
getObjects(objects, true);
if (objects.size() == 0) {
- return NULL;
+ return nullptr;
} else {
- if (currObject != NULL) {
+ if (currObject != nullptr) {
for (int i = objects.size() - 1; i >= 0; i--) {
if (objects[i] == currObject) {
if (i > 0) {
@@ -722,7 +722,7 @@ BaseObject *AdResponseBox::getPrevAccessObject(BaseObject *currObject) {
}
return objects[objects.size() - 1];
}
- return NULL;
+ return nullptr;
}
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/ad/ad_response_context.cpp b/engines/wintermute/ad/ad_response_context.cpp
index ebfa03feea..d87651c178 100644
--- a/engines/wintermute/ad/ad_response_context.cpp
+++ b/engines/wintermute/ad/ad_response_context.cpp
@@ -36,14 +36,14 @@ IMPLEMENT_PERSISTENT(AdResponseContext, false)
//////////////////////////////////////////////////////////////////////////
AdResponseContext::AdResponseContext(BaseGame *inGame) : BaseClass(inGame) {
_id = 0;
- _context = NULL;
+ _context = nullptr;
}
//////////////////////////////////////////////////////////////////////////
AdResponseContext::~AdResponseContext() {
delete[] _context;
- _context = NULL;
+ _context = nullptr;
}
@@ -59,7 +59,7 @@ bool AdResponseContext::persist(BasePersistenceManager *persistMgr) {
//////////////////////////////////////////////////////////////////////////
void AdResponseContext::setContext(const char *context) {
delete[] _context;
- _context = NULL;
+ _context = nullptr;
if (context) {
_context = new char [strlen(context) + 1];
if (_context) {
diff --git a/engines/wintermute/ad/ad_rot_level.cpp b/engines/wintermute/ad/ad_rot_level.cpp
index fb9a4a47b9..4d7f27aec7 100644
--- a/engines/wintermute/ad/ad_rot_level.cpp
+++ b/engines/wintermute/ad/ad_rot_level.cpp
@@ -54,7 +54,7 @@ AdRotLevel::~AdRotLevel() {
//////////////////////////////////////////////////////////////////////////
bool AdRotLevel::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdRotLevel::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
diff --git a/engines/wintermute/ad/ad_scale_level.cpp b/engines/wintermute/ad/ad_scale_level.cpp
index cfec8d7cb9..e80f38bd0f 100644
--- a/engines/wintermute/ad/ad_scale_level.cpp
+++ b/engines/wintermute/ad/ad_scale_level.cpp
@@ -55,7 +55,7 @@ float AdScaleLevel::getScale() const {
//////////////////////////////////////////////////////////////////////////
bool AdScaleLevel::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdScaleLevel::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
diff --git a/engines/wintermute/ad/ad_scene.cpp b/engines/wintermute/ad/ad_scene.cpp
index a985c517e2..f305c2f60e 100644
--- a/engines/wintermute/ad/ad_scene.cpp
+++ b/engines/wintermute/ad/ad_scene.cpp
@@ -77,7 +77,7 @@ AdScene::~AdScene() {
cleanup();
_gameRef->unregisterObject(_fader);
delete _pfTarget;
- _pfTarget = NULL;
+ _pfTarget = nullptr;
}
@@ -85,9 +85,9 @@ AdScene::~AdScene() {
void AdScene::setDefaults() {
_initialized = false;
_pfReady = true;
- _pfTargetPath = NULL;
- _pfRequester = NULL;
- _mainLayer = NULL;
+ _pfTargetPath = nullptr;
+ _pfRequester = nullptr;
+ _mainLayer = nullptr;
_pfPointsNum = 0;
_persistentState = false;
@@ -127,12 +127,12 @@ void AdScene::setDefaults() {
_editorShowEntities = true;
_editorShowScale = true;
- _shieldWindow = NULL;
+ _shieldWindow = nullptr;
_fader = new BaseFader(_gameRef);
_gameRef->registerObject(_fader);
- _viewport = NULL;
+ _viewport = nullptr;
}
@@ -140,13 +140,13 @@ void AdScene::setDefaults() {
void AdScene::cleanup() {
BaseObject::cleanup();
- _mainLayer = NULL; // reference only
+ _mainLayer = nullptr; // reference only
delete _shieldWindow;
- _shieldWindow = NULL;
+ _shieldWindow = nullptr;
_gameRef->unregisterObject(_fader);
- _fader = NULL;
+ _fader = nullptr;
for (uint32 i = 0; i < _layers.size(); i++) {
_gameRef->unregisterObject(_layers[i]);
@@ -182,7 +182,7 @@ void AdScene::cleanup() {
_objects.clear();
delete _viewport;
- _viewport = NULL;
+ _viewport = nullptr;
setDefaults();
}
@@ -473,7 +473,7 @@ void AdScene::pathFinderStep() {
int i;
// get lowest unmarked
int lowestDist = INT_MAX;
- AdPathPoint *lowestPt = NULL;
+ AdPathPoint *lowestPt = nullptr;
for (i = 0; i < _pfPointsNum; i++)
if (!_pfPath[i]->_marked && _pfPath[i]->_distance < lowestDist) {
@@ -481,7 +481,7 @@ void AdScene::pathFinderStep() {
lowestPt = _pfPath[i];
}
- if (lowestPt == NULL) { // no path -> terminate PathFinder
+ if (lowestPt == nullptr) { // no path -> terminate PathFinder
_pfReady = true;
_pfTargetPath->setReady(true);
return;
@@ -491,7 +491,7 @@ void AdScene::pathFinderStep() {
// target point marked, generate path and terminate
if (lowestPt->x == _pfTarget->x && lowestPt->y == _pfTarget->y) {
- while (lowestPt != NULL) {
+ while (lowestPt != nullptr) {
_pfTargetPath->_points.insert_at(0, new BasePoint(lowestPt->x, lowestPt->y));
lowestPt = lowestPt->_origin;
}
@@ -539,7 +539,7 @@ bool AdScene::initLoop() {
//////////////////////////////////////////////////////////////////////////
bool AdScene::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdScene::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -680,7 +680,7 @@ bool AdScene::loadBuffer(byte *buffer, bool complete) {
if (!layer || DID_FAIL(layer->loadBuffer(params, false))) {
cmd = PARSERR_GENERIC;
delete layer;
- layer = NULL;
+ layer = nullptr;
} else {
_gameRef->registerObject(layer);
_layers.add(layer);
@@ -698,7 +698,7 @@ bool AdScene::loadBuffer(byte *buffer, bool complete) {
if (!wpt || DID_FAIL(wpt->loadBuffer(params, false))) {
cmd = PARSERR_GENERIC;
delete wpt;
- wpt = NULL;
+ wpt = nullptr;
} else {
_gameRef->registerObject(wpt);
_waypointGroups.add(wpt);
@@ -711,7 +711,7 @@ bool AdScene::loadBuffer(byte *buffer, bool complete) {
if (!sl || DID_FAIL(sl->loadBuffer(params, false))) {
cmd = PARSERR_GENERIC;
delete sl;
- sl = NULL;
+ sl = nullptr;
} else {
_gameRef->registerObject(sl);
_scaleLevels.add(sl);
@@ -724,7 +724,7 @@ bool AdScene::loadBuffer(byte *buffer, bool complete) {
if (!rl || DID_FAIL(rl->loadBuffer(params, false))) {
cmd = PARSERR_GENERIC;
delete rl;
- rl = NULL;
+ rl = nullptr;
} else {
_gameRef->registerObject(rl);
_rotLevels.add(rl);
@@ -737,7 +737,7 @@ bool AdScene::loadBuffer(byte *buffer, bool complete) {
if (!entity || DID_FAIL(entity->loadBuffer(params, false))) {
cmd = PARSERR_GENERIC;
delete entity;
- entity = NULL;
+ entity = nullptr;
} else {
addObject(entity);
}
@@ -749,7 +749,7 @@ bool AdScene::loadBuffer(byte *buffer, bool complete) {
_cursor = new BaseSprite(_gameRef);
if (!_cursor || DID_FAIL(_cursor->loadFile((char *)params))) {
delete _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -884,7 +884,7 @@ bool AdScene::loadBuffer(byte *buffer, bool complete) {
return STATUS_FAILED;
}
- if (_mainLayer == NULL) {
+ if (_mainLayer == nullptr) {
_gameRef->LOG(0, "Warning: scene '%s' has no main layer.", getFilename());
}
@@ -923,7 +923,7 @@ bool AdScene::traverseNodes(bool doUpdate) {
// *** adjust scroll offset
if (doUpdate) {
/*
- if (_autoScroll && _gameRef->_mainObject != NULL)
+ if (_autoScroll && _gameRef->_mainObject != nullptr)
{
ScrollToObject(_gameRef->_mainObject);
}
@@ -932,24 +932,34 @@ bool AdScene::traverseNodes(bool doUpdate) {
if (_autoScroll) {
// adjust horizontal scroll
if (_gameRef->_timer - _lastTimeH >= _scrollTimeH) {
+ int timesMissed = (_gameRef->_timer - _lastTimeH) / _scrollTimeH;
+ // Cap the amount of catch-up to avoid jittery characters.
+ if (timesMissed > 2) {
+ timesMissed = 2;
+ }
_lastTimeH = _gameRef->_timer;
if (_offsetLeft < _targetOffsetLeft) {
- _offsetLeft += _scrollPixelsH;
+ _offsetLeft += _scrollPixelsH * timesMissed;
_offsetLeft = MIN(_offsetLeft, _targetOffsetLeft);
} else if (_offsetLeft > _targetOffsetLeft) {
- _offsetLeft -= _scrollPixelsH;
+ _offsetLeft -= _scrollPixelsH * timesMissed;
_offsetLeft = MAX(_offsetLeft, _targetOffsetLeft);
}
}
// adjust vertical scroll
if (_gameRef->_timer - _lastTimeV >= _scrollTimeV) {
+ int timesMissed = (_gameRef->_timer - _lastTimeV) / _scrollTimeV;
+ // Cap the amount of catch-up to avoid jittery characters.
+ if (timesMissed > 2) {
+ timesMissed = 2;
+ }
_lastTimeV = _gameRef->_timer;
if (_offsetTop < _targetOffsetTop) {
- _offsetTop += _scrollPixelsV;
+ _offsetTop += _scrollPixelsV * timesMissed;
_offsetTop = MIN(_offsetTop, _targetOffsetTop);
} else if (_offsetTop > _targetOffsetTop) {
- _offsetTop -= _scrollPixelsV;
+ _offsetTop -= _scrollPixelsV * timesMissed;
_offsetTop = MAX(_offsetTop, _targetOffsetTop);
}
}
@@ -1068,7 +1078,7 @@ bool AdScene::traverseNodes(bool doUpdate) {
if (doUpdate) {
updateFreeObjects();
} else {
- displayRegionContent(NULL);
+ displayRegionContent(nullptr);
}
}
} // each layer
@@ -1128,8 +1138,8 @@ bool AdScene::updateFreeObjects() {
}
- if (_autoScroll && _gameRef->_mainObject != NULL) {
- scrollToObject(_gameRef->_mainObject);
+ if (_autoScroll && _gameRef->getMainObject() != nullptr) {
+ scrollToObject(_gameRef->getMainObject());
}
@@ -1146,7 +1156,7 @@ bool AdScene::displayRegionContent(AdRegion *region, bool display3DOnly) {
// global objects
for (uint32 i = 0; i < adGame->_objects.size(); i++) {
obj = adGame->_objects[i];
- if (obj->_active && !obj->_drawn && (obj->_stickRegion == region || region == NULL || (obj->_stickRegion == NULL && region->pointInRegion(obj->_posX, obj->_posY)))) {
+ if (obj->_active && !obj->_drawn && (obj->_stickRegion == region || region == nullptr || (obj->_stickRegion == nullptr && region->pointInRegion(obj->_posX, obj->_posY)))) {
objects.push_back(obj);
}
}
@@ -1154,7 +1164,7 @@ bool AdScene::displayRegionContent(AdRegion *region, bool display3DOnly) {
// scene objects
for (uint32 i = 0; i < _objects.size(); i++) {
obj = _objects[i];
- if (obj->_active && !obj->_editorOnly && !obj->_drawn && (obj->_stickRegion == region || region == NULL || (obj->_stickRegion == NULL && region->pointInRegion(obj->_posX, obj->_posY)))) {
+ if (obj->_active && !obj->_editorOnly && !obj->_drawn && (obj->_stickRegion == region || region == nullptr || (obj->_stickRegion == nullptr && region->pointInRegion(obj->_posX, obj->_posY)))) {
objects.push_back(obj);
}
}
@@ -1181,7 +1191,7 @@ bool AdScene::displayRegionContent(AdRegion *region, bool display3DOnly) {
// display design only objects
if (!display3DOnly) {
- if (_gameRef->_editorMode && region == NULL) {
+ if (_gameRef->_editorMode && region == nullptr) {
for (uint32 i = 0; i < _objects.size(); i++) {
if (_objects[i]->_active && _objects[i]->_editorOnly) {
_objects[i]->display();
@@ -1210,12 +1220,12 @@ bool AdScene::displayRegionContentOld(AdRegion *region) {
// display all objects in region sorted by _posY
do {
- obj = NULL;
+ obj = nullptr;
int minY = INT_MAX;
// global objects
for (uint32 i = 0; i < adGame->_objects.size(); i++) {
- if (adGame->_objects[i]->_active && !adGame->_objects[i]->_drawn && adGame->_objects[i]->_posY < minY && (adGame->_objects[i]->_stickRegion == region || region == NULL || (adGame->_objects[i]->_stickRegion == NULL && region->pointInRegion(adGame->_objects[i]->_posX, adGame->_objects[i]->_posY)))) {
+ if (adGame->_objects[i]->_active && !adGame->_objects[i]->_drawn && adGame->_objects[i]->_posY < minY && (adGame->_objects[i]->_stickRegion == region || region == nullptr || (adGame->_objects[i]->_stickRegion == nullptr && region->pointInRegion(adGame->_objects[i]->_posX, adGame->_objects[i]->_posY)))) {
obj = adGame->_objects[i];
minY = adGame->_objects[i]->_posY;
}
@@ -1223,14 +1233,14 @@ bool AdScene::displayRegionContentOld(AdRegion *region) {
// scene objects
for (uint32 i = 0; i < _objects.size(); i++) {
- if (_objects[i]->_active && !_objects[i]->_editorOnly && !_objects[i]->_drawn && _objects[i]->_posY < minY && (_objects[i]->_stickRegion == region || region == NULL || (_objects[i]->_stickRegion == NULL && region->pointInRegion(_objects[i]->_posX, _objects[i]->_posY)))) {
+ if (_objects[i]->_active && !_objects[i]->_editorOnly && !_objects[i]->_drawn && _objects[i]->_posY < minY && (_objects[i]->_stickRegion == region || region == nullptr || (_objects[i]->_stickRegion == nullptr && region->pointInRegion(_objects[i]->_posX, _objects[i]->_posY)))) {
obj = _objects[i];
minY = _objects[i]->_posY;
}
}
- if (obj != NULL) {
+ if (obj != nullptr) {
_gameRef->_renderer->setup2D();
if (_gameRef->_editorMode || !obj->_editorOnly) {
@@ -1238,11 +1248,11 @@ bool AdScene::displayRegionContentOld(AdRegion *region) {
}
obj->_drawn = true;
}
- } while (obj != NULL);
+ } while (obj != nullptr);
// design only objects
- if (_gameRef->_editorMode && region == NULL) {
+ if (_gameRef->_editorMode && region == nullptr) {
for (uint32 i = 0; i < _objects.size(); i++) {
if (_objects[i]->_active && _objects[i]->_editorOnly) {
_objects[i]->display();
@@ -1275,7 +1285,7 @@ void AdScene::scrollTo(int offsetX, int offsetY) {
_targetOffsetTop = MIN(_targetOffsetTop, _height - viewportHeight);
- if (_gameRef->_mainObject && _gameRef->_mainObject->_is3D) {
+ if (_gameRef->getMainObject() && _gameRef->getMainObject()->_is3D) {
if (abs(origOffsetLeft - _targetOffsetLeft) < 5) {
_targetOffsetLeft = origOffsetLeft;
}
@@ -1336,7 +1346,7 @@ bool AdScene::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
stack->pushNative(act, true);
} else {
delete act;
- act = NULL;
+ act = nullptr;
stack->pushNULL();
}
return STATUS_OK;
@@ -1353,7 +1363,7 @@ bool AdScene::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
stack->pushNative(ent, true);
} else {
delete ent;
- ent = NULL;
+ ent = nullptr;
stack->pushNULL();
}
return STATUS_OK;
@@ -1494,7 +1504,7 @@ bool AdScene::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
stack->correctParams(1);
ScValue *val = stack->pop();
- AdObject *ret = NULL;
+ AdObject *ret = nullptr;
if (val->isInt()) {
int index = val->getInt();
if (index >= 0 && index < (int32)_objects.size()) {
@@ -1762,7 +1772,7 @@ bool AdScene::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
stack->correctParams(1);
ScValue *val = stack->pop();
- AdLayer *toDelete = NULL;
+ AdLayer *toDelete = nullptr;
if (val->isNative()) {
BaseScriptable *temp = val->getNative();
for (uint32 i = 0; i < _layers.size(); i++) {
@@ -1777,7 +1787,7 @@ bool AdScene::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
toDelete = _layers[index];
}
}
- if (toDelete == NULL) {
+ if (toDelete == nullptr) {
stack->pushBool(false);
return STATUS_OK;
}
@@ -1868,7 +1878,7 @@ ScValue *AdScene::scGetProperty(const Common::String &name) {
//////////////////////////////////////////////////////////////////////////
else if (name == "MouseY") {
int viewportY;
- getViewportOffset(NULL, &viewportY);
+ getViewportOffset(nullptr, &viewportY);
_scValue->setInt(_gameRef->_mousePos.y + _offsetTop - viewportY);
return _scValue;
@@ -2258,8 +2268,8 @@ bool AdScene::sortRotLevels() {
//////////////////////////////////////////////////////////////////////////
float AdScene::getScaleAt(int Y) {
- AdScaleLevel *prev = NULL;
- AdScaleLevel *next = NULL;
+ AdScaleLevel *prev = nullptr;
+ AdScaleLevel *next = nullptr;
for (uint32 i = 0; i < _scaleLevels.size(); i++) {
/* AdScaleLevel *xxx = _scaleLevels[i];*/
@@ -2272,7 +2282,7 @@ float AdScene::getScaleAt(int Y) {
}
}
- if (prev == NULL || next == NULL) {
+ if (prev == nullptr || next == nullptr) {
return 100;
}
@@ -2504,7 +2514,7 @@ void AdScene::pfPointsAdd(int x, int y, int distance) {
_pfPath[_pfPointsNum]->y = y;
_pfPath[_pfPointsNum]->_distance = distance;
_pfPath[_pfPointsNum]->_marked = false;
- _pfPath[_pfPointsNum]->_origin = NULL;
+ _pfPath[_pfPointsNum]->_origin = nullptr;
}
_pfPointsNum++;
@@ -2581,7 +2591,7 @@ int AdScene::getOffsetLeft() {
//////////////////////////////////////////////////////////////////////////
int AdScene::getOffsetTop() {
int viewportY;
- getViewportOffset(NULL, &viewportY);
+ getViewportOffset(nullptr, &viewportY);
return _offsetTop - viewportY;
}
@@ -2607,7 +2617,7 @@ void AdScene::setOffset(int offsetLeft, int offsetTop) {
//////////////////////////////////////////////////////////////////////////
BaseObject *AdScene::getNodeByName(const char *name) {
- BaseObject *ret = NULL;
+ BaseObject *ret = nullptr;
// dependent objects
for (uint32 i = 0; i < _layers.size(); i++) {
@@ -2624,7 +2634,7 @@ BaseObject *AdScene::getNodeByName(const char *name) {
ret = node->_region;
break;
default:
- ret = NULL;
+ ret = nullptr;
}
return ret;
}
@@ -2645,7 +2655,7 @@ BaseObject *AdScene::getNodeByName(const char *name) {
}
}
- return NULL;
+ return nullptr;
}
@@ -2745,8 +2755,8 @@ bool AdScene::persistState(bool saving) {
//////////////////////////////////////////////////////////////////////////
float AdScene::getRotationAt(int x, int y) {
- AdRotLevel *prev = NULL;
- AdRotLevel *next = NULL;
+ AdRotLevel *prev = nullptr;
+ AdRotLevel *next = nullptr;
for (uint32 i = 0; i < _rotLevels.size(); i++) {
/* AdRotLevel *xxx = _rotLevels[i];
@@ -2759,7 +2769,7 @@ float AdScene::getRotationAt(int x, int y) {
}
}
- if (prev == NULL || next == NULL) {
+ if (prev == nullptr || next == nullptr) {
return 0;
}
@@ -2817,7 +2827,7 @@ bool AdScene::getRegionsAt(int x, int y, AdRegion **regionList, int numRegions)
}
}
for (int i = numUsed; i < numRegions; i++) {
- regionList[i] = NULL;
+ regionList[i] = nullptr;
}
return STATUS_OK;
@@ -2835,9 +2845,9 @@ BaseObject *AdScene::getNextAccessObject(BaseObject *currObject) {
getSceneObjects(objects, true);
if (objects.size() == 0) {
- return NULL;
+ return nullptr;
} else {
- if (currObject != NULL) {
+ if (currObject != nullptr) {
for (uint32 i = 0; i < objects.size(); i++) {
if (objects[i] == currObject) {
if (i < objects.size() - 1) {
@@ -2850,7 +2860,7 @@ BaseObject *AdScene::getNextAccessObject(BaseObject *currObject) {
}
return objects[0];
}
- return NULL;
+ return nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -2859,9 +2869,9 @@ BaseObject *AdScene::getPrevAccessObject(BaseObject *currObject) {
getSceneObjects(objects, true);
if (objects.size() == 0) {
- return NULL;
+ return nullptr;
} else {
- if (currObject != NULL) {
+ if (currObject != nullptr) {
for (int i = objects.size() - 1; i >= 0; i--) {
if (objects[i] == currObject) {
if (i > 0) {
@@ -2874,7 +2884,7 @@ BaseObject *AdScene::getPrevAccessObject(BaseObject *currObject) {
}
return objects[objects.size() - 1];
}
- return NULL;
+ return nullptr;
}
@@ -2952,7 +2962,7 @@ bool AdScene::getRegionObjects(AdRegion *region, BaseArray<AdObject *> &objects,
// global objects
for (uint32 i = 0; i < adGame->_objects.size(); i++) {
obj = adGame->_objects[i];
- if (obj->_active && (obj->_stickRegion == region || region == NULL || (obj->_stickRegion == NULL && region->pointInRegion(obj->_posX, obj->_posY)))) {
+ if (obj->_active && (obj->_stickRegion == region || region == nullptr || (obj->_stickRegion == nullptr && region->pointInRegion(obj->_posX, obj->_posY)))) {
if (interactiveOnly && !obj->_registrable) {
continue;
}
@@ -2964,7 +2974,7 @@ bool AdScene::getRegionObjects(AdRegion *region, BaseArray<AdObject *> &objects,
// scene objects
for (uint32 i = 0; i < _objects.size(); i++) {
obj = _objects[i];
- if (obj->_active && !obj->_editorOnly && (obj->_stickRegion == region || region == NULL || (obj->_stickRegion == NULL && region->pointInRegion(obj->_posX, obj->_posY)))) {
+ if (obj->_active && !obj->_editorOnly && (obj->_stickRegion == region || region == nullptr || (obj->_stickRegion == nullptr && region->pointInRegion(obj->_posX, obj->_posY)))) {
if (interactiveOnly && !obj->_registrable) {
continue;
}
diff --git a/engines/wintermute/ad/ad_scene.h b/engines/wintermute/ad/ad_scene.h
index 230cb77f5b..9cc8135889 100644
--- a/engines/wintermute/ad/ad_scene.h
+++ b/engines/wintermute/ad/ad_scene.h
@@ -67,19 +67,19 @@ public:
bool pointInViewport(int x, int y);
int getOffsetTop();
int getOffsetLeft();
- bool getViewportSize(int *width = NULL, int *height = NULL);
- bool getViewportOffset(int *offsetX = NULL, int *offsetY = NULL);
+ bool getViewportSize(int *width = nullptr, int *height = nullptr);
+ bool getViewportOffset(int *offsetX = nullptr, int *offsetY = nullptr);
BaseViewport *_viewport;
BaseFader *_fader;
int _pfPointsNum;
void pfPointsAdd(int x, int y, int distance);
void pfPointsStart();
bool _initialized;
- bool correctTargetPoint(int startX, int startY, int *x, int *y, bool checkFreeObjects = false, BaseObject *requester = NULL);
+ bool correctTargetPoint(int startX, int startY, int *x, int *y, bool checkFreeObjects = false, BaseObject *requester = nullptr);
bool correctTargetPoint2(int startX, int startY, int *targetX, int *targetY, bool checkFreeObjects, BaseObject *requester);
DECLARE_PERSISTENT(AdScene, BaseObject)
- bool displayRegionContent(AdRegion *region = NULL, bool display3DOnly = false);
- bool displayRegionContentOld(AdRegion *region = NULL);
+ bool displayRegionContent(AdRegion *region = nullptr, bool display3DOnly = false);
+ bool displayRegionContentOld(AdRegion *region = nullptr);
static bool compareObjs(const AdObject *obj1, const AdObject *obj2);
bool updateFreeObjects();
@@ -113,11 +113,11 @@ public:
uint32 _pfMaxTime;
bool initLoop();
void pathFinderStep();
- bool isBlockedAt(int x, int y, bool checkFreeObjects = false, BaseObject *requester = NULL);
- bool isWalkableAt(int x, int y, bool checkFreeObjects = false, BaseObject *requester = NULL);
+ bool isBlockedAt(int x, int y, bool checkFreeObjects = false, BaseObject *requester = nullptr);
+ bool isWalkableAt(int x, int y, bool checkFreeObjects = false, BaseObject *requester = nullptr);
AdLayer *_mainLayer;
float getZoomAt(int x, int y);
- bool getPath(BasePoint source, BasePoint target, AdPath *path, BaseObject *requester = NULL);
+ bool getPath(BasePoint source, BasePoint target, AdPath *path, BaseObject *requester = nullptr);
AdScene(BaseGame *inGame);
virtual ~AdScene();
BaseArray<AdLayer *> _layers;
@@ -153,7 +153,7 @@ public:
BaseArray<AdRotLevel *> _rotLevels;
virtual bool restoreDeviceObjects();
- int getPointsDist(BasePoint p1, BasePoint p2, BaseObject *requester = NULL);
+ int getPointsDist(BasePoint p1, BasePoint p2, BaseObject *requester = nullptr);
// scripting interface
virtual ScValue *scGetProperty(const Common::String &name);
@@ -164,7 +164,7 @@ public:
private:
bool persistState(bool saving = true);
- void pfAddWaypointGroup(AdWaypointGroup *Wpt, BaseObject *requester = NULL);
+ void pfAddWaypointGroup(AdWaypointGroup *Wpt, BaseObject *requester = nullptr);
bool _pfReady;
BasePoint *_pfTarget;
AdPath *_pfTargetPath;
diff --git a/engines/wintermute/ad/ad_scene_node.cpp b/engines/wintermute/ad/ad_scene_node.cpp
index d0202236fd..f84e9212e5 100644
--- a/engines/wintermute/ad/ad_scene_node.cpp
+++ b/engines/wintermute/ad/ad_scene_node.cpp
@@ -36,18 +36,18 @@ IMPLEMENT_PERSISTENT(AdSceneNode, false)
//////////////////////////////////////////////////////////////////////////
AdSceneNode::AdSceneNode(BaseGame *inGame) : BaseObject(inGame) {
_type = OBJECT_NONE;
- _region = NULL;
- _entity = NULL;
+ _region = nullptr;
+ _entity = nullptr;
}
//////////////////////////////////////////////////////////////////////////
AdSceneNode::~AdSceneNode() {
_gameRef->unregisterObject(_region);
- _region = NULL;
+ _region = nullptr;
_gameRef->unregisterObject(_entity);
- _entity = NULL;
+ _entity = nullptr;
}
diff --git a/engines/wintermute/ad/ad_scene_state.cpp b/engines/wintermute/ad/ad_scene_state.cpp
index e6dd08a5fe..8e022ab115 100644
--- a/engines/wintermute/ad/ad_scene_state.cpp
+++ b/engines/wintermute/ad/ad_scene_state.cpp
@@ -38,14 +38,14 @@ IMPLEMENT_PERSISTENT(AdSceneState, false)
//////////////////////////////////////////////////////////////////////////
AdSceneState::AdSceneState(BaseGame *inGame) : BaseClass(inGame) {
- _filename = NULL;
+ _filename = nullptr;
}
//////////////////////////////////////////////////////////////////////////
AdSceneState::~AdSceneState() {
delete[] _filename;
- _filename = NULL;
+ _filename = nullptr;
for (uint32 i = 0; i < _nodeStates.size(); i++) {
delete _nodeStates[i];
@@ -91,7 +91,7 @@ AdNodeState *AdSceneState::getNodeState(const char *name, bool saving) {
return ret;
} else {
- return NULL;
+ return nullptr;
}
}
diff --git a/engines/wintermute/ad/ad_sentence.cpp b/engines/wintermute/ad/ad_sentence.cpp
index cfe4191b07..47b22a1ab3 100644
--- a/engines/wintermute/ad/ad_sentence.cpp
+++ b/engines/wintermute/ad/ad_sentence.cpp
@@ -45,27 +45,27 @@ IMPLEMENT_PERSISTENT(AdSentence, false)
//////////////////////////////////////////////////////////////////////////
AdSentence::AdSentence(BaseGame *inGame) : BaseClass(inGame) {
- _text = NULL;
- _stances = NULL;
- _tempStance = NULL;
+ _text = nullptr;
+ _stances = nullptr;
+ _tempStance = nullptr;
_duration = 0;
_startTime = 0;
_currentStance = 0;
- _font = NULL;
+ _font = nullptr;
_pos.x = _pos.y = 0;
_width = _gameRef->_renderer->_width;
_align = (TTextAlign)TAL_CENTER;
- _sound = NULL;
+ _sound = nullptr;
_soundStarted = false;
- _talkDef = NULL;
- _currentSprite = NULL;
- _currentSkelAnim = NULL;
+ _talkDef = nullptr;
+ _currentSprite = nullptr;
+ _currentSkelAnim = nullptr;
_fixedPos = false;
_freezable = true;
}
@@ -78,15 +78,15 @@ AdSentence::~AdSentence() {
delete[] _stances;
delete[] _tempStance;
delete _talkDef;
- _sound = NULL;
- _text = NULL;
- _stances = NULL;
- _tempStance = NULL;
- _talkDef = NULL;
-
- _currentSprite = NULL; // ref only
- _currentSkelAnim = NULL;
- _font = NULL; // ref only
+ _sound = nullptr;
+ _text = nullptr;
+ _stances = nullptr;
+ _tempStance = nullptr;
+ _talkDef = nullptr;
+
+ _currentSprite = nullptr; // ref only
+ _currentSkelAnim = nullptr;
+ _font = nullptr; // ref only
}
@@ -113,7 +113,7 @@ void AdSentence::setStances(const char *stances) {
strcpy(_stances, stances);
}
} else {
- _stances = NULL;
+ _stances = nullptr;
}
}
@@ -133,14 +133,14 @@ char *AdSentence::getNextStance() {
//////////////////////////////////////////////////////////////////////////
char *AdSentence::getStance(int stance) {
- if (_stances == NULL) {
- return NULL;
+ if (_stances == nullptr) {
+ return nullptr;
}
if (_tempStance) {
delete[] _tempStance;
}
- _tempStance = NULL;
+ _tempStance = nullptr;
char *start;
char *curr;
@@ -150,7 +150,7 @@ char *AdSentence::getStance(int stance) {
start = _stances;
} else {
pos = 0;
- start = NULL;
+ start = nullptr;
curr = _stances;
while (pos < stance) {
if (*curr == '\0') {
@@ -166,8 +166,8 @@ char *AdSentence::getStance(int stance) {
}
}
- if (start == NULL) {
- return NULL;
+ if (start == nullptr) {
+ return nullptr;
}
while (*start == ' ' && *start != ',' && *start != '\0') {
@@ -274,8 +274,8 @@ bool AdSentence::persist(BasePersistenceManager *persistMgr) {
//////////////////////////////////////////////////////////////////////////
bool AdSentence::setupTalkFile(const char *soundFilename) {
delete _talkDef;
- _talkDef = NULL;
- _currentSprite = NULL;
+ _talkDef = nullptr;
+ _currentSprite = nullptr;
if (!soundFilename) {
return STATUS_OK;
@@ -294,7 +294,7 @@ bool AdSentence::setupTalkFile(const char *soundFilename) {
_talkDef = new AdTalkDef(_gameRef);
if (!_talkDef || DID_FAIL(_talkDef->loadFile(talkDefFileName.c_str()))) {
delete _talkDef;
- _talkDef = NULL;
+ _talkDef = nullptr;
return STATUS_FAILED;
}
//_gameRef->LOG(0, "Using .talk file: %s", TalkDefFile);
@@ -345,7 +345,7 @@ bool AdSentence::update(TDirection dir) {
}
_currentSprite = newSprite;
} else {
- _currentSprite = NULL;
+ _currentSprite = nullptr;
}
}
diff --git a/engines/wintermute/ad/ad_sprite_set.cpp b/engines/wintermute/ad/ad_sprite_set.cpp
index 345b483a8f..ffa7bb2530 100644
--- a/engines/wintermute/ad/ad_sprite_set.cpp
+++ b/engines/wintermute/ad/ad_sprite_set.cpp
@@ -42,7 +42,7 @@ AdSpriteSet::AdSpriteSet(BaseGame *inGame, BaseObject *owner) : BaseObject(inGam
_owner = owner;
for (int i = 0; i < NUM_DIRECTIONS; i++) {
- _sprites[i] = NULL;
+ _sprites[i] = nullptr;
}
}
@@ -51,17 +51,17 @@ AdSpriteSet::AdSpriteSet(BaseGame *inGame, BaseObject *owner) : BaseObject(inGam
AdSpriteSet::~AdSpriteSet() {
for (int i = 0; i < NUM_DIRECTIONS; i++) {
delete _sprites[i];
- _sprites[i] = NULL;
+ _sprites[i] = nullptr;
}
- _owner = NULL;
+ _owner = nullptr;
}
//////////////////////////////////////////////////////////////////////////
bool AdSpriteSet::loadFile(const char *filename, int lifeTime, TSpriteCacheType cacheType) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdSpriteSet::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -121,7 +121,7 @@ bool AdSpriteSet::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
buffer = params;
}
- BaseSprite *spr = NULL;
+ BaseSprite *spr = nullptr;
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)&params)) > 0) {
switch (cmd) {
case TOKEN_TEMPLATE:
@@ -136,7 +136,7 @@ bool AdSpriteSet::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
case TOKEN_LEFT:
delete _sprites[DI_LEFT];
- _sprites[DI_LEFT] = NULL;
+ _sprites[DI_LEFT] = nullptr;
spr = new BaseSprite(_gameRef, _owner);
if (!spr || DID_FAIL(spr->loadFile((char *)params, lifeTime, cacheType))) {
cmd = PARSERR_GENERIC;
@@ -147,7 +147,7 @@ bool AdSpriteSet::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
case TOKEN_RIGHT:
delete _sprites[DI_RIGHT];
- _sprites[DI_RIGHT] = NULL;
+ _sprites[DI_RIGHT] = nullptr;
spr = new BaseSprite(_gameRef, _owner);
if (!spr || DID_FAIL(spr->loadFile((char *)params, lifeTime, cacheType))) {
cmd = PARSERR_GENERIC;
@@ -158,7 +158,7 @@ bool AdSpriteSet::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
case TOKEN_UP:
delete _sprites[DI_UP];
- _sprites[DI_UP] = NULL;
+ _sprites[DI_UP] = nullptr;
spr = new BaseSprite(_gameRef, _owner);
if (!spr || DID_FAIL(spr->loadFile((char *)params, lifeTime, cacheType))) {
cmd = PARSERR_GENERIC;
@@ -169,7 +169,7 @@ bool AdSpriteSet::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
case TOKEN_DOWN:
delete _sprites[DI_DOWN];
- _sprites[DI_DOWN] = NULL;
+ _sprites[DI_DOWN] = nullptr;
spr = new BaseSprite(_gameRef, _owner);
if (!spr || DID_FAIL(spr->loadFile((char *)params, lifeTime, cacheType))) {
cmd = PARSERR_GENERIC;
@@ -180,7 +180,7 @@ bool AdSpriteSet::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
case TOKEN_UP_LEFT:
delete _sprites[DI_UPLEFT];
- _sprites[DI_UPLEFT] = NULL;
+ _sprites[DI_UPLEFT] = nullptr;
spr = new BaseSprite(_gameRef, _owner);
if (!spr || DID_FAIL(spr->loadFile((char *)params, lifeTime, cacheType))) {
cmd = PARSERR_GENERIC;
@@ -191,7 +191,7 @@ bool AdSpriteSet::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
case TOKEN_UP_RIGHT:
delete _sprites[DI_UPRIGHT];
- _sprites[DI_UPRIGHT] = NULL;
+ _sprites[DI_UPRIGHT] = nullptr;
spr = new BaseSprite(_gameRef, _owner);
if (!spr || DID_FAIL(spr->loadFile((char *)params, lifeTime, cacheType))) {
cmd = PARSERR_GENERIC;
@@ -202,7 +202,7 @@ bool AdSpriteSet::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
case TOKEN_DOWN_LEFT:
delete _sprites[DI_DOWNLEFT];
- _sprites[DI_DOWNLEFT] = NULL;
+ _sprites[DI_DOWNLEFT] = nullptr;
spr = new BaseSprite(_gameRef, _owner);
if (!spr || DID_FAIL(spr->loadFile((char *)params, lifeTime, cacheType))) {
cmd = PARSERR_GENERIC;
@@ -213,7 +213,7 @@ bool AdSpriteSet::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteC
case TOKEN_DOWN_RIGHT:
delete _sprites[DI_DOWNRIGHT];
- _sprites[DI_DOWNRIGHT] = NULL;
+ _sprites[DI_DOWNRIGHT] = nullptr;
spr = new BaseSprite(_gameRef, _owner);
if (!spr || DID_FAIL(spr->loadFile((char *)params, lifeTime, cacheType))) {
cmd = PARSERR_GENERIC;
@@ -268,12 +268,12 @@ BaseSprite *AdSpriteSet::getSprite(TDirection direction) {
dir = NUM_DIRECTIONS - 1;
}
- BaseSprite *ret = NULL;
+ BaseSprite *ret = nullptr;
// find nearest set sprite
int numSteps = 0;
for (int i = dir; i >= 0; i--) {
- if (_sprites[i] != NULL) {
+ if (_sprites[i] != nullptr) {
ret = _sprites[i];
numSteps = dir - i;
break;
@@ -281,8 +281,8 @@ BaseSprite *AdSpriteSet::getSprite(TDirection direction) {
}
for (int i = dir; i < NUM_DIRECTIONS; i++) {
- if (_sprites[i] != NULL) {
- if (ret == NULL || numSteps > i - dir) {
+ if (_sprites[i] != nullptr) {
+ if (ret == nullptr || numSteps > i - dir) {
return _sprites[i];
} else {
return ret;
diff --git a/engines/wintermute/ad/ad_sprite_set.h b/engines/wintermute/ad/ad_sprite_set.h
index ba5da0ff2e..3960b5dcc7 100644
--- a/engines/wintermute/ad/ad_sprite_set.h
+++ b/engines/wintermute/ad/ad_sprite_set.h
@@ -41,7 +41,7 @@ public:
BaseSprite *getSprite(TDirection direction);
DECLARE_PERSISTENT(AdSpriteSet, BaseObject)
BaseObject *_owner;
- AdSpriteSet(BaseGame *inGame, BaseObject *owner = NULL);
+ AdSpriteSet(BaseGame *inGame, BaseObject *owner = nullptr);
virtual ~AdSpriteSet();
bool loadFile(const char *filename, int lifeTime = -1, TSpriteCacheType cacheType = CACHE_ALL);
bool loadBuffer(byte *buffer, bool complete = true, int lifeTime = -1, TSpriteCacheType cacheType = CACHE_ALL);
diff --git a/engines/wintermute/ad/ad_talk_def.cpp b/engines/wintermute/ad/ad_talk_def.cpp
index a85cd7f986..4ad5d2ccc6 100644
--- a/engines/wintermute/ad/ad_talk_def.cpp
+++ b/engines/wintermute/ad/ad_talk_def.cpp
@@ -42,11 +42,11 @@ IMPLEMENT_PERSISTENT(AdTalkDef, false)
//////////////////////////////////////////////////////////////////////////
AdTalkDef::AdTalkDef(BaseGame *inGame) : BaseObject(inGame) {
- _defaultSpriteFilename = NULL;
- _defaultSprite = NULL;
+ _defaultSpriteFilename = nullptr;
+ _defaultSprite = nullptr;
- _defaultSpriteSetFilename = NULL;
- _defaultSpriteSet = NULL;
+ _defaultSpriteSetFilename = nullptr;
+ _defaultSpriteSet = nullptr;
}
@@ -59,20 +59,20 @@ AdTalkDef::~AdTalkDef() {
delete[] _defaultSpriteFilename;
delete _defaultSprite;
- _defaultSpriteFilename = NULL;
- _defaultSprite = NULL;
+ _defaultSpriteFilename = nullptr;
+ _defaultSprite = nullptr;
delete[] _defaultSpriteSetFilename;
delete _defaultSpriteSet;
- _defaultSpriteSetFilename = NULL;
- _defaultSpriteSet = NULL;
+ _defaultSpriteSetFilename = nullptr;
+ _defaultSpriteSet = nullptr;
}
//////////////////////////////////////////////////////////////////////////
bool AdTalkDef::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdTalkDef::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -138,7 +138,7 @@ bool AdTalkDef::loadBuffer(byte *buffer, bool complete) {
_nodes.add(node);
} else {
delete node;
- node = NULL;
+ node = nullptr;
cmd = PARSERR_GENERIC;
}
}
@@ -157,7 +157,7 @@ bool AdTalkDef::loadBuffer(byte *buffer, bool complete) {
_defaultSpriteSet = new AdSpriteSet(_gameRef);
if (!_defaultSpriteSet || DID_FAIL(_defaultSpriteSet->loadBuffer(params, false))) {
delete _defaultSpriteSet;
- _defaultSpriteSet = NULL;
+ _defaultSpriteSet = nullptr;
cmd = PARSERR_GENERIC;
}
}
@@ -181,8 +181,8 @@ bool AdTalkDef::loadBuffer(byte *buffer, bool complete) {
delete _defaultSprite;
delete _defaultSpriteSet;
- _defaultSprite = NULL;
- _defaultSpriteSet = NULL;
+ _defaultSprite = nullptr;
+ _defaultSpriteSet = nullptr;
if (_defaultSpriteFilename) {
_defaultSprite = new BaseSprite(_gameRef);
@@ -250,7 +250,7 @@ bool AdTalkDef::loadDefaultSprite() {
_defaultSprite = new BaseSprite(_gameRef);
if (!_defaultSprite || DID_FAIL(_defaultSprite->loadFile(_defaultSpriteFilename))) {
delete _defaultSprite;
- _defaultSprite = NULL;
+ _defaultSprite = nullptr;
return STATUS_FAILED;
} else {
return STATUS_OK;
@@ -259,7 +259,7 @@ bool AdTalkDef::loadDefaultSprite() {
_defaultSpriteSet = new AdSpriteSet(_gameRef);
if (!_defaultSpriteSet || DID_FAIL(_defaultSpriteSet->loadFile(_defaultSpriteSetFilename))) {
delete _defaultSpriteSet;
- _defaultSpriteSet = NULL;
+ _defaultSpriteSet = nullptr;
return STATUS_FAILED;
} else {
return STATUS_OK;
@@ -278,7 +278,7 @@ BaseSprite *AdTalkDef::getDefaultSprite(TDirection dir) {
} else if (_defaultSpriteSet) {
return _defaultSpriteSet->getSprite(dir);
} else {
- return NULL;
+ return nullptr;
}
}
diff --git a/engines/wintermute/ad/ad_talk_holder.cpp b/engines/wintermute/ad/ad_talk_holder.cpp
index cca4fdc2cb..ed2333a345 100644
--- a/engines/wintermute/ad/ad_talk_holder.cpp
+++ b/engines/wintermute/ad/ad_talk_holder.cpp
@@ -43,14 +43,14 @@ IMPLEMENT_PERSISTENT(AdTalkHolder, false)
//////////////////////////////////////////////////////////////////////////
AdTalkHolder::AdTalkHolder(BaseGame *inGame) : AdObject(inGame) {
- _sprite = NULL;
+ _sprite = nullptr;
}
//////////////////////////////////////////////////////////////////////////
AdTalkHolder::~AdTalkHolder() {
delete _sprite;
- _sprite = NULL;
+ _sprite = nullptr;
for (uint32 i = 0; i < _talkSprites.size(); i++) {
delete _talkSprites[i];
@@ -65,7 +65,7 @@ AdTalkHolder::~AdTalkHolder() {
//////////////////////////////////////////////////////////////////////////
BaseSprite *AdTalkHolder::getTalkStance(const char *stance) {
- BaseSprite *ret = NULL;
+ BaseSprite *ret = nullptr;
// forced stance?
@@ -78,7 +78,7 @@ BaseSprite *AdTalkHolder::getTalkStance(const char *stance) {
if (DID_FAIL(res)) {
_gameRef->LOG(res, "AdTalkHolder::GetTalkStance: error loading talk sprite (object:\"%s\" sprite:\"%s\")", getName(), _forcedTalkAnimName);
delete _animSprite;
- _animSprite = NULL;
+ _animSprite = nullptr;
} else {
return _animSprite;
}
@@ -86,7 +86,7 @@ BaseSprite *AdTalkHolder::getTalkStance(const char *stance) {
}
- if (stance != NULL) {
+ if (stance != nullptr) {
// search special talk stances
for (uint32 i = 0; i < _talkSpritesEx.size(); i++) {
if (scumm_stricmp(_talkSpritesEx[i]->getName(), stance) == 0) {
@@ -94,7 +94,7 @@ BaseSprite *AdTalkHolder::getTalkStance(const char *stance) {
break;
}
}
- if (ret == NULL) {
+ if (ret == nullptr) {
// serach generic talk stances
for (uint32 i = 0; i < _talkSprites.size(); i++) {
if (scumm_stricmp(_talkSprites[i]->getName(), stance) == 0) {
@@ -106,7 +106,7 @@ BaseSprite *AdTalkHolder::getTalkStance(const char *stance) {
}
// not a valid stance? get a random one
- if (ret == NULL) {
+ if (ret == nullptr) {
if (_talkSprites.size() < 1) {
ret = _sprite;
} else {
@@ -138,12 +138,12 @@ bool AdTalkHolder::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisS
}
delete _sprite;
- _sprite = NULL;
+ _sprite = nullptr;
if (val->isNULL()) {
- _sprite = NULL;
+ _sprite = nullptr;
if (setCurrent) {
- _currentSprite = NULL;
+ _currentSprite = nullptr;
}
stack->pushBool(true);
} else {
@@ -355,7 +355,7 @@ bool AdTalkHolder::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
// Item
//////////////////////////////////////////////////////////////////////////
- if (strcmp(name, "Item")==0){
+ if (strcmp(name, "Item")==0) {
SetItem(value->getString());
return STATUS_OK;
}
diff --git a/engines/wintermute/ad/ad_talk_node.cpp b/engines/wintermute/ad/ad_talk_node.cpp
index c909ee27ff..2e0985ed99 100644
--- a/engines/wintermute/ad/ad_talk_node.cpp
+++ b/engines/wintermute/ad/ad_talk_node.cpp
@@ -39,11 +39,11 @@ IMPLEMENT_PERSISTENT(AdTalkNode, false)
//////////////////////////////////////////////////////////////////////////
AdTalkNode::AdTalkNode(BaseGame *inGame) : BaseClass(inGame) {
- _sprite = NULL;
- _spriteFilename = NULL;
- _spriteSet = NULL;
- _spriteSetFilename = NULL;
- _comment = NULL;
+ _sprite = nullptr;
+ _spriteFilename = nullptr;
+ _spriteSet = nullptr;
+ _spriteSetFilename = nullptr;
+ _comment = nullptr;
_startTime = _endTime = 0;
_playToEnd = false;
@@ -58,11 +58,11 @@ AdTalkNode::~AdTalkNode() {
delete[] _spriteSetFilename;
delete _spriteSet;
delete _comment;
- _spriteFilename = NULL;
- _sprite = NULL;
- _spriteSetFilename = NULL;
- _spriteSet = NULL;
- _comment = NULL;
+ _spriteFilename = nullptr;
+ _sprite = nullptr;
+ _spriteSetFilename = nullptr;
+ _spriteSet = nullptr;
+ _comment = nullptr;
}
@@ -123,7 +123,7 @@ bool AdTalkNode::loadBuffer(byte *buffer, bool complete) {
_spriteSet = new AdSpriteSet(_gameRef);
if (!_spriteSet || DID_FAIL(_spriteSet->loadBuffer(params, false))) {
delete _spriteSet;
- _spriteSet = NULL;
+ _spriteSet = nullptr;
cmd = PARSERR_GENERIC;
}
}
@@ -240,7 +240,7 @@ bool AdTalkNode::loadSprite() {
_sprite = new BaseSprite(_gameRef);
if (!_sprite || DID_FAIL(_sprite->loadFile(_spriteFilename))) {
delete _sprite;
- _sprite = NULL;
+ _sprite = nullptr;
return STATUS_FAILED;
} else {
return STATUS_OK;
@@ -249,7 +249,7 @@ bool AdTalkNode::loadSprite() {
_spriteSet = new AdSpriteSet(_gameRef);
if (!_spriteSet || DID_FAIL(_spriteSet->loadFile(_spriteSetFilename))) {
delete _spriteSet;
- _spriteSet = NULL;
+ _spriteSet = nullptr;
return STATUS_FAILED;
} else {
return STATUS_OK;
@@ -264,9 +264,9 @@ bool AdTalkNode::loadSprite() {
bool AdTalkNode::isInTimeInterval(uint32 time, TDirection dir) {
if (time >= _startTime) {
if (_playToEnd) {
- if ((_spriteFilename && _sprite == NULL) || (_sprite && _sprite->isFinished() == false)) {
+ if ((_spriteFilename && _sprite == nullptr) || (_sprite && _sprite->isFinished() == false)) {
return true;
- } else if ((_spriteSetFilename && _spriteSet == NULL) || (_spriteSet && _spriteSet->getSprite(dir) && _spriteSet->getSprite(dir)->isFinished() == false)) {
+ } else if ((_spriteSetFilename && _spriteSet == nullptr) || (_spriteSet && _spriteSet->getSprite(dir) && _spriteSet->getSprite(dir)->isFinished() == false)) {
return true;
} else {
return false;
@@ -288,7 +288,7 @@ BaseSprite *AdTalkNode::getSprite(TDirection dir) {
} else if (_spriteSet) {
return _spriteSet->getSprite(dir);
} else {
- return NULL;
+ return nullptr;
}
}
diff --git a/engines/wintermute/ad/ad_waypoint_group.cpp b/engines/wintermute/ad/ad_waypoint_group.cpp
index 81493ce769..96dece34b8 100644
--- a/engines/wintermute/ad/ad_waypoint_group.cpp
+++ b/engines/wintermute/ad/ad_waypoint_group.cpp
@@ -67,7 +67,7 @@ void AdWaypointGroup::cleanup() {
//////////////////////////////////////////////////////////////////////////
bool AdWaypointGroup::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "AdWaypointGroup::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
diff --git a/engines/wintermute/base/base.cpp b/engines/wintermute/base/base.cpp
index e351792e61..c0459b0ce5 100644
--- a/engines/wintermute/base/base.cpp
+++ b/engines/wintermute/base/base.cpp
@@ -42,7 +42,7 @@ BaseClass::BaseClass(BaseGame *gameOwner) {
//////////////////////////////////////////////////////////////////////////
BaseClass::BaseClass() {
- _gameRef = NULL;
+ _gameRef = nullptr;
_persistable = true;
}
@@ -111,8 +111,8 @@ bool BaseClass::parseEditorProperty(byte *buffer, bool complete) {
buffer = params;
}
- char *propName = NULL;
- char *propValue = NULL;
+ char *propName = nullptr;
+ char *propValue = nullptr;
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)&params)) > 0) {
switch (cmd) {
@@ -141,16 +141,16 @@ bool BaseClass::parseEditorProperty(byte *buffer, bool complete) {
if (cmd == PARSERR_TOKENNOTFOUND) {
delete[] propName;
delete[] propValue;
- propName = NULL;
- propValue = NULL;
+ propName = nullptr;
+ propValue = nullptr;
_gameRef->LOG(0, "Syntax error in EDITOR_PROPERTY definition");
return STATUS_FAILED;
}
- if (cmd == PARSERR_GENERIC || propName == NULL || propValue == NULL) {
+ if (cmd == PARSERR_GENERIC || propName == nullptr || propValue == nullptr) {
delete[] propName;
delete[] propValue;
- propName = NULL;
- propValue = NULL;
+ propName = nullptr;
+ propValue = nullptr;
_gameRef->LOG(0, "Error loading EDITOR_PROPERTY definition");
return STATUS_FAILED;
}
@@ -160,8 +160,8 @@ bool BaseClass::parseEditorProperty(byte *buffer, bool complete) {
delete[] propName;
delete[] propValue;
- propName = NULL;
- propValue = NULL;
+ propName = nullptr;
+ propValue = nullptr;
return STATUS_OK;
}
diff --git a/engines/wintermute/base/base.h b/engines/wintermute/base/base.h
index 24820c748a..7f2796c6e0 100644
--- a/engines/wintermute/base/base.h
+++ b/engines/wintermute/base/base.h
@@ -44,7 +44,7 @@ class BaseClass {
public:
bool _persistable;
bool setEditorProp(const Common::String &propName, const Common::String &propValue);
- Common::String getEditorProp(const Common::String &propName, const Common::String &initVal = NULL);
+ Common::String getEditorProp(const Common::String &propName, const Common::String &initVal = nullptr);
BaseClass(TDynamicConstructor, TDynamicConstructor) {}
bool parseEditorProperty(byte *buffer, bool complete = true);
virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent = 0);
diff --git a/engines/wintermute/base/base_active_rect.cpp b/engines/wintermute/base/base_active_rect.cpp
index 4addf15be8..4c62cf9561 100644
--- a/engines/wintermute/base/base_active_rect.cpp
+++ b/engines/wintermute/base/base_active_rect.cpp
@@ -37,9 +37,9 @@ namespace Wintermute {
//////////////////////////////////////////////////////////////////////
BaseActiveRect::BaseActiveRect(BaseGame *inGame) : BaseClass(inGame) {
BasePlatform::setRectEmpty(&_rect);
- _owner = NULL;
- _frame = NULL;
- _region = NULL;
+ _owner = nullptr;
+ _frame = nullptr;
+ _region = nullptr;
_zoomX = 100;
_zoomY = 100;
_offsetX = _offsetY = 0;
@@ -55,7 +55,7 @@ BaseActiveRect::BaseActiveRect(BaseGame *inGame, BaseObject *owner, BaseSubFrame
_zoomX = zoomX;
_zoomY = zoomY;
_precise = precise;
- _region = NULL;
+ _region = nullptr;
_offsetX = _offsetY = 0;
clipRect();
}
@@ -69,7 +69,7 @@ BaseActiveRect::BaseActiveRect(BaseGame *inGame, BaseObject *owner, BaseRegion *
_zoomX = 100;
_zoomY = 100;
_precise = true;
- _frame = NULL;
+ _frame = nullptr;
clipRect();
_offsetX = offsetX;
_offsetY = offsetY;
@@ -78,9 +78,9 @@ BaseActiveRect::BaseActiveRect(BaseGame *inGame, BaseObject *owner, BaseRegion *
//////////////////////////////////////////////////////////////////////
BaseActiveRect::~BaseActiveRect() {
- _owner = NULL;
- _frame = NULL;
- _region = NULL;
+ _owner = nullptr;
+ _frame = nullptr;
+ _region = nullptr;
}
diff --git a/engines/wintermute/base/base_active_rect.h b/engines/wintermute/base/base_active_rect.h
index fcd2619b03..7ef8374814 100644
--- a/engines/wintermute/base/base_active_rect.h
+++ b/engines/wintermute/base/base_active_rect.h
@@ -48,7 +48,7 @@ public:
int _offsetX;
int _offsetY;
Rect32 _rect;
- BaseActiveRect(BaseGame *inGameOwner = NULL);
+ BaseActiveRect(BaseGame *inGameOwner = nullptr);
BaseActiveRect(BaseGame *inGameOwner, BaseObject *owner, BaseSubFrame *frame, int x, int y, int width, int height, float zoomX = 100, float zoomY = 100, bool precise = true);
BaseActiveRect(BaseGame *inGame, BaseObject *owner, BaseRegion *region, int offsetX, int offsetY);
virtual ~BaseActiveRect();
diff --git a/engines/wintermute/base/base_dynamic_buffer.cpp b/engines/wintermute/base/base_dynamic_buffer.cpp
index dc14a4e052..f684420b1e 100644
--- a/engines/wintermute/base/base_dynamic_buffer.cpp
+++ b/engines/wintermute/base/base_dynamic_buffer.cpp
@@ -33,7 +33,7 @@ namespace Wintermute {
//////////////////////////////////////////////////////////////////////////
BaseDynamicBuffer::BaseDynamicBuffer(BaseGame *inGame, uint32 initSize, uint32 growBy) {
- _buffer = NULL;
+ _buffer = nullptr;
_size = 0;
_realSize = 0;
@@ -56,7 +56,7 @@ void BaseDynamicBuffer::cleanup() {
if (_buffer) {
free(_buffer);
}
- _buffer = NULL;
+ _buffer = nullptr;
_size = 0;
_realSize = 0;
_offset = 0;
@@ -164,7 +164,7 @@ char *BaseDynamicBuffer::getString() {
_offset += len;
if (!strcmp(ret, "(null)")) {
- return NULL;
+ return nullptr;
} else {
return ret;
}
diff --git a/engines/wintermute/base/base_engine.cpp b/engines/wintermute/base/base_engine.cpp
index 8146d14beb..a13ca4d919 100644
--- a/engines/wintermute/base/base_engine.cpp
+++ b/engines/wintermute/base/base_engine.cpp
@@ -39,10 +39,10 @@ DECLARE_SINGLETON(Wintermute::BaseEngine);
namespace Wintermute {
BaseEngine::BaseEngine() {
- _fileManager = NULL;
- _gameRef = NULL;
- _classReg = NULL;
- _rnd = NULL;
+ _fileManager = nullptr;
+ _gameRef = nullptr;
+ _classReg = nullptr;
+ _rnd = nullptr;
_gameId = "";
}
diff --git a/engines/wintermute/base/base_engine.h b/engines/wintermute/base/base_engine.h
index 1ed0e3ab01..f04c594699 100644
--- a/engines/wintermute/base/base_engine.h
+++ b/engines/wintermute/base/base_engine.h
@@ -57,7 +57,7 @@ public:
Common::RandomSource *getRandomSource() { return _rnd; }
uint32 randInt(int from, int to);
- SystemClassRegistry *getClassRegistry(){ return _classReg; }
+ SystemClassRegistry *getClassRegistry() { return _classReg; }
BaseGame *getGameRef() { return _gameRef; }
BaseFileManager *getFileManager() { return _fileManager; }
static void LOG(bool res, const char *fmt, ...);
diff --git a/engines/wintermute/base/base_file_manager.cpp b/engines/wintermute/base/base_file_manager.cpp
index b726c0c66f..28e0b3af6e 100644
--- a/engines/wintermute/base/base_file_manager.cpp
+++ b/engines/wintermute/base/base_file_manager.cpp
@@ -31,7 +31,6 @@
#include "engines/wintermute/base/file/base_disk_file.h"
#include "engines/wintermute/base/file/base_save_thumb_file.h"
#include "engines/wintermute/base/file/base_package.h"
-#include "engines/wintermute/base/file/base_resources.h"
#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/wintermute.h"
#include "common/debug.h"
@@ -45,6 +44,7 @@
#include "common/file.h"
#include "common/savefile.h"
#include "common/fs.h"
+#include "common/unzip.h"
namespace Wintermute {
@@ -53,8 +53,11 @@ namespace Wintermute {
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
-BaseFileManager::BaseFileManager(Common::Language lang) {
+BaseFileManager::BaseFileManager(Common::Language lang, bool detectionMode) {
+ _detectionMode = detectionMode;
_language = lang;
+ _resources = nullptr;
+ initResources();
initPaths();
registerPackages();
}
@@ -79,37 +82,41 @@ bool BaseFileManager::cleanup() {
// delete packages
_packages.clear();
+ // get rid of the resources:
+ delete _resources;
+ _resources = NULL;
+
return STATUS_OK;
}
//////////////////////////////////////////////////////////////////////
byte *BaseFileManager::readWholeFile(const Common::String &filename, uint32 *size, bool mustExist) {
- byte *buffer = NULL;
+ byte *buffer = nullptr;
Common::SeekableReadStream *file = openFile(filename);
if (!file) {
if (mustExist) {
debugC(kWintermuteDebugFileAccess | kWintermuteDebugLog, "Error opening file '%s'", filename.c_str());
}
- return NULL;
+ return nullptr;
}
buffer = new byte[file->size() + 1];
- if (buffer == NULL) {
+ if (buffer == nullptr) {
debugC(kWintermuteDebugFileAccess | kWintermuteDebugLog, "Error allocating buffer for file '%s' (%d bytes)", filename.c_str(), file->size() + 1);
closeFile(file);
- return NULL;
+ return nullptr;
}
if (file->read(buffer, (uint32)file->size()) != (uint32)file->size()) {
debugC(kWintermuteDebugFileAccess | kWintermuteDebugLog, "Error reading file '%s'", filename.c_str());
closeFile(file);
delete[] buffer;
- return NULL;
+ return nullptr;
};
buffer[file->size()] = '\0';
- if (size != NULL) {
+ if (size != nullptr) {
*size = file->size();
}
closeFile(file);
@@ -224,11 +231,23 @@ bool BaseFileManager::registerPackage(Common::FSNode file, const Common::String
return STATUS_OK;
}
+void BaseFileManager::initResources() {
+ _resources = Common::makeZipArchive("wintermute.zip");
+ if (!_resources && !_detectionMode) { // Wintermute.zip is unavailable during detection
+ error("Couldn't load wintermute.zip");
+ }
+ if (_resources) {
+ assert(_resources->hasFile("syste_font.bmp"));
+ assert(_resources->hasFile("invalid.bmp"));
+ assert(_resources->hasFile("invalid_debug.bmp"));
+ }
+}
+
//////////////////////////////////////////////////////////////////////////
Common::SeekableReadStream *BaseFileManager::openPkgFile(const Common::String &filename) {
Common::String upcName = filename;
upcName.toUppercase();
- Common::SeekableReadStream *file = NULL;
+ Common::SeekableReadStream *file = nullptr;
char fileName[MAX_PATH_LENGTH];
strcpy(fileName, upcName.c_str());
@@ -240,7 +259,7 @@ Common::SeekableReadStream *BaseFileManager::openPkgFile(const Common::String &f
}
Common::ArchiveMemberPtr entry = _packages.getMember(upcName);
if (!entry) {
- return NULL;
+ return nullptr;
}
file = entry->createReadStream();
return file;
@@ -261,7 +280,7 @@ bool BaseFileManager::hasFile(const Common::String &filename) {
if (_packages.hasFile(filename)) {
return true; // We don't bother checking if the file can actually be opened, something bigger is wrong if that is the case.
}
- if (BaseResources::hasFile(filename)) {
+ if (!_detectionMode && _resources->hasFile(filename)) {
return true;
}
return false;
@@ -270,7 +289,7 @@ bool BaseFileManager::hasFile(const Common::String &filename) {
//////////////////////////////////////////////////////////////////////////
Common::SeekableReadStream *BaseFileManager::openFile(const Common::String &filename, bool absPathWarning, bool keepTrackOf) {
if (strcmp(filename.c_str(), "") == 0) {
- return NULL;
+ return nullptr;
}
debugC(kWintermuteDebugFileAccess, "Open file %s", filename.c_str());
@@ -297,7 +316,7 @@ bool BaseFileManager::closeFile(Common::SeekableReadStream *File) {
//////////////////////////////////////////////////////////////////////////
Common::SeekableReadStream *BaseFileManager::openFileRaw(const Common::String &filename) {
- Common::SeekableReadStream *ret = NULL;
+ Common::SeekableReadStream *ret = nullptr;
if (scumm_strnicmp(filename.c_str(), "savegame:", 9) == 0) {
if (!BaseEngine::instance().getGameRef()) {
@@ -321,20 +340,22 @@ Common::SeekableReadStream *BaseFileManager::openFileRaw(const Common::String &f
return ret;
}
- ret = BaseResources::getFile(filename);
+ if (!_detectionMode) {
+ ret = _resources->createReadStreamForMember(filename);
+ }
if (ret) {
return ret;
}
debugC(kWintermuteDebugFileAccess ,"BFileManager::OpenFileRaw - Failed to open %s", filename.c_str());
- return NULL;
+ return nullptr;
}
BaseFileManager *BaseFileManager::getEngineInstance() {
if (BaseEngine::instance().getFileManager()) {
return BaseEngine::instance().getFileManager();
}
- return NULL;
+ return nullptr;
}
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_file_manager.h b/engines/wintermute/base/base_file_manager.h
index 70aff49bbb..7ed3a6c7cb 100644
--- a/engines/wintermute/base/base_file_manager.h
+++ b/engines/wintermute/base/base_file_manager.h
@@ -43,9 +43,9 @@ public:
bool closeFile(Common::SeekableReadStream *File);
bool hasFile(const Common::String &filename);
Common::SeekableReadStream *openFile(const Common::String &filename, bool absPathWarning = true, bool keepTrackOf = true);
- byte *readWholeFile(const Common::String &filename, uint32 *size = NULL, bool mustExist = true);
+ byte *readWholeFile(const Common::String &filename, uint32 *size = nullptr, bool mustExist = true);
- BaseFileManager(Common::Language lang);
+ BaseFileManager(Common::Language lang, bool detectionMode = false);
virtual ~BaseFileManager();
// Used only for detection
bool registerPackages(const Common::FSList &fslist);
@@ -59,14 +59,17 @@ private:
bool initPaths();
bool addPath(TPathType type, const Common::FSNode &path);
bool registerPackages();
+ void initResources();
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;
Common::Array<Common::SeekableReadStream *> _openFiles;
Common::Language _language;
+ Common::Archive *_resources;
// This class is intentionally not a subclass of Base, as it needs to be used by
// the detector too, without launching the entire engine:
};
diff --git a/engines/wintermute/base/base_frame.cpp b/engines/wintermute/base/base_frame.cpp
index 7c64144480..8a190c729b 100644
--- a/engines/wintermute/base/base_frame.cpp
+++ b/engines/wintermute/base/base_frame.cpp
@@ -48,7 +48,7 @@ BaseFrame::BaseFrame(BaseGame *inGame) : BaseScriptable(inGame, true) {
_delay = 0;
_moveX = _moveY = 0;
- _sound = NULL;
+ _sound = nullptr;
_killSound = false;
_editorExpanded = false;
@@ -59,7 +59,7 @@ BaseFrame::BaseFrame(BaseGame *inGame) : BaseScriptable(inGame, true) {
//////////////////////////////////////////////////////////////////////
BaseFrame::~BaseFrame() {
delete _sound;
- _sound = NULL;
+ _sound = nullptr;
for (uint32 i = 0; i < _subframes.size(); i++) {
delete _subframes[i];
@@ -68,7 +68,7 @@ BaseFrame::~BaseFrame() {
for (uint32 i = 0; i < _applyEvent.size(); i++) {
delete[] _applyEvent[i];
- _applyEvent[i] = NULL;
+ _applyEvent[i] = nullptr;
}
_applyEvent.clear();
}
@@ -181,7 +181,7 @@ bool BaseFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) {
bool mirrorX = false;
bool mirrorY = false;
BasePlatform::setRectEmpty(&rect);
- char *surface_file = NULL;
+ char *surface_file = nullptr;
while ((cmd = parser.getCommand((char **)&buffer, commands, &params)) > 0) {
switch (cmd) {
@@ -260,7 +260,7 @@ bool BaseFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) {
case TOKEN_SOUND: {
if (_sound) {
delete _sound;
- _sound = NULL;
+ _sound = nullptr;
}
_sound = new BaseSound(_gameRef);
if (!_sound || DID_FAIL(_sound->setSound(params, Audio::Mixer::kSFXSoundType, false))) {
@@ -268,7 +268,7 @@ bool BaseFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) {
_gameRef->LOG(0, "Error loading sound '%s'.", params);
}
delete _sound;
- _sound = NULL;
+ _sound = nullptr;
}
}
break;
@@ -305,7 +305,7 @@ bool BaseFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) {
BaseSubFrame *sub = new BaseSubFrame(_gameRef);
- if (surface_file != NULL) {
+ if (surface_file != nullptr) {
if (custoTrans) {
sub->setSurface(surface_file, false, r, g, b, lifeTime, keepLoaded);
} else {
@@ -452,14 +452,14 @@ bool BaseFrame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStac
stack->correctParams(1);
ScValue *val = stack->pop();
delete _sound;
- _sound = NULL;
+ _sound = nullptr;
if (!val->isNULL()) {
_sound = new BaseSound(_gameRef);
if (!_sound || DID_FAIL(_sound->setSound(val->getString(), Audio::Mixer::kSFXSoundType, false))) {
stack->pushBool(false);
delete _sound;
- _sound = NULL;
+ _sound = nullptr;
} else {
stack->pushBool(true);
}
@@ -516,13 +516,13 @@ bool BaseFrame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStac
else if (strcmp(name, "AddSubframe") == 0) {
stack->correctParams(1);
ScValue *val = stack->pop();
- const char *filename = NULL;
+ const char *filename = nullptr;
if (!val->isNULL()) {
filename = val->getString();
}
BaseSubFrame *sub = new BaseSubFrame(_gameRef);
- if (filename != NULL) {
+ if (filename != nullptr) {
sub->setSurface(filename);
sub->setDefaultRect();
}
@@ -543,13 +543,13 @@ bool BaseFrame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStac
}
ScValue *val = stack->pop();
- const char *filename = NULL;
+ const char *filename = nullptr;
if (!val->isNULL()) {
filename = val->getString();
}
BaseSubFrame *sub = new BaseSubFrame(_gameRef);
- if (filename != NULL) {
+ if (filename != nullptr) {
sub->setSurface(filename);
}
diff --git a/engines/wintermute/base/base_frame.h b/engines/wintermute/base/base_frame.h
index 7c5d893e70..5ed0b92bba 100644
--- a/engines/wintermute/base/base_frame.h
+++ b/engines/wintermute/base/base_frame.h
@@ -51,7 +51,7 @@ public:
int _moveX;
uint32 _delay;
BaseArray<BaseSubFrame *> _subframes;
- bool draw(int x, int y, BaseObject *registerOwner = NULL, 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, TSpriteBlendMode blendMode = BLEND_NORMAL);
bool loadBuffer(byte *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 7402bc6f30..0248c349e7 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -34,7 +34,6 @@
#include "engines/wintermute/base/base_file_manager.h"
#include "engines/wintermute/base/font/base_font.h"
#include "engines/wintermute/base/font/base_font_storage.h"
-#include "engines/wintermute/base/gfx/base_image.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
#include "engines/wintermute/base/base_keyboard_state.h"
#include "engines/wintermute/base/base_parser.h"
@@ -92,30 +91,30 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_interactive = true;
_origInteractive = false;
- _surfaceStorage = NULL;
- _fontStorage = NULL;
- _renderer = NULL;
- _soundMgr = NULL;
- _transMgr = NULL;
- _scEngine = NULL;
- _keyboardState = NULL;
+ _surfaceStorage = nullptr;
+ _fontStorage = nullptr;
+ _renderer = nullptr;
+ _soundMgr = nullptr;
+ _transMgr = nullptr;
+ _scEngine = nullptr;
+ _keyboardState = nullptr;
- _mathClass = NULL;
+ _mathClass = nullptr;
- _debugLogFile = NULL;
+ _debugLogFile = nullptr;
_debugDebugMode = false;
_debugShowFPS = false;
- _systemFont = NULL;
- _videoFont = NULL;
+ _systemFont = nullptr;
+ _videoFont = nullptr;
- _videoPlayer = NULL;
- _theoraPlayer = NULL;
+ _videoPlayer = nullptr;
+ _theoraPlayer = nullptr;
- _mainObject = NULL;
- _activeObject = NULL;
+ _mainObject = nullptr;
+ _activeObject = nullptr;
- _fader = NULL;
+ _fader = nullptr;
_offsetX = _offsetY = 0;
_offsetPercentX = _offsetPercentY = 0.0f;
@@ -135,12 +134,12 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_mousePos.x = _mousePos.y = 0;
_mouseLeftDown = _mouseRightDown = _mouseMidlleDown = false;
- _capturedObject = NULL;
+ _capturedObject = nullptr;
// FPS counters
_lastTime = _fpsTime = _deltaTime = _framesRendered = _fps = 0;
- _cursorNoninteractive = NULL;
+ _cursorNoninteractive = nullptr;
_useD3D = false;
@@ -154,7 +153,7 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_settingsRequireSound = false;
_settingsTLMode = 0;
_settingsAllowWindowed = true;
- _settingsGameFile = NULL;
+ _settingsGameFile = nullptr;
_settingsAllowAdvanced = false;
_settingsAllowAccessTab = true;
_settingsAllowAboutTab = true;
@@ -163,7 +162,7 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_editorForceScripts = false;
_editorAlwaysRegister = false;
- _focusedWindow = NULL;
+ _focusedWindow = nullptr;
_loadInProgress = false;
@@ -177,8 +176,8 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_editorMode = false;
//_doNotExpandStrings = false;
- _engineLogCallback = NULL;
- _engineLogCallbackData = NULL;
+ _engineLogCallback = nullptr;
+ _engineLogCallbackData = nullptr;
_smartCache = false;
_surfaceGCCycleTime = 10000;
@@ -199,7 +198,7 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_saveDirChecked = false;
- _loadingIcon = NULL;
+ _loadingIcon = nullptr;
_loadingIconX = _loadingIconY = 0;
_loadingIconPersistent = false;
@@ -209,7 +208,7 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_soundBufferSizeSec = 3;
_suspendedRendering = false;
- _lastCursor = NULL;
+ _lastCursor = nullptr;
BasePlatform::setRectEmpty(&_mouseLockRect);
@@ -217,7 +216,7 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_lastMiniUpdate = 0;
_miniUpdateEnabled = false;
- _cachedThumbnail = NULL;
+ _cachedThumbnail = nullptr;
_autorunDisabled = false;
@@ -273,23 +272,23 @@ BaseGame::~BaseGame() {
delete _stringTable;
delete _musicSystem;
- _settingsGameFile = NULL;
+ _settingsGameFile = nullptr;
- _cachedThumbnail = NULL;
+ _cachedThumbnail = nullptr;
- _mathClass = NULL;
+ _mathClass = nullptr;
- _transMgr = NULL;
- _scEngine = NULL;
- _fontStorage = NULL;
- _surfaceStorage = NULL;
- _videoPlayer = NULL;
- _theoraPlayer = NULL;
- _soundMgr = NULL;
+ _transMgr = nullptr;
+ _scEngine = nullptr;
+ _fontStorage = nullptr;
+ _surfaceStorage = nullptr;
+ _videoPlayer = nullptr;
+ _theoraPlayer = nullptr;
+ _soundMgr = nullptr;
- _renderer = NULL;
- _stringTable = NULL;
- _musicSystem = NULL;
+ _renderer = nullptr;
+ _stringTable = nullptr;
+ _musicSystem = nullptr;
DEBUG_DebugDisable();
debugC(kWintermuteDebugLog, "--- shutting down normally ---\n");
@@ -299,48 +298,48 @@ BaseGame::~BaseGame() {
//////////////////////////////////////////////////////////////////////////
bool BaseGame::cleanup() {
delete _loadingIcon;
- _loadingIcon = NULL;
+ _loadingIcon = nullptr;
- _engineLogCallback = NULL;
- _engineLogCallbackData = NULL;
+ _engineLogCallback = nullptr;
+ _engineLogCallbackData = nullptr;
_musicSystem->cleanup();
unregisterObject(_fader);
- _fader = NULL;
+ _fader = nullptr;
for (uint32 i = 0; i < _regObjects.size(); i++) {
delete _regObjects[i];
- _regObjects[i] = NULL;
+ _regObjects[i] = nullptr;
}
_regObjects.clear();
_windows.clear(); // refs only
- _focusedWindow = NULL; // ref only
+ _focusedWindow = nullptr; // ref only
delete _cursorNoninteractive;
delete _cursor;
delete _activeCursor;
- _cursorNoninteractive = NULL;
- _cursor = NULL;
- _activeCursor = NULL;
+ _cursorNoninteractive = nullptr;
+ _cursor = nullptr;
+ _activeCursor = nullptr;
delete _scValue;
delete _sFX;
- _scValue = NULL;
- _sFX = NULL;
+ _scValue = nullptr;
+ _sFX = nullptr;
for (uint32 i = 0; i < _scripts.size(); i++) {
- _scripts[i]->_owner = NULL;
+ _scripts[i]->_owner = nullptr;
_scripts[i]->finish();
}
_scripts.clear();
_fontStorage->removeFont(_systemFont);
- _systemFont = NULL;
+ _systemFont = nullptr;
_fontStorage->removeFont(_videoFont);
- _videoFont = NULL;
+ _videoFont = nullptr;
for (uint32 i = 0; i < _quickMessages.size(); i++) {
delete _quickMessages[i];
@@ -350,17 +349,17 @@ bool BaseGame::cleanup() {
_viewportStack.clear();
_viewportSP = -1;
- setName(NULL);
- setFilename(NULL);
+ setName(nullptr);
+ setFilename(nullptr);
for (int i = 0; i < 7; i++) {
delete[] _caption[i];
- _caption[i] = NULL;
+ _caption[i] = nullptr;
}
- _lastCursor = NULL;
+ _lastCursor = nullptr;
delete _keyboardState;
- _keyboardState = NULL;
+ _keyboardState = nullptr;
return STATUS_OK;
}
@@ -371,47 +370,47 @@ bool BaseGame::initialize1() {
bool loaded = false; // Not really a loop, but a goto-replacement.
while (!loaded) {
_surfaceStorage = new BaseSurfaceStorage(this);
- if (_surfaceStorage == NULL) {
+ if (_surfaceStorage == nullptr) {
break;
}
_fontStorage = new BaseFontStorage(this);
- if (_fontStorage == NULL) {
+ if (_fontStorage == nullptr) {
break;
}
_soundMgr = new BaseSoundMgr(this);
- if (_soundMgr == NULL) {
+ if (_soundMgr == nullptr) {
break;
}
_mathClass = makeSXMath(this);
- if (_mathClass == NULL) {
+ if (_mathClass == nullptr) {
break;
}
_scEngine = new ScEngine(this);
- if (_scEngine == NULL) {
+ if (_scEngine == nullptr) {
break;
}
_videoPlayer = new VideoPlayer(this);
- if (_videoPlayer == NULL) {
+ if (_videoPlayer == nullptr) {
break;
}
_transMgr = new BaseTransitionMgr(this);
- if (_transMgr == NULL) {
+ if (_transMgr == nullptr) {
break;
}
_keyboardState = new BaseKeyboardState(this);
- if (_keyboardState == NULL) {
+ if (_keyboardState == nullptr) {
break;
}
_fader = new BaseFader(this);
- if (_fader == NULL) {
+ if (_fader == nullptr) {
break;
}
registerObject(_fader);
@@ -437,7 +436,7 @@ bool BaseGame::initialize1() {
//////////////////////////////////////////////////////////////////////
bool BaseGame::initialize2() { // we know whether we are going to be accelerated
_renderer = makeOSystemRenderer(this);
- if (_renderer == NULL) {
+ if (_renderer == nullptr) {
return STATUS_FAILED;
}
@@ -480,10 +479,10 @@ void BaseGame::DEBUG_DebugEnable(const char *filename) {
//////////////////////////////////////////////////////////////////////
void BaseGame::DEBUG_DebugDisable() {
- if (_debugLogFile != NULL) {
+ if (_debugLogFile != nullptr) {
LOG(0, "********** DEBUG LOG CLOSED ********************************************");
//fclose((FILE *)_debugLogFile);
- _debugLogFile = NULL;
+ _debugLogFile = nullptr;
}
_debugDebugMode = false;
}
@@ -538,7 +537,7 @@ bool BaseGame::initLoop() {
_fontStorage->initLoop();
- //_activeObject = NULL;
+ //_activeObject = nullptr;
// count FPS
_deltaTime = _currentTime - _lastTime;
@@ -567,7 +566,7 @@ bool BaseGame::initLoop() {
getMousePos(&_mousePos);
- _focusedWindow = NULL;
+ _focusedWindow = nullptr;
for (int i = _windows.size() - 1; i >= 0; i--) {
if (_windows[i]->_visible) {
_focusedWindow = _windows[i];
@@ -605,10 +604,10 @@ void BaseGame::setOffset(int offsetX, int offsetY) {
//////////////////////////////////////////////////////////////////////////
void BaseGame::getOffset(int *offsetX, int *offsetY) {
- if (offsetX != NULL) {
+ if (offsetX != nullptr) {
*offsetX = _offsetX;
}
- if (offsetY != NULL) {
+ if (offsetY != nullptr) {
*offsetY = _offsetY;
}
}
@@ -617,7 +616,7 @@ void BaseGame::getOffset(int *offsetX, int *offsetY) {
//////////////////////////////////////////////////////////////////////////
bool BaseGame::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "BaseGame::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -768,7 +767,7 @@ bool BaseGame::loadBuffer(byte *buffer, bool complete) {
if (_systemFont) {
_fontStorage->removeFont(_systemFont);
}
- _systemFont = NULL;
+ _systemFont = nullptr;
_systemFont = _gameRef->_fontStorage->addFont((char *)params);
break;
@@ -777,7 +776,7 @@ bool BaseGame::loadBuffer(byte *buffer, bool complete) {
if (_videoFont) {
_fontStorage->removeFont(_videoFont);
}
- _videoFont = NULL;
+ _videoFont = nullptr;
_videoFont = _gameRef->_fontStorage->addFont((char *)params);
break;
@@ -788,18 +787,18 @@ bool BaseGame::loadBuffer(byte *buffer, bool complete) {
_cursor = new BaseSprite(_gameRef);
if (!_cursor || DID_FAIL(_cursor->loadFile((char *)params))) {
delete _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
cmd = PARSERR_GENERIC;
}
break;
case TOKEN_ACTIVE_CURSOR:
delete _activeCursor;
- _activeCursor = NULL;
+ _activeCursor = nullptr;
_activeCursor = new BaseSprite(_gameRef);
if (!_activeCursor || DID_FAIL(_activeCursor->loadFile((char *)params))) {
delete _activeCursor;
- _activeCursor = NULL;
+ _activeCursor = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -809,7 +808,7 @@ bool BaseGame::loadBuffer(byte *buffer, bool complete) {
_cursorNoninteractive = new BaseSprite(_gameRef);
if (!_cursorNoninteractive || DID_FAIL(_cursorNoninteractive->loadFile((char *)params))) {
delete _cursorNoninteractive;
- _cursorNoninteractive = NULL;
+ _cursorNoninteractive = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -1057,7 +1056,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
stack->pushNative(win, true);
} else {
delete win;
- win = NULL;
+ win = nullptr;
stack->pushNULL();
}
return STATUS_OK;
@@ -1147,7 +1146,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
bool freezeMusic = stack->pop()->getBool(true);
ScValue *valSub = stack->pop();
- const char *subtitleFile = valSub->isNULL() ? NULL : valSub->getString();
+ const char *subtitleFile = valSub->isNULL() ? nullptr : valSub->getString();
if (type < (int)VID_PLAY_POS || type > (int)VID_PLAY_CENTER) {
type = (int)VID_PLAY_STRETCH;
@@ -1187,7 +1186,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
bool dropFrames = stack->pop()->getBool(true);
ScValue *valSub = stack->pop();
- const char *subtitleFile = valSub->isNULL() ? NULL : valSub->getString();
+ const char *subtitleFile = valSub->isNULL() ? nullptr : valSub->getString();
if (type < (int)VID_PLAY_POS || type > (int)VID_PLAY_CENTER) {
type = (int)VID_PLAY_STRETCH;
@@ -1206,7 +1205,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
} else {
stack->pushBool(false);
delete _theoraPlayer;
- _theoraPlayer = NULL;
+ _theoraPlayer = nullptr;
}
return STATUS_OK;
@@ -1258,7 +1257,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
stack->correctParams(2);
const char *key = stack->pop()->getString();
const char *val = stack->pop()->getString();
- Common::String privKey = "priv_" + StringUtil::encodeSetting(key);
+ Common::String privKey = "wme_" + StringUtil::encodeSetting(key);
Common::String privVal = StringUtil::encodeSetting(val);
ConfMan.set(privKey, privVal);
stack->pushNULL();
@@ -1272,7 +1271,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
stack->correctParams(2);
const char *key = stack->pop()->getString();
const char *initVal = stack->pop()->getString();
- Common::String privKey = "priv_" + StringUtil::encodeSetting(key);
+ Common::String privKey = "wme_" + StringUtil::encodeSetting(key);
Common::String result = initVal;
if (ConfMan.hasKey(privKey)) {
result = StringUtil::decodeSetting(ConfMan.get(key));
@@ -1471,7 +1470,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
else if (strcmp(name, "RemoveActiveCursor") == 0) {
stack->correctParams(0);
delete _activeCursor;
- _activeCursor = NULL;
+ _activeCursor = nullptr;
stack->pushNULL();
return STATUS_OK;
@@ -1577,14 +1576,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
fileNum++;
}
- bool ret = false;
- BaseImage *image = _gameRef->_renderer->takeScreenshot();
- if (image) {
- ret = DID_SUCCEED(image->saveBMPFile(filename));
- delete image;
- } else {
- ret = false;
- }
+ bool ret = _gameRef->_renderer->saveScreenShot(filename);
stack->pushBool(ret);
return STATUS_OK;
@@ -1599,17 +1591,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
int sizeX = stack->pop()->getInt(_renderer->_width);
int sizeY = stack->pop()->getInt(_renderer->_height);
- bool ret = false;
- BaseImage *image = _gameRef->_renderer->takeScreenshot();
- if (image) {
- ret = DID_SUCCEED(image->resize(sizeX, sizeY));
- if (ret) {
- ret = DID_SUCCEED(image->saveBMPFile(filename));
- }
- delete image;
- } else {
- ret = false;
- }
+ bool ret = _gameRef->_renderer->saveScreenShot(filename, sizeX, sizeY);
stack->pushBool(ret);
return STATUS_OK;
@@ -1724,7 +1706,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
else if (strcmp(name, "RemoveWaitCursor") == 0) {
stack->correctParams(0);
delete _cursorNoninteractive;
- _cursorNoninteractive = NULL;
+ _cursorNoninteractive = nullptr;
stack->pushNULL();
@@ -1783,7 +1765,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
_loadingIcon = new BaseSprite(this);
if (!_loadingIcon || DID_FAIL(_loadingIcon->loadFile(filename))) {
delete _loadingIcon;
- _loadingIcon = NULL;
+ _loadingIcon = nullptr;
} else {
displayContent(false, true);
_gameRef->_renderer->flip();
@@ -1800,7 +1782,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
else if (strcmp(name, "HideLoadingIcon") == 0) {
stack->correctParams(0);
delete _loadingIcon;
- _loadingIcon = NULL;
+ _loadingIcon = nullptr;
stack->pushNULL();
return STATUS_OK;
}
@@ -1840,7 +1822,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
_cachedThumbnail = new BaseSaveThumbHelper(this);
if (DID_FAIL(_cachedThumbnail->storeThumbnail())) {
delete _cachedThumbnail;
- _cachedThumbnail = NULL;
+ _cachedThumbnail = nullptr;
stack->pushBool(false);
} else {
stack->pushBool(true);
@@ -1855,7 +1837,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
else if (strcmp(name, "DeleteSaveThumbnail") == 0) {
stack->correctParams(0);
delete _cachedThumbnail;
- _cachedThumbnail = NULL;
+ _cachedThumbnail = nullptr;
stack->pushNULL();
return STATUS_OK;
@@ -1894,7 +1876,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
}
BaseFileManager::getEngineInstance()->closeFile(file);
- file = NULL;
+ file = nullptr;
} else {
stack->pushNULL();
}
@@ -2397,7 +2379,7 @@ bool BaseGame::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MainObject") == 0) {
BaseScriptable *obj = value->getNative();
- if (obj == NULL || validObject((BaseObject *)obj)) {
+ if (obj == nullptr || validObject((BaseObject *)obj)) {
_mainObject = (BaseObject *)obj;
}
return STATUS_OK;
@@ -2633,7 +2615,7 @@ bool BaseGame::unregisterObject(BaseObject *object) {
// get new focused window
if (_focusedWindow == object) {
- _focusedWindow = NULL;
+ _focusedWindow = nullptr;
}
break;
@@ -2642,12 +2624,12 @@ bool BaseGame::unregisterObject(BaseObject *object) {
// is it active object?
if (_activeObject == object) {
- _activeObject = NULL;
+ _activeObject = nullptr;
}
// is it main object?
if (_mainObject == object) {
- _mainObject = NULL;
+ _mainObject = nullptr;
}
// destroy object
@@ -2673,7 +2655,7 @@ void BaseGame::invalidateValues(void *value, void *data) {
if (!val->_persistent && ((BaseScriptable *)data)->_refCount == 1) {
((BaseScriptable *)data)->_refCount++;
}
- val->setNative(NULL);
+ val->setNative(nullptr);
val->setNULL();
}
}
@@ -3036,8 +3018,8 @@ bool BaseGame::displayWindows(bool inGame) {
bool res;
// did we lose focus? focus topmost window
- if (_focusedWindow == NULL || !_focusedWindow->_visible || _focusedWindow->_disable) {
- _focusedWindow = NULL;
+ if (_focusedWindow == nullptr || !_focusedWindow->_visible || _focusedWindow->_disable) {
+ _focusedWindow = nullptr;
for (int i = _windows.size() - 1; i >= 0; i--) {
if (_windows[i]->_visible && !_windows[i]->_disable) {
_focusedWindow = _windows[i];
@@ -3083,7 +3065,7 @@ bool BaseGame::loadSettings(const char *filename) {
byte *origBuffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (origBuffer == NULL) {
+ if (origBuffer == nullptr) {
_gameRef->LOG(0, "BaseGame::LoadSettings failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -3207,6 +3189,7 @@ bool BaseGame::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_lastTime));
persistMgr->transfer(TMEMBER(_mainObject));
_musicSystem->persistChannels(persistMgr);
+ _musicSystem->persistCrossfadeSettings(persistMgr);
persistMgr->transfer(TMEMBER(_offsetX));
persistMgr->transfer(TMEMBER(_offsetY));
@@ -3238,8 +3221,6 @@ bool BaseGame::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_liveTimerDelta));
persistMgr->transfer(TMEMBER(_liveTimerLast));
- _musicSystem->persistCrossfadeSettings(persistMgr);
-
_renderer->persistSaveLoadImages(persistMgr);
persistMgr->transfer(TMEMBER_INT(_textEncoding));
@@ -3446,7 +3427,7 @@ void BaseGame::setWindowTitle() {
bool BaseGame::setActiveObject(BaseObject *obj) {
// not-active when game is frozen
if (obj && !_gameRef->_interactive && !obj->_nonIntMouseEvents) {
- obj = NULL;
+ obj = nullptr;
}
if (obj == _activeObject) {
@@ -3501,7 +3482,7 @@ bool BaseGame::popViewport() {
//////////////////////////////////////////////////////////////////////////
bool BaseGame::getCurrentViewportRect(Rect32 *rect, bool *custom) {
- if (rect == NULL) {
+ if (rect == nullptr) {
return STATUS_FAILED;
} else {
if (_viewportSP >= 0) {
@@ -3635,12 +3616,12 @@ bool BaseGame::restoreDeviceObjects() {
//////////////////////////////////////////////////////////////////////////
bool BaseGame::setWaitCursor(const char *filename) {
delete _cursorNoninteractive;
- _cursorNoninteractive = NULL;
+ _cursorNoninteractive = nullptr;
_cursorNoninteractive = new BaseSprite(_gameRef);
if (!_cursorNoninteractive || DID_FAIL(_cursorNoninteractive->loadFile(filename))) {
delete _cursorNoninteractive;
- _cursorNoninteractive = NULL;
+ _cursorNoninteractive = nullptr;
return STATUS_FAILED;
} else {
return STATUS_OK;
@@ -3666,7 +3647,7 @@ bool BaseGame::stopVideo() {
if (_theoraPlayer && _theoraPlayer->isPlaying()) {
_theoraPlayer->stop();
delete _theoraPlayer;
- _theoraPlayer = NULL;
+ _theoraPlayer = nullptr;
}
return STATUS_OK;
}
@@ -3717,12 +3698,12 @@ bool BaseGame::onMouseLeftDown() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("LeftClick"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("LeftClick");
}
}
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_capturedObject = _activeObject;
}
_mouseLeftDown = true;
@@ -3738,12 +3719,12 @@ bool BaseGame::onMouseLeftUp() {
}
BasePlatform::releaseCapture();
- _capturedObject = NULL;
+ _capturedObject = nullptr;
_mouseLeftDown = false;
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("LeftRelease"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("LeftRelease");
}
}
@@ -3762,7 +3743,7 @@ bool BaseGame::onMouseLeftDblClick() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("LeftDoubleClick"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("LeftDoubleClick");
}
}
@@ -3781,7 +3762,7 @@ bool BaseGame::onMouseRightDblClick() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("RightDoubleClick"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("RightDoubleClick");
}
}
@@ -3796,7 +3777,7 @@ bool BaseGame::onMouseRightDown() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("RightClick"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("RightClick");
}
}
@@ -3811,7 +3792,7 @@ bool BaseGame::onMouseRightUp() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("RightRelease"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("RightRelease");
}
}
@@ -3830,7 +3811,7 @@ bool BaseGame::onMouseMiddleDown() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("MiddleClick"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("MiddleClick");
}
}
@@ -3845,7 +3826,7 @@ bool BaseGame::onMouseMiddleUp() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("MiddleRelease"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("MiddleRelease");
}
}
@@ -3907,7 +3888,7 @@ bool BaseGame::displayDebugInfo() {
sprintf(str, "Timer: %d", _timer);
_gameRef->_systemFont->drawText((byte *)str, 0, 130, _renderer->_width, TAL_RIGHT);
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_systemFont->drawText((const byte *)_activeObject->getName(), 0, 150, _renderer->_width, TAL_RIGHT);
}
diff --git a/engines/wintermute/base/base_game.h b/engines/wintermute/base/base_game.h
index 75cf3fd832..5666fb818c 100644
--- a/engines/wintermute/base/base_game.h
+++ b/engines/wintermute/base/base_game.h
@@ -119,14 +119,15 @@ public:
int _offsetX;
float _offsetPercentX;
float _offsetPercentY;
- BaseObject *_mainObject;
+
+ inline BaseObject *getMainObject() { return _mainObject; }
+ inline BaseFont *getSystemFont() { return _systemFont; }
bool initInput();
bool initLoop();
uint32 _currentTime;
uint32 _deltaTime;
- BaseFont *_systemFont;
- BaseFont *_videoFont;
+
bool initialize1();
bool initialize2();
bool initialize3();
@@ -144,7 +145,7 @@ public:
virtual ~BaseGame();
void DEBUG_DebugDisable();
- void DEBUG_DebugEnable(const char *filename = NULL);
+ void DEBUG_DebugEnable(const char *filename = nullptr);
bool _debugDebugMode;
void *_debugLogFile;
@@ -236,8 +237,8 @@ public:
void setInteractive(bool state);
virtual bool windowLoadHook(UIWindow *win, char **buf, char **params);
virtual bool windowScriptMethodHook(UIWindow *win, ScScript *script, ScStack *stack, const char *name);
- bool getCurrentViewportOffset(int *offsetX = NULL, int *offsetY = NULL);
- bool getCurrentViewportRect(Rect32 *rect, bool *custom = NULL);
+ bool getCurrentViewportOffset(int *offsetX = nullptr, int *offsetY = nullptr);
+ bool getCurrentViewportRect(Rect32 *rect, bool *custom = nullptr);
bool popViewport();
bool pushViewport(BaseViewport *Viewport);
bool setActiveObject(BaseObject *Obj);
@@ -249,6 +250,9 @@ public:
bool _touchInterface;
bool _constrainedMemory;
protected:
+ BaseFont *_systemFont;
+ BaseFont *_videoFont;
+
BaseSprite *_loadingIcon;
int _loadingIconX;
int _loadingIconY;
@@ -260,6 +264,8 @@ protected:
VideoPlayer *_videoPlayer;
VideoTheoraPlayer *_theoraPlayer;
private:
+ BaseObject *_mainObject;
+
bool _mouseRightDown;
bool _mouseMidlleDown;
bool _settingsRequireAcceleration;
@@ -287,7 +293,7 @@ private:
uint32 _framesRendered;
Common::String _gameId;
- void setEngineLogCallback(ENGINE_LOG_CALLBACK callback = NULL, void *data = NULL);
+ void setEngineLogCallback(ENGINE_LOG_CALLBACK callback = nullptr, void *data = nullptr);
ENGINE_LOG_CALLBACK _engineLogCallback;
void *_engineLogCallbackData;
diff --git a/engines/wintermute/base/base_game_music.cpp b/engines/wintermute/base/base_game_music.cpp
index 365fa6e212..8dff41d854 100644
--- a/engines/wintermute/base/base_game_music.cpp
+++ b/engines/wintermute/base/base_game_music.cpp
@@ -39,7 +39,7 @@ namespace Wintermute {
BaseGameMusic::BaseGameMusic(BaseGame *gameRef) : _gameRef(gameRef) {
for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
- _music[i] = NULL;
+ _music[i] = nullptr;
_musicStartTime[i] = 0;
}
@@ -54,7 +54,7 @@ BaseGameMusic::BaseGameMusic(BaseGame *gameRef) : _gameRef(gameRef) {
void BaseGameMusic::cleanup() {
for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
delete _music[i];
- _music[i] = NULL;
+ _music[i] = nullptr;
_musicStartTime[i] = 0;
}
}
@@ -67,7 +67,7 @@ bool BaseGameMusic::playMusic(int channel, const char *filename, bool looping, u
}
delete _music[channel];
- _music[channel] = NULL;
+ _music[channel] = nullptr;
_music[channel] = new BaseSound(_gameRef);
if (_music[channel] && DID_SUCCEED(_music[channel]->setSound(filename, Audio::Mixer::kMusicSoundType, true))) {
@@ -81,7 +81,7 @@ bool BaseGameMusic::playMusic(int channel, const char *filename, bool looping, u
return _music[channel]->play(looping);
} else {
delete _music[channel];
- _music[channel] = NULL;
+ _music[channel] = nullptr;
return STATUS_FAILED;
}
}
@@ -97,7 +97,7 @@ bool BaseGameMusic::stopMusic(int channel) {
if (_music[channel]) {
_music[channel]->stop();
delete _music[channel];
- _music[channel] = NULL;
+ _music[channel] = nullptr;
return STATUS_OK;
} else {
return STATUS_FAILED;
@@ -494,7 +494,7 @@ bool BaseGameMusic::scCallMethod(ScScript *script, ScStack *stack, ScStack *this
if (sound && DID_SUCCEED(sound->setSound(filename, Audio::Mixer::kMusicSoundType, true))) {
length = sound->getLength();
delete sound;
- sound = NULL;
+ sound = nullptr;
}
stack->pushInt(length);
return STATUS_OK;
diff --git a/engines/wintermute/base/base_named_object.cpp b/engines/wintermute/base/base_named_object.cpp
index 915bf24d7f..f99ec2f5db 100644
--- a/engines/wintermute/base/base_named_object.cpp
+++ b/engines/wintermute/base/base_named_object.cpp
@@ -32,38 +32,38 @@ namespace Wintermute {
//////////////////////////////////////////////////////////////////////////
BaseNamedObject::BaseNamedObject(BaseGame *inGame) : BaseClass(inGame) {
- _name = NULL;
+ _name = nullptr;
}
//////////////////////////////////////////////////////////////////////////
BaseNamedObject::BaseNamedObject() : BaseClass() {
- _name = NULL;
+ _name = nullptr;
}
//////////////////////////////////////////////////////////////////////////
BaseNamedObject::BaseNamedObject(TDynamicConstructor, TDynamicConstructor) {
- _name = NULL;
+ _name = nullptr;
}
//////////////////////////////////////////////////////////////////////////
BaseNamedObject::~BaseNamedObject(void) {
delete[] _name;
- _name = NULL;
+ _name = nullptr;
}
//////////////////////////////////////////////////////////////////////
void BaseNamedObject::setName(const char *name) {
delete[] _name;
- _name = NULL;
+ _name = nullptr;
- if (name == NULL) {
+ if (name == nullptr) {
return;
}
_name = new char [strlen(name) + 1];
- if (_name != NULL) {
+ if (_name != nullptr) {
strcpy(_name, name);
}
}
diff --git a/engines/wintermute/base/base_object.cpp b/engines/wintermute/base/base_object.cpp
index eba8416485..898c0497a2 100644
--- a/engines/wintermute/base/base_object.cpp
+++ b/engines/wintermute/base/base_object.cpp
@@ -60,18 +60,18 @@ BaseObject::BaseObject(BaseGame *inGame) : BaseScriptHolder(inGame) {
_ready = true;
- _soundEvent = NULL;
+ _soundEvent = nullptr;
_iD = _gameRef->getSequence();
BasePlatform::setRectEmpty(&_rect);
_rectSet = false;
- _cursor = NULL;
- _activeCursor = NULL;
+ _cursor = nullptr;
+ _activeCursor = nullptr;
_sharedCursors = false;
- _sFX = NULL;
+ _sFX = nullptr;
_sFXStart = 0;
_sFXVolume = 100;
_autoSoundPanning = true;
@@ -86,7 +86,7 @@ BaseObject::BaseObject(BaseGame *inGame) : BaseScriptHolder(inGame) {
_relativeRotate = 0.0f;
for (int i = 0; i < 7; i++) {
- _caption[i] = NULL;
+ _caption[i] = nullptr;
}
_saveState = true;
@@ -109,25 +109,25 @@ BaseObject::~BaseObject() {
//////////////////////////////////////////////////////////////////////////
bool BaseObject::cleanup() {
if (_gameRef && _gameRef->_activeObject == this) {
- _gameRef->_activeObject = NULL;
+ _gameRef->_activeObject = nullptr;
}
BaseScriptHolder::cleanup();
delete[] _soundEvent;
- _soundEvent = NULL;
+ _soundEvent = nullptr;
if (!_sharedCursors) {
delete _cursor;
delete _activeCursor;
- _cursor = NULL;
- _activeCursor = NULL;
+ _cursor = nullptr;
+ _activeCursor = nullptr;
}
delete _sFX;
- _sFX = NULL;
+ _sFX = nullptr;
for (int i = 0; i < 7; i++) {
delete[] _caption[i];
- _caption[i] = NULL;
+ _caption[i] = nullptr;
}
_sFXType = SFX_NONE;
@@ -160,7 +160,7 @@ const char *BaseObject::getCaption(int caseVal) {
if (caseVal == 0) {
caseVal = 1;
}
- if (caseVal < 1 || caseVal > 7 || _caption[caseVal - 1] == NULL) {
+ if (caseVal < 1 || caseVal > 7 || _caption[caseVal - 1] == nullptr) {
return "";
} else {
return _caption[caseVal - 1];
@@ -223,9 +223,9 @@ bool BaseObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSta
stack->correctParams(0);
if (!_sharedCursors) {
delete _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
} else {
- _cursor = NULL;
+ _cursor = nullptr;
}
stack->pushNULL();
@@ -317,12 +317,12 @@ bool BaseObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSta
ScValue *val3 = stack->pop();
if (val1->_type == VAL_BOOL) {
- filename = NULL;
+ filename = nullptr;
looping = val1->getBool();
loopStart = val2->getInt();
} else {
if (val1->isNULL()) {
- filename = NULL;
+ filename = nullptr;
} else {
filename = val1->getString();
}
@@ -351,7 +351,7 @@ bool BaseObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSta
ScValue *val2 = stack->pop();
if (val2->isNULL()) {
- filename = NULL;
+ filename = nullptr;
eventName = val1->getString();
} else {
filename = val1->getString();
@@ -1010,14 +1010,14 @@ bool BaseObject::persist(BasePersistenceManager *persistMgr) {
bool BaseObject::setCursor(const char *filename) {
if (!_sharedCursors) {
delete _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
}
_sharedCursors = false;
_cursor = new BaseSprite(_gameRef);
if (!_cursor || DID_FAIL(_cursor->loadFile(filename))) {
delete _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
return STATUS_FAILED;
} else {
return STATUS_OK;
@@ -1031,7 +1031,7 @@ bool BaseObject::setActiveCursor(const char *filename) {
_activeCursor = new BaseSprite(_gameRef);
if (!_activeCursor || DID_FAIL(_activeCursor->loadFile(filename))) {
delete _activeCursor;
- _activeCursor = NULL;
+ _activeCursor = nullptr;
return STATUS_FAILED;
} else {
return STATUS_OK;
@@ -1066,7 +1066,7 @@ bool BaseObject::handleMouseWheel(int delta) {
//////////////////////////////////////////////////////////////////////////
bool BaseObject::playSFX(const char *filename, bool looping, bool playNow, const char *eventName, uint32 loopStart) {
// just play loaded sound
- if (filename == NULL && _sFX) {
+ if (filename == nullptr && _sFX) {
if (_gameRef->_editorMode || _sFXStart) {
_sFX->setVolumePercent(_sFXVolume);
_sFX->setPositionTime(_sFXStart);
@@ -1085,7 +1085,7 @@ bool BaseObject::playSFX(const char *filename, bool looping, bool playNow, const
}
}
- if (filename == NULL) {
+ if (filename == nullptr) {
return STATUS_FAILED;
}
@@ -1111,7 +1111,7 @@ bool BaseObject::playSFX(const char *filename, bool looping, bool playNow, const
}
} else {
delete _sFX;
- _sFX = NULL;
+ _sFX = nullptr;
return STATUS_FAILED;
}
}
@@ -1123,7 +1123,7 @@ bool BaseObject::stopSFX(bool deleteSound) {
_sFX->stop();
if (deleteSound) {
delete _sFX;
- _sFX = NULL;
+ _sFX = nullptr;
}
return STATUS_OK;
} else {
@@ -1179,7 +1179,7 @@ bool BaseObject::updateSounds() {
if (_soundEvent) {
if (_sFX && !_sFX->isPlaying()) {
applyEvent(_soundEvent);
- setSoundEvent(NULL);
+ setSoundEvent(nullptr);
}
}
@@ -1229,7 +1229,7 @@ bool BaseObject::isReady() {
//////////////////////////////////////////////////////////////////////////
void BaseObject::setSoundEvent(const char *eventName) {
delete[] _soundEvent;
- _soundEvent = NULL;
+ _soundEvent = nullptr;
if (eventName) {
_soundEvent = new char[strlen(eventName) + 1];
if (_soundEvent) {
diff --git a/engines/wintermute/base/base_object.h b/engines/wintermute/base/base_object.h
index 96fed2b847..c8491c2cf6 100644
--- a/engines/wintermute/base/base_object.h
+++ b/engines/wintermute/base/base_object.h
@@ -52,7 +52,7 @@ protected:
bool resumeSFX();
bool pauseSFX();
bool stopSFX(bool deleteSound = true);
- bool playSFX(const char *filename, bool looping = false, bool playNow = true, const char *eventName = NULL, uint32 loopStart = 0);
+ bool playSFX(const char *filename, bool looping = false, bool playNow = true, const char *eventName = nullptr, uint32 loopStart = 0);
BaseSound *_sFX;
TSFXType _sFXType;
float _sFXParam1;
diff --git a/engines/wintermute/base/base_parser.cpp b/engines/wintermute/base/base_parser.cpp
index 9a0e9e3ad9..7f18c1f0cf 100644
--- a/engines/wintermute/base/base_parser.cpp
+++ b/engines/wintermute/base/base_parser.cpp
@@ -51,7 +51,7 @@ BaseParser::BaseParser() {
//////////////////////////////////////////////////////////////////////
BaseParser::~BaseParser() {
- if (_whiteSpace != NULL) {
+ if (_whiteSpace != nullptr) {
delete[] _whiteSpace;
}
}
@@ -136,7 +136,7 @@ void BaseParser::skipCharacters(char **buf, const char *toSkip) {
if (ch == '\n') {
_parserLine++;
}
- if (strchr(toSkip, ch) == NULL) {
+ if (strchr(toSkip, ch) == nullptr) {
return;
}
++*buf; // skip this character
@@ -250,10 +250,10 @@ Common::String BaseParser::getToken(char **buf) {
*t++ = 0;
} else if (*b == 0) {
*buf = b;
- return NULL;
+ return nullptr;
} else {
// Error.
- return NULL;
+ return nullptr;
}
*buf = b;
diff --git a/engines/wintermute/base/base_parser.h b/engines/wintermute/base/base_parser.h
index 76ca8ea856..87a936c624 100644
--- a/engines/wintermute/base/base_parser.h
+++ b/engines/wintermute/base/base_parser.h
@@ -70,7 +70,7 @@ public:
virtual ~BaseParser();
private:
char *getLastOffender();
- void skipToken(char **buf, char *tok, char *msg = NULL);
+ void skipToken(char **buf, char *tok, char *msg = nullptr);
int getTokenInt(char **buf);
float getTokenFloat(char **buf);
Common::String getToken(char **buf);
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp
index bd53ed38e4..84a1c2ec67 100644
--- a/engines/wintermute/base/base_persistence_manager.cpp
+++ b/engines/wintermute/base/base_persistence_manager.cpp
@@ -47,37 +47,40 @@
namespace Wintermute {
-#define SAVE_BUFFER_INIT_SIZE 100000
-#define SAVE_BUFFER_GROW_BY 50000
-
-#define SAVE_MAGIC 0x45564153
-#define SAVE_MAGIC_2 0x32564153
+// The original WME-Lite savegames had the following:
+//#define SAVE_MAGIC 0x45564153
+//#define SAVE_MAGIC_2 0x32564153
+// In case anyone tries to load original savegames, or for that matter
+// in case we ever want to attempt to support original savegames, we
+// avoid those numbers, and use this instead:
+#define SAVE_MAGIC_3 0x12564154
//////////////////////////////////////////////////////////////////////////
BasePersistenceManager::BasePersistenceManager(const char *savePrefix, bool deleteSingleton) {
_saving = false;
-// _buffer = NULL;
-// _bufferSize = 0;
_offset = 0;
- _saveStream = NULL;
- _loadStream = NULL;
+ _saveStream = nullptr;
+ _loadStream = nullptr;
_deleteSingleton = deleteSingleton;
if (BaseEngine::instance().getGameRef()) {
_gameRef = BaseEngine::instance().getGameRef();
} else {
- _gameRef = NULL;
+ _gameRef = nullptr;
}
- _richBuffer = NULL;
+ _richBuffer = nullptr;
_richBufferSize = 0;
- _savedDescription = NULL;
+ _scummVMThumbnailData = nullptr;
+ _scummVMThumbSize = 0;
+
+ _savedDescription = nullptr;
// _savedTimestamp = 0;
_savedVerMajor = _savedVerMinor = _savedVerBuild = 0;
_savedExtMajor = _savedExtMinor = 0;
_thumbnailDataSize = 0;
- _thumbnailData = NULL;
+ _thumbnailData = nullptr;
if (savePrefix) {
_savePrefix = savePrefix;
} else if (_gameRef) {
@@ -91,28 +94,21 @@ BasePersistenceManager::BasePersistenceManager(const char *savePrefix, bool dele
//////////////////////////////////////////////////////////////////////////
BasePersistenceManager::~BasePersistenceManager() {
cleanup();
- if (_deleteSingleton && BaseEngine::instance().getGameRef() == NULL)
+ if (_deleteSingleton && BaseEngine::instance().getGameRef() == nullptr)
BaseEngine::destroy();
}
//////////////////////////////////////////////////////////////////////////
void BasePersistenceManager::cleanup() {
- /* if (_buffer) {
- if (_saving) free(_buffer);
- else delete[] _buffer; // allocated by file manager
- }
- _buffer = NULL;
-
- _bufferSize = 0;*/
_offset = 0;
delete[] _richBuffer;
- _richBuffer = NULL;
+ _richBuffer = nullptr;
_richBufferSize = 0;
delete[] _savedDescription;
- _savedDescription = NULL; // ref to buffer
+ _savedDescription = nullptr; // ref to buffer
// _savedTimestamp = 0;
_savedVerMajor = _savedVerMinor = _savedVerBuild = 0;
_savedExtMajor = _savedExtMinor = 0;
@@ -120,25 +116,31 @@ void BasePersistenceManager::cleanup() {
_thumbnailDataSize = 0;
if (_thumbnailData) {
delete[] _thumbnailData;
- _thumbnailData = NULL;
+ _thumbnailData = nullptr;
+ }
+
+ _scummVMThumbSize = 0;
+ if (_scummVMThumbnailData) {
+ delete[] _scummVMThumbnailData;
+ _scummVMThumbnailData = nullptr;
}
delete _loadStream;
delete _saveStream;
- _loadStream = NULL;
- _saveStream = NULL;
+ _loadStream = nullptr;
+ _saveStream = nullptr;
}
Common::String BasePersistenceManager::getFilenameForSlot(int slot) const {
// 3 Digits, to allow for one save-slot for autosave + slot 1 - 100 (which will be numbered 0-99 filename-wise)
- return Common::String::format("%s-save%03d.wsv", _savePrefix.c_str(), slot);
+ return Common::String::format("%s.%03d", _savePrefix.c_str(), slot);
}
void BasePersistenceManager::getSaveStateDesc(int slot, SaveStateDescriptor &desc) {
Common::String filename = getFilenameForSlot(slot);
debugC(kWintermuteDebugSaveGame, "Trying to list savegame %s in slot %d", filename.c_str(), slot);
if (DID_FAIL(readHeader(filename))) {
- warning("getSavedDesc(%d) - Failed for %s", slot, filename.c_str());
+ debugC(kWintermuteDebugSaveGame, "getSavedDesc(%d) - Failed for %s", slot, filename.c_str());
return;
}
desc.setSaveSlot(slot);
@@ -146,17 +148,28 @@ void BasePersistenceManager::getSaveStateDesc(int slot, SaveStateDescriptor &des
desc.setDeletableFlag(true);
desc.setWriteProtectedFlag(false);
- if (_thumbnailDataSize > 0) {
- Common::MemoryReadStream thumbStream(_thumbnailData, _thumbnailDataSize);
+ int thumbSize = 0;
+ byte *thumbData = nullptr;
+ if (_scummVMThumbSize > 0) {
+ thumbSize = _scummVMThumbSize;
+ thumbData = _scummVMThumbnailData;
+ } else if (_thumbnailDataSize > 0) {
+ thumbSize = _thumbnailDataSize;
+ thumbData = _thumbnailData;
+ }
+
+ if (thumbSize > 0) {
+ Common::MemoryReadStream thumbStream(thumbData, thumbSize, DisposeAfterUse::NO);
Graphics::BitmapDecoder bmpDecoder;
if (bmpDecoder.loadStream(thumbStream)) {
- Graphics::Surface *surf = NULL;
- surf = bmpDecoder.getSurface()->convertTo(g_system->getOverlayFormat());
- TransparentSurface *scaleableSurface = new TransparentSurface(*surf, false);
+ const Graphics::Surface *bmpSurface = bmpDecoder.getSurface();
+ TransparentSurface *scaleableSurface = new TransparentSurface(*bmpSurface, false);
Graphics::Surface *scaled = scaleableSurface->scale(kThumbnailWidth, kThumbnailHeight2);
- desc.setThumbnail(scaled);
+ Graphics::Surface *thumb = scaled->convertTo(g_system->getOverlayFormat());
+ desc.setThumbnail(thumb);
delete scaleableSurface;
- delete surf;
+ scaled->free();
+ delete scaled;
}
}
@@ -171,13 +184,13 @@ void BasePersistenceManager::deleteSaveSlot(int slot) {
}
uint32 BasePersistenceManager::getMaxUsedSlot() {
- Common::String saveMask = Common::String::format("%s-save???.wsv", _savePrefix.c_str());
+ Common::String saveMask = Common::String::format("%s.???", _savePrefix.c_str());
Common::StringArray saves = g_system->getSavefileManager()->listSavefiles(saveMask);
Common::StringArray::iterator it = saves.begin();
int ret = -1;
for (; it != saves.end(); ++it) {
int num = -1;
- sscanf(it->c_str(), "save%d", &num);
+ sscanf(it->c_str(), ".%d", &num);
ret = MAX(ret, num);
}
return ret;
@@ -208,19 +221,18 @@ bool BasePersistenceManager::initSave(const char *desc) {
_gameRef->_cachedThumbnail = new BaseSaveThumbHelper(_gameRef);
if (DID_FAIL(_gameRef->_cachedThumbnail->storeThumbnail(true))) {
delete _gameRef->_cachedThumbnail;
- _gameRef->_cachedThumbnail = NULL;
+ _gameRef->_cachedThumbnail = nullptr;
}
}
uint32 magic = DCGF_MAGIC;
putDWORD(magic);
- magic = SAVE_MAGIC_2;
+ magic = SAVE_MAGIC_3;
putDWORD(magic);
byte verMajor, verMinor, extMajor, extMinor;
_gameRef->getVersion(&verMajor, &verMinor, &extMajor, &extMinor);
- //uint32 version = MAKELONG(MAKEWORD(VerMajor, VerMinor), MAKEWORD(ExtMajor, ExtMinor));
_saveStream->writeByte(verMajor);
_saveStream->writeByte(verMinor);
_saveStream->writeByte(extMajor);
@@ -249,10 +261,29 @@ bool BasePersistenceManager::initSave(const char *desc) {
if (!thumbnailOK) {
putDWORD(0);
}
+ thumbnailOK = false;
+ // Again for the ScummVM-thumb:
+ if (_gameRef->_cachedThumbnail) {
+ if (_gameRef->_cachedThumbnail->_scummVMThumb) {
+ Common::MemoryWriteStreamDynamic scummVMthumbStream(DisposeAfterUse::YES);
+ if (_gameRef->_cachedThumbnail->_scummVMThumb->writeBMPToStream(&scummVMthumbStream)) {
+ _saveStream->writeUint32LE(scummVMthumbStream.size());
+ _saveStream->write(scummVMthumbStream.getData(), scummVMthumbStream.size());
+ } else {
+ _saveStream->writeUint32LE(0);
+ }
+
+ thumbnailOK = true;
+ }
+ }
+ if (!thumbnailOK) {
+ putDWORD(0);
+ }
+
// in any case, destroy the cached thumbnail once used
delete _gameRef->_cachedThumbnail;
- _gameRef->_cachedThumbnail = NULL;
+ _gameRef->_cachedThumbnail = nullptr;
uint32 dataOffset = _offset +
sizeof(uint32) + // data offset
@@ -276,7 +307,7 @@ bool BasePersistenceManager::readHeader(const Common::String &filename) {
_saving = false;
_loadStream = g_system->getSavefileManager()->openForLoading(filename);
- //_buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename, &_bufferSize);
+
if (_loadStream) {
uint32 magic;
magic = getDWORD();
@@ -288,28 +319,32 @@ bool BasePersistenceManager::readHeader(const Common::String &filename) {
magic = getDWORD();
- if (magic == SAVE_MAGIC || magic == SAVE_MAGIC_2) {
+ if (magic == SAVE_MAGIC_3) {
_savedVerMajor = _loadStream->readByte();
_savedVerMinor = _loadStream->readByte();
_savedExtMajor = _loadStream->readByte();
_savedExtMinor = _loadStream->readByte();
- if (magic == SAVE_MAGIC_2) {
- _savedVerBuild = (byte)getDWORD();
- _savedName = getStringObj();
-
- // load thumbnail
- _thumbnailDataSize = getDWORD();
- if (_thumbnailDataSize > 0) {
- _thumbnailData = new byte[_thumbnailDataSize];
- if (_thumbnailData) {
- getBytes(_thumbnailData, _thumbnailDataSize);
- } else {
- _thumbnailDataSize = 0;
- }
+ _savedVerBuild = (byte)getDWORD();
+ _savedName = getStringObj();
+
+ // load thumbnail
+ _thumbnailDataSize = getDWORD();
+ if (_thumbnailDataSize > 0) {
+ _thumbnailData = new byte[_thumbnailDataSize];
+ if (_thumbnailData) {
+ getBytes(_thumbnailData, _thumbnailDataSize);
+ } else {
+ _thumbnailDataSize = 0;
}
+ }
+
+ _scummVMThumbSize = getDWORD();
+ _scummVMThumbnailData = new byte[_scummVMThumbSize];
+ if (_scummVMThumbnailData) {
+ getBytes(_scummVMThumbnailData, _scummVMThumbSize);
} else {
- _savedVerBuild = 35; // last build with ver1 savegames
+ _scummVMThumbSize = 0;
}
uint32 dataOffset = getDWORD();
@@ -454,7 +489,7 @@ char *BasePersistenceManager::getString() {
if (!strcmp(ret, "(null)")) {
delete[] ret;
- return NULL;
+ return nullptr;
} else {
return ret;
}
@@ -467,7 +502,7 @@ bool BasePersistenceManager::putTimeDate(const TimeDate &t) {
_saveStream->writeSint32LE(t.tm_mday);
_saveStream->writeSint32LE(t.tm_mon);
_saveStream->writeSint32LE(t.tm_year);
- // _saveStream->writeSint32LE(t.tm_wday); //TODO: Add this in when merging next
+ _saveStream->writeSint32LE(t.tm_wday);
if (_saveStream->err()) {
return STATUS_FAILED;
@@ -483,20 +518,26 @@ TimeDate BasePersistenceManager::getTimeDate() {
t.tm_mday = _loadStream->readSint32LE();
t.tm_mon = _loadStream->readSint32LE();
t.tm_year = _loadStream->readSint32LE();
- // t.tm_wday = _loadStream->readSint32LE(); //TODO: Add this in when merging next
+ t.tm_wday = _loadStream->readSint32LE();
return t;
}
void BasePersistenceManager::putFloat(float val) {
- Common::String str = Common::String::format("F%f", val);
+ int32 exponent = 0;
+ float significand = frexp(val, &exponent);
+ Common::String str = Common::String::format("FS%f", significand);
_saveStream->writeUint32LE(str.size());
_saveStream->writeString(str);
+ _saveStream->writeSint32LE(exponent);
}
float BasePersistenceManager::getFloat() {
char *str = getString();
float value = 0.0f;
- int ret = sscanf(str, "F%f", &value);
+ float significand = 0.0f;
+ int32 exponent = _loadStream->readSint32LE();
+ int ret = sscanf(str, "FS%f", &significand);
+ value = ldexp(significand, exponent);
if (ret != 1) {
warning("%s not parsed as float", str);
}
@@ -505,16 +546,21 @@ float BasePersistenceManager::getFloat() {
}
void BasePersistenceManager::putDouble(double val) {
- Common::String str = Common::String::format("D%f", val);
- str.format("D%f", val);
+ int32 exponent = 0;
+ double significand = frexp(val, &exponent);
+ Common::String str = Common::String::format("DS%f", significand);
_saveStream->writeUint32LE(str.size());
_saveStream->writeString(str);
+ _saveStream->writeSint32LE(exponent);
}
double BasePersistenceManager::getDouble() {
char *str = getString();
- float value = 0.0f; // TODO: Do we ever really need to carry a full double-precision number?
- int ret = sscanf(str, "D%f", &value);
+ double value = 0.0f;
+ float significand = 0.0f;
+ int32 exponent = _loadStream->readSint32LE();
+ int ret = sscanf(str, "DS%f", &significand);
+ value = ldexp(significand, exponent);
if (ret != 1) {
warning("%s not parsed as double", str);
}
@@ -797,7 +843,7 @@ bool BasePersistenceManager::transfer(const char *name, void *val) {
if (_saving) {
SystemClassRegistry::getInstance()->getPointerID(*(void **)val, &classID, &instanceID);
- if (*(void **)val != NULL && (classID == -1 || instanceID == -1)) {
+ if (*(void **)val != nullptr && (classID == -1 || instanceID == -1)) {
debugC(kWintermuteDebugSaveGame, "Warning: invalid instance '%s'", name);
}
diff --git a/engines/wintermute/base/base_persistence_manager.h b/engines/wintermute/base/base_persistence_manager.h
index a262c92a0b..8cc21b353b 100644
--- a/engines/wintermute/base/base_persistence_manager.h
+++ b/engines/wintermute/base/base_persistence_manager.h
@@ -87,12 +87,14 @@ public:
bool transfer(const char *name, Common::String *val);
bool transfer(const char *name, Vector2 *val);
bool transfer(const char *name, AnsiStringArray &Val);
- BasePersistenceManager(const char *savePrefix = NULL, bool deleteSingleton = false);
+ BasePersistenceManager(const char *savePrefix = nullptr, bool deleteSingleton = false);
virtual ~BasePersistenceManager();
bool checkVersion(byte verMajor, byte verMinor, byte verBuild);
uint32 _thumbnailDataSize;
byte *_thumbnailData;
+ uint32 _scummVMThumbSize;
+ byte *_scummVMThumbnailData;
Common::String getFilenameForSlot(int slot) const;
private:
bool _deleteSingleton;
diff --git a/engines/wintermute/base/base_quick_msg.cpp b/engines/wintermute/base/base_quick_msg.cpp
index 0a9907ac6b..50a9031eee 100644
--- a/engines/wintermute/base/base_quick_msg.cpp
+++ b/engines/wintermute/base/base_quick_msg.cpp
@@ -32,26 +32,20 @@
namespace Wintermute {
//////////////////////////////////////////////////////////////////////////
-BaseQuickMsg::BaseQuickMsg(BaseGame *inGame, const char *text) : BaseClass(inGame) {
- _text = new char [strlen(text) + 1];
- if (_text) {
- strcpy(_text, text);
- }
+BaseQuickMsg::BaseQuickMsg(BaseGame *inGame, const char *text) {
+ _text = text;
_startTime = _gameRef->_currentTime;
}
//////////////////////////////////////////////////////////////////////////
BaseQuickMsg::~BaseQuickMsg() {
- if (_text) {
- delete[] _text;
- }
}
//////////////////////////////////////////////////////////////////////////
-char *BaseQuickMsg::getText() {
- return _text;
+const char *BaseQuickMsg::getText() const {
+ return _text.c_str();
}
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_quick_msg.h b/engines/wintermute/base/base_quick_msg.h
index 67f9613461..0d342b3b12 100644
--- a/engines/wintermute/base/base_quick_msg.h
+++ b/engines/wintermute/base/base_quick_msg.h
@@ -29,18 +29,19 @@
#ifndef WINTERMUTE_BASE_QUICKMSG_H
#define WINTERMUTE_BASE_QUICKMSG_H
-#include "engines/wintermute/base/base.h"
+#include "common/str.h"
namespace Wintermute {
-
-class BaseQuickMsg : public BaseClass {
+class BaseGame;
+class BaseQuickMsg {
public:
- char *getText();
+ const char *getText() const;
uint32 _startTime;
BaseQuickMsg(BaseGame *inGame, const char *text);
virtual ~BaseQuickMsg();
private:
- char *_text;
+ BaseGame *_gameRef;
+ Common::String _text;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_region.cpp b/engines/wintermute/base/base_region.cpp
index 0bc5975e51..a3a23f770a 100644
--- a/engines/wintermute/base/base_region.cpp
+++ b/engines/wintermute/base/base_region.cpp
@@ -103,7 +103,7 @@ bool BaseRegion::pointInRegion(int x, int y) {
//////////////////////////////////////////////////////////////////////////
bool BaseRegion::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "BaseRegion::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -289,7 +289,7 @@ bool BaseRegion::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSta
if (index >= 0 && index < (int32)_points.size()) {
delete _points[index];
- _points[index] = NULL;
+ _points[index] = nullptr;
_points.remove_at(index);
createRegion();
diff --git a/engines/wintermute/base/base_region.h b/engines/wintermute/base/base_region.h
index 464f25be2f..6b7905fe53 100644
--- a/engines/wintermute/base/base_region.h
+++ b/engines/wintermute/base/base_region.h
@@ -51,7 +51,7 @@ public:
bool loadBuffer(byte *buffer, bool complete = true);
Rect32 _rect;
BaseArray<BasePoint *> _points;
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) { return saveAsText(buffer, indent, NULL); }
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) { return saveAsText(buffer, indent, nullptr); }
virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent, const char *nameOverride);
// scripting interface
diff --git a/engines/wintermute/base/base_save_thumb_helper.cpp b/engines/wintermute/base/base_save_thumb_helper.cpp
index b4205c21c4..76d703a697 100644
--- a/engines/wintermute/base/base_save_thumb_helper.cpp
+++ b/engines/wintermute/base/base_save_thumb_helper.cpp
@@ -30,50 +30,79 @@
#include "engines/wintermute/base/gfx/base_image.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
#include "engines/wintermute/base/base_game.h"
+#include "graphics/scaler.h"
namespace Wintermute {
//////////////////////////////////////////////////////////////////////////
BaseSaveThumbHelper::BaseSaveThumbHelper(BaseGame *inGame) : BaseClass(inGame) {
- _thumbnail = NULL;
+ _thumbnail = nullptr;
+ _scummVMThumb = nullptr;
}
//////////////////////////////////////////////////////////////////////////
BaseSaveThumbHelper::~BaseSaveThumbHelper(void) {
delete _thumbnail;
- _thumbnail = NULL;
+ _thumbnail = nullptr;
+ delete _scummVMThumb;
+ _scummVMThumb = nullptr;
}
-//////////////////////////////////////////////////////////////////////////
-bool BaseSaveThumbHelper::storeThumbnail(bool doFlip) {
- delete _thumbnail;
- _thumbnail = NULL;
-
+BaseImage *BaseSaveThumbHelper::storeThumb(bool doFlip, int width, int height) {
+ BaseImage *thumbnail = nullptr;
if (_gameRef->_thumbnailWidth > 0 && _gameRef->_thumbnailHeight > 0) {
if (doFlip) {
// when using opengl on windows it seems to be necessary to do this twice
// works normally for direct3d
_gameRef->displayContent(false);
_gameRef->_renderer->flip();
-
+
_gameRef->displayContent(false);
_gameRef->_renderer->flip();
}
-
+
BaseImage *screenshot = _gameRef->_renderer->takeScreenshot();
if (!screenshot) {
- return STATUS_FAILED;
+ return nullptr;
}
-
+
// normal thumbnail
if (_gameRef->_thumbnailWidth > 0 && _gameRef->_thumbnailHeight > 0) {
- _thumbnail = new BaseImage();
- _thumbnail->copyFrom(screenshot, _gameRef->_thumbnailWidth, _gameRef->_thumbnailHeight);
+ thumbnail = new BaseImage();
+ thumbnail->copyFrom(screenshot, width, height);
}
+
+
+ delete screenshot;
+ screenshot = nullptr;
+ }
+ return thumbnail;
+}
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseSaveThumbHelper::storeThumbnail(bool doFlip) {
+ delete _thumbnail;
+ _thumbnail = nullptr;
+ if (_gameRef->_thumbnailWidth > 0 && _gameRef->_thumbnailHeight > 0) {
- delete screenshot;
- screenshot = NULL;
+ _thumbnail = storeThumb(doFlip, _gameRef->_thumbnailWidth, _gameRef->_thumbnailHeight);
+ if (!_thumbnail) {
+ return STATUS_FAILED;
+ }
+ }
+ storeScummVMThumbNail();
+ return STATUS_OK;
+}
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseSaveThumbHelper::storeScummVMThumbNail(bool doFlip) {
+ delete _scummVMThumb;
+ _scummVMThumb = nullptr;
+
+ _scummVMThumb = storeThumb(doFlip, kThumbnailWidth, kThumbnailHeight2);
+ if (!_scummVMThumb) {
+ return STATUS_FAILED;
}
return STATUS_OK;
}
diff --git a/engines/wintermute/base/base_save_thumb_helper.h b/engines/wintermute/base/base_save_thumb_helper.h
index 8863508ac9..8e8a7183c2 100644
--- a/engines/wintermute/base/base_save_thumb_helper.h
+++ b/engines/wintermute/base/base_save_thumb_helper.h
@@ -40,9 +40,12 @@ public:
BaseSaveThumbHelper(BaseGame *inGame);
virtual ~BaseSaveThumbHelper(void);
bool storeThumbnail(bool doFlip = false);
+ bool storeScummVMThumbNail(bool doFlip = false);
BaseImage *_thumbnail;
+ BaseImage *_scummVMThumb;
private:
+ BaseImage *storeThumb(bool doFlip, int width, int height);
BaseImage *_richThumbnail;
};
diff --git a/engines/wintermute/base/base_script_holder.cpp b/engines/wintermute/base/base_script_holder.cpp
index abe5501b8d..d1a9d4aa46 100644
--- a/engines/wintermute/base/base_script_holder.cpp
+++ b/engines/wintermute/base/base_script_holder.cpp
@@ -43,7 +43,7 @@ BaseScriptHolder::BaseScriptHolder(BaseGame *inGame) : BaseScriptable(inGame) {
setName("<unnamed>");
_freezable = true;
- _filename = NULL;
+ _filename = nullptr;
}
@@ -56,11 +56,11 @@ BaseScriptHolder::~BaseScriptHolder() {
//////////////////////////////////////////////////////////////////////////
bool BaseScriptHolder::cleanup() {
delete[] _filename;
- _filename = NULL;
+ _filename = nullptr;
for (uint32 i = 0; i < _scripts.size(); i++) {
_scripts[i]->finish(true);
- _scripts[i]->_owner = NULL;
+ _scripts[i]->_owner = nullptr;
}
_scripts.clear();
@@ -69,15 +69,15 @@ bool BaseScriptHolder::cleanup() {
//////////////////////////////////////////////////////////////////////
void BaseScriptHolder::setFilename(const char *filename) {
- if (_filename != NULL) {
+ if (_filename != nullptr) {
delete[] _filename;
- _filename = NULL;
+ _filename = nullptr;
}
- if (filename == NULL) {
+ if (filename == nullptr) {
return;
}
_filename = new char [strlen(filename) + 1];
- if (_filename != NULL) {
+ if (_filename != nullptr) {
strcpy(_filename, filename);
}
}
@@ -388,8 +388,8 @@ bool BaseScriptHolder::parseProperty(byte *buffer, bool complete) {
buffer = params;
}
- char *propName = NULL;
- char *propValue = NULL;
+ char *propName = nullptr;
+ char *propValue = nullptr;
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)&params)) > 0) {
switch (cmd) {
@@ -418,16 +418,16 @@ bool BaseScriptHolder::parseProperty(byte *buffer, bool complete) {
if (cmd == PARSERR_TOKENNOTFOUND) {
delete[] propName;
delete[] propValue;
- propName = NULL;
- propValue = NULL;
+ propName = nullptr;
+ propValue = nullptr;
_gameRef->LOG(0, "Syntax error in PROPERTY definition");
return STATUS_FAILED;
}
- if (cmd == PARSERR_GENERIC || propName == NULL || propValue == NULL) {
+ if (cmd == PARSERR_GENERIC || propName == nullptr || propValue == nullptr) {
delete[] propName;
delete[] propValue;
- propName = NULL;
- propValue = NULL;
+ propName = nullptr;
+ propValue = nullptr;
_gameRef->LOG(0, "Error loading PROPERTY definition");
return STATUS_FAILED;
}
@@ -440,8 +440,8 @@ bool BaseScriptHolder::parseProperty(byte *buffer, bool complete) {
delete val;
delete[] propName;
delete[] propValue;
- propName = NULL;
- propValue = NULL;
+ propName = nullptr;
+ propValue = nullptr;
return STATUS_OK;
}
@@ -474,7 +474,7 @@ ScScript *BaseScriptHolder::invokeMethodThread(const char *methodName) {
}
}
}
- return NULL;
+ return nullptr;
}
diff --git a/engines/wintermute/base/base_scriptable.cpp b/engines/wintermute/base/base_scriptable.cpp
index 8c5ef7e45a..7dbcd72200 100644
--- a/engines/wintermute/base/base_scriptable.cpp
+++ b/engines/wintermute/base/base_scriptable.cpp
@@ -39,14 +39,14 @@ BaseScriptable::BaseScriptable(BaseGame *inGame, bool noValue, bool persistable)
_refCount = 0;
if (noValue) {
- _scValue = NULL;
+ _scValue = nullptr;
} else {
_scValue = new ScValue(_gameRef);
}
_persistable = persistable;
- _scProp = NULL;
+ _scProp = nullptr;
}
@@ -55,8 +55,8 @@ BaseScriptable::~BaseScriptable() {
//if (_refCount>0) _gameRef->LOG(0, "Warning: Destroying object, _refCount=%d", _refCount);
delete _scValue;
delete _scProp;
- _scValue = NULL;
- _scProp = NULL;
+ _scValue = nullptr;
+ _scProp = nullptr;
}
@@ -83,7 +83,7 @@ ScValue *BaseScriptable::scGetProperty(const Common::String &name) {
if (_scProp) {
return _scProp->getProp(name.c_str()); // TODO: Change to Common::String
} else {
- return NULL;
+ return nullptr;
}
}
@@ -185,7 +185,7 @@ bool BaseScriptable::canHandleMethod(const char *eventMethod) const {
//////////////////////////////////////////////////////////////////////////
ScScript *BaseScriptable::invokeMethodThread(const char *methodName) {
- return NULL;
+ return nullptr;
}
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_sprite.cpp b/engines/wintermute/base/base_sprite.cpp
index 468af1bd75..4f55e47c05 100644
--- a/engines/wintermute/base/base_sprite.cpp
+++ b/engines/wintermute/base/base_sprite.cpp
@@ -64,7 +64,7 @@ void BaseSprite::setDefaults() {
_currentFrame = -1;
_looping = false;
_lastFrameTime = 0;
- setFilename(NULL);
+ setFilename(nullptr);
_finished = false;
_changed = false;
_paused = false;
@@ -72,7 +72,7 @@ void BaseSprite::setDefaults() {
_moveX = _moveY = 0;
_editorMuted = false;
- _editorBgFile = NULL;
+ _editorBgFile = nullptr;
_editorBgOffsetX = _editorBgOffsetY = 0;
_editorBgAlpha = 0xFF;
_streamed = false;
@@ -94,7 +94,7 @@ void BaseSprite::cleanup() {
_frames.clear();
delete[] _editorBgFile;
- _editorBgFile = NULL;
+ _editorBgFile = nullptr;
setDefaults();
}
@@ -141,7 +141,7 @@ bool BaseSprite::loadFile(const Common::String &filename, int lifeTime, TSpriteC
}
} else {
BaseFileManager::getEngineInstance()->closeFile(file);
- file = NULL;
+ file = nullptr;
}
bool ret = STATUS_FAILED;
@@ -154,7 +154,7 @@ bool BaseSprite::loadFile(const Common::String &filename, int lifeTime, TSpriteC
BaseFrame *frame = new BaseFrame(_gameRef);
BaseSubFrame *subframe = new BaseSubFrame(_gameRef);
subframe->setSurface(filename, true, 0, 0, 0, lifeTime, true);
- if (subframe->_surface == NULL) {
+ if (subframe->_surface == nullptr) {
_gameRef->LOG(0, "Error loading simple sprite '%s'", filename.c_str());
ret = STATUS_FAILED;
delete frame;
@@ -440,7 +440,7 @@ bool BaseSprite::display(int x, int y, BaseObject *registerVal, float zoomX, flo
BaseSurface *BaseSprite::getSurface() {
// only used for animated textures for 3D models
if (_currentFrame < 0 || _currentFrame >= (int32)_frames.size()) {
- return NULL;
+ return nullptr;
}
BaseFrame *frame = _frames[_currentFrame];
if (frame && frame->_subframes.size() > 0) {
@@ -448,10 +448,10 @@ BaseSurface *BaseSprite::getSurface() {
if (subframe) {
return subframe->_surface;
} else {
- return NULL;
+ return nullptr;
}
} else {
- return NULL;
+ return nullptr;
}
}
@@ -611,13 +611,13 @@ bool BaseSprite::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSta
else if (strcmp(name, "AddFrame") == 0) {
stack->correctParams(1);
ScValue *val = stack->pop();
- const char *filename = NULL;
+ const char *filename = nullptr;
if (!val->isNULL()) {
filename = val->getString();
}
BaseFrame *frame = new BaseFrame(_gameRef);
- if (filename != NULL) {
+ if (filename != nullptr) {
BaseSubFrame *sub = new BaseSubFrame(_gameRef);
if (DID_SUCCEED(sub->setSurface(filename))) {
sub->setDefaultRect();
@@ -643,13 +643,13 @@ bool BaseSprite::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSta
}
ScValue *val = stack->pop();
- const char *filename = NULL;
+ const char *filename = nullptr;
if (!val->isNULL()) {
filename = val->getString();
}
BaseFrame *frame = new BaseFrame(_gameRef);
- if (filename != NULL) {
+ if (filename != nullptr) {
BaseSubFrame *sub = new BaseSubFrame(_gameRef);
if (DID_SUCCEED(sub->setSurface(filename))) {
frame->_subframes.add(sub);
@@ -740,7 +740,7 @@ ScValue *BaseSprite::scGetProperty(const Common::String &name) {
// Owner (RO)
//////////////////////////////////////////////////////////////////////////
else if (name == "Owner") {
- if (_owner == NULL) {
+ if (_owner == nullptr) {
_scValue->setNULL();
} else {
_scValue->setNative(_owner, true);
diff --git a/engines/wintermute/base/base_sprite.h b/engines/wintermute/base/base_sprite.h
index 1d244c3a52..ac1a0e919b 100644
--- a/engines/wintermute/base/base_sprite.h
+++ b/engines/wintermute/base/base_sprite.h
@@ -47,18 +47,18 @@ public:
bool getBoundingRect(Rect32 *rect, int x, int y, float scaleX = 100, float scaleY = 100);
int _moveY;
int _moveX;
- bool display(int x, int y, BaseObject *registerOwner = NULL, float zoomX = 100, float zoomY = 100, uint32 alpha = 0xFFFFFFFF, float rotate = 0.0f, TSpriteBlendMode blendMode = BLEND_NORMAL);
+ bool display(int x, int y, BaseObject *registerOwner = nullptr, float zoomX = 100, float zoomY = 100, uint32 alpha = 0xFFFFFFFF, float rotate = 0.0f, TSpriteBlendMode blendMode = BLEND_NORMAL);
bool getCurrentFrame(float zoomX = 100, float zoomY = 100);
void reset();
bool isChanged();
bool isFinished();
bool loadBuffer(byte *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 = NULL, float zoomX = 100, float zoomY = 100, uint32 alpha = 0xFFFFFFFF);
+ bool draw(int x, int y, BaseObject *Register = nullptr, float zoomX = 100, float zoomY = 100, uint32 alpha = 0xFFFFFFFF);
bool _looping;
int _currentFrame;
- bool addFrame(const char *filename, uint32 delay = 0, int hotspotX = 0, int hotspotY = 0, Rect32 *rect = NULL);
- BaseSprite(BaseGame *inGame, BaseObject *owner = NULL);
+ bool addFrame(const char *filename, uint32 delay = 0, int hotspotX = 0, int hotspotY = 0, Rect32 *rect = nullptr);
+ BaseSprite(BaseGame *inGame, BaseObject *owner = nullptr);
virtual ~BaseSprite();
BaseArray<BaseFrame *> _frames;
bool saveAsText(BaseDynamicBuffer *buffer, int indent);
diff --git a/engines/wintermute/base/base_string_table.cpp b/engines/wintermute/base/base_string_table.cpp
index 2f890beea1..11ec7b094f 100644
--- a/engines/wintermute/base/base_string_table.cpp
+++ b/engines/wintermute/base/base_string_table.cpp
@@ -50,7 +50,7 @@ BaseStringTable::~BaseStringTable() {
//////////////////////////////////////////////////////////////////////////
bool BaseStringTable::addString(const char *key, const char *val, bool reportDuplicities) {
- if (key == NULL || val == NULL) {
+ if (key == nullptr || val == nullptr) {
return STATUS_FAILED;
}
@@ -74,13 +74,13 @@ bool BaseStringTable::addString(const char *key, const char *val, bool reportDup
//////////////////////////////////////////////////////////////////////////
char *BaseStringTable::getKey(const char *str) const {
- if (str == NULL || str[0] != '/') {
- return NULL;
+ if (str == nullptr || str[0] != '/') {
+ return nullptr;
}
const char *value = strchr(str + 1, '/');
- if (value == NULL) {
- return NULL;
+ if (value == nullptr) {
+ return nullptr;
}
char *key = new char[value - str];
@@ -110,12 +110,12 @@ char *BaseStringTable::getKey(const char *str) const {
//////////////////////////////////////////////////////////////////////////
void BaseStringTable::expand(char **str) const {
- if (str == NULL || *str == NULL || *str[0] != '/') {
+ if (str == nullptr || *str == nullptr || *str[0] != '/') {
return;
}
char *value = strchr(*str + 1, '/');
- if (value == NULL) {
+ if (value == nullptr) {
return;
}
@@ -149,12 +149,12 @@ void BaseStringTable::expand(char **str) const {
//////////////////////////////////////////////////////////////////////////
const char *BaseStringTable::expandStatic(const char *string) const {
- if (string == NULL || string[0] == '\0' || string[0] != '/') {
+ if (string == nullptr || string[0] == '\0' || string[0] != '/') {
return string;
}
const char *value = strchr(string + 1, '/');
- if (value == NULL) {
+ if (value == nullptr) {
return string;
}
@@ -193,7 +193,7 @@ bool BaseStringTable::loadFile(const char *filename, bool clearOld) {
uint32 size;
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename, &size);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "BaseStringTable::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -222,12 +222,12 @@ bool BaseStringTable::loadFile(const char *filename, bool clearOld) {
char *line = new char[realLength + 1];
Common::strlcpy(line, (char *)&buffer[pos], realLength + 1);
char *value = strchr(line, '\t');
- if (value == NULL) {
+ if (value == nullptr) {
value = strchr(line, ' ');
}
if (line[0] != ';') {
- if (value != NULL) {
+ if (value != nullptr) {
value[0] = '\0';
value++;
for (uint32 i = 0; i < strlen(value); i++) {
diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp
index 77cc522ae7..a06d7f50eb 100644
--- a/engines/wintermute/base/base_sub_frame.cpp
+++ b/engines/wintermute/base/base_sub_frame.cpp
@@ -44,7 +44,7 @@ IMPLEMENT_PERSISTENT(BaseSubFrame, false)
//////////////////////////////////////////////////////////////////////////
BaseSubFrame::BaseSubFrame(BaseGame *inGame) : BaseScriptable(inGame, true) {
- _surface = NULL;
+ _surface = nullptr;
_hotspotX = _hotspotY = 0;
_alpha = 0xFFFFFFFF;
_transparent = 0xFFFF00FF;
@@ -54,7 +54,7 @@ BaseSubFrame::BaseSubFrame(BaseGame *inGame) : BaseScriptable(inGame, true) {
_editorSelected = false;
- _surfaceFilename = NULL;
+ _surfaceFilename = nullptr;
_cKDefault = true;
_cKRed = _cKBlue = _cKGreen = 0;
_lifeTime = -1;
@@ -73,7 +73,7 @@ BaseSubFrame::~BaseSubFrame() {
_gameRef->_surfaceStorage->removeSurface(_surface);
}
delete[] _surfaceFilename;
- _surfaceFilename = NULL;
+ _surfaceFilename = nullptr;
}
@@ -118,10 +118,10 @@ bool BaseSubFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) {
int ar = 255, ag = 255, ab = 255, alpha = 255;
bool custoTrans = false;
BasePlatform::setRectEmpty(&rect);
- char *surfaceFile = NULL;
+ char *surfaceFile = nullptr;
delete _surface;
- _surface = NULL;
+ _surface = nullptr;
while ((cmd = parser.getCommand((char **)&buffer, commands, &params)) > 0) {
switch (cmd) {
@@ -184,7 +184,7 @@ bool BaseSubFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) {
return STATUS_FAILED;
}
- if (surfaceFile != NULL) {
+ if (surfaceFile != nullptr) {
if (custoTrans) {
setSurface(surfaceFile, false, r, g, b, lifeTime, keepLoaded);
} else {
@@ -198,7 +198,7 @@ bool BaseSubFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) {
}
/*
- if (_surface == NULL)
+ if (_surface == nullptr)
{
_gameRef->LOG(0, "Error parsing sub-frame. Image not set.");
return STATUS_FAILED;
@@ -236,7 +236,7 @@ bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, fl
return STATUS_OK;
}
- if (registerOwner != NULL && !_decoration) {
+ if (registerOwner != nullptr && !_decoration) {
if (zoomX == 100 && zoomY == 100) {
_gameRef->_renderer->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 {
@@ -426,7 +426,7 @@ bool BaseSubFrame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisS
_gameRef->_surfaceStorage->removeSurface(_surface);
}
delete[] _surfaceFilename;
- _surfaceFilename = NULL;
+ _surfaceFilename = nullptr;
stack->pushBool(true);
} else {
const char *filename = val->getString();
@@ -617,11 +617,11 @@ const char *BaseSubFrame::scToString() {
bool BaseSubFrame::setSurface(const Common::String &filename, bool defaultCK, byte ckRed, byte ckGreen, byte ckBlue, int lifeTime, bool keepLoaded) {
if (_surface) {
_gameRef->_surfaceStorage->removeSurface(_surface);
- _surface = NULL;
+ _surface = nullptr;
}
delete[] _surfaceFilename;
- _surfaceFilename = NULL;
+ _surfaceFilename = nullptr;
_surface = _gameRef->_surfaceStorage->addSurface(filename, defaultCK, ckRed, ckGreen, ckBlue, lifeTime, keepLoaded);
if (_surface) {
@@ -645,7 +645,7 @@ bool BaseSubFrame::setSurface(const Common::String &filename, bool defaultCK, by
//////////////////////////////////////////////////////////////////////////
bool BaseSubFrame::setSurfaceSimple() {
if (!_surfaceFilename) {
- _surface = NULL;
+ _surface = nullptr;
return STATUS_OK;
}
_surface = _gameRef->_surfaceStorage->addSurface(_surfaceFilename, _cKDefault, _cKRed, _cKGreen, _cKBlue, _lifeTime, _keepLoaded);
diff --git a/engines/wintermute/base/base_sub_frame.h b/engines/wintermute/base/base_sub_frame.h
index c173ae69d1..2888761bb3 100644
--- a/engines/wintermute/base/base_sub_frame.h
+++ b/engines/wintermute/base/base_sub_frame.h
@@ -52,7 +52,7 @@ public:
BaseSubFrame(BaseGame *inGame);
virtual ~BaseSubFrame();
bool loadBuffer(byte *buffer, int lifeTime, bool keepLoaded);
- bool draw(int x, int y, BaseObject *registerOwner = NULL, 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, TSpriteBlendMode blendMode = 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/base_surface_storage.cpp b/engines/wintermute/base/base_surface_storage.cpp
index 2205e3e096..08d2d2f767 100644
--- a/engines/wintermute/base/base_surface_storage.cpp
+++ b/engines/wintermute/base/base_surface_storage.cpp
@@ -124,12 +124,12 @@ BaseSurface *BaseSurfaceStorage::addSurface(const Common::String &filename, bool
surface = _gameRef->_renderer->createSurface();
if (!surface) {
- return NULL;
+ return nullptr;
}
if (DID_FAIL(surface->create(filename, defaultCK, ckRed, ckGreen, ckBlue, lifeTime, keepLoaded))) {
delete surface;
- return NULL;
+ return nullptr;
} else {
surface->_referenceCount = 1;
_surfaces.push_back(surface);
diff --git a/engines/wintermute/base/base_viewport.cpp b/engines/wintermute/base/base_viewport.cpp
index b3c2cfa6c3..5a488b707f 100644
--- a/engines/wintermute/base/base_viewport.cpp
+++ b/engines/wintermute/base/base_viewport.cpp
@@ -38,7 +38,7 @@ IMPLEMENT_PERSISTENT(BaseViewport, false)
//////////////////////////////////////////////////////////////////////////
BaseViewport::BaseViewport(BaseGame *inGame) : BaseClass(inGame) {
BasePlatform::setRectEmpty(&_rect);
- _mainObject = NULL;
+ _mainObject = nullptr;
_offsetX = _offsetY = 0;
}
diff --git a/engines/wintermute/base/base_viewport.h b/engines/wintermute/base/base_viewport.h
index 0182565a67..c69682da62 100644
--- a/engines/wintermute/base/base_viewport.h
+++ b/engines/wintermute/base/base_viewport.h
@@ -44,7 +44,7 @@ public:
int _offsetY;
int _offsetX;
BaseObject *_mainObject;
- BaseViewport(BaseGame *inGame = NULL);
+ BaseViewport(BaseGame *inGame = nullptr);
virtual ~BaseViewport();
private:
Rect32 _rect;
diff --git a/engines/wintermute/base/file/base_disk_file.cpp b/engines/wintermute/base/file/base_disk_file.cpp
index 25be3dad2d..3c1ecc7a73 100644
--- a/engines/wintermute/base/file/base_disk_file.cpp
+++ b/engines/wintermute/base/file/base_disk_file.cpp
@@ -39,10 +39,10 @@
namespace Wintermute {
-void correctSlashes(char *fileName) {
- for (size_t i = 0; i < strlen(fileName); i++) {
+void correctSlashes(Common::String &fileName) {
+ for (size_t i = 0; i < fileName.size(); i++) {
if (fileName[i] == '\\') {
- fileName[i] = '/';
+ fileName.setChar('/', i);
}
}
}
@@ -66,6 +66,12 @@ static Common::FSNode getNodeForRelativePath(const Common::String &filename) {
const Common::FSNode gameDataDir(ConfMan.get("path"));
Common::FSNode curNode = gameDataDir;
+ Common::String fixedPath = "";
+ while (!path.empty()) {
+ fixedPath += path.nextToken() + "/";
+ }
+ fixedPath.deleteLastChar();
+
// Parse all path-elements
while (!path.empty()) {
// Get the next path-component by slicing on '\\'
@@ -109,13 +115,14 @@ bool diskFileExists(const Common::String &filename) {
Common::SeekableReadStream *openDiskFile(const Common::String &filename) {
uint32 prefixSize = 0;
- Common::SeekableReadStream *file = NULL;
+ Common::SeekableReadStream *file = nullptr;
Common::String fixedFilename = filename;
+ correctSlashes(fixedFilename);
// Absolute path: TODO: Add specific fallbacks here.
- if (filename.contains(':')) {
- if (filename.hasPrefix("c:\\windows\\fonts\\")) { // East Side Story refers to "c:\windows\fonts\framd.ttf"
- fixedFilename = filename.c_str() + 17;
+ if (fixedFilename.contains(':')) {
+ if (fixedFilename.hasPrefix("c:/windows/fonts/")) { // East Side Story refers to "c:\windows\fonts\framd.ttf"
+ fixedFilename = filename.c_str() + 14;
} else {
error("openDiskFile::Absolute path or invalid filename used in %s", filename.c_str());
}
@@ -125,7 +132,7 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename) {
SearchMan.listMatchingMembers(files, fixedFilename);
for (Common::ArchiveMemberList::iterator it = files.begin(); it != files.end(); ++it) {
- if ((*it)->getName() == filename) {
+ if ((*it)->getName().equalsIgnoreCase(lastPathComponent(fixedFilename,'/'))) {
file = (*it)->createReadStream();
break;
}
@@ -157,7 +164,7 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename) {
if (!compBuffer) {
error("Error allocating memory for compressed file '%s'", filename.c_str());
delete file;
- return NULL;
+ return nullptr;
}
byte *data = new byte[uncompSize];
@@ -165,7 +172,7 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename) {
error("Error allocating buffer for file '%s'", filename.c_str());
delete[] compBuffer;
delete file;
- return NULL;
+ return nullptr;
}
file->seek(dataOffset + prefixSize, SEEK_SET);
file->read(compBuffer, compSize);
@@ -174,7 +181,7 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename) {
error("Error uncompressing file '%s'", filename.c_str());
delete[] compBuffer;
delete file;
- return NULL;
+ return nullptr;
}
delete[] compBuffer;
@@ -188,7 +195,7 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename) {
return file;
}
- return NULL;
+ return nullptr;
}
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/file/base_file_entry.cpp b/engines/wintermute/base/file/base_file_entry.cpp
index b9805d78dd..1968da6f47 100644
--- a/engines/wintermute/base/file/base_file_entry.cpp
+++ b/engines/wintermute/base/file/base_file_entry.cpp
@@ -37,7 +37,7 @@ namespace Wintermute {
Common::SeekableReadStream *BaseFileEntry::createReadStream() const {
Common::SeekableReadStream *file = _package->getFilePointer();
if (!file) {
- return NULL;
+ return nullptr;
}
bool compressed = (_compressedLength != 0);
@@ -55,7 +55,7 @@ Common::SeekableReadStream *BaseFileEntry::createReadStream() const {
//////////////////////////////////////////////////////////////////////////
BaseFileEntry::BaseFileEntry() {
- _package = NULL;
+ _package = nullptr;
_length = _compressedLength = _offset = _flags = 0;
_filename = "";
@@ -67,7 +67,7 @@ BaseFileEntry::BaseFileEntry() {
//////////////////////////////////////////////////////////////////////////
BaseFileEntry::~BaseFileEntry() {
- _package = NULL; // ref only
+ _package = nullptr; // ref only
}
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/file/base_package.cpp b/engines/wintermute/base/file/base_package.cpp
index 51a1558a7c..73f767c3ef 100644
--- a/engines/wintermute/base/file/base_package.cpp
+++ b/engines/wintermute/base/file/base_package.cpp
@@ -61,7 +61,7 @@ static bool findPackageSignature(Common::SeekableReadStream *f, uint32 *offset)
uint32 bytesRead = startPos;
while (bytesRead < fileSize - 16) {
- uint32 toRead = MIN((unsigned int)32768, fileSize - bytesRead);
+ uint32 toRead = MIN<unsigned int>((unsigned int)32768, fileSize - bytesRead);
f->seek((int32)startPos, SEEK_SET);
uint32 actuallyRead = f->read(buf, toRead);
if (actuallyRead != toRead) {
@@ -157,7 +157,7 @@ PackageSet::PackageSet(Common::FSNode file, const Common::String &filename, bool
pkg->_cd = stream->readByte();
pkg->_priority = hdr._priority;
delete[] pkgName;
- pkgName = NULL;
+ pkgName = nullptr;
if (!hdr._masterIndex) {
pkg->_cd = 0; // override CD to fixed disk
@@ -186,7 +186,7 @@ PackageSet::PackageSet(Common::FSNode file, const Common::String &filename, bool
Common::String upcName = name;
upcName.toUppercase();
delete[] name;
- name = NULL;
+ name = nullptr;
offset = stream->readUint32LE();
offset += absoluteOffset;
@@ -270,7 +270,7 @@ Common::SeekableReadStream *PackageSet::createReadStreamForMember(const Common::
if (it != _files.end()) {
return it->_value->createReadStream();
}
- return NULL;
+ return nullptr;
}
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/file/base_resources.cpp b/engines/wintermute/base/file/base_resources.cpp
deleted file mode 100644
index 0b32cb0c4f..0000000000
--- a/engines/wintermute/base/file/base_resources.cpp
+++ /dev/null
@@ -1,2830 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-/*
- * This file is based on WME Lite.
- * http://dead-code.org/redir.php?target=wmelite
- * Copyright (c) 2011 Jan Nedoma
- */
-
-#include "engines/wintermute/base/file/base_resources.h"
-#include "common/str.h"
-#include "common/memstream.h"
-
-namespace Wintermute {
-
-unsigned char invalid[] = {
- 0x42, 0x4d, 0x36, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x04, 0x00, 0x00, 0x28, 0x00,
- 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x20, 0x4e, 0x00, 0x00, 0x20, 0x4e, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-} ;
-
-unsigned char invaliddebug[] = {
- 0x42, 0x4d, 0x36, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x04, 0x00, 0x00, 0x28, 0x00,
- 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80,
- 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80,
- 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x00, 0xc0, 0xdc, 0xc0, 0x00, 0xf0, 0xca, 0xa6, 0x00, 0x00, 0x20,
- 0x40, 0x00, 0x00, 0x20, 0x60, 0x00, 0x00, 0x20, 0x80, 0x00, 0x00, 0x20, 0xa0, 0x00, 0x00, 0x20,
- 0xc0, 0x00, 0x00, 0x20, 0xe0, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x40,
- 0x40, 0x00, 0x00, 0x40, 0x60, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x40,
- 0xc0, 0x00, 0x00, 0x40, 0xe0, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x60,
- 0x40, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x80, 0x00, 0x00, 0x60, 0xa0, 0x00, 0x00, 0x60,
- 0xc0, 0x00, 0x00, 0x60, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00, 0x80,
- 0x40, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xa0, 0x00, 0x00, 0x80,
- 0xc0, 0x00, 0x00, 0x80, 0xe0, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xa0, 0x20, 0x00, 0x00, 0xa0,
- 0x40, 0x00, 0x00, 0xa0, 0x60, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0xa0, 0xa0, 0x00, 0x00, 0xa0,
- 0xc0, 0x00, 0x00, 0xa0, 0xe0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x00, 0x00, 0xc0,
- 0x40, 0x00, 0x00, 0xc0, 0x60, 0x00, 0x00, 0xc0, 0x80, 0x00, 0x00, 0xc0, 0xa0, 0x00, 0x00, 0xc0,
- 0xc0, 0x00, 0x00, 0xc0, 0xe0, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x20, 0x00, 0x00, 0xe0,
- 0x40, 0x00, 0x00, 0xe0, 0x60, 0x00, 0x00, 0xe0, 0x80, 0x00, 0x00, 0xe0, 0xa0, 0x00, 0x00, 0xe0,
- 0xc0, 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x20, 0x00, 0x40, 0x00,
- 0x40, 0x00, 0x40, 0x00, 0x60, 0x00, 0x40, 0x00, 0x80, 0x00, 0x40, 0x00, 0xa0, 0x00, 0x40, 0x00,
- 0xc0, 0x00, 0x40, 0x00, 0xe0, 0x00, 0x40, 0x20, 0x00, 0x00, 0x40, 0x20, 0x20, 0x00, 0x40, 0x20,
- 0x40, 0x00, 0x40, 0x20, 0x60, 0x00, 0x40, 0x20, 0x80, 0x00, 0x40, 0x20, 0xa0, 0x00, 0x40, 0x20,
- 0xc0, 0x00, 0x40, 0x20, 0xe0, 0x00, 0x40, 0x40, 0x00, 0x00, 0x40, 0x40, 0x20, 0x00, 0x40, 0x40,
- 0x40, 0x00, 0x40, 0x40, 0x60, 0x00, 0x40, 0x40, 0x80, 0x00, 0x40, 0x40, 0xa0, 0x00, 0x40, 0x40,
- 0xc0, 0x00, 0x40, 0x40, 0xe0, 0x00, 0x40, 0x60, 0x00, 0x00, 0x40, 0x60, 0x20, 0x00, 0x40, 0x60,
- 0x40, 0x00, 0x40, 0x60, 0x60, 0x00, 0x40, 0x60, 0x80, 0x00, 0x40, 0x60, 0xa0, 0x00, 0x40, 0x60,
- 0xc0, 0x00, 0x40, 0x60, 0xe0, 0x00, 0x40, 0x80, 0x00, 0x00, 0x40, 0x80, 0x20, 0x00, 0x40, 0x80,
- 0x40, 0x00, 0x40, 0x80, 0x60, 0x00, 0x40, 0x80, 0x80, 0x00, 0x40, 0x80, 0xa0, 0x00, 0x40, 0x80,
- 0xc0, 0x00, 0x40, 0x80, 0xe0, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x40, 0xa0, 0x20, 0x00, 0x40, 0xa0,
- 0x40, 0x00, 0x40, 0xa0, 0x60, 0x00, 0x40, 0xa0, 0x80, 0x00, 0x40, 0xa0, 0xa0, 0x00, 0x40, 0xa0,
- 0xc0, 0x00, 0x40, 0xa0, 0xe0, 0x00, 0x40, 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x20, 0x00, 0x40, 0xc0,
- 0x40, 0x00, 0x40, 0xc0, 0x60, 0x00, 0x40, 0xc0, 0x80, 0x00, 0x40, 0xc0, 0xa0, 0x00, 0x40, 0xc0,
- 0xc0, 0x00, 0x40, 0xc0, 0xe0, 0x00, 0x40, 0xe0, 0x00, 0x00, 0x40, 0xe0, 0x20, 0x00, 0x40, 0xe0,
- 0x40, 0x00, 0x40, 0xe0, 0x60, 0x00, 0x40, 0xe0, 0x80, 0x00, 0x40, 0xe0, 0xa0, 0x00, 0x40, 0xe0,
- 0xc0, 0x00, 0x40, 0xe0, 0xe0, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x20, 0x00, 0x80, 0x00,
- 0x40, 0x00, 0x80, 0x00, 0x60, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0xa0, 0x00, 0x80, 0x00,
- 0xc0, 0x00, 0x80, 0x00, 0xe0, 0x00, 0x80, 0x20, 0x00, 0x00, 0x80, 0x20, 0x20, 0x00, 0x80, 0x20,
- 0x40, 0x00, 0x80, 0x20, 0x60, 0x00, 0x80, 0x20, 0x80, 0x00, 0x80, 0x20, 0xa0, 0x00, 0x80, 0x20,
- 0xc0, 0x00, 0x80, 0x20, 0xe0, 0x00, 0x80, 0x40, 0x00, 0x00, 0x80, 0x40, 0x20, 0x00, 0x80, 0x40,
- 0x40, 0x00, 0x80, 0x40, 0x60, 0x00, 0x80, 0x40, 0x80, 0x00, 0x80, 0x40, 0xa0, 0x00, 0x80, 0x40,
- 0xc0, 0x00, 0x80, 0x40, 0xe0, 0x00, 0x80, 0x60, 0x00, 0x00, 0x80, 0x60, 0x20, 0x00, 0x80, 0x60,
- 0x40, 0x00, 0x80, 0x60, 0x60, 0x00, 0x80, 0x60, 0x80, 0x00, 0x80, 0x60, 0xa0, 0x00, 0x80, 0x60,
- 0xc0, 0x00, 0x80, 0x60, 0xe0, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x20, 0x00, 0x80, 0x80,
- 0x40, 0x00, 0x80, 0x80, 0x60, 0x00, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0xa0, 0x00, 0x80, 0x80,
- 0xc0, 0x00, 0x80, 0x80, 0xe0, 0x00, 0x80, 0xa0, 0x00, 0x00, 0x80, 0xa0, 0x20, 0x00, 0x80, 0xa0,
- 0x40, 0x00, 0x80, 0xa0, 0x60, 0x00, 0x80, 0xa0, 0x80, 0x00, 0x80, 0xa0, 0xa0, 0x00, 0x80, 0xa0,
- 0xc0, 0x00, 0x80, 0xa0, 0xe0, 0x00, 0x80, 0xc0, 0x00, 0x00, 0x80, 0xc0, 0x20, 0x00, 0x80, 0xc0,
- 0x40, 0x00, 0x80, 0xc0, 0x60, 0x00, 0x80, 0xc0, 0x80, 0x00, 0x80, 0xc0, 0xa0, 0x00, 0x80, 0xc0,
- 0xc0, 0x00, 0x80, 0xc0, 0xe0, 0x00, 0x80, 0xe0, 0x00, 0x00, 0x80, 0xe0, 0x20, 0x00, 0x80, 0xe0,
- 0x40, 0x00, 0x80, 0xe0, 0x60, 0x00, 0x80, 0xe0, 0x80, 0x00, 0x80, 0xe0, 0xa0, 0x00, 0x80, 0xe0,
- 0xc0, 0x00, 0x80, 0xe0, 0xe0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x20, 0x00, 0xc0, 0x00,
- 0x40, 0x00, 0xc0, 0x00, 0x60, 0x00, 0xc0, 0x00, 0x80, 0x00, 0xc0, 0x00, 0xa0, 0x00, 0xc0, 0x00,
- 0xc0, 0x00, 0xc0, 0x00, 0xe0, 0x00, 0xc0, 0x20, 0x00, 0x00, 0xc0, 0x20, 0x20, 0x00, 0xc0, 0x20,
- 0x40, 0x00, 0xc0, 0x20, 0x60, 0x00, 0xc0, 0x20, 0x80, 0x00, 0xc0, 0x20, 0xa0, 0x00, 0xc0, 0x20,
- 0xc0, 0x00, 0xc0, 0x20, 0xe0, 0x00, 0xc0, 0x40, 0x00, 0x00, 0xc0, 0x40, 0x20, 0x00, 0xc0, 0x40,
- 0x40, 0x00, 0xc0, 0x40, 0x60, 0x00, 0xc0, 0x40, 0x80, 0x00, 0xc0, 0x40, 0xa0, 0x00, 0xc0, 0x40,
- 0xc0, 0x00, 0xc0, 0x40, 0xe0, 0x00, 0xc0, 0x60, 0x00, 0x00, 0xc0, 0x60, 0x20, 0x00, 0xc0, 0x60,
- 0x40, 0x00, 0xc0, 0x60, 0x60, 0x00, 0xc0, 0x60, 0x80, 0x00, 0xc0, 0x60, 0xa0, 0x00, 0xc0, 0x60,
- 0xc0, 0x00, 0xc0, 0x60, 0xe0, 0x00, 0xc0, 0x80, 0x00, 0x00, 0xc0, 0x80, 0x20, 0x00, 0xc0, 0x80,
- 0x40, 0x00, 0xc0, 0x80, 0x60, 0x00, 0xc0, 0x80, 0x80, 0x00, 0xc0, 0x80, 0xa0, 0x00, 0xc0, 0x80,
- 0xc0, 0x00, 0xc0, 0x80, 0xe0, 0x00, 0xc0, 0xa0, 0x00, 0x00, 0xc0, 0xa0, 0x20, 0x00, 0xc0, 0xa0,
- 0x40, 0x00, 0xc0, 0xa0, 0x60, 0x00, 0xc0, 0xa0, 0x80, 0x00, 0xc0, 0xa0, 0xa0, 0x00, 0xc0, 0xa0,
- 0xc0, 0x00, 0xc0, 0xa0, 0xe0, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0xc0, 0xc0, 0x20, 0x00, 0xc0, 0xc0,
- 0x40, 0x00, 0xc0, 0xc0, 0x60, 0x00, 0xc0, 0xc0, 0x80, 0x00, 0xc0, 0xc0, 0xa0, 0x00, 0xf0, 0xfb,
- 0xff, 0x00, 0xa4, 0xa0, 0xa0, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
- 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff,
- 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
- 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
- 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
- 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
- 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0xf9, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00,
- 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0xf9,
- 0x00, 0x00, 0x00, 0xf9, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00,
- 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0xf9,
- 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00,
- 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00,
- 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0xf9, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00,
- 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0xf9, 0xf9, 0x00,
- 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0xf9,
- 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0xf9,
- 0xf9, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0xf9,
- 0x00, 0x00, 0x00, 0xf9, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00,
- 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0x00, 0xf9, 0xf9, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00,
- 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00,
- 0xf9, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00,
- 0xf9, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0xf9, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00,
- 0xf9, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0xf9,
- 0x00, 0x00, 0x00, 0xf9, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xf9,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
- 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
- 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
- 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
- 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9
-} ;
-
-unsigned char systemfont[] = {
- 0x42, 0x4d, 0x36, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x04, 0x00, 0x00, 0x28, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x70, 0x0b, 0x00, 0x00, 0x70, 0x0b, 0x00, 0x00, 0x00, 0x01,
- 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x80, 0x80,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x01, 0x00, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00,
- 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02,
- 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02,
- 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x01, 0x02, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x02, 0x02, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x02, 0x02, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x01, 0x00, 0x00, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x01, 0x00, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
- 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
- 0x00, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
- 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02,
- 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x02, 0x02,
- 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x01, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x00, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x02, 0x02,
- 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00,
- 0x01, 0x02, 0x02, 0x01, 0x00, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02,
- 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x02, 0x00, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00,
- 0x02, 0x00, 0x01, 0x02, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x02, 0x02, 0x01, 0x00, 0x02, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00,
- 0x02, 0x00, 0x01, 0x01, 0x00, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x00, 0x02, 0x00, 0x01, 0x02, 0x00, 0x02, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x02, 0x02,
- 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00,
- 0x02, 0x01, 0x00, 0x02, 0x01, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x02, 0x00, 0x00, 0x02, 0x01, 0x02, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x01, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02,
- 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00,
- 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x00, 0x01, 0x01, 0x00,
- 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x02, 0x02,
- 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02,
- 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x01, 0x02, 0x00, 0x01, 0x01, 0x00,
- 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
- 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02,
- 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x02, 0x00,
- 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02,
- 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x01, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x00, 0x01, 0x02, 0x00, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02,
- 0x02, 0x02, 0x01, 0x01, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x02, 0x01,
- 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x00, 0x00, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02,
- 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
- 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02,
- 0x00, 0x01, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x02, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
- 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02,
- 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x01, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x02, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x02, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x02, 0x01, 0x02, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x00, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01,
- 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x02, 0x02, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x00, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x02, 0x02,
- 0x00, 0x02, 0x02, 0x00, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02,
- 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x00, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01
-} ;
-
-Common::SeekableReadStream *BaseResources::getFile(const Common::String &filename) {
- if (scumm_stricmp(filename.c_str(), "invalid.bmp") == 0) {
- return new Common::MemoryReadStream(invalid, sizeof(invalid), DisposeAfterUse::NO);
- } else if (scumm_stricmp(filename.c_str(), "invalid_debug.bmp") == 0) {
- return new Common::MemoryReadStream(invaliddebug, sizeof(invalid), DisposeAfterUse::NO);
- } else if (scumm_stricmp(filename.c_str(), "syste_font.bmp") == 0) {
- return new Common::MemoryReadStream(systemfont, sizeof(invalid), DisposeAfterUse::NO);
- }
- return NULL;
-}
-
-bool BaseResources::hasFile(const Common::String &filename) {
- if (scumm_stricmp(filename.c_str(), "invalid.bmp") == 0) {
- return true;
- } else if (scumm_stricmp(filename.c_str(), "invalid_debug.bmp") == 0) {
- return true;
- } else if (scumm_stricmp(filename.c_str(), "syste_font.bmp") == 0) {
- return true;
- }
- return false;
-}
-
-} // end of namespace Wintermute
diff --git a/engines/wintermute/base/file/base_save_thumb_file.cpp b/engines/wintermute/base/file/base_save_thumb_file.cpp
index 94d3e5a94e..2c4ddf4875 100644
--- a/engines/wintermute/base/file/base_save_thumb_file.cpp
+++ b/engines/wintermute/base/file/base_save_thumb_file.cpp
@@ -38,7 +38,7 @@ namespace Wintermute {
//////////////////////////////////////////////////////////////////////////
BaseSaveThumbFile::BaseSaveThumbFile() {
- _data = NULL;
+ _data = nullptr;
}
@@ -99,7 +99,7 @@ bool BaseSaveThumbFile::open(const Common::String &filename) {
//////////////////////////////////////////////////////////////////////////
bool BaseSaveThumbFile::close() {
delete[] _data;
- _data = NULL;
+ _data = nullptr;
_pos = 0;
_size = 0;
diff --git a/engines/wintermute/base/font/base_font.cpp b/engines/wintermute/base/font/base_font.cpp
index 87dd3da5a3..e3c8827254 100644
--- a/engines/wintermute/base/font/base_font.cpp
+++ b/engines/wintermute/base/font/base_font.cpp
@@ -89,7 +89,7 @@ BaseFont *BaseFont::createFromFile(BaseGame *gameRef, const Common::String &file
if (font) {
if (DID_FAIL(font->loadFile(filename))) {
delete font;
- return NULL;
+ return nullptr;
}
}
return font;
@@ -98,7 +98,7 @@ BaseFont *BaseFont::createFromFile(BaseGame *gameRef, const Common::String &file
if (font) {
if (DID_FAIL(font->loadFile(filename))) {
delete font;
- return NULL;
+ return nullptr;
}
}
return font;
@@ -119,7 +119,7 @@ bool BaseFont::isTrueType(BaseGame *gameRef, const Common::String &filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
return false;
}
diff --git a/engines/wintermute/base/font/base_font_bitmap.cpp b/engines/wintermute/base/font/base_font_bitmap.cpp
index 55f46c476b..af66cbb89f 100644
--- a/engines/wintermute/base/font/base_font_bitmap.cpp
+++ b/engines/wintermute/base/font/base_font_bitmap.cpp
@@ -49,8 +49,8 @@ IMPLEMENT_PERSISTENT(BaseFontBitmap, false)
//////////////////////////////////////////////////////////////////////
BaseFontBitmap::BaseFontBitmap(BaseGame *inGame) : BaseFont(inGame) {
- _subframe = NULL;
- _sprite = NULL;
+ _subframe = nullptr;
+ _sprite = nullptr;
_widthsFrame = 0;
memset(_widths, 0, NUM_CHARACTERS);
_tileWidth = _tileHeight = _numColumns = 0;
@@ -64,8 +64,8 @@ BaseFontBitmap::BaseFontBitmap(BaseGame *inGame) : BaseFont(inGame) {
BaseFontBitmap::~BaseFontBitmap() {
delete _subframe;
delete _sprite;
- _subframe = NULL;
- _sprite = NULL;
+ _subframe = nullptr;
+ _sprite = nullptr;
}
@@ -112,7 +112,7 @@ int BaseFontBitmap::textHeightDraw(const byte *text, int x, int y, int width, TT
return 0;
}
- if (text == NULL || text[0] == '\0') {
+ if (text == nullptr || text[0] == '\0') {
return _tileHeight;
}
@@ -273,7 +273,7 @@ void BaseFontBitmap::drawChar(byte c, int x, int y) {
//////////////////////////////////////////////////////////////////////
bool BaseFontBitmap::loadFile(const Common::String &filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "BaseFontBitmap::LoadFile failed for file '%s'", filename.c_str());
return STATUS_FAILED;
}
@@ -347,8 +347,8 @@ bool BaseFontBitmap::loadBuffer(byte *buffer) {
int i;
int r = 255, g = 255, b = 255;
bool custoTrans = false;
- char *surfaceFile = NULL;
- char *spriteFile = NULL;
+ char *surfaceFile = nullptr;
+ char *spriteFile = nullptr;
bool autoWidth = false;
int spaceWidth = 0;
@@ -428,16 +428,16 @@ bool BaseFontBitmap::loadBuffer(byte *buffer) {
return STATUS_FAILED;
}
- if (spriteFile != NULL) {
+ if (spriteFile != nullptr) {
delete _sprite;
_sprite = new BaseSprite(_gameRef, this);
if (!_sprite || DID_FAIL(_sprite->loadFile(spriteFile))) {
delete _sprite;
- _sprite = NULL;
+ _sprite = nullptr;
}
}
- if (surfaceFile != NULL && !_sprite) {
+ if (surfaceFile != nullptr && !_sprite) {
_subframe = new BaseSubFrame(_gameRef);
if (custoTrans) {
_subframe->setSurface(surfaceFile, false, r, g, b);
@@ -447,7 +447,7 @@ bool BaseFontBitmap::loadBuffer(byte *buffer) {
}
- if (((_subframe == NULL || _subframe->_surface == NULL) && _sprite == NULL) || _numColumns == 0 || _tileWidth == 0 || _tileHeight == 0) {
+ if (((_subframe == nullptr || _subframe->_surface == nullptr) && _sprite == nullptr) || _numColumns == 0 || _tileWidth == 0 || _tileHeight == 0) {
_gameRef->LOG(0, "Incomplete font definition");
return STATUS_FAILED;
}
@@ -530,7 +530,7 @@ int BaseFontBitmap::getCharWidth(byte index) {
//////////////////////////////////////////////////////////////////////////
bool BaseFontBitmap::getWidths() {
- BaseSurface *surf = NULL;
+ BaseSurface *surf = nullptr;
if (_sprite) {
if (_widthsFrame >= 0 && _widthsFrame < (int32)_sprite->_frames.size()) {
@@ -539,7 +539,7 @@ bool BaseFontBitmap::getWidths() {
}
}
}
- if (surf == NULL && _subframe) {
+ if (surf == nullptr && _subframe) {
surf = _subframe->_surface;
}
if (!surf || DID_FAIL(surf->startPixelOp())) {
diff --git a/engines/wintermute/base/font/base_font_storage.cpp b/engines/wintermute/base/font/base_font_storage.cpp
index 8128ffe897..6a625f30ae 100644
--- a/engines/wintermute/base/font/base_font_storage.cpp
+++ b/engines/wintermute/base/font/base_font_storage.cpp
@@ -72,7 +72,7 @@ bool BaseFontStorage::initLoop() {
//////////////////////////////////////////////////////////////////////////
BaseFont *BaseFontStorage::addFont(const Common::String &filename) {
if (!filename.size()) {
- return NULL;
+ return nullptr;
}
for (uint32 i = 0; i < _fonts.size(); i++) {
@@ -84,11 +84,11 @@ BaseFont *BaseFontStorage::addFont(const Common::String &filename) {
/*
BaseFont* font = new BaseFont(_gameRef);
- if (!font) return NULL;
+ if (!font) return nullptr;
if (DID_FAIL(font->loadFile(filename))) {
delete font;
- return NULL;
+ return nullptr;
}
else {
font->_refCount = 1;
diff --git a/engines/wintermute/base/font/base_font_truetype.cpp b/engines/wintermute/base/font/base_font_truetype.cpp
index 47506089b4..7f1ff340d2 100644
--- a/engines/wintermute/base/font/base_font_truetype.cpp
+++ b/engines/wintermute/base/font/base_font_truetype.cpp
@@ -38,6 +38,7 @@
#include "engines/wintermute/wintermute.h"
#include "graphics/fonts/ttf.h"
#include "graphics/fontman.h"
+#include "common/unzip.h"
#include <limits.h>
namespace Wintermute {
@@ -49,13 +50,13 @@ BaseFontTT::BaseFontTT(BaseGame *inGame) : BaseFont(inGame) {
_fontHeight = 12;
_isBold = _isItalic = _isUnderline = _isStriked = false;
- _fontFile = NULL;
- _font = NULL;
- _fallbackFont = NULL;
- _deletableFont = NULL;
+ _fontFile = nullptr;
+ _font = nullptr;
+ _fallbackFont = nullptr;
+ _deletableFont = nullptr;
for (int i = 0; i < NUM_CACHED_TEXTS; i++) {
- _cachedTexts[i] = NULL;
+ _cachedTexts[i] = nullptr;
}
_lineHeight = 0;
@@ -72,10 +73,10 @@ BaseFontTT::~BaseFontTT(void) {
_layers.clear();
delete[] _fontFile;
- _fontFile = NULL;
+ _fontFile = nullptr;
delete _deletableFont;
- _font = NULL;
+ _font = nullptr;
}
@@ -85,7 +86,7 @@ void BaseFontTT::clearCache() {
if (_cachedTexts[i]) {
delete _cachedTexts[i];
}
- _cachedTexts[i] = NULL;
+ _cachedTexts[i] = nullptr;
}
}
@@ -95,13 +96,13 @@ void BaseFontTT::initLoop() {
if (_gameRef->_constrainedMemory) {
// purge all cached images not used in the last frame
for (int i = 0; i < NUM_CACHED_TEXTS; i++) {
- if (_cachedTexts[i] == NULL) {
+ if (_cachedTexts[i] == nullptr) {
continue;
}
if (!_cachedTexts[i]->_marked) {
delete _cachedTexts[i];
- _cachedTexts[i] = NULL;
+ _cachedTexts[i] = nullptr;
} else {
_cachedTexts[i]->_marked = false;
}
@@ -150,7 +151,7 @@ int BaseFontTT::getTextHeight(byte *text, int width) {
//////////////////////////////////////////////////////////////////////////
void BaseFontTT::drawText(const byte *text, int x, int y, int width, TTextAlign align, int maxHeight, int maxLength) {
- if (text == NULL || strcmp((const char *)text, "") == 0) {
+ if (text == nullptr || strcmp((const char *)text, "") == 0) {
return;
}
@@ -162,7 +163,7 @@ void BaseFontTT::drawText(const byte *text, int x, int y, int width, TTextAlign
// HACK: J.U.L.I.A. uses CP1252, we need to fix that,
// And we still don't have any UTF8-support.
if (_gameRef->_textEncoding != TEXT_UTF8) {
- textStr = StringUtil::ansiToWide((char *)text);
+ textStr = StringUtil::ansiToWide((const char *)text);
}
if (maxLength >= 0 && textStr.size() > (uint32)maxLength) {
@@ -175,11 +176,11 @@ void BaseFontTT::drawText(const byte *text, int x, int y, int width, TTextAlign
// find cached surface, if exists
uint32 minUseTime = UINT_MAX;
int minIndex = -1;
- BaseSurface *surface = NULL;
+ BaseSurface *surface = nullptr;
int textOffset = 0;
for (int i = 0; i < NUM_CACHED_TEXTS; i++) {
- if (_cachedTexts[i] == NULL) {
+ if (_cachedTexts[i] == nullptr) {
minUseTime = 0;
minIndex = i;
} else {
@@ -204,7 +205,7 @@ void BaseFontTT::drawText(const byte *text, int x, int y, int width, TTextAlign
surface = renderTextToTexture(textStr, width, align, maxHeight, textOffset);
if (surface) {
// write surface to cache
- if (_cachedTexts[minIndex] != NULL) {
+ if (_cachedTexts[minIndex] != nullptr) {
delete _cachedTexts[minIndex];
}
_cachedTexts[minIndex] = new BaseCachedTTFontText;
@@ -254,7 +255,7 @@ BaseSurface *BaseFontTT::renderTextToTexture(const WideString &text, int width,
lines.pop_back();
}
if (lines.size() == 0) {
- return NULL;
+ return nullptr;
}
Graphics::TextAlign alignment = Graphics::kTextAlignInvalid;
@@ -303,7 +304,7 @@ int BaseFontTT::getLetterHeight() {
//////////////////////////////////////////////////////////////////////
bool BaseFontTT::loadFile(const Common::String &filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "BaseFontTT::LoadFile failed for file '%s'", filename.c_str());
return STATUS_FAILED;
}
@@ -421,7 +422,7 @@ bool BaseFontTT::loadBuffer(byte *buffer) {
_layers.add(layer);
} else {
delete layer;
- layer = NULL;
+ layer = nullptr;
cmd = PARSERR_TOKENNOTFOUND;
}
}
@@ -527,9 +528,9 @@ bool BaseFontTT::persist(BasePersistenceManager *persistMgr) {
if (!persistMgr->getIsSaving()) {
for (int i = 0; i < NUM_CACHED_TEXTS; i++) {
- _cachedTexts[i] = NULL;
+ _cachedTexts[i] = nullptr;
}
- _fallbackFont = _font = _deletableFont = NULL;
+ _fallbackFont = _font = _deletableFont = nullptr;
}
return STATUS_OK;
@@ -546,26 +547,52 @@ bool BaseFontTT::initFont() {
if (!_fontFile) {
return STATUS_FAILED;
}
-
+#ifdef USE_FREETYPE2
Common::SeekableReadStream *file = BaseFileManager::getEngineInstance()->openFile(_fontFile);
if (!file) {
- //TODO: Try to fallback from Arial to FreeSans
- /*
- // the requested font file is not in wme file space; try loading a system font
- AnsiString fontFileName = PathUtil::combine(BasePlatform::getSystemFontPath(), PathUtil::getFileName(_fontFile));
- file = BaseFileManager::getEngineInstance()->openFile(fontFileName.c_str(), false);
- if (!file) {
- _gameRef->LOG(0, "Error loading TrueType font '%s'", _fontFile);
- //return STATUS_FAILED;
- }*/
+ if (Common::String(_fontFile) != "arial.ttf") {
+ warning("%s has no replacement font yet, using FreeSans for now (if available)", _fontFile);
+ }
+ // Fallback1: Try to find FreeSans.ttf
+ file = SearchMan.createReadStreamForMember("FreeSans.ttf");
}
if (file) {
-#ifdef USE_FREETYPE2
_deletableFont = Graphics::loadTTFFont(*file, 96, _fontHeight); // Use the same dpi as WME (96 vs 72).
_font = _deletableFont;
-#endif
+ BaseFileManager::getEngineInstance()->closeFile(file);
+ file = nullptr;
+ }
+
+ // Fallback2: Try to find ScummModern.zip, and get the font from there:
+ if (!_font) {
+ Common::SeekableReadStream *themeFile = SearchMan.createReadStreamForMember("scummmodern.zip");
+ if (themeFile) {
+ Common::Archive *themeArchive = Common::makeZipArchive(themeFile);
+ if (themeArchive->hasFile("FreeSans.ttf")) {
+ file = nullptr;
+ file = themeArchive->createReadStreamForMember("FreeSans.ttf");
+ _deletableFont = Graphics::loadTTFFont(*file, 96, _fontHeight); // Use the same dpi as WME (96 vs 72).
+ _font = _deletableFont;
+ }
+ // We're not using BaseFileManager, so clean up after ourselves:
+ delete file;
+ file = nullptr;
+ delete themeArchive;
+ themeArchive = nullptr;
+ }
}
+
+ // Fallback3: Try to ask FontMan for the FreeSans.ttf ScummModern.zip uses:
+ if (!_font) {
+ // Really not desireable, as we will get a font with dpi-72 then
+ Common::String fontName = Common::String::format("%s-%s@%d", "FreeSans.ttf", "ASCII", _fontHeight);
+ warning("Looking for %s", fontName.c_str());
+ _font = FontMan.getFontByName(fontName);
+ }
+#endif // USE_FREETYPE2
+
+ // Fallback4: Just use the Big GUI-font. (REALLY undesireable)
if (!_font) {
_font = _fallbackFont = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
warning("BaseFontTT::InitFont - Couldn't load font: %s", _fontFile);
@@ -600,7 +627,7 @@ void BaseFontTT::measureText(const WideString &text, int maxWidth, int maxHeight
TextLine *line = (*it);
textWidth = MAX(textWidth, line->GetWidth());
delete line;
- line = NULL;
+ line = nullptr;
}*/
}
diff --git a/engines/wintermute/base/font/base_font_truetype.h b/engines/wintermute/base/font/base_font_truetype.h
index 2b69d1655d..ba4aac9380 100644
--- a/engines/wintermute/base/font/base_font_truetype.h
+++ b/engines/wintermute/base/font/base_font_truetype.h
@@ -61,7 +61,7 @@ private:
_text = "";
_width = _maxHeight = _maxLength = -1;
_align = TAL_LEFT;
- _surface = NULL;
+ _surface = nullptr;
_textOffset = 0;
_lastUsed = 0;
_marked = false;
diff --git a/engines/wintermute/base/gfx/base_image.cpp b/engines/wintermute/base/gfx/base_image.cpp
index 4b15d563ed..75de95128f 100644
--- a/engines/wintermute/base/gfx/base_image.cpp
+++ b/engines/wintermute/base/gfx/base_image.cpp
@@ -43,10 +43,10 @@ namespace Wintermute {
//////////////////////////////////////////////////////////////////////
BaseImage::BaseImage() {
_fileManager = BaseFileManager::getEngineInstance();
- _palette = NULL;
- _surface = NULL;
- _decoder = NULL;
- _deletableSurface = NULL;
+ _palette = nullptr;
+ _surface = nullptr;
+ _decoder = nullptr;
+ _deletableSurface = nullptr;
}
@@ -105,7 +105,7 @@ void BaseImage::copyFrom(const Graphics::Surface *surface) {
}
//////////////////////////////////////////////////////////////////////////
-bool BaseImage::saveBMPFile(const char *filename) const {
+bool BaseImage::saveBMPFile(const Common::String &filename) const {
warning("BaseImage::saveBMPFile - stubbed"); // TODO
return false;
}
@@ -118,7 +118,7 @@ bool BaseImage::resize(int newWidth, int newHeight) {
if (_deletableSurface) {
_deletableSurface->free();
delete _deletableSurface;
- _deletableSurface = NULL;
+ _deletableSurface = nullptr;
}
_surface = _deletableSurface = temp.scale((uint16)newWidth, (uint16)newHeight);
temp.free();
@@ -222,7 +222,7 @@ bool BaseImage::copyFrom(BaseImage *origImage, int newWidth, int newHeight) {
if (_deletableSurface) {
_deletableSurface->free();
delete _deletableSurface;
- _deletableSurface = NULL;
+ _deletableSurface = nullptr;
}
_surface = _deletableSurface = temp.scale((uint16)newWidth, (uint16)newHeight);
return true;
diff --git a/engines/wintermute/base/gfx/base_image.h b/engines/wintermute/base/gfx/base_image.h
index 6d01b84184..017305e5d0 100644
--- a/engines/wintermute/base/gfx/base_image.h
+++ b/engines/wintermute/base/gfx/base_image.h
@@ -55,7 +55,7 @@ public:
byte getAlphaAt(int x, int y) const;
bool writeBMPToStream(Common::WriteStream *stream) const;
bool resize(int newWidth, int newHeight);
- bool saveBMPFile(const char *filename) const;
+ bool saveBMPFile(const Common::String &filename) const;
bool copyFrom(BaseImage *origImage, int newWidth = 0, int newHeight = 0);
void copyFrom(const Graphics::Surface *surface);
private:
diff --git a/engines/wintermute/base/gfx/base_renderer.cpp b/engines/wintermute/base/gfx/base_renderer.cpp
index e7ffc14c25..c20881e425 100644
--- a/engines/wintermute/base/gfx/base_renderer.cpp
+++ b/engines/wintermute/base/gfx/base_renderer.cpp
@@ -29,6 +29,7 @@
#include "engines/wintermute/base/base_active_rect.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
#include "engines/wintermute/base/gfx/base_surface.h"
+#include "engines/wintermute/base/gfx/base_image.h"
#include "engines/wintermute/base/base_sub_frame.h"
#include "engines/wintermute/base/base_region.h"
#include "engines/wintermute/platform_osystem.h"
@@ -56,7 +57,7 @@ BaseRenderer::BaseRenderer(BaseGame *inGame) : BaseClass(inGame) {
_loadImageName = "";
_saveImageName = "";
- _saveLoadImage = NULL;
+ _saveLoadImage = nullptr;
_loadInProgress = false;
_hasDrawnSaveLoadImage = false;
@@ -132,24 +133,24 @@ void BaseRenderer::initSaveLoad(bool isSaving, bool quickSave) {
if (isSaving && !quickSave) {
delete _saveLoadImage;
- _saveLoadImage = NULL;
+ _saveLoadImage = nullptr;
if (_saveImageName.size()) {
_saveLoadImage = createSurface();
if (!_saveLoadImage || DID_FAIL(_saveLoadImage->create(_saveImageName, true, 0, 0, 0))) {
delete _saveLoadImage;
- _saveLoadImage = NULL;
+ _saveLoadImage = nullptr;
}
}
} else {
delete _saveLoadImage;
- _saveLoadImage = NULL;
+ _saveLoadImage = nullptr;
if (_loadImageName.size()) {
_saveLoadImage = createSurface();
if (!_saveLoadImage || DID_FAIL(_saveLoadImage->create(_loadImageName, true, 0, 0, 0))) {
delete _saveLoadImage;
- _saveLoadImage = NULL;
+ _saveLoadImage = nullptr;
}
}
_loadInProgress = true;
@@ -162,7 +163,7 @@ void BaseRenderer::endSaveLoad() {
_indicatorWidthDrawn = 0;
delete _saveLoadImage;
- _saveLoadImage = NULL;
+ _saveLoadImage = nullptr;
}
void BaseRenderer::persistSaveLoadImages(BasePersistenceManager *persistMgr) {
@@ -214,7 +215,7 @@ BaseObject *BaseRenderer::getObjectAt(int x, int y) {
}
}
- return (BaseObject *)NULL;
+ return (BaseObject *)nullptr;
}
@@ -317,7 +318,7 @@ bool BaseRenderer::clipCursor() {
//////////////////////////////////////////////////////////////////////////
bool BaseRenderer::unclipCursor() {
/*
- if (!_windowed) ::ClipCursor(NULL);
+ if (!_windowed) ::ClipCursor(nullptr);
*/
return STATUS_OK;
}
@@ -344,6 +345,22 @@ void BaseRenderer::addRectToList(BaseActiveRect *rect) {
_rectList.push_back(rect);
}
+bool BaseRenderer::saveScreenShot(const Common::String &filename, int sizeX, int sizeY) {
+ BaseImage *image = takeScreenshot();
+ if (image) {
+ if (sizeX != 0 && sizeY != 0) {
+ if (!DID_SUCCEED(image->resize(sizeX, sizeY))) {
+ delete image;
+ return false;
+ }
+ }
+ image->saveBMPFile(filename);
+ delete image;
+ return true;
+ }
+ return false;
+}
+
//////////////////////////////////////////////////////////////////////////
bool BaseRenderer::displayIndicator() {
if (!_indicatorDisplay || !_indicatorProgress) {
diff --git a/engines/wintermute/base/gfx/base_renderer.h b/engines/wintermute/base/gfx/base_renderer.h
index 9027c66a14..5a24e0179a 100644
--- a/engines/wintermute/base/gfx/base_renderer.h
+++ b/engines/wintermute/base/gfx/base_renderer.h
@@ -61,6 +61,7 @@ public:
* @return a BaseImage containing the current screen-buffer.
*/
virtual BaseImage *takeScreenshot() = 0;
+ virtual bool saveScreenShot(const Common::String &filename, int sizeX = 0, int sizeY = 0);
virtual bool setViewport(int left, int top, int right, int bottom);
virtual bool setViewport(Rect32 *rect);
virtual Rect32 getViewPort() = 0;
@@ -81,12 +82,13 @@ public:
* @param g the green component to fade too.
* @param b the blue component to fade too.
* @param a the alpha component to fade too.
- * @param rect the portion of the screen to fade (if NULL, the entire screen will be faded).
+ * @param rect the portion of the screen to fade (if nullptr, the entire screen will be faded).
*/
- virtual void fadeToColor(byte r, byte g, byte b, byte a, Common::Rect *rect = NULL) = 0;
- virtual bool drawLine(int x1, int y1, int x2, int y2, uint32 color);
- virtual bool drawRect(int x1, int y1, int x2, int y2, uint32 color, int width = 1);
- BaseRenderer(BaseGame *inGame = NULL);
+ virtual void fadeToColor(byte r, byte g, byte b, byte a, Common::Rect *rect = nullptr) = 0;
+
+ virtual bool drawLine(int x1, int y1, int x2, int y2, uint32 color); // Unused outside indicator-display
+ virtual bool drawRect(int x1, int y1, int x2, int y2, uint32 color, int width = 1); // Unused outside indicator-display
+ BaseRenderer(BaseGame *inGame = nullptr);
virtual ~BaseRenderer();
virtual bool setProjection() {
return STATUS_OK;
@@ -100,7 +102,7 @@ public:
* @param g the green component to fill with.
* @param b the blue component to fill with.
*/
- virtual bool fill(byte r, byte g, byte b, Common::Rect *rect = NULL) = 0;
+ virtual bool fill(byte r, byte g, byte b, Common::Rect *rect = nullptr) = 0;
virtual void onWindowChange();
virtual bool initRenderer(int width, int height, bool windowed);
/**
diff --git a/engines/wintermute/base/gfx/base_surface.h b/engines/wintermute/base/gfx/base_surface.h
index ee53c03e77..1ada900161 100644
--- a/engines/wintermute/base/gfx/base_surface.h
+++ b/engines/wintermute/base/gfx/base_surface.h
@@ -55,6 +55,7 @@ public:
virtual bool display(int x, int y, Rect32 rect, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 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 displayTransform(int x, int y, int hotX, int hotY, Rect32 rect, float zoomX, float zoomY, uint32 alpha, float rotate, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
+ virtual bool repeatLastDisplayOp(int offsetX, int offsetY, 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;
virtual bool create(int width, int height);
@@ -62,7 +63,7 @@ public:
return STATUS_FAILED;
}
virtual bool putPixel(int x, int y, byte r, byte g, byte b, int a = -1);
- virtual bool getPixel(int x, int y, byte *r, byte *g, byte *b, byte *a = NULL);
+ virtual bool getPixel(int x, int y, byte *r, byte *g, byte *b, byte *a = nullptr);
virtual bool comparePixel(int x, int y, byte r, byte g, byte b, int a = -1);
virtual bool startPixelOp();
virtual bool endPixelOp();
@@ -79,7 +80,7 @@ public:
}
Common::String getFileNameStr() { return _filename; }
const char* getFileName() { return _filename.c_str(); }
- //void SetWidth(int Width){ _width = Width; }
+ //void SetWidth(int Width) { _width = Width; }
//void SetHeight(int Height){ _height = Height; }
protected:
bool _ckDefault;
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index 097ea7fa42..13e2b9a5bc 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -53,12 +53,14 @@ BaseRenderOSystem::BaseRenderOSystem(BaseGame *inGame) : BaseRenderer(inGame) {
_needsFlip = true;
_spriteBatch = false;
_batchNum = 0;
+ _skipThisFrame = false;
+ _previousTicket = nullptr;
_borderLeft = _borderRight = _borderTop = _borderBottom = 0;
_ratioX = _ratioY = 1.0f;
setAlphaMod(255);
setColorMod(255, 255, 255);
- _dirtyRect = NULL;
+ _dirtyRect = nullptr;
_disableDirtyRects = false;
if (ConfMan.hasKey("dirty_rects")) {
_disableDirtyRects = !ConfMan.getBool("dirty_rects");
@@ -67,6 +69,15 @@ BaseRenderOSystem::BaseRenderOSystem(BaseGame *inGame) : BaseRenderer(inGame) {
//////////////////////////////////////////////////////////////////////////
BaseRenderOSystem::~BaseRenderOSystem() {
+ RenderQueueIterator it = _renderQueue.begin();
+ while (it != _renderQueue.end()) {
+ RenderTicket *ticket = *it;
+ it = _renderQueue.erase(it);
+ delete ticket;
+ }
+
+ delete _dirtyRect;
+
_renderSurface->free();
delete _renderSurface;
_blankSurface->free();
@@ -155,6 +166,16 @@ bool BaseRenderOSystem::indicatorFlip() {
}
bool BaseRenderOSystem::flip() {
+ if (_skipThisFrame) {
+ _skipThisFrame = false;
+ delete _dirtyRect;
+ _dirtyRect = nullptr;
+ g_system->updateScreen();
+ _needsFlip = false;
+ _drawNum = 1;
+ addDirtyRect(_renderRect);
+ return true;
+ }
if (!_disableDirtyRects) {
drawTickets();
} else {
@@ -177,7 +198,7 @@ bool BaseRenderOSystem::flip() {
}
// g_system->copyRectToScreen((byte *)_renderSurface->pixels, _renderSurface->pitch, _dirtyRect->left, _dirtyRect->top, _dirtyRect->width(), _dirtyRect->height());
delete _dirtyRect;
- _dirtyRect = NULL;
+ _dirtyRect = nullptr;
g_system->updateScreen();
_needsFlip = false;
}
@@ -243,7 +264,7 @@ void BaseRenderOSystem::fadeToColor(byte r, byte g, byte b, byte a, Common::Rect
Common::Rect sizeRect(fillRect);
sizeRect.translate(-fillRect.top, -fillRect.left);
surf.fillRect(fillRect, col);
- drawSurface(NULL, &surf, &sizeRect, &fillRect, false, false);
+ drawSurface(nullptr, &surf, &sizeRect, &fillRect, false, false);
surf.free();
//SDL_SetRenderDrawColor(_renderer, r, g, b, a);
@@ -256,27 +277,29 @@ Graphics::PixelFormat BaseRenderOSystem::getPixelFormat() const {
}
void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY, bool disableAlpha) {
- // Skip rects that are completely outside the screen:
- if ((dstRect->left < 0 && dstRect->right < 0) || (dstRect->top < 0 && dstRect->bottom < 0)) {
- return;
- }
// Start searching from the beginning for the first and second items (since it's empty the first time around
// then keep incrementing the start-position, to avoid comparing against already used tickets.
if (_drawNum == 0 || _drawNum == 1) {
_lastAddedTicket = _renderQueue.begin();
}
+ // Skip rects that are completely outside the screen:
+ if ((dstRect->left < 0 && dstRect->right < 0) || (dstRect->top < 0 && dstRect->bottom < 0)) {
+ return;
+ }
+
if (owner) { // Fade-tickets are owner-less
- RenderTicket compare(owner, NULL, srcRect, dstRect, mirrorX, mirrorY, disableAlpha);
+ RenderTicket compare(owner, nullptr, srcRect, dstRect, mirrorX, mirrorY, disableAlpha);
compare._batchNum = _batchNum;
- if (_spriteBatch)
+ if (_spriteBatch) {
_batchNum++;
+ }
compare._colorMod = _colorMod;
RenderQueueIterator it;
// Avoid calling end() and operator* every time, when potentially going through
// LOTS of tickets.
RenderQueueIterator endIterator = _renderQueue.end();
- RenderTicket *compareTicket = NULL;
+ RenderTicket *compareTicket = nullptr;
for (it = _lastAddedTicket; it != endIterator; ++it) {
compareTicket = *it;
if (*(compareTicket) == compare && compareTicket->_isValid) {
@@ -285,7 +308,7 @@ void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::S
drawFromSurface(compareTicket);
} else {
drawFromTicket(compareTicket);
- _lastAddedTicket++;
+ _previousTicket = compareTicket;
}
return;
}
@@ -295,14 +318,53 @@ void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::S
ticket->_colorMod = _colorMod;
if (!_disableDirtyRects) {
drawFromTicket(ticket);
- drawFromSurface(ticket);
- _lastAddedTicket++;
+ _previousTicket = ticket;
} else {
ticket->_wantsDraw = true;
_renderQueue.push_back(ticket);
}
}
+void BaseRenderOSystem::repeatLastDraw(int offsetX, int offsetY, int numTimesX, int numTimesY) {
+ if (_previousTicket && _lastAddedTicket != _renderQueue.end()) {
+ RenderTicket *origTicket = _previousTicket;
+
+ // Make sure drawSurface WILL start from the correct _lastAddedTicket
+ if (*_lastAddedTicket != origTicket) {
+ RenderQueueIterator it;
+ RenderQueueIterator endIterator = _renderQueue.end();
+ for (it = _renderQueue.begin(); it != endIterator; ++it) {
+ if ((*it) == _previousTicket) {
+ _lastAddedTicket = it;
+ break;
+ }
+ }
+ }
+ Common::Rect srcRect(0, 0, 0, 0);
+ srcRect.setWidth(origTicket->getSrcRect()->width());
+ srcRect.setHeight(origTicket->getSrcRect()->height());
+
+ Common::Rect dstRect = origTicket->_dstRect;
+ int initLeft = dstRect.left;
+ int initRight = dstRect.right;
+
+ for (int i = 0; i < numTimesY; i++) {
+ if (i == 0) {
+ dstRect.translate(offsetX, 0);
+ }
+ for (int j = (i == 0 ? 1 : 0); j < numTimesX; j++) {
+ drawSurface(origTicket->_owner, origTicket->getSurface(), &srcRect, &dstRect, false, false);
+ dstRect.translate(offsetX, 0);
+ }
+ dstRect.left = initLeft;
+ dstRect.right = initRight;
+ dstRect.translate(0, offsetY);
+ }
+ } else {
+ error("Repeat-draw failed (did you forget to draw something before this?)");
+ }
+}
+
void BaseRenderOSystem::invalidateTicket(RenderTicket *renderTicket) {
addDirtyRect(renderTicket->_dstRect);
renderTicket->_isValid = false;
@@ -327,28 +389,31 @@ void BaseRenderOSystem::drawFromTicket(RenderTicket *renderTicket) {
renderTicket->_drawNum = _drawNum++;
_renderQueue.push_back(renderTicket);
addDirtyRect(renderTicket->_dstRect);
+ ++_lastAddedTicket;
} else {
// Before something
- Common::List<RenderTicket *>::iterator pos;
+ RenderQueueIterator pos;
for (pos = _renderQueue.begin(); pos != _renderQueue.end(); pos++) {
if ((*pos)->_drawNum >= _drawNum) {
break;
}
}
_renderQueue.insert(pos, renderTicket);
- Common::List<RenderTicket *>::iterator it;
renderTicket->_drawNum = _drawNum++;
// Increment the following tickets, so they still are in line
+ RenderQueueIterator it;
for (it = pos; it != _renderQueue.end(); ++it) {
(*it)->_drawNum++;
(*it)->_wantsDraw = false;
}
addDirtyRect(renderTicket->_dstRect);
+ _lastAddedTicket = pos;
}
} else {
// Was drawn last round, still in the same order
if (_drawNum == renderTicket->_drawNum) {
_drawNum++;
+ ++_lastAddedTicket;
} else {
// Remove the ticket from the list
RenderQueueIterator it = _renderQueue.begin();
@@ -473,10 +538,10 @@ void BaseRenderOSystem::drawFromSurface(RenderTicket *ticket, Common::Rect *dstR
//////////////////////////////////////////////////////////////////////////
bool BaseRenderOSystem::drawLine(int x1, int y1, int x2, int y2, uint32 color) {
- static bool hasWarned = false; // TODO: Fix this, this only avoids spamming warnings for now.
- if (!_disableDirtyRects && !hasWarned) {
- warning("BaseRenderOSystem::DrawLine - doesn't work for dirty rects yet");
- hasWarned = true;
+ // This function isn't used outside of indicator-displaying, and thus quite unused in
+ // BaseRenderOSystem when dirty-rects are enabled.
+ if (!_disableDirtyRects && !_indicatorDisplay) {
+ error("BaseRenderOSystem::DrawLine - doesn't work for dirty rects yet");
}
byte r = RGBCOLGetR(color);
@@ -583,7 +648,16 @@ void BaseRenderOSystem::endSaveLoad() {
it = _renderQueue.erase(it);
delete ticket;
}
+ _lastAddedTicket = _renderQueue.begin();
+ _previousTicket = nullptr;
+ // HACK: After a save the buffer will be drawn before the scripts get to update it,
+ // so just skip this single frame.
+ _skipThisFrame = true;
_drawNum = 1;
+
+ _renderSurface->fillRect(Common::Rect(0, 0, _renderSurface->h, _renderSurface->w), _renderSurface->format.ARGBToColor(255, 0, 0, 0));
+ g_system->copyRectToScreen((byte *)_renderSurface->pixels, _renderSurface->pitch, 0, 0, _renderSurface->w, _renderSurface->h);
+ g_system->updateScreen();
}
bool BaseRenderOSystem::startSpriteBatch() {
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.h b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
index e79a0cee46..cc2ed57f9b 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.h
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
@@ -44,17 +44,17 @@ public:
Common::String getName() const;
- bool initRenderer(int width, int height, bool windowed);
- bool flip();
+ bool initRenderer(int width, int height, bool windowed) override;
+ bool flip() override;
virtual bool indicatorFlip();
- bool fill(byte r, byte g, byte b, Common::Rect *rect = NULL);
- Graphics::PixelFormat getPixelFormat() const;
- void fade(uint16 alpha);
- void fadeToColor(byte r, byte g, byte b, byte a, Common::Rect *rect = NULL);
+ bool fill(byte r, byte g, byte b, Common::Rect *rect = nullptr) override;
+ Graphics::PixelFormat getPixelFormat() const override;
+ void fade(uint16 alpha) override;
+ void fadeToColor(byte r, byte g, byte b, byte a, Common::Rect *rect = nullptr) override;
- bool drawLine(int x1, int y1, int x2, int y2, uint32 color);
+ bool drawLine(int x1, int y1, int x2, int y2, uint32 color) override;
- BaseImage *takeScreenshot();
+ BaseImage *takeScreenshot() override;
void setAlphaMod(byte alpha);
void setColorMod(byte r, byte g, byte b);
@@ -62,28 +62,29 @@ public:
void invalidateTicketsFromSurface(BaseSurfaceOSystem *surf);
void drawFromTicket(RenderTicket *renderTicket);
- bool setViewport(int left, int top, int right, int bottom);
- bool setViewport(Rect32 *rect) { return BaseRenderer::setViewport(rect); }
- Rect32 getViewPort();
+ bool setViewport(int left, int top, int right, int bottom) override;
+ bool setViewport(Rect32 *rect) override { return BaseRenderer::setViewport(rect); }
+ Rect32 getViewPort() override;
void modTargetRect(Common::Rect *rect);
- void pointFromScreen(Point32 *point);
+ void pointFromScreen(Point32 *point) ;
void pointToScreen(Point32 *point);
- void dumpData(const char *filename);
+ void dumpData(const char *filename) override;
- float getScaleRatioX() const {
+ float getScaleRatioX() const override {
return _ratioX;
}
- float getScaleRatioY() const {
+ float getScaleRatioY() const override {
return _ratioY;
}
- virtual bool startSpriteBatch();
- virtual bool endSpriteBatch();
+ virtual bool startSpriteBatch() override;
+ virtual bool endSpriteBatch() override;
void endSaveLoad();
- void drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY, bool disableAlpha = false);
- BaseSurface *createSurface();
+ void drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY, bool disableAlpha = false) ;
+ void repeatLastDraw(int offsetX, int offsetY, int numTimesX, int numTimesY);
+ BaseSurface *createSurface() override;
private:
- void addDirtyRect(const Common::Rect &rect);
+ void addDirtyRect(const Common::Rect &rect) ;
void drawTickets();
// Non-dirty-rects:
void drawFromSurface(RenderTicket *ticket);
@@ -93,6 +94,7 @@ private:
Common::Rect *_dirtyRect;
Common::List<RenderTicket *> _renderQueue;
RenderQueueIterator _lastAddedTicket;
+ RenderTicket *_previousTicket;
bool _needsFlip;
uint32 _drawNum;
@@ -112,6 +114,8 @@ private:
float _ratioY;
uint32 _colorMod;
uint32 _clearColor;
+
+ bool _skipThisFrame;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
index bee876bb65..e3e4884fbb 100644
--- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
@@ -47,9 +47,9 @@ namespace Wintermute {
//////////////////////////////////////////////////////////////////////////
BaseSurfaceOSystem::BaseSurfaceOSystem(BaseGame *inGame) : BaseSurface(inGame) {
_surface = new Graphics::Surface();
- _alphaMask = NULL;
+ _alphaMask = nullptr;
_hasAlpha = true;
- _lockPixels = NULL;
+ _lockPixels = nullptr;
_lockPitch = 0;
_loaded = false;
}
@@ -59,11 +59,11 @@ BaseSurfaceOSystem::~BaseSurfaceOSystem() {
if (_surface) {
_surface->free();
delete _surface;
- _surface = NULL;
+ _surface = nullptr;
}
delete[] _alphaMask;
- _alphaMask = NULL;
+ _alphaMask = nullptr;
_gameRef->addMem(-_width * _height * 4);
BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
@@ -140,23 +140,32 @@ bool BaseSurfaceOSystem::finishLoad() {
// Well, actually, we don't convert via 24-bit as the color-key application overwrites the Alpha-channel anyhow.
_surface->free();
delete _surface;
+
+ bool needsColorKey = false;
+ bool replaceAlpha = true;
if (_filename.hasSuffix(".bmp") && image->getSurface()->format.bytesPerPixel == 4) {
_surface = image->getSurface()->convertTo(g_system->getScreenFormat(), image->getPalette());
- TransparentSurface trans(*_surface);
- trans.applyColorKey(_ckRed, _ckGreen, _ckBlue);
+ needsColorKey = true;
+ replaceAlpha = false;
} else if (image->getSurface()->format.bytesPerPixel == 1 && image->getPalette()) {
_surface = image->getSurface()->convertTo(g_system->getScreenFormat(), image->getPalette());
- TransparentSurface trans(*_surface);
- trans.applyColorKey(_ckRed, _ckGreen, _ckBlue, true);
+ needsColorKey = true;
} else if (image->getSurface()->format.bytesPerPixel >= 3 && image->getSurface()->format != g_system->getScreenFormat()) {
_surface = image->getSurface()->convertTo(g_system->getScreenFormat());
if (image->getSurface()->format.bytesPerPixel == 3) {
- TransparentSurface trans(*_surface);
- trans.applyColorKey(_ckRed, _ckGreen, _ckBlue, true);
+ needsColorKey = true;
}
} else {
_surface = new Graphics::Surface();
_surface->copyFrom(*image->getSurface());
+ if (_surface->format.aBits() == 0) {
+ needsColorKey = true;
+ }
+ }
+
+ if (needsColorKey) {
+ TransparentSurface trans(*_surface);
+ trans.applyColorKey(_ckRed, _ckGreen, _ckBlue, replaceAlpha);
}
_hasAlpha = hasTransparency(_surface);
@@ -177,7 +186,7 @@ void BaseSurfaceOSystem::genAlphaMask(Graphics::Surface *surface) {
return;
// TODO: Reimplement this
delete[] _alphaMask;
- _alphaMask = NULL;
+ _alphaMask = nullptr;
if (!surface) {
return;
}
@@ -214,7 +223,7 @@ void BaseSurfaceOSystem::genAlphaMask(Graphics::Surface *surface) {
if (!hasTransparency) {
delete[] _alphaMask;
- _alphaMask = NULL;
+ _alphaMask = nullptr;
}
}
@@ -293,7 +302,7 @@ bool BaseSurfaceOSystem::isTransparentAtLite(int x, int y) {
//////////////////////////////////////////////////////////////////////////
bool BaseSurfaceOSystem::startPixelOp() {
- //SDL_LockTexture(_texture, NULL, &_lockPixels, &_lockPitch);
+ //SDL_LockTexture(_texture, nullptr, &_lockPixels, &_lockPitch);
// Any pixel-op makes the caching useless:
BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
renderer->invalidateTicketsFromSurface(this);
@@ -414,6 +423,12 @@ bool BaseSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, float zoomX, flo
return STATUS_OK;
}
+bool BaseSurfaceOSystem::repeatLastDisplayOp(int offsetX, int offsetY, int numTimesX, int numTimesY) {
+ BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
+ renderer->repeatLastDraw(offsetX, offsetY, numTimesX, numTimesY);
+ return STATUS_OK;
+}
+
bool BaseSurfaceOSystem::putSurface(const Graphics::Surface &surface, bool hasAlpha) {
_loaded = true;
_surface->free();
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h
index 43422ef4e7..9091ec65b1 100644
--- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h
+++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h
@@ -41,27 +41,28 @@ public:
BaseSurfaceOSystem(BaseGame *inGame);
~BaseSurfaceOSystem();
- bool create(const Common::String &filename, bool defaultCK, byte ckRed, byte ckGreen, byte ckBlue, int lifeTime = -1, bool keepLoaded = false);
- bool create(int width, int height);
+ bool create(const Common::String &filename, bool defaultCK, byte ckRed, byte ckGreen, byte ckBlue, int lifeTime = -1, bool keepLoaded = false) override;
+ bool create(int width, int height) override;
- bool isTransparentAt(int x, int y);
- bool isTransparentAtLite(int x, int y);
+ bool isTransparentAt(int x, int y) override;
+ bool isTransparentAtLite(int x, int y) override;
- bool startPixelOp();
- bool endPixelOp();
+ bool startPixelOp() override;
+ bool endPixelOp() override;
- 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);
- bool displayTrans(int x, int y, Rect32 rect, uint32 alpha = 0xFFFFFFFF, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false);
- 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);
- bool display(int x, int y, Rect32 rect, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false);
- 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);
- bool displayTransform(int x, int y, int hotX, int hotY, Rect32 Rect, float zoomX, float zoomY, uint32 alpha, float rotate, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false);
- virtual bool putSurface(const Graphics::Surface &surface, bool hasAlpha = false);
+ 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) override;
+ bool displayTrans(int x, int y, Rect32 rect, uint32 alpha = 0xFFFFFFFF, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) override;
+ 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) 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 = 0xFFFFFFFF, bool transparent = false, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) override;
+ bool displayTransform(int x, int y, int hotX, int hotY, Rect32 Rect, float zoomX, float zoomY, uint32 alpha, float rotate, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) override;
+ bool repeatLastDisplayOp(int offsetX, int offsetY, int numTimesX, int numTimesY) override;
+ 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);
static int DLL_CALLCONV SeekProc(fi_handle handle, long offset, int origin);
static long DLL_CALLCONV TellProc(fi_handle handle);*/
- virtual int getWidth() {
+ virtual int getWidth() override {
if (!_loaded) {
finishLoad();
}
@@ -70,7 +71,7 @@ public:
}
return _width;
}
- virtual int getHeight() {
+ virtual int getHeight() override {
if (!_loaded) {
finishLoad();
}
diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.cpp b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
index 174f54e315..d253ddca4b 100644
--- a/engines/wintermute/base/gfx/osystem/render_ticket.cpp
+++ b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
@@ -59,7 +59,7 @@ _srcRect(*srcRect), _dstRect(*dstRect), _drawNum(0), _isValid(true), _wantsDraw(
_surface = temp;
}
} else {
- _surface = NULL;
+ _surface = nullptr;
}
}
diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.h b/engines/wintermute/base/gfx/osystem/render_ticket.h
index 19637a23d0..968b42b5e1 100644
--- a/engines/wintermute/base/gfx/osystem/render_ticket.h
+++ b/engines/wintermute/base/gfx/osystem/render_ticket.h
@@ -56,6 +56,7 @@ public:
BaseSurfaceOSystem *_owner;
bool operator==(RenderTicket &a);
+ const Common::Rect *getSrcRect() { return &_srcRect; }
private:
Graphics::Surface *_surface;
Common::Rect _srcRect;
diff --git a/engines/wintermute/base/particles/part_emitter.cpp b/engines/wintermute/base/particles/part_emitter.cpp
index e1bc659fdd..1026969055 100644
--- a/engines/wintermute/base/particles/part_emitter.cpp
+++ b/engines/wintermute/base/particles/part_emitter.cpp
@@ -88,7 +88,7 @@ PartEmitter::PartEmitter(BaseGame *inGame, BaseScriptHolder *owner) : BaseObject
_useRegion = false;
- _emitEvent = NULL;
+ _emitEvent = nullptr;
_owner = owner;
}
@@ -112,7 +112,7 @@ PartEmitter::~PartEmitter(void) {
_sprites.clear();
delete[] _emitEvent;
- _emitEvent = NULL;
+ _emitEvent = nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -325,7 +325,7 @@ bool PartEmitter::display(BaseRegion *region) {
}
for (uint32 i = 0; i < _particles.size(); i++) {
- if (region != NULL && _useRegion) {
+ if (region != nullptr && _useRegion) {
if (!region->pointInRegion((int)_particles[i]->_pos.x, (int)_particles[i]->_pos.y)) {
continue;
}
@@ -402,7 +402,7 @@ bool PartEmitter::setBorderThickness(int thicknessLeft, int thicknessRight, int
//////////////////////////////////////////////////////////////////////////
PartForce *PartEmitter::addForceByName(const Common::String &name) {
- PartForce *force = NULL;
+ PartForce *force = nullptr;
for (uint32 i = 0; i < _forces.size(); i++) {
if (scumm_stricmp(name.c_str(), _forces[i]->getName()) == 0) {
@@ -1133,7 +1133,7 @@ bool PartEmitter::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "EmitEvent") == 0) {
delete[] _emitEvent;
- _emitEvent = NULL;
+ _emitEvent = nullptr;
if (!value->isNULL()) {
BaseUtils::setString(&_emitEvent, value->getString());
}
diff --git a/engines/wintermute/base/particles/part_emitter.h b/engines/wintermute/base/particles/part_emitter.h
index 3aa55e1ac8..54a49df230 100644
--- a/engines/wintermute/base/particles/part_emitter.h
+++ b/engines/wintermute/base/particles/part_emitter.h
@@ -48,7 +48,7 @@ public:
bool start();
bool update();
- bool display() { return display(NULL); } // To avoid shadowing the inherited display-function.
+ bool display() { return display(nullptr); } // To avoid shadowing the inherited display-function.
bool display(BaseRegion *region);
bool sortParticlesByZ();
diff --git a/engines/wintermute/base/particles/part_particle.cpp b/engines/wintermute/base/particles/part_particle.cpp
index 0b850d9618..f1aba114de 100644
--- a/engines/wintermute/base/particles/part_particle.cpp
+++ b/engines/wintermute/base/particles/part_particle.cpp
@@ -41,7 +41,7 @@ PartParticle::PartParticle(BaseGame *inGame) : BaseClass(inGame) {
_posZ = 0.0f;
_velocity = Vector2(0.0f, 0.0f);
_scale = 100.0f;
- _sprite = NULL;
+ _sprite = nullptr;
_creationTime = 0;
_lifeTime = 0;
_isDead = true;
@@ -65,7 +65,7 @@ PartParticle::PartParticle(BaseGame *inGame) : BaseClass(inGame) {
//////////////////////////////////////////////////////////////////////////
PartParticle::~PartParticle(void) {
delete _sprite;
- _sprite = NULL;
+ _sprite = nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -76,7 +76,7 @@ bool PartParticle::setSprite(const Common::String &filename) {
}
delete _sprite;
- _sprite = NULL;
+ _sprite = nullptr;
SystemClassRegistry::getInstance()->_disabled = true;
_sprite = new BaseSprite(_gameRef, (BaseObject*)_gameRef);
@@ -85,7 +85,7 @@ bool PartParticle::setSprite(const Common::String &filename) {
return STATUS_OK;
} else {
delete _sprite;
- _sprite = NULL;
+ _sprite = nullptr;
SystemClassRegistry::getInstance()->_disabled = false;
return STATUS_FAILED;
}
@@ -199,7 +199,7 @@ bool PartParticle::display(PartEmitter *emitter) {
_sprite->getCurrentFrame();
return _sprite->display((int)_pos.x, (int)_pos.y,
- NULL,
+ nullptr,
_scale, _scale,
BYTETORGBA(255, 255, 255, _currentAlpha),
_rotation,
@@ -260,7 +260,7 @@ bool PartParticle::persist(BasePersistenceManager *persistMgr) {
setSprite(filename);
SystemClassRegistry::getInstance()->_disabled = false;
delete[] filename;
- filename = NULL;
+ filename = nullptr;
}
return STATUS_OK;
diff --git a/engines/wintermute/base/saveload.cpp b/engines/wintermute/base/saveload.cpp
index 12204e1b35..465684a7a3 100644
--- a/engines/wintermute/base/saveload.cpp
+++ b/engines/wintermute/base/saveload.cpp
@@ -78,7 +78,7 @@ bool SaveLoad::loadGame(const Common::String &filename, BaseGame *gameRef) {
//_gameRef->LOG(0, "Load end %d", BaseUtils::GetUsedMemMB());
// AdGame:
if (DID_SUCCEED(ret)) {
- SystemClassRegistry::getInstance()->enumInstances(SaveLoad::afterLoadRegion, "AdRegion", NULL);
+ SystemClassRegistry::getInstance()->enumInstances(SaveLoad::afterLoadRegion, "AdRegion", nullptr);
}
return ret;
}
@@ -114,13 +114,13 @@ bool SaveLoad::saveGame(int slot, const char *desc, bool quickSave, BaseGame *ga
//////////////////////////////////////////////////////////////////////////
bool SaveLoad::initAfterLoad() {
- SystemClassRegistry::getInstance()->enumInstances(afterLoadRegion, "BaseRegion", NULL);
- SystemClassRegistry::getInstance()->enumInstances(afterLoadSubFrame, "BaseSubFrame", NULL);
- SystemClassRegistry::getInstance()->enumInstances(afterLoadSound, "BaseSound", NULL);
- SystemClassRegistry::getInstance()->enumInstances(afterLoadFont, "BaseFontTT", NULL);
- SystemClassRegistry::getInstance()->enumInstances(afterLoadScript, "ScScript", NULL);
+ SystemClassRegistry::getInstance()->enumInstances(afterLoadRegion, "BaseRegion", nullptr);
+ SystemClassRegistry::getInstance()->enumInstances(afterLoadSubFrame, "BaseSubFrame", nullptr);
+ SystemClassRegistry::getInstance()->enumInstances(afterLoadSound, "BaseSound", nullptr);
+ SystemClassRegistry::getInstance()->enumInstances(afterLoadFont, "BaseFontTT", nullptr);
+ SystemClassRegistry::getInstance()->enumInstances(afterLoadScript, "ScScript", nullptr);
// AdGame:
- SystemClassRegistry::getInstance()->enumInstances(afterLoadScene, "AdScene", NULL);
+ SystemClassRegistry::getInstance()->enumInstances(afterLoadScene, "AdScene", nullptr);
return STATUS_OK;
}
diff --git a/engines/wintermute/base/scriptables/script.cpp b/engines/wintermute/base/scriptables/script.cpp
index 54d0a9cdc7..23c452b73c 100644
--- a/engines/wintermute/base/scriptables/script.cpp
+++ b/engines/wintermute/base/scriptables/script.cpp
@@ -39,58 +39,58 @@ IMPLEMENT_PERSISTENT(ScScript, false)
//////////////////////////////////////////////////////////////////////////
ScScript::ScScript(BaseGame *inGame, ScEngine *engine) : BaseClass(inGame) {
- _buffer = NULL;
+ _buffer = nullptr;
_bufferSize = _iP = 0;
- _scriptStream = NULL;
- _filename = NULL;
+ _scriptStream = nullptr;
+ _filename = nullptr;
_currentLine = 0;
- _symbols = NULL;
+ _symbols = nullptr;
_numSymbols = 0;
_engine = engine;
- _globals = NULL;
+ _globals = nullptr;
- _scopeStack = NULL;
- _callStack = NULL;
- _thisStack = NULL;
- _stack = NULL;
+ _scopeStack = nullptr;
+ _callStack = nullptr;
+ _thisStack = nullptr;
+ _stack = nullptr;
- _operand = NULL;
- _reg1 = NULL;
+ _operand = nullptr;
+ _reg1 = nullptr;
- _functions = NULL;
+ _functions = nullptr;
_numFunctions = 0;
- _methods = NULL;
+ _methods = nullptr;
_numMethods = 0;
- _events = NULL;
+ _events = nullptr;
_numEvents = 0;
- _externals = NULL;
+ _externals = nullptr;
_numExternals = 0;
_state = SCRIPT_FINISHED;
_origState = SCRIPT_FINISHED;
- _waitObject = NULL;
+ _waitObject = nullptr;
_waitTime = 0;
_waitFrozen = false;
- _waitScript = NULL;
+ _waitScript = nullptr;
_timeSlice = 0;
_thread = false;
_methodThread = false;
- _threadEvent = NULL;
+ _threadEvent = nullptr;
_freezable = true;
- _owner = NULL;
+ _owner = nullptr;
_unbreakable = false;
- _parentScript = NULL;
+ _parentScript = nullptr;
_tracingMode = false;
}
@@ -242,7 +242,7 @@ bool ScScript::create(const char *filename, byte *buffer, uint32 size, BaseScrip
_methodThread = false;
delete[] _threadEvent;
- _threadEvent = NULL;
+ _threadEvent = nullptr;
_filename = new char[strlen(filename) + 1];
if (_filename) {
@@ -383,52 +383,52 @@ void ScScript::cleanup() {
if (_buffer) {
delete[] _buffer;
}
- _buffer = NULL;
+ _buffer = nullptr;
if (_filename) {
delete[] _filename;
}
- _filename = NULL;
+ _filename = nullptr;
if (_symbols) {
delete[] _symbols;
}
- _symbols = NULL;
+ _symbols = nullptr;
_numSymbols = 0;
if (_globals && !_thread) {
delete _globals;
}
- _globals = NULL;
+ _globals = nullptr;
delete _scopeStack;
- _scopeStack = NULL;
+ _scopeStack = nullptr;
delete _callStack;
- _callStack = NULL;
+ _callStack = nullptr;
delete _thisStack;
- _thisStack = NULL;
+ _thisStack = nullptr;
delete _stack;
- _stack = NULL;
+ _stack = nullptr;
if (_functions) {
delete[] _functions;
}
- _functions = NULL;
+ _functions = nullptr;
_numFunctions = 0;
if (_methods) {
delete[] _methods;
}
- _methods = NULL;
+ _methods = nullptr;
_numMethods = 0;
if (_events) {
delete[] _events;
}
- _events = NULL;
+ _events = nullptr;
_numEvents = 0;
@@ -440,25 +440,25 @@ void ScScript::cleanup() {
}
delete[] _externals;
}
- _externals = NULL;
+ _externals = nullptr;
_numExternals = 0;
delete _operand;
delete _reg1;
- _operand = NULL;
- _reg1 = NULL;
+ _operand = nullptr;
+ _reg1 = nullptr;
delete[] _threadEvent;
- _threadEvent = NULL;
+ _threadEvent = nullptr;
_state = SCRIPT_FINISHED;
- _waitObject = NULL;
+ _waitObject = nullptr;
_waitTime = 0;
_waitFrozen = false;
- _waitScript = NULL;
+ _waitScript = nullptr;
- _parentScript = NULL; // ref only
+ _parentScript = nullptr; // ref only
delete _scriptStream;
}
@@ -511,7 +511,7 @@ bool ScScript::executeInstruction() {
bool ret = STATUS_OK;
uint32 dw;
- const char *str = NULL;
+ const char *str = nullptr;
//ScValue* op = new ScValue(_gameRef);
_operand->cleanup();
@@ -622,11 +622,11 @@ bool ScScript::executeInstruction() {
}
/*
ScValue* val = var->getProp(MethodName);
- if (val){
+ if (val) {
dw = GetFuncPos(val->getString());
- if (dw==0){
+ if (dw==0) {
TExternalFunction* f = GetExternal(val->getString());
- if (f){
+ if (f) {
ExternalCall(_stack, _thisStack, f);
}
else{
@@ -787,7 +787,7 @@ bool ScScript::executeInstruction() {
ScValue *var = _stack->pop();
ScValue *val = _stack->pop();
- if (val == NULL) {
+ if (val == nullptr) {
runtimeError("Script stack corruption detected. Please report this script at WME bug reports forum.");
var->setNULL();
} else {
@@ -928,7 +928,7 @@ bool ScScript::executeInstruction() {
case II_AND:
op2 = _stack->pop();
op1 = _stack->pop();
- if (op1 == NULL || op2 == NULL) {
+ if (op1 == nullptr || op2 == nullptr) {
runtimeError("Script corruption detected. Did you use '=' instead of '==' for comparison?");
_operand->setBool(false);
} else {
@@ -940,7 +940,7 @@ bool ScScript::executeInstruction() {
case II_OR:
op2 = _stack->pop();
op1 = _stack->pop();
- if (op1 == NULL || op2 == NULL) {
+ if (op1 == nullptr || op2 == nullptr) {
runtimeError("Script corruption detected. Did you use '=' instead of '==' for comparison?");
_operand->setBool(false);
} else {
@@ -955,13 +955,13 @@ bool ScScript::executeInstruction() {
/*
if ((op1->isNULL() && !op2->isNULL()) || (!op1->isNULL() && op2->isNULL())) _operand->setBool(false);
- else if (op1->isNative() && op2->isNative()){
+ else if (op1->isNative() && op2->isNative()) {
_operand->setBool(op1->getNative() == op2->getNative());
}
- else if (op1->getType()==VAL_STRING || op2->getType()==VAL_STRING){
+ else if (op1->getType()==VAL_STRING || op2->getType()==VAL_STRING) {
_operand->setBool(scumm_stricmp(op1->getString(), op2->getString())==0);
}
- else if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ else if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT) {
_operand->setBool(op1->getFloat() == op2->getFloat());
}
else{
@@ -979,13 +979,13 @@ bool ScScript::executeInstruction() {
/*
if ((op1->isNULL() && !op2->isNULL()) || (!op1->isNULL() && op2->isNULL())) _operand->setBool(true);
- else if (op1->isNative() && op2->isNative()){
+ else if (op1->isNative() && op2->isNative()) {
_operand->setBool(op1->getNative() != op2->getNative());
}
- else if (op1->getType()==VAL_STRING || op2->getType()==VAL_STRING){
+ else if (op1->getType()==VAL_STRING || op2->getType()==VAL_STRING) {
_operand->setBool(scumm_stricmp(op1->getString(), op2->getString())!=0);
}
- else if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ else if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT) {
_operand->setBool(op1->getFloat() != op2->getFloat());
}
else{
@@ -1002,7 +1002,7 @@ bool ScScript::executeInstruction() {
op1 = _stack->pop();
/*
- if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT) {
_operand->setBool(op1->getFloat() < op2->getFloat());
}
else _operand->setBool(op1->getInt() < op2->getInt());
@@ -1017,7 +1017,7 @@ bool ScScript::executeInstruction() {
op1 = _stack->pop();
/*
- if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT) {
_operand->setBool(op1->getFloat() > op2->getFloat());
}
else _operand->setBool(op1->getInt() > op2->getInt());
@@ -1032,7 +1032,7 @@ bool ScScript::executeInstruction() {
op1 = _stack->pop();
/*
- if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT) {
_operand->setBool(op1->getFloat() <= op2->getFloat());
}
else _operand->setBool(op1->getInt() <= op2->getInt());
@@ -1047,7 +1047,7 @@ bool ScScript::executeInstruction() {
op1 = _stack->pop();
/*
- if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT) {
_operand->setBool(op1->getFloat() >= op2->getFloat());
}
else _operand->setBool(op1->getInt() >= op2->getInt());
@@ -1120,7 +1120,7 @@ uint32 ScScript::getMethodPos(const Common::String &name) const {
//////////////////////////////////////////////////////////////////////////
ScValue *ScScript::getVar(char *name) {
- ScValue *ret = NULL;
+ ScValue *ret = nullptr;
// scope locals
if (_scopeStack->_sP >= 0) {
@@ -1130,20 +1130,20 @@ ScValue *ScScript::getVar(char *name) {
}
// script globals
- if (ret == NULL) {
+ if (ret == nullptr) {
if (_globals->propExists(name)) {
ret = _globals->getProp(name);
}
}
// engine globals
- if (ret == NULL) {
+ if (ret == nullptr) {
if (_engine->_globals->propExists(name)) {
ret = _engine->_globals->getProp(name);
}
}
- if (ret == NULL) {
+ if (ret == nullptr) {
//RuntimeError("Variable '%s' is inaccessible in the current block. Consider changing the script.", name);
_gameRef->LOG(0, "Warning: variable '%s' is inaccessible in the current block. Consider changing the script (script:%s, line:%d)", name, _filename, _currentLine);
ScValue *val = new ScValue(_gameRef);
@@ -1263,8 +1263,8 @@ bool ScScript::persist(BasePersistenceManager *persistMgr) {
_scriptStream = new Common::MemoryReadStream(_buffer, _bufferSize);
initTables();
} else {
- _buffer = NULL;
- _scriptStream = NULL;
+ _buffer = nullptr;
+ _scriptStream = nullptr;
}
}
@@ -1306,11 +1306,11 @@ bool ScScript::persist(BasePersistenceManager *persistMgr) {
//////////////////////////////////////////////////////////////////////////
ScScript *ScScript::invokeEventHandler(const Common::String &eventName, bool unbreakable) {
- //if (_state!=SCRIPT_PERSISTENT) return NULL;
+ //if (_state!=SCRIPT_PERSISTENT) return nullptr;
uint32 pos = getEventPos(eventName);
if (!pos) {
- return NULL;
+ return nullptr;
}
ScScript *thread = new ScScript(_gameRef, _engine);
@@ -1322,10 +1322,10 @@ ScScript *ScScript::invokeEventHandler(const Common::String &eventName, bool unb
return thread;
} else {
delete thread;
- return NULL;
+ return nullptr;
}
} else {
- return NULL;
+ return nullptr;
}
}
@@ -1390,7 +1390,7 @@ ScScript::TExternalFunction *ScScript::getExternal(char *name) {
return &_externals[i];
}
}
- return NULL;
+ return nullptr;
}
@@ -1446,7 +1446,7 @@ const char *ScScript::dbgGetFilename() {
//////////////////////////////////////////////////////////////////////////
void ScScript::afterLoad() {
- if (_buffer == NULL) {
+ if (_buffer == nullptr) {
byte *buffer = _engine->getCompiledScript(_filename, &_bufferSize);
if (!buffer) {
_gameRef->LOG(0, "Error reinitializing script '%s' after load. Script will be terminated.", _filename);
diff --git a/engines/wintermute/base/scriptables/script_engine.cpp b/engines/wintermute/base/scriptables/script_engine.cpp
index e8be0f0bd5..d5c5797a39 100644
--- a/engines/wintermute/base/scriptables/script_engine.cpp
+++ b/engines/wintermute/base/scriptables/script_engine.cpp
@@ -69,10 +69,10 @@ ScEngine::ScEngine(BaseGame *inGame) : BaseClass(inGame) {
// prepare script cache
for (int i = 0; i < MAX_CACHED_SCRIPTS; i++) {
- _cachedScripts[i] = NULL;
+ _cachedScripts[i] = nullptr;
}
- _currentScript = NULL;
+ _currentScript = nullptr;
_isProfiling = false;
_profilingStartTime = 0;
@@ -105,11 +105,11 @@ bool ScEngine::cleanup() {
_scripts.clear();
delete _globals;
- _globals = NULL;
+ _globals = nullptr;
emptyScriptCache();
- _currentScript = NULL; // ref only
+ _currentScript = nullptr; // ref only
return STATUS_OK;
}
@@ -140,7 +140,7 @@ ScScript *ScEngine::runScript(const char *filename, BaseScriptHolder *owner) {
// get script from cache
compBuffer = getCompiledScript(filename, &compSize);
if (!compBuffer) {
- return NULL;
+ return nullptr;
}
// add new script
@@ -149,7 +149,7 @@ ScScript *ScEngine::runScript(const char *filename, BaseScriptHolder *owner) {
if (DID_FAIL(ret)) {
_gameRef->LOG(ret, "Error running script '%s'...", filename);
delete script;
- return NULL;
+ return nullptr;
} else {
// publish the "self" pseudo-variable
ScValue val(_gameRef);
@@ -191,7 +191,7 @@ byte *ScEngine::getCompiledScript(const char *filename, uint32 *outSize, bool ig
byte *buffer = BaseEngine::instance().getFileManager()->readWholeFile(filename, &size);
if (!buffer) {
_gameRef->LOG(0, "ScEngine::GetCompiledScript - error opening script '%s'", filename);
- return NULL;
+ return nullptr;
}
// needs to be compiled?
@@ -202,14 +202,14 @@ byte *ScEngine::getCompiledScript(const char *filename, uint32 *outSize, bool ig
if (!_compilerAvailable) {
_gameRef->LOG(0, "ScEngine::GetCompiledScript - script '%s' needs to be compiled but compiler is not available", filename);
delete[] buffer;
- return NULL;
+ return nullptr;
}
// This code will never be called, since _compilerAvailable is const false.
// It's only here in the event someone would want to reinclude the compiler.
error("Script needs compilation, ScummVM does not contain a WME compiler");
}
- byte *ret = NULL;
+ byte *ret = nullptr;
// add script to cache
CScCachedScript *cachedScript = new CScCachedScript(filename, compBuffer, compSize);
@@ -217,7 +217,7 @@ byte *ScEngine::getCompiledScript(const char *filename, uint32 *outSize, bool ig
int index = 0;
uint32 minTime = g_system->getMillis();
for (int i = 0; i < MAX_CACHED_SCRIPTS; i++) {
- if (_cachedScripts[i] == NULL) {
+ if (_cachedScripts[i] == nullptr) {
index = i;
break;
} else if (_cachedScripts[i]->_timestamp <= minTime) {
@@ -226,7 +226,7 @@ byte *ScEngine::getCompiledScript(const char *filename, uint32 *outSize, bool ig
}
}
- if (_cachedScripts[index] != NULL) {
+ if (_cachedScripts[index] != nullptr) {
delete _cachedScripts[index];
}
_cachedScripts[index] = cachedScript;
@@ -296,7 +296,7 @@ bool ScEngine::tick() {
if (!isValidScript(_scripts[i]->_waitScript) || _scripts[i]->_waitScript->_state == SCRIPT_ERROR) {
// fake return value
_scripts[i]->_stack->pushNULL();
- _scripts[i]->_waitScript = NULL;
+ _scripts[i]->_waitScript = nullptr;
_scripts[i]->run();
} else {
if (_scripts[i]->_waitScript->_state == SCRIPT_THREAD_FINISHED) {
@@ -304,7 +304,7 @@ bool ScEngine::tick() {
_scripts[i]->_stack->push(_scripts[i]->_waitScript->_stack->pop());
_scripts[i]->run();
_scripts[i]->_waitScript->finish();
- _scripts[i]->_waitScript = NULL;
+ _scripts[i]->_waitScript = nullptr;
}
}
break;
@@ -351,7 +351,7 @@ bool ScEngine::tick() {
addScriptTime(_scripts[i]->_filename, g_system->getMillis() - startTime);
}
}
- _currentScript = NULL;
+ _currentScript = nullptr;
}
removeFinishedScripts();
@@ -373,7 +373,7 @@ bool ScEngine::tickUnbreakable() {
_scripts[i]->executeInstruction();
}
_scripts[i]->finish();
- _currentScript = NULL;
+ _currentScript = nullptr;
}
removeFinishedScripts();
@@ -444,7 +444,7 @@ bool ScEngine::emptyScriptCache() {
for (int i = 0; i < MAX_CACHED_SCRIPTS; i++) {
if (_cachedScripts[i]) {
delete _cachedScripts[i];
- _cachedScripts[i] = NULL;
+ _cachedScripts[i] = nullptr;
}
}
return STATUS_OK;
@@ -496,7 +496,7 @@ bool ScEngine::persist(BasePersistenceManager *persistMgr) {
//////////////////////////////////////////////////////////////////////////
void ScEngine::editorCleanup() {
for (uint32 i = 0; i < _scripts.size(); i++) {
- if (_scripts[i]->_owner == NULL && (_scripts[i]->_state == SCRIPT_FINISHED || _scripts[i]->_state == SCRIPT_ERROR)) {
+ if (_scripts[i]->_owner == nullptr && (_scripts[i]->_state == SCRIPT_FINISHED || _scripts[i]->_state == SCRIPT_ERROR)) {
delete _scripts[i];
_scripts.remove_at(i);
i--;
diff --git a/engines/wintermute/base/scriptables/script_engine.h b/engines/wintermute/base/scriptables/script_engine.h
index 1a023326eb..639875ffb6 100644
--- a/engines/wintermute/base/scriptables/script_engine.h
+++ b/engines/wintermute/base/scriptables/script_engine.h
@@ -96,10 +96,10 @@ public:
byte *getCompiledScript(const char *filename, uint32 *outSize, bool ignoreCache = false);
DECLARE_PERSISTENT(ScEngine, BaseClass)
bool cleanup();
- int getNumScripts(int *running = NULL, int *waiting = NULL, int *persistent = NULL);
+ int getNumScripts(int *running = nullptr, int *waiting = nullptr, int *persistent = nullptr);
bool tick();
ScValue *_globals;
- ScScript *runScript(const char *filename, BaseScriptHolder *owner = NULL);
+ ScScript *runScript(const char *filename, BaseScriptHolder *owner = nullptr);
static const bool _compilerAvailable = false;
ScEngine(BaseGame *inGame);
diff --git a/engines/wintermute/base/scriptables/script_ext_array.cpp b/engines/wintermute/base/scriptables/script_ext_array.cpp
index 613cbd0758..892d0674ff 100644
--- a/engines/wintermute/base/scriptables/script_ext_array.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_array.cpp
@@ -69,7 +69,7 @@ SXArray::SXArray(BaseGame *inGame) : BaseScriptable(inGame) {
//////////////////////////////////////////////////////////////////////////
SXArray::~SXArray() {
delete _values;
- _values = NULL;
+ _values = nullptr;
}
diff --git a/engines/wintermute/base/scriptables/script_ext_date.cpp b/engines/wintermute/base/scriptables/script_ext_date.cpp
index 5aa069d0b2..53a1d36b81 100644
--- a/engines/wintermute/base/scriptables/script_ext_date.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_date.cpp
@@ -224,7 +224,7 @@ bool SXDate::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
// Name
//////////////////////////////////////////////////////////////////////////
- if (name == "Name")==0){
+ if (name == "Name")==0) {
setName(value->getString());
return STATUS_OK;
}
diff --git a/engines/wintermute/base/scriptables/script_ext_file.cpp b/engines/wintermute/base/scriptables/script_ext_file.cpp
index a1d39c5d0a..29e032a759 100644
--- a/engines/wintermute/base/scriptables/script_ext_file.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_file.cpp
@@ -52,13 +52,13 @@ SXFile::SXFile(BaseGame *inGame, ScStack *stack) : BaseScriptable(inGame) {
stack->correctParams(1);
ScValue *val = stack->pop();
- _filename = NULL;
+ _filename = nullptr;
if (!val->isNULL()) {
BaseUtils::setString(&_filename, val->getString());
}
- _readFile = NULL;
- _writeFile = NULL;
+ _readFile = nullptr;
+ _writeFile = nullptr;
_mode = 0;
_textMode = false;
@@ -73,7 +73,7 @@ SXFile::~SXFile() {
//////////////////////////////////////////////////////////////////////////
void SXFile::cleanup() {
delete[] _filename;
- _filename = NULL;
+ _filename = nullptr;
close();
}
@@ -82,12 +82,12 @@ void SXFile::cleanup() {
void SXFile::close() {
if (_readFile) {
BaseFileManager::getEngineInstance()->closeFile(_readFile);
- _readFile = NULL;
+ _readFile = nullptr;
}
if (_writeFile) {
_writeFile->finalize();
delete _writeFile;
- _writeFile = NULL;
+ _writeFile = nullptr;
}
_mode = 0;
_textMode = false;
@@ -701,13 +701,13 @@ bool SXFile::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
// Length
//////////////////////////////////////////////////////////////////////////
- if (strcmp(name, "Length")==0){
+ if (strcmp(name, "Length")==0) {
int origLength = _length;
_length = max(value->getInt(0), 0);
char propName[20];
- if (_length < OrigLength){
- for(int i=_length; i<OrigLength; i++){
+ if (_length < OrigLength) {
+ for(int i=_length; i<OrigLength; i++) {
sprintf(PropName, "%d", i);
_values->DeleteProp(PropName);
}
@@ -778,8 +778,8 @@ bool SXFile::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(pos));
// try to re-open file if needed
- _writeFile = NULL;
- _readFile = NULL;
+ _writeFile = nullptr;
+ _readFile = nullptr;
if (_mode != 0) {
// open for reading
diff --git a/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp b/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp
index 8f05b7bff6..9de9905fea 100644
--- a/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp
@@ -44,7 +44,7 @@ BaseScriptable *makeSXMemBuffer(BaseGame *inGame, ScStack *stack) {
//////////////////////////////////////////////////////////////////////////
SXMemBuffer::SXMemBuffer(BaseGame *inGame, ScStack *stack) : BaseScriptable(inGame) {
stack->correctParams(1);
- _buffer = NULL;
+ _buffer = nullptr;
_size = 0;
int newSize = stack->pop()->getInt();
@@ -73,7 +73,7 @@ void SXMemBuffer::cleanup() {
if (_size) {
free(_buffer);
}
- _buffer = NULL;
+ _buffer = nullptr;
_size = 0;
}
@@ -109,7 +109,7 @@ bool SXMemBuffer::resize(int newSize) {
//////////////////////////////////////////////////////////////////////////
bool SXMemBuffer::checkBounds(ScScript *script, int start, int length) {
- if (_buffer == NULL) {
+ if (_buffer == nullptr) {
script->runtimeError("Cannot use Set/Get methods on an uninitialized memory buffer");
return false;
}
@@ -476,15 +476,15 @@ bool SXMemBuffer::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
// Length
//////////////////////////////////////////////////////////////////////////
- if (strcmp(name, "Length")==0){
+ if (strcmp(name, "Length")==0) {
int origLength = _length;
_length = max(value->getInt(0), 0);
char propName[20];
- if (_length < OrigLength){
- for(int i=_length; i<OrigLength; i++){
- sprintf(PropName, "%d", i);
- _values->DeleteProp(PropName);
+ if (_length < origLength) {
+ for(int i=_length; i < origLength; i++) {
+ sprintf(propName, "%d", i);
+ _values->DeleteProp(propName);
}
}
return STATUS_OK;
@@ -509,7 +509,7 @@ bool SXMemBuffer::persist(BasePersistenceManager *persistMgr) {
_buffer = malloc(_size);
persistMgr->getBytes((byte *)_buffer, _size);
} else {
- _buffer = NULL;
+ _buffer = nullptr;
}
}
diff --git a/engines/wintermute/base/scriptables/script_ext_string.cpp b/engines/wintermute/base/scriptables/script_ext_string.cpp
index 5f7da1c2dd..71544a20aa 100644
--- a/engines/wintermute/base/scriptables/script_ext_string.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_string.cpp
@@ -33,6 +33,7 @@
#include "engines/wintermute/base/scriptables/script_ext_string.h"
#include "engines/wintermute/base/scriptables/script_ext_array.h"
#include "engines/wintermute/utils/string_util.h"
+#include "common/str.h"
#include "common/tokenizer.h"
namespace Wintermute {
@@ -45,7 +46,7 @@ BaseScriptable *makeSXString(BaseGame *inGame, ScStack *stack) {
//////////////////////////////////////////////////////////////////////////
SXString::SXString(BaseGame *inGame, ScStack *stack) : BaseScriptable(inGame) {
- _string = NULL;
+ _string = nullptr;
_capacity = 0;
stack->correctParams(1);
@@ -81,7 +82,7 @@ void SXString::setStringVal(const char *val) {
if (len >= _capacity) {
_capacity = len + 1;
delete[] _string;
- _string = NULL;
+ _string = nullptr;
_string = new char[_capacity];
memset(_string, 0, _capacity);
}
@@ -295,30 +296,26 @@ bool SXString::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
Common::Array<WideString> parts;
-
-
- Common::StringTokenizer tokenizer(str, delims);
- while (!tokenizer.empty()) {
- Common::String str2 = tokenizer.nextToken();
- parts.push_back(str2);
+ uint32 start = 0;
+ for(uint32 i = 0; i < str.size() + 1; i++) {
+ char ch = str.c_str()[i];
+ if(ch=='\0' || delims.contains(ch))
+ {
+ char *part = new char[i - start + 1];
+ if(i != start) {
+ Common::strlcpy(part, str.c_str() + start, i - start + 1);
+ part[i - start] = '\0';
+ } else {
+ part[0] = '\0';
+ }
+ val = new ScValue(_gameRef, part);
+ array->push(val);
+ delete[] part;
+ delete val;
+ val = nullptr;
+ start = i + 1;
+ }
}
- // TODO: Clean this up
- /*do {
- pos = StringUtil::IndexOf(Common::String(str.c_str() + start), delims, start);
- //pos = str.find_first_of(delims, start);
- if (pos == start) {
- start = pos + 1;
- } else if (pos == str.size()) {
- parts.push_back(Common::String(str.c_str() + start));
- break;
- } else {
- parts.push_back(Common::String(str.c_str() + start, pos - start));
- start = pos + 1;
- }
- //start = str.find_first_not_of(delims, start);
- start = StringUtil::LastIndexOf(Common::String(str.c_str() + start), delims, start) + 1;
-
- } while (pos != str.size());*/
for (Common::Array<WideString>::iterator it = parts.begin(); it != parts.end(); ++it) {
WideString &part = (*it);
@@ -331,7 +328,7 @@ bool SXString::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
array->push(val);
delete val;
- val = NULL;
+ val = nullptr;
}
stack->pushNative(array, false);
@@ -420,7 +417,7 @@ bool SXString::persist(BasePersistenceManager *persistMgr) {
_string = new char[_capacity];
persistMgr->getBytes((byte *)_string, _capacity);
} else {
- _string = NULL;
+ _string = nullptr;
}
}
diff --git a/engines/wintermute/base/scriptables/script_stack.cpp b/engines/wintermute/base/scriptables/script_stack.cpp
index 77367045c2..3239decae8 100644
--- a/engines/wintermute/base/scriptables/script_stack.cpp
+++ b/engines/wintermute/base/scriptables/script_stack.cpp
@@ -58,7 +58,7 @@ ScStack::~ScStack() {
ScValue *ScStack::pop() {
if (_sP < 0) {
_gameRef->LOG(0, "Fatal: Stack underflow");
- return NULL;
+ return nullptr;
}
return _values[_sP--];
@@ -97,7 +97,7 @@ ScValue *ScStack::getPushValue() {
//////////////////////////////////////////////////////////////////////////
ScValue *ScStack::getTop() {
if (_sP < 0 || _sP >= (int32)_values.size()) {
- return NULL;
+ return nullptr;
} else {
return _values[_sP];
}
@@ -108,7 +108,7 @@ ScValue *ScStack::getTop() {
ScValue *ScStack::getAt(int index) {
index = _sP - index;
if (index < 0 || index >= (int32)_values.size()) {
- return NULL;
+ return nullptr;
} else {
return _values[index];
}
@@ -147,73 +147,36 @@ void ScStack::correctParams(uint32 expectedParams) {
//////////////////////////////////////////////////////////////////////////
void ScStack::pushNULL() {
- /*
- ScValue* val = new ScValue(_gameRef);
- val->setNULL();
- Push(val);
- delete val;
- */
getPushValue()->setNULL();
}
//////////////////////////////////////////////////////////////////////////
void ScStack::pushInt(int val) {
- /*
- ScValue* val = new ScValue(_gameRef);
- val->setInt(Val);
- Push(val);
- delete val;
- */
getPushValue()->setInt(val);
}
//////////////////////////////////////////////////////////////////////////
void ScStack::pushFloat(double val) {
- /*
- ScValue* val = new ScValue(_gameRef);
- val->setFloat(Val);
- Push(val);
- delete val;
- */
getPushValue()->setFloat(val);
}
//////////////////////////////////////////////////////////////////////////
void ScStack::pushBool(bool val) {
- /*
- ScValue* val = new ScValue(_gameRef);
- val->setBool(Val);
- Push(val);
- delete val;
- */
getPushValue()->setBool(val);
}
//////////////////////////////////////////////////////////////////////////
void ScStack::pushString(const char *val) {
- /*
- ScValue* val = new ScValue(_gameRef);
- val->setString(Val);
- Push(val);
- delete val;
- */
getPushValue()->setString(val);
}
//////////////////////////////////////////////////////////////////////////
void ScStack::pushNative(BaseScriptable *val, bool persistent) {
- /*
- ScValue* val = new ScValue(_gameRef);
- val->setNative(Val, Persistent);
- Push(val);
- delete val;
- */
-
getPushValue()->setNative(val, persistent);
}
diff --git a/engines/wintermute/base/scriptables/script_value.cpp b/engines/wintermute/base/scriptables/script_value.cpp
index 0bc7ab5807..46d6c25d44 100644
--- a/engines/wintermute/base/scriptables/script_value.cpp
+++ b/engines/wintermute/base/scriptables/script_value.cpp
@@ -49,9 +49,9 @@ ScValue::ScValue(BaseGame *inGame) : BaseClass(inGame) {
_valBool = false;
_valInt = 0;
_valFloat = 0.0f;
- _valNative = NULL;
- _valString = NULL;
- _valRef = NULL;
+ _valNative = nullptr;
+ _valString = nullptr;
+ _valRef = nullptr;
_persistent = false;
_isConstVar = false;
}
@@ -64,9 +64,9 @@ ScValue::ScValue(BaseGame *inGame, bool val) : BaseClass(inGame) {
_valInt = 0;
_valFloat = 0.0f;
- _valNative = NULL;
- _valString = NULL;
- _valRef = NULL;
+ _valNative = nullptr;
+ _valString = nullptr;
+ _valRef = nullptr;
_persistent = false;
_isConstVar = false;
}
@@ -79,9 +79,9 @@ ScValue::ScValue(BaseGame *inGame, int val) : BaseClass(inGame) {
_valFloat = 0.0f;
_valBool = false;
- _valNative = NULL;
- _valString = NULL;
- _valRef = NULL;
+ _valNative = nullptr;
+ _valString = nullptr;
+ _valRef = nullptr;
_persistent = false;
_isConstVar = false;
}
@@ -94,9 +94,9 @@ ScValue::ScValue(BaseGame *inGame, double val) : BaseClass(inGame) {
_valInt = 0;
_valBool = false;
- _valNative = NULL;
- _valString = NULL;
- _valRef = NULL;
+ _valNative = nullptr;
+ _valString = nullptr;
+ _valRef = nullptr;
_persistent = false;
_isConstVar = false;
}
@@ -105,14 +105,14 @@ ScValue::ScValue(BaseGame *inGame, double val) : BaseClass(inGame) {
//////////////////////////////////////////////////////////////////////////
ScValue::ScValue(BaseGame *inGame, const char *val) : BaseClass(inGame) {
_type = VAL_STRING;
- _valString = NULL;
+ _valString = nullptr;
setStringVal(val);
_valBool = false;
_valInt = 0;
_valFloat = 0.0f;
- _valNative = NULL;
- _valRef = NULL;
+ _valNative = nullptr;
+ _valRef = nullptr;
_persistent = false;
_isConstVar = false;
}
@@ -131,7 +131,7 @@ void ScValue::cleanup(bool ignoreNatives) {
_valNative->_refCount--;
if (_valNative->_refCount <= 0) {
delete _valNative;
- _valNative = NULL;
+ _valNative = nullptr;
}
}
}
@@ -142,9 +142,9 @@ void ScValue::cleanup(bool ignoreNatives) {
_valBool = false;
_valInt = 0;
_valFloat = 0.0f;
- _valNative = NULL;
- _valString = NULL;
- _valRef = NULL;
+ _valNative = nullptr;
+ _valString = nullptr;
+ _valRef = nullptr;
_persistent = false;
_isConstVar = false;
}
@@ -176,13 +176,13 @@ ScValue *ScValue::getProp(const char *name) {
return _gameRef->_scValue;
}
- ScValue *ret = NULL;
+ ScValue *ret = nullptr;
if (_type == VAL_NATIVE && _valNative) {
ret = _valNative->scGetProperty(name);
}
- if (ret == NULL) {
+ if (ret == nullptr) {
_valIter = _valObject.find(name);
if (_valIter != _valObject.end()) {
ret = _valIter->_value;
@@ -200,7 +200,7 @@ bool ScValue::deleteProp(const char *name) {
_valIter = _valObject.find(name);
if (_valIter != _valObject.end()) {
delete _valIter->_value;
- _valIter->_value = NULL;
+ _valIter->_value = nullptr;
}
return STATUS_OK;
@@ -220,7 +220,7 @@ bool ScValue::setProp(const char *name, ScValue *val, bool copyWhole, bool setAs
}
if (DID_FAIL(ret)) {
- ScValue *newVal = NULL;
+ ScValue *newVal = nullptr;
_valIter = _valObject.find(name);
if (_valIter != _valObject.end()) {
@@ -242,9 +242,9 @@ bool ScValue::setProp(const char *name, ScValue *val, bool copyWhole, bool setAs
/*
_valIter = _valObject.find(Name);
- if (_valIter != _valObject.end()){
+ if (_valIter != _valObject.end()) {
delete _valIter->_value;
- _valIter->_value = NULL;
+ _valIter->_value = nullptr;
}
ScValue* val = new ScValue(_gameRef);
val->Copy(Val, CopyWhole);
@@ -451,11 +451,11 @@ void ScValue::setString(const Common::String &val) {
void ScValue::setStringVal(const char *val) {
if (_valString) {
delete[] _valString;
- _valString = NULL;
+ _valString = nullptr;
}
- if (val == NULL) {
- _valString = NULL;
+ if (val == nullptr) {
+ _valString = nullptr;
return;
}
@@ -479,7 +479,7 @@ void ScValue::setNULL() {
delete _valNative;
}
}
- _valNative = NULL;
+ _valNative = nullptr;
deleteProps();
_type = VAL_NULL;
@@ -493,7 +493,7 @@ void ScValue::setNative(BaseScriptable *val, bool persistent) {
return;
}
- if (val == NULL) {
+ if (val == nullptr) {
setNULL();
} else {
if (_valNative && !_persistent) {
@@ -502,7 +502,7 @@ void ScValue::setNative(BaseScriptable *val, bool persistent) {
if (_valNative != val) {
delete _valNative;
}
- _valNative = NULL;
+ _valNative = nullptr;
}
}
@@ -693,7 +693,7 @@ BaseScriptable *ScValue::getNative() {
if (_type == VAL_NATIVE) {
return _valNative;
} else {
- return NULL;
+ return nullptr;
}
}
@@ -714,7 +714,7 @@ void ScValue::copy(ScValue *orig, bool copyWhole) {
if (_valNative != orig->_valNative) {
delete _valNative;
}
- _valNative = NULL;
+ _valNative = nullptr;
}
}
@@ -827,7 +827,7 @@ bool ScValue::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_valRef));
persistMgr->transfer(TMEMBER(_valString));
- /*
+ /* // TODO: Convert to Debug-statements.
FILE* f = fopen("c:\\val.log", "a+");
switch(_type)
{
diff --git a/engines/wintermute/base/sound/base_sound.cpp b/engines/wintermute/base/sound/base_sound.cpp
index 00d07cd3c2..f246c03fe1 100644
--- a/engines/wintermute/base/sound/base_sound.cpp
+++ b/engines/wintermute/base/sound/base_sound.cpp
@@ -36,7 +36,7 @@ namespace Wintermute {
IMPLEMENT_PERSISTENT(BaseSound, false)
BaseSound::BaseSound(BaseGame *inGame) : BaseClass(inGame) {
- _sound = NULL;
+ _sound = nullptr;
_soundFilename = "";
_soundType = Audio::Mixer::kSFXSoundType;
@@ -57,13 +57,13 @@ BaseSound::~BaseSound() {
if (_sound) {
_gameRef->_soundMgr->removeSound(_sound);
}
- _sound = NULL;
+ _sound = nullptr;
}
bool BaseSound::setSound(const Common::String &filename, Audio::Mixer::SoundType type, bool streamed) {
if (_sound) {
_gameRef->_soundMgr->removeSound(_sound);
- _sound = NULL;
+ _sound = nullptr;
}
_soundFilename = Common::String(); // Set empty
diff --git a/engines/wintermute/base/sound/base_sound_buffer.cpp b/engines/wintermute/base/sound/base_sound_buffer.cpp
index 250570f2b8..9c919abac6 100644
--- a/engines/wintermute/base/sound/base_sound_buffer.cpp
+++ b/engines/wintermute/base/sound/base_sound_buffer.cpp
@@ -49,13 +49,13 @@ namespace Wintermute {
//////////////////////////////////////////////////////////////////////////
BaseSoundBuffer::BaseSoundBuffer(BaseGame *inGame) : BaseClass(inGame) {
- _stream = NULL;
- _handle = NULL;
-// _sync = NULL;
+ _stream = nullptr;
+ _handle = nullptr;
+// _sync = nullptr;
_streamed = false;
_filename = "";
- _file = NULL;
+ _file = nullptr;
_privateVolume = 255;
_volume = 255;
@@ -76,10 +76,10 @@ BaseSoundBuffer::~BaseSoundBuffer() {
if (_handle) {
g_system->getMixer()->stopHandle(*_handle);
delete _handle;
- _handle = NULL;
+ _handle = nullptr;
}
delete _stream;
- _stream = NULL;
+ _stream = nullptr;
}
@@ -111,7 +111,7 @@ bool BaseSoundBuffer::loadFromFile(const Common::String &filename, bool forceRel
if (Audio::loadWAVFromStream(*_file, waveSize, waveRate, waveFlags, &waveType)) {
if (waveType == 1) {
// We need to wrap the file in a substream to make sure the size is right.
- _file = new Common::SeekableSubReadStream(_file, 0, waveSize);
+ _file = new Common::SeekableSubReadStream(_file, _file->pos(), waveSize + _file->pos(), DisposeAfterUse::YES);
_stream = Audio::makeRawStream(_file, waveRate, waveFlags, DisposeAfterUse::YES);
} else {
error("BSoundBuffer::LoadFromFile - WAVE not supported yet for %s with type %d", filename.c_str(), waveType);
@@ -134,7 +134,7 @@ bool BaseSoundBuffer::play(bool looping, uint32 startSample) {
if (_handle) {
g_system->getMixer()->stopHandle(*_handle);
delete _handle;
- _handle = NULL;
+ _handle = nullptr;
}
// Store the loop-value for save-games.
setLooping(looping);
diff --git a/engines/wintermute/base/sound/base_sound_manager.cpp b/engines/wintermute/base/sound/base_sound_manager.cpp
index 441793144d..c6eb871a85 100644
--- a/engines/wintermute/base/sound/base_sound_manager.cpp
+++ b/engines/wintermute/base/sound/base_sound_manager.cpp
@@ -50,6 +50,7 @@ namespace Wintermute {
BaseSoundMgr::BaseSoundMgr(BaseGame *inGame) : BaseClass(inGame) {
_soundAvailable = false;
_volumeMaster = 255;
+ _volumeMasterPercent = 100;
}
@@ -72,7 +73,7 @@ bool BaseSoundMgr::cleanup() {
//////////////////////////////////////////////////////////////////////////
void BaseSoundMgr::saveSettings() {
if (_soundAvailable) {
- ConfMan.setInt("master_volume", _volumeMaster);
+ ConfMan.setInt("master_volume_percent", _volumeMasterPercent);
}
}
@@ -83,7 +84,8 @@ bool BaseSoundMgr::initialize() {
if (!g_system->getMixer()->isReady()) {
return STATUS_FAILED;
}
- _volumeMaster = (ConfMan.hasKey("master_volume") ? ConfMan.getInt("master_volume") : 255);
+ byte volumeMasterPercent = (ConfMan.hasKey("master_volume_percent") ? ConfMan.getInt("master_volume_percent") : 100);
+ setMasterVolumePercent(volumeMasterPercent);
_soundAvailable = true;
return STATUS_OK;
@@ -92,7 +94,7 @@ bool BaseSoundMgr::initialize() {
//////////////////////////////////////////////////////////////////////////
BaseSoundBuffer *BaseSoundMgr::addSound(const Common::String &filename, Audio::Mixer::SoundType type, bool streamed) {
if (!_soundAvailable) {
- return NULL;
+ return nullptr;
}
BaseSoundBuffer *sound;
@@ -112,7 +114,7 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const Common::String &filename, Audio::M
sound = new BaseSoundBuffer(_gameRef);
if (!sound) {
- return NULL;
+ return nullptr;
}
sound->setStreaming(streamed);
@@ -123,7 +125,7 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const Common::String &filename, Audio::M
if (DID_FAIL(res)) {
_gameRef->LOG(res, "Error loading sound '%s'", useFilename.c_str());
delete sound;
- return NULL;
+ return nullptr;
}
// Make sure the master-volume is applied to the sound.
@@ -134,7 +136,7 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const Common::String &filename, Audio::M
return sound;
- return NULL;
+ return nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -217,6 +219,11 @@ byte BaseSoundMgr::getVolumePercent(Audio::Mixer::SoundType type) {
//////////////////////////////////////////////////////////////////////////
bool BaseSoundMgr::setMasterVolume(byte value) {
+ // This function intentionally doesn't touch _volumeMasterPercent,
+ // as that variable keeps track of what the game actually wanted,
+ // and this gives a close approximation, while letting the game
+ // be none the wiser about round-off-errors. This function should thus
+ // ONLY be called by setMasterVolumePercent.
_volumeMaster = value;
for (uint32 i = 0; i < _sounds.size(); i++) {
_sounds[i]->updateVolume();
@@ -226,14 +233,15 @@ bool BaseSoundMgr::setMasterVolume(byte value) {
//////////////////////////////////////////////////////////////////////////
bool BaseSoundMgr::setMasterVolumePercent(byte percent) {
- setMasterVolume(percent * 255 / 100);
+ _volumeMasterPercent = percent;
+ setMasterVolume((int)ceil(percent * 255.0 / 100.0));
return STATUS_OK;
}
//////////////////////////////////////////////////////////////////////////
byte BaseSoundMgr::getMasterVolumePercent() {
- return getMasterVolume() * 100 / 255;
+ return _volumeMasterPercent;
}
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/base/sound/base_sound_manager.h b/engines/wintermute/base/sound/base_sound_manager.h
index 36a729b5ae..1ee3c13fdb 100644
--- a/engines/wintermute/base/sound/base_sound_manager.h
+++ b/engines/wintermute/base/sound/base_sound_manager.h
@@ -45,7 +45,6 @@ public:
//DECLARE_PERSISTENT(BaseSoundMgr, BaseClass);
byte getMasterVolumePercent();
byte getMasterVolume();
- bool setMasterVolume(byte percent);
bool setMasterVolumePercent(byte percent);
byte getVolumePercent(Audio::Mixer::SoundType type);
bool setVolumePercent(Audio::Mixer::SoundType type, byte percent);
@@ -61,6 +60,9 @@ public:
virtual ~BaseSoundMgr();
Common::Array<BaseSoundBuffer *> _sounds;
void saveSettings();
+private:
+ int _volumeMasterPercent; // Necessary to avoid round-offs.
+ bool setMasterVolume(byte percent);
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/dcgf.h b/engines/wintermute/dcgf.h
index fc4174094b..4f8e96e0ac 100644
--- a/engines/wintermute/dcgf.h
+++ b/engines/wintermute/dcgf.h
@@ -34,10 +34,10 @@
#define DCGF_VER_MAJOR 1
#define DCGF_VER_MINOR 1
#define DCGF_VER_BUILD 1
-#define DCGF_VER_SUFFIX "beta"
+#define DCGF_VER_SUFFIX "ScummVM"
#define DCGF_VER_BETA true
-#define DCGF_NAME "WME Lite"
+#define DCGF_NAME "WME-ScummVM"
#define DCGF_MAGIC 0xDEC0ADDE
// minimal saved game version we support
diff --git a/engines/wintermute/debugger.cpp b/engines/wintermute/debugger.cpp
new file mode 100644
index 0000000000..0dab75356b
--- /dev/null
+++ b/engines/wintermute/debugger.cpp
@@ -0,0 +1,84 @@
+/* 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 "engines/wintermute/debugger.h"
+#include "engines/wintermute/wintermute.h"
+#include "engines/wintermute/base/base_engine.h"
+#include "engines/wintermute/base/base_file_manager.h"
+#include "engines/wintermute/base/base_game.h"
+
+namespace Wintermute {
+
+Console::Console(WintermuteEngine *vm) : GUI::Debugger(), _engineRef(vm) {
+ DCmd_Register("show_fps", WRAP_METHOD(Console, Cmd_ShowFps));
+ DCmd_Register("dump_file", WRAP_METHOD(Console, Cmd_DumpFile));
+}
+
+Console::~Console(void) {
+
+}
+
+bool Console::Cmd_ShowFps(int argc, const char **argv) {
+ if (argc > 1) {
+ if (Common::String(argv[1]) == "true") {
+ _engineRef->_game->_debugShowFPS = true;
+ } else if (Common::String(argv[1]) == "false") {
+ _engineRef->_game->_debugShowFPS = false;
+ }
+ }
+ return true;
+}
+
+bool Console::Cmd_DumpFile(int argc, const char **argv) {
+ if (argc != 3) {
+ DebugPrintf("Usage: %s <file path> <output file name>\n", argv[0]);
+ return true;
+ }
+
+ Common::String filePath = argv[1];
+ Common::String outFileName = argv[2];
+
+ BaseFileManager *fileManager = BaseEngine::instance().getFileManager();
+ Common::SeekableReadStream *inFile = fileManager->openFile(filePath);
+ if (!inFile) {
+ DebugPrintf("File '%s' not found\n", argv[1]);
+ return true;
+ }
+
+ Common::DumpFile *outFile = new Common::DumpFile();
+ outFile->open(outFileName);
+
+ byte *data = new byte[inFile->size()];
+ inFile->read(data, inFile->size());
+ outFile->write(data, inFile->size());
+ outFile->finalize();
+ outFile->close();
+ delete[] data;
+
+ delete outFile;
+ delete inFile;
+
+ DebugPrintf("Resource file '%s' dumped to file '%s'\n", argv[1], argv[2]);
+ return true;
+}
+
+} // end of namespace Wintermute
diff --git a/engines/wintermute/base/file/base_resources.h b/engines/wintermute/debugger.h
index 91c30bcfa7..588b81af97 100644
--- a/engines/wintermute/base/file/base_resources.h
+++ b/engines/wintermute/debugger.h
@@ -8,38 +8,37 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
-/*
- * This file is based on WME Lite.
- * http://dead-code.org/redir.php?target=wmelite
- * Copyright (c) 2011 Jan Nedoma
- */
-
-#ifndef WINTERMUTE_BASE_RESOURCES_H
-#define WINTERMUTE_BASE_RESOURCES_H
+#ifndef WINTERMUTE_DEBUGGER_H
+#define WINTERMUTE_DEBUGGER_H
-#include "common/stream.h"
-#include "common/str.h"
+#include "gui/debugger.h"
namespace Wintermute {
-class BaseResources {
+class WintermuteEngine;
+class Console : public GUI::Debugger {
public:
- static Common::SeekableReadStream *getFile(const Common::String &filename);
- static bool hasFile(const Common::String &filename);
+ Console(WintermuteEngine *vm);
+ virtual ~Console();
+
+ bool Cmd_ShowFps(int argc, const char **argv);
+ bool Cmd_DumpFile(int argc, const char **argv);
+private:
+ WintermuteEngine *_engineRef;
};
-} // end of namespace Wintermute
+}
-#endif
+#endif // WINTERMUTE_DEBUGGER_H
diff --git a/engines/wintermute/detection.cpp b/engines/wintermute/detection.cpp
index 04f7f3b112..1bf2c76a50 100644
--- a/engines/wintermute/detection.cpp
+++ b/engines/wintermute/detection.cpp
@@ -28,6 +28,7 @@
#include "common/error.h"
#include "common/fs.h"
#include "common/util.h"
+#include "common/translation.h"
#include "engines/metaengine.h"
@@ -49,6 +50,20 @@ static ADGameDescription s_fallbackDesc = {
ADGF_UNSTABLE,
GUIO0()
};
+
+static const ADExtraGuiOptionsMap gameGuiOptions[] = {
+ {
+ GAMEOPTION_SHOW_FPS,
+ {
+ _s("Show FPS-counter"),
+ _s("Show the current number of frames per second in the upper left corner"),
+ "show_fps",
+ false
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
static char s_fallbackGameIdBuf[256];
static const char *directoryGlobs[] = {
@@ -58,8 +73,9 @@ static const char *directoryGlobs[] = {
class WintermuteMetaEngine : public AdvancedMetaEngine {
public:
- WintermuteMetaEngine() : AdvancedMetaEngine(Wintermute::gameDescriptions, sizeof(ADGameDescription), Wintermute::wintermuteGames) {
+ WintermuteMetaEngine() : AdvancedMetaEngine(Wintermute::gameDescriptions, sizeof(ADGameDescription), Wintermute::wintermuteGames, gameGuiOptions) {
_singleid = "wintermute";
+ _guioptions = GUIO2(GUIO_NOMIDI, GAMEOPTION_SHOW_FPS);
_maxScanDepth = 2;
_directoryGlobs = directoryGlobs;
}
diff --git a/engines/wintermute/detection_tables.h b/engines/wintermute/detection_tables.h
index f2a42ca59f..2f14c6cae1 100644
--- a/engines/wintermute/detection_tables.h
+++ b/engines/wintermute/detection_tables.h
@@ -22,14 +22,21 @@
namespace Wintermute {
+#define GAMEOPTION_SHOW_FPS GUIO_GAMEOPTIONS1
+
static const PlainGameDescriptor wintermuteGames[] = {
{"5ld", "Five Lethal Demons"},
{"5ma", "Five Magical Amulets"},
{"actualdest", "Actual Destination"},
+ {"carolreed4", "Carol Reed 4 - East Side Story"},
+ {"carolreed5", "Carol Reed 5 - The Colour of Murder"},
+ {"carolreed6", "Carol Reed 6 - Black Circle"},
+ {"carolreed7", "Carol Reed 7 - Blue Madonna"},
+ {"carolreed8", "Carol Reed 8 - Amber's Blood"},
+ {"carolreed9", "Carol Reed 9 - Cold Case Summer"},
{"chivalry", "Chivalry is Not Dead"},
{"deadcity", "Dead City"},
{"dirtysplit", "Dirty Split"},
- {"eastside", "East Side Story"},
{"ghostsheet", "Ghost in the Sheet"},
{"hamlet", "Hamlet or the last game without MMORPS features, shaders and product placement"},
{"julia", "J.U.L.I.A."},
@@ -74,6 +81,78 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // Carol Reed 4 - East Side Story (Demo)
+ {
+ "carolreed4",
+ "Demo",
+ AD_ENTRY1s("data.dcp", "b3f8b09bb4b05ee3e9d14697525257f9", 59296246),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE |
+ ADGF_DEMO,
+ GUIO0()
+ },
+ // Carol Reed 4 - East Side Story
+ {
+ "carolreed4",
+ "",
+ AD_ENTRY1s("data.dcp", "b26377797f060afc2d440d820100c1ce", 529320536),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE |
+ ADGF_DEMO,
+ GUIO0()
+ },
+ // Carol Reed 5 - The Colour of Murder
+ {
+ "carolreed5",
+ "",
+ AD_ENTRY1s("data.dcp", "3fcfca44209545d0e26774156427b494", 603660415),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Carol Reed 6 - Black Circle
+ {
+ "carolreed6",
+ "",
+ AD_ENTRY1s("data.dcp", "0e4c532beecf23d85012168753f41189", 456258147),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Carol Reed 7 - Blue Madonna
+ {
+ "carolreed7",
+ "",
+ AD_ENTRY1s("data.dcp", "24e3db3e2fabfc956713796d87a3efb0", 495471147),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Carol Reed 8 - Amber's Blood
+ {
+ "carolreed8",
+ "",
+ AD_ENTRY1s("data.dcp", "859d16b0d5b9b255e470cbded2c6cedc", 502714557),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Carol Reed 9 - Cold Case Summer
+ {
+ "carolreed9",
+ "",
+ AD_ENTRY1s("data.dcp", "2b343b48a7aee508d728a546b414a255", 620005266),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
// Chivalry is Not Dead
{
"chivalry",
@@ -156,17 +235,6 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
- // East Side Story (Demo)
- {
- "eastside",
- "Demo",
- AD_ENTRY1s("data.dcp", "b3f8b09bb4b05ee3e9d14697525257f9", 59296246),
- Common::EN_ANY,
- Common::kPlatformWindows,
- ADGF_UNSTABLE |
- ADGF_DEMO,
- GUIO0()
- },
// Ghosts in the Sheet
{
"ghostsheet",
diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp
index 9319899495..11aeb26821 100644
--- a/engines/wintermute/graphics/transparent_surface.cpp
+++ b/engines/wintermute/graphics/transparent_surface.cpp
@@ -29,11 +29,11 @@
namespace Wintermute {
-byte *TransparentSurface::_lookup = NULL;
+byte *TransparentSurface::_lookup = nullptr;
void TransparentSurface::destroyLookup() {
- delete _lookup;
- _lookup = NULL;
+ delete[] _lookup;
+ _lookup = nullptr;
}
TransparentSurface::TransparentSurface() : Surface(), _enableAlphaBlit(true) {}
@@ -219,8 +219,8 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
#endif
Graphics::Surface *img;
- Graphics::Surface *imgScaled = NULL;
- byte *savedPixels = NULL;
+ Graphics::Surface *imgScaled = nullptr;
+ byte *savedPixels = nullptr;
if ((width != srcImage.w) || (height != srcImage.h)) {
// Scale the image
img = imgScaled = srcImage.scale(width, height);
@@ -394,6 +394,8 @@ TransparentSurface *TransparentSurface::scale(const Common::Rect &srcRect, const
// dstRect(x, y) = srcRect(x * srcW / dstW, y * srcH / dstH);
TransparentSurface *target = new TransparentSurface();
+ assert(format.bytesPerPixel == 4);
+
int srcW = srcRect.width();
int srcH = srcRect.height();
int dstW = dstRect.width();
diff --git a/engines/wintermute/graphics/transparent_surface.h b/engines/wintermute/graphics/transparent_surface.h
index 8b00dccbd9..dc079a1fbc 100644
--- a/engines/wintermute/graphics/transparent_surface.h
+++ b/engines/wintermute/graphics/transparent_surface.h
@@ -98,7 +98,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 = NULL,
+ Common::Rect *pPartRect = nullptr,
uint color = BS_ARGB(255, 255, 255, 255),
int width = -1, int height = -1);
void applyColorKey(uint8 r, uint8 g, uint8 b, bool overwriteAlpha = false);
diff --git a/engines/wintermute/module.mk b/engines/wintermute/module.mk
index 2bd71f1b6b..5c0406b353 100644
--- a/engines/wintermute/module.mk
+++ b/engines/wintermute/module.mk
@@ -42,7 +42,6 @@ MODULE_OBJS := \
base/file/base_file.o \
base/file/base_file_entry.o \
base/file/base_package.o \
- base/file/base_resources.o \
base/file/base_save_thumb_file.o \
base/font/base_font_bitmap.o \
base/font/base_font_truetype.o \
@@ -110,6 +109,7 @@ MODULE_OBJS := \
utils/utils.o \
video/video_player.o \
video/video_theora_player.o \
+ debugger.o \
wintermute.o \
persistent.o
diff --git a/engines/wintermute/persistent.h b/engines/wintermute/persistent.h
index c862df5d6b..ca9281f798 100644
--- a/engines/wintermute/persistent.h
+++ b/engines/wintermute/persistent.h
@@ -36,53 +36,53 @@ class BasePersistenceManager;
// persistence support
typedef void *(*PERSISTBUILD)(void);
typedef bool(*PERSISTLOAD)(void *, BasePersistenceManager *);
-typedef void (*SYS_INSTANCE_CALLBACK)(void *Instance, void *Data);
+typedef void(*SYS_INSTANCE_CALLBACK)(void *instance, void *data);
} // end of namespace Wintermute
#include "engines/wintermute/system/sys_class_registry.h"
namespace Wintermute {
-#define DECLARE_PERSISTENT(class_name, parent_class)\
+#define DECLARE_PERSISTENT(className, parentClass)\
static const char _className[];\
- static void* persistBuild(void);\
- virtual const char* getClassName();\
+ static void *persistBuild(void);\
+ virtual const char *getClassName();\
static bool persistLoad(void* Instance, BasePersistenceManager* PersistMgr);\
- class_name(TDynamicConstructor p1, TDynamicConstructor p2) :parent_class(p1, p2){ /*memset(this, 0, sizeof(class_name));*/ };\
- virtual bool persist(BasePersistenceManager* PersistMgr);\
+ className(TDynamicConstructor p1, TDynamicConstructor p2) : parentClass(p1, p2) { /*memset(this, 0, sizeof(class_name));*/ };\
+ virtual bool persist(BasePersistenceManager *persistMgr);\
void* operator new (size_t size);\
void operator delete(void* p);\
-#define IMPLEMENT_PERSISTENT(class_name, persistent_class)\
- const char class_name::_className[] = #class_name;\
- void* class_name::persistBuild(){\
- return ::new class_name(DYNAMIC_CONSTRUCTOR, DYNAMIC_CONSTRUCTOR);\
+#define IMPLEMENT_PERSISTENT(className, persistentClass)\
+ const char className::_className[] = #className;\
+ void* className::persistBuild() {\
+ return ::new className(DYNAMIC_CONSTRUCTOR, DYNAMIC_CONSTRUCTOR);\
}\
\
- bool class_name::persistLoad(void* Instance, BasePersistenceManager* PersistMgr){\
- return ((class_name*)Instance)->persist(PersistMgr);\
+ bool className::persistLoad(void *instance, BasePersistenceManager *persistMgr) {\
+ return ((className*)instance)->persist(persistMgr);\
}\
\
- const char* class_name::getClassName(){\
- return #class_name;\
+ const char *className::getClassName() {\
+ return #className;\
}\
\
/*SystemClass Register##class_name(class_name::_className, class_name::PersistBuild, class_name::PersistLoad, persistent_class);*/\
\
- void* class_name::operator new (size_t size){\
+ void* className::operator new(size_t size) {\
void* ret = ::operator new(size);\
- SystemClassRegistry::getInstance()->registerInstance(#class_name, ret);\
+ SystemClassRegistry::getInstance()->registerInstance(#className, ret);\
return ret;\
}\
\
- void class_name::operator delete (void* p){\
- SystemClassRegistry::getInstance()->unregisterInstance(#class_name, p);\
+ void className::operator delete(void *p) {\
+ SystemClassRegistry::getInstance()->unregisterInstance(#className, p);\
::operator delete(p);\
}\
-#define TMEMBER(member_name) #member_name, &member_name
-#define TMEMBER_INT(member_name) #member_name, (int*)&member_name
+#define TMEMBER(memberName) #memberName, &memberName
+#define TMEMBER_INT(memberName) #memberName, (int*)&memberName
} // end of namespace Wintermute
diff --git a/engines/wintermute/platform_osystem.cpp b/engines/wintermute/platform_osystem.cpp
index 0bd99b11cd..362c0da624 100644
--- a/engines/wintermute/platform_osystem.cpp
+++ b/engines/wintermute/platform_osystem.cpp
@@ -26,6 +26,7 @@
* Copyright (c) 2011 Jan Nedoma
*/
+#include "engines/wintermute/wintermute.h"
#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/base/gfx/osystem/base_render_osystem.h"
#include "engines/wintermute/platform_osystem.h"
@@ -35,14 +36,21 @@
namespace Wintermute {
-BaseGame *BasePlatform::_gameRef = NULL;
+BaseGame *BasePlatform::_gameRef = nullptr;
+WintermuteEngine *BasePlatform::_engineRef = nullptr;
#define CLASS_NAME "GF_FRAME"
-int BasePlatform::initialize(BaseGame *inGame, int argc, char *argv[]) {
+int BasePlatform::initialize(WintermuteEngine *engineRef, BaseGame *inGame, int argc, char *argv[]) {
_gameRef = inGame;
+ _engineRef = engineRef;
return true;
}
+void BasePlatform::deinit() {
+ _gameRef = nullptr;
+ _engineRef = nullptr;
+}
+
//////////////////////////////////////////////////////////////////////////
void BasePlatform::handleEvent(Common::Event *event) {
switch (event->type) {
@@ -86,6 +94,11 @@ void BasePlatform::handleEvent(Common::Event *event) {
}
break;
case Common::EVENT_KEYDOWN:
+ if (event->kbd.flags & Common::KBD_CTRL) {
+ if (event->kbd.keycode == Common::KEYCODE_d) {
+ _engineRef->trigDebugger();
+ }
+ }
if (_gameRef) {
_gameRef->handleKeypress(event);
}
@@ -234,7 +247,7 @@ bool BasePlatform::unionRect(Rect32 *lprcDst, Rect32 *lprcSrc1, Rect32 *lprcSrc2
//////////////////////////////////////////////////////////////////////////
bool BasePlatform::copyRect(Rect32 *lprcDst, Rect32 *lprcSrc) {
- if (lprcDst == NULL || lprcSrc == NULL) {
+ if (lprcDst == nullptr || lprcSrc == nullptr) {
return false;
}
diff --git a/engines/wintermute/platform_osystem.h b/engines/wintermute/platform_osystem.h
index 21a77e0a0e..8c39b29ea9 100644
--- a/engines/wintermute/platform_osystem.h
+++ b/engines/wintermute/platform_osystem.h
@@ -36,11 +36,12 @@
namespace Wintermute {
class BaseGame;
-
+class WintermuteEngine;
//////////////////////////////////////////////////////////////////////////
class BasePlatform {
public:
- static int initialize(BaseGame *inGame, int argc, char *argv[]);
+ static int initialize(WintermuteEngine *engineRef, BaseGame *inGame, int argc, char *argv[]);
+ static void deinit();
static void handleEvent(Common::Event *event);
static AnsiString getPlatformName();
@@ -66,6 +67,7 @@ public:
private:
// Set by initialize on game-startup, the object referred to is also deleted by deinit in WintermuteEngine
static BaseGame *_gameRef;
+ static WintermuteEngine *_engineRef;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/system/sys_class.cpp b/engines/wintermute/system/sys_class.cpp
index 06b36b84de..cda58bbb48 100644
--- a/engines/wintermute/system/sys_class.cpp
+++ b/engines/wintermute/system/sys_class.cpp
@@ -41,7 +41,7 @@ SystemClass::SystemClass(const AnsiString &name, PERSISTBUILD build, PERSISTLOAD
_build = build;
_load = load;
- _next = NULL;
+ _next = nullptr;
_savedID = -1;
_persistent = persistentClass;
_numInst = 0;
@@ -119,7 +119,7 @@ void *SystemClass::idToPointer(int savedID) {
return (it->_value)->getInstance();
}
}
- return NULL;
+ return nullptr;
}
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/system/sys_class_registry.cpp b/engines/wintermute/system/sys_class_registry.cpp
index 7c1911c2bf..3e2b8665ee 100644
--- a/engines/wintermute/system/sys_class_registry.cpp
+++ b/engines/wintermute/system/sys_class_registry.cpp
@@ -115,7 +115,7 @@ bool SystemClassRegistry::registerInstance(const char *className, void *instance
}
SystemInstance *inst = (*mapIt)._value->addInstance(instance, _count++);
- return (inst != NULL);
+ return (inst != nullptr);
}
//////////////////////////////////////////////////////////////////////////
@@ -152,7 +152,7 @@ bool SystemClassRegistry::unregisterInstance(const char *className, void *instan
//////////////////////////////////////////////////////////////////////////
bool SystemClassRegistry::getPointerID(void *pointer, int *classID, int *instanceID) {
- if (pointer == NULL) {
+ if (pointer == nullptr) {
return true;
}
@@ -173,7 +173,7 @@ bool SystemClassRegistry::getPointerID(void *pointer, int *classID, int *instanc
void *SystemClassRegistry::idToPointer(int classID, int instanceID) {
SavedInstanceMap::iterator it = _savedInstanceMap.find(instanceID);
if (it == _savedInstanceMap.end()) {
- return NULL;
+ return nullptr;
} else {
return (*it)._value->getInstance();
}
diff --git a/engines/wintermute/ui/ui_button.cpp b/engines/wintermute/ui/ui_button.cpp
index 7967d566f9..6ee577f009 100644
--- a/engines/wintermute/ui/ui_button.cpp
+++ b/engines/wintermute/ui/ui_button.cpp
@@ -48,11 +48,11 @@ IMPLEMENT_PERSISTENT(UIButton, false)
//////////////////////////////////////////////////////////////////////////
UIButton::UIButton(BaseGame *inGame) : UIObject(inGame) {
- _backPress = _backHover = _backDisable = _backFocus = NULL;
+ _backPress = _backHover = _backDisable = _backFocus = nullptr;
- _fontHover = _fontPress = _fontDisable = _fontFocus = NULL;
+ _fontHover = _fontPress = _fontDisable = _fontFocus = nullptr;
- _imageDisable = _imagePress = _imageHover = _imageFocus = NULL;
+ _imageDisable = _imagePress = _imageHover = _imageFocus = nullptr;
_align = TAL_CENTER;
@@ -104,7 +104,7 @@ UIButton::~UIButton() {
//////////////////////////////////////////////////////////////////////////
bool UIButton::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "UIButton::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -235,7 +235,7 @@ bool UIButton::loadBuffer(byte *buffer, bool complete) {
_back = new UITiledImage(_gameRef);
if (!_back || DID_FAIL(_back->loadFile((char *)params))) {
delete _back;
- _back = NULL;
+ _back = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -245,7 +245,7 @@ bool UIButton::loadBuffer(byte *buffer, bool complete) {
_backHover = new UITiledImage(_gameRef);
if (!_backHover || DID_FAIL(_backHover->loadFile((char *)params))) {
delete _backHover;
- _backHover = NULL;
+ _backHover = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -255,7 +255,7 @@ bool UIButton::loadBuffer(byte *buffer, bool complete) {
_backPress = new UITiledImage(_gameRef);
if (!_backPress || DID_FAIL(_backPress->loadFile((char *)params))) {
delete _backPress;
- _backPress = NULL;
+ _backPress = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -265,7 +265,7 @@ bool UIButton::loadBuffer(byte *buffer, bool complete) {
_backDisable = new UITiledImage(_gameRef);
if (!_backDisable || DID_FAIL(_backDisable->loadFile((char *)params))) {
delete _backDisable;
- _backDisable = NULL;
+ _backDisable = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -275,7 +275,7 @@ bool UIButton::loadBuffer(byte *buffer, bool complete) {
_backFocus = new UITiledImage(_gameRef);
if (!_backFocus || DID_FAIL(_backFocus->loadFile((char *)params))) {
delete _backFocus;
- _backFocus = NULL;
+ _backFocus = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -285,7 +285,7 @@ bool UIButton::loadBuffer(byte *buffer, bool complete) {
_image = new BaseSprite(_gameRef);
if (!_image || DID_FAIL(_image->loadFile((char *)params))) {
delete _image;
- _image = NULL;
+ _image = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -295,7 +295,7 @@ bool UIButton::loadBuffer(byte *buffer, bool complete) {
_imageHover = new BaseSprite(_gameRef);
if (!_imageHover || DID_FAIL(_imageHover->loadFile((char *)params))) {
delete _imageHover;
- _imageHover = NULL;
+ _imageHover = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -305,7 +305,7 @@ bool UIButton::loadBuffer(byte *buffer, bool complete) {
_imagePress = new BaseSprite(_gameRef);
if (!_imagePress || DID_FAIL(_imagePress->loadFile((char *)params))) {
delete _imagePress;
- _imagePress = NULL;
+ _imagePress = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -315,7 +315,7 @@ bool UIButton::loadBuffer(byte *buffer, bool complete) {
_imageDisable = new BaseSprite(_gameRef);
if (!_imageDisable || DID_FAIL(_imageDisable->loadFile((char *)params))) {
delete _imageDisable;
- _imageDisable = NULL;
+ _imageDisable = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -325,7 +325,7 @@ bool UIButton::loadBuffer(byte *buffer, bool complete) {
_imageFocus = new BaseSprite(_gameRef);
if (!_imageFocus || DID_FAIL(_imageFocus->loadFile((char *)params))) {
delete _imageFocus;
- _imageFocus = NULL;
+ _imageFocus = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -416,7 +416,7 @@ bool UIButton::loadBuffer(byte *buffer, bool complete) {
_cursor = new BaseSprite(_gameRef);
if (!_cursor || DID_FAIL(_cursor->loadFile((char *)params))) {
delete _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -592,7 +592,7 @@ bool UIButton::saveAsText(BaseDynamicBuffer *buffer, int indent) {
void UIButton::correctSize() {
Rect32 rect;
- BaseSprite *img = NULL;
+ BaseSprite *img = nullptr;
if (_image) {
img = _image;
} else if (_imageDisable) {
@@ -622,15 +622,15 @@ void UIButton::correctSize() {
}
if (_text) {
- int text_height;
+ int textHeight;
if (_font) {
- text_height = _font->getTextHeight((byte *)_text, _width);
+ textHeight = _font->getTextHeight((byte *)_text, _width);
} else {
- text_height = _gameRef->_systemFont->getTextHeight((byte *)_text, _width);
+ textHeight = _gameRef->getSystemFont()->getTextHeight((byte *)_text, _width);
}
- if (text_height > _height) {
- _height = text_height;
+ if (textHeight > _height) {
+ _height = textHeight;
}
}
@@ -650,8 +650,8 @@ bool UIButton::display(int offsetX, int offsetY) {
return STATUS_OK;
}
- UITiledImage *back = NULL;
- BaseSprite *image = NULL;
+ UITiledImage *back = nullptr;
+ BaseSprite *image = nullptr;
BaseFont *font = 0;
//RECT rect;
@@ -717,7 +717,7 @@ bool UIButton::display(int offsetX, int offsetY) {
if (_font) {
font = _font;
} else {
- font = _gameRef->_systemFont;
+ font = _gameRef->getSystemFont();
}
}
@@ -734,9 +734,9 @@ bool UIButton::display(int offsetX, int offsetY) {
if (back) {
back->display(offsetX + _posX, offsetY + _posY, _width, _height);
}
- //if (image) image->Draw(ImageX +((_press||_oneTimePress)&&back?1:0), ImageY +((_press||_oneTimePress)&&back?1:0), NULL);
+ //if (image) image->Draw(ImageX +((_press||_oneTimePress)&&back?1:0), ImageY +((_press||_oneTimePress)&&back?1:0), nullptr);
if (image) {
- image->draw(imageX + ((_press || _oneTimePress) && back ? 1 : 0), imageY + ((_press || _oneTimePress) && back ? 1 : 0), _pixelPerfect ? this : NULL);
+ image->draw(imageX + ((_press || _oneTimePress) && back ? 1 : 0), imageY + ((_press || _oneTimePress) && back ? 1 : 0), _pixelPerfect ? this : nullptr);
}
if (font && _text) {
@@ -745,7 +745,7 @@ bool UIButton::display(int offsetX, int offsetY) {
}
if (!_pixelPerfect || !_image) {
- _gameRef->_renderer->addRectToList(new BaseActiveRect(_gameRef, this, NULL, offsetX + _posX, offsetY + _posY, _width, _height, 100, 100, false));
+ _gameRef->_renderer->addRectToList(new BaseActiveRect(_gameRef, this, nullptr, offsetX + _posX, offsetY + _posY, _width, _height, 100, 100, false));
}
// reset unused sprites
@@ -800,11 +800,11 @@ bool UIButton::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
_gameRef->_fontStorage->removeFont(_fontDisable);
}
if (val->isNULL()) {
- _fontDisable = NULL;
+ _fontDisable = nullptr;
stack->pushBool(true);
} else {
_fontDisable = _gameRef->_fontStorage->addFont(val->getString());
- stack->pushBool(_fontDisable != NULL);
+ stack->pushBool(_fontDisable != nullptr);
}
return STATUS_OK;
}
@@ -820,11 +820,11 @@ bool UIButton::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
_gameRef->_fontStorage->removeFont(_fontHover);
}
if (val->isNULL()) {
- _fontHover = NULL;
+ _fontHover = nullptr;
stack->pushBool(true);
} else {
_fontHover = _gameRef->_fontStorage->addFont(val->getString());
- stack->pushBool(_fontHover != NULL);
+ stack->pushBool(_fontHover != nullptr);
}
return STATUS_OK;
}
@@ -840,11 +840,11 @@ bool UIButton::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
_gameRef->_fontStorage->removeFont(_fontPress);
}
if (val->isNULL()) {
- _fontPress = NULL;
+ _fontPress = nullptr;
stack->pushBool(true);
} else {
_fontPress = _gameRef->_fontStorage->addFont(val->getString());
- stack->pushBool(_fontPress != NULL);
+ stack->pushBool(_fontPress != nullptr);
}
return STATUS_OK;
}
@@ -860,11 +860,11 @@ bool UIButton::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
_gameRef->_fontStorage->removeFont(_fontFocus);
}
if (val->isNULL()) {
- _fontFocus = NULL;
+ _fontFocus = nullptr;
stack->pushBool(true);
} else {
_fontFocus = _gameRef->_fontStorage->addFont(val->getString());
- stack->pushBool(_fontFocus != NULL);
+ stack->pushBool(_fontFocus != nullptr);
}
return STATUS_OK;
}
@@ -880,7 +880,7 @@ bool UIButton::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
const char *filename = stack->pop()->getString();
if (!_imageDisable || DID_FAIL(_imageDisable->loadFile(filename))) {
delete _imageDisable;
- _imageDisable = NULL;
+ _imageDisable = nullptr;
stack->pushBool(false);
} else {
stack->pushBool(true);
@@ -929,7 +929,7 @@ bool UIButton::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
const char *filename = stack->pop()->getString();
if (!_imageHover || DID_FAIL(_imageHover->loadFile(filename))) {
delete _imageHover;
- _imageHover = NULL;
+ _imageHover = nullptr;
stack->pushBool(false);
} else {
stack->pushBool(true);
@@ -977,7 +977,7 @@ bool UIButton::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
const char *filename = stack->pop()->getString();
if (!_imagePress || DID_FAIL(_imagePress->loadFile(filename))) {
delete _imagePress;
- _imagePress = NULL;
+ _imagePress = nullptr;
stack->pushBool(false);
} else {
stack->pushBool(true);
@@ -1025,7 +1025,7 @@ bool UIButton::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
const char *filename = stack->pop()->getString();
if (!_imageFocus || DID_FAIL(_imageFocus->loadFile(filename))) {
delete _imageFocus;
- _imageFocus = NULL;
+ _imageFocus = nullptr;
stack->pushBool(false);
} else {
stack->pushBool(true);
diff --git a/engines/wintermute/ui/ui_button.h b/engines/wintermute/ui/ui_button.h
index 93333a2534..fea264976f 100644
--- a/engines/wintermute/ui/ui_button.h
+++ b/engines/wintermute/ui/ui_button.h
@@ -62,7 +62,7 @@ public:
UITiledImage *_backHover;
UITiledImage *_backDisable;
UITiledImage *_backFocus;
- UIButton(BaseGame *inGame = NULL);
+ UIButton(BaseGame *inGame = nullptr);
virtual ~UIButton();
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
diff --git a/engines/wintermute/ui/ui_edit.cpp b/engines/wintermute/ui/ui_edit.cpp
index a3283d5a01..0a2e6f13bc 100644
--- a/engines/wintermute/ui/ui_edit.cpp
+++ b/engines/wintermute/ui/ui_edit.cpp
@@ -56,12 +56,12 @@ IMPLEMENT_PERSISTENT(UIEdit, false)
UIEdit::UIEdit(BaseGame *inGame) : UIObject(inGame) {
_type = UI_EDIT;
- _fontSelected = NULL;
+ _fontSelected = nullptr;
_selStart = _selEnd = 10000;
_scrollOffset = 0;
- _cursorChar = NULL;
+ _cursorChar = nullptr;
setCursorChar("|");
_cursorBlinkRate = 600;
@@ -88,14 +88,14 @@ UIEdit::~UIEdit() {
}
delete[] _cursorChar;
- _cursorChar = NULL;
+ _cursorChar = nullptr;
}
//////////////////////////////////////////////////////////////////////////
bool UIEdit::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "UIEdit::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -194,7 +194,7 @@ bool UIEdit::loadBuffer(byte *buffer, bool complete) {
_back = new UITiledImage(_gameRef);
if (!_back || DID_FAIL(_back->loadFile((char *)params))) {
delete _back;
- _back = NULL;
+ _back = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -204,7 +204,7 @@ bool UIEdit::loadBuffer(byte *buffer, bool complete) {
_image = new BaseSprite(_gameRef);
if (!_image || DID_FAIL(_image->loadFile((char *)params))) {
delete _image;
- _image = NULL;
+ _image = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -263,7 +263,7 @@ bool UIEdit::loadBuffer(byte *buffer, bool complete) {
_cursor = new BaseSprite(_gameRef);
if (!_cursor || DID_FAIL(_cursor->loadFile((char *)params))) {
delete _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -388,7 +388,7 @@ bool UIEdit::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
_gameRef->_fontStorage->removeFont(_fontSelected);
}
_fontSelected = _gameRef->_fontStorage->addFont(stack->pop()->getString());
- stack->pushBool(_fontSelected != NULL);
+ stack->pushBool(_fontSelected != nullptr);
return STATUS_OK;
} else {
@@ -579,7 +579,7 @@ bool UIEdit::display(int offsetX, int offsetY) {
_back->display(offsetX + _posX, offsetY + _posY, _width, _height);
}
if (_image) {
- _image->draw(offsetX + _posX, offsetY + _posY, NULL);
+ _image->draw(offsetX + _posX, offsetY + _posY, nullptr);
}
// prepare fonts
@@ -589,7 +589,7 @@ bool UIEdit::display(int offsetX, int offsetY) {
if (_font) {
font = _font;
} else {
- font = _gameRef->_systemFont;
+ font = _gameRef->getSystemFont();
}
if (_fontSelected) {
@@ -726,7 +726,7 @@ bool UIEdit::display(int offsetX, int offsetY) {
}
- _gameRef->_renderer->addRectToList(new BaseActiveRect(_gameRef, this, NULL, offsetX + _posX, offsetY + _posY, _width, _height, 100, 100, false));
+ _gameRef->_renderer->addRectToList(new BaseActiveRect(_gameRef, this, nullptr, offsetX + _posX, offsetY + _posY, _width, _height, 100, 100, false));
_gameRef->_textEncoding = OrigEncoding;
diff --git a/engines/wintermute/ui/ui_entity.cpp b/engines/wintermute/ui/ui_entity.cpp
index 1cb4e0926b..00d442e895 100644
--- a/engines/wintermute/ui/ui_entity.cpp
+++ b/engines/wintermute/ui/ui_entity.cpp
@@ -43,7 +43,7 @@ IMPLEMENT_PERSISTENT(UIEntity, false)
//////////////////////////////////////////////////////////////////////////
UIEntity::UIEntity(BaseGame *inGame) : UIObject(inGame) {
_type = UI_CUSTOM;
- _entity = NULL;
+ _entity = nullptr;
}
@@ -52,14 +52,14 @@ UIEntity::~UIEntity() {
if (_entity) {
_gameRef->unregisterObject(_entity);
}
- _entity = NULL;
+ _entity = nullptr;
}
//////////////////////////////////////////////////////////////////////////
bool UIEntity::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "UIEntity::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -223,7 +223,7 @@ bool UIEntity::setEntity(const char *filename) {
_entity = new AdEntity(_gameRef);
if (!_entity || DID_FAIL(_entity->loadFile(filename))) {
delete _entity;
- _entity = NULL;
+ _entity = nullptr;
return STATUS_FAILED;
} else {
_entity->_nonIntMouseEvents = true;
diff --git a/engines/wintermute/ui/ui_object.cpp b/engines/wintermute/ui/ui_object.cpp
index 8e5bae993c..9dea3dadf9 100644
--- a/engines/wintermute/ui/ui_object.cpp
+++ b/engines/wintermute/ui/ui_object.cpp
@@ -43,27 +43,27 @@ IMPLEMENT_PERSISTENT(UIObject, false)
//////////////////////////////////////////////////////////////////////////
UIObject::UIObject(BaseGame *inGame) : BaseObject(inGame) {
- _back = NULL;
- _image = NULL;
- _font = NULL;
- _text = NULL;
+ _back = nullptr;
+ _image = nullptr;
+ _font = nullptr;
+ _text = nullptr;
_sharedFonts = _sharedImages = false;
_width = _height = 0;
- _listenerObject = NULL;
- _listenerParamObject = NULL;
+ _listenerObject = nullptr;
+ _listenerParamObject = nullptr;
_listenerParamDWORD = 0;
_disable = false;
_visible = true;
_type = UI_UNKNOWN;
- _parent = NULL;
+ _parent = nullptr;
_parentNotify = false;
- _focusedWidget = NULL;
+ _focusedWidget = nullptr;
_canFocus = false;
_nonIntMouseEvents = true;
@@ -91,7 +91,7 @@ UIObject::~UIObject() {
delete[] _text;
}
- _focusedWidget = NULL; // ref only
+ _focusedWidget = nullptr; // ref only
}
@@ -168,11 +168,11 @@ bool UIObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
_gameRef->_fontStorage->removeFont(_font);
}
if (val->isNULL()) {
- _font = NULL;
+ _font = nullptr;
stack->pushBool(true);
} else {
_font = _gameRef->_fontStorage->addFont(val->getString());
- stack->pushBool(_font != NULL);
+ stack->pushBool(_font != nullptr);
}
return STATUS_OK;
}
@@ -187,7 +187,7 @@ bool UIObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
/* const char *filename = */ val->getString();
delete _image;
- _image = NULL;
+ _image = nullptr;
if (val->isNULL()) {
stack->pushBool(true);
return STATUS_OK;
@@ -196,7 +196,7 @@ bool UIObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
_image = new BaseSprite(_gameRef);
if (!_image || DID_FAIL(_image->loadFile(val->getString()))) {
delete _image;
- _image = NULL;
+ _image = nullptr;
stack->pushBool(false);
} else {
stack->pushBool(true);
diff --git a/engines/wintermute/ui/ui_object.h b/engines/wintermute/ui/ui_object.h
index ec2ea33de1..c77acfef41 100644
--- a/engines/wintermute/ui/ui_object.h
+++ b/engines/wintermute/ui/ui_object.h
@@ -60,7 +60,7 @@ public:
bool _visible;
UITiledImage *_back;
bool _disable;
- UIObject(BaseGame *inGame = NULL);
+ UIObject(BaseGame *inGame = nullptr);
virtual ~UIObject();
int _width;
int _height;
diff --git a/engines/wintermute/ui/ui_text.cpp b/engines/wintermute/ui/ui_text.cpp
index 2c10f176c7..3b5adf07b7 100644
--- a/engines/wintermute/ui/ui_text.cpp
+++ b/engines/wintermute/ui/ui_text.cpp
@@ -69,14 +69,14 @@ bool UIText::display(int offsetX, int offsetY) {
BaseFont *font = _font;
if (!font) {
- font = _gameRef->_systemFont;
+ font = _gameRef->getSystemFont();
}
if (_back) {
_back->display(offsetX + _posX, offsetY + _posY, _width, _height);
}
if (_image) {
- _image->draw(offsetX + _posX, offsetY + _posY, NULL);
+ _image->draw(offsetX + _posX, offsetY + _posY, nullptr);
}
if (font && _text) {
@@ -104,7 +104,7 @@ bool UIText::display(int offsetX, int offsetY) {
//////////////////////////////////////////////////////////////////////////
bool UIText::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "UIText::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -203,7 +203,7 @@ bool UIText::loadBuffer(byte *buffer, bool complete) {
_back = new UITiledImage(_gameRef);
if (!_back || DID_FAIL(_back->loadFile((char *)params))) {
delete _back;
- _back = NULL;
+ _back = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -213,7 +213,7 @@ bool UIText::loadBuffer(byte *buffer, bool complete) {
_image = new BaseSprite(_gameRef);
if (!_image || DID_FAIL(_image->loadFile((char *)params))) {
delete _image;
- _image = NULL;
+ _image = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -274,7 +274,7 @@ bool UIText::loadBuffer(byte *buffer, bool complete) {
_cursor = new BaseSprite(_gameRef);
if (!_cursor || DID_FAIL(_cursor->loadFile((char *)params))) {
delete _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
cmd = PARSERR_GENERIC;
}
break;
diff --git a/engines/wintermute/ui/ui_text.h b/engines/wintermute/ui/ui_text.h
index da4d113500..11dcdb166d 100644
--- a/engines/wintermute/ui/ui_text.h
+++ b/engines/wintermute/ui/ui_text.h
@@ -40,7 +40,7 @@ private:
public:
virtual bool display(int offsetX, int offsetY);
DECLARE_PERSISTENT(UIText, UIObject)
- UIText(BaseGame *inGame = NULL);
+ UIText(BaseGame *inGame = nullptr);
virtual ~UIText();
TTextAlign _textAlign;
TVerticalAlign _verticalAlign;
diff --git a/engines/wintermute/ui/ui_tiled_image.cpp b/engines/wintermute/ui/ui_tiled_image.cpp
index 2b337330c7..be9f87cf58 100644
--- a/engines/wintermute/ui/ui_tiled_image.cpp
+++ b/engines/wintermute/ui/ui_tiled_image.cpp
@@ -42,7 +42,7 @@ IMPLEMENT_PERSISTENT(UITiledImage, false)
//////////////////////////////////////////////////////////////////////////
UITiledImage::UITiledImage(BaseGame *inGame) : BaseObject(inGame) {
- _image = NULL;
+ _image = nullptr;
BasePlatform::setRectEmpty(&_upLeft);
BasePlatform::setRectEmpty(&_upMiddle);
@@ -59,7 +59,7 @@ UITiledImage::UITiledImage(BaseGame *inGame) : BaseObject(inGame) {
//////////////////////////////////////////////////////////////////////////
UITiledImage::~UITiledImage() {
delete _image;
- _image = NULL;
+ _image = nullptr;
}
@@ -104,14 +104,11 @@ bool UITiledImage::display(int x, int y, int width, int height) {
}
// tiles
- yyy = y + (_upMiddle.bottom - _upMiddle.top);
- for (row = 0; row < nuRows; row++) {
+ if (nuRows > 0 && nuColumns > 0) {
+ yyy = y + (_upMiddle.bottom - _upMiddle.top);
xxx = x + (_upLeft.right - _upLeft.left);
- for (col = 0; col < nuColumns; col++) {
- _image->_surface->displayTrans(xxx, yyy, _middleMiddle);
- xxx += tileWidth;
- }
- yyy += tileWidth;
+ _image->_surface->displayTrans(xxx, yyy, _middleMiddle);
+ _image->_surface->repeatLastDisplayOp(tileWidth, tileWidth, nuColumns, nuRows);
}
_gameRef->_renderer->endSpriteBatch();
@@ -123,7 +120,7 @@ bool UITiledImage::display(int x, int y, int width, int height) {
//////////////////////////////////////////////////////////////////////////
bool UITiledImage::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "UITiledImage::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -208,7 +205,7 @@ bool UITiledImage::loadBuffer(byte *buffer, bool complete) {
_image = new BaseSubFrame(_gameRef);
if (!_image || DID_FAIL(_image->setSurface((char *)params))) {
delete _image;
- _image = NULL;
+ _image = nullptr;
cmd = PARSERR_GENERIC;
}
break;
diff --git a/engines/wintermute/ui/ui_tiled_image.h b/engines/wintermute/ui/ui_tiled_image.h
index edea84f346..ded7a285dd 100644
--- a/engines/wintermute/ui/ui_tiled_image.h
+++ b/engines/wintermute/ui/ui_tiled_image.h
@@ -44,7 +44,7 @@ public:
virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
bool display(int x, int y, int width, int height);
- UITiledImage(BaseGame *inGame = NULL);
+ UITiledImage(BaseGame *inGame = nullptr);
virtual ~UITiledImage();
private:
BaseSubFrame *_image;
diff --git a/engines/wintermute/ui/ui_window.cpp b/engines/wintermute/ui/ui_window.cpp
index 9606486efb..39bc1bdcfe 100644
--- a/engines/wintermute/ui/ui_window.cpp
+++ b/engines/wintermute/ui/ui_window.cpp
@@ -59,9 +59,9 @@ UIWindow::UIWindow(BaseGame *inGame) : UIObject(inGame) {
_titleAlign = TAL_LEFT;
_transparent = false;
- _backInactive = NULL;
- _fontInactive = NULL;
- _imageInactive = NULL;
+ _backInactive = nullptr;
+ _fontInactive = nullptr;
+ _imageInactive = nullptr;
_type = UI_WINDOW;
_canFocus = true;
@@ -70,8 +70,8 @@ UIWindow::UIWindow(BaseGame *inGame) : UIObject(inGame) {
_dragFrom.x = _dragFrom.y = 0;
_mode = WINDOW_NORMAL;
- _shieldWindow = NULL;
- _shieldButton = NULL;
+ _shieldWindow = nullptr;
+ _shieldButton = nullptr;
_fadeColor = 0x00000000;
_fadeBackground = false;
@@ -81,7 +81,7 @@ UIWindow::UIWindow(BaseGame *inGame) : UIObject(inGame) {
_inGame = false;
_clipContents = false;
- _viewport = NULL;
+ _viewport = nullptr;
_pauseMusic = true;
}
@@ -99,9 +99,9 @@ void UIWindow::cleanup() {
delete _shieldWindow;
delete _shieldButton;
delete _viewport;
- _shieldWindow = NULL;
- _shieldButton = NULL;
- _viewport = NULL;
+ _shieldWindow = nullptr;
+ _shieldButton = nullptr;
+ _viewport = nullptr;
delete _backInactive;
if (!_sharedFonts && _fontInactive) {
@@ -210,7 +210,7 @@ bool UIWindow::display(int offsetX, int offsetY) {
back->display(_posX + offsetX, _posY + offsetY, _width, _height);
}
if (image) {
- image->draw(_posX + offsetX, _posY + offsetY, _transparent ? NULL : this);
+ image->draw(_posX + offsetX, _posY + offsetY, _transparent ? nullptr : this);
}
if (!BasePlatform::isRectEmpty(&_titleRect) && font && _text) {
@@ -218,7 +218,7 @@ bool UIWindow::display(int offsetX, int offsetY) {
}
if (!_transparent && !image) {
- _gameRef->_renderer->addRectToList(new BaseActiveRect(_gameRef, this, NULL, _posX + offsetX, _posY + offsetY, _width, _height, 100, 100, false));
+ _gameRef->_renderer->addRectToList(new BaseActiveRect(_gameRef, this, nullptr, _posX + offsetX, _posY + offsetY, _width, _height, 100, 100, false));
}
for (uint32 i = 0; i < _widgets.size(); i++) {
@@ -240,7 +240,7 @@ bool UIWindow::display(int offsetX, int offsetY) {
//////////////////////////////////////////////////////////////////////////
bool UIWindow::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
+ if (buffer == nullptr) {
_gameRef->LOG(0, "UIWindow::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -374,7 +374,7 @@ bool UIWindow::loadBuffer(byte *buffer, bool complete) {
_back = new UITiledImage(_gameRef);
if (!_back || DID_FAIL(_back->loadFile((char *)params))) {
delete _back;
- _back = NULL;
+ _back = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -384,7 +384,7 @@ bool UIWindow::loadBuffer(byte *buffer, bool complete) {
_backInactive = new UITiledImage(_gameRef);
if (!_backInactive || DID_FAIL(_backInactive->loadFile((char *)params))) {
delete _backInactive;
- _backInactive = NULL;
+ _backInactive = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -394,7 +394,7 @@ bool UIWindow::loadBuffer(byte *buffer, bool complete) {
_image = new BaseSprite(_gameRef);
if (!_image || DID_FAIL(_image->loadFile((char *)params))) {
delete _image;
- _image = NULL;
+ _image = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -404,7 +404,7 @@ bool UIWindow::loadBuffer(byte *buffer, bool complete) {
_imageInactive = new BaseSprite(_gameRef);
if (!_imageInactive || DID_FAIL(_imageInactive->loadFile((char *)params))) {
delete _imageInactive;
- _imageInactive = NULL;
+ _imageInactive = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -473,7 +473,7 @@ bool UIWindow::loadBuffer(byte *buffer, bool complete) {
_cursor = new BaseSprite(_gameRef);
if (!_cursor || DID_FAIL(_cursor->loadFile((char *)params))) {
delete _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -482,7 +482,7 @@ bool UIWindow::loadBuffer(byte *buffer, bool complete) {
UIButton *btn = new UIButton(_gameRef);
if (!btn || DID_FAIL(btn->loadBuffer(params, false))) {
delete btn;
- btn = NULL;
+ btn = nullptr;
cmd = PARSERR_GENERIC;
} else {
btn->_parent = this;
@@ -495,7 +495,7 @@ bool UIWindow::loadBuffer(byte *buffer, bool complete) {
UIText *text = new UIText(_gameRef);
if (!text || DID_FAIL(text->loadBuffer(params, false))) {
delete text;
- text = NULL;
+ text = nullptr;
cmd = PARSERR_GENERIC;
} else {
text->_parent = this;
@@ -508,7 +508,7 @@ bool UIWindow::loadBuffer(byte *buffer, bool complete) {
UIEdit *edit = new UIEdit(_gameRef);
if (!edit || DID_FAIL(edit->loadBuffer(params, false))) {
delete edit;
- edit = NULL;
+ edit = nullptr;
cmd = PARSERR_GENERIC;
} else {
edit->_parent = this;
@@ -521,7 +521,7 @@ bool UIWindow::loadBuffer(byte *buffer, bool complete) {
UIWindow *win = new UIWindow(_gameRef);
if (!win || DID_FAIL(win->loadBuffer(params, false))) {
delete win;
- win = NULL;
+ win = nullptr;
cmd = PARSERR_GENERIC;
} else {
win->_parent = this;
@@ -616,7 +616,7 @@ bool UIWindow::loadBuffer(byte *buffer, bool complete) {
_fadeColor = BYTETORGBA(fadeR, fadeG, fadeB, fadeA);
}
- _focusedWidget = NULL;
+ _focusedWidget = nullptr;
return STATUS_OK;
}
@@ -795,7 +795,7 @@ bool UIWindow::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
_gameRef->_fontStorage->removeFont(_fontInactive);
}
_fontInactive = _gameRef->_fontStorage->addFont(stack->pop()->getString());
- stack->pushBool(_fontInactive != NULL);
+ stack->pushBool(_fontInactive != nullptr);
return STATUS_OK;
}
@@ -811,7 +811,7 @@ bool UIWindow::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
const char *filename = stack->pop()->getString();
if (!_imageInactive || DID_FAIL(_imageInactive->loadFile(filename))) {
delete _imageInactive;
- _imageInactive = NULL;
+ _imageInactive = nullptr;
stack->pushBool(false);
} else {
stack->pushBool(true);
@@ -1294,7 +1294,7 @@ bool UIWindow::moveFocus(bool forward) {
}
}
if (!found) {
- _focusedWidget = NULL;
+ _focusedWidget = nullptr;
}
if (!_focusedWidget) {
diff --git a/engines/wintermute/utils/string_util.cpp b/engines/wintermute/utils/string_util.cpp
index 7b3b0e1297..9fffad85cd 100644
--- a/engines/wintermute/utils/string_util.cpp
+++ b/engines/wintermute/utils/string_util.cpp
@@ -205,7 +205,7 @@ bool StringUtil::isUtf8BOM(const byte *buffer, uint32 bufferSize) {
//////////////////////////////////////////////////////////////////////////
int StringUtil::indexOf(const WideString &str, const WideString &toFind, size_t startFrom) {
const char *index = strstr(str.c_str(), toFind.c_str());
- if (index == NULL) {
+ if (index == nullptr) {
return -1;
} else {
return index - str.c_str();
@@ -213,8 +213,10 @@ int StringUtil::indexOf(const WideString &str, const WideString &toFind, size_t
}
Common::String StringUtil::encodeSetting(const Common::String &str) {
- if (str.contains('=')) {
- error("Setting contains '='");
+ for (uint32 i = 0; i < str.size(); i++) {
+ if ((str[i] < 33) || (str[i] == '=') || (str[i] > 126)) {
+ error("Setting contains illegal characters: %s", str.c_str());
+ }
}
return str;
}
diff --git a/engines/wintermute/utils/utils.cpp b/engines/wintermute/utils/utils.cpp
index 824b16ccdb..6e0d69edbe 100644
--- a/engines/wintermute/utils/utils.cpp
+++ b/engines/wintermute/utils/utils.cpp
@@ -96,7 +96,7 @@ char *BaseUtils::setString(char **string, const char *value) {
char *BaseUtils::strEntry(int entry, const char *str, const char delim) {
int numEntries = 0;
- const char *start = NULL;
+ const char *start = nullptr;
int len = 0;
for (uint32 i = 0; i <= strlen(str); i++) {
@@ -117,7 +117,7 @@ char *BaseUtils::strEntry(int entry, const char *str, const char delim) {
}
}
}
- return NULL;
+ return nullptr;
}
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/video/video_player.cpp b/engines/wintermute/video/video_player.cpp
index 2577b8aedc..42857b5c1b 100644
--- a/engines/wintermute/video/video_player.cpp
+++ b/engines/wintermute/video/video_player.cpp
@@ -50,7 +50,7 @@ bool VideoPlayer::setDefaults() {
_playPosX = _playPosY = 0;
_playZoom = 0.0f;
- _filename = NULL;
+ _filename = nullptr;
_slowRendering = false;
diff --git a/engines/wintermute/video/video_player.h b/engines/wintermute/video/video_player.h
index d5466da679..a49e910b0c 100644
--- a/engines/wintermute/video/video_player.h
+++ b/engines/wintermute/video/video_player.h
@@ -58,7 +58,7 @@ public:
bool _playing;
bool display();
bool update();
- bool initialize(const char *inFilename, const char *subtitleFile = NULL);
+ bool initialize(const char *inFilename, const char *subtitleFile = nullptr);
bool cleanup();
VideoPlayer(BaseGame *inGame);
virtual ~VideoPlayer();
diff --git a/engines/wintermute/video/video_theora_player.cpp b/engines/wintermute/video/video_theora_player.cpp
index d14c807e11..1f6842c416 100644
--- a/engines/wintermute/video/video_theora_player.cpp
+++ b/engines/wintermute/video/video_theora_player.cpp
@@ -51,7 +51,7 @@ VideoTheoraPlayer::VideoTheoraPlayer(BaseGame *inGame) : BaseClass(inGame) {
//////////////////////////////////////////////////////////////////////////
void VideoTheoraPlayer::SetDefaults() {
- _file = NULL;
+ _file = nullptr;
_filename = "";
_startTime = 0;
_looping = false;
@@ -68,8 +68,8 @@ void VideoTheoraPlayer::SetDefaults() {
_playbackStarted = false;
_dontDropFrames = false;
- _texture = NULL;
- _alphaImage = NULL;
+ _texture = nullptr;
+ _alphaImage = nullptr;
_alphaFilename = "";
_frameRendered = false;
@@ -84,10 +84,10 @@ void VideoTheoraPlayer::SetDefaults() {
_savedState = THEORA_STATE_NONE;
_savedPos = 0;
_volume = 100;
- _theoraDecoder = NULL;
+ _theoraDecoder = nullptr;
// TODO: Add subtitles-support
- //_subtitler = NULL;
+ //_subtitler = nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -100,7 +100,7 @@ VideoTheoraPlayer::~VideoTheoraPlayer(void) {
void VideoTheoraPlayer::cleanup() {
if (_file) {
BaseFileManager::getEngineInstance()->closeFile(_file);
- _file = NULL;
+ _file = nullptr;
}
_surface.free();
@@ -108,11 +108,11 @@ void VideoTheoraPlayer::cleanup() {
_theoraDecoder->close();
}
delete _theoraDecoder;
- _theoraDecoder = NULL;
+ _theoraDecoder = nullptr;
delete _alphaImage;
- _alphaImage = NULL;
+ _alphaImage = nullptr;
delete _texture;
- _texture = NULL;
+ _texture = nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -157,7 +157,7 @@ bool VideoTheoraPlayer::resetStream() {
_theoraDecoder->close();
}
delete _theoraDecoder;
- _theoraDecoder = NULL;
+ _theoraDecoder = nullptr;
_file = BaseFileManager::getEngineInstance()->openFile(_filename, true, false);
if (!_file) {
@@ -419,7 +419,7 @@ bool VideoTheoraPlayer::setAlphaImage(const Common::String &filename) {
_alphaImage = new BaseImage();
if (!_alphaImage || DID_FAIL(_alphaImage->loadFile(filename))) {
delete _alphaImage;
- _alphaImage = NULL;
+ _alphaImage = nullptr;
_alphaFilename = "";
return STATUS_FAILED;
}
diff --git a/engines/wintermute/video/video_theora_player.h b/engines/wintermute/video/video_theora_player.h
index 593c1b9666..7a6742271c 100644
--- a/engines/wintermute/video/video_theora_player.h
+++ b/engines/wintermute/video/video_theora_player.h
@@ -62,7 +62,7 @@ public:
//CVidSubtitler *_subtitler;
// control methods
- bool initialize(const Common::String &filename, const Common::String &subtitleFile = NULL);
+ bool initialize(const Common::String &filename, const Common::String &subtitleFile = nullptr);
bool initializeSimple();
bool update();
bool play(TVideoPlayback type = VID_PLAY_CENTER, int x = 0, int y = 0, bool freezeGame = false, bool freezeMusic = true, bool looping = false, uint32 startTime = 0, float forceZoom = -1.0f, int volume = -1);
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index d2b761afd7..ad26c42510 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -34,6 +34,7 @@
#include "engines/util.h"
#include "engines/wintermute/ad/ad_game.h"
#include "engines/wintermute/wintermute.h"
+#include "engines/wintermute/debugger.h"
#include "engines/wintermute/platform_osystem.h"
#include "engines/wintermute/base/base_engine.h"
@@ -48,6 +49,8 @@ namespace Wintermute {
// This might not be the prettiest solution
WintermuteEngine::WintermuteEngine() : Engine(g_system) {
_game = new AdGame("");
+ _debugger = nullptr;
+ _trigDebug = false;
}
WintermuteEngine::WintermuteEngine(OSystem *syst, const ADGameDescription *desc)
@@ -55,6 +58,7 @@ WintermuteEngine::WintermuteEngine(OSystem *syst, const ADGameDescription *desc)
// Put your engine in a sane state, but do nothing big yet;
// in particular, do not load data from files; rather, if you
// need to do such things, do them from init().
+ ConfMan.registerDefault("show_fps","false");
// Do not initialize graphics here
@@ -70,14 +74,16 @@ WintermuteEngine::WintermuteEngine(OSystem *syst, const ADGameDescription *desc)
DebugMan.addDebugChannel(kWintermuteDebugAudio, "audio", "audio-playback-related issues");
DebugMan.addDebugChannel(kWintermuteDebugGeneral, "general", "various issues not covered by any of the above");
- _game = NULL;
+ _game = nullptr;
+ _debugger = nullptr;
+ _trigDebug = false;
}
WintermuteEngine::~WintermuteEngine() {
// Dispose your resources here
deinit();
delete _game;
- delete _console;
+ delete _debugger;
// Remove all of our debug levels here
DebugMan.clearAllDebugChannels();
@@ -106,7 +112,7 @@ Common::Error WintermuteEngine::run() {
}
// Create debugger console. It requires GFX to be initialized
- _console = new Console(this);
+ _debugger = new Console(this);
// DebugMan.enableDebugChannel("enginelog");
debugC(1, kWintermuteDebugLog, "Engine Debug-LOG enabled");
@@ -133,7 +139,7 @@ int WintermuteEngine::init() {
return 1;
}
BaseEngine::instance().setGameRef(_game);
- BasePlatform::initialize(_game, 0, NULL);
+ BasePlatform::initialize(this, _game, 0, nullptr);
bool windowedMode = !ConfMan.getBool("fullscreen");
@@ -168,7 +174,7 @@ int WintermuteEngine::init() {
if (DID_FAIL(_game->loadSettings("startup.settings"))) {
_game->LOG(0, "Error loading game settings.");
delete _game;
- _game = NULL;
+ _game = nullptr;
warning("Some of the essential files are missing. Please reinstall.");
return 2;
@@ -184,7 +190,7 @@ int WintermuteEngine::init() {
_game->LOG(ret, "Error initializing renderer. Exiting.");
delete _game;
- _game = NULL;
+ _game = nullptr;
return 3;
}
@@ -203,7 +209,7 @@ int WintermuteEngine::init() {
if (DID_FAIL(_game->loadFile(_game->_settingsGameFile ? _game->_settingsGameFile : "default.game"))) {
_game->LOG(ret, "Error loading game file. Exiting.");
delete _game;
- _game = NULL;
+ _game = nullptr;
return false;
}
@@ -232,11 +238,18 @@ int WintermuteEngine::messageLoop() {
const uint32 maxFPS = 60;
const uint32 frameTime = 2 * (uint32)((1.0 / maxFPS) * 1000);
while (!done) {
+ _debugger->onFrame();
+
Common::Event event;
while (_system->getEventManager()->pollEvent(event)) {
BasePlatform::handleEvent(&event);
}
+ if (_trigDebug) {
+ _debugger->attach();
+ _trigDebug = false;
+ }
+
if (_game && _game->_renderer->_active && _game->_renderer->_ready) {
_game->displayContent();
_game->displayQuickMsg();
@@ -265,13 +278,14 @@ int WintermuteEngine::messageLoop() {
if (_game) {
delete _game;
- _game = NULL;
+ _game = nullptr;
}
return 0;
}
void WintermuteEngine::deinit() {
BaseEngine::destroy();
+ BasePlatform::deinit();
}
Common::Error WintermuteEngine::loadGameState(int slot) {
@@ -295,9 +309,9 @@ bool WintermuteEngine::canLoadGameStateCurrently() {
bool WintermuteEngine::getGameInfo(const Common::FSList &fslist, Common::String &name, Common::String &caption) {
bool retVal = false;
caption = name = "(invalid)";
- Common::SeekableReadStream *stream = NULL;
+ Common::SeekableReadStream *stream = nullptr;
// Quick-fix, instead of possibly breaking the persistence-system, let's just roll with it
- BaseFileManager *fileMan = new BaseFileManager(Common::UNK_LANG);
+ BaseFileManager *fileMan = new BaseFileManager(Common::UNK_LANG, true);
fileMan->registerPackages(fslist);
stream = fileMan->openFile("startup.settings", false, false);
diff --git a/engines/wintermute/wintermute.h b/engines/wintermute/wintermute.h
index d24b120658..fcaa2840a9 100644
--- a/engines/wintermute/wintermute.h
+++ b/engines/wintermute/wintermute.h
@@ -48,6 +48,9 @@ public:
WintermuteEngine();
~WintermuteEngine();
+ virtual GUI::Debugger *getDebugger() { return _debugger; }
+ void trigDebugger() { _trigDebug = true; }
+
virtual Common::Error run();
virtual bool hasFeature(EngineFeature f) const;
Common::SaveFileManager *getSaveFileMan() { return _saveFileMan; }
@@ -58,19 +61,15 @@ public:
// For detection-purposes:
static bool getGameInfo(const Common::FSList &fslist, Common::String &name, Common::String &caption);
private:
+ bool _trigDebug;
int init();
void deinit();
int messageLoop();
- Console *_console;
+ GUI::Debugger *_debugger;
BaseGame *_game;
const ADGameDescription *_gameDescription;
-};
-// Example console class
-class Console : public GUI::Debugger {
-public:
- Console(WintermuteEngine *vm) {}
- virtual ~Console(void) {}
+ friend class Console;
};
} // End of namespace Wintermute
diff --git a/graphics/decoders/iff.cpp b/graphics/decoders/iff.cpp
new file mode 100644
index 0000000000..50c7b4f7de
--- /dev/null
+++ b/graphics/decoders/iff.cpp
@@ -0,0 +1,241 @@
+/* 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/iff_container.h"
+#include "common/stream.h"
+#include "common/util.h"
+
+#include "graphics/decoders/iff.h"
+
+namespace Graphics {
+
+IFFDecoder::IFFDecoder() {
+ _surface = 0;
+ _palette = 0;
+
+ destroy();
+}
+
+IFFDecoder::~IFFDecoder() {
+ destroy();
+}
+
+void IFFDecoder::destroy() {
+ if (_surface) {
+ _surface->free();
+ delete _surface;
+ _surface = 0;
+ }
+
+ if (_palette) {
+ delete[] _palette;
+ _palette = 0;
+ }
+
+ memset(&_header, 0, sizeof(Header));
+ _paletteRanges.clear();
+ _type = TYPE_UNKNOWN;
+ _paletteColorCount = 0;
+ _numRelevantPlanes = 8;
+ _pixelPacking = false;
+}
+
+bool IFFDecoder::loadStream(Common::SeekableReadStream &stream) {
+ destroy();
+
+ const uint32 form = stream.readUint32BE();
+
+ if (form != ID_FORM) {
+ warning("Failed reading IFF-file");
+ return false;
+ }
+
+ stream.skip(4);
+
+ const uint32 type = stream.readUint32BE();
+
+ switch (type) {
+ case ID_ILBM:
+ _type = TYPE_ILBM;
+ break;
+ case ID_PBM:
+ _type = TYPE_PBM;
+ break;
+ }
+
+ if (type == TYPE_UNKNOWN) {
+ warning("Failed reading IFF-file");
+ return false;
+ }
+
+ while (1) {
+ const uint32 chunkType = stream.readUint32BE();
+ const uint32 chunkSize = stream.readUint32BE();
+
+ if (stream.eos())
+ break;
+
+ switch (chunkType) {
+ case ID_BMHD:
+ loadHeader(stream);
+ break;
+ case ID_CMAP:
+ loadPalette(stream, chunkSize);
+ break;
+ case ID_CRNG:
+ loadPaletteRange(stream, chunkSize);
+ break;
+ case ID_BODY:
+ loadBitmap(stream);
+ break;
+ default:
+ stream.skip(chunkSize);
+ }
+ }
+
+ return true;
+}
+
+void IFFDecoder::loadHeader(Common::SeekableReadStream &stream) {
+ _header.width = stream.readUint16BE();
+ _header.height = stream.readUint16BE();
+ _header.x = stream.readUint16BE();
+ _header.y = stream.readUint16BE();
+ _header.numPlanes = stream.readByte();
+ _header.masking = stream.readByte();
+ _header.compression = stream.readByte();
+ _header.flags = stream.readByte();
+ _header.transparentColor = stream.readUint16BE();
+ _header.xAspect = stream.readByte();
+ _header.yAspect = stream.readByte();
+ _header.pageWidth = stream.readUint16BE();
+ _header.pageHeight = stream.readUint16BE();
+
+ assert(_header.width >= 1);
+ assert(_header.height >= 1);
+ assert(_header.numPlanes >= 1 && _header.numPlanes <= 8 && _header.numPlanes != 7);
+}
+
+void IFFDecoder::loadPalette(Common::SeekableReadStream &stream, const uint32 size) {
+ _palette = new byte[size];
+ stream.read(_palette, size);
+ _paletteColorCount = size / 3;
+}
+
+void IFFDecoder::loadPaletteRange(Common::SeekableReadStream &stream, const uint32 size) {
+ PaletteRange range;
+
+ range.timer = stream.readSint16BE();
+ range.step = stream.readSint16BE();
+ range.flags = stream.readSint16BE();
+ range.first = stream.readByte();
+ range.last = stream.readByte();
+
+ _paletteRanges.push_back(range);
+}
+
+void IFFDecoder::loadBitmap(Common::SeekableReadStream &stream) {
+ _numRelevantPlanes = MIN(_numRelevantPlanes, _header.numPlanes);
+
+ if (_numRelevantPlanes != 1 && _numRelevantPlanes != 2 && _numRelevantPlanes != 4)
+ _pixelPacking = false;
+
+ uint16 outPitch = _header.width;
+
+ if (_pixelPacking)
+ outPitch /= (8 / _numRelevantPlanes);
+
+ // FIXME: CLUT8 is not a proper format for packed bitmaps but there is no way to tell it to use 1, 2 or 4 bits per pixel
+ _surface = new Graphics::Surface();
+ _surface->create(outPitch, _header.height, Graphics::PixelFormat::createFormatCLUT8());
+
+ if (_type == TYPE_ILBM) {
+ uint32 scanlinePitch = ((_header.width + 15) >> 4) << 1;
+ byte *scanlines = new byte[scanlinePitch * _header.numPlanes];
+ byte *data = (byte *)_surface->pixels;
+
+ for (uint16 i = 0; i < _header.height; ++i) {
+ byte *scanline = scanlines;
+
+ for (uint16 j = 0; j < _header.numPlanes; ++j) {
+ uint16 outSize = scanlinePitch;
+
+ if (_header.compression) {
+ Common::PackBitsReadStream packStream(stream);
+ packStream.read(scanline, outSize);
+ } else {
+ stream.read(scanline, outSize);
+ }
+
+ scanline += outSize;
+ }
+
+ packPixels(scanlines, data, scanlinePitch, outPitch);
+ data += outPitch;
+ }
+
+ delete[] scanlines;
+ } else if (_type == TYPE_PBM) {
+ byte *data = (byte *)_surface->pixels;
+ uint32 outSize = _header.width * _header.height;
+
+ if (_header.compression) {
+ Common::PackBitsReadStream packStream(stream);
+ packStream.read(data, outSize);
+ } else {
+ stream.read(data, outSize);
+ }
+ }
+}
+
+void IFFDecoder::packPixels(byte *scanlines, byte *data, const uint16 scanlinePitch, const uint16 outPitch) {
+ uint32 numPixels = _header.width;
+
+ if (_pixelPacking)
+ numPixels = outPitch * (8 / _numRelevantPlanes);
+
+ for (uint32 x = 0; x < numPixels; ++x) {
+ byte *scanline = scanlines;
+ byte pixel = 0;
+ byte offset = x >> 3;
+ byte bit = 0x80 >> (x & 7);
+
+ // first build a pixel by scanning all the usable planes in the input
+ for (uint32 plane = 0; plane < _numRelevantPlanes; ++plane) {
+ if (scanline[offset] & bit)
+ pixel |= (1 << plane);
+
+ scanline += scanlinePitch;
+ }
+
+ // then output the pixel according to the requested packing
+ if (!_pixelPacking)
+ data[x] = pixel;
+ else if (_numRelevantPlanes == 1)
+ data[x / 8] |= (pixel << (x & 7));
+ else if (_numRelevantPlanes == 2)
+ data[x / 4] |= (pixel << ((x & 3) << 1));
+ else if (_numRelevantPlanes == 4)
+ data[x / 2] |= (pixel << ((x & 1) << 2));
+ }
+}
+
+} // End of namespace Graphics
diff --git a/graphics/decoders/iff.h b/graphics/decoders/iff.h
new file mode 100644
index 0000000000..beac62e519
--- /dev/null
+++ b/graphics/decoders/iff.h
@@ -0,0 +1,119 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * @file
+ * Image decoder used in engines:
+ * - gob
+ * - parallaction
+ * - queen
+ * - saga
+ */
+
+#ifndef GRAPHICS_DECODERS_IFF_H
+#define GRAPHICS_DECODERS_IFF_H
+
+#include "common/array.h"
+#include "common/endian.h"
+
+#include "graphics/surface.h"
+#include "graphics/decoders/image_decoder.h"
+
+namespace Common {
+class SeekableReadStream;
+}
+
+namespace Graphics {
+
+struct Surface;
+
+class IFFDecoder : public ImageDecoder {
+public:
+ struct Header {
+ uint16 width, height;
+ uint16 x, y;
+ byte numPlanes;
+ byte masking;
+ byte compression;
+ byte flags;
+ uint16 transparentColor;
+ byte xAspect, yAspect;
+ uint16 pageWidth, pageHeight;
+ };
+
+ struct PaletteRange {
+ int16 timer, step, flags;
+ byte first, last;
+ };
+
+ enum Type {
+ TYPE_UNKNOWN = 0,
+ TYPE_ILBM,
+ TYPE_PBM
+ };
+
+ IFFDecoder();
+ virtual ~IFFDecoder();
+
+ // ImageDecoder API
+ void destroy();
+ bool loadStream(Common::SeekableReadStream &stream);
+ const Header *getHeader() const { return &_header; }
+ const Surface *getSurface() const { return _surface; }
+ const byte *getPalette() const { return _palette; }
+ const Common::Array<PaletteRange> &getPaletteRanges() const { return _paletteRanges; }
+ uint16 getPaletteColorCount() const { return _paletteColorCount; }
+
+ /**
+ * The number of planes to decode, also determines the pixel packing if _packPixels is true.
+ * 8 == decode all planes, map 1 pixel in 1 byte. (default, no packing even if _packPixels is true)
+ */
+ void setNumRelevantPlanes(const uint8 numRelevantPlanes) { _numRelevantPlanes = numRelevantPlanes; }
+
+ /**
+ * Enables pixel packing, the amount of packing is determined by _numRelevantPlanes
+ * 1 == decode first plane, pack 8 pixels in 1 byte. This makes _surface->w 1/8th of _header.width
+ * 2 == decode first 2 planes, pack 4 pixels in 1 byte. This makes _surface->w 1/4th of _header.width
+ * 4 == decode first 4 planes, pack 2 pixels in 1 byte. This makes _surface->w half of _header.width
+ * Packed bitmaps won't have a proper surface format since there is no way to tell it to use 1, 2 or 4 bits per pixel
+ */
+ void setPixelPacking(const bool pixelPacking) { _pixelPacking = pixelPacking; }
+private:
+
+ Header _header;
+ Surface *_surface;
+ byte *_palette;
+ Common::Array<PaletteRange> _paletteRanges;
+ Type _type;
+ uint16 _paletteColorCount;
+ uint8 _numRelevantPlanes;
+ bool _pixelPacking;
+
+ void loadHeader(Common::SeekableReadStream &stream);
+ void loadPalette(Common::SeekableReadStream &stream, const uint32 size);
+ void loadPaletteRange(Common::SeekableReadStream &stream, const uint32 size);
+ void loadBitmap(Common::SeekableReadStream &stream);
+ void packPixels(byte *scanlines, byte *data, const uint16 scanlinePitch, const uint16 outPitch);
+};
+
+} // End of namespace Graphics
+
+#endif // GRAPHICS_DECODERS_IFF_H
diff --git a/graphics/decoders/jpeg.cpp b/graphics/decoders/jpeg.cpp
index 08bc1f7a3d..8adbab133f 100644
--- a/graphics/decoders/jpeg.cpp
+++ b/graphics/decoders/jpeg.cpp
@@ -74,7 +74,7 @@ const Surface *JPEGDecoder::getSurface() const {
// Create an RGBA8888 surface
_rgbSurface = new Graphics::Surface();
- _rgbSurface->create(_w, _h, Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0));
+ _rgbSurface->create(_w, _h, Graphics::PixelFormat(4, 8, 8, 8, 0, 24, 16, 8, 0));
// Get our component surfaces
const Graphics::Surface *yComponent = getComponent(1);
@@ -215,28 +215,34 @@ bool JPEGDecoder::loadStream(Common::SeekableReadStream &stream) {
bool JPEGDecoder::readJFIF() {
uint16 length = _stream->readUint16BE();
uint32 tag = _stream->readUint32BE();
+
if (tag != MKTAG('J', 'F', 'I', 'F')) {
warning("JPEGDecoder::readJFIF() tag mismatch");
return false;
}
+
if (_stream->readByte() != 0) { // NULL
warning("JPEGDecoder::readJFIF() NULL mismatch");
return false;
}
+
byte majorVersion = _stream->readByte();
byte minorVersion = _stream->readByte();
- if (majorVersion != 1 || minorVersion != 1)
- warning("JPEGDecoder::readJFIF() Non-v1.1 JPEGs may not be handled correctly");
+ if (majorVersion != 1 || minorVersion > 2)
+ warning("JPEGDecoder::readJFIF(): v%d.%02d JPEGs may not be handled correctly", majorVersion, minorVersion);
+
/* byte densityUnits = */_stream->readByte();
/* uint16 xDensity = */_stream->readUint16BE();
/* uint16 yDensity = */_stream->readUint16BE();
byte thumbW = _stream->readByte();
byte thumbH = _stream->readByte();
+
_stream->seek(thumbW * thumbH * 3, SEEK_CUR); // Ignore thumbnail
if (length != (thumbW * thumbH * 3) + 16) {
warning("JPEGDecoder::readJFIF() length mismatch");
return false;
}
+
return true;
}
diff --git a/graphics/decoders/png.cpp b/graphics/decoders/png.cpp
index 4f917b44b1..11e26162eb 100644
--- a/graphics/decoders/png.cpp
+++ b/graphics/decoders/png.cpp
@@ -227,7 +227,7 @@ bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) {
png_read_end(pngPtr, NULL);
// Destroy libpng structures
- png_destroy_read_struct(&pngPtr, &infoPtr, NULL);
+ png_destroy_read_struct(&pngPtr, &infoPtr, &endInfo);
// We no longer need the file stream, thus close it here
_stream = 0;
diff --git a/graphics/iff.cpp b/graphics/iff.cpp
deleted file mode 100644
index 4011126bd3..0000000000
--- a/graphics/iff.cpp
+++ /dev/null
@@ -1,268 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "graphics/iff.h"
-#include "graphics/surface.h"
-
-#include "common/endian.h"
-#include "common/func.h"
-#include "common/iff_container.h"
-#include "common/textconsole.h"
-#include "common/util.h"
-
-namespace Graphics {
-
-void BMHD::load(Common::ReadStream *stream) {
- assert(stream);
- stream->read(this, sizeof(BMHD));
- width = FROM_BE_16(width);
- height = FROM_BE_16(height);
- x = FROM_BE_16(x);
- y = FROM_BE_16(y);
- transparentColor = FROM_BE_16(transparentColor);
- pageWidth = FROM_BE_16(pageWidth);
- pageHeight = FROM_BE_16(pageHeight);
-}
-
-
-void ILBMDecoder::loadHeader(Common::ReadStream *stream) {
- _header.load(stream);
-}
-
-void ILBMDecoder::loadBitmap(uint32 mode, byte *buffer, Common::ReadStream *stream) {
- assert(stream);
- uint32 numPlanes = MIN(mode & ILBM_UNPACK_PLANES, (uint32)_header.depth);
- assert(numPlanes == 1 || numPlanes == 2 || numPlanes == 3 || numPlanes == 4 || numPlanes == 5 || numPlanes == 8);
-
- bool packPixels = (mode & ILBM_PACK_PLANES) != 0;
- if (numPlanes != 1 && numPlanes != 2 && numPlanes != 4) {
- packPixels = false;
- }
-
- uint32 outPitch = _header.width;
- if (packPixels) {
- outPitch /= (8 / numPlanes);
- }
- byte *out = buffer;
-
- switch (_header.pack) {
- case 1: { // PackBits compressed bitmap
- Graphics::PackBitsReadStream packStream(*stream);
-
- // setup a buffer to hold enough data to build a line in the output
- uint32 scanlineWidth = ((_header.width + 15) / 16) << 1;
- byte *scanline = new byte[scanlineWidth * _header.depth];
-
- for (uint i = 0; i < _header.height; ++i) {
- byte *s = scanline;
- for (uint32 j = 0; j < _header.depth; ++j) {
- packStream.read(s, scanlineWidth);
- s += scanlineWidth;
- }
-
- planarToChunky(out, outPitch, scanline, scanlineWidth, numPlanes, packPixels);
- out += outPitch;
- }
-
- delete[] scanline;
- break;
- }
-
- default:
- // implement other compression types here!
- error("only RLE compressed ILBM files are supported");
- break;
- }
-}
-
-void ILBMDecoder::planarToChunky(byte *out, uint32 outPitch, byte *in, uint32 inWidth, uint32 nPlanes, bool packPlanes) {
- byte pix, ofs, bit;
- byte *s;
-
- uint32 pixels = outPitch;
- if (packPlanes) {
- pixels *= (8 / nPlanes);
- }
-
- for (uint32 x = 0; x < pixels; ++x) {
-
- pix = 0;
- ofs = x >> 3;
- bit = 0x80 >> (x & 7);
-
- // first build a pixel by scanning all the usable planes in the input
- s = in;
- for (uint32 plane = 0; plane < nPlanes; ++plane) {
- if (s[ofs] & bit) {
- pix |= (1 << plane);
- }
- s += inWidth;
- }
-
-
- // then output the pixel according to the requested packing
- if (!packPlanes) {
- out[x] = pix;
- } else if (nPlanes == 1) {
- out[x / 8] |= (pix << (x & 7));
- } else if (nPlanes == 2) {
- out[x / 4] |= (pix << ((x & 3) << 1));
- } else if (nPlanes == 4) {
- out[x / 2] |= (pix << ((x & 1) << 2));
- }
- }
-
-}
-
-
-// handles PBM subtype of IFF FORM files
-//
-struct PBMDecoder {
- /**
- * PBM header data, necessary for loadBitmap()
- */
- Graphics::BMHD _header;
-
- /**
- * Fills the _header member from the given stream.
- */
- void loadHeader(Common::ReadStream *stream);
-
- /**
- * Loads and unpacks the PBM bitmap data from the stream into the buffer.
- * The functions assumes the buffer is large enough to contain all data.
- */
- void loadBitmap(byte *buffer, Common::ReadStream *stream);
-};
-
-void PBMDecoder::loadHeader(Common::ReadStream *stream) {
- _header.load(stream);
-}
-
-
-void PBMDecoder::loadBitmap(byte *buffer, Common::ReadStream *stream) {
- uint32 outSize = _header.width * _header.height;
-
- switch (_header.pack) {
- case 0:
- stream->read(buffer, outSize);
- break;
-
- case 1: {
- PackBitsReadStream packStream(*stream);
- packStream.read(buffer, outSize);
- break;
- }
- }
-}
-
-
-struct PBMLoader {
- PBMDecoder _decoder;
- Surface *_surface;
- byte *_colors;
-
- void load(Common::ReadStream &input, Surface &surface, byte *&colors) {
- _surface = &surface;
- _colors = colors;
- Common::IFFParser parser(&input);
- Common::Functor1Mem<Common::IFFChunk &, bool, PBMLoader> c(this, &PBMLoader::callback);
- parser.parse(c);
- }
-
- bool callback(Common::IFFChunk &chunk) {
- switch (chunk._type) {
- case ID_BMHD:
- _decoder.loadHeader(chunk._stream);
- break;
-
- case ID_CMAP:
- if (_colors) {
- chunk._stream->read(_colors, chunk._size);
- }
- break;
-
- case ID_BODY:
- if (_surface) {
- _surface->create(_decoder._header.width, _decoder._header.height, PixelFormat::createFormatCLUT8());
- _decoder.loadBitmap((byte *)_surface->pixels, chunk._stream);
- }
- return true; // stop the parser
- }
-
- return false;
- }
-};
-
-void decodePBM(Common::ReadStream &input, Surface &surface, byte *colors) {
- PBMLoader loader;
- loader.load(input, surface, colors);
-}
-
-
-
-
-PackBitsReadStream::PackBitsReadStream(Common::ReadStream &input) : _input(&input) {
-}
-
-PackBitsReadStream::~PackBitsReadStream() {
-}
-
-bool PackBitsReadStream::eos() const {
- return _input->eos();
-}
-
-uint32 PackBitsReadStream::read(void *dataPtr, uint32 dataSize) {
- byte *out = (byte *)dataPtr;
- uint32 left = dataSize;
-
- uint32 lenR = 0, lenW = 0;
- while (left > 0 && !_input->eos()) {
- lenR = _input->readByte();
-
- if (lenR == 128) {
- // no-op
- lenW = 0;
- } else if (lenR <= 127) {
- // literal run
- lenR++;
- lenW = MIN(lenR, left);
- for (uint32 j = 0; j < lenW; j++) {
- *out++ = _input->readByte();
- }
- for (; lenR > lenW; lenR--) {
- _input->readByte();
- }
- } else { // len > 128
- // expand run
- lenW = MIN((256 - lenR) + 1, left);
- byte val = _input->readByte();
- memset(out, val, lenW);
- out += lenW;
- }
-
- left -= lenW;
- }
-
- return dataSize - left;
-}
-
-} // End of namespace Graphics
diff --git a/graphics/iff.h b/graphics/iff.h
deleted file mode 100644
index 4d88148372..0000000000
--- a/graphics/iff.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* 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.
- */
-
-/*
- * Bitmap decoder used in engines:
- * - parallaction
- * - saga
- */
-
-#ifndef GRAPHICS_IFF_H
-#define GRAPHICS_IFF_H
-
-#include "common/stream.h"
-
-namespace Graphics {
-
-struct Surface;
-
-
-struct BMHD {
- uint16 width, height;
- uint16 x, y;
- byte depth;
- byte masking;
- byte pack;
- byte flags;
- uint16 transparentColor;
- byte xAspect, yAspect;
- uint16 pageWidth, pageHeight;
-
- BMHD() {
- memset(this, 0, sizeof(*this));
- }
-
- void load(Common::ReadStream *stream);
-};
-
-
-struct ILBMDecoder {
- /**
- * ILBM header data, necessary for loadBitmap()
- */
- Graphics::BMHD _header;
-
- /**
- * Available decoding modes for loadBitmap().
- */
- enum {
- ILBM_UNPACK_PLANES = 0xFF, ///< Decode all bitplanes, and map 1 pixel to 1 byte.
- ILBM_PACK_PLANES = 0x100, ///< Request unpacking, used as a mask with below options.
-
- ILBM_1_PLANES = 1, ///< Decode only the first bitplane, don't pack.
- ILBM_1_PACK_PLANES = ILBM_1_PLANES | ILBM_PACK_PLANES, ///< Decode only the first bitplane, pack 8 pixels in 1 byte.
- ILBM_2_PLANES = 2, ///< Decode first 2 bitplanes, don't pack.
- ILBM_2_PACK_PLANES = ILBM_2_PLANES | ILBM_PACK_PLANES, ///< Decode first 2 bitplanes, pack 4 pixels in 1 byte.
- ILBM_3_PLANES = 3, ///< Decode first 3 bitplanes, don't pack.
- ILBM_4_PLANES = 4, ///< Decode first 4 bitplanes, don't pack.
- ILBM_4_PACK_PLANES = ILBM_4_PLANES | ILBM_PACK_PLANES, ///< Decode first 4 bitplanes, pack 2 pixels in 1 byte.
- ILBM_5_PLANES = 5, ///< Decode first 5 bitplanes, don't pack.
- ILBM_8_PLANES = 8 ///< Decode all 8 bitplanes.
- };
-
- /**
- * Fills the _header member from the given stream.
- */
- void loadHeader(Common::ReadStream *stream);
-
- /**
- * Loads and unpacks the ILBM bitmap data from the stream into the buffer.
- * The functions assumes the buffer is large enough to contain all data.
- * The caller controls how data should be packed by choosing mode from
- * the enum above.
- */
- void loadBitmap(uint32 mode, byte *buffer, Common::ReadStream *stream);
-
- /**
- * Converts from bitplanar to chunky representation. Intended for internal
- * usage, but you can be (ab)use it from client code if you know what you
- * are doing.
- */
- void planarToChunky(byte *out, uint32 width, byte *in, uint32 planeWidth, uint32 nPlanes, bool packPlanes);
-};
-
-
-
-/**
- * Handles PBM subtype of IFF FORM files
- */
-void decodePBM(Common::ReadStream &input, Surface &surface, byte *colors);
-
-
-/**
- * Decode a given PackBits encoded stream.
- *
- * PackBits is an RLE compression algorithm introduced by Apple. It is also
- * used to encode ILBM and PBM subtypes of IFF files, and some flavors of
- * TIFF.
- *
- * As there is no compression across row boundaries in the above formats,
- * read() will extract a *new* line on each call, discarding any alignment
- * or padding.
- */
-class PackBitsReadStream : public Common::ReadStream {
-
-protected:
- Common::ReadStream *_input;
-
-public:
- PackBitsReadStream(Common::ReadStream &input);
- ~PackBitsReadStream();
-
- virtual bool eos() const;
-
- uint32 read(void *dataPtr, uint32 dataSize);
-};
-
-} // End of namespace Graphics
-
-#endif
diff --git a/graphics/module.mk b/graphics/module.mk
index f560d9dc97..8b63435905 100644
--- a/graphics/module.mk
+++ b/graphics/module.mk
@@ -11,7 +11,6 @@ MODULE_OBJS := \
fonts/newfont.o \
fonts/ttf.o \
fonts/winfont.o \
- iff.o \
maccursor.o \
primitives.o \
scaler.o \
@@ -24,6 +23,7 @@ MODULE_OBJS := \
wincursor.o \
yuv_to_rgb.o \
decoders/bmp.o \
+ decoders/iff.o \
decoders/jpeg.o \
decoders/pcx.o \
decoders/pict.o \
diff --git a/graphics/primitives.cpp b/graphics/primitives.cpp
index b88db39f36..c140dc8644 100644
--- a/graphics/primitives.cpp
+++ b/graphics/primitives.cpp
@@ -78,4 +78,4 @@ void drawThickLine(int x0, int y0, int x1, int y1, int penX, int penY, int color
drawLine(x0 + x, y0 + y, x1 + x, y1 + y, color, plotProc, data);
}
-} // End of namespace Graphics
+} // End of namespace Graphics
diff --git a/graphics/primitives.h b/graphics/primitives.h
index f0780afc2e..f4a92683ab 100644
--- a/graphics/primitives.h
+++ b/graphics/primitives.h
@@ -27,6 +27,6 @@ namespace Graphics {
void drawLine(int x0, int y0, int x1, int y1, int color, void (*plotProc)(int, int, int, void *), void *data);
void drawThickLine(int x0, int y0, int x1, int y1, int penX, int penY, int color, void (*plotProc)(int, int, int, void *), void *data);
-} // End of namespace Graphics
+} // End of namespace Graphics
#endif
diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp
index b81e8937a8..3325fd4db2 100644
--- a/graphics/scaler.cpp
+++ b/graphics/scaler.cpp
@@ -152,7 +152,7 @@ void InitScalers(uint32 BitFormat) {
g_dotmatrix[12] = g_dotmatrix[14] = format.RGBToColor(63, 63, 63);
}
-void DestroyScalers(){
+void DestroyScalers() {
#ifdef USE_HQ_SCALERS
free(RGBtoYUV);
RGBtoYUV = 0;
diff --git a/graphics/thumbnail.cpp b/graphics/thumbnail.cpp
index db61d828d2..ddb377306d 100644
--- a/graphics/thumbnail.cpp
+++ b/graphics/thumbnail.cpp
@@ -30,17 +30,17 @@
namespace Graphics {
namespace {
-#define THMB_VERSION 1
+#define THMB_VERSION 2
struct ThumbnailHeader {
uint32 type;
uint32 size;
byte version;
uint16 width, height;
- byte bpp;
+ PixelFormat format;
};
-#define ThumbnailHeaderSize (4+4+1+2+2+1)
+#define ThumbnailHeaderSize (4+4+1+2+2+(1+4+4))
bool loadHeader(Common::SeekableReadStream &in, ThumbnailHeader &header, bool outputWarnings) {
header.type = in.readUint32BE();
@@ -64,7 +64,22 @@ bool loadHeader(Common::SeekableReadStream &in, ThumbnailHeader &header, bool ou
header.width = in.readUint16BE();
header.height = in.readUint16BE();
- header.bpp = in.readByte();
+ header.format.bytesPerPixel = in.readByte();
+ // Starting from version 2 on we serialize the whole PixelFormat.
+ if (header.version >= 2) {
+ header.format.rLoss = in.readByte();
+ header.format.gLoss = in.readByte();
+ header.format.bLoss = in.readByte();
+ header.format.aLoss = in.readByte();
+
+ header.format.rShift = in.readByte();
+ header.format.gShift = in.readByte();
+ header.format.bShift = in.readByte();
+ header.format.aShift = in.readByte();
+ } else {
+ // Version 1 used a hardcoded RGB565.
+ header.format = createPixelFormat<565>();
+ }
return true;
}
@@ -100,23 +115,32 @@ Graphics::Surface *loadThumbnail(Common::SeekableReadStream &in) {
if (!loadHeader(in, header, true))
return 0;
- if (header.bpp != 2) {
- warning("trying to load thumbnail with unsupported bit depth %d", header.bpp);
+ if (header.format.bytesPerPixel != 2 && header.format.bytesPerPixel != 4) {
+ warning("trying to load thumbnail with unsupported bit depth %d", header.format.bytesPerPixel);
return 0;
}
- Graphics::PixelFormat format = g_system->getOverlayFormat();
Graphics::Surface *const to = new Graphics::Surface();
- to->create(header.width, header.height, format);
+ to->create(header.width, header.height, header.format);
- OverlayColor *pixels = (OverlayColor *)to->pixels;
for (int y = 0; y < to->h; ++y) {
- for (int x = 0; x < to->w; ++x) {
- uint8 r, g, b;
- colorToRGB<ColorMasks<565> >(in.readUint16BE(), r, g, b);
-
- // converting to current OSystem Color
- *pixels++ = format.RGBToColor(r, g, b);
+ switch (header.format.bytesPerPixel) {
+ case 2: {
+ uint16 *pixels = (uint16 *)to->getBasePtr(0, y);
+ for (uint x = 0; x < to->w; ++x) {
+ *pixels++ = in.readUint16BE();
+ }
+ } break;
+
+ case 4: {
+ uint32 *pixels = (uint32 *)to->getBasePtr(0, y);
+ for (uint x = 0; x < to->w; ++x) {
+ *pixels++ = in.readUint32BE();
+ }
+ } break;
+
+ default:
+ assert(0);
}
}
@@ -138,8 +162,8 @@ bool saveThumbnail(Common::WriteStream &out) {
}
bool saveThumbnail(Common::WriteStream &out, const Graphics::Surface &thumb) {
- if (thumb.format.bytesPerPixel != 2) {
- warning("trying to save thumbnail with bpp different than 2");
+ if (thumb.format.bytesPerPixel != 2 && thumb.format.bytesPerPixel != 4) {
+ warning("trying to save thumbnail with bpp %u", thumb.format.bytesPerPixel);
return false;
}
@@ -149,19 +173,45 @@ bool saveThumbnail(Common::WriteStream &out, const Graphics::Surface &thumb) {
header.version = THMB_VERSION;
header.width = thumb.w;
header.height = thumb.h;
- header.bpp = thumb.format.bytesPerPixel;
out.writeUint32BE(header.type);
out.writeUint32BE(header.size);
out.writeByte(header.version);
out.writeUint16BE(header.width);
out.writeUint16BE(header.height);
- out.writeByte(header.bpp);
- // TODO: for later this shouldn't be casted to uint16...
- uint16 *pixels = (uint16 *)thumb.pixels;
- for (uint16 p = 0; p < thumb.w*thumb.h; ++p, ++pixels)
- out.writeUint16BE(*pixels);
+ // Serialize the PixelFormat
+ out.writeByte(thumb.format.bytesPerPixel);
+ out.writeByte(thumb.format.rLoss);
+ out.writeByte(thumb.format.gLoss);
+ out.writeByte(thumb.format.bLoss);
+ out.writeByte(thumb.format.aLoss);
+ out.writeByte(thumb.format.rShift);
+ out.writeByte(thumb.format.gShift);
+ out.writeByte(thumb.format.bShift);
+ out.writeByte(thumb.format.aShift);
+
+ // Serialize the pixel data
+ for (uint y = 0; y < thumb.h; ++y) {
+ switch (thumb.format.bytesPerPixel) {
+ case 2: {
+ const uint16 *pixels = (const uint16 *)thumb.getBasePtr(0, y);
+ for (uint x = 0; x < thumb.w; ++x) {
+ out.writeUint16BE(*pixels++);
+ }
+ } break;
+
+ case 4: {
+ const uint32 *pixels = (const uint32 *)thumb.getBasePtr(0, y);
+ for (uint x = 0; x < thumb.w; ++x) {
+ out.writeUint32BE(*pixels++);
+ }
+ } break;
+
+ default:
+ assert(0);
+ }
+ }
return true;
}
diff --git a/graphics/thumbnail.h b/graphics/thumbnail.h
index df99568f42..45a0fdbf07 100644
--- a/graphics/thumbnail.h
+++ b/graphics/thumbnail.h
@@ -50,8 +50,6 @@ bool skipThumbnail(Common::SeekableReadStream &in);
/**
* Loads a thumbnail from the given input stream.
- * The loaded thumbnail will be automatically converted to the
- * current overlay pixelformat.
*/
Graphics::Surface *loadThumbnail(Common::SeekableReadStream &in);
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 6fb93d3b46..6e5fd291b7 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -35,7 +35,7 @@
#include "graphics/pixelformat.h"
-#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.16"
+#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.20"
class OSystem;
diff --git a/gui/about.cpp b/gui/about.cpp
index 9eb8a0175a..088971f273 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -37,14 +37,16 @@ enum {
kScrollMillisPerPixel = 60
};
-// The following commands can be put at the start of a line (all subject to change):
-// \C, \L, \R -- set center/left/right alignment
-// \c0 - \c4 -- set a custom color:
-// 0 normal text (green)
-// 1 highlighted text (light green)
-// 2 light border (light gray)
-// 3 dark border (dark gray)
-// 4 background (black)
+// Every Line should start with a letter followed by a digit. Currently those can be
+// (all subject to change)
+// Letter:
+// C, L, R -- set center/left/right alignment
+// A -- ASCII text to replace the next (latin1) line
+// Digit:
+// 0 - 2 -- set a custom color:
+// 0 normal text
+// 1 highlighted text
+// 2 disabled text
// TODO: Maybe add a tab/indent feature; that is, make it possible to specify
// an amount by which that line shall be indented (the indent of course would have
// to be considered while performing any word wrapping, too).
@@ -54,7 +56,7 @@ enum {
static const char *copyright_text[] = {
"",
-"C0""Copyright (C) 2001-2012 The ScummVM project",
+"C0""Copyright (C) 2001-2013 The ScummVM project",
"C0""http://www.scummvm.org",
"",
"C0""ScummVM is the legal property of its developers, whose names are too numerous to list here. Please refer to the COPYRIGHT file distributed with this binary.",
@@ -137,9 +139,26 @@ void AboutDialog::addLine(const char *str) {
} else {
Common::String format(str, 2);
str += 2;
-
+
+ static Common::String asciiStr;
+ if (format[0] == 'A') {
+ bool useAscii = false;
+#ifdef USE_TRANSLATION
+ // We could use TransMan.getCurrentCharset() but rather than compare strings
+ // it is easier to use TransMan.getCharsetMapping() (non null in case of non
+ // ISO-8859-1 mapping)
+ useAscii = (TransMan.getCharsetMapping() != NULL);
+#endif
+ if (useAscii)
+ asciiStr = str;
+ return;
+ }
StringArray wrappedLines;
- g_gui.getFont().wordWrapText(str, _w - 2 * _xOff, wrappedLines);
+ if (!asciiStr.empty()) {
+ g_gui.getFont().wordWrapText(asciiStr, _w - 2 * _xOff, wrappedLines);
+ asciiStr.clear();
+ } else
+ g_gui.getFont().wordWrapText(str, _w - 2 * _xOff, wrappedLines);
for (StringArray::const_iterator i = wrappedLines.begin(); i != wrappedLines.end(); ++i) {
_lines.push_back(format + *i);
@@ -285,7 +304,7 @@ void AboutDialog::reflowLayout() {
int maxW = _w - 2*_xOff;
_w = 0;
for (i = 0; i < ARRAYSIZE(credits); i++) {
- int tmp = g_gui.getStringWidth(credits[i] + 5);
+ int tmp = g_gui.getStringWidth(credits[i]) + 5;
if (_w < tmp && tmp <= maxW) {
_w = tmp;
}
diff --git a/gui/browser.cpp b/gui/browser.cpp
index 2b4f254156..84f2d0f747 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -32,7 +32,8 @@ namespace GUI {
enum {
kChooseCmd = 'Chos',
- kGoUpCmd = 'GoUp'
+ kGoUpCmd = 'GoUp',
+ kHiddenCmd = 'Hidd'
};
/* We want to use this as a general directory selector at some point... possible uses
@@ -47,6 +48,7 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
_isDirBrowser = dirBrowser;
_fileList = NULL;
_currentPath = NULL;
+ _showHidden = ConfMan.getBool("gui_browser_show_hidden", Common::ConfigManager::kApplicationDomain);
// Headline - TODO: should be customizable during creation time
new StaticTextWidget(this, "Browser.Headline", title);
@@ -61,6 +63,9 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
+ // Checkbox for the "show hidden files" state.
+ _showHiddenWidget = new CheckboxWidget(this, "Browser.Hidden", _("Show hidden files"), _("Show files marked with the hidden attribute"), kHiddenCmd);
+
// Buttons
if (g_system->getOverlayWidth() > 320)
new ButtonWidget(this, "Browser.Up", _("Go up"), _("Go to previous directory level"), kGoUpCmd);
@@ -132,6 +137,15 @@ void BrowserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
if (data != (uint32)-1 && _isDirBrowser && !_nodeContent[data].isDirectory())
_fileList->setSelected(-1);
break;
+ case kHiddenCmd:
+ // Update whether the user wants hidden files to be shown
+ _showHidden = _showHiddenWidget->getState();
+ // We save the state in the application domain to avoid cluttering and
+ // to prevent odd behavior.
+ ConfMan.setBool("gui_browser_show_hidden", _showHidden, Common::ConfigManager::kApplicationDomain);
+ // Update the file listing
+ updateListing();
+ break;
default:
Dialog::handleCommand(sender, cmd, data);
}
@@ -145,7 +159,7 @@ void BrowserDialog::updateListing() {
ConfMan.set("browser_lastpath", _node.getPath());
// Read in the data from the file system
- if (!_node.getChildren(_nodeContent, Common::FSNode::kListAll))
+ if (!_node.getChildren(_nodeContent, Common::FSNode::kListAll, _showHidden))
_nodeContent.clear();
else
Common::sort(_nodeContent.begin(), _nodeContent.end());
diff --git a/gui/browser.h b/gui/browser.h
index 5cf091fbf4..7c098617bb 100644
--- a/gui/browser.h
+++ b/gui/browser.h
@@ -29,6 +29,7 @@ namespace GUI {
class ListWidget;
class StaticTextWidget;
+class CheckboxWidget;
class CommandSender;
class BrowserDialog : public Dialog {
@@ -40,6 +41,7 @@ public:
virtual int runModal();
#else
virtual void open();
+
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
#endif
@@ -54,6 +56,8 @@ protected:
StaticTextWidget *_currentPath;
Common::FSNode _node;
Common::FSList _nodeContent;
+ bool _showHidden;
+ CheckboxWidget *_showHiddenWidget;
#endif
Common::FSNode _choice;
bool _isDirBrowser;
diff --git a/gui/credits.h b/gui/credits.h
index f63f54a6fb..81d46b2b73 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -6,6 +6,7 @@ static const char *credits[] = {
"C0""Eugene Sandulenko",
"",
"C1""PR Office",
+"A0""Arnaud Boutonne",
"C0""Arnaud Boutonn\351",
"C2""Public Relations Officer, Project Administrator",
"C0""Eugene Sandulenko",
@@ -26,6 +27,7 @@ static const char *credits[] = {
"",
"C1""Engine Teams",
"C1""SCUMM",
+"A0""Torbjorn Andersson",
"C0""Torbj\366rn Andersson",
"C0""James Brown",
"C2""(retired)",
@@ -66,6 +68,7 @@ static const char *credits[] = {
"C2""(retired)",
"",
"C1""AGOS",
+"A0""Torbjorn Andersson",
"C0""Torbj\366rn Andersson",
"C0""Paul Gilbert",
"C0""Travis Howell",
@@ -75,6 +78,7 @@ static const char *credits[] = {
"C2""(retired)",
"",
"C1""CGE",
+"A0""Arnaud Boutonne",
"C0""Arnaud Boutonn\351",
"C0""Paul Gilbert",
"",
@@ -104,6 +108,7 @@ static const char *credits[] = {
"C0""Pawel Kolodziejski",
"",
"C1""DreamWeb",
+"A0""Torbjorn Andersson",
"C0""Torbj\366rn Andersson",
"C0""Bertrand Augereau",
"C0""Filippos Karapetis",
@@ -112,7 +117,9 @@ static const char *credits[] = {
"C0""Willem Jan Palenstijn",
"",
"C1""Gob",
+"A0""Torbjorn Andersson",
"C0""Torbj\366rn Andersson",
+"A0""Arnaud Boutonne",
"C0""Arnaud Boutonn\351",
"C0""Sven Hesse",
"C0""Eugene Sandulenko",
@@ -122,12 +129,19 @@ static const char *credits[] = {
"C0""Scott Thomas",
"C0""Jordi Vilalta Prat",
"",
+"C1""Hopkins",
+"A0""Arnaud Boutonne",
+"C0""Arnaud Boutonn\351",
+"C0""Paul Gilbert",
+"",
"C1""Hugo",
+"A0""Arnaud Boutonne",
"C0""Arnaud Boutonn\351",
"C0""Oystein Eftevaag",
"C0""Eugene Sandulenko",
"",
"C1""Kyra",
+"A0""Torbjorn Andersson",
"C0""Torbj\366rn Andersson",
"C2""VQA Player",
"C0""Oystein Eftevaag",
@@ -170,6 +184,7 @@ static const char *credits[] = {
"C0""Joost Peters",
"",
"C1""SAGA",
+"A0""Torbjorn Andersson",
"C0""Torbj\366rn Andersson",
"C0""Daniel Balsom",
"C2""Original engine reimplementation author (retired)",
@@ -191,6 +206,7 @@ static const char *credits[] = {
"C0""Lars Skovlund",
"",
"C1""Sky",
+"A0""Robert Goeffringmann",
"C0""Robert G\366ffringmann",
"C2""(retired)",
"C0""Oliver Kiehl",
@@ -202,10 +218,12 @@ static const char *credits[] = {
"C2""PSX version support",
"C0""Thierry Crozat",
"C2""Mac version support",
+"A0""Robert Goeffringmann",
"C0""Robert G\366ffringmann",
"C2""(retired)",
"",
"C1""Sword2",
+"A0""Torbjorn Andersson",
"C0""Torbj\366rn Andersson",
"C0""Fabio Battaglia",
"C2""PSX version support",
@@ -213,6 +231,7 @@ static const char *credits[] = {
"C2""(retired)",
"",
"C1""Sword25",
+"A0""Torbjorn Andersson",
"C0""Torbj\366rn Andersson",
"C0""Paul Gilbert",
"C0""Max Horn",
@@ -227,6 +246,7 @@ static const char *credits[] = {
"C2""(retired)",
"",
"C1""Tinsel",
+"A0""Torbjorn Andersson",
"C0""Torbj\366rn Andersson",
"C0""Fabio Battaglia",
"C2""PSX version support",
@@ -237,7 +257,12 @@ static const char *credits[] = {
"C0""Filippos Karapetis",
"C0""Joost Peters",
"",
+"C1""Toltecs",
+"C0""Benjamin Haisch",
+"C0""Filippos Karapetis",
+"",
"C1""Tony",
+"A0""Arnaud Boutonne",
"C0""Arnaud Boutonn\351",
"C0""Paul Gilbert",
"C0""Alyssa Milburn",
@@ -245,11 +270,13 @@ static const char *credits[] = {
"C1""Toon",
"C0""Sylvain Dupont",
"",
+"A1""Touche",
"C1""Touch\351",
"C0""Gregory Montoir",
"C2""(retired)",
"",
"C1""TsAGE",
+"A0""Arnaud Boutonne",
"C0""Arnaud Boutonn\351",
"C0""Paul Gilbert",
"",
@@ -258,6 +285,7 @@ static const char *credits[] = {
"C2""(retired)",
"",
"C1""Wintermute",
+"A0""Einar Johan T. Somaaen",
"C0""Einar Johan T. S\370m\345en",
"",
"",
@@ -305,6 +333,7 @@ static const char *credits[] = {
"C2""(retired)",
"",
"C1""PlayStation 2",
+"A0""Robert Goeffringmann",
"C0""Robert G\366ffringmann",
"C2""(retired)",
"C0""Max Lingua",
@@ -351,6 +380,9 @@ static const char *credits[] = {
"C2""Heavily improved de-/encoder for DXA videos",
"C0""Jochen Hoenicke",
"C2""Speaker & PCjr sound support, AdLib work (retired)",
+"A0""Daniel ter Laan",
+"C0""Dani\353l ter Laan",
+"C2""Restoring original Drascula tracks, and writing convert_dxa.bat",
"C0""Chris Page",
"C2""Return to launcher, savestate improvements, leak fixes, ... (GSoC 2008 task) (retired)",
"C0""Robin Watts",
@@ -413,9 +445,11 @@ static const char *credits[] = {
"",
"C1""Packages",
"C1""AmigaOS 4",
+"A0""Hans-Joerg Frieden",
"C0""Hans-J\366rg Frieden",
"C2""(retired)",
"C0""Hubert Maier",
+"A0""Juha Niemimaki",
"C0""Juha Niemim\344ki",
"C2""(retired)",
"",
@@ -445,6 +479,7 @@ static const char *credits[] = {
"",
"C1""MorphOS",
"C0""Fabien Coeurjoly",
+"A0""Ruediger Hanke",
"C0""R\374diger Hanke",
"C2""(retired)",
"",
@@ -482,6 +517,7 @@ static const char *credits[] = {
"C0""Jordi Vilalta Prat",
"",
"C1""Czech",
+"A0""Zbynik Schwarz",
"C0""Zbyn\354k Schwarz",
"",
"C1""Danish",
@@ -508,10 +544,13 @@ static const char *credits[] = {
"C1""Italian",
"C0""Matteo Angelino",
"",
+"A1""Norwegian (Bokmaal)",
"C1""Norwegian (Bokm\345l)",
+"A0""Einar Johan Somaaen",
"C0""Einar Johan S\370m\345en",
"",
"C1""Norwegian (Nynorsk)",
+"A0""Einar Johan Somaaen",
"C0""Einar Johan S\370m\345en",
"",
"C1""Polish",
@@ -524,6 +563,7 @@ static const char *credits[] = {
"C0""Eugene Sandulenko",
"",
"C1""Spanish",
+"A0""Tomas Maidagan",
"C0""Tom\341s Maidagan",
"C0""Jordi Vilalta Prat",
"",
@@ -535,6 +575,7 @@ static const char *credits[] = {
"",
"",
"C1""Websites (design)",
+"A0""Dobo Balazs",
"C0""Dob\363 Bal\341zs",
"C2""Website design",
"C0""William Claydon",
@@ -563,6 +604,7 @@ static const char *credits[] = {
"C2""Sound support for C64 version of MM/Zak, Loom PCE support",
"C0""Janne Huttunen",
"C2""V3 actor mask support, Dig/FT SMUSH audio",
+"A0""Kovacs Endre Janos",
"C0""Kov\341cs Endre J\341nos",
"C2""Several fixes for Simon1",
"C0""Jeroen Janssen",
@@ -587,12 +629,14 @@ static const char *credits[] = {
"C2""Sound support for Amiga SCUMM V2/V3 games, MM NES support",
"C0""Robert Crossfield",
"C2""Improved support for Apple II/C64 versions of MM",
+"A0""Andreas Roever",
"C0""Andreas R\366ver",
"C2""Broken Sword I & II MPEG2 cutscene support",
"C0""Edward Rudd",
"C2""Fixes for playing MP3 versions of MI1/Loom audio",
"C0""Daniel Schepler",
"C2""Final MI1 CD music support, initial Ogg Vorbis support",
+"A0""Andre Souza",
"C0""Andr\351 Souza",
"C2""SDL-based OpenGL renderer",
"C0""Tom Frost",
@@ -709,6 +753,7 @@ static const char *credits[] = {
"C2""For deep tech details about C64 Zak & MM",
"C0""Sarien Team",
"C2""Original AGI engine code",
+"A0""Jimmi Thogersen",
"C0""Jimmi Th\370gersen",
"C2""For ScummRev, and much obscure code/documentation",
"C0""Tristan",
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index 972163df6f..35627dd584 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -554,4 +554,4 @@ bool Debugger::debuggerCompletionCallback(GUI::ConsoleDialog *console, const cha
#endif
-} // End of namespace GUI
+} // End of namespace GUI
diff --git a/gui/debugger.h b/gui/debugger.h
index 3a587d2723..b79e8723c1 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -207,6 +207,6 @@ public:
};
-} // End of namespace GUI
+} // End of namespace GUI
#endif
diff --git a/gui/fluidsynth-dialog.cpp b/gui/fluidsynth-dialog.cpp
new file mode 100644
index 0000000000..662518b557
--- /dev/null
+++ b/gui/fluidsynth-dialog.cpp
@@ -0,0 +1,366 @@
+/* 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 "gui/fluidsynth-dialog.h"
+#include "gui/message.h"
+#include "gui/widgets/tab.h"
+#include "gui/widgets/popup.h"
+
+#include "common/config-manager.h"
+#include "common/translation.h"
+#include "common/debug.h"
+
+namespace GUI {
+
+enum {
+ kActivateChorusCmd = 'acho',
+ kChorusVoiceCountChangedCmd = 'cvcc',
+ kChorusLevelChangedCmd = 'clec',
+ kChorusSpeedChangedCmd = 'cspc',
+ kChorusDepthChangedCmd = 'cdec',
+
+ kActivateReverbCmd = 'arev',
+ kReverbRoomSizeChangedCmd = 'rrsc',
+ kReverbDampingChangedCmd = 'rdac',
+ kReverbWidthChangedCmd = 'rwic',
+ kReverbLevelChangedCmd = 'rlec',
+
+ kResetSettingsCmd = 'rese'
+};
+
+enum {
+ kWaveFormTypeSine = 0,
+ kWaveFormTypeTriangle = 1
+};
+
+enum {
+ kInterpolationNone = 0,
+ kInterpolationLinear = 1,
+ kInterpolation4thOrder = 2,
+ kInterpolation7thOrder = 3
+};
+
+FluidSynthSettingsDialog::FluidSynthSettingsDialog()
+ : Dialog("FluidSynthSettings") {
+ _domain = Common::ConfigManager::kApplicationDomain;
+
+ _tabWidget = new TabWidget(this, "FluidSynthSettings.TabWidget");
+
+ _tabWidget->addTab(_("Reverb"));
+
+ _reverbActivate = new CheckboxWidget(_tabWidget, "FluidSynthSettings_Reverb.EnableTabCheckbox", _("Active"), 0, kActivateReverbCmd);
+
+ _reverbRoomSizeDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.RoomSizeText", _("Room:"));
+ _reverbRoomSizeSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.RoomSizeSlider", 0, kReverbRoomSizeChangedCmd);
+ // 0.00 - 1.20, Default: 0.20
+ _reverbRoomSizeSlider->setMinValue(0);
+ _reverbRoomSizeSlider->setMaxValue(120);
+ _reverbRoomSizeLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.RoomSizeLabel", "20");
+
+ _reverbDampingDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingText", _("Damp:"));
+ _reverbDampingSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingSlider", 0, kReverbDampingChangedCmd);
+ // 0.00 - 1.00, Default: 0.00
+ _reverbDampingSlider->setMinValue(0);
+ _reverbDampingSlider->setMaxValue(100);
+ _reverbDampingLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingLabel", "0");
+
+ _reverbWidthDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthText", _("Width:"));
+ _reverbWidthSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthSlider", 0, kReverbWidthChangedCmd);
+ // 0 - 100, Default: 1
+ _reverbWidthSlider->setMinValue(0);
+ _reverbWidthSlider->setMaxValue(100);
+ _reverbWidthLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthLabel", "1");
+
+ _reverbLevelDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.LevelText", _("Level:"));
+ _reverbLevelSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.LevelSlider", 0, kReverbLevelChangedCmd);
+ // 0.00 - 1.00, Default: 0.90
+ _reverbLevelSlider->setMinValue(0);
+ _reverbLevelSlider->setMaxValue(100);
+ _reverbLevelLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.LevelLabel", "90");
+
+ _tabWidget->addTab(_("Chorus"));
+
+ _chorusActivate = new CheckboxWidget(_tabWidget, "FluidSynthSettings_Chorus.EnableTabCheckbox", _("Active"), 0, kActivateChorusCmd);
+
+ _chorusVoiceCountDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.VoiceCountText", _("N:"));
+ _chorusVoiceCountSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.VoiceCountSlider", 0, kChorusVoiceCountChangedCmd);
+ // 0-99, Default: 3
+ _chorusVoiceCountSlider->setMinValue(0);
+ _chorusVoiceCountSlider->setMaxValue(99);
+ _chorusVoiceCountLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.VoiceCountLabel", "3");
+
+ _chorusLevelDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelText", _("Level:"));
+ _chorusLevelSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelSlider", 0, kChorusLevelChangedCmd);
+ // 0.00 - 1.00, Default: 1.00
+ _chorusLevelSlider->setMinValue(0);
+ _chorusLevelSlider->setMaxValue(100);
+ _chorusLevelLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelLabel", "100");
+
+ _chorusSpeedDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedText", _("Speed:"));
+ _chorusSpeedSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedSlider", 0, kChorusSpeedChangedCmd);
+ // 0.30 - 5.00, Default: 0.30
+ _chorusSpeedSlider->setMinValue(30);
+ _chorusSpeedSlider->setMaxValue(500);
+ _chorusSpeedLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedLabel", "30");
+
+ _chorusDepthDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.DepthText", _("Depth:"));
+ _chorusDepthSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.DepthSlider", 0, kChorusDepthChangedCmd);
+ // 0.00 - 21.00, Default: 8.00
+ _chorusDepthSlider->setMinValue(0);
+ _chorusDepthSlider->setMaxValue(210);
+ _chorusDepthLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.DepthLabel", "80");
+
+ _chorusWaveFormTypePopUpDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.WaveFormTypeText", _("Type:"));
+ _chorusWaveFormTypePopUp = new PopUpWidget(_tabWidget, "FluidSynthSettings_Chorus.WaveFormType");
+
+ _chorusWaveFormTypePopUp->appendEntry(_("Sine"), kWaveFormTypeSine);
+ _chorusWaveFormTypePopUp->appendEntry(_("Triangle"), kWaveFormTypeTriangle);
+
+ _tabWidget->addTab(_("Misc"));
+
+ _miscInterpolationPopUpDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Misc.InterpolationText", _("Interpolation:"));
+ _miscInterpolationPopUp = new PopUpWidget(_tabWidget, "FluidSynthSettings_Misc.Interpolation");
+
+ _miscInterpolationPopUp->appendEntry(_("None (fastest)"), kInterpolationNone);
+ _miscInterpolationPopUp->appendEntry(_("Linear"), kInterpolationLinear);
+ _miscInterpolationPopUp->appendEntry(_("Fourth-order"), kInterpolation4thOrder);
+ _miscInterpolationPopUp->appendEntry(_("Seventh-order"), kInterpolation7thOrder);
+
+ _tabWidget->setActiveTab(0);
+
+ new ButtonWidget(this, "FluidSynthSettings.ResetSettings", _("Reset"), _("Reset all FluidSynth settings to their default values."), kResetSettingsCmd);
+
+ new ButtonWidget(this, "FluidSynthSettings.Cancel", _("Cancel"), 0, kCloseCmd);
+ new ButtonWidget(this, "FluidSynthSettings.Ok", _("OK"), 0, kOKCmd);
+}
+
+FluidSynthSettingsDialog::~FluidSynthSettingsDialog() {
+}
+
+void FluidSynthSettingsDialog::open() {
+ Dialog::open();
+
+ // Reset result value
+ setResult(0);
+
+ readSettings();
+}
+
+void FluidSynthSettingsDialog::close() {
+ if (getResult()) {
+ writeSettings();
+ }
+
+ Dialog::close();
+}
+
+void FluidSynthSettingsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
+ switch (cmd) {
+ case kActivateChorusCmd:
+ setChorusSettingsState(data);
+ break;
+ case kChorusVoiceCountChangedCmd:
+ _chorusVoiceCountLabel->setLabel(Common::String::format("%d", _chorusVoiceCountSlider->getValue()));
+ _chorusVoiceCountLabel->draw();
+ break;
+ case kChorusLevelChangedCmd:
+ _chorusLevelLabel->setLabel(Common::String::format("%d", _chorusLevelSlider->getValue()));
+ _chorusLevelLabel->draw();
+ break;
+ case kChorusSpeedChangedCmd:
+ _chorusSpeedLabel->setLabel(Common::String::format("%d", _chorusSpeedSlider->getValue()));
+ _chorusSpeedLabel->draw();
+ break;
+ case kChorusDepthChangedCmd:
+ _chorusDepthLabel->setLabel(Common::String::format("%d", _chorusDepthSlider->getValue()));
+ _chorusDepthLabel->draw();
+ break;
+ case kActivateReverbCmd:
+ setReverbSettingsState(data);
+ break;
+ case kReverbRoomSizeChangedCmd:
+ _reverbRoomSizeLabel->setLabel(Common::String::format("%d", _reverbRoomSizeSlider->getValue()));
+ _reverbRoomSizeLabel->draw();
+ break;
+ case kReverbDampingChangedCmd:
+ _reverbDampingLabel->setLabel(Common::String::format("%d", _reverbDampingSlider->getValue()));
+ _reverbDampingLabel->draw();
+ break;
+ case kReverbWidthChangedCmd:
+ _reverbWidthLabel->setLabel(Common::String::format("%d", _reverbWidthSlider->getValue()));
+ _reverbWidthLabel->draw();
+ break;
+ case kReverbLevelChangedCmd:
+ _reverbLevelLabel->setLabel(Common::String::format("%d", _reverbLevelSlider->getValue()));
+ _reverbLevelLabel->draw();
+ break;
+ case kResetSettingsCmd: {
+ MessageDialog alert(_("Do you really want to reset all FluidSynth settings to their default values?"), _("Yes"), _("No"));
+ if (alert.runModal() == GUI::kMessageOK) {
+ resetSettings();
+ readSettings();
+ draw();
+ }
+ break;
+ }
+ case kOKCmd:
+ setResult(1);
+ close();
+ break;
+ default:
+ Dialog::handleCommand(sender, cmd, data);
+ break;
+ }
+}
+
+void FluidSynthSettingsDialog::setChorusSettingsState(bool enabled) {
+ _chorusVoiceCountDesc->setEnabled(enabled);
+ _chorusVoiceCountSlider->setEnabled(enabled);
+ _chorusVoiceCountLabel->setEnabled(enabled);
+ _chorusLevelDesc->setEnabled(enabled);
+ _chorusLevelSlider->setEnabled(enabled);
+ _chorusLevelLabel->setEnabled(enabled);
+ _chorusSpeedDesc->setEnabled(enabled);
+ _chorusSpeedSlider->setEnabled(enabled);
+ _chorusSpeedLabel->setEnabled(enabled);
+ _chorusDepthDesc->setEnabled(enabled);
+ _chorusDepthSlider->setEnabled(enabled);
+ _chorusDepthLabel->setEnabled(enabled);
+ _chorusWaveFormTypePopUpDesc->setEnabled(enabled);
+ _chorusWaveFormTypePopUp->setEnabled(enabled);
+}
+
+void FluidSynthSettingsDialog::setReverbSettingsState(bool enabled) {
+ _reverbRoomSizeDesc->setEnabled(enabled);
+ _reverbRoomSizeSlider->setEnabled(enabled);
+ _reverbRoomSizeLabel->setEnabled(enabled);
+ _reverbDampingDesc->setEnabled(enabled);
+ _reverbDampingSlider->setEnabled(enabled);
+ _reverbDampingLabel->setEnabled(enabled);
+ _reverbWidthDesc->setEnabled(enabled);
+ _reverbWidthSlider->setEnabled(enabled);
+ _reverbWidthLabel->setEnabled(enabled);
+ _reverbLevelDesc->setEnabled(enabled);
+ _reverbLevelSlider->setEnabled(enabled);
+ _reverbLevelLabel->setEnabled(enabled);
+}
+
+void FluidSynthSettingsDialog::readSettings() {
+ _chorusVoiceCountSlider->setValue(ConfMan.getInt("fluidsynth_chorus_nr", _domain));
+ _chorusVoiceCountLabel->setLabel(Common::String::format("%d", _chorusVoiceCountSlider->getValue()));
+ _chorusLevelSlider->setValue(ConfMan.getInt("fluidsynth_chorus_level", _domain));
+ _chorusLevelLabel->setLabel(Common::String::format("%d", _chorusLevelSlider->getValue()));
+ _chorusSpeedSlider->setValue(ConfMan.getInt("fluidsynth_chorus_speed", _domain));
+ _chorusSpeedLabel->setLabel(Common::String::format("%d", _chorusSpeedSlider->getValue()));
+ _chorusDepthSlider->setValue(ConfMan.getInt("fluidsynth_chorus_depth", _domain));
+ _chorusDepthLabel->setLabel(Common::String::format("%d", _chorusDepthSlider->getValue()));
+
+ Common::String waveForm = ConfMan.get("fluidsynth_chorus_waveform", _domain);
+ if (waveForm == "sine") {
+ _chorusWaveFormTypePopUp->setSelectedTag(kWaveFormTypeSine);
+ } else if (waveForm == "triangle") {
+ _chorusWaveFormTypePopUp->setSelectedTag(kWaveFormTypeTriangle);
+ }
+
+ _reverbRoomSizeSlider->setValue(ConfMan.getInt("fluidsynth_reverb_roomsize", _domain));
+ _reverbRoomSizeLabel->setLabel(Common::String::format("%d", _reverbRoomSizeSlider->getValue()));
+ _reverbDampingSlider->setValue(ConfMan.getInt("fluidsynth_reverb_damping", _domain));
+ _reverbDampingLabel->setLabel(Common::String::format("%d", _reverbDampingSlider->getValue()));
+ _reverbWidthSlider->setValue(ConfMan.getInt("fluidsynth_reverb_width", _domain));
+ _reverbWidthLabel->setLabel(Common::String::format("%d", _reverbWidthSlider->getValue()));
+ _reverbLevelSlider->setValue(ConfMan.getInt("fluidsynth_reverb_level", _domain));
+ _reverbLevelLabel->setLabel(Common::String::format("%d", _reverbLevelSlider->getValue()));
+
+ Common::String interpolation = ConfMan.get("fluidsynth_misc_interpolation", _domain);
+ if (interpolation == "none") {
+ _miscInterpolationPopUp->setSelectedTag(kInterpolationNone);
+ } else if (interpolation == "linear") {
+ _miscInterpolationPopUp->setSelectedTag(kInterpolationLinear);
+ } else if (interpolation == "4th") {
+ _miscInterpolationPopUp->setSelectedTag(kInterpolation4thOrder);
+ } else if (interpolation == "7th") {
+ _miscInterpolationPopUp->setSelectedTag(kInterpolation7thOrder);
+ }
+
+ // This may trigger redrawing, so don't do it until all sliders have
+ // their proper values. Otherwise, the dialog may crash because of
+ // invalid slider values.
+ _chorusActivate->setState(ConfMan.getBool("fluidsynth_chorus_activate", _domain));
+ _reverbActivate->setState(ConfMan.getBool("fluidsynth_reverb_activate", _domain));
+}
+
+void FluidSynthSettingsDialog::writeSettings() {
+ ConfMan.setBool("fluidsynth_chorus_activate", _chorusActivate->getState());
+ ConfMan.setInt("fluidsynth_chorus_nr", _chorusVoiceCountSlider->getValue(), _domain);
+ ConfMan.setInt("fluidsynth_chorus_level", _chorusLevelSlider->getValue(), _domain);
+ ConfMan.setInt("fluidsynth_chorus_speed", _chorusSpeedSlider->getValue(), _domain);
+ ConfMan.setInt("fluidsynth_chorus_depth", _chorusDepthSlider->getValue(), _domain);
+
+ uint32 waveForm = _chorusWaveFormTypePopUp->getSelectedTag();
+ if (waveForm == kWaveFormTypeSine) {
+ ConfMan.set("fluidsynth_chorus_waveform", "sine", _domain);
+ } else if (waveForm == kWaveFormTypeTriangle) {
+ ConfMan.set("fluidsynth_chorus_waveform", "triangle", _domain);
+ } else {
+ ConfMan.removeKey("fluidsynth_chorus_waveform", _domain);
+ }
+
+ ConfMan.setBool("fluidsynth_reverb_activate", _reverbActivate->getState());
+ ConfMan.setInt("fluidsynth_reverb_roomsize", _reverbRoomSizeSlider->getValue(), _domain);
+ ConfMan.setInt("fluidsynth_reverb_damping", _reverbDampingSlider->getValue(), _domain);
+ ConfMan.setInt("fluidsynth_reverb_width", _reverbWidthSlider->getValue(), _domain);
+ ConfMan.setInt("fluidsynth_reverb_level", _reverbLevelSlider->getValue(), _domain);
+
+ uint32 interpolation = _miscInterpolationPopUp->getSelectedTag();
+ if (interpolation == kInterpolationNone) {
+ ConfMan.set("fluidsynth_misc_interpolation", "none", _domain);
+ } else if (interpolation == kInterpolationLinear) {
+ ConfMan.set("fluidsynth_misc_interpolation", "linear", _domain);
+ } else if (interpolation == kInterpolation4thOrder) {
+ ConfMan.set("fluidsynth_misc_interpolation", "4th", _domain);
+ } else if (interpolation == kInterpolation7thOrder) {
+ ConfMan.set("fluidsynth_misc_interpolation", "7th", _domain);
+ } else {
+ ConfMan.removeKey("fluidsynth_misc_interpolation", _domain);
+ }
+
+ // The main options dialog is responsible for writing the config file.
+ // That's why we don't actually flush the settings to the file here.
+}
+
+void FluidSynthSettingsDialog::resetSettings() {
+ ConfMan.removeKey("fluidsynth_chorus_activate", _domain);
+ ConfMan.removeKey("fluidsynth_chorus_nr", _domain);
+ ConfMan.removeKey("fluidsynth_chorus_level", _domain);
+ ConfMan.removeKey("fluidsynth_chorus_speed", _domain);
+ ConfMan.removeKey("fluidsynth_chorus_depth", _domain);
+ ConfMan.removeKey("fluidsynth_chorus_waveform", _domain);
+
+ ConfMan.removeKey("fluidsynth_reverb_activate", _domain);
+ ConfMan.removeKey("fluidsynth_reverb_roomsize", _domain);
+ ConfMan.removeKey("fluidsynth_reverb_damping", _domain);
+ ConfMan.removeKey("fluidsynth_reverb_width", _domain);
+ ConfMan.removeKey("fluidsynth_reverb_level", _domain);
+
+ ConfMan.removeKey("fluidsynth_misc_interpolation", _domain);
+}
+
+} // End of namespace GUI
diff --git a/gui/fluidsynth-dialog.h b/gui/fluidsynth-dialog.h
new file mode 100644
index 0000000000..4d74c9f93e
--- /dev/null
+++ b/gui/fluidsynth-dialog.h
@@ -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.
+ */
+
+#ifndef FLUIDSYNTH_DIALOG_H
+#define FLUIDSYNTH_DIALOG_H
+
+#include "common/str.h"
+#include "gui/dialog.h"
+
+namespace GUI {
+
+class TabWidget;
+class CheckboxWidget;
+class SliderWidget;
+class StaticTextWidget;
+class PopUpWidget;
+
+class FluidSynthSettingsDialog : public Dialog {
+public:
+ FluidSynthSettingsDialog();
+ ~FluidSynthSettingsDialog();
+
+ void open();
+ void close();
+ void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+
+protected:
+ void setChorusSettingsState(bool enabled);
+ void setReverbSettingsState(bool enabled);
+
+ void readSettings();
+ void writeSettings();
+
+ void resetSettings();
+
+private:
+ Common::String _domain;
+
+ TabWidget *_tabWidget;
+
+ CheckboxWidget *_chorusActivate;
+
+ StaticTextWidget *_chorusVoiceCountDesc;
+ SliderWidget *_chorusVoiceCountSlider;
+ StaticTextWidget *_chorusVoiceCountLabel;
+
+ StaticTextWidget *_chorusLevelDesc;
+ SliderWidget *_chorusLevelSlider;
+ StaticTextWidget *_chorusLevelLabel;
+
+ StaticTextWidget *_chorusSpeedDesc;
+ SliderWidget *_chorusSpeedSlider;
+ StaticTextWidget *_chorusSpeedLabel;
+
+ StaticTextWidget *_chorusDepthDesc;
+ SliderWidget *_chorusDepthSlider;
+ StaticTextWidget *_chorusDepthLabel;
+
+ StaticTextWidget *_chorusWaveFormTypePopUpDesc;
+ PopUpWidget *_chorusWaveFormTypePopUp;
+
+ CheckboxWidget *_reverbActivate;
+
+ StaticTextWidget *_reverbRoomSizeDesc;
+ SliderWidget *_reverbRoomSizeSlider;
+ StaticTextWidget *_reverbRoomSizeLabel;
+
+ StaticTextWidget *_reverbDampingDesc;
+ SliderWidget *_reverbDampingSlider;
+ StaticTextWidget *_reverbDampingLabel;
+
+ StaticTextWidget *_reverbWidthDesc;
+ SliderWidget *_reverbWidthSlider;
+ StaticTextWidget *_reverbWidthLabel;
+
+ StaticTextWidget *_reverbLevelDesc;
+ SliderWidget *_reverbLevelSlider;
+ StaticTextWidget *_reverbLevelLabel;
+
+ StaticTextWidget *_miscInterpolationPopUpDesc;
+ PopUpWidget *_miscInterpolationPopUp;
+};
+
+} // End of namespace GUI
+
+#endif
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 0f4867ced5..4e35b54db8 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -1128,7 +1128,7 @@ void LauncherDialog::reflowLayout() {
if (g_gui.xmlEval()->getVar("Globals.ShowLauncherLogo") == 1 && g_gui.theme()->supportsImages()) {
StaticTextWidget *ver = (StaticTextWidget *)findWidget("Launcher.Version");
if (ver) {
- ver->setAlign((Graphics::TextAlign)g_gui.xmlEval()->getVar("Launcher.Version.Align", Graphics::kTextAlignCenter));
+ ver->setAlign(g_gui.xmlEval()->getWidgetTextHAlign("Launcher.Version"));
ver->setLabel(gScummVMVersionDate);
}
@@ -1139,7 +1139,7 @@ void LauncherDialog::reflowLayout() {
} else {
StaticTextWidget *ver = (StaticTextWidget *)findWidget("Launcher.Version");
if (ver) {
- ver->setAlign((Graphics::TextAlign)g_gui.xmlEval()->getVar("Launcher.Version.Align", Graphics::kTextAlignCenter));
+ ver->setAlign(g_gui.xmlEval()->getWidgetTextHAlign("Launcher.Version"));
ver->setLabel(gScummVMFullVersion);
}
diff --git a/gui/module.mk b/gui/module.mk
index a435d8cca7..bda3c88cd5 100644
--- a/gui/module.mk
+++ b/gui/module.mk
@@ -38,5 +38,10 @@ MODULE_OBJS += \
browser.o
endif
+ifdef USE_FLUIDSYNTH
+MODULE_OBJS += \
+ fluidsynth-dialog.o
+endif
+
# Include common rules
include $(srcdir)/rules.mk
diff --git a/gui/options.cpp b/gui/options.cpp
index 4868f1876d..fb57c15d98 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -75,6 +75,12 @@ enum {
};
#endif
+#ifdef USE_FLUIDSYNTH
+enum {
+ kFluidSynthSettingsCmd = 'flst'
+};
+#endif
+
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 };
@@ -863,6 +869,10 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
_midiGainSlider->setMaxValue(1000);
_midiGainLabel = new StaticTextWidget(boss, prefix + "mcMidiGainLabel", "1.00");
+#ifdef USE_FLUIDSYNTH
+ new ButtonWidget(boss, prefix + "mcFluidSynthSettings", _("FluidSynth Settings"), 0, kFluidSynthSettingsCmd);
+#endif
+
_enableMIDISettings = true;
}
@@ -877,7 +887,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", _c("True Roland MT-32 (no GM emulation)", "lowres"), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
// GS Extensions setting
- _enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Enable Roland GS Mode"), _("Turns off General MIDI mapping for games with Roland MT-32 soundtrack"));
+ _enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Roland GS Mode (disable GM mapping)"), _("Turns off General MIDI mapping for games with Roland MT-32 soundtrack"));
const MusicPlugin::List p = MusicMan.getPlugins();
// Make sure the null device is the first one in the list to avoid undesired
@@ -1231,12 +1241,20 @@ GlobalOptionsDialog::GlobalOptionsDialog()
#ifdef SMALL_SCREEN_DEVICE
_keysDialog = new KeysDialog();
#endif
+
+#ifdef USE_FLUIDSYNTH
+ _fluidSynthSettingsDialog = new FluidSynthSettingsDialog();
+#endif
}
GlobalOptionsDialog::~GlobalOptionsDialog() {
#ifdef SMALL_SCREEN_DEVICE
delete _keysDialog;
#endif
+
+#ifdef USE_FLUIDSYNTH
+ delete _fluidSynthSettingsDialog;
+#endif
}
void GlobalOptionsDialog::open() {
@@ -1466,6 +1484,11 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
_keysDialog->runModal();
break;
#endif
+#ifdef USE_FLUIDSYNTH
+ case kFluidSynthSettingsCmd:
+ _fluidSynthSettingsDialog->runModal();
+ break;
+#endif
default:
OptionsDialog::handleCommand(sender, cmd, data);
}
diff --git a/gui/options.h b/gui/options.h
index def56cfa35..081ef4fea5 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -32,6 +32,10 @@
#include "gui/KeysDialog.h"
#endif
+#ifdef USE_FLUIDSYNTH
+#include "gui/fluidsynth-dialog.h"
+#endif
+
namespace GUI {
class CheckboxWidget;
@@ -208,6 +212,9 @@ protected:
#ifdef SMALL_SCREEN_DEVICE
KeysDialog *_keysDialog;
#endif
+#ifdef USE_FLUIDSYNTH
+ FluidSynthSettingsDialog *_fluidSynthSettingsDialog;
+#endif
StaticTextWidget *_savePath;
ButtonWidget *_savePathClearButton;
StaticTextWidget *_themePath;
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 7f565eb05d..6d8e6baac7 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -683,6 +683,7 @@
"<layout type='vertical' center='true' padding='6,6,2,2'> "
"<widget name='Version' "
"height='Globals.Line.Height' "
+"textalign='center' "
"/> "
"<layout type='horizontal' spacing='5' padding='0,0,0,0'> "
"<widget name='SearchDesc' "
@@ -740,7 +741,11 @@
"height='Globals.Line.Height' "
"/> "
"<widget name='List'/> "
-"<layout type='horizontal' padding='0,0,8,0'> "
+"<layout type='vertical' padding='0,0,8,0'> "
+"<widget name='Hidden' "
+"type='Checkbox' "
+"/> "
+"<layout type='horizontal' padding='0,0,0,0'> "
"<widget name='Up' "
"type='Button' "
"/> "
@@ -753,6 +758,7 @@
"/> "
"</layout> "
"</layout> "
+"</layout> "
"</dialog> "
"<dialog name='GlobalOptions' overlays='screen' inset='16' shading='dim'> "
"<layout type='vertical' padding='0,0,0,0'> "
@@ -891,7 +897,7 @@
"</layout> "
"</dialog> "
"<dialog name='GlobalOptions_MIDI' overlays='Dialog.GlobalOptions.TabWidget'> "
-"<layout type='vertical' padding='16,16,16,16' spacing='8'> "
+"<layout type='vertical' padding='16,16,16,16' spacing='6'> "
"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> "
"<widget name='auPrefGmPopupDesc' "
"type='OptionsLabel' "
@@ -927,6 +933,10 @@
"height='Globals.Line.Height' "
"/> "
"</layout> "
+"<widget name='mcFluidSynthSettings' "
+"width='150' "
+"height='Globals.Button.Height' "
+"/> "
"</layout> "
"</dialog> "
"<dialog name='GlobalOptions_MT32' overlays='Dialog.GlobalOptions.TabWidget'> "
@@ -1359,6 +1369,153 @@
"</layout> "
"</layout> "
"</dialog> "
+"<dialog name='FluidSynthSettings' overlays='GlobalOptions' shading='dim'> "
+"<layout type='vertical' padding='0,0,0,0'> "
+"<widget name='TabWidget'/> "
+"<layout type='horizontal' padding='8,8,8,8'> "
+"<space/> "
+"<widget name='ResetSettings' "
+"type='Button' "
+"/> "
+"<widget name='Cancel' "
+"type='Button' "
+"/> "
+"<widget name='Ok' "
+"type='Button' "
+"/> "
+"</layout> "
+"</layout> "
+"</dialog> "
+"<dialog name='FluidSynthSettings_Chorus' overlays='Dialog.FluidSynthSettings.TabWidget'> "
+"<layout type='vertical' padding='8,8,8,8' spacing='6'> "
+"<widget name='EnableTabCheckbox' "
+"type='Checkbox' "
+"/> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='VoiceCountText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='VoiceCountSlider' "
+"type='Slider' "
+"/> "
+"<widget name='VoiceCountLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='LevelText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='LevelSlider' "
+"type='Slider' "
+"/> "
+"<widget name='LevelLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='SpeedText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='SpeedSlider' "
+"type='Slider' "
+"/> "
+"<widget name='SpeedLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='DepthText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='DepthSlider' "
+"type='Slider' "
+"/> "
+"<widget name='DepthLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='WaveFormTypeText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='WaveFormType' "
+"type='PopUp' "
+"/> "
+"</layout> "
+"</layout> "
+"</dialog> "
+"<dialog name='FluidSynthSettings_Reverb' overlays='Dialog.FluidSynthSettings.TabWidget'> "
+"<layout type='vertical' padding='8,8,8,8' spacing='6'> "
+"<widget name='EnableTabCheckbox' "
+"type='Checkbox' "
+"/> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='RoomSizeText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='RoomSizeSlider' "
+"type='Slider' "
+"/> "
+"<widget name='RoomSizeLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='DampingText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='DampingSlider' "
+"type='Slider' "
+"/> "
+"<widget name='DampingLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='WidthText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='WidthSlider' "
+"type='Slider' "
+"/> "
+"<widget name='WidthLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='LevelText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='LevelSlider' "
+"type='Slider' "
+"/> "
+"<widget name='LevelLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"</layout> "
+"</dialog> "
+"<dialog name='FluidSynthSettings_Misc' overlays='Dialog.FluidSynthSettings.TabWidget'> "
+"<layout type='vertical' padding='8,8,8,8' spacing='6'> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='InterpolationText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='Interpolation' "
+"type='PopUp' "
+"/> "
+"</layout> "
+"</layout> "
+"</dialog> "
"<dialog name='SaveLoadChooser' overlays='screen' inset='8' shading='dim'> "
"<layout type='vertical' padding='8,8,8,8' center='true'> "
"<widget name='Title' height='Globals.Line.Height'/> "
@@ -1659,6 +1816,7 @@
"<layout type='vertical' center='true' padding='16,16,8,8'> "
"<widget name='Version' "
"height='Globals.Line.Height' "
+"textalign='center' "
"/> "
"<layout type='horizontal' spacing='5' padding='10,0,0,0'> "
"<widget name='SearchDesc' "
@@ -1717,7 +1875,11 @@
"height='Globals.Line.Height' "
"/> "
"<widget name='List'/> "
-"<layout type='horizontal' padding='0,0,16,0'> "
+"<layout type='vertical' padding='0,0,16,0'> "
+"<widget name='Hidden' "
+"type='Checkbox' "
+"/> "
+"<layout type='horizontal' padding='0,0,0,0'> "
"<widget name='Up' "
"type='Button' "
"/> "
@@ -1730,6 +1892,7 @@
"/> "
"</layout> "
"</layout> "
+"</layout> "
"</dialog> "
"<dialog name='GlobalOptions' overlays='Dialog.Launcher.GameList' shading='dim'> "
"<layout type='vertical' padding='0,0,0,0'> "
@@ -1905,6 +2068,10 @@
"height='Globals.Line.Height' "
"/> "
"</layout> "
+"<widget name='mcFluidSynthSettings' "
+"width='200' "
+"height='Globals.Button.Height' "
+"/> "
"</layout> "
"</dialog> "
"<dialog name='GlobalOptions_MT32' overlays='Dialog.GlobalOptions.TabWidget'> "
@@ -2323,6 +2490,153 @@
"</layout> "
"</layout> "
"</dialog> "
+"<dialog name='FluidSynthSettings' overlays='GlobalOptions' shading='dim'> "
+"<layout type='vertical' padding='0,0,0,0'> "
+"<widget name='TabWidget'/> "
+"<layout type='horizontal' padding='16,16,16,16'> "
+"<space/> "
+"<widget name='ResetSettings' "
+"type='Button' "
+"/> "
+"<widget name='Cancel' "
+"type='Button' "
+"/> "
+"<widget name='Ok' "
+"type='Button' "
+"/> "
+"</layout> "
+"</layout> "
+"</dialog> "
+"<dialog name='FluidSynthSettings_Chorus' overlays='Dialog.FluidSynthSettings.TabWidget'> "
+"<layout type='vertical' padding='16,16,16,16' spacing='8'> "
+"<widget name='EnableTabCheckbox' "
+"type='Checkbox' "
+"/> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='VoiceCountText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='VoiceCountSlider' "
+"type='Slider' "
+"/> "
+"<widget name='VoiceCountLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='LevelText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='LevelSlider' "
+"type='Slider' "
+"/> "
+"<widget name='LevelLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='SpeedText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='SpeedSlider' "
+"type='Slider' "
+"/> "
+"<widget name='SpeedLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='DepthText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='DepthSlider' "
+"type='Slider' "
+"/> "
+"<widget name='DepthLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='WaveFormTypeText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='WaveFormType' "
+"type='PopUp' "
+"/> "
+"</layout> "
+"</layout> "
+"</dialog> "
+"<dialog name='FluidSynthSettings_Reverb' overlays='Dialog.FluidSynthSettings.TabWidget'> "
+"<layout type='vertical' padding='16,16,16,16' spacing='8'> "
+"<widget name='EnableTabCheckbox' "
+"type='Checkbox' "
+"/> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='RoomSizeText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='RoomSizeSlider' "
+"type='Slider' "
+"/> "
+"<widget name='RoomSizeLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='DampingText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='DampingSlider' "
+"type='Slider' "
+"/> "
+"<widget name='DampingLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='WidthText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='WidthSlider' "
+"type='Slider' "
+"/> "
+"<widget name='WidthLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='LevelText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='LevelSlider' "
+"type='Slider' "
+"/> "
+"<widget name='LevelLabel' "
+"width='32' "
+"height='Globals.Line.Height' "
+"/> "
+"</layout> "
+"</layout> "
+"</dialog> "
+"<dialog name='FluidSynthSettings_Misc' overlays='Dialog.FluidSynthSettings.TabWidget'> "
+"<layout type='vertical' padding='16,16,16,16' spacing='8'> "
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
+"<widget name='InterpolationText' "
+"type='OptionsLabel' "
+"/> "
+"<widget name='Interpolation' "
+"type='PopUp' "
+"/> "
+"</layout> "
+"</layout> "
+"</dialog> "
"<dialog name='SaveLoadChooser' overlays='screen' inset='8' shading='dim'> "
"<layout type='vertical' padding='8,8,8,32' center='true'> "
"<layout type='horizontal' padding='0,0,0,0'> "
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 62eae0cd43..297ff20344 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC
index b8937adcb2..8f40cb2a7e 100644
--- a/gui/themes/scummclassic/THEMERC
+++ b/gui/themes/scummclassic/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.16:ScummVM Classic Theme:No Author]
+[SCUMMVM_STX0.8.20:ScummVM Classic Theme:No Author]
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 4a6aae00bc..180e8fba74 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -107,6 +107,7 @@
<layout type = 'vertical' center = 'true' padding = '16, 16, 8, 8'>
<widget name = 'Version'
height = 'Globals.Line.Height'
+ textalign = 'center'
/>
<layout type = 'horizontal' spacing = '5' padding = '10, 0, 0, 0'>
<widget name = 'SearchDesc'
@@ -166,17 +167,22 @@
height = 'Globals.Line.Height'
/>
<widget name = 'List'/>
- <layout type = 'horizontal' padding = '0, 0, 16, 0'>
- <widget name = 'Up'
- type = 'Button'
- />
- <space/>
- <widget name = 'Cancel'
- type = 'Button'
- />
- <widget name = 'Choose'
- type = 'Button'
+ <layout type = 'vertical' padding = '0, 0, 16, 0'>
+ <widget name = 'Hidden'
+ type = 'Checkbox'
/>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0'>
+ <widget name = 'Up'
+ type = 'Button'
+ />
+ <space/>
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Choose'
+ type = 'Button'
+ />
+ </layout>
</layout>
</layout>
</dialog>
@@ -359,6 +365,10 @@
height = 'Globals.Line.Height'
/>
</layout>
+ <widget name = 'mcFluidSynthSettings'
+ width = '200'
+ height = 'Globals.Button.Height'
+ />
</layout>
</dialog>
@@ -794,6 +804,157 @@
</layout>
</dialog>
+ <dialog name = 'FluidSynthSettings' overlays = 'GlobalOptions' shading = 'dim'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'TabWidget'/>
+ <layout type = 'horizontal' padding = '16, 16, 16, 16'>
+ <space/>
+ <widget name = 'ResetSettings'
+ type = 'Button'
+ />
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Ok'
+ type = 'Button'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Chorus' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'VoiceCountText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'VoiceCountSlider'
+ type = 'Slider'
+ />
+ <widget name = 'VoiceCountLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'LevelText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'LevelSlider'
+ type = 'Slider'
+ />
+ <widget name = 'LevelLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'SpeedText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'SpeedSlider'
+ type = 'Slider'
+ />
+ <widget name = 'SpeedLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'DepthText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'DepthSlider'
+ type = 'Slider'
+ />
+ <widget name = 'DepthLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'WaveFormTypeText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'WaveFormType'
+ type = 'PopUp'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Reverb' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'RoomSizeText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'RoomSizeSlider'
+ type = 'Slider'
+ />
+ <widget name = 'RoomSizeLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'DampingText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'DampingSlider'
+ type = 'Slider'
+ />
+ <widget name = 'DampingLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'WidthText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'WidthSlider'
+ type = 'Slider'
+ />
+ <widget name = 'WidthLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'LevelText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'LevelSlider'
+ type = 'Slider'
+ />
+ <widget name = 'LevelLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Misc' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'InterpolationText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'Interpolation'
+ type = 'PopUp'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
<dialog name = 'SaveLoadChooser' overlays = 'screen' inset = '8' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 8, 32' center = 'true'>
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 57e149b570..8bb03dea17 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -105,6 +105,7 @@
<layout type = 'vertical' center = 'true' padding = '6, 6, 2, 2'>
<widget name = 'Version'
height = 'Globals.Line.Height'
+ textalign = 'center'
/>
<layout type = 'horizontal' spacing = '5' padding = '0, 0, 0, 0'>
<widget name = 'SearchDesc'
@@ -163,18 +164,22 @@
height = 'Globals.Line.Height'
/>
<widget name = 'List'/>
- <layout type = 'horizontal' padding = '0, 0, 8, 0'>
- <widget name = 'Up'
- type = 'Button'
- />
- <space/>
- <widget name = 'Cancel'
- type = 'Button'
- />
-
- <widget name = 'Choose'
- type = 'Button'
+ <layout type = 'vertical' padding = '0, 0, 8, 0'>
+ <widget name = 'Hidden'
+ type = 'Checkbox'
/>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0'>
+ <widget name = 'Up'
+ type = 'Button'
+ />
+ <space/>
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Choose'
+ type = 'Button'
+ />
+ </layout>
</layout>
</layout>
</dialog>
@@ -321,7 +326,7 @@
</dialog>
<dialog name = 'GlobalOptions_MIDI' overlays = 'Dialog.GlobalOptions.TabWidget'>
- <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '6'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
<widget name = 'auPrefGmPopupDesc'
type = 'OptionsLabel'
@@ -357,6 +362,10 @@
height = 'Globals.Line.Height'
/>
</layout>
+ <widget name = 'mcFluidSynthSettings'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
</layout>
</dialog>
@@ -805,6 +814,157 @@
</layout>
</dialog>
+ <dialog name = 'FluidSynthSettings' overlays = 'GlobalOptions' shading = 'dim'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'TabWidget'/>
+ <layout type = 'horizontal' padding = '8, 8, 8, 8'>
+ <space/>
+ <widget name = 'ResetSettings'
+ type = 'Button'
+ />
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Ok'
+ type = 'Button'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Chorus' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'VoiceCountText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'VoiceCountSlider'
+ type = 'Slider'
+ />
+ <widget name = 'VoiceCountLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'LevelText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'LevelSlider'
+ type = 'Slider'
+ />
+ <widget name = 'LevelLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'SpeedText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'SpeedSlider'
+ type = 'Slider'
+ />
+ <widget name = 'SpeedLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'DepthText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'DepthSlider'
+ type = 'Slider'
+ />
+ <widget name = 'DepthLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'WaveFormTypeText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'WaveFormType'
+ type = 'PopUp'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Reverb' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'RoomSizeText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'RoomSizeSlider'
+ type = 'Slider'
+ />
+ <widget name = 'RoomSizeLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'DampingText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'DampingSlider'
+ type = 'Slider'
+ />
+ <widget name = 'DampingLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'WidthText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'WidthSlider'
+ type = 'Slider'
+ />
+ <widget name = 'WidthLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'LevelText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'LevelSlider'
+ type = 'Slider'
+ />
+ <widget name = 'LevelLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Misc' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'InterpolationText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'Interpolation'
+ type = 'PopUp'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
<dialog name = 'SaveLoadChooser' overlays = 'screen' inset = '8' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 8, 8' center = 'true'>
<widget name = 'Title' height = 'Globals.Line.Height'/>
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 38352bcc2f..dbd84992e6 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC
index 52eb683ebd..f4304622cb 100644
--- a/gui/themes/scummmodern/THEMERC
+++ b/gui/themes/scummmodern/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.16:ScummVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.20:ScummVM Modern Theme:No Author]
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index d99d7416c2..49c13cf1b0 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -180,17 +180,22 @@
height = 'Globals.Line.Height'
/>
<widget name = 'List'/>
- <layout type = 'horizontal' padding = '0, 0, 16, 0'>
- <widget name = 'Up'
- type = 'Button'
- />
- <space/>
- <widget name = 'Cancel'
- type = 'Button'
- />
- <widget name = 'Choose'
- type = 'Button'
+ <layout type = 'vertical' padding = '0, 0, 16, 0'>
+ <widget name = 'Hidden'
+ type = 'Checkbox'
/>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0'>
+ <widget name = 'Up'
+ type = 'Button'
+ />
+ <space/>
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Choose'
+ type = 'Button'
+ />
+ </layout>
</layout>
</layout>
</dialog>
@@ -373,6 +378,10 @@
height = 'Globals.Line.Height'
/>
</layout>
+ <widget name = 'mcFluidSynthSettings'
+ width = '200'
+ height = 'Globals.Button.Height'
+ />
</layout>
</dialog>
@@ -808,6 +817,157 @@
</layout>
</dialog>
+ <dialog name = 'FluidSynthSettings' overlays = 'GlobalOptions' shading = 'dim'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'TabWidget'/>
+ <layout type = 'horizontal' padding = '16, 16, 16, 16'>
+ <space/>
+ <widget name = 'ResetSettings'
+ type = 'Button'
+ />
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Ok'
+ type = 'Button'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Chorus' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'VoiceCountText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'VoiceCountSlider'
+ type = 'Slider'
+ />
+ <widget name = 'VoiceCountLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'LevelText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'LevelSlider'
+ type = 'Slider'
+ />
+ <widget name = 'LevelLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'SpeedText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'SpeedSlider'
+ type = 'Slider'
+ />
+ <widget name = 'SpeedLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'DepthText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'DepthSlider'
+ type = 'Slider'
+ />
+ <widget name = 'DepthLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'WaveFormTypeText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'WaveFormType'
+ type = 'PopUp'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Reverb' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'RoomSizeText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'RoomSizeSlider'
+ type = 'Slider'
+ />
+ <widget name = 'RoomSizeLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'DampingText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'DampingSlider'
+ type = 'Slider'
+ />
+ <widget name = 'DampingLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'WidthText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'WidthSlider'
+ type = 'Slider'
+ />
+ <widget name = 'WidthLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'LevelText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'LevelSlider'
+ type = 'Slider'
+ />
+ <widget name = 'LevelLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Misc' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'InterpolationText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'Interpolation'
+ type = 'PopUp'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
<dialog name = 'SaveLoadChooser' overlays = 'screen' inset = '8' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 8, 32' center = 'true'>
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 4fd5bdcf40..9658402f82 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -103,6 +103,7 @@
<layout type = 'vertical' center = 'true' padding = '4, 4, 2, 2' spacing = '2'>
<widget name = 'Version'
height = 'Globals.Line.Height'
+ textalign = 'center'
/>
<layout type = 'horizontal' spacing = '5' padding = '0, 0, 2, 2'>
<widget name = 'SearchDesc'
@@ -161,18 +162,22 @@
height = 'Globals.Line.Height'
/>
<widget name = 'List'/>
- <layout type = 'horizontal' padding = '0, 0, 8, 0'>
- <widget name = 'Up'
- type = 'Button'
- />
- <space/>
- <widget name = 'Cancel'
- type = 'Button'
- />
-
- <widget name = 'Choose'
- type = 'Button'
+ <layout type = 'vertical' padding = '0, 0, 8, 0'>
+ <widget name = 'Hidden'
+ type = 'Checkbox'
/>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0'>
+ <widget name = 'Up'
+ type = 'Button'
+ />
+ <space/>
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Choose'
+ type = 'Button'
+ />
+ </layout>
</layout>
</layout>
</dialog>
@@ -319,7 +324,7 @@
</dialog>
<dialog name = 'GlobalOptions_MIDI' overlays = 'Dialog.GlobalOptions.TabWidget'>
- <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '7'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
<widget name = 'auPrefGmPopupDesc'
type = 'OptionsLabel'
@@ -355,6 +360,10 @@
height = 'Globals.Line.Height'
/>
</layout>
+ <widget name = 'mcFluidSynthSettings'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
</layout>
</dialog>
@@ -804,6 +813,157 @@
</layout>
</dialog>
+ <dialog name = 'FluidSynthSettings' overlays = 'GlobalOptions' shading = 'dim'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'TabWidget'/>
+ <layout type = 'horizontal' padding = '8, 8, 8, 8'>
+ <space/>
+ <widget name = 'ResetSettings'
+ type = 'Button'
+ />
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Ok'
+ type = 'Button'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Chorus' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'VoiceCountText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'VoiceCountSlider'
+ type = 'Slider'
+ />
+ <widget name = 'VoiceCountLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'LevelText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'LevelSlider'
+ type = 'Slider'
+ />
+ <widget name = 'LevelLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'SpeedText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'SpeedSlider'
+ type = 'Slider'
+ />
+ <widget name = 'SpeedLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'DepthText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'DepthSlider'
+ type = 'Slider'
+ />
+ <widget name = 'DepthLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'WaveFormTypeText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'WaveFormType'
+ type = 'PopUp'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Reverb' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'RoomSizeText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'RoomSizeSlider'
+ type = 'Slider'
+ />
+ <widget name = 'RoomSizeLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'DampingText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'DampingSlider'
+ type = 'Slider'
+ />
+ <widget name = 'DampingLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'WidthText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'WidthSlider'
+ type = 'Slider'
+ />
+ <widget name = 'WidthLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'LevelText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'LevelSlider'
+ type = 'Slider'
+ />
+ <widget name = 'LevelLabel'
+ width = '32'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
+ <dialog name = 'FluidSynthSettings_Misc' overlays = 'Dialog.FluidSynthSettings.TabWidget'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'InterpolationText'
+ type = 'OptionsLabel'
+ />
+ <widget name = 'Interpolation'
+ type = 'PopUp'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
<dialog name = 'SaveLoadChooser' overlays = 'screen' inset = '8' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 8, 8' center = 'true'>
<widget name = 'Title' height = 'Globals.Line.Height'/>
diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat
index 704e9caca0..3dc7ef7e2d 100644
--- a/gui/themes/translations.dat
+++ b/gui/themes/translations.dat
Binary files differ
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 4ffb63e945..c3f10a861f 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -593,8 +593,8 @@ void SliderWidget::handleMouseUp(int x, int y, int button, int clickCount) {
void SliderWidget::handleMouseWheel(int x, int y, int direction) {
if (isEnabled() && !_isDragging) {
- // Increment or decrement one position
- int newValue = posToValue(valueToPos(_value) - 1 * direction);
+ // Increment or decrement by one
+ int newValue = _value - direction;
if (newValue < _valueMin)
newValue = _valueMin;
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index 1a552e97c0..829a49c53e 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -388,24 +388,28 @@ void PopUpWidget::handleMouseDown(int x, int y, int button, int clickCount) {
if (newSel != -1 && _selectedItem != newSel) {
_selectedItem = newSel;
sendCommand(kPopUpItemSelectedCmd, _entries[_selectedItem].tag);
+ draw();
}
}
}
void PopUpWidget::handleMouseWheel(int x, int y, int direction) {
- int newSelection = _selectedItem + direction;
+ if (isEnabled()) {
+ int newSelection = _selectedItem + direction;
- // Skip separator entries
- while ((newSelection >= 0) && (newSelection < (int)_entries.size()) &&
- _entries[newSelection].name.equals("")) {
- newSelection += direction;
- }
+ // Skip separator entries
+ while ((newSelection >= 0) && (newSelection < (int)_entries.size()) &&
+ _entries[newSelection].name.equals("")) {
+ newSelection += direction;
+ }
- // Just update the selected item when we're in range
- if ((newSelection >= 0) && (newSelection < (int)_entries.size()) &&
- (newSelection != _selectedItem)) {
- _selectedItem = newSelection;
- draw();
+ // Just update the selected item when we're in range
+ if ((newSelection >= 0) && (newSelection < (int)_entries.size()) &&
+ (newSelection != _selectedItem)) {
+ _selectedItem = newSelection;
+ sendCommand(kPopUpItemSelectedCmd, _entries[_selectedItem].tag);
+ draw();
+ }
}
}
diff --git a/po/POTFILES b/po/POTFILES
index 72c6fb1d18..4389904e29 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -25,6 +25,8 @@ engines/dialogs.cpp
engines/engine.cpp
engines/agi/detection.cpp
engines/agi/saveload.cpp
+engines/drascula/detection.cpp
+engines/drascula/saveload.cpp
engines/dreamweb/detection.cpp
engines/sci/detection.cpp
engines/scumm/dialogs.cpp
@@ -40,6 +42,7 @@ engines/agos/animation.cpp
engines/gob/inter_playtoons.cpp
engines/gob/inter_v2.cpp
engines/gob/inter_v5.cpp
+engines/groovie/detection.cpp
engines/groovie/script.cpp
engines/kyra/detection.cpp
engines/kyra/lol.cpp
@@ -55,7 +58,10 @@ engines/sword2/animation.cpp
engines/sword2/sword2.cpp
engines/teenagent/resources.cpp
engines/tinsel/saveload.cpp
+engines/toltecs/detection.cpp
+engines/toltecs/menu.cpp
engines/parallaction/saveload.cpp
+engines/pegasus/pegasus.cpp
audio/fmopl.cpp
audio/mididrv.cpp
diff --git a/po/be_BY.po b/po/be_BY.po
index 9539588ba6..9c0f0e0430 100644
--- a/po/be_BY.po
+++ b/po/be_BY.po
@@ -1,5 +1,5 @@
# Belarusian translation for ScummVM.
-# Copyright (C) 2010-2012 ScummVM Team
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Ivan Lukyanov <greencis@mail.ru>, 2012.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-12-12 22:02+0300\n"
"Last-Translator: Ivan Lukyanov <greencis@mail.ru>\n"
"Language-Team: Ivan Lukyanov <greencis@mail.ru>\n"
@@ -19,45 +19,55 @@ msgstr ""
"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Poedit 1.5.4\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(сабраны %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Уключаныя ў білд опцыі:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Даступныя рухавічкі:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Паказаць / Прыбраць кансоль"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Уверх"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Перайсці на дырэкторыю ўзроўнем вышэй"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Уверх"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
-#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
+#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
+#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Адмена"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Абраць"
@@ -72,15 +82,15 @@ msgstr "Закрыць"
msgid "Mouse click"
msgstr "Клік мышшу"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Паказаць клавіятуру"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Перапрызначыць клавішы"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Пераключэнне на ўвесь экран"
@@ -93,17 +103,18 @@ msgid "Map"
msgstr "Прызначыць"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560
-#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455
-#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -175,8 +186,8 @@ msgid ""
msgstr ""
"Мова гульні. Змена гэтай налады не ператворыць ангельскую гульню ў рускую"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<па змаўчанні>"
@@ -198,11 +209,11 @@ msgstr "Платформа:"
msgid "Engine"
msgstr "Рухавічок"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Графіка"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "Грф"
@@ -215,7 +226,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Перакрыць глабальныя налады графікі"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Аўдыё"
@@ -228,11 +239,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Перакрыць глабальныя налады аўдыё"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Гучнасць"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Гучн"
@@ -246,7 +257,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Перакрыць глабальныя налады гучнасці"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -259,7 +270,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Перакрыць глабальныя налады MIDI"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -272,11 +283,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Перакрыць глабальныя налады MT-32"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Шляхі"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Шляхі"
@@ -290,7 +301,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Дзе гульня:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Дад. шлях:"
@@ -298,42 +309,42 @@ msgstr "Дад. шлях:"
msgid "Specifies path to additional data used the game"
msgstr "Паказвае шлях да дадатковых файлаў, дадзеных для гульні"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Дад. шлях:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Захаванні гульняў:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Паказвае шлях да захаванняў гульні"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Шлях зах:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Не зададзены"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Па змаўчанні"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Абярыце SoundFont"
@@ -357,7 +368,7 @@ msgstr "Гэты ID гульні ўжо выкарыстоўваецца. Калі ласка, абярыце іншы."
msgid "~Q~uit"
msgstr "~В~ыхад"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Завяршыць ScummVM"
@@ -365,7 +376,7 @@ msgstr "Завяршыць ScummVM"
msgid "A~b~out..."
msgstr "Пра п~р~аграму..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Пра праграму ScummVM"
@@ -442,12 +453,14 @@ msgstr "Пошук:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Загрузіць гульню:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Загрузіць"
@@ -532,133 +545,133 @@ msgstr "Прагледжана %d дырэкторый ..."
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr "Знойдзена %d новых гульняў, прапушчана %d раней дададзеных гульняў ..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Ніколі"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "кожныя 5 хвілін"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "кожныя 10 хвілін"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "кожныя 15 хвілін"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "кожныя 30 хвілін"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 кГц"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11 кГц"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 кГц"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 кГц"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 кГц"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Не зададзены"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Не атрымалася ўжыць змены некаторых графічных налад:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "відэарэжым не можа быць зменены."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "поўнаэкранны рэжым не можа быць зменены"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "рэжым карэктыроўкі суадносін бакоў не можа быць зменены"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Граф. рэжым:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Рэжым растру:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Спецыяльныя рэжымы рэндэрынгу, падтрымоўваныя некаторымі гульнямі"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Поўнаэкранны рэжым"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Карэкцыя суадносін бакоў"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Карэктаваць суадносіны бакоў для гульняў з рэзалюцыяй 320x200"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Упадабанае:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Гукавая прылада:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Зазначае ўпадабаную гукавую прыладу ці эмулятар гукавой карты"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Зазначае выходную гукавую прыладу ці эмулятар гукавой карты"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Упадабанае:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Гук. прылада:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "Эмулятар AdLib:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "Гукавая карта AdLib выкарыстоўваецца многімі гульнямі"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Чашчыня гуку:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -666,64 +679,68 @@ msgstr ""
"Большыя значэнні задаюць лепшую якасць гуку, аднак яны могуць не "
"падтрымлівацца вашай гукавой картай"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "Прылада GM:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Зазначае выходную гукавую прыладу для MIDI"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Не выкарыстоўваць музыку для General MIDI"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Выкарыстоўваць першую даступную прыладу"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"SoundFont'ы падтрымліваюцца некаторымі гукавымі картамі, Fluidsynth ды "
"Timidity"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Змешаны рэжым AdLib/MIDI"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Выкарыстоўваць і MIDI, і AdLib для генерацыі гуку"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "Узмацненне MIDI:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "Нал. MT-32:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Паказвае гукавую прыладу па змаўчанні для вываду на Roland MT-32/LAPC1/CM32l/"
"CM64"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Сапраўдны Roland MT-32 (забараніць эмуляцыю GM)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -731,194 +748,195 @@ msgstr ""
"Адзначце, калі ў вас падключана Roland-сумяшчальная гукавая прылада і вы "
"жадаеце яе выкарыстоўваць"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Сапраўдны Roland MT-32 (забараніць GM)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Уключыць рэжым Roland GS"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Сапраўдны Roland MT-32 (забараніць эмуляцыю GM)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Выключае супастаўленне General MIDI для гульняў з гукавой дарожкай для "
"Roland MT-32"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Не выкарыстоўваць музыку для MT-32"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Тэкст і агучка:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Агучка"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Субтытры"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Абое"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Хуткасць тытраў:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Тэкст і агучка:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Агуч"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Суб"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Абое"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Паказваць субтытры і прайграваць гаворку"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Хуткасць тытраў:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Гучн. музыкі:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Гучн. музыкі:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Выкл. усё"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Гучнасць SFX:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Гучнасць спецыяльных гукавых эфектаў"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Гучн. SFX:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Гучн. агучкі:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Гучн. агучкі:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Шлях да тэм:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Дзе тэмы:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Паказвае шлях да дадатковых файлаў дадзеных, выкарыстоўваных усімі гульнямі, "
"або ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Шлях да плагінаў:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Шлях да плагінаў:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Рознае"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Рознае"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Тэма"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "Малявалка GUI:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Аўтазахаванне:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Аўтазах.:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Клавішы"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Мова GUI:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Мова графічнага інтэрфейсу ScummVM"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Вы павінны перазапусціць ScummVM, каб ужыць змены."
-#: gui/options.cpp:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Абярыце дырэкторыю для захаванняў"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Не магу пісаць у абраную дырэкторыю. Калі ласка, азначце іншую."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Абярыце дырэкторыю для тэм GUI"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Абярыце дырэкторыю з дадатковымі файламі"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Абярыце дырэкторыю з плагінамі"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -926,71 +944,71 @@ msgstr ""
"Тэма, абраная вамі, не падтрымлівае бягучую мову. Калі вы жадаеце "
"выкарыстоўваць гэтую тэму, вам неабходна спачатку пераключыцца на іншую мову."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr "Выгляд спісу"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr "Выгляд сеткі"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Дата не запісана"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Час не запісаны"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Час гульні не запісаны"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Выдаліць"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Вы сапраўды жадаеце выдаліць гэта захаванне?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Дата: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Час: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Час гульні: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Захаванне без імя"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr "Наступны"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr "Папярэдні"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
msgstr "Новае захаванне"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
msgstr "Стварыць новы запіс гульні"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr "Назва: "
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr "Увядзіце апісанне слота %d:"
@@ -1028,35 +1046,35 @@ msgstr "Растарызатар са згладжваннем (16bpp)"
msgid "Clear value"
msgstr "Ачысціць значэнне"
-#: base/main.cpp:209
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Рухавічок не падтрымлівае ўзровень адладкі '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Меню"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Прапусціць"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Паўза"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Прапусціць радок"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Памылка запуску гульні:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Не магу знайсці рухавічок для запуску абранай гульні"
@@ -1172,13 +1190,16 @@ msgid "~R~eturn to Launcher"
msgstr "~У~ галоўнае меню"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Захаваць гульню:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1208,12 +1229,12 @@ msgstr ""
"дапамогу."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~О~К"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~А~дмена"
@@ -1221,23 +1242,23 @@ msgstr "~А~дмена"
msgid "~K~eys"
msgstr "~К~лавішы"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Не магу ініцыялізаваць фармат колеру."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Не атрымалася пераключыць відэарэжым: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Не атрымалася выкарыстаць карэкцыю суадносін бакоў."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Не магу ўжыць поўнаэкранны рэжым."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1251,7 +1272,7 @@ msgstr ""
"на жорсткі дыск. Падрабязнасці можна знайсці ў\n"
"файле README."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1266,7 +1287,7 @@ msgstr ""
"з'явіцца музыка. Падрабязнасці можна знайсці ў\n"
"файле README."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1276,7 +1297,7 @@ msgstr ""
"README за базавай інфармацыяй, а таксама інструкцыямі пра тое, як атрымаць "
"далейшую дапамогу."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1286,30 +1307,52 @@ msgstr ""
"ScummVM цалкам. Яна, хутчэй за ўсё, не будзе працаваць стабільна, і "
"захаванні гульняў могуць не працаваць у будучых версіях ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Усё адно запусціць"
-#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:390
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Выкарыстоўваць арыгінальныя экраны запісу/чытанні гульні"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Выкарыстоўваць арыгінальныя экраны запісу і захаванні гульні замест "
"зробленых у ScummVM"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Узнавіць гульню:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Узнавіць"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 выявіў у вас захаванні гульні Broken Sword 1 у старым фармаце.\n"
+"Стары фармат больш не падтрымліваецца, і, каб загрузіць захаванні, яны "
+"павінны быць пераведзены ў новы фармат.\n"
+"\n"
+"Націсніце ОК, каб перавесці іх у новы фармат зараз, у адваротным выпадку "
+"гэта паведамленне з'явіцца зноў пры наступным запуску гульні.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Выкарыстоўваць рэжым яркай палітры"
@@ -1318,27 +1361,27 @@ msgstr "Выкарыстоўваць рэжым яркай палітры"
msgid "Display graphics using the game's bright palette"
msgstr "Малюе графіку з выкарыстаннем яркай палітры гульні"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA без растру"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Уключае рэжым без растравання ў EGA гульнях"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Аддаваць перавагу лічбавым гукавым эфектам"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Аддаваць перавагу лічбавым гукавым эфектам замест сінтэзаваных"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Выкарыстоўваць IMF/Yamaha FB-01 для вываду MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1346,32 +1389,32 @@ msgstr ""
"Выкарыстоўваць гукавую карту IBM Music Feature ці модуль сінтэзу Yamaha "
"FB-01 FM для MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Выкарыстоўваць CD аўдыё"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
"Выкарыстоўваць гукавыя дарожкі з CD замест музыкі з файлаў гульні (калі "
"даступна)"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Выкарыстоўваць курсоры Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Выкарыстоўваць курсоры Windows (меншыя па памеры і аднакаляровыя) замест "
"курсораў DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Выкарыстоўваць срэбныя курсоры"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -2024,7 +2067,7 @@ msgstr "Ляцець направа"
msgid "Fly to lower right"
msgstr "Ляцець направа-ўніз"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2033,7 +2076,7 @@ msgstr ""
"Рэжым \"роднага\" MIDI патрабуе абнаўленне Roland Upgrade ад\n"
"LucasArts, але не хапае %s. Пераключаюся на AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2044,7 +2087,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2055,7 +2098,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2066,7 +2109,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2512
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2077,7 +2120,7 @@ msgstr ""
"затым абярыце дырэкторыю Maniac у дырэкторыі з гульнёй Tentacle."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "Рэжым хуткага пераходу актываваны"
@@ -2098,11 +2141,11 @@ msgstr "Показать карту"
msgid "~M~ain Menu"
msgstr "Галоўнае меню"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "Эфекты вады ўключаны"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Файл застаўкі '%s' не знойдзены!"
@@ -2120,6 +2163,15 @@ msgstr "Не атрымалася захаваць гульню ў файл."
msgid "Failed to delete file."
msgstr "Не атрымалася выдаліць файл."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Хуткі рэжым"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Не атрымалася захаваць гульню"
@@ -2210,11 +2262,11 @@ msgstr "Слізгаць налева"
msgid "Slide Right"
msgstr "Слізгаць направа"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Паварот налева"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Паварот направа"
@@ -2230,7 +2282,7 @@ msgstr "Опцыі"
msgid "Choose Spell"
msgstr "Абраць загавор"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2277,26 +2329,26 @@ msgstr "Уступ з дыскет"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Выкарыстоўваць уступ з гнуткіх дыскаў (толькі для CD версіі гульні)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "Застаўка PSX '%s' не можа быць прайграна ў рэжыме з палітрай"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Знойдзены застаўкі ў фармаце DXA, але ScummVM быў сабраны без падтрымкі zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Застаўкі ў фармаце MPEG2 больш не падтрымліваюцца"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Застаўка '%s' не знойдзена"
-#: engines/sword1/control.cpp:863
+#: engines/sword1/control.cpp:865
msgid ""
"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
"converted.\n"
@@ -2313,7 +2365,7 @@ msgstr ""
"Націсніце ОК, каб перавесці іх у новы фармат зараз, у адваротным выпадку "
"гэта паведамленне з'явіцца зноў пры наступным запуску гульні.\n"
-#: engines/sword1/control.cpp:1232
+#: engines/sword1/control.cpp:1234
#, c-format
msgid ""
"Target new save game already exists!\n"
@@ -2322,11 +2374,11 @@ msgstr ""
"Захаванне гульні з такім імем ужо існуе!\n"
"Вы жадаеце пакінуць старую назву (%s) ці зрабіць новую (%s)?\n"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the old one"
msgstr "Пакінуць старое"
-#: engines/sword1/control.cpp:1235
+#: engines/sword1/control.cpp:1237
msgid "Keep the new one"
msgstr "Зрабіць новае"
@@ -2334,7 +2386,7 @@ msgstr "Зрабіць новае"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Гэта завяршэнне дэма Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2349,13 +2401,13 @@ msgstr "Паказваць назвы аб'ектаў"
msgid "Show labels for objects on mouse hover"
msgstr "Паказвае назвы аб'ектаў пры навядзенні курсора мышы"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
"У вас адсутнічае файл 'teenagent.dat'. Запампуйце яго з вэб-сайта ScummVM"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2412,6 +2464,47 @@ msgstr ""
"\n"
"Калі ласка, паведаміце пра гэта камандзе ScummVM."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Павял. маштаб"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Эмулятар MAME OPL"
@@ -2469,7 +2562,7 @@ msgstr "Без музыкі"
msgid "Amiga Audio Emulator"
msgstr "Эмулятар гуку Amiga"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Эмулятар AdLib"
@@ -2481,11 +2574,11 @@ msgstr "Эмулятар Apple II GS (адсутнічае)"
msgid "C64 Audio Emulator"
msgstr "Эмулятар гуку C64"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Наладжваю эмулятар MT-32"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "Эмулятар MT-32"
@@ -2636,24 +2729,24 @@ msgstr "Сярэдняя пстрычка"
msgid "Right Click"
msgstr "Правая пстрычка"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Схаваць ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Схаваць астатнія"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Паказаць усё"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Акно"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Прыбраць у Dock"
@@ -2667,12 +2760,12 @@ msgid "Normal (no scaling)"
msgstr "Без павелічэння"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Карэкцыя суадносін бакоў уключана"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Карэкцыя суадносін бакоў выключана"
@@ -2681,7 +2774,7 @@ msgid "Active graphics filter:"
msgstr "Актыўны графічны фільтр:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Аконны рэжым"
@@ -2705,11 +2798,11 @@ msgstr "Бягучы відэарэжым"
msgid "Current scale"
msgstr "Бягучы маштаб"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Актыўны рэжым фільтра: Лінейны"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Актыўны рэжым фільтра: Найблізкі"
@@ -3035,19 +3128,19 @@ msgstr "Вы сапраўды жадаеце выйсці?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Рэжым 'дотыкаў' тачскрына - Левы клік"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Рэжым 'дотыкаў' тачскрына - Правы клік"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Рэжым 'дотыкаў' тачскрына - Пралёт (без кліку)"
@@ -3067,7 +3160,12 @@ msgstr "Мінімальная гучнасць"
msgid "Decreasing Volume"
msgstr "Памяншэнне гучнасці"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Рэжым 'дотыкаў' тачскрына - Пралёт (без кліку)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Правяраю абнаўленні..."
@@ -3103,6 +3201,9 @@ msgstr "Пстрычкі ўключаны"
msgid "Clicking Disabled"
msgstr "Пстрычкі выключаны"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Уключыць рэжым Roland GS"
+
#~ msgid "Hercules Green"
#~ msgstr "Hercules Зелёный"
diff --git a/po/ca_ES.po b/po/ca_ES.po
index 2a6aa716cf..e655b807ec 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -1,5 +1,5 @@
# Catalan translation for ScummVM.
-# Copyright (C) 2007-2012 ScummVM Team
+# Copyright (C) 2007-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Jordi Vilalta Prat <jvprat@jvprat.com>, 2007-2011.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-08-26 20:32+0100\n"
"Last-Translator: Jordi Vilalta Prat <jvprat@jvprat.com>\n"
"Language-Team: Catalan <scummvm-devel@lists.sf.net>\n"
@@ -16,45 +16,55 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(compilat el %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Caracterэstiques compilades:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Motors disponibles:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Mostra / Oculta la consola"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Amunt"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Torna al nivell de directoris anterior"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Amunt"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "CancelЗla"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Escull"
@@ -90,17 +100,18 @@ msgid "Map"
msgstr "Assigna"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "D'acord"
@@ -173,8 +184,8 @@ msgstr ""
"Idioma del joc. Aixђ no convertirр la vostra versiѓ Espanyola del joc a "
"Anglшs"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<per defecte>"
@@ -196,11 +207,11 @@ msgstr "Platafor.:"
msgid "Engine"
msgstr "Motor"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grрfics"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "GFX"
@@ -213,7 +224,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Canviar les opcions de grрfics"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Рudio"
@@ -226,11 +237,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Canviar les opcions d'рudio"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Volum"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Volum"
@@ -244,7 +255,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Canviar les opcions de volum"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -257,7 +268,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Canviar les opcions de MIDI"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -270,11 +281,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Canviar les opcions de MT-32"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Camins"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Camins"
@@ -288,7 +299,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Camэ joc:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Camэ extra:"
@@ -296,42 +307,42 @@ msgstr "Camэ extra:"
msgid "Specifies path to additional data used the game"
msgstr "Especifica el camэ de dades addicionals utilitzades pel joc"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Camэ extra:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Camэ de partides:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Especifica on es desaran les partides"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Partides:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Cap"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Per defecte"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Seleccioneu el fitxer SoundFont"
@@ -443,12 +454,14 @@ msgstr "Cerca:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Carrega partida:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Carrega"
@@ -535,133 +548,133 @@ msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr ""
"S'han trobat %d jocs nous, s'han ignorat %d jocs afegits anteriorment ..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Mai"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "cada 5 minuts"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "cada 10 minuts"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "cada 15 minuts"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "cada 30 minuts"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Cap"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "No s'han pogut aplicar alguns canvis de les opcions grрfiques:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "no s'ha pogut canviar el mode de vэdeo"
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "no s'ha pogut canviar l'ajust de pantalla completa"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "no s'ha pogut canviar l'ajust de la correcciѓ d'aspecte"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Mode grрfic:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Mode de pintat:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Modes de tramat especials suportats per alguns jocs"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Mode pantalla completa"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Correcciѓ de la relaciѓ d'aspecte"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Corregeix la relaciѓ d'aspecte per jocs de 320x200"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Disp. preferit:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Disp. de mњsica:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Especifica el dispositiu de so o l'emulador de tarja de so preferit"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Especifica el dispositiu de so o l'emulador de tarja de so de sortida"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Disp. preferit:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Disp. de mњsica:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "Emulador AdLib:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib s'utilitza per la mњsica de molts jocs"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Freq. sortida:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -669,63 +682,67 @@ msgstr ""
"Valors mщs alts especifiquen millor qualitat de so perђ pot ser que la "
"vostra tarja de so no ho suporti"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "Dispositiu GM:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr ""
"Especifica el dispositiu de so per defecte per a la sortida General MIDI"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "No utilitzis mњsica General MIDI"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Utilitza el primer dispositiu disponible"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "Fitxer SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr "Algunes targes de so, Fluidsynth i Timidity suporten SoundFont"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Mode combinat AdLib/MIDI"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Utilitza MIDI i la generaciѓ de so AdLib alhora"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "Guany MIDI:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "Disposit. MT-32:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Especifica el dispositiu de so per defecte per a la sortida de Roland MT-32/"
"LAPC1/CM32l/CM64"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Roland MT-32 real (desactiva l'emulaciѓ GM)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -733,196 +750,197 @@ msgstr ""
"Marqueu si voleu utilitzar el vostre dispositiu hardware real de so "
"compatible amb Roland connectat al vostre ordinador"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 real (sense emulaciѓ GM)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Activa el Mode Roland GS"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Roland MT-32 real (desactiva l'emulaciѓ GM)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Desactiva la conversiѓ General MIDI pels jocs que tenen banda sonora per a "
"Roland MT-32"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "No utilitzis mњsica de Roland MT-32"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Text i Veus:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Veus"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Subtэtols"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Ambdѓs"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Velocitat de subt.:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Text i Veus:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Veus"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Subt"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Ambdѓs"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Mostra els subtэtols i reprodueix la veu"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Veloc. de subt.:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Volum de mњsica:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Volum de mњsica:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Silenciar tot"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Volum d'efectes:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Volum dels sons d'efectes especials"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Volum d'efectes:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Volum de veus:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Volum de veus:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Camэ dels temes:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Camэ temes:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Especifica el camэ de les dades addicionals utilitzades per tots els jocs o "
"pel ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Camэ dels connectors:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Camэ de connectors:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Misc"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Misc"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "Pintat GUI:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Desat automрtic:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Auto-desat:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Tecles"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Idioma GUI:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Idioma de la interfэcie d'usuari de ScummVM"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
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:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Seleccioneu el directori de les partides desades"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
"No es pot escriure al directori seleccionat. Si us plau, escolliu-ne un "
"altre."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Seleccioneu el directori dels temes"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Seleccioneu el directori dels fitxers extra"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Seleccioneu el directori dels connectors"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1176,13 +1194,16 @@ msgid "~R~eturn to Launcher"
msgstr "~R~etorna al Llanчador"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Desa la partida:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1210,12 +1231,12 @@ msgstr ""
"informaciѓ bрsica i les instruccions sobre com obtenir mщs assistшncia."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~D~'acord"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~C~ancelЗla"
@@ -1223,23 +1244,23 @@ msgstr "~C~ancelЗla"
msgid "~K~eys"
msgstr "~T~ecles"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "No s'ha pogut iniciar el format de color."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "No s'ha pogut canviar al mode de vэdeo: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "No s'ha pogut aplicar la configuraciѓ de la relaciѓ d'aspecte."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "No s'ha pogut aplicar l'ajust de pantalla completa."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1253,7 +1274,7 @@ msgstr ""
"els fitxers de dades al disc dur.\n"
"Consulteu el fitxer README per a mщs detalls."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1267,7 +1288,7 @@ msgstr ""
"tal de poder sentir la mњsica del joc.\n"
"Consulteu el fitxer README per a mщs detalls."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1276,7 +1297,7 @@ msgstr ""
"No s'ha pogut carregar la partida (%s)! Consulteu el fitxer README per a la "
"informaciѓ bрsica i les instruccions sobre com obtenir mщs assistшncia."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1286,29 +1307,52 @@ msgstr ""
"pel ScummVM. Com a tal, probablement serр inestable, i pot ser que les "
"partides que deseu no funcionin en versions futures de ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Inicia de totes maneres"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Utilitza les pantalles originals de desat/cрrrega"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
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"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Recupera la partida:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Restaura"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 ""
+"El ScummVM ha trobat que teniu partides desades antigues de Broken Sword 1 "
+"que s'haurien de convertir.\n"
+"El format de les partides desades antigues no estр suportat, per la qual "
+"cosa no podreu carregar aquestes partides si no les convertiu.\n"
+"\n"
+"Premeu D'Acord per convertir-les ara, en cas contrari se us tornarр a "
+"demanar la propera vegada que engegueu el joc.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Utilitza el mode de paleta brillant"
@@ -2023,7 +2067,7 @@ msgstr "Vola a la dreta"
msgid "Fly to lower right"
msgstr "Vola avall i a la dreta"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2032,7 +2076,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:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2043,7 +2087,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2054,7 +2098,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2065,7 +2109,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2076,7 +2120,7 @@ msgstr ""
"seleccioneu el directori 'Maniac' de dins del directori del joc Tentacle."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "Mode ~Z~ip activat"
@@ -2097,7 +2141,7 @@ msgstr "~M~ostra el mapa"
msgid "~M~ain Menu"
msgstr "~M~enњ Principal"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "~E~fecte de l'aigua activat"
@@ -2119,6 +2163,15 @@ msgstr "No s'ha pogut desar l'estat del joc al fitxer."
msgid "Failed to delete file."
msgstr "No s'ha pogut esborrar el fitxer."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Mode rрpid"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "No s'ha pogut desar l'estat del joc"
@@ -2209,11 +2262,11 @@ msgstr "Mou a l'esquerra"
msgid "Slide Right"
msgstr "Mou a la dreta"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Gira a l'esquerra"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Gira a la dreta"
@@ -2413,6 +2466,47 @@ msgstr ""
"\n"
"Informeu-ne a l'equip."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Amplia"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Emulador OPL de MAME"
@@ -2482,11 +2576,11 @@ msgstr "Emulador d'Apple II GS (NO IMPLEMENTAT)"
msgid "C64 Audio Emulator"
msgstr "Emulador d'рudio C64"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Iniciant l'Emulador de MT-32"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "Emulador de MT-32"
@@ -2668,12 +2762,12 @@ msgid "Normal (no scaling)"
msgstr "Normal (no escalat)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "S'ha activat la correcciѓ de la relaciѓ d'aspecte"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "S'ha desactivat la correcciѓ de la relaciѓ d'aspecte"
@@ -2682,7 +2776,7 @@ msgid "Active graphics filter:"
msgstr "Filtre de grрfics actiu:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Mode de finestra"
@@ -2706,11 +2800,11 @@ msgstr "Mode de vэdeo actual"
msgid "Current scale"
msgstr "Escala actual"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Mode de filtre actiu: Lineal"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Mode de filtre actiu: Prђxim"
@@ -3108,3 +3202,6 @@ msgstr "Clicat activat"
#: backends/events/maemosdl/maemosdl-events.cpp:192
msgid "Clicking Disabled"
msgstr "Clicat desactivat"
+
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Activa el Mode Roland GS"
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index 4f800906e7..9fb4934cb6 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -1,64 +1,72 @@
# Czech translation for ScummVM.
-# Copyright (C) 2001-2011 ScummVM Team
+# Copyright (C) 2001-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
-# Zbynьk Schwarz <zbynek.schwarz@gmail.com>, 2011.
+# Zbynьk Schwarz <zbynek.schwarz@gmail.com>, 2011-2013.
#
msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.4.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
-"PO-Revision-Date: 2012-07-08 18:03+0100\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
+"PO-Revision-Date: 2013-02-07 10:36+0100\n"
"Last-Translator: Zbynьk Schwarz <zbynek.schwarz@gmail.com>\n"
"Language-Team: \n"
"Language: Cesky\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n"
-"X-Poedit-Language: Czech\n"
-"X-Poedit-Country: CZECH REPUBLIC\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"X-Poedit-SourceCharset: iso-8859-2\n"
+"X-Generator: Poedit 1.5.5\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(sestaveno %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Zakompilovanщ funkce:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Dostupnс jсdra:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+msgid "Show hidden files"
+msgstr "Zobrazit skrytщ soubory"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr "Zobrazit soubory s vlastnostэ skrytщ"
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Jэt nahoru"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Jэt na pјedchozэ њroveђ adresсјe"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Jэt nahoru"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "ZruЙit"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Zvolit"
@@ -94,17 +102,18 @@ msgid "Map"
msgstr "Mapovat"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -175,8 +184,8 @@ msgid ""
"English"
msgstr "Jazyk hry. Toto z VaЙэ Љpanьlskщ verze neudьlс Anglickou"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<v§chozэ>"
@@ -198,11 +207,11 @@ msgstr "Platforma:"
msgid "Engine"
msgstr "Jсdro"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Obraz"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "GFX"
@@ -215,7 +224,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Potlaшit globсlnэ nastavenэ obrazu"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Zvuk"
@@ -228,11 +237,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Potlaшit globсlnэ nastavenэ zvuku"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Hlasitost"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Hlasitost"
@@ -246,7 +255,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Potlaшit globсlnэ nastavenэ hlasitosti"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -259,7 +268,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Potlaшit globсlnэ nastavenэ MIDI"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -272,11 +281,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Potlaшit globсlnэ nastavenэ MT-32"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Cesty"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Cesty"
@@ -290,7 +299,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Cesta Hry:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Dodateшnс Cesta:"
@@ -298,42 +307,42 @@ msgstr "Dodateшnс Cesta:"
msgid "Specifies path to additional data used the game"
msgstr "Stanovэ cestu pro dodateшnс data pouОitс ve hјe"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Dodateшnс Cesta:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Cesta pro uloОenэ:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Stanovuje, kam jsou umэstьny vaЙe uloОenщ hry"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Cesta pro uloОenэ:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Ўсdnщ"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "V§chozэ"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Vybrat SoundFont"
@@ -442,12 +451,14 @@ msgstr "Hledat:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Nahrсt hru:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Nahrсt"
@@ -532,133 +543,133 @@ msgstr "Prohledсno %d adresсјљ..."
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr "Objeveno %d nov§ch her, ignorovсno %d dјэve pјidan§ch her ..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Nikdy"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "KaОd§ch 5 min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "KaОd§ch 10 min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "KaОd§ch 15 min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "KaОd§ch 30 min"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Ўсdnщ"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Nelze pouОэt nьkterщ zmьny moОnostэ grafiky:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "reОim obrazu nemohl b§t zmьnьn."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "nastavenэ celщ obrazovky nemohlo b§t zmьnьno"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "nastavenэ pomьru stran nemohlo b§t zmьnьno"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "ReОim obrazu:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "ReОim vykreslenэ:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Speciсlnэ reОimy chvьnэ podporovanщ nьkter§mi hrami"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "ReОim celщ obrazovky"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Korekce pomьru stran"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Korigovat pomьr stran pro hry 320x200"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Prioritnэ Zaјэzenэ:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Hudebnэ zaјэzenэ"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Stanovэ prioritnэ zvukovщ zaјэzenэ nebo emulсtor zvukovщ karty"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Stanovэ v§stupnэ zvukovщ zaјэzenэ nebo emulсtor zvukovщ karty"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Prioritnэ Zaј.:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Hudebnэ zaјэzenэ"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "AdLib emulсtor"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib se pouОэvс pro hudbu v mnoha hrсch"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "V§stup. frekvence:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -666,62 +677,66 @@ msgstr ""
"VyЙЙэ hodnota zpљsobэ lepЙэ kvalitu zvuku, ale nemusэ b§t podporovсna VaЙi "
"zvukovou kartou"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "GM Zaјэzenэ:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Stanovэ v§chozэ zvukovщ zaјэzenэ pro v§stup General MIDI"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "NepouОэvat hudbu General MIDI"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "PouОэt prvnэ dostupnщ zaјэzenэ"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
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"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "SmэЙen§ reОim AdLib/MIDI"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "PouОэt obь zvukovщ generace MIDI a AdLib"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "Zesэlenэ MIDI:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr "Nastavenэ FluidSynth"
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "Zaјэzenэ MT-32:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Stanovэ v§chozэ zvukovщ v§stupnэ zaјэzenэ pro Roland MT-32/LAPC1/CM32l/CM64"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Opravdov§ Roland MT-32 (vypne GM emulaci)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -729,190 +744,190 @@ msgstr ""
"ZaЙkrtnьte, pokud chcete pouОэt pravщ hardwarovщ zaјэzenэ kompatibilnэ s "
"Roland, pјipojenщ k vaЙemu poшэtaшi"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Opravdov§ Roland MT-32 (Осdnс GM emulace)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Zapnout reОim Roland GS"
+#: gui/options.cpp:890
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "ReОim Roland GS (vypne mapovсnэ GM)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Vypne mapovсnэ General MIDI pro hry s Roland MT-32 zvukov§m doprovodem"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "NepouОэvat hudbu Roland MT-32"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Text a иeш"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "иeш"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Titulky"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Oba"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Rychlost titulkљ:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Text a иeш:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "иeш"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Titl"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Oba"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Zobrazit titulky a pјehrсvat јeш"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Rychlost titulkљ"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Hlasitost hudby"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Hlasitost hudby"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Ztlumit VЙe"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Hlasitost zvukљ"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Hlasitost speciсlnэch zvukov§ch efektљ"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Hlasitost zvukљ"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Hlasitost јeшi"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Hlasitost јeшi"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Cesta ke Vzhledu:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Cesta ke Vzhledu:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "Stanovэ cestu k dodateшn§m datљm pouОэvanс vЙemi hrami nebo ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Cesta k Pluginљm:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Cesta k Pluginљm:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Rљznщ"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Rљznщ"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Vzhled:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "GUI Vykreslovaш:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Autouklсdсnэ:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autouklсdсnэ:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Klсvesy"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Jazyk GUI"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Jazyk GUI ScummVM"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
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:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Vybrat adresсј pro uloОenщ hry"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Do zvolenщho adresсјe nelze zapisovat. Vyberte, prosэm, jin§."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Vyberte adresсј pro vhledy GUI"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Vyberte adresсј pro dodateшnщ soubory"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Vyberte adresсј pro zсsuvnщ moduly"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -922,11 +937,11 @@ msgstr ""
#: gui/saveload-dialog.cpp:166
msgid "List view"
-msgstr ""
+msgstr "Seznam"
#: gui/saveload-dialog.cpp:167
msgid "Grid view"
-msgstr ""
+msgstr "MјэОka"
#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
@@ -966,31 +981,28 @@ msgstr "Bezejmenn§ uloОen§ stav"
#: gui/saveload-dialog.cpp:546
msgid "Next"
-msgstr ""
+msgstr "DalЙэ"
#: gui/saveload-dialog.cpp:549
msgid "Prev"
-msgstr ""
+msgstr "Pјedchozэ"
#: gui/saveload-dialog.cpp:736
-#, fuzzy
msgid "New Save"
-msgstr "UloОit"
+msgstr "Novс uloОenс pozice"
#: gui/saveload-dialog.cpp:736
-#, fuzzy
msgid "Create a new save game"
-msgstr "Nelze uloОit hru."
+msgstr "Vytvoјit novou uloОenou hru."
#: gui/saveload-dialog.cpp:865
-#, fuzzy
msgid "Name: "
-msgstr "Jmщno"
+msgstr "Nсzev:"
#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
-msgstr ""
+msgstr "Zadejte popis pro pozici %d:"
#: gui/themebrowser.cpp:44
msgid "Select a Theme"
@@ -1168,13 +1180,16 @@ msgid "~R~eturn to Launcher"
msgstr "~N~сvrat do SpouЙtьшe"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "UloОit hru:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1203,12 +1218,12 @@ msgstr ""
"informace a pokyny k zэskсnэ dalЙэ podpory."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~Z~ruЙit"
@@ -1216,23 +1231,23 @@ msgstr "~Z~ruЙit"
msgid "~K~eys"
msgstr "~K~lсvesy"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Nelze zavщst barevn§ formсt."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Nelze pјepnout na reОim obrazu: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Nelze pouОэt nastavenэ pomьru stran."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Nelze pouОэt nastavenэ celщ obrazovky."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1246,7 +1261,7 @@ msgstr ""
"datovщ soubory na VсЙ pevn§ disk.\n"
"Pro podrobnosti si pјeшtьte README."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1260,7 +1275,7 @@ msgstr ""
"abyste mohli poslouchat hudbu ve hјe.\n"
"Pro podrobnosti si pјeшtьte README."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1269,7 +1284,7 @@ msgstr ""
"Naшtenэ stavu hry selhalo (%s)! Prosэm pјeшtьte si dokumentaci pro zсkladnэ "
"informace a pokyny k zэskсnэ dalЙэ podpory."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1279,28 +1294,50 @@ msgstr ""
"ScummVM. Proto je moОnщ, Оe bude nestabilnэ a jakщkoli uloОenщ hry nemusэ "
"fungovat v budoucэch verzэch ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Pјesto spustit"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "PouОэt pљvodnэ obrazovky naшtenэ/uloОenэ"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
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"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Obnovit hru"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Obnovit"
+#: engines/drascula/saveload.cpp:49
+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 zjistil, Оe mсte starщ uloОenщ pozice pro Drascula, kterщ by mьly "
+"b§t pјevedeny.\n"
+"Star§ formсt uloОen§ch her jiО nenэ podporovсn, takОe pokud je nepјevedete, "
+"nebudete moci vaЙe hry naшэst.\n"
+"\n"
+"Stisknьte OK, abyste je pјevedli teя, jinak budete poОсdсni znovu, pјi "
+"spuЙtьnэ tщto hry.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "PouОэt reОim jasnщ palety"
@@ -2010,7 +2047,7 @@ msgstr "Letьt doprava"
msgid "Fly to lower right"
msgstr "Letьt doprava dolљ"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2019,7 +2056,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:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2030,7 +2067,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2041,7 +2078,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2052,7 +2089,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2063,7 +2100,7 @@ msgstr ""
"vyberte adresсј 'Maniac' uvnitј hernэho adresсјe Tentacle."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "~R~eОim SviЙtьnэ Aktivovсn"
@@ -2084,7 +2121,7 @@ msgstr "~Z~obrazit Mapu"
msgid "~M~ain Menu"
msgstr "~H~lavnэ Menu"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "~E~fekt Vody Zapnut"
@@ -2106,6 +2143,14 @@ msgstr "Nelze uloОit stav hry do souboru."
msgid "Failed to delete file."
msgstr "Nelze smazat soubor."
+#: engines/groovie/detection.cpp:312
+msgid "Fast movie speed"
+msgstr "Zv§Йenс rychlost videa"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Pјehrсt videa se zv§Йenou rychlostэ"
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Nelze uloОit hru."
@@ -2196,11 +2241,11 @@ msgstr "Pјesunout se Doleva"
msgid "Slide Right"
msgstr "Pјesunout se Doprava"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Otoшit se doleva"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Otoшit se doprava"
@@ -2232,12 +2277,11 @@ msgstr ""
#: engines/queen/queen.cpp:59
msgid "Alternative intro"
-msgstr ""
+msgstr "Alternativnэ њvod"
#: engines/queen/queen.cpp:60
-#, fuzzy
msgid "Use an alternative game intro (CD version only)"
-msgstr "PouОэt verzi њvodu z diskety (Pouze verze CD)"
+msgstr "PouОэt jinou verzi њvodu (Pouze verze CD)"
#: engines/sky/compact.cpp:130
msgid ""
@@ -2336,13 +2380,15 @@ msgstr "Zobrazit jmenovky objektљ pјi najetэ myЙi"
#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
+msgstr "Chybэ vсm soubor 'teenagent.dat'. MљОete ho zэskat ze strсnky ScummVM."
#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+"Soubor teenagent.dat je komprimovсn a zlib nenэ souшсstэ spustitelnщho "
+"souboru. Prosэm dekomprimujte ho"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2393,6 +2439,47 @@ msgstr ""
"\n"
"Prosэm nahlaste to t§mu"
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "PјiblэОenэ nahoru"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL Emulсtor"
@@ -2462,11 +2549,11 @@ msgstr "Apple II GS Emulсtor (NENЭ ZAVEDEN)"
msgid "C64 Audio Emulator"
msgstr "Emulсtor zvuku C64"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Zavсdэm MT-32 Emulсtor"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "MT-32 Emulсtor"
@@ -2648,12 +2735,12 @@ msgid "Normal (no scaling)"
msgstr "Normсlnэ (bez zmьny velikosti)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Povolena korekce pomьru stran"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Zakсzсna korekce pomьru stran"
@@ -2662,7 +2749,7 @@ msgid "Active graphics filter:"
msgstr "Aktivnэ grafick§ filtr:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "ReОim do okna"
@@ -2686,11 +2773,11 @@ msgstr "Souшasn§ reОim obrazu"
msgid "Current scale"
msgstr "Souшasnс velikost"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Aktivnэ reОim filtru: Lineсrnэ"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Aktivnэ reОim filtru: NejbliОЙэ"
@@ -3051,9 +3138,8 @@ msgid "Decreasing Volume"
msgstr "SniОuji Hlasitost"
#: backends/events/openpandora/op-events.cpp:174
-#, fuzzy
msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
-msgstr "'ReОim Ћuknutэ' Dotykovщ Obrazovky - Najetэ (Bez Kliknutэ)"
+msgstr "'ReОim Ћuknutэ' Dotykovщ Obrazovky - Najetэ (Dpad klikс)"
#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
@@ -3091,6 +3177,9 @@ msgstr "Kliknutэ Povoleno"
msgid "Clicking Disabled"
msgstr "Kliknutэ Zakсzсno"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Zapnout reОim Roland GS"
+
#~ msgid "Hercules Green"
#~ msgstr "Hercules Zelenс"
diff --git a/po/da_DA.po b/po/da_DA.po
index 002bd4e13c..bdb774a52b 100644
--- a/po/da_DA.po
+++ b/po/da_DA.po
@@ -1,4 +1,5 @@
-# Copyright (C) 2010-2012 ScummVM Team
+# Dansk translation for ScummVM
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Steffen Nyeland <steffen@nyeland.dk>, 2010.
#
@@ -6,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-07-09 20:27+0100\n"
"Last-Translator: Steffen Nyeland <steffen@nyeland.dk>\n"
"Language-Team: Steffen Nyeland <steffen@nyeland.dk>\n"
@@ -18,45 +19,55 @@ msgstr ""
"X-Poedit-Language: Danish\n"
"X-Poedit-Country: DENMARK\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(bygget den %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Funktioner kompileret ind:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Tilgцngelige \"motorer\":"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Vis / Skjul konsol"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Gх op"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Gх til forrige biblioteks niveau"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Gх op"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Fortryd"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Vцlg"
@@ -92,17 +103,18 @@ msgid "Map"
msgstr "Kortlцg"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -175,8 +187,8 @@ msgstr ""
"Spillets sprog. Dette vil ikke цndre din spanske version af spillet til "
"engelsk"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<standard>"
@@ -198,11 +210,11 @@ msgstr "Platform:"
msgid "Engine"
msgstr "Motor"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grafik"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "GFX"
@@ -215,7 +227,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Overstyr globale grafik indstillinger"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Lyd"
@@ -228,11 +240,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Overstyr globale lyd indstillinger"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Lydstyrke"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Lydstyrke"
@@ -246,7 +258,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Overstyr globale lydstyrke indstillinger"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -259,7 +271,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Overstyr globale MIDI indstillinger"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -272,11 +284,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Overstyr globale MT-32 indstillinger"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Stier"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Stier"
@@ -290,7 +302,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Spil sti:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Ekstra sti:"
@@ -298,42 +310,42 @@ msgstr "Ekstra sti:"
msgid "Specifies path to additional data used the game"
msgstr "Angiver sti til ekstra data der bruges i spillet"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Ekstra sti:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Gemme sti:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Angiver hvor dine gemmer bliver lagt"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Gemme sti:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Ingen"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Standard"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Vцlg SoundFont"
@@ -442,12 +454,14 @@ msgstr "Sјg:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Indlцs spil:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Indlцs"
@@ -533,133 +547,133 @@ msgstr "Gennemset %d biblioteker ..."
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr "Fundet %d nye spil, ignorer %d tidligere tilfјjede spil ..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Aldrig"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "hvert 5. minut"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "hvert 10. minut"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "hvert 15. minut"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "hvert 30. minut"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Ingen"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Anvendelse af цndringer for grafiske indstillinger fejlede:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "videotilstanden kunne ikke цndres."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "fuld skцrm indstillingen kunne ikke цndres"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "billedformat indstillingen ikke kunne цndres"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Grafik tilstand:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Rendere tilstand:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Speciel farvereduceringstilstand understјttet a nogle spil"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Fuldskцrms tilstand"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Billedformat korrektion"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Korrekt billedformat til 320x200 spil"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Foretruk. enhed:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Musik enhed:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Angiver foretukket lyd enhed eller lydkort emulator"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Angiver lyd udgangsenhed eller lydkorts emulator"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Foretruk. enh.:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Musik enhed:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "AdLib emulator:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib bliver brugt til musik i mange spil"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Udgangsfrekvens:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -667,60 +681,64 @@ msgstr ""
"Hјjere vцrdi angiver bedre lyd kvalitet, men understјttes mхske ikke af dit "
"lydkort"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "GM enhed:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Angiver standard lyd enhed for Generel MIDI-udgang"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Brug ikke Generel MIDI musik"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Brug fјrste tilgцngelig enhed"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
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:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Blandet AdLib/MIDI tilstand"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Brug bхde MIDI og AdLib lyd generering"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "MIDI lydstyrke:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "MT-32 enhed:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr "Angiver standard lyd enhed for Roland MT-32/LAPC1/CM32I/CM64 udgang"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Цgte Roland MT-32 (undlad GM emulering)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -728,190 +746,191 @@ msgstr ""
"Kontroller om du vil bruge din rigtige hardware Roland-kompatible lyd enhed "
"tilsluttet til din computer"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Цgte Roland MT-32 (ingen GM emulering)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Aktivщr Roland GS tilstand"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Цgte Roland MT-32 (undlad GM emulering)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Sluk for Generel MIDI kortlцgning for spil med Roland MT-32 lydspor"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Brug ikke Roland MT-32 musik"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Tekst og tale:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Tale"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Undertekster"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Begge"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Tekst hastighed:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Tekst og tale:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Tale"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Tekst"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Begge"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Vis undertekster og afspil tale"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Tekst hastighed:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Musik lydstyrke:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musik lydstyrke:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Mute alle"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "SFX lydstyrke:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Lydstyrke for specielle lydeffekter"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "SFX lydstyrke:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Tale lydstyrke:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Tale lydstyrke:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Tema sti:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Tema sti:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "Angiver sti til ekstra data brugt af alle spil eller ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Plugin sti:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Plugin sti:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Andet"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Andet"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "GUI renderer:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Auto gemme:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Auto gemme:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Taster"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Sprog:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Sprog for brugerfladen i ScummVM"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
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:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Vцlg bibliotek til gemmer"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
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."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Vцlg bibliotek for GUI temaer"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Vцlg bibliotek for ekstra filer"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Vцlg bibliotek for plugins"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1168,13 +1187,16 @@ msgid "~R~eturn to Launcher"
msgstr "~R~etur til oversigt"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Gemmer:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1203,12 +1225,12 @@ msgstr ""
"oplysninger, og for at fх instruktioner om, hvordan man fхr yderligere hjцlp."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~F~ortryd"
@@ -1216,23 +1238,23 @@ msgstr "~F~ortryd"
msgid "~K~eys"
msgstr "~T~aster"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Kunne ikke initialisere farveformat."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Kunne ikke skifte til videotilstand: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Kunne ikke anvende billedformat korrektion indstilling."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Kunne ikke anvende fuldskцrm indstilling."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1246,7 +1268,7 @@ msgstr ""
"datafiler til din harddisk i stedet.\n"
"Se README fil for detaljer."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1260,7 +1282,7 @@ msgstr ""
"for at lytte til spillets musik.\n"
"Se README fil for detaljer."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1270,7 +1292,7 @@ msgstr ""
"grundlцggende oplysninger, og for at fх instruktioner om, hvordan man fхr "
"yderligere hjцlp."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1280,28 +1302,51 @@ msgstr ""
"ScummVM. Sхledes, er det sandsynligt, at det er ustabilt, og alle gemmer du "
"foretager fungerer muligvis ikke i fremtidige versioner af ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Start alligevel"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Brug original gem/indlцs skцrme"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
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"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Gendan spil:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Gendan"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 har konstateret, at du har gamle gemmer for Broken Sword 1, der skal "
+"konverteres.\n"
+"Det gamle gemte spil format understјttes ikke lцngere, sх vil du ikke vцre i "
+"stand til at indlцse dine spil, hvis du ikke konvertere dem.\n"
+"\n"
+"Tryk pх OK for at konvertere dem nu, ellers vil du blive spurgt igen, nцste "
+"gang du starter spillet.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Brug lys palet tilstand"
@@ -2012,7 +2057,7 @@ msgstr "Flyv til hјjre"
msgid "Fly to lower right"
msgstr "Flyv nederst til hјjre"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2021,7 +2066,7 @@ msgstr ""
"Indbygget MIDI understјttelse krцver Roland opgradering fra LucasArts,\n"
"men %s mangler. Bruger AdLib i stedet."
-#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2032,7 +2077,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2043,7 +2088,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2054,7 +2099,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2065,7 +2110,7 @@ msgstr ""
"vцlg 'Maniac' mappen inde i Tentacle spillets mappe."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "~Z~ip tilstand aktiveret"
@@ -2086,7 +2131,7 @@ msgstr "Vi~s~ kort"
msgid "~M~ain Menu"
msgstr "Hoved~m~enu"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "~V~andeffekter aktiveret"
@@ -2108,6 +2153,15 @@ msgstr "Mislykkedes at gemme spil tilstand til fil."
msgid "Failed to delete file."
msgstr "Mislykkedes at slette fil."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Hurtig tilstand"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Mislykkedes at gemme spil"
@@ -2198,11 +2252,11 @@ msgstr "Flyt til venstre"
msgid "Slide Right"
msgstr "Flyt til hјjre"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Drej til venstre"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Drej til hјjre"
@@ -2397,6 +2451,47 @@ msgstr ""
"\n"
"Venligst rapportщr til holdet."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Formindsk"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL emulator"
@@ -2465,11 +2560,11 @@ msgstr "Apple II GS emulator (IKKE IMPLEMENTERET)"
msgid "C64 Audio Emulator"
msgstr "C64 lyd emulator"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Initialisere MT-32 emulator"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "MT-32 emulator"
@@ -2651,12 +2746,12 @@ msgid "Normal (no scaling)"
msgstr "Normal (ingen skalering)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Aktivщr billedformat korrektion"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Deaktivщr billedformat korrektion"
@@ -2665,7 +2760,7 @@ msgid "Active graphics filter:"
msgstr "Aktive grafik filtre:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Vindue tilstand"
@@ -2689,11 +2784,11 @@ msgstr "Aktuel videotilstand"
msgid "Current scale"
msgstr "Aktuel skalering"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Aktiv filter tilstand: Linцr"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Aktiv filter tilstand: Nцrmest"
@@ -3093,6 +3188,9 @@ msgstr "Klik aktiveret"
msgid "Clicking Disabled"
msgstr "Klik deaktiveret"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Aktivщr Roland GS tilstand"
+
#~ msgid "Hercules Green"
#~ msgstr "Hercules grјn"
diff --git a/po/de_DE.po b/po/de_DE.po
index ae7b48eae0..4676292e90 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -1,5 +1,5 @@
# German translation for ScummVM.
-# Copyright (C) 2010-2012 ScummVM Team
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Simon Sawatzki <SimSaw@gmx.de>, Lothar Serra Mari <Lothar@Windowsbase.de>, 2012.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-07-14 22:49+0100\n"
"Last-Translator: Simon Sawatzki <SimSaw@gmx.de>\n"
"Language-Team: Simon Sawatzki <SimSaw@gmx.de> (Lead), Lothar Serra Mari "
@@ -18,45 +18,55 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(erstellt am %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Verwendete Funktionen:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Verfќgbare Spiele-Engines:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Konsole zeigen/verbergen"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Pfad hoch"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Zu hіherer Pfadebene wechseln"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Pfad hoch"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Abbrechen"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Auswфhlen"
@@ -92,17 +102,18 @@ msgid "Map"
msgstr "Zuweisen"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -175,8 +186,8 @@ msgstr ""
"Sprache des Spiels. Diese Funktion wird nicht eine spanische Version des "
"Spiels in eine deutsche verwandeln."
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<Standard>"
@@ -198,11 +209,11 @@ msgstr "Plattform:"
msgid "Engine"
msgstr "Engine"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grafik"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "GFX"
@@ -215,7 +226,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Globale Grafikeinstellungen ќbergehen"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Audio"
@@ -228,11 +239,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Globale Audioeinstellungen ќbergehen"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Lautstфrke"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Lautst."
@@ -246,7 +257,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Globale Lautstфrkeeinstellungen ќbergehen"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -259,7 +270,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Globale MIDI-Einstellungen ќbergehen"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -272,11 +283,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Globale MT-32-Einstellungen ќbergehen"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Pfade"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Pfade"
@@ -290,7 +301,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Spielpfad:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Extrapfad:"
@@ -298,42 +309,42 @@ msgstr "Extrapfad:"
msgid "Specifies path to additional data used the game"
msgstr "Legt das Verzeichnis fќr zusфtzliche Spieldateien fest."
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Extrapfad:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Spielstфnde:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Legt fest, wo die Spielstфnde abgelegt werden."
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Speichern:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Keiner"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Standard"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "SoundFont auswфhlen"
@@ -444,12 +455,14 @@ msgstr "Suchen:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Spiel laden:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Laden"
@@ -535,136 +548,136 @@ msgstr "%d Ordner durchsucht..."
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr "%d neue Spiele gefunden, %d bereits hinzugefќgte Spiele ignoriert..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Niemals"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "alle 5 Minuten"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "alle 10 Minuten"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "alle 15 Minuten"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "alle 30 Minuten"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "-"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Fehler bei einigen Фnderungen in Grafikoptionen:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "Grafikmodus konnte nicht geфndert werden."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "Vollbildeinstellung konnte nicht geфndert werden."
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr ""
"Einstellung fќr Seitenverhфltniskorrektur konnte nicht geфndert werden."
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Grafikmodus:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Render-Modus:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr ""
"Spezielle Farbmischungsmethoden werden von manchen Spielen unterstќtzt."
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Vollbildmodus"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Seitenverhфltnis korrigieren"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Seitenverhфltnis fќr Spiele mit der Auflіsung 320x200 korrigieren"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Standard-Gerфt:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Musikgerфt:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
"Legt das bevorzugte Tonwiedergabe-Gerфt oder den Soundkarten-Emulator fest."
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Legt das Musikwiedergabe-Gerфt oder den Soundkarten-Emulator fest."
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Standard-Gerфt:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Musikgerфt:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "AdLib-Emulator"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib wird fќr die Musik in vielen Spielen verwendet."
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Ausgabefrequenz:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -672,64 +685,68 @@ msgstr ""
"Hіhere Werte bewirken eine bessere Soundqualitфt, werden aber mіglicherweise "
"nicht von jeder Soundkarte unterstќtzt."
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "GM-Gerфt:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr ""
"Legt das standardmфпige Musikwiedergabe-Gerфt fќr General-MIDI-Ausgabe fest."
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Keine General-MIDI-Musik"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Erstes verfќgbares Gerфt"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"SoundFont wird von einigen Soundkarten, Fluidsynth und Timidity unterstќtzt."
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "AdLib-/MIDI-Modus"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Benutzt MIDI und AdLib zur Sounderzeugung."
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "MIDI-Lautstфrke:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "MT-32-Gerфt:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Legt das standardmфпige Tonwiedergabe-Gerфt fќr die Ausgabe von Roland MT-32/"
"LAPC1/CM32l/CM64 fest."
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Echte Roland-MT-32-Emulation (GM-Emulation deaktiviert)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -737,197 +754,198 @@ msgstr ""
"Wфhlen Sie dies aus, wenn Sie Ihre echte Hardware, die mit einer Roland-"
"kompatiblen Soundkarte verbunden ist, verwenden mіchten."
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Echte Roland-MT-32-Emulation (kein GM)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Roland-GS-Modus"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Echte Roland-MT-32-Emulation (GM-Emulation deaktiviert)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Schaltet die General-MIDI-Zuweisung fќr Spiele mit Roland-MT-32-Audiospur "
"aus."
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Keine Roland-MT-32-Musik"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Sprache und Text:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Sprache"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Untertitel"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Beides"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Untertitel-Tempo:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Sprache + Text:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Spr."
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Text"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "S+T"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Untertitel anzeigen und Sprachausgabe aktivieren"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Text-Tempo:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Musiklautstфrke:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musiklautstфrke:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Alles aus"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Effektlautstфrke:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Lautstфrke spezieller Soundeffekte"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Effektlautst.:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Sprachlautstфrke:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Sprachlautst.:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Themenpfad:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Themenpfad:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Legt das Verzeichnis fќr zusфtzliche Spieldateien fќr alle Spiele in ScummVM "
"fest."
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Plugin-Pfad:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Plugin-Pfad:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Sonstiges"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Andere"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Thema:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "GUI-Renderer:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Autom. Speichern:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Speich.(auto)"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Tasten"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Sprache:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Sprache der ScummVM-Oberflфche"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
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:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Verzeichnis fќr Spielstфnde auswфhlen"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
"In das gewфhlte Verzeichnis kann nicht geschrieben werden. Bitte ein anderes "
"auswфhlen."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Verzeichnis fќr Oberflфchen-Themen"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Verzeichnis fќr zusфtzliche Dateien auswфhlen"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Verzeichnis fќr Erweiterungen auswфhlen"
# Nicht ќbersetzen, da diese Nachricht nur fќr nicht-lateinische Sprachen relevant ist.
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1188,13 +1206,16 @@ msgid "~R~eturn to Launcher"
msgstr "Zur Spiele~l~iste"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Speichern:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1222,12 +1243,12 @@ msgstr ""
"Datei fќr grundlegende Informationen und Anweisungen zu weiterer Hilfe."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~A~bbrechen"
@@ -1235,23 +1256,23 @@ msgstr "~A~bbrechen"
msgid "~K~eys"
msgstr "~T~asten"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Konnte Farbenformat nicht initialisieren."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Konnte nicht zu Grafikmodus wechseln: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Konnte Einstellung fќr Seitenverhфltniskorrektur nicht anwenden."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Konnte Einstellung fќr Vollbildmodus nicht anwenden."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1267,7 +1288,7 @@ msgstr ""
"Lesen Sie die Liesmich-Datei fќr\n"
"weitere Informationen."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1282,7 +1303,7 @@ msgstr ""
"Spiel hіren zu kіnnen. Lesen Sie die\n"
"Liesmich-Datei fќr weitere Informationen."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1291,7 +1312,7 @@ msgstr ""
"Laden des Spielstands %s fehlgeschlagen! Bitte lesen Sie die Liesmich-Datei "
"fќr grundlegende Informationen und Anweisungen zu weiterer Hilfe."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1302,29 +1323,52 @@ msgstr ""
"und jegliche Spielstфnde, die Sie erstellen, kіnnten in zukќnftigen "
"Versionen von ScummVM nicht mehr funktionieren."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Trotzdem starten"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Originale Spielstand-Menќs"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
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."
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Spiel laden:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Laden"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 hat erkannt, dass Sie alte Spielstфnde von Baphomets Fluch 1 haben, "
+"die umgewandelt werden sollten.\n"
+"Das alte Speicherformat wird nicht mehr unterstќtzt, also kіnnen Sie diese "
+"Spielstфnde unkonvertiert nicht laden.\n"
+"\n"
+"Klicken Sie auf OK, um diese jetzt umzuwandeln, sonst werden Sie erneut "
+"gefragt, wenn Sie nфchstes Mal dieses Spiel starten.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Modus fќr helle Palette verwenden"
@@ -2038,7 +2082,7 @@ msgstr "Nach rechts fliegen"
msgid "Fly to lower right"
msgstr "Nach unten rechts fliegen"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2048,7 +2092,7 @@ msgstr ""
"Roland-Upgrade von LucasArts, aber %s\n"
"fehlt. Stattdessen wird AdLib verwendet."
-#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2059,7 +2103,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2070,7 +2114,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2081,7 +2125,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2093,7 +2137,7 @@ msgstr ""
"Verzeichnis dieses Spiels aus."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "Schneller ~R~aumwechsel aktiviert"
@@ -2114,7 +2158,7 @@ msgstr "~K~arte anzeigen"
msgid "~M~ain Menu"
msgstr "Haupt~m~enќ"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "~W~assereffekt aktiviert"
@@ -2136,6 +2180,15 @@ msgstr "Konnte Spielstand nicht in Datei speichern."
msgid "Failed to delete file."
msgstr "Konnte Datei nicht lіschen."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Schneller Modus"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Konnte Spielstand nicht speichern."
@@ -2226,11 +2279,11 @@ msgstr "Nach links rutschen"
msgid "Slide Right"
msgstr "Nach rechts rutschen"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Nach links drehen"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Nach rechts drehen"
@@ -2433,6 +2486,47 @@ msgstr ""
"\n"
"Bitte berichten Sie dies dem Team auf Englisch."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Herauszoomen"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME-OPL-Emulator"
@@ -2502,11 +2596,11 @@ msgstr "Apple-II-GS-Emulator (NICHT INTEGRIERT)"
msgid "C64 Audio Emulator"
msgstr "C64-Audio-Emulator"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "MT-32-Emulator wird gestartet"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "MT-32-Emulation"
@@ -2688,12 +2782,12 @@ msgid "Normal (no scaling)"
msgstr "Normal ohn.Skalieren"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Seitenverhфltniskorrektur an"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Seitenverhфltniskorrektur aus"
@@ -2702,7 +2796,7 @@ msgid "Active graphics filter:"
msgstr "Aktiver Grafikfilter:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Fenstermodus"
@@ -2726,11 +2820,11 @@ msgstr "Aktueller Grafikmodus"
msgid "Current scale"
msgstr "Aktueller Vergrіпerungsfaktor"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Aktiver Filtermodus: linear"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Aktiver Filtermodus: nфchste Nachbarn"
@@ -3131,6 +3225,9 @@ msgstr "Klicken aktiviert"
msgid "Clicking Disabled"
msgstr "Klicken deaktiviert"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Roland-GS-Modus"
+
#~ msgid "Hercules Green"
#~ msgstr "Hercules-Grќn"
diff --git a/po/es_ES.po b/po/es_ES.po
index 13bbc16584..e71ea86cba 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -1,5 +1,5 @@
# Spanish translation for ScummVM.
-# Copyright (C) 2010-2012 ScummVM Team
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Tomсs Maidagan, 2011.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.4.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-07-08 18:19+0100\n"
"Last-Translator: Tomсs Maidagan\n"
"Language-Team: \n"
@@ -16,45 +16,55 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(compilado el %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Caracterэsticas incluidas:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Motores disponibles:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Mostrar / Ocultar consola"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Arriba"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Ir al directorio anterior"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Arriba"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Cancelar"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Aceptar"
@@ -90,17 +100,18 @@ msgid "Map"
msgstr "Asignar"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "Aceptar"
@@ -173,8 +184,8 @@ msgstr ""
"Idioma del juego. No sirve para pasar al inglщs la versiѓn espaёola de un "
"juego"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<por defecto>"
@@ -196,11 +207,11 @@ msgstr "Plat.:"
msgid "Engine"
msgstr "Motor"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grсficos"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "GFX"
@@ -213,7 +224,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Opciones grсficas especэficas"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Sonido"
@@ -226,11 +237,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Opciones de sonido especэficas"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Volumen"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Volumen"
@@ -244,7 +255,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Opciones de volumen especэficas"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -257,7 +268,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Opciones de MIDI especэficas"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -270,11 +281,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Opciones de MT-32 especэficas"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Rutas"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Rutas"
@@ -288,7 +299,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Juego:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Adicional:"
@@ -296,42 +307,42 @@ msgstr "Adicional:"
msgid "Specifies path to additional data used the game"
msgstr "Especifica un directorio para datos adicionales del juego"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Adicional:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Partidas:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Especifica dѓnde guardar tus partidas"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Partidas:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Ninguna"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Por defecto"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Selecciona un SoundFont"
@@ -440,12 +451,14 @@ msgstr "Buscar:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Cargar juego:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Cargar"
@@ -531,136 +544,136 @@ msgstr "Se ha buscado en %d directorios..."
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr "%d juegos nuevos encontrados. %d juegos ignorados (ya aёadidos)..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Nunca"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "cada 5 minutos"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "cada 10 minutos"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "cada 15 minutos"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "cada 30 minutos"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Ninguno"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Fallo al aplicar algunos cambios en las opciones grсficas:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "no se ha podido cambiar el modo de vэdeo."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "no se ha podido cambiar el ajuste de pantalla completa"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "no se ha podido cambiar el ajuste de correcciѓn de aspecto"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Modo grсfico:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Renderizado:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Modos especiales de expansiѓn compatibles con algunos juegos"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Pantalla completa"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Correcciѓn de aspecto"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Corregir relaciѓn de aspecto en juegos 320x200"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Disp. preferido:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Disp. de mњsica:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
"Especifica quщ dispositivo de sonido o emulador de tarjeta de sonido "
"prefieres"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr ""
"Especifica el dispositivo de sonido o emulador de tarjeta de sonido de salida"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Disp. preferido:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Disp. de mњsica:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "Emul. de AdLib:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib se usa para la mњsica en muchos juegos"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Frec. de salida:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -668,64 +681,68 @@ msgstr ""
"Los valores mсs altos ofrecen mayor calidad, pero puede que tu tarjeta de "
"sonido no sea compatible"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "Dispositivo GM:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Especifica el dispositivo de salida General MIDI por defecto"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "No usar mњsica General MIDI"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Utilizar el primer dispositivo disponible"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"SoundFont es compatible con algunas tarjetas de sonido, con Fluidsynth y con "
"Timidity"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Modo AdLib/MIDI"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Usar tanto MIDI como AdLib en la generaciѓn de sonido"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "Ganancia MIDI:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "Disp. MT-32:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Especifica el dispositivo de sonido para la salida Roland MT-32/LAPC1/CM32l/"
"CM64 por defecto"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Roland MT-32 autщntica (desactivar emulaciѓn GM)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -733,191 +750,192 @@ msgstr ""
"Marcar si se quiere usar un dispositivo de sonido real conectado al "
"ordenador y compatible con Roland"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 real (sin emulaciѓn GM)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Activar modo Roland GS"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Roland MT-32 autщntica (desactivar emulaciѓn GM)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Desactiva la conversiѓn General MIDI en juegos con sonido Roland MT-32"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "No usar mњsica Roland MT-32"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Texto y voces:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Voces"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Subtэtulos"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Ambos"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Vel. de subtэtulos:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Texto y voces:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Voz"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Subt"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "V&S"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Reproducir voces y subtэtulos"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Vel. de subt.:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Mњsica:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Mњsica:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Silenciar"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Efectos:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Volumen de los efectos de sonido"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Efectos:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Voces:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Voces:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Temas:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Temas:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "Especifica el directorio adicional usado por los juegos y ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Plugins:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Plugins:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Otras"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Otras"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "Interfaz:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Autoguardado:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autoguardado:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Teclas"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Idioma:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Idioma de la interfaz de ScummVM"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Tienes que reiniciar ScummVM para aplicar los cambios."
-#: gui/options.cpp:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Selecciona el directorio de guardado"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
"No se puede escribir en el directorio elegido. Por favor, selecciona otro."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Selecciona el directorio de temas"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Selecciona el directorio adicional"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Selecciona el directorio de plugins"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1173,13 +1191,16 @@ msgid "~R~eturn to Launcher"
msgstr "~V~olver al lanzador"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Guardar partida"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1209,12 +1230,12 @@ msgstr ""
"obtener mсs ayuda."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~S~э"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~C~ancelar"
@@ -1222,23 +1243,23 @@ msgstr "~C~ancelar"
msgid "~K~eys"
msgstr "~T~eclas"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "No se ha podido iniciar el formato de color."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "No se ha podido cambiar al modo de video: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "No se ha podido aplicar el ajuste de correcciѓn de aspecto"
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "No se ha podido aplicar el ajuste de pantalla completa."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1252,7 +1273,7 @@ msgstr ""
"copiar los archivos del juego al disco duro.\n"
"Consulta el archivo README para mсs detalles."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1266,7 +1287,7 @@ msgstr ""
"poder escuchar la mњsica del juego.\n"
"Consulta el archivo README para mсs detalles."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1276,7 +1297,7 @@ msgstr ""
"README para encontrar informaciѓn bсsica e instrucciones sobre cѓmo obtener "
"mсs ayuda."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1286,29 +1307,52 @@ msgstr ""
"ScummVM. Por lo tanto, puede que sea inestable, y que las partidas que "
"guardes no funcionen en versiones futuras de ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Jugar aun asэ"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Usar pantallas de guardar/cargar originales"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
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"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Cargar partida:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Cargar"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 ha detectado que tienes partidas guardadas antiguas de Broken Sword "
+"1, que deben ser actualizadas.\n"
+"El formato antiguo ya no es compatible, asэ que no podrсs cargar tus "
+"partidos si no las actualizas.\n"
+"\n"
+"Pulsa Aceptar para actualizarlas, si no lo haces este mensaje volverс a "
+"aparecer la prѓxima vez.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Usar paleta original"
@@ -2020,7 +2064,7 @@ msgstr "Volar a la derecha"
msgid "Fly to lower right"
msgstr "Volar abajo y a la derecha"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2029,7 +2073,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:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2040,7 +2084,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2051,7 +2095,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2062,7 +2106,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2073,7 +2117,7 @@ msgstr ""
"selecciona el directorio 'Maniac', dentro del directorio de DOTT."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "Modo ~Z~ip activado"
@@ -2094,7 +2138,7 @@ msgstr "~M~ostrar el mapa"
msgid "~M~ain Menu"
msgstr "~M~enњ principal"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "Efecto ag~u~a activado"
@@ -2116,6 +2160,15 @@ msgstr "Fallo al guardar el estado del juego en el archivo."
msgid "Failed to delete file."
msgstr "Fallo al borrar el archivo."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Modo rсpido"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Fallo al guardar la partida"
@@ -2206,11 +2259,11 @@ msgstr "Deslizarse a la izquierda"
msgid "Slide Right"
msgstr "Deslizarse a la derecha"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Girar a la izquierda"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Girar a la derecha"
@@ -2409,6 +2462,47 @@ msgstr ""
"\n"
"Por favor, contacta con el equipo."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Aumentar zoom"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Emulador OPL de MAME"
@@ -2478,11 +2572,11 @@ msgstr "Emulador de Apple II GS (NO IMPLEMENTADO)"
msgid "C64 Audio Emulator"
msgstr "Emulador de C64 Audio"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Iniciando el emulador de MT-32"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "Emulador de MT-32"
@@ -2664,12 +2758,12 @@ msgid "Normal (no scaling)"
msgstr "Normal"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Activar la correcciѓn de aspecto"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Desactivar la correcciѓn de aspecto"
@@ -2678,7 +2772,7 @@ msgid "Active graphics filter:"
msgstr "Filtro de grсficos activo:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Modo ventana"
@@ -2702,11 +2796,11 @@ msgstr "Modo de vэdeo actual"
msgid "Current scale"
msgstr "Escala actual"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Modo de filtro activo: lineal"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Modo de filtro activo: el mсs cercano"
@@ -3106,6 +3200,9 @@ msgstr "Clic activado"
msgid "Clicking Disabled"
msgstr "Clic desactivado"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Activar modo Roland GS"
+
#~ msgid "Hercules Green"
#~ msgstr "Hercules verde"
diff --git a/po/eu.po b/po/eu.po
index 4d6c329db3..47dfc783de 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -1,5 +1,5 @@
# Basque translation for ScummVM.
-# Copyright (C) 2011 ScummVM Team
+# Copyright (C) 2012-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Mikel Iturbe Urretxa <mikel@hamahiru.org>, 2012.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2011-12-15 14:53+0100\n"
"Last-Translator: Mikel Iturbe Urretxa <mikel@hamahiru.org>\n"
"Language-Team: Librezale <librezale@librezale.org>\n"
@@ -16,45 +16,55 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(%s-(e)an konpilatua)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Ezaugarri erantsiak:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Motore erabilgarriak:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Kontsola erakutsi / ezkutatu"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Joan gora"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Igo aurreko direktorio-mailara"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Joan gora"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Utzi"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Aukeratu"
@@ -90,17 +100,18 @@ msgid "Map"
msgstr "Esleitu"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "Ados"
@@ -172,8 +183,8 @@ msgid ""
msgstr ""
"Jokoaren hizkuntza. Honek ez du zure ingelesezko bertsioa frantsesera pasako"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<lehenetsia>"
@@ -196,11 +207,11 @@ msgstr "Plataforma:"
msgid "Engine"
msgstr "Aztertu"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grafikoak"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "GFX"
@@ -213,7 +224,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Ezarpen grafiko globalak baliogabetu"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Soinua"
@@ -226,11 +237,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Soinu ezarpen globalak baliogabetu"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Bolumena"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Bolumena"
@@ -244,7 +255,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Bolumen ezarpen globalak baliogabetu"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -257,7 +268,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "MIDI ezarpen globalak baliogabetu"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -270,11 +281,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "MT-32 ezarpen globalak baliogabetu"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Bide-izenak"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Bideak"
@@ -288,7 +299,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Jokoa:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Gehigarriak:"
@@ -296,42 +307,42 @@ msgstr "Gehigarriak:"
msgid "Specifies path to additional data used the game"
msgstr "Jokoak erabiltzen duen datu gehigarrien bide-izena"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Gehigarria:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Partida gordeak:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Zure gordetako partidak non gordeko diren zehazten du"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Partida gordeak:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Bat ere ez"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Lehenetsia"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "SoundFont-a aukeratu"
@@ -440,12 +451,14 @@ msgstr "Bilatu:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Jokoa kargatu:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Kargatu"
@@ -534,133 +547,133 @@ msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr ""
"%d joko berri aurkitu dira, aurretik gehituriko %d ez dira kontuan hartu"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Inoiz ez"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "5 minuturo"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "10 minuturo"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "15 minuturo"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "30 minuturo"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Bat ere ez"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Ezin izan da grafikoen aukeretako batzuk aplikatu:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "ezin izan da bideo-modua aldatu."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "ezin izan da pantaila-osoaren ezarpena aldatu"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "formatu-ratioaren ezarpena ezin izan da aldatu"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Modu grafikoa:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Renderizazioa:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Joko batzuk onarturiko lausotze-modu bereziak"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Pantaila osoa"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Formatu-ratioaren zuzenketa"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "320x200 jokoentzako formatu-ratioa zuzendu"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Gogoko gailua:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Musika gailua:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Gogoko soinu txartel edo emuladorea zein den ezartzen du"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Irteerako soinu txartel edo emuladorea ezartzen du"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Gail. gogokoa:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Musika gailua:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "AdLib emuladorea:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib musikarako hainbat jokotan erabiltzen da"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Irteera maizt.:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -668,64 +681,68 @@ msgstr ""
"Balio altuagoek soinu kalitate hobea ezartzen dute, baina baliteke zure "
"soinu-txartela bateragarria ez izatea"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "GM gailua:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Defektuzko soinu txartela ezartzen du General MIDI irteerarako"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Ez erabili General MIDI musika"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Erabilgarri dagoen lehen gailua erabili"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"Zenbait soinu txartel bateragarriak dira SoundFont-ekin, Fluidsynth eta "
"Timidity besteak beste"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "AdLib/MIDI modua"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Soinua sortzerakoan MIDI eta AdLib erabili"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "MIDI irabazia:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "MT-32 gailua:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Roland MT-32/LAPC1/CM32l/CM64 irteerarako defektuzko soinu txartela ezartzen "
"du"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Benetako Roland MT-32 (GM emulazio gabe)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -733,192 +750,193 @@ msgstr ""
"Markatu ordenagailura konektaturiko Roland-ekin bateragarria den soinu-"
"gailua erabiltzeko"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Benetako Roland MT-32 (GM emulazio gabe)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Roland GS modua gaitu"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Benetako Roland MT-32 (GM emulazio gabe)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Roland MT-32 soinua duten jokoetan General MIDI bihurtzea desgaitzen du"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Ez erabili Roland MT-32 musika"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Testu eta ahotsa:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Ahotsa"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Azpitituluak"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Biak"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Azpitit. abiadura:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Testu eta ahotsa:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Ahots."
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Azp."
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Biak"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Ahotsak erreproduzitu eta azpitituluak erakutsi"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Azpit. abiadura:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Musika:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musika:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Mututu dena"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Efektuak:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Soinu efektu berezien bolumena"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Efektuak:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Ahotsak:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Ahotsak:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Gaiak:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Gaiak:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Joko guztiek edo ScummVM-k darabilten datu gehigarrien bide-izena ezartzen du"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Pluginak:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Pluginak:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Beste"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Beste"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Gaia:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "Interfazea:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Autogordetzea:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autogordetzea:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Teklak"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Hizkuntza"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "ScummVM interfazearen hizkuntza"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "ScummVM berrabiarazi behar duzu aldaketak indarrean jartzeko"
-#: gui/options.cpp:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Gordetako partiden direktorioa aukeratu"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Aukeraturiko direktorioan ezin da idatzi. Mesedez, aukeratu beste bat."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Gaien direktorioa aukeratu"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Fitxategi gehigarrien direktorioa aukeratu"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Pluginen direktorioa aukeratu"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1174,13 +1192,16 @@ msgid "~R~eturn to Launcher"
msgstr "It~z~uli abiarazlera"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Gorde jokoa:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1208,12 +1229,12 @@ msgstr ""
"informaziorako eta laguntza gehiago nola jaso jakiteko."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~A~dos"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~U~tzi"
@@ -1221,23 +1242,23 @@ msgstr "~U~tzi"
msgid "~K~eys"
msgstr "~T~eklak"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Kolore formatua ezin izan da hasieratu."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Ezin izan da aldatu bideo modura : '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Ezin izan da formatu-ratio ezarpena aplikatu."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Ezin izan da pantaila-osoa ezarpena aplikatu."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1251,7 +1272,7 @@ msgstr ""
"fitxategiak disko gogorrera kopiatzea.\n"
"Jo README fitxategira xehetasunetarako."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1265,7 +1286,7 @@ msgstr ""
"izateko. Jo README fitxategira\n"
"xehetasunetarako."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1274,7 +1295,7 @@ msgstr ""
"Jokoaren egoera kargatzeak huts egin du (%s)! Jo ezazu README-ra oinarrizko "
"informaziorako eta laguntza gehiago nola jaso jakiteko."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1284,28 +1305,51 @@ msgstr ""
"Hori dela eta, ezegonkorra izan daiteke eta gerta daiteke gordeta izan "
"ditzakezun partidan ez ibiltzea ScummVM-ren etorkizuneko bertsioetan."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Jolastu berdin-berdin"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr ""
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Jokoa kargatu:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Kargatu"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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-k aurkitu du konbertitu beharko liratekeen Broken Sword 1-eko "
+"partida gorde zaharrak dituzula.\n"
+"Partida gordeen formatu zaharra ez da bateragarria jada, eta beraz ezingo "
+"dituzu zure partidak kargatu ez badituzu formatu berrira pasatzen.\n"
+"\n"
+"Sakatu Ados orain konbertitzeko, bestela berriz galdetuko dizut jokoa berriz "
+"martxan jartzen duzunean.\n"
+
#: engines/dreamweb/detection.cpp:57
#, fuzzy
msgid "Use bright palette mode"
@@ -2017,7 +2061,7 @@ msgstr "Eskuinera hegan egin"
msgid "Fly to lower right"
msgstr "Behera eta eskuinera hegan egin"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2026,7 +2070,7 @@ msgstr ""
"MIDI euskarri natiboak LucasArts-en Roland eguneraketa behar du,\n"
"baina %s ez dago eskuragarri. AdLib erabiliko da."
-#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2037,7 +2081,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2048,7 +2092,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2059,7 +2103,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2070,7 +2114,7 @@ msgstr ""
"aukeratu 'Maniac' direktorioa Tentacle-ren joko-direktorioaren barruan."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "~Z~ip modua aktibaturik"
@@ -2091,7 +2135,7 @@ msgstr "~M~apa erakutsi"
msgid "~M~ain Menu"
msgstr "Menu ~n~agusia"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "~U~r-efektua gaituta"
@@ -2113,6 +2157,15 @@ msgstr "Ezin izan da jokoa fitxategira gorde."
msgid "Failed to delete file."
msgstr "Ezin izan da fitxategia ezabatu"
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Modu bizkorra"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Ezin izan da jokoa gorde"
@@ -2205,11 +2258,11 @@ msgstr "Ezkerrera irristatu"
msgid "Slide Right"
msgstr "Eskuinera irristatu"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Ezkerrera biratu"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Eskuinera biratu"
@@ -2406,6 +2459,47 @@ msgstr ""
"\n"
"Mesedez, eman abisua taldeari."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Zoom-a hurbildu"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL emuladorea"
@@ -2475,11 +2569,11 @@ msgstr "Apple II GS emuladorea (INPLEMENTATU GABE)"
msgid "C64 Audio Emulator"
msgstr "C64 Audio emuladorea"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "MT-32 emuladorea hasieratzen"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "MT-32 emuladorea"
@@ -2661,12 +2755,12 @@ msgid "Normal (no scaling)"
msgstr "Normala"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Formatu-ratio zuzenketa gaituta"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Formatu-ratio zuzenketa desgaituta"
@@ -2675,7 +2769,7 @@ msgid "Active graphics filter:"
msgstr "Filtro grafiko aktiboa:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Leiho modua"
@@ -2699,11 +2793,11 @@ msgstr "Oraingo bideo-modua"
msgid "Current scale"
msgstr "Oraingo eskala"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Filtro aktibo modua: lineala"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Filtro aktibo modua: hurbilena"
@@ -3103,6 +3197,9 @@ msgstr "Klikatzea gaituta"
msgid "Clicking Disabled"
msgstr "Klikatzea desgaituta"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Roland GS modua gaitu"
+
#~ msgid "Hercules Green"
#~ msgstr "Herkules berdea"
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 0cac4d6c79..c81736edac 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -1,5 +1,5 @@
# Finnish translation for ScummVM.
-# Copyright (C) 2012 ScummVM Team
+# Copyright (c) 2012-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Toni Saarela <saarela@gmail.com>, 2012.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-12-01 19:37+0200\n"
"Last-Translator: Toni Saarela <saarela@gmail.com>\n"
"Language-Team: Finnish\n"
@@ -17,45 +17,55 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.5.4\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(kффnnіksen pфivфys: %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Tфhфn versioon kффnnetyt ominaisuudet:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Tuetut pelimoottorit:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Nфytф / piilota konsoli"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Siirry ylіs"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Palaa edelliselle hakemistotasolle"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Siirry ylіs"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Peruuta"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Valitse"
@@ -91,17 +101,18 @@ msgid "Map"
msgstr "Nфppфinkartta"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "Tallenna"
@@ -174,8 +185,8 @@ msgstr ""
"Pelin kieli. Tфmф ei muuta esimerkiksi espanjankielistф versiota pelistф "
"englanninkieliseksi."
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<oletus>"
@@ -197,11 +208,11 @@ msgstr "Alusta:"
msgid "Engine"
msgstr "Moottori"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grafiikka"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "GFX"
@@ -214,7 +225,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Ohita globaalit grafiikka-asetukset"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Ффni"
@@ -227,11 +238,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Ohita globaalit ффniasetukset"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Voimakkuus"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Voimakkuus"
@@ -245,7 +256,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Ohita globaalit ффnenvoimakkuusasetukset"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -258,7 +269,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Ohita globaalit MIDI-asetukset"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -271,11 +282,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Ohita globaalit MT-32 asetukset"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Polut"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Polut"
@@ -289,7 +300,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Pelin polku:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Lisфkansio:"
@@ -297,42 +308,42 @@ msgstr "Lisфkansio:"
msgid "Specifies path to additional data used the game"
msgstr "Mффrittфф polun lisфtiedostoihin joita peli mahdollisesti kфyttфф"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Lisфkansio:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Tallennuskansio:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Mффrittфф polun pelitallennuksille"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Tallennuskansio:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Ei mффritelty"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Oletus"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Valitse ффnifontti"
@@ -441,12 +452,14 @@ msgstr "Etsi:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Lataa peli:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Lataa"
@@ -535,135 +548,135 @@ msgstr ""
"%d uutta peliф lіytyi, jфtettiin %d peliф huomiotta, koska ne oli jo lisфtty "
"aiemmin."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Ei koskaan"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "5 minuutin vфlein"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "10 minuutin vфlein"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "15 minuutin vфlein"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "30 minuutin vфlein"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Ei kфytіssф"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Joitain grafiikka-asetuksia ei saatu asetettua:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "videotilaa ei voitu vaihtaa."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "kokoruututilaa ei voitu muuttaa"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "kuvasuhdekorjausasetusta ei voitu muuttaa"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Grafiikkatila:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Renderіintitila:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Erityiset dithering asetukset joita jotkut pelit tukevat"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Kokoruututila"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Kuvasuhteen korjaus"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Oikea kuvasuhde 320x200 peleille"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Ensisijainen laite:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Musiikkilaite:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
"Mффrittфф ффnilaitteen tai ффnikorttiemulaattorin jota ensisijaisesti tulisi "
"kфyttфф"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Mффrittфф ффnikortin tai ффnikorttia emuloivan ohjelmiston"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Ensisijainen:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Musiikkilaite:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "AdLib emulaattori:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLibiф kфytetффn monien pelien musiikeissa"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Taajuus:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -671,61 +684,65 @@ msgstr ""
"Isommat taajuudet merkitsevфt parempaa ффnenlaatua, mutta ффnikorttisi ei "
"ehkф tue niitф."
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "GM laite:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Mффrittфф oletuksena kфytettфvфn ффnilaitteen General MIDIlle"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Фlф kфytф General MIDIф musiikissa"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Kфytф ensimmфistф laitetta"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "Ффnifontti:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"Jotkut ффnikortit tukevat ффnifonttia (SoundFont), FluidSynth ja Timidity"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "Ффnifontti:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Yhdistetty AdLib/MIDI tila"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Kфytф sekф MIDIф ettф Adlibiф ффnentuotantoon"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "MIDIn ффnilisфys:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "MT-32 laite:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr "Mффrittфф oletusффnilaitteen Roland MT-32/LAPC1/CM32l/CM64:n kфyttііn"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Aito Roland MT-32 (ei GM emulointia)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -733,192 +750,193 @@ msgstr ""
"Valitse jos haluat kфyttфф aitoa Roland-yhteensopivaa laittetta joka on "
"kytketty tietokoneeseesi"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Aito Roland MT-32 (ei GM emulointia)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Kфytф Roland GS moodia"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Aito Roland MT-32 (ei GM emulointia)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Poistaa General MIDIn peleistф joissa on Roland MT-32 ффniraita"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Фlф kфytф Roland MT-32 musiikkia"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Tekstitys ja puhe:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Puhe"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Tekstitys"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Molemmat"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Tekstin nopeus:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Tekstitys ja puhe:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Puhe"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Tekstit"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Molemmat"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Nфytф tekstitys ja kфytф puhetta"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Tekstin nopeus:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Musiikki:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musiikki:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Vaimenna"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Ффniefektit:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Erikoisefektit"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Ффniefektit:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Puhe:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Puhe:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Teemojen polku:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Teemojen polku:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Mффrittфф polun, jossa on lisфtiedostoja joita ScummVM tai kaikki pelit "
"kфyttфvфt"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Pluginien sijainti:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Pluginien sijainti:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Muut"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Muut"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Teema"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "GUI renderіijф:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Autom. tallennus:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autom. tallennus:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Nфppфimet"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "ScummVM:n kieli:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "ScummVM kфyttіliittymфn kieli"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "ScummVM pitфф kфynnistфф uudelleen jotta muutokset tulevat voimaan."
-#: gui/options.cpp:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Valitse hakemisto pelitallennuksille."
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Valittuun hakemistoon ei voi kirjoittaa. Valitse toinen hakemisto."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Valitse hakemisto kфyttіliittymфn teemoille"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Valitse hakemisto lisфtiedostoille"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Valitse hakemisto plugineille"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1173,13 +1191,16 @@ msgid "~R~eturn to Launcher"
msgstr "Palaa p~e~livalitsimeen"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Tallenna peli:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1207,12 +1228,12 @@ msgstr ""
"lisфtietoa."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~H~yvфksy"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~P~eruuta"
@@ -1220,23 +1241,23 @@ msgstr "~P~eruuta"
msgid "~K~eys"
msgstr "~N~фppфimet"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Vфriformaattia ei voitu alustaa"
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Videotilan vaihto ei onnistunut:'"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Kuvasuhdeasetusta ei voitu asettaa."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Kokoruututila-asetusta ei voi asettaa."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1249,7 +1270,7 @@ msgstr ""
"pelin tiedostot kovalevyllesi. Avaa LUEMINUT\n"
"tiedosto ohjeita varten."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1262,7 +1283,7 @@ msgstr ""
"ohjelmistoa kфyttфen, jotta musiikit\n"
"kuuluvat. Lue ohjeet LUEMINUT tiedostosta."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1271,7 +1292,7 @@ msgstr ""
"Pelitilan lataus epфonnistui (%s)! Avaa LUEMINUT tiedosto saadaksesi "
"lisфtietoa."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1281,28 +1302,49 @@ msgstr ""
"epфvakaa, eivфtkф pelitallennukset vфlttфmфttф toimi tulevissa ScummVM:n "
"versioissa."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Pelaa silti"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Kфytф alkuperфisiф tallenna/lataa valikkoja"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Kфytф alkuperфisiф tallenna/lataa valikkoja, ScummVM valikoiden sijaan"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Lataa pelitallenne:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Lataa tallenne"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 ""
+"Broken Sword 1:n pelitallennukset ovat vanhassa formaatissa. Tallennukset "
+"tulee muuntaa,\n"
+"jotta niitф voi kфyttфф ScummVM:ssф. Paina 'Hyvфksy' muuntaaksesi tiedostot. "
+"Mikфli et halua muuntaa tiedostoja nyt\n"
+"ScummVM kysyy asiaa seuraavan kerran kun kфynnistфt pelin.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Kфytф kirkaspalettitilaa"
@@ -2013,7 +2055,7 @@ msgstr "Lennф oikealle"
msgid "Fly to lower right"
msgstr "Lennф alas oikealle"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2022,7 +2064,7 @@ msgstr ""
"Suora MIDI tuki vaatii Roland pфivityksen LucasArtsilta, mutta\n"
"%s puuttuu. Kфytetффn AdLibia sen sijaan."
-#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2033,7 +2075,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2044,7 +2086,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2055,7 +2097,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2066,7 +2108,7 @@ msgstr ""
"peli'. Valitse 'Maniac' hakemisto Tentacle hakemiston sisфltф."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "~Z~ip moodi valittu"
@@ -2087,7 +2129,7 @@ msgstr "Nфytф kartta"
msgid "~M~ain Menu"
msgstr "Pффvalikko"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "Vesiefekti pффllф"
@@ -2109,6 +2151,15 @@ msgstr "Pelin tallentaminen tiedostoon epфonnistui."
msgid "Failed to delete file."
msgstr "Tiedoston tuhoaminen ei onnistunut."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Nopea moodi"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Pelin tallentaminen epфonnistui."
@@ -2199,11 +2250,11 @@ msgstr "Liiku vasemmalle"
msgid "Slide Right"
msgstr "Liiku oikealle"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Kффnny vasemmalle"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Kффnny oikealle"
@@ -2395,6 +2446,47 @@ msgstr ""
"ikkunaan. Pyydфmme ettф ilmoittaisit\n"
"niistф ScummVM:n kehittфjille."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Zoomaa ylіs"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL emulaattori"
@@ -2464,11 +2556,11 @@ msgstr "Apple II GS emulaattori (EI TOTEUTETTU)"
msgid "C64 Audio Emulator"
msgstr "C64 Audio emulaattori"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Alustetaan MT-32 emulaattoria"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "MT-32 emulaattori"
@@ -2652,12 +2744,12 @@ msgid "Normal (no scaling)"
msgstr "Normaali (ei skaalausta)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Kuvasuhteen korjaus pффllф"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Kuvasuhteen korjaus pois pффltф"
@@ -2666,7 +2758,7 @@ msgid "Active graphics filter:"
msgstr "Valittu grafiikkafiltteri:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Ikkunoitu tila"
@@ -2690,11 +2782,11 @@ msgstr "Nykyinen nфyttіtila"
msgid "Current scale"
msgstr "Nykyinen skaalaus"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Valittu filtteritila: Linear"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Valittu filtteritila: Nearest"
@@ -3094,3 +3186,6 @@ msgstr "Klikkaus pффllф"
#: backends/events/maemosdl/maemosdl-events.cpp:192
msgid "Clicking Disabled"
msgstr "Klikkaus pois pффltф"
+
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Kфytф Roland GS moodia"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index 6e8f350b4e..1bdaf2e40d 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -1,5 +1,5 @@
# French translation for ScummVM.
-# Copyright (C) 2010-2012 ScummVM Team
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Thierry Crozat <criezy@scummvm.org>, 2011.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-07-08 12:24+0100\n"
"Last-Translator: Thierry Crozat <criezy@scummvm.org>\n"
"Language-Team: French <scummvm-devel@lists.sf.net>\n"
@@ -17,45 +17,55 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n>1;\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(compilщ sur %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Options incluses:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Moteurs disponibles:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Afficher/Cacher la console"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Remonter"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Remonte d'un niveau dans la hiщrarchie de rщpertoire"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Remonter"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Annuler"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Choisir"
@@ -91,17 +101,18 @@ msgid "Map"
msgstr "Affecter"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -174,8 +185,8 @@ msgstr ""
"Langue du jeu. Cela ne traduira pas en anglais par magie votre version "
"espagnole du jeu."
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<defaut>"
@@ -197,11 +208,11 @@ msgstr "Systшme:"
msgid "Engine"
msgstr "Moteur"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Graphique"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "GFX"
@@ -214,7 +225,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Rщglages spщcifiques р ce jeux"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Audio"
@@ -227,11 +238,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Rщglages spщcifiques р ce jeux"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Volume"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Volume"
@@ -245,7 +256,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Rщglages spщcifiques р ce jeux"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -258,7 +269,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Rщglages spщcifiques р ce jeux"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -271,11 +282,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Rщglages spщcifiques р ce jeux"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Chemins"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Chemins"
@@ -289,7 +300,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Chemin du Jeu:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Extra:"
@@ -297,42 +308,42 @@ msgstr "Extra:"
msgid "Specifies path to additional data used the game"
msgstr "Dщfinie un chemin vers des donnщes suplщmentaires utilisщes par le jeu"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Extra:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Sauvegardes:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Dщfinie l'emplacement oљ les fichiers de sauvegarde sont crщщs"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Sauvegardes:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Aucun"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Dщfaut"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Choisir une banque de sons"
@@ -442,12 +453,14 @@ msgstr "Filtre:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Charger le jeu:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Charger"
@@ -534,135 +547,135 @@ msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr ""
"%d nouveaux jeux trouvщs, %d jeux ignorщs (dщjр ajoutщ prщcщdemment) ..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Jamais"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "Toutes les 5 mins"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "Toutes les 10 mins"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "Toutes les 15 mins"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "Toutes les 30 mins"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Aucune"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Certaines options graphiques n'ont pu ъtre changщes:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "le mode vidщo n'a pu ъtre changщ."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "le mode plein щcran n'a pu ъtre changщ."
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "la correction de rapport d'aspect n'a pu ъtre changщe."
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Mode graphique:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Mode de rendu:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Mode spщcial de tramage supportщ par certains jeux"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Plein щcran"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Correction du rapport d'aspect"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Corrige le rapport d'aspect pour les jeu 320x200"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Sortie Prщfщrщ:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Sortie Audio:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
"Spщcifie le pщriphщrique de sortie audio ou l'щmulateur de carte audio "
"prщfщrщ"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Spщcifie le pщriphщrique de sortie audio ou l'щmulateur de carte audio"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Sortie Prщfщrщ:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Sortie Audio:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "Щmulateur AdLib:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib est utilisщ pour la musique dans de nombreux jeux"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Frщquence:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -670,64 +683,68 @@ msgstr ""
"Une valeur plus щlevщe donne une meilleure qualitщ audio mais peut ne pas "
"ъtre supportщ par votre carte son"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "Sortie GM:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Spщcifie le pщriphщrique audio par dщfaut pour la sortie General MIDI"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Ne pas utiliser la musique General MIDI"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Utiliser le premier pщriphщrique disponible"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "Banque de sons:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
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"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Mode mixe AdLib/MIDI"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Utiliser р la fois MIDI et AdLib"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "Gain MIDI:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "Sortie MT-32:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Spщcifie le pщriphщrique audio par dщfaut pour la sortie Roland MT-32/LAPC1/"
"CM32l/CM64"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Roland MT-32 exacte (dщsactive l'щmulation GM)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -735,195 +752,196 @@ msgstr ""
"Vщrifie si vous voulez utiliser un pщriphщrique audio compatible Roland "
"connectщ р l'ordinateur"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 exacte (pas d'щmu GM)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Activer le mode Roland GS"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Roland MT-32 exacte (dщsactive l'щmulation GM)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Dщsactiver la conversion des pistes MT-32 en General MIDI"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Ne pas utiliser la musique Roland MT-32"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Dialogue:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Voix"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Sous-titres"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Les deux"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Vitesse des ST:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Dialogue:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Voix"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Subs"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "V&S"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Affiche les sous-titres et joue les dialogues audio"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Vitesse des ST:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Volume Musique:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musique:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Silence"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Volume Bruitage:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Volume des effets spщciaux sonores"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Bruitage:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Volume Dialogues:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Dialogues:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Thшmes:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Thшmes:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Spщcifie un chemin vers des donnщes supplщmentaires utilisщes par tous les "
"jeux ou ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Plugins:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Plugins:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Divers"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Divers"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Thшme:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "Interface:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Sauvegarde auto:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Sauvegarde:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Touches"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Langue:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Langue de l'interface graphique de ScummVM"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
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:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Sщlectionner le rщpertoire pour les sauvegardes"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
"Le rщpertoire sщlectionnщ est vщrouillщ en щcriture. Sщlectionnez un autre "
"rщpertoire."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Sщlectionner le rщpertoire des thшmes d'interface"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Sщlectionner le rщpertoire pour les fichiers suplщmentaires"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Sщlectionner le rщpertoire des plugins"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1181,13 +1199,16 @@ msgid "~R~eturn to Launcher"
msgstr "Retour au ~L~anceur"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Sauvegarde:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1216,12 +1237,12 @@ msgstr ""
"de base et les instructions pour obtenir de l'aide supplщmentaire."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~A~nnuler"
@@ -1229,23 +1250,23 @@ msgstr "~A~nnuler"
msgid "~K~eys"
msgstr "~T~ouches"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Impossible d'initialiser le format des couleurs."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Impossible de changer le mode vidщo р: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Impossible d'appliquer la correction du rapport d'aspect."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Impossible d'appliquer l'option plein щcran."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1259,7 +1280,7 @@ msgstr ""
"donnщes du jeu sur votre disque dur.\n"
"Lisez le fichier README pour plus de dщtails."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1273,7 +1294,7 @@ msgstr ""
"logiciel appropriщ.\n"
"Lisez le fichier README pour plus de dщtails."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1282,7 +1303,7 @@ msgstr ""
"Echec du chargement (%s)! . Lisez le fichier README pour les informations de "
"base et les instructions pour obtenir de l'aide supplщmentaire."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1292,30 +1313,53 @@ msgstr ""
"complшtement supportщ par ScummVM. Il est donc instable et les sauvegardes "
"peuvent ne pas marcher avec une future version de ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Jouer quand mъme"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Dialogues sauvegarde/chargement d'origine"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
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 "
"ScummVM"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Charger le jeu:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Charger"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 a trouvщ des anciens fichiers de sauvegarde pour Broken Sword 1 qui "
+"ont besoin d'ъtre convertis.\n"
+"L'ancien format de sauvegarde n'est plus supportщ, donc vous ne pourrez pas "
+"les charger si vous ne les convertissez pas.\n"
+"\n"
+"Appuyer sur OK pour les convertir maintenant, sinon le mъme message "
+"s'affichera la prochaine fois que vous dщmarrerez le jeu.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Utiliser le mode palette lumineuse"
@@ -2029,7 +2073,7 @@ msgstr "Voler vers la droite"
msgid "Fly to lower right"
msgstr "Voler vers la bas р droite"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2038,7 +2082,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:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2049,7 +2093,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2060,7 +2104,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2071,7 +2115,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -2083,7 +2127,7 @@ msgstr ""
"rщpertoire 'Maniac Mansion' dans le rщpertoire du jeu Day Of The Tentacle."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "Mode ~Z~ip Activщ"
@@ -2104,7 +2148,7 @@ msgstr "Afficher la Carte"
msgid "~M~ain Menu"
msgstr "~M~enu Principal"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "~E~ffets de l'Eau Activщs"
@@ -2126,6 +2170,15 @@ msgstr "Щchec de l'enregistrement de l'щtat du jeu sur le disque."
msgid "Failed to delete file."
msgstr "Щchec de la suppression du fichier."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Mode rapide"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Щchec de la sauvegarde."
@@ -2216,11 +2269,11 @@ msgstr "Faire un pas vers la Gauche"
msgid "Slide Right"
msgstr "Faire un pas vers la Droite"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Tourner vers la Gauche"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Tourner vers la Droite"
@@ -2417,6 +2470,47 @@ msgstr ""
"ScummVM a affichщ des messages d'avertissements dans votre fenъtre de "
"console et ne peut pas garantir que tous les fichiers ont щtщ convertis."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Dщzoomer"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Щmulateur MAME OPL"
@@ -2486,11 +2580,11 @@ msgstr "Щmulateur Apple II GS (PAS IMPLЩMENTЩ)"
msgid "C64 Audio Emulator"
msgstr "Щmulateur C64 Audio"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Initialisation de l'Щmulateur MT-32"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "Щmulateur MT-32"
@@ -2672,12 +2766,12 @@ msgid "Normal (no scaling)"
msgstr "Normal"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Activer la correction du rapport d'aspect"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Dщsactiver la correction du rapport d'aspect"
@@ -2686,7 +2780,7 @@ msgid "Active graphics filter:"
msgstr "Mode graphique actif:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Mode Fenъtre"
@@ -2710,11 +2804,11 @@ msgstr "Mode vidщo actuel"
msgid "Current scale"
msgstr "Щchelle actuelle"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Filtre actif: Linщaire"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Filtre actif: Plus proche"
@@ -3115,6 +3209,9 @@ msgstr "Clic Activщ"
msgid "Clicking Disabled"
msgstr "Clic Dщsactivщ"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Activer le mode Roland GS"
+
#~ msgid "Hercules Green"
#~ msgstr "Hercules Vert"
diff --git a/po/gl_ES.po b/po/gl_ES.po
index c18a1935c3..8d048f546b 100644
--- a/po/gl_ES.po
+++ b/po/gl_ES.po
@@ -1,5 +1,5 @@
# LANGUAGE translation for ScummVM.
-# Copyright (C) YEAR ScummVM Team
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-08-15 13:33+0100\n"
"Last-Translator: Santiago G. Sanz <s.sanz@uvigo.es>\n"
"Language-Team: \n"
@@ -16,45 +16,55 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(compilado o %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Funcionalidades compiladas:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Motores dispoёibles:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Mostrar/ocultar consola"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Arriba"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Ir ao directorio superior"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Arriba"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Cancelar"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Elexir"
@@ -90,17 +100,18 @@ msgid "Map"
msgstr "Asignar"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "Aceptar"
@@ -171,8 +182,8 @@ msgid ""
"English"
msgstr "Idioma do xogo. Non converterс a versiѓn galega do xogo en inglesa"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<por defecto>"
@@ -194,11 +205,11 @@ msgstr "Plataforma:"
msgid "Engine"
msgstr "Motor"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grсficos"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "Efectos grсficos"
@@ -211,7 +222,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Anular a configuraciѓn dos grсficos"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Son"
@@ -224,11 +235,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Anular a configuraciѓn do son"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Volume"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Volume"
@@ -242,7 +253,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Anular a configuraciѓn do volume"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -255,7 +266,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Anular a configuraciѓn de MIDI"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -268,11 +279,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Anular a configuraciѓn de MT-32"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Camiёos"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Camiёos"
@@ -286,7 +297,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Camiёo do xogo:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Camiёo adicional:"
@@ -294,42 +305,42 @@ msgstr "Camiёo adicional:"
msgid "Specifies path to additional data used the game"
msgstr "Especifica o camiёo dos datos adicionais usados no xogo"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Camiёo adicional:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Camiёo de gardado:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Especifica o lugar dos ficheiros de gardado"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Camiёo de gardado:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Ningњn"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Predefinido"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Seleccionar SoundFont"
@@ -438,12 +449,14 @@ msgstr "Buscar:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Cargar partida:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Cargar"
@@ -528,133 +541,133 @@ msgstr "%d directorios analizados..."
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr "%d xogos novos atopados; %d xogos xa engadidos ignorados..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Nunca"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "cada 5 min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "cada 10 min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "cada 15 min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "cada 30 min"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Ningunha"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Erro ao aplicar os cambios na configuraciѓn dos grсficos:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "non se puido cambiar o modo de vэdeo."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "non se puido cambiar a configuraciѓn de pantalla completa."
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "non se puido cambiar a proporciѓn."
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Modo de grсficos:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Modo de procesamento:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Modos de interpolaciѓn de cores compatibles con algњns xogos"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Pantalla completa"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Correcciѓn de proporciѓn"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Corrixir a proporciѓn para os xogos en 320x200"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Dispositivo preferido:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Dispositivo de mњsica:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Especifica o dispositivo ou emulador de tarxeta de son preferido"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Especifica o dispositivo ou emulador de tarxeta de son de saэda"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Disp. preferido:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Disp. mњsica:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "Emulador de AdLib:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "Moitos xogos empregan AdLib para a mњsica"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Taxa de saэda:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -662,255 +675,260 @@ msgstr ""
"A maior valor, maior calidade do son, mais talvez non sexa compatible coa "
"tarxeta"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "Dispositivo de GM:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr ""
"Especifica o dispositivo de son por defecto para a saэda de General MIDI"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Non empregar mњsica en General MIDI"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Empregar o primeiro dispositivo dispoёible"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"SoundFont щ compatible con algunhas tarxetas de son, Fluidsynth e Timidity"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Modo AdLib/MIDI mixto"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Empregar xeraciѓn de son MIDI e mсis AdLib"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "Ganancia de MIDI:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "Dispositivo de MT-32:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Especifica o dispositivo por defecto para a saэda de Roland MT-32/LAPC1/"
"CM32l/CM64"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Roland MT-32 verdadeiro (sen emulaciѓn de GM)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
msgstr ""
"Marcar para empregar o hardware compatible con Roland conectado ao sistema"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 (sen emulaciѓn de GM)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Activar modo Roland GS"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Roland MT-32 verdadeiro (sen emulaciѓn de GM)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Desactiva o General MIDI para os xogos con mњsica en Roland MT-32"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Non empregar mњsica en Roland MT-32"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Texto e voz:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Voz"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Subtэtulos"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Ambos"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Velocidade dos subtэtulos:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Texto e voz:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Voz"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Subs"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Ambos"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Mostrar os subtэtulos e reproducir as voces"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Velocidade subs:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Volume de mњsica:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Volume mњsica:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Silenciar todo"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Volume de efectos:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Volume dos efectos de son"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Volume efectos:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Volume de voz:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Volume voz:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Camiёo do tema:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Camiёo tema:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Especificar o camiёo dos datos adicionais de todos os xogos ou de ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Camiёo dos complementos:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Camiёo complementos:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Misc."
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Misc."
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "Procesamento da interfaz:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Autogardado:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autogardado:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Teclas"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Idioma de interfaz:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Idioma da interfaz de ScummVM"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
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:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Seleccionar directorio para ficheiros de gardado"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Non щ posible escribir no directorio elixido. Selecciona outro."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Seleccionar directorio para temas de interfaz"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Seleccionar directorio para ficheiros adicionais"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Seleccionar directorio para complementos"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1163,13 +1181,16 @@ msgid "~R~eturn to Launcher"
msgstr "~V~olver ao Iniciador"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Gardar partida:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1198,12 +1219,12 @@ msgstr ""
"bсsica e mсis instruciѓns para acadar asistencia adicional."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~A~ceptar"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~C~ancelar"
@@ -1211,23 +1232,23 @@ msgstr "~C~ancelar"
msgid "~K~eys"
msgstr "~T~eclas"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Non se puido iniciar o formato de cor."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Non se puido cambiar ao modo de vэdeo: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Non se puido aplicar a configuraciѓn de proporciѓn."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Non se puido aplicar a configuraciѓn de pantalla completa."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1241,7 +1262,7 @@ msgstr ""
"os ficheiros de datos ao disco duro. Consulta\n"
"o ficheiro README para obter mсis informaciѓn."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1255,7 +1276,7 @@ msgstr ""
"do xogo. Consulta o ficheiro README\n"
"para obter mсis informaciѓn."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1264,7 +1285,7 @@ msgstr ""
"Erro ao cargar (%s)! Consulta o ficheiro README para obter informaciѓn "
"bсsica e mсis instruciѓns para acadar asistencia adicional."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1274,29 +1295,52 @@ msgstr ""
"Por iso, talvez sexa inestable e os ficheiros de gardado talvez non "
"funcionen en futuras versiѓns de ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Iniciar de todos os xeitos"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Empregar pantallas orixinais de gardado e carga"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
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"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Restaurar xogo:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Restaurar"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 atopou ficheiros de gardado vellos de Broken Sword 1 que deberэan "
+"ser convertidos.\n"
+"O formato vello xa non щ compatible, de xeito que non poderсs cargar as "
+"partidas se non os convertes.\n"
+"\n"
+"Preme Aceptar para convertilos. Se non, volverсs ver esta mensaxe a prѓxima "
+"vez que inicies o xogo.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Empregar modo de paleta intensa"
@@ -2010,7 +2054,7 @@ msgstr "Voar с dereita"
msgid "Fly to lower right"
msgstr "Voar с dereita abaixo"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2019,7 +2063,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:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2030,7 +2074,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2041,7 +2085,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2052,7 +2096,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2063,7 +2107,7 @@ msgstr ""
"selecciona o directorio Maniac que estс dentro do directorio Tentacle."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "Modo ~c~omprimido activado"
@@ -2084,7 +2128,7 @@ msgstr "Mo~s~trar mapa"
msgid "~M~ain Menu"
msgstr "~M~enњ principal"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "Efecto de ~a~uga activado"
@@ -2106,6 +2150,15 @@ msgstr "Erro ao gardar a partida no ficheiro."
msgid "Failed to delete file."
msgstr "Erro ao eliminar o ficheiro."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Modo rсpido"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Erro ao gardar a partida"
@@ -2196,11 +2249,11 @@ msgstr "Esvarar с esquerda"
msgid "Slide Right"
msgstr "Esvarar с dereita"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Xirar с esquerda"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Xirar с dereita"
@@ -2400,6 +2453,47 @@ msgstr ""
"\n"
"Contacta co equipo de ScummVM."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Ampliar"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Emulador de OPL de MAME"
@@ -2469,11 +2563,11 @@ msgstr "Emulador de Apple II GS (non implementado)"
msgid "C64 Audio Emulator"
msgstr "Emulador de C64 Audio"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Iniciando emulador de MT-32"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "Emulador de MT-32"
@@ -2655,12 +2749,12 @@ msgid "Normal (no scaling)"
msgstr "Normal (sen escala)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Correcciѓn de proporciѓn activada"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Correcciѓn de proporciѓn desactivada"
@@ -2669,7 +2763,7 @@ msgid "Active graphics filter:"
msgstr "Filtro de grсficos activo:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Modo en ventс"
@@ -2693,11 +2787,11 @@ msgstr "Modo de visualizaciѓn actual"
msgid "Current scale"
msgstr "Escala actual"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Modo de filtro activo: lineal"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Modo de filtro activo: mсis prѓximo"
@@ -3095,3 +3189,6 @@ msgstr "Premer activado"
#: backends/events/maemosdl/maemosdl-events.cpp:192
msgid "Clicking Disabled"
msgstr "Premer desactivado"
+
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Activar modo Roland GS"
diff --git a/po/hu_HU.po b/po/hu_HU.po
index b3642fd90c..abf47854e0 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -1,5 +1,5 @@
# Hungarian translation for ScummVM.
-# Copyright (C) 2010-2011 ScummVM Team
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# George Kormendi <grubycza@hotmail.com>, 2010.
#
@@ -7,58 +7,66 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
-"PO-Revision-Date: 2012-08-14 07:29+0100\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
+"PO-Revision-Date: 2013-02-11 09:27+0100\n"
"Last-Translator: George Kormendi <grubycza@hotmail.com>\n"
"Language-Team: Hungarian\n"
"Language: Magyar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
-"X-Poedit-Language: Hungarian\n"
-"X-Poedit-Country: HUNGARY\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
+"X-Generator: Poedit 1.5.5\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(kщszќlt %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Lefordэtott іsszetevѕk:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Tсmogatott jсtщkmotorok:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+msgid "Show hidden files"
+msgstr "Rejtett fсjlok lсtszanak"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr "Rejtett attribњtumu fсjlok megjelenэtщse"
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Feljebb"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Vissza az elѕzѕ kіnyvtсrszintre"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Feljebb"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Mщgse"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Vсlaszt"
@@ -94,17 +102,18 @@ msgid "Map"
msgstr "Kiosztсs"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -175,8 +184,8 @@ msgid ""
msgstr ""
"A jсtщk nyelve. Ne сllэtsd сt a pl. Spanyol nyelvћ jсtщkodat Angol nyelvre"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<alapщrtelmezett>"
@@ -198,11 +207,11 @@ msgstr "Platform:"
msgid "Engine"
msgstr "Motor"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grafika"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "GFX"
@@ -215,7 +224,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Globсlis grafikai beсllэtсsok felќlbэrсlсsa"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Audiѓ"
@@ -228,11 +237,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Globсlis audiѓ beсllэtсsok felќlbэrсlсsa"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Hangerѕ"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Hangerѕ"
@@ -246,7 +255,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Globсlis hangerѕbeсllэtсsok felќlbэrсlсsa"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -259,7 +268,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Globсlis MIDI beсllэtсsok felќlbэrсlсsa"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -272,11 +281,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Globсlis MT-32 beсllэtсsok felќlbэrсlсsa"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Mappсk"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Mappсk"
@@ -290,7 +299,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Jсtщk Mappa:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Extra Mappa:"
@@ -298,42 +307,42 @@ msgstr "Extra Mappa:"
msgid "Specifies path to additional data used the game"
msgstr "Mappa kivсlasztсs a jсtщkok kiegщszэtѕ fсjljaihoz"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Extra Mappa:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Mentщs Mappa:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Jсtщkmentщsek helyщnek meghatсrozсsa"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Mentщs Mappa:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Nincs"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Alapщrtelmezett"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "SoundFont kivсlasztсs"
@@ -442,12 +451,14 @@ msgstr "Keresщs:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Jсtщk betіltщse:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Betіltщs"
@@ -533,194 +544,198 @@ msgstr "%d Mappa сtvizsgсlva..."
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr "%d њj jсtщkot talсltam, %d elѕzѕleg hozzсadott jсtщk kihagyva..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Soha"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "5 percenkщnt"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "10 percenkщnt"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "15 percenkщnt"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "30 percenkщnt"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Nincs"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Nщhсny grafikus opciѓ vсltoztatсsa sikertelen:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "a videѓmѓd nem vсltozott."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "a teljeskщpernyѕs beсllэtсs nem vсltozott"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "a kщpmщretarсny beсllэtсsok nem vсltoztak"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Grafikus mѓd:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Kirajzolсs mѓd:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Nщhсny jсtщk tсmogatja a speciсlis сrnyalсsi mѓdokat"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Teljeskщpernyѕs mѓd:"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Kщpmщretarсny korrekciѓ"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Helyes oldalarсny a 320x200 jсtщkokhoz"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Elsѕdleges eszkіz:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Zene eszkіz:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Elsѕdleges hangeszkіz vagy hang emulсtor beсllэtсsok"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Hangeszkіz vagy hangkсrtya emulсtor beсllэtсsok"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Elsѕdleges eszk.:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Zene eszkіz:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "AdLib emulсtor:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib meghajtѓt sok jсtщk hasznсlja zenщhez"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Kimeneti rсta:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
msgstr ""
"Nagyobb щrtщkek jobb hangminѕsщget adnak, de nem minden hangkсrtya tсmogatja"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "GM Eszkіz:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Alapщrtelmezett hangeszkіz General MIDI kimenethez"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Ne hasznсlj General MIDI zenщt"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Elsѕ elщrhetѕ eszkіz hasznсlata"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
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"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Vegyes AdLib/MIDI mѓd"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "MIDI щs AdLib hanggenerсtorok hasznсlata"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "MIDI erѕsэtщs:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr "FluidSynth Beсllэtсsa"
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "MT-32 Eszkіz:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr "Roland MT-32/LAPC1/CM32l/CM64 alapщrtelmezett hangeszkіzіk beсllэtсsa"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Roland MT-32 Hardver (GM emulсciѓ tiltva)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -728,190 +743,190 @@ msgstr ""
"Jelіld be, ha hardveres Roland-Kompatibilis hangeszkіz van csatlakoztatva a "
"gщpedhez щs hasznсlni akarod"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 Hardver (GM emulсciѓ nincs)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Roland GS Mѓd engedщlyezve"
+#: gui/options.cpp:890
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Roland GS Mѓd (GM mapping tiltсsa)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "General MIDI lekщpezщs Roland MT-32 zenщs jсtщkokhoz kikapcsolva"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Ne hasznсlj Roland MT-32 zenщt"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Szіveg щs beszщd:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Csak beszщd"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Csak felirat"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Mind"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Felirat sebessщg:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Felirat щs beszщd:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Besz"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Text"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Mind"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Hang щs feliratok megjelenэtщse"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Felirat sebessщg:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Zene hangerѕ:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Zene hangerѕ:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "жsszes nщmэtсsa"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "SFX hangerѕ:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Speciсlis hangeffektusok hangereje"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "SFX hangerѕ:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Beszщd hangerѕ:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Beszщd hangerѕ:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Tщma Mappa:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Tщma Mappa:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "Minden jщtщk щs ScummVM kiegщszэtѕ fсjljainak mappсja:"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Plugin Mappa:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Plugin Mappa:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Vegyes"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Vegyes"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Tщma:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "GUI Renderelѕ:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Automentщs:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Automentщs:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Billentyћk"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "GUI nyelve:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "A ScummVM GUI nyelve"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
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:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Vсlassz jсtщkmentщs mappсt"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
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"
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "GUI tщma mappa kivсlasztсsa"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Mappa vсlasztсs az extra fсjloknak"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Plugin mappa kivсlasztсsa"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1164,13 +1179,16 @@ msgid "~R~eturn to Launcher"
msgstr "Visszatщrщs az indэtѓba"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Jсtщk mentщse:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1198,12 +1216,12 @@ msgstr ""
"informсciѓkrѓl, щs hogy hogyan segэthetsz a kщsѕbbiekben."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "Mщgse"
@@ -1211,23 +1229,23 @@ msgstr "Mщgse"
msgid "~K~eys"
msgstr "Billentyќk"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Szэn formсtum nincs alkalmazva"
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Videѓmѓd nincs сtсllэtva: ' "
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Mщretarсny korrekciѓ nem vсltozott."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Teljeskщpernyѕs beсllэtсs nincs alkalmazva"
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1241,7 +1259,7 @@ msgstr ""
"adatfсjljait a merevlemezedre.\n"
"Nщzd meg a README fсjlt a rщszletekщrt."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1255,7 +1273,7 @@ msgstr ""
"hogy a jсtщk zenщje hallhatѓ legyen.\n"
"Nщzd meg a README fсjlt a rщszletekщrt."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1264,7 +1282,7 @@ msgstr ""
"(%s) jсtщkсllсs betіltщse nem sikerќlt!. Olvassd el a README-t az alap "
"informсciѓkrѓl, щs hogy hogyan segэthetsz a kщsѕbbiekben."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1274,28 +1292,49 @@ msgstr ""
"ScummVM. Szсmэts rс hogy nem stabilan fut, щs a mentщsek nem mћkіdnek a "
"jіvѕbeni ScummVM verziѓkkal."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Indэtсs эgy is"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Eredeti ment/tіlt kщpernyѕk hasznсlata"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
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"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Jсtщkmenet visszaсllэtсsa:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Visszaсllэtсs"
+#: engines/drascula/saveload.cpp:49
+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 rщgi jсtщkmentщst talсlt a Drascula-hoz, ezt сt kell alakэtani.\n"
+"A rщgi jсtщkmentщs forma tіbbщ nem tсmogatott, ezщrt a jсtщk mentщse nem "
+"tіltѕdik be ha nem akэtod сt azt.\n"
+"\n"
+"Nyomj OK-t ha сtalakэtod most, vagy rсkщrdezek њjra ha legkіzelebb elindэtod "
+"a jсtщkot.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Fщnyes paletta mѓd hasznсlata"
@@ -2005,7 +2044,7 @@ msgstr "Jobbra repќlщs"
msgid "Fly to lower right"
msgstr "Jobbra le repќlщs"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2014,7 +2053,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:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2025,7 +2064,7 @@ msgstr ""
"\n"
"%s fсjlba nem sikerќlt"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2036,7 +2075,7 @@ msgstr ""
"\n"
"%s fсjlbѓl nem sikerќlt"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2047,7 +2086,7 @@ msgstr ""
"\n"
"%s fсjlba elkщszќlt"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2058,7 +2097,7 @@ msgstr ""
"vсlaszd a 'Maniac' mappсt a 'Tentacle' kіnyvtсrсban."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "~Z~ip Mѓd aktivсlva"
@@ -2079,7 +2118,7 @@ msgstr "~S~ Tщrkщp"
msgid "~M~ain Menu"
msgstr "Fѕ~M~enќ"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "Vэzeffektus engedщlyezve"
@@ -2101,6 +2140,14 @@ msgstr "Jсtщkсllсs mentщse fсjlba nem sikerќlt."
msgid "Failed to delete file."
msgstr "Fсjl tіrlщs sikertelen."
+#: engines/groovie/detection.cpp:312
+msgid "Fast movie speed"
+msgstr "Gyors filmsebessщg"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Filmek lejсtszсsa nagyobb sebessщggel"
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Jсtщk mentщs nem sikerќlt"
@@ -2191,11 +2238,11 @@ msgstr "Siklсs balra"
msgid "Slide Right"
msgstr "Siklсs jobbra"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Balra fordul"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Jobbra fordul"
@@ -2391,6 +2438,46 @@ msgstr ""
"\n"
"Lщgyszэves jelentsd a csapatnak."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr "Щrvщnytelen mentщs fсjlnщv"
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Fel/Nagyэtсs/Elѕre mozgсs/Ajtѓnyitсs"
+
+#: engines/pegasus/pegasus.cpp:2411
+msgid "Down/Zoom Out"
+msgstr "Le/Zoom Ki"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr "Tсrgylista tсlca Kщpre/Elrejt"
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr "Biochip tсlca Kщpre/Elrejt"
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr "Akciѓ/Vсlaszt"
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr "Adatkщpernyѕ kapcsolѓ"
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr "Infѓkщpernyѕ Kщpre/Elrejt"
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr "Szќnet menќ Kщpre/Elrejt"
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL emulсtor"
@@ -2458,11 +2545,11 @@ msgstr "Apple II GS Emulсtor (NEM TСMOGATOTT)"
msgid "C64 Audio Emulator"
msgstr "C64 Audio Emulсtor"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "MT-32 Emulсtor inicializсlсsa"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "MT-32 Emulсtor"
@@ -2644,12 +2731,12 @@ msgid "Normal (no scaling)"
msgstr "Normсl (nincs сtmщretezщs)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Mщretarсny korrekciѓ engedщlyezve"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Mщretarсny korrekciѓ letiltva"
@@ -2658,7 +2745,7 @@ msgid "Active graphics filter:"
msgstr "Aktэv grafikus szћrѕk:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Ablakos mѓd"
@@ -2682,11 +2769,11 @@ msgstr "Jelenlegi videѓmѓd"
msgid "Current scale"
msgstr "Aktuсlis mщretezщs"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Aktэv filter mѓd: Lineсris"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Aktэv filter mѓd: Kіzelэtѕ"
@@ -3043,9 +3130,8 @@ msgid "Decreasing Volume"
msgstr "Hangerѕ csіkkentщse"
#: backends/events/openpandora/op-events.cpp:174
-#, fuzzy
msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
-msgstr "Щrintѕkщpernyѕ 'Tap Mѓd' - Lebegѕ (Nincs katt)"
+msgstr "Щrintѕkщpernyѕ 'Щrintщsmѓd' - Lebegѕ (DPad katt)"
#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
@@ -3083,6 +3169,9 @@ msgstr "Kattintсs engedve"
msgid "Clicking Disabled"
msgstr "Kattintсs tiltva"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Roland GS Mѓd engedщlyezve"
+
#~ msgid "Hercules Green"
#~ msgstr "Hercules Zіld"
diff --git a/po/it_IT.po b/po/it_IT.po
index 3ebb5ca090..ad12239437 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -1,5 +1,5 @@
# Italian translation for ScummVM.
-# Copyright (C) 2010-2012 ScummVM Team
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Matteo 'Maff' Angelino <matteo.maff at gmail dot com>, 2010.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-07-09 09:30+0100\n"
"Last-Translator: Matteo 'Maff' Angelino <matteo.maff at gmail dot com>\n"
"Language-Team: Italian\n"
@@ -16,45 +16,55 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(build creata il %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Funzionalitр compilate in:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Motori disponibili:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Mostra/nascondi console"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Cartella superiore"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Vai alla cartella superiore"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Su"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Annulla"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Scegli"
@@ -90,17 +100,18 @@ msgid "Map"
msgstr "Mappa"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -172,8 +183,8 @@ msgid ""
msgstr ""
"Lingua del gioco. Un gioco inglese non potrр risultare tradotto in italiano"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<predefinito>"
@@ -195,11 +206,11 @@ msgstr "Piattaf.:"
msgid "Engine"
msgstr "Motore"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grafica"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "Grafica"
@@ -212,7 +223,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Ignora le impostazioni grafiche globali"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Audio"
@@ -225,11 +236,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Ignora le impostazioni audio globali"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Volume"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Volume"
@@ -243,7 +254,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Ignora le impostazioni globali di volume"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -256,7 +267,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Ignora le impostazioni MIDI globali"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -269,11 +280,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Ignora le impostazioni MT-32 globali"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Percorsi"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Perc."
@@ -287,7 +298,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Perc. gioco:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Percorso extra:"
@@ -295,42 +306,42 @@ msgstr "Percorso extra:"
msgid "Specifies path to additional data used the game"
msgstr "Specifica il percorso di ulteriori dati usati dal gioco"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Perc. extra:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Salvataggi:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Specifica dove archiviare i salvataggi"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Salvataggi:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Nessuno"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Predefinito"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Seleziona SoundFont"
@@ -439,12 +450,14 @@ msgstr "Cerca:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Carica gioco:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Carica"
@@ -533,135 +546,135 @@ msgstr "%d cartelle analizzate..."
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr "Rilevati %d nuovi giochi, ignorati %d giochi aggiunti in precedenza..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Mai"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "ogni 5 minuti"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "ogni 10 minuti"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "ogni 15 minuti"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "ogni 30 minuti"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Nessuno"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Impossibile applicare alcuni dei cambiamenti nelle opzioni grafiche."
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "impossibile modificare la modalitр video."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "impossibile modificare l'impostazione schermo intero"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "impossibile modificare l'impostazione proporzioni"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Modalitр:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Resa grafica:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Modalitр di resa grafica speciali supportate da alcuni giochi"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Modalitр a schermo intero"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Correzione proporzioni"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Corregge le proporzioni dei giochi 320x200"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Disp. preferito:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Dispositivo audio:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
"Specifica il dispositivo audio o l'emulatore della scheda audio preferiti"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr ""
"Specifica il dispositivo di output audio o l'emulatore della scheda audio"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Disp. preferito:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Disposit. audio:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "Emulatore AdLib:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib ш utilizzato per la musica in molti giochi"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Frequenza:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -669,62 +682,66 @@ msgstr ""
"Valori piљ alti restituiscono un suono di maggior qualitр, ma potrebbero non "
"essere supportati dalla tua scheda audio"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "Dispositivo GM:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Specifica il dispositivo audio predefinito per l'output General MIDI"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Non utilizzare la musica General MIDI"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Utilizza il primo dispositivo disponibile"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr "SoundFont ш supportato da alcune schede audio, Fluidsynth e Timidity"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Modalitр mista AdLib/MIDI"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Utilizza generazione di suono sia MIDI che AdLib"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "Guadagno MIDI:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "Disposit. MT-32:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Specifica il dispositivo audio predefinito per l'output Roland MT-32/LAPC1/"
"CM32l/CM64"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Roland MT-32 effettivo (disattiva emulazione GM)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -732,192 +749,193 @@ msgstr ""
"Seleziona se vuoi usare il dispositivo hardware audio compatibile con Roland "
"che ш connesso al tuo computer"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 effettivo (disat.emul.GM)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Attiva la modalitр Roland GS"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Roland MT-32 effettivo (disattiva emulazione GM)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Disattiva la mappatura General MIDI per i giochi con colonna sonora Roland "
"MT-32"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Non utilizzare la musica Roland MT-32"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Testo e voci:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Voci"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Sottotitoli"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Entrambi"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Velocitр testo:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Testo e voci:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Voci"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Sub"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Entr."
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Mostra i sottotitoli e attiva le voci"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Velocitр testo:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Volume musica:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Volume musica:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Disattiva audio"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Volume effetti:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Volume degli effetti sonori"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Volume effetti:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Volume voci:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Volume voci:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Percorso tema:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Perc. tema:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "Specifica il percorso di ulteriori dati usati dai giochi o da ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Percorso plugin:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Perc. plugin:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Varie"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Varie"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "Renderer GUI:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Autosalva:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autosalva:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Tasti"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Lingua GUI:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Lingua dell'interfaccia grafica di ScummVM"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Devi riavviare ScummVM affinchщ le modifiche abbiano effetto."
-#: gui/options.cpp:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Seleziona la cartella per i salvataggi"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
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."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Seleziona la cartella dei temi dell'interfaccia"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Seleziona la cartella dei file aggiuntivi"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Seleziona la cartella dei plugin"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1174,13 +1192,16 @@ msgid "~R~eturn to Launcher"
msgstr "~V~ai a elenco giochi"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Salva gioco:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1210,12 +1231,12 @@ msgstr ""
"assistenza."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~A~nnulla"
@@ -1223,23 +1244,23 @@ msgstr "~A~nnulla"
msgid "~K~eys"
msgstr "~T~asti"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Impossibile inizializzare il formato colore."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Impossibile cambiare la modalitр video: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Impossibile applicare l'impostazione proporzioni"
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Impossibile applicare l'impostazione schermo intero."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1253,7 +1274,7 @@ msgstr ""
"sull'hard disk.\n"
"Vedi il file README per i dettagli."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1267,7 +1288,7 @@ msgstr ""
"la musica del gioco.\n"
"Vedi il file README per i dettagli."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1277,7 +1298,7 @@ msgstr ""
"per le informazioni di base e per le istruzioni su come ottenere ulteriore "
"assistenza."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1287,30 +1308,53 @@ msgstr ""
"ScummVM. Ш quindi possibile che sia instabile, e i salvataggi potrebbero non "
"funzionare con future versioni di ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Avvia comunque"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Usa schermate di salvataggio originali"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Usa le schermate originali di salvataggio e caricamento, al posto di quelle "
"di ScummVM"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Ripristina gioco:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Ripristina"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 ha trovato vecchi salvataggi per Broken Sword 1 che dovrebbero "
+"essere convertiti.\n"
+"Il vecchio formato di salvataggio non ш piљ supportato, quindi non potrai "
+"caricare i tuoi salvataggi senza prima convertirli.\n"
+"\n"
+"Premi OK per convertirli adesso, altrimenti ti verrр richiesto al prossimo "
+"avvio del gioco.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Usa modalitр colori brillanti"
@@ -2023,7 +2067,7 @@ msgstr "Vola a destra"
msgid "Fly to lower right"
msgstr "Vola in basso a destra"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2032,7 +2076,7 @@ msgstr ""
"Il supporto nativo MIDI richiede il Roland Upgrade della LucasArts,\n"
"ma %s non ш presente. Verrр usato AdLib."
-#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2043,7 +2087,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2054,7 +2098,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2065,7 +2109,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2077,7 +2121,7 @@ msgstr ""
"cartella di Day Of The Tentacle."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "Modalitр ~Z~ip attivata"
@@ -2098,7 +2142,7 @@ msgstr "~M~ostra mappa"
msgid "~M~ain Menu"
msgstr "~M~enu principale"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "~E~ffetto acqua attivo"
@@ -2120,6 +2164,15 @@ msgstr "Impossibile salvare il gioco nel file."
msgid "Failed to delete file."
msgstr "Impossibile eliminare il file."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Modalitр veloce"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Impossibile salvare il gioco"
@@ -2210,11 +2263,11 @@ msgstr "Scorri a sinistra"
msgid "Slide Right"
msgstr "Scorri a destra"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Gira a sinistra"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Gira a destra"
@@ -2413,6 +2466,47 @@ msgstr ""
"\n"
"Per favore, contatta il team."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Zoom avanti"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Emulatore OPL MAME"
@@ -2482,11 +2576,11 @@ msgstr "Emulatore Apple II GS (NON IMPLEMENTATO)"
msgid "C64 Audio Emulator"
msgstr "Emulatore audio C64"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Avvio in corso dell'emulatore MT-32"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "Emulatore MT-32"
@@ -2668,12 +2762,12 @@ msgid "Normal (no scaling)"
msgstr "Normale (no ridim.)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Correzione proporzioni attivata"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Correzione proporzioni disattivata"
@@ -2682,7 +2776,7 @@ msgid "Active graphics filter:"
msgstr "Filtro grafico attivo:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Modalitр finestra"
@@ -2706,11 +2800,11 @@ msgstr "Modalitр visualizzazione attuale"
msgid "Current scale"
msgstr "Dimensioni attuali"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Modalitр filtro attiva: Lineare"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Modalitр filtro attiva: Piљ vicino"
@@ -3109,6 +3203,9 @@ msgstr "Clic attivato"
msgid "Clicking Disabled"
msgstr "Clic disattivato"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Attiva la modalitр Roland GS"
+
#~ msgid "Hercules Green"
#~ msgstr "Hercules verde"
diff --git a/po/nb_NO.po b/po/nb_NO.po
index e28c370f2d..90de2f4673 100644
--- a/po/nb_NO.po
+++ b/po/nb_NO.po
@@ -1,5 +1,5 @@
# Norwegian (Bokmaal) translation for ScummVM.
-# Copyright (C) 2010-2012 ScummVM Team
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Einar Johan T. Sјmхen <einarjohants@gmail.com>, 2010.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-07-04 02:19+0100\n"
"Last-Translator: Einar Johan Sјmхen <einarjohants@gmail.com>\n"
"Language-Team: somaen <einarjohants@gmail.com>\n"
@@ -20,45 +20,55 @@ msgstr ""
"X-Poedit-Country: NORWAY\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(bygd den %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Funksjoner innkompilert:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Tilgjengelige motorer:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Vis / Skjul konsollen"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Gх tilbake"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Gх til forrige mappenivх"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Gх tilbake"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Avbryt"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Velg"
@@ -94,17 +104,18 @@ msgid "Map"
msgstr "Koble"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -177,8 +188,8 @@ msgstr ""
"Spillets sprхk. Dette vil ikke gjјre din spanske spillversjon om til engelsk "
"versjon"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<standard>"
@@ -200,11 +211,11 @@ msgstr "Plattform:"
msgid "Engine"
msgstr "Motor"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grafikk"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "GFX"
@@ -217,7 +228,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Overstyr globale grafikkinstillinger"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Lyd"
@@ -230,11 +241,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Overstyr globale lydinstillinger"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Volum"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Volum"
@@ -248,7 +259,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Overstyr globale voluminstillinger"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -261,7 +272,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Overstyr globale MIDI-instillinger"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -274,11 +285,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Overstyr globale MT-32-instillinger"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Sti"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Sti"
@@ -292,7 +303,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Spillsti:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Ekstrasti:"
@@ -300,42 +311,42 @@ msgstr "Ekstrasti:"
msgid "Specifies path to additional data used the game"
msgstr "Bestemmer sti til ytterligere data brukt av spillet"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Ekstrasti:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Lagringssti:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Bestemmer sti til lagrede spill"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Lagringssti:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Ingen"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Standard"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Velg SoundFont"
@@ -444,12 +455,14 @@ msgstr "Sјk:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Хpne spill:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Хpne"
@@ -537,133 +550,133 @@ msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr ""
"Fant %d nye spill, ignorerte %d spill som har blitt lagt til tidligere..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Aldri"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "hvert 5. min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "hvert 10. min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "hvert 15. min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "hvert 30. min"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Ingen"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Klarte ikke х aktivere enkelte av endringene i grafikkinstillinger:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "videomodusen kunne ikke endres."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "fullskjermsinnstillingen kunne ikke endres"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "aspektrate-innstillingen kunne ikke endres"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Grafikkmodus:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Tegnemodus:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Spesiel dithering-modus stјttet av enkelte spill"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Fullskjermsmodus"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Aspekt-rate korrigering"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Korriger aspekt-rate for 320x200-spill"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Foretrukket enhet:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Musikkenhet:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Velger foretrukket lydenhet eller lydkort-emulator"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Velger ut-lydenhet eller lydkortemulator"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Foretrukket enh.:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Musikkenhet:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "AdLib-emulator:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib brukes til musikk i mange spill"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Utrate:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -671,60 +684,64 @@ msgstr ""
"Hјyere verdier gir bedre lydkvalitet, men stјttes kanskje ikke av ditt "
"lydkort "
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "GM-enhet:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Velger standard lydenhet for General MIDI-utdata"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Ikke bruk General MIDI-musikk"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Bruk fјrste tilgjengelige enhet"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
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:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Mikset AdLib/MIDI-modus"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Bruk bхde MIDI- og AdLib- lydgenerering"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "MIDI gain:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "MT-32 Enhet:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr "Velger standard lydenhet for Roland MT-32/LAPC1/CM32I/CM64-avspilling"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -732,190 +749,191 @@ msgstr ""
"Velg hvis du har et ekte Roland-kompatible lydkort tilkoblet maskinen, og "
"vil bruke dette."
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Aktiver Roland GS-modus"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Slх av General MIDI-kobling for spill som har Roland MT-32-lydspor"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Ikke bruk Roland MT-32-musikk"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Tekst og Tale:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Tale"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Undertekster"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Begge"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Teksthastighet:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Tekst og Tale:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Tale"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Tekst"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Begge"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Vis undertekster, og spill av tale"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Underteksthastighet:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Musikkvolum:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musikkvolum:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Demp alle"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Lydeffektvolum:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Volum for spesielle lydeffekter"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Lydeffektvolum:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Talevolum:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Talevolum:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Temasti:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Temasti:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "Velger sti for ytterligere data brukt av alle spill eller ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Pluginsti:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Pluginsti:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Div"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Div"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "GUI-tegner:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Autolagre:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autolagre:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Taster"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "GUI-sprхk:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Sprхk i ScummVM-GUIet"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
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:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Velg mappe for lagrede spill"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Den valgte mappen kan ikke skrives til. Vennligst velg en annen."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Velg mappe for GUI-temaer"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Velg mappe for ytterligere filer"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Velg mappe for plugins"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1172,13 +1190,16 @@ msgid "~R~eturn to Launcher"
msgstr "~T~ilbake til oppstarter"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Lagret spill:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1207,12 +1228,12 @@ msgstr ""
"grunnleggende informasjon og instruksjon om hvordan du fхr ytterligere hjelp."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~A~vbryt"
@@ -1220,23 +1241,23 @@ msgstr "~A~vbryt"
msgid "~K~eys"
msgstr "~T~aster"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Kunne ikke initalisere fargeformat."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Kunne ikke veksle til videomodus: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Kunne ikke aktivere aspektrate-innstilling."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Kunne ikke aktivere fullskjermsinnstilling."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1250,7 +1271,7 @@ msgstr ""
"datafilene til harddisken din istedet.\n"
"Se README-filen for detaljer."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1259,14 +1280,14 @@ msgid ""
"See the README file for details."
msgstr ""
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
"and for instructions on how to obtain further assistance."
msgstr ""
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1276,28 +1297,51 @@ msgstr ""
"Derfor er det sannsynlig at det vil vцre ustabilt, og det er ikke sikkert at "
"lagrede spill vil fortsette х fungere i fremtidige versjoner av ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Start allikevel"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Bruk originale lagre/laste-skjermer"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Bruk de originale lagre/laste-skjermene, istedenfor ScummVM-variantene"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Gjennopprett spill:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Gjenopprett"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 oppdaget at du har gamle lagrede spill for Broken Sword 1 som bјr "
+"konverteres.\n"
+"Det gamle formatet for lagrede spill stјttes ikke lengre, sх du vil ikke "
+"vцre i stand til х laste de lagrede spillene,\n"
+"med mindre du konverterer dem.\n"
+"Trykk OK for х konvertere dem nх, ellers vil du bli spurt igjen neste gang "
+"du starter spillet."
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Bruk lys palettmodus"
@@ -2006,14 +2050,14 @@ msgstr "Fly til hјyre"
msgid "Fly to lower right"
msgstr "Fly til nedre hјyre"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, 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:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2024,7 +2068,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2035,7 +2079,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2046,7 +2090,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2057,7 +2101,7 @@ msgstr ""
"hovedmenyen og velg 'Maniac'-undermappa i Tentacle-mappa."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "~Z~ipmodus aktivert"
@@ -2078,7 +2122,7 @@ msgstr "Vi~s~ Kart"
msgid "~M~ain Menu"
msgstr "Hoved~m~eny"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "~V~anneffekt aktivert"
@@ -2100,6 +2144,15 @@ msgstr "Klarte ikke lagre spilltilstand fra fil."
msgid "Failed to delete file."
msgstr "Klarte ikke х slette fil."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Rask modus"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Klarte ikke х lagre spill."
@@ -2190,11 +2243,11 @@ msgstr "Skli mot Venstre"
msgid "Slide Right"
msgstr "Skli mot Hјyre"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Svin til Venstre"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Sving til Hјyre"
@@ -2291,7 +2344,7 @@ msgstr ""
"vцre i stand til х laste de lagrede spillene,\n"
"med mindre du konverterer dem.\n"
"Trykk OK for х konvertere dem nх, ellers vil du bli spurt igjen neste gang "
-"du starter spillet."
+"du starter spillet.\n"
#: engines/sword1/control.cpp:1234
#, c-format
@@ -2366,7 +2419,7 @@ msgstr ""
"laste de lagrede spillene,\n"
"med mindre du konverterer dem.\n"
"Trykk OK for х konvertere dem nх, ellers vil du bli spurt igjen neste gang "
-"du starter spillet."
+"du starter spillet.\n"
#: engines/parallaction/saveload.cpp:319
msgid "ScummVM successfully converted all your savefiles."
@@ -2384,6 +2437,47 @@ msgstr ""
"\n"
"Vennligst rapporter dette til teamet."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Zoom opp"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL emulator"
@@ -2453,11 +2547,11 @@ msgstr "Apple II GS Emulator (IKKE IMPLEMENTERT)"
msgid "C64 Audio Emulator"
msgstr "C64 Lydemulator"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Initialiserer MT-32-Emulator"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "MT-32 Emulator"
@@ -2640,12 +2734,12 @@ msgid "Normal (no scaling)"
msgstr "Normal (ingen skalering)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Aspekt-rate korrigering aktivert"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Aspekt-rate korrigering deaktivert"
@@ -2654,7 +2748,7 @@ msgid "Active graphics filter:"
msgstr "Aktivt grafikkfilter:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Vindusmodus"
@@ -2678,11 +2772,11 @@ msgstr "Nхvцrende videomodus"
msgid "Current scale"
msgstr "Nхvцrende skala"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Aktiv filtermodus: Linjцr"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Aktiv filtermodus: Nцrmeste"
@@ -3083,6 +3177,9 @@ msgstr "Klikking aktivert"
msgid "Clicking Disabled"
msgstr "Klikking deaktivert"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Aktiver Roland GS-modus"
+
#~ msgid "Hercules Green"
#~ msgstr "Hercules Grјnn"
diff --git a/po/nn_NO.po b/po/nn_NO.po
index 77af3801bf..e65ef27eda 100644
--- a/po/nn_NO.po
+++ b/po/nn_NO.po
@@ -1,5 +1,5 @@
# Norwegian (Nynorsk) translation for ScummVM.
-# Copyright (C) 2010-2012 ScummVM Team
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Einar Johan T. Sјmхen <einarjohants@gmail.com>, 2010.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2011-04-25 23:07+0100\n"
"Last-Translator: Einar Johan T. Sјmхen <einarjohants@gmail.com>\n"
"Language-Team: somaen <einarjohants@gmail.com>\n"
@@ -20,45 +20,55 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Poedit-Country: NORWAY\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(bygd den %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Funksjonar innkompilert:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Tilgjengelege motorar:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Vis / Skjul konsoll"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Gх tilbake"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Gх til forrige mappenivх"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Gх tilbake"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Avbryt"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Vel"
@@ -95,17 +105,18 @@ msgid "Map"
msgstr "Kople"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -178,8 +189,8 @@ msgstr ""
"Spelets sprхk. Dette vil ikkje gjere den spanske versjonen av spelet til ein "
"engelsk versjon"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<standard>"
@@ -202,11 +213,11 @@ msgstr "Plattform:"
msgid "Engine"
msgstr "Undersјk"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grafikk"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "GFX"
@@ -219,7 +230,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Overstyr globale grafikkinstillingar"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Lyd"
@@ -232,11 +243,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Overstyr globale lydinstillingar"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Volum"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Volum"
@@ -250,7 +261,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Overstyr globale voluminstillingar"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -263,7 +274,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Overstyr globale MIDI-instillingar"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -276,11 +287,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Overstyr globale MT-32-instillingar"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Stiar"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Stiar"
@@ -294,7 +305,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Spelsti:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Ekstrasti:"
@@ -302,42 +313,42 @@ msgstr "Ekstrasti:"
msgid "Specifies path to additional data used the game"
msgstr ""
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Ekstrasti:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Lagringssti:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr ""
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Lagringssti:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Ingen"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Standard"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Vel SoundFont"
@@ -446,12 +457,14 @@ msgstr "Sјk:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Хpne spel:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Хpne"
@@ -536,133 +549,133 @@ msgstr "Sјkt i %d mappar ..."
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr "Oppdaga %d nye spel ..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Aldri"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "kvart 5. min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "kvart 10. min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "kvart 15. min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "kvart 30. min"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Ingen"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr ""
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr ""
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr ""
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr ""
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Grafikkmodus:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Teiknemodus:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Spesielle dithering-modus som stјttast av nokre spel"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Fullskjermsmodus"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Aspekt-korrigering"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Rett opp aspekt for 320x200 spel"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Fјretrukken eining:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr ""
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr ""
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr ""
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr ""
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "AdLib emulator:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib nyttast til musikk i mange spel"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr ""
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -670,250 +683,255 @@ msgstr ""
"Hјgare verdier gir betre lydkvalitet, men stјttast kanskje ikkje av "
"lydkortet ditt"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr ""
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr ""
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Ikkje nytt General MIDI musikk"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr ""
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr "SoundFont stјttast av enkelte lydkort, Fluidsynth og Timidity"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Blanda AdLib/MIDI-modus"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Nytt bхe MIDI og AdLib lydskaping"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "MIDI gain:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr ""
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
msgstr ""
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Ekte Roland MT-32 (ingen GS-emulering)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Aktiver Roland GS-modus"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Slхr av General MIDI-kopling for spel med Roland MT-32 lydspor"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Ikkje nytt Roland MT-32 musikk"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Tekst og Tale:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Tale"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Teksting"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Begge"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Undertekstfart:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Tekst og Tale:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Tale"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Tekst"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Bхe"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Vis teksting og spel av tale"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Undertekstfart:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Musikkvolum:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musikkvolum:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Demp alle"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Lydeffektvolum:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr ""
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Lydeffektvolum:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Talevolum:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Talevolum:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Temasti:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Temasti:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Pluginsti:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Pluginsti:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Div"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Div"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "GUI-teiknar:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Autolagre:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autolagre:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Tastar"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "GUI-sprхk:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Sprхk i ScummVM-GUIet"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
#, 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:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Vel mappe for lagra spel"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Den velde mappa kan ikkje skrivast til. Vennlegst vel ein annan."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Vel ei mappe for GUI-tema:"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Vel ei mappe for ekstra filer"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Vel ei mappe for plugins"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1172,13 +1190,16 @@ msgid "~R~eturn to Launcher"
msgstr "~T~ilbake til oppstarter"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Lagra spel:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1202,12 +1223,12 @@ msgid ""
msgstr ""
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~A~vbryt"
@@ -1215,25 +1236,25 @@ msgstr "~A~vbryt"
msgid "~K~eys"
msgstr "~T~astar"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr ""
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
#, fuzzy
msgid "Could not switch to video mode: '"
msgstr "Gjeldende videomodus:"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
#, fuzzy
msgid "Could not apply aspect ratio setting."
msgstr "Veksle aspekt-korrigering"
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr ""
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1242,7 +1263,7 @@ msgid ""
"See the README file for details."
msgstr ""
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1251,42 +1272,57 @@ msgid ""
"See the README file for details."
msgstr ""
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
"and for instructions on how to obtain further assistance."
msgstr ""
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 ""
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr ""
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr ""
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Gjenopprett spel:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Gjenopprett"
+#: engines/drascula/saveload.cpp:49
+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 ""
+
#: engines/dreamweb/detection.cpp:57
#, fuzzy
msgid "Use bright palette mode"
@@ -2005,14 +2041,14 @@ msgstr "Fly til hјgre"
msgid "Fly to lower right"
msgstr "Fly til nedre hјgre"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, 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:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2020,7 +2056,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2028,7 +2064,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2036,7 +2072,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2047,7 +2083,7 @@ msgstr ""
"menyen og vel 'Maniac'-undermappa i 'Tentacle'-mappa."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "~Z~ipmodus aktivert"
@@ -2069,7 +2105,7 @@ msgstr ""
msgid "~M~ain Menu"
msgstr "ScummVM Hovudmeny"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "~V~anneffekt aktivert"
@@ -2091,6 +2127,15 @@ msgstr ""
msgid "Failed to delete file."
msgstr ""
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Rask modus"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
#, fuzzy
msgid "Failed to save game"
@@ -2185,12 +2230,12 @@ msgstr ""
msgid "Slide Right"
msgstr "Hјgre"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
#, fuzzy
msgid "Turn Left"
msgstr "Slх av"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
#, fuzzy
msgid "Turn Right"
msgstr "Peikar hјgre"
@@ -2358,6 +2403,47 @@ msgid ""
"Please report to the team."
msgstr ""
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Zoom opp"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL emulator"
@@ -2419,12 +2505,12 @@ msgstr "Apple II GS Emulator (IKKJE IMPLEMENTERT)"
msgid "C64 Audio Emulator"
msgstr "C64 Lydemulator"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
#, fuzzy
msgid "Initializing MT-32 Emulator"
msgstr "Initialiserar MT-32-emulator"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "MT-32 Emulator"
@@ -2609,13 +2695,13 @@ msgid "Normal (no scaling)"
msgstr "Normal (inga skalering)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
#, fuzzy
msgid "Enabled aspect ratio correction"
msgstr "Veksle aspekt-korrigering"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
#, fuzzy
msgid "Disabled aspect ratio correction"
msgstr "Veksle aspekt-korrigering"
@@ -2626,7 +2712,7 @@ msgid "Active graphics filter:"
msgstr "Veksle grafikkfiltre"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
#, fuzzy
msgid "Windowed mode"
msgstr "Teiknemodus:"
@@ -2652,11 +2738,11 @@ msgstr "Gjeldende videomodus:"
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr ""
@@ -3064,6 +3150,9 @@ msgstr ""
msgid "Clicking Disabled"
msgstr ""
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Aktiver Roland GS-modus"
+
#~ msgid "Hercules Green"
#~ msgstr "Hercules Grјnn"
diff --git a/po/pl_PL.po b/po/pl_PL.po
index 6e8699113a..706f298ec9 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -1,13 +1,13 @@
# Polish translation for ScummVM.
-# Copyright (C) 2010-2012 ScummVM Team
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
-# Grajpopolsku.pl <grajpopolsku@gmail.com>, 2011-2012.
+# Grajpopolsku.pl <grajpopolsku@gmail.com>, 2011-2013.
#
msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-07-29 15:49+0100\n"
"Last-Translator: MichaГ ZiБbkowski <mziab@o2.pl>\n"
"Language-Team: Grajpopolsku.pl <grajpopolsku@gmail.com>\n"
@@ -20,45 +20,55 @@ msgstr ""
"X-Poedit-Language: Polish\n"
"X-Poedit-Country: POLAND\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(skompilowany %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Wkompilowane funkcje:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Dostъpne silniki:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Schowaj / pokaП konsolъ"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "W gѓrъ"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "PrzejdМ do poprzedniego katalogu"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "W gѓrъ"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Anuluj"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Wybierz"
@@ -94,17 +104,18 @@ msgid "Map"
msgstr "Przypisz"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -175,8 +186,8 @@ msgid ""
"English"
msgstr "Jъzyk gry. Nie zmieni to hiszpaёskiej wersji gry w angielskБ."
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<domyЖlne>"
@@ -198,11 +209,11 @@ msgstr "Platforma:"
msgid "Engine"
msgstr "Silnik"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grafika"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "Grafika"
@@ -215,7 +226,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "UПyj wГasnych ustawieё grafiki"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "DМwiъk"
@@ -228,11 +239,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "UПyj wГasnych ustawieё dМwiъku"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "GГoЖnoЖц"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "GГoЖnoЖц"
@@ -246,7 +257,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "UПyj wГasnych ustawieё gГoЖnoЖci"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -259,7 +270,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "UПyj wГasnych ustawieё MIDI"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -272,11 +283,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "UПyj wГasnych ustawieё MT-32"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "ІcieПki"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "ІcieПki"
@@ -290,7 +301,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "ІcieПka gry:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Іc. dodatkѓw:"
@@ -298,42 +309,42 @@ msgstr "Іc. dodatkѓw:"
msgid "Specifies path to additional data used the game"
msgstr "OkreЖla ЖcieПkъ dodatkowych danych gry"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Іc. dodatkѓw:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "ІcieПka zapisѓw:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "OkreЖla gdzie zapisywaц stan gry"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "ІcieПka zapisѓw:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Brak"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "DomyЖlnie"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Wybierz SoundFont"
@@ -442,12 +453,14 @@ msgstr "Szukaj"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Wczytaj grъ:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Wczytaj"
@@ -531,133 +544,133 @@ msgstr "Przeskanowano %d katalogѓw ..."
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr "Wykryto %d nowych gier, zignorowano %d poprzednio dodanych..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Nigdy"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "co 5 min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "co 10 min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "co 15 min"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "co 30 min"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Brak"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Nie udaГo siъ zastosowaц czъЖci zmian opcji grafiki:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "nie udaГo siъ zmieniц trybu wideo."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "nie udaГo siъ zmieniц trybu peГnoekranowego"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "nie udaГo siъ zmieniц formatu obrazu"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Tryb grafiki:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Renderer:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Specjalne tryby ditheringu wspierane przez niektѓre gry"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "PeГny ekran"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Korekcja formatu obrazu"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Korekcja formatu obrazu dla gier 320x200"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Pref. urzБdzenie:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Urz. muzyczne:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr "OkreЖla preferowane urzБdzenie dМwiъkowe lub emulator karty dМwiъkowej"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "OkreЖla wyjЖciowe urzБdzenie dМwiъkowe lub emulator karty dМwiъkowej"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Pref. urzБdzenie:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Urz. muzyczne:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "Emulator AdLib:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib jest uПywany do muzyki w wielu grach"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Czъst. wyj.:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -665,63 +678,67 @@ msgstr ""
"WyПsze wartoЖci dajБ lepszБ jakoЖц dМwiъku, ale mogБ byц nieobsГugiwane "
"przez twojБ kartъ dМwiъkowБ"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "UrzБdzenie GM:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "OkreЖla domyЖlne urzБdzenie dМwiъkowe dla wyjЖcia General MIDI"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Nie uПywaj muzyki General MIDI"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "UПyj pierwszego dostъpnego urzБdzenia"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"SoundFont jest wspierany przez niektѓre karty dМwiъkowe, Fluidsynth i "
"Timidity"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Tryb miksowanego AdLib/MIDI"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "UПywaj obu generatorѓw dМwiъku, MIDI i AdLib, jednoczeЖnie"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "Wzm. MIDI:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "UrzБdzenie MT-32:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"OkreЖla domyЖlne urzБdzenie dМwiъku dla wyjЖcia Roland MT-32/LAPC1/CM32l/CM64"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Prawdziwy Roland MT-32 (wyГБcz emulacjъ GM)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -729,191 +746,192 @@ msgstr ""
"Zaznacz, jeЖli chcesz uПywaц swojej prawdziwej karty kompatybilnej z Roland "
"podГБczonej do twojego komputera"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Prawdziwy Roland MT-32 (brak emulacji GM)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "WГБcz tryb Roland GS"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Prawdziwy Roland MT-32 (wyГБcz emulacjъ GM)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"WyГБcza mapowanie General MIDI dla gier ze ЖcieПkБ dМwiъkowБ Roland MT-32"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Nie uПywaj muzyki Roland MT-32"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Tekst i mowa:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Mowa"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Napisy"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Oba"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Prъd. napisѓw:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Tekst i mowa:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Mowa"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Napisy"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Oba"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "WyЖwietlaj napisy i odtwarzaj mowъ"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Prъd. napisѓw:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "GГoЖnoЖц muzyki:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "GГoЖnoЖц muzyki:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Wycisz"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "GГ. efekt. dМw.:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "GГoЖnoЖц efektѓw dМw."
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "GГ. efekt. dМw.:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "GГoЖnoЖц mowy:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "GГoЖnoЖц mowy:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "ІcieПka stylu:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "ІcieПka stylu:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "OkreЖla ЖcieПkъ dla dodatkowych danych dla wszystkich gier lub ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "ІcieПka wtyczek:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "ІcieПka wtyczek:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "RѓПne"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "RѓПne"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Styl:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "Renderer interf.:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Autozapis:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autozapis:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Klawisze"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Jъzyk interfejsu:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Jъzyk interfejsu ScummVM"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
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:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Wybierz katalog zapisѓw"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Ten katalog jest zabezpieczony przed zapisem. Wybierz inny."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Wybierz katalog dla stylѓw GUI."
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Wybierz katalog dla dodatkowych plikѓw"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Wybierz katalog dla wtyczek"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1169,13 +1187,16 @@ msgid "~R~eturn to Launcher"
msgstr "~P~owrѓt do launchera"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Zapis:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1204,12 +1225,12 @@ msgstr ""
"dowiedzieц jak szukaц dalszej pomocy, sprawdМ plik README."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr ""
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~A~nuluj"
@@ -1217,23 +1238,23 @@ msgstr "~A~nuluj"
msgid "~K~eys"
msgstr "~K~lawisze"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Nie udaГo siъ zainicjalizowaц formatu kolorѓw."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Nie udaГo siъ przeГБczyц w tryb wideo: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Nie udaГo siъ zastosowaц ustawienia formatu obrazu."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Nie udaГo siъ zastosowaц ustawienia peГnego ekranu."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1245,7 +1266,7 @@ msgstr ""
"znane problemѓw. StБd zalecane jest skopiowanie plikѓw gry na twardy dysk.\n"
"Dalsze informacje sБ dostъpne w pliku README."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1257,7 +1278,7 @@ msgstr ""
"skopiowaц na dysk za pomocБ odpowiedniego rippera CD audio.\n"
"Dalsze informacje sБ dostъpne w pliku README."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1266,7 +1287,7 @@ msgstr ""
"Odczyt stanu gry nie powiѓdГ siъ (%s)! Aby uzyskaц podstawowe informacje "
"oraz dowiedzieц jak szukaц dalszej pomocy, sprawdМ plik README."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1276,28 +1297,51 @@ msgstr ""
"ScummVM. W zwiБzku z tym moПe byц ona niestabilna, a wszelkie zapisy, "
"ktѓrych dokonasz, mogБ byц nieobsГugiwane w przyszГych wersjach ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "WГБcz mimo tego"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "UПyj oryginalnych ekranѓw odczytu/zapisu"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "UПyj oryginalnych ekranѓw odczytu/zapisu zamiast tych ze ScummVM"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Wznѓw grъ:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Wznѓw"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 znalazГ stare zapisy z Broken Sword 1, ktѓre naleПy "
+"przekonwertowaц.\n"
+"Stary format zapisu nie jest juП obsГugiwany. Nie bъdziesz mѓgГ wczytaц "
+"zapisѓw, jeЖli ich nie przekonwertujesz.\n"
+"\n"
+"NaciЖnij OK, Пeby je teraz przekonwertowaц. W przeciwnym wypadku zostaniesz "
+"zapytany ponownie przy nastъpnym wГБczeniu gry.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "UПyj trybu jasnej palety"
@@ -2009,7 +2053,7 @@ msgstr "Leц w prawo"
msgid "Fly to lower right"
msgstr "Leц w dѓГ, w prawo"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2018,7 +2062,7 @@ msgstr ""
"Natywne wsparcie MIDI wymaga aktualizacji Rolanda od LucasArts,\n"
"ale brakuje %s. PrzeГБczam na tryb AdLib."
-#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2029,7 +2073,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2040,7 +2084,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2051,7 +2095,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2062,7 +2106,7 @@ msgstr ""
"ScummVM i wybierz podkatalog \"Maniac\" z katalogu gry Tentacle."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "~T~ryb turbo aktywny"
@@ -2083,7 +2127,7 @@ msgstr "~P~okaП mapъ"
msgid "~M~ain Menu"
msgstr "~M~enu gГѓwne"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "~E~fekty wody wГБczone"
@@ -2105,6 +2149,15 @@ msgstr "Nie udaГo siъ zapisaц stanu gry do pliku."
msgid "Failed to delete file."
msgstr "Nie udaГo siъ usunБц pliku."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Tryb szybki"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Nie udaГo siъ zapisaц stanu gry"
@@ -2195,11 +2248,11 @@ msgstr "Іlizg w lewo"
msgid "Slide Right"
msgstr "Іlizg w prawo"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Obrѓt w lewo"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Obrѓt w prawo"
@@ -2397,6 +2450,47 @@ msgstr ""
"\n"
"Prosimy o zgГoszenie tego zespoГowi."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "PrzybliП"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Emulator OPL MAME"
@@ -2466,11 +2560,11 @@ msgstr "Emulator Apple II GS (NIE ZAIMPLEMENTOWANY)"
msgid "C64 Audio Emulator"
msgstr "Emulator dМwiъku C64"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Inicjalizacja emulatora MT-32"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "Emulator MT-32"
@@ -2652,12 +2746,12 @@ msgid "Normal (no scaling)"
msgstr "ZwykГy (bez skalowania)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "WГБczono korekcjъ formatu obrazu"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "WyГБczono korekcjъ formatu obrazu"
@@ -2666,7 +2760,7 @@ msgid "Active graphics filter:"
msgstr "Aktywny filtr graficzny:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Okno"
@@ -2690,11 +2784,11 @@ msgstr "Obecny tryb wideo"
msgid "Current scale"
msgstr "Aktualne powiъkszenie"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Aktywny tryb filtru: dwuliniowy"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Aktywny tryb filtru: najbliПszy sБsiad"
@@ -3091,6 +3185,9 @@ msgstr "Klikanie wГБczone"
msgid "Clicking Disabled"
msgstr "Klikanie wyГБczone"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "WГБcz tryb Roland GS"
+
#~ msgid "Hercules Green"
#~ msgstr "Zielony Hercules"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 0d80b9d8c9..77263dc02c 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -1,5 +1,5 @@
# Portuguese (Brazilian) translation for ScummVM.
-# Copyright (C) 2010-2012 ScummVM Team
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Saulo Benigno <saulobenigno@gmail.com>, 2010.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2011-10-21 21:30-0300\n"
"Last-Translator: Saulo Benigno <saulobenigno@gmail.com>\n"
"Language-Team: ScummBR (www.scummbr.com) <scummbr@yahoo.com.br>\n"
@@ -20,45 +20,55 @@ msgstr ""
"X-Poedit-Country: BRAZIL\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(desenvolvido em %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Funчѕes compiladas em:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Programas disponэveis:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Mostrar / Ocultar console"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Acima"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Ir para o diretѓrio anterior"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Acima"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Cancelar"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Escolher"
@@ -95,17 +105,18 @@ msgid "Map"
msgstr "Mapear"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -176,8 +187,8 @@ msgid ""
"English"
msgstr "Idioma do jogo. Isto nуo irс passar seu jogo Inglъs para Portuguъs"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<padrуo>"
@@ -200,11 +211,11 @@ msgstr "Sistema:"
msgid "Engine"
msgstr "Examinar"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grсficos"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "GFX"
@@ -217,7 +228,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Sobrepor configuraчуo global de grсficos"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Сudio"
@@ -230,11 +241,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Sobrepor configuraчуo global de сudio"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Volume"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Volume"
@@ -248,7 +259,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Sobrepor configuraчуo global de volume"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -261,7 +272,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Sobrepor configuraчуo global de MIDI"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -274,11 +285,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Sobrepor configuraчуo global de MT-32"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Pastas"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Pastas"
@@ -292,7 +303,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Pasta do Jogo:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Pasta de Extras"
@@ -300,42 +311,42 @@ msgstr "Pasta de Extras"
msgid "Specifies path to additional data used the game"
msgstr "Especifique a pasta para dados utilizados no jogo"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Pasta de Extras"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Pasta para Salvar"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Especifique onde guardar seus jogos salvos"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Pasta para Salvar"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Nenhum(a)"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Padrуo"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Selecione o SoundFont"
@@ -445,12 +456,14 @@ msgstr "Pesquisar:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Carregar jogo:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Carregar"
@@ -541,133 +554,133 @@ msgstr ""
"Encontrado(s) %d novo(s) jogo(s, ignorados %d previamente adicionados "
"jogos..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Nunca"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "a cada 5 mins"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "a cada 10 mins"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "a cada 15 mins"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "a cada 30 mins"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Nenhum(a)"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Falha ao aplicar algumas mudanчas nas opчѕes de grсfico:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "o modo de vэdeo nуo pєde ser alterado."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "a configuraчуo de tela cheia nуo pєde ser mudada"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "a configuraчуo de proporчуo nуo pєde ser mudada"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Modo grсfico:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Renderizaчуo"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Modos especiais de dithering suportados por alguns jogos"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Modo Tela Cheia"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Correчуo de proporчуo"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Correчуo de proporчуo para jogos 320x200"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Dispositivo pref.:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Disp. de mњsica:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Especifica o dispositivo de som preferido ou emulador de placa de som"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Especifica o dispositivo de saэda de som ou emulador de placa de som"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Dispositivo pref.:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Dispositivo de mњsica:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "Emulador AdLib:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib щ utilizado para mњsica em vсrios jogos"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Taxa de saэda:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -675,62 +688,66 @@ msgstr ""
"Maior valor especifica melhor qualidade de som, mas pode nуo ser suportado "
"por sua placa de som"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "Dispositivo GM:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Especifique o dispositivo de som padrуo para a saэda General MIDI"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Nуo usar mњsica General MIDI"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Usar o primeiro dispositivo disponэvel"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
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:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Mixar AdLib/MIDI"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Usar MIDI e AdLib juntos na geraчуo de som"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "Ganho MIDI:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "Dispositivo MT-32:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Especifique o dispositivo de som padrуo para a saэda Roland MT-32/LAPC1/"
"CM32l/CM64"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Roland MT-32 real (desligar emulaчуo GM)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -738,193 +755,194 @@ msgstr ""
"Verifique se vocъ quer usar o seu dispositivo de hardware de som compatэvel "
"com Roland"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 real (sem emulaчуo GM)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Ligar modo Roland GS"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Roland MT-32 real (desligar emulaчуo GM)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Desliga o mapeamento General MIDI para jogos com trilha sonora Roland MT-32"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Nуo usar mњsica Roland MT-32"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Texto e Voz:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Voz"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Legendas"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Ambos"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Rapidez legendas:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Texto e Voz:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Voz"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Legs"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Ambos"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Mostrar legenda e vozes (dublagem)"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Velocidade das legendas:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Volume da Mњsica:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Volume da Mњsica:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Mudo"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Volume dos Sons:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Volume dos efeitos sonoros especiais"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Volume dos Sons:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Volume da Voz:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Volume da Voz:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Pasta do Tema"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Pasta do Tema"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Especifica a pasta para os dados adicionais usados por todos os jogos ou "
"ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Pasta de Plugins:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Pasta de Plugins:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Outros"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Outros"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "Renderizador GUI:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Auto-Salvar:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Auto-Salvar:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Teclas"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Idioma do GUI:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Linguagem do ScummVM GUI"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Vocъ tem que reiniciar o ScummVM para funcionar."
-#: gui/options.cpp:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Selecione a pasta para o jogos salvos"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
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."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Selecione a pasta para os temas da Interface de Uso Grсfico"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Selecione a pasta para os arquivos extras"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Selecione a pasta para os plugins"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1183,13 +1201,16 @@ msgid "~R~eturn to Launcher"
msgstr "~V~oltar ao menu"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Salvar jogo:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1219,12 +1240,12 @@ msgstr ""
"instruчѕes sobre como obter assistъncia adicional."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "~C~ancelar"
@@ -1232,23 +1253,23 @@ msgstr "~C~ancelar"
msgid "~K~eys"
msgstr "~T~eclas"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Nуo foi possэvel inicializar o formato de cor."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Nуo foi possэvel alternar o modo de vэdeo atual:"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Nуo foi possэvel aplicar a correчуo de proporчуo"
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Nуo foi possэvel aplicar a configuraчуo de tela cheia."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1262,7 +1283,7 @@ msgstr ""
"os arquivos de dados para o disco rэgido.\n"
"Consulte o arquivo README para mais detalhes."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1276,7 +1297,7 @@ msgstr ""
"para ouvir a mњsica do jogo.\n"
"Consulte o arquivo README para mais detalhes."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, fuzzy, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1286,7 +1307,7 @@ msgstr ""
"Por favor, consulte o README para obter informaчѕes bсsicas, e para obter "
"instruчѕes sobre como obter assistъncia adicional."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1296,28 +1317,51 @@ msgstr ""
"suportado pelo ScummVM. Como tal, щ provсvel que seja instсvel, e qualquer "
"jogo salvo que vocъ fizer pode nуo funcionar em futuras versѕes do ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Iniciar de qualquer maneira"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr ""
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Restaurar jogo:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Restaurar"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 encontrou que vocъ tem jogos salvos velhos do Broken Sword 1 que "
+"devem ser convertidos.\n"
+"O formato antigo do jogo salvo nуo щ mais suportado, entуo vocъ nуo serс "
+"capaz de carregar os seus jogos se vocъ nуo convertъ-los.\n"
+"\n"
+"Pressione OK para convertъ-los agora, caso contrсrio vocъ serс solicitado "
+"novamente na prѓxima vez que vocъ iniciar o jogo.\n"
+
#: engines/dreamweb/detection.cpp:57
#, fuzzy
msgid "Use bright palette mode"
@@ -2030,7 +2074,7 @@ msgstr "Voar para direita"
msgid "Fly to lower right"
msgstr "Voar para direita inferior"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2040,7 +2084,7 @@ msgstr ""
"LucasArts,\n"
"mas %s estс faltando. Utilizando AdLib ao invщs."
-#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2051,7 +2095,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2062,7 +2106,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2073,7 +2117,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2085,7 +2129,7 @@ msgstr ""
"dentro da pasta do jogo Day of the Tentacle."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "Modo ~Z~ip ativado"
@@ -2106,7 +2150,7 @@ msgstr "~E~xibir Mapa"
msgid "~M~ain Menu"
msgstr "~M~enu Principal ScummVM"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "Modo ~E~feitos de сgua ativado"
@@ -2134,6 +2178,15 @@ msgstr ""
msgid "Failed to delete file."
msgstr "Falha ao excluir arquivo."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Modo rсpido"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Falha ao salvar o jogo"
@@ -2227,12 +2280,12 @@ msgstr ""
msgid "Slide Right"
msgstr "Direita"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
#, fuzzy
msgid "Turn Left"
msgstr "Desligar"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
#, fuzzy
msgid "Turn Right"
msgstr "Cursor para a direita"
@@ -2435,6 +2488,47 @@ msgstr ""
"\n"
"Por favor, reporte para a equipe."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Zoom para cima"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Emulador MAME OPL"
@@ -2504,11 +2598,11 @@ msgstr "Emulador Apple II GS (NУO IMPLEMENTADO)"
msgid "C64 Audio Emulator"
msgstr "Emulador Som C64"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Inicializando Emulador MT-32"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "Emulador MT-32"
@@ -2692,12 +2786,12 @@ msgid "Normal (no scaling)"
msgstr "Normal (sem escala)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Correчуo de proporчуo habilitada"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Correчуo de proporчуo desabilitada"
@@ -2706,7 +2800,7 @@ msgid "Active graphics filter:"
msgstr "Ativa os filtros grсficos"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Modo janela"
@@ -2730,11 +2824,11 @@ msgstr "Modo de vэdeo atual"
msgid "Current scale"
msgstr "Escala atual"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Filtro de imagem ativo: Linear"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Filtro de imagem ativo: Nearest"
@@ -3134,6 +3228,9 @@ msgstr "Clicando Habilitado"
msgid "Clicking Disabled"
msgstr "Clicando Desabilitado"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Ligar modo Roland GS"
+
#~ msgid "Hercules Green"
#~ msgstr "Hercules Green"
diff --git a/po/ru_RU.po b/po/ru_RU.po
index fb078b74d1..be476667d5 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -1,5 +1,5 @@
# Russian translation for ScummVM.
-# Copyright (C) 2010-2012 ScummVM Team
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Eugene Sandulenko <sev@scummvm.org>, 2010.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-07-08 22:00+0200+0200\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Russian\n"
@@ -18,45 +18,55 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n"
"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(собран %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Включенные в билд опции:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Доступные движки:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Показать / Убрать консоль"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Вверх"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Перейти на директорию уровнем выше"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Вверх"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Отмена"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Выбрать"
@@ -92,17 +102,18 @@ msgid "Map"
msgstr "Назначить"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -174,8 +185,8 @@ msgid ""
msgstr ""
"Язык игры. Изменение этой настройки не превратит игру на английском в русскую"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<по умолчанию>"
@@ -197,11 +208,11 @@ msgstr "Платформа:"
msgid "Engine"
msgstr "Движок"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Графика"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "Грф"
@@ -214,7 +225,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Перекрыть глобальные установки графики"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Аудио"
@@ -227,11 +238,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Перекрыть глобальные установки аудио"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Громкость"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Громк"
@@ -245,7 +256,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Перекрыть глобальные установки громкости"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -258,7 +269,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Перекрыть глобальные установки MIDI"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -271,11 +282,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Перекрыть глобальные установки MT-32"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Пути"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Пути"
@@ -289,7 +300,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Где игра:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Доп. путь:"
@@ -297,42 +308,42 @@ msgstr "Доп. путь:"
msgid "Specifies path to additional data used the game"
msgstr "Указывает путь к дополнительным файлам данных для игры"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Доп. путь:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Сохранения игр:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Указывает путь к сохранениям игры"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Путь сохр:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Не задан"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "По умолчанию"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Выберите SoundFont"
@@ -441,12 +452,14 @@ msgstr "Поиск:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Загрузить игру:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Загрузить"
@@ -531,134 +544,134 @@ msgstr "Просмотрено %d директорий ..."
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr "Найдено %d новых игр, пропущено %d ранее добавленных игр ..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Никогда"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "каждые 5 минут"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "каждые 10 минут"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "каждые 15 минут"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "каждые 30 минут"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 кГц"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11 кГц"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 кГц"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 кГц"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 кГц"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Не задан"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Не удалось применить изменения некторых графических настроек:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "видеорежим не может быть изменён."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "полноэкранный режим не может быть изменён"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "режим корректировки соотношения сторон не может быть изменён"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Граф. режим:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Режим растра:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Специальные режимы рендеринга, поддерживаемые некоторыми играми"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Полноэкранный режим"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Коррекция соотношения сторон"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Корректировать соотношение сторон для игр с разрешением 320x200"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Предпочитаемое:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Звуковое уст-во:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
"Указывает предпочитаемое звуковое устройство или эмулятор звуковой карты"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Указывает выходное звуковое устройство или эмулятор звуковой карты"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Предпочитаемое:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Звуковое уст-во:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "Эмулятор AdLib:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "Звуковая карта AdLib используется многими играми"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Частота звука:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -666,63 +679,67 @@ msgstr ""
"БОльшие значения задают лучшее качество звука, однако они могут не "
"поддерживаться вашей звуковой картой"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "Устройство GM:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Указывает выходное звуковое устройство для MIDI"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Не использовать музыку для General MIDI"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Использовать первое доступное устройство"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"SoundFontы поддерживаются некоторыми звуковыми картами, Fluidsynth и Timidity"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Смешанный режим AdLib/MIDI"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Использовать и MIDI и AdLib для генерации звука"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "Усиление MIDI:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "Устр. MT-32:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Указывает звуковое устройство по умолчанию для вывода на Roland MT-32/LAPC1/"
"CM32l/CM64"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Настоящий Roland MT-32 (запретить эмуляцию GM)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -730,194 +747,195 @@ msgstr ""
"Отметьте, если у вас подключено Roland-совместимое звуковое устройство и вы "
"хотите его использовать"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Настоящий Roland MT-32 (запретить GM)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Включить режим Roland GS"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Настоящий Roland MT-32 (запретить эмуляцию GM)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Выключает сопоставление General MIDI для игр с звуковой дорожкой для Roland "
"MT-32"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Не использовать музыку для MT-32"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Текст и озвучка:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Озвучка"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Субтитры"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Оба"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Скорость титров:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Текст и озвучка:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Озв"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Суб"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Оба"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Показывать субтитры и воспроизводить речь"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Скорость титров:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Громк. музыки:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Громк. музыки:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Выкл. всё"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Громкость SFX:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Громкость специальных звуковых эффектов"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Громк. SFX:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Громк. озвучки:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Громк. озвучки:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Путь к темам:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Где темы:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Указывает путь к дополнительным файлам данных, используемых всеми играми, "
"либо ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Путь к плагинам:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Путь к плагинам:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Разное"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Разное"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Тема:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "Рисовалка GUI:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Автосохранение:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Автосохр.:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Клавиши"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Язык GUI:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Язык графического интерфейса ScummVM"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Вы должны перезапустить ScummVM чтобы применить изменения."
-#: gui/options.cpp:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Выберите директорию для сохранений"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Не могу писать в выбранную директорию. Пожалуйста, укажите другую."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Выберите директорию для тем GUI"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Выберите директорию с дополнительными файлами"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Выберите директорию с плагинами"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1171,13 +1189,16 @@ msgid "~R~eturn to Launcher"
msgstr "~В~ главное меню"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Сохранить игру:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1207,12 +1228,12 @@ msgstr ""
"помощь."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "О~т~мена"
@@ -1220,23 +1241,23 @@ msgstr "О~т~мена"
msgid "~K~eys"
msgstr "~К~лавиши"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Не могу инициализировать формат цвета."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Не удалось переключить видеорежим: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Не удалось использовать коррекцию соотношения сторон."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Не могу применить полноэкранный режим."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1250,7 +1271,7 @@ msgstr ""
"на жёсткий диск. Подробности можно найти в\n"
"файле README."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1265,7 +1286,7 @@ msgstr ""
"появится музыка. Подробности можно найти в\n"
"файле README."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1275,7 +1296,7 @@ msgstr ""
"README за базовой информацией, а также инструкциями о том, как получить "
"дальнейшую помощь."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1285,30 +1306,52 @@ msgstr ""
"ScummVM полностью. Она скорее всего не будет работать стабильно, и "
"сохранения игр могут не работать в будущих версиях ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Всё равно запустить"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Использовать оригинальные экраны записи/чтения игры"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Использовать оригинальные экраны записи и сохранения игры вместо сделанных в "
"ScummVM"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Восстановить игру:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Восстановить"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 обнаружил у вас сохранения игры Сломанный Меч в старом формате.\n"
+"Старый формат больше не поддерживается, и чтобы загрузить сохранения, они "
+"должны быть переведены в новый формат.\n"
+"\n"
+"Нажмите ОК, чтобы перевести их в новый формат сейчас, в противном случае это "
+"сообщение появится снова при следующем запуске игры.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Использовать режим яркой палитры"
@@ -2024,7 +2067,7 @@ msgstr "Лететь вправо"
msgid "Fly to lower right"
msgstr "Лететь вправо-вниз"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2033,7 +2076,7 @@ msgstr ""
"Режим \"родного\" MIDI требует обновление Roland Upgrade от\n"
"LucasArts, но не хватает %s. Переключаюсь на AdLib."
-#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2044,7 +2087,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2055,7 +2098,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2066,7 +2109,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2077,7 +2120,7 @@ msgstr ""
"выберите директорию Maniac внутри директории с игрой Tentacle."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "Режим быстрого перехода активирован"
@@ -2098,7 +2141,7 @@ msgstr "Показать карту"
msgid "~M~ain Menu"
msgstr "Главное меню"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "Эффекты воды включены"
@@ -2120,6 +2163,15 @@ msgstr "Не удалось сохранить игру в файл."
msgid "Failed to delete file."
msgstr "Не удалось удалить файл."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Быстрый режим"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Не удалось сохранить игру"
@@ -2210,11 +2262,11 @@ msgstr "Скользить влево"
msgid "Slide Right"
msgstr "Скользить вправо"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Поворот налево"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Поворот направо"
@@ -2412,6 +2464,47 @@ msgstr ""
"\n"
"Пожалуйста, сообщите об этом команде ScummVM."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Увел. масштаб"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Эмулятор MAME OPL"
@@ -2481,11 +2574,11 @@ msgstr "Эмулятор Apple II GS (отсутствует)"
msgid "C64 Audio Emulator"
msgstr "Эмулятор звука C64"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Настраиваю эмулятор MT-32"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "Эмулятор MT-32"
@@ -2667,12 +2760,12 @@ msgid "Normal (no scaling)"
msgstr "Без увеличения"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Коррекция соотношения сторон включена"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Коррекция соотношения сторон выключена"
@@ -2681,7 +2774,7 @@ msgid "Active graphics filter:"
msgstr "Активный графический фильтр:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Оконный режим"
@@ -2705,11 +2798,11 @@ msgstr "Текущий видеорежим"
msgid "Current scale"
msgstr "Текущий масштаб"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Активный режим фильтра: Линейный"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Активный режим фильтра: Ближайший"
@@ -3106,6 +3199,9 @@ msgstr "Щелчки включены"
msgid "Clicking Disabled"
msgstr "Щелчки выключены"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Включить режим Roland GS"
+
#~ msgid "Hercules Green"
#~ msgstr "Hercules Зелёный"
diff --git a/po/scummvm.pot b/po/scummvm.pot
index fb56e89dce..a8d35e9382 100644
--- a/po/scummvm.pot
+++ b/po/scummvm.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,45 +17,54 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr ""
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr ""
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr ""
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+msgid "Show hidden files"
+msgstr ""
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr ""
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr ""
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr ""
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr ""
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr ""
@@ -91,17 +100,18 @@ msgid "Map"
msgstr ""
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr ""
@@ -170,8 +180,8 @@ msgid ""
"English"
msgstr ""
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr ""
@@ -193,11 +203,11 @@ msgstr ""
msgid "Engine"
msgstr ""
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr ""
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr ""
@@ -210,7 +220,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr ""
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr ""
@@ -223,11 +233,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr ""
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr ""
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr ""
@@ -241,7 +251,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr ""
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr ""
@@ -254,7 +264,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr ""
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr ""
@@ -267,11 +277,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr ""
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr ""
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr ""
@@ -285,7 +295,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr ""
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr ""
@@ -293,42 +303,42 @@ msgstr ""
msgid "Specifies path to additional data used the game"
msgstr ""
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr ""
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr ""
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr ""
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr ""
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr ""
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr ""
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr ""
@@ -437,12 +447,14 @@ msgstr ""
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr ""
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr ""
@@ -525,381 +537,385 @@ msgstr ""
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr ""
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr ""
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr ""
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr ""
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr ""
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr ""
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr ""
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr ""
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr ""
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr ""
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr ""
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr ""
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr ""
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr ""
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr ""
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr ""
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr ""
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr ""
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr ""
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr ""
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr ""
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr ""
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr ""
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr ""
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr ""
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr ""
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr ""
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr ""
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr ""
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr ""
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
msgstr ""
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr ""
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr ""
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr ""
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr ""
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr ""
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr ""
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr ""
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr ""
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr ""
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr ""
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr ""
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
msgstr ""
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr ""
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
+#: gui/options.cpp:890
+msgid "Roland GS Mode (disable GM mapping)"
msgstr ""
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr ""
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr ""
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr ""
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr ""
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr ""
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr ""
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr ""
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr ""
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr ""
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr ""
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr ""
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr ""
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr ""
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr ""
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr ""
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr ""
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr ""
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr ""
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr ""
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr ""
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr ""
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr ""
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr ""
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr ""
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr ""
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr ""
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr ""
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr ""
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr ""
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr ""
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr ""
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr ""
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr ""
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
msgid "You have to restart ScummVM before your changes will take effect."
msgstr ""
-#: gui/options.cpp:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr ""
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr ""
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr ""
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr ""
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1150,13 +1166,16 @@ msgid "~R~eturn to Launcher"
msgstr ""
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr ""
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1180,12 +1199,12 @@ msgid ""
msgstr ""
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr ""
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr ""
@@ -1193,23 +1212,23 @@ msgstr ""
msgid "~K~eys"
msgstr ""
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr ""
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr ""
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr ""
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr ""
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1218,7 +1237,7 @@ msgid ""
"See the README file for details."
msgstr ""
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1227,42 +1246,57 @@ msgid ""
"See the README file for details."
msgstr ""
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
"and for instructions on how to obtain further assistance."
msgstr ""
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 ""
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr ""
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr ""
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr ""
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr ""
+#: engines/drascula/saveload.cpp:49
+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 ""
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr ""
@@ -1970,14 +2004,14 @@ msgstr ""
msgid "Fly to lower right"
msgstr ""
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, 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:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1985,7 +2019,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1993,7 +2027,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2001,7 +2035,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2009,7 +2043,7 @@ msgid ""
msgstr ""
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr ""
@@ -2030,7 +2064,7 @@ msgstr ""
msgid "~M~ain Menu"
msgstr ""
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr ""
@@ -2052,6 +2086,14 @@ msgstr ""
msgid "Failed to delete file."
msgstr ""
+#: engines/groovie/detection.cpp:312
+msgid "Fast movie speed"
+msgstr ""
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr ""
@@ -2142,11 +2184,11 @@ msgstr ""
msgid "Slide Right"
msgstr ""
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr ""
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr ""
@@ -2308,6 +2350,46 @@ msgid ""
"Please report to the team."
msgstr ""
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+msgid "Down/Zoom Out"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr ""
@@ -2369,11 +2451,11 @@ msgstr ""
msgid "C64 Audio Emulator"
msgstr ""
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr ""
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr ""
@@ -2555,12 +2637,12 @@ msgid "Normal (no scaling)"
msgstr ""
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr ""
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr ""
@@ -2569,7 +2651,7 @@ msgid "Active graphics filter:"
msgstr ""
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr ""
@@ -2593,11 +2675,11 @@ msgstr ""
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr ""
diff --git a/po/se_SE.po b/po/se_SE.po
index 7dbcd432f6..dae9415dcf 100644
--- a/po/se_SE.po
+++ b/po/se_SE.po
@@ -1,5 +1,5 @@
# Swedish translation for ScummVM.
-# Copyright (C) 2011-2012 ScummVM Team
+# Copyright (C) 2011-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Hampus Flink <hampus.flink@gmail.com>, 2011.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-07-08 18:03+0100\n"
"Last-Translator: Hampus Flink <hampus.flink@gmail.com>\n"
"Language-Team: \n"
@@ -20,45 +20,55 @@ msgstr ""
"X-Poedit-Country: SWEDEN\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(byggt %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Funktioner kompilerade i:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Tillgфngliga motorer"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Visa / gіm konsol"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Uppхt"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Gх till fіregхende katalognivх"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Uppхt"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Avbryt"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Vфlj"
@@ -94,17 +104,18 @@ msgid "Map"
msgstr "Stфll in"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -177,8 +188,8 @@ msgstr ""
"Spelets sprхk. Den hфr instфllningen omvandlar inte din spanska spelversion "
"till en engelsk"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<standard>"
@@ -200,11 +211,11 @@ msgstr "Plattform:"
msgid "Engine"
msgstr "Motor"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Grafik"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "GFX"
@@ -217,7 +228,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "жverskrid globala grafikinstфllningar"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Ljud"
@@ -230,11 +241,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "жverskrid globala ljudinstфllningar"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Volym"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Volym"
@@ -248,7 +259,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "жverskrid globala volyminstфllningar"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -261,7 +272,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "жverskrid globala MIDI-instфllningar"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -274,11 +285,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "жverskrid globala MT-32 instфllningar"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Sіkvфgar"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Sіkvфgar"
@@ -292,7 +303,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Sіkv. spel:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Sіkv. extra:"
@@ -300,42 +311,42 @@ msgstr "Sіkv. extra:"
msgid "Specifies path to additional data used the game"
msgstr "Bestфmmer sіkvфgen till ytterligare data som spelet anvфnder"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Sіkv. extra:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Sіkv. sparat:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Bestфmmer var dina spardata lagras"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Sіkv. sparat:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Ingen"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "Standard"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Vфlj SoundFont"
@@ -444,12 +455,14 @@ msgstr "Sіk:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Ladda spel:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Ladda"
@@ -535,133 +548,133 @@ msgstr "Kataloger scannade: %d ..."
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr "Upptфckte %d nya spel, ignorerade %d tidigare tillagda spel ..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Aldrig"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "var 5:e minut"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "var 10:e minut"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "var 15:e minut"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "var 30:e minut"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 kHz"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Ingen"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Kunde inte verkstфlla nхgra av grafikinstфllningarna:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "videolфget kunde inte фndras."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "fullskфrmsinstфllningen kunde inte фndras."
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "instфllningen fіr bildfіrhхllandet kunde inte фndras."
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Grafiklфge:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Renderingslфge:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Speciella gitterlфgen stіdda av vissa spel"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Fullskфrmslфge"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Korrektion av bildfіrhхllande"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Korrigerar bildfіrhхllanden fіr 320x200-spel"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Fіredragen enhet:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Musikenhet:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Bestфmmer din fіredragna emulator fіr ljudenhet eller ljudkort"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Bestфmmer emulator fіr ljudenhet eller ljudkort"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Fіredr. enhet:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Musikenhet:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "AdLib-emulator:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "AdLib anvфnds fіr musik i mхnga spel"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Ljudfrekvens:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -669,61 +682,65 @@ msgstr ""
"Ett hіgre vфrde betecknar bфttre ljudkvalitet men stіds kanske inte av ditt "
"ljudkort"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "GM-enhet:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Bestфmmer standardenheten fіr General MIDI-uppspelning"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Anvфnd inte General MIDI-musik"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Anvфnd fіrsta tillgфngliga enhet"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
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:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Blandat AdLib/MIDI-lфge"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Anvфnd bхde MIDI och AdLib fіr ljudgeneration"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "MIDI gain:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "MT-32 enhet:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Bestфmmer standardenheten fіr Roland MT-32/LAPC1/CM32I/CM64-uppspelning"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Фkta Roland MT-32 (inaktivera GM-emulation)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -731,193 +748,194 @@ msgstr ""
"Aktivera om du vill anvфnda din verkliga Roland-kompatibla och dator-"
"anslutna ljudenhet"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Фkta Roland MT-32 (ingen GM-emulation)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Aktivera Roland GS-lфge"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Фkta Roland MT-32 (inaktivera GM-emulation)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Stфnger av General MIDI-kartlфggning fіr spel med Roland MT-32 soundtrack"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Anvфnd inte Roland MT-32 musik"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Undertext och tal:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Tal"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Undertexter"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Bхda"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Texthastighet:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Text och tal:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Tal"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Text"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Bхda"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Visa undertexter och spela upp tal"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Texthastighet:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Musikvolym:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musikvolym:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Ljud av"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "SFX-volym:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Volym fіr specialeffekter"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "SFX-volym:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Talvolym:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Talvolym:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Sіkv. tema:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Sіkv. tema:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Bestфmmer sіkvфg till andra data som anvфnds av alla spel eller ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Sіkv. tillфgg:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Sіkv. tillфgg:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Diverse"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Diverse"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "GUI-rendering:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Autospara:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autospara:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Tangenter"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "GUI-sprхk:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Sprхk fіr ScummVM:s anvфndargrфnssnitt"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
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:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Vфlj katalog fіr spardata"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
"Det gхr inte att skriva till den valda katalogen. Var god vфlj en annan."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Vфlj katalog fіr GUI-teman"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Vфlj katalog fіr extra filer"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Vфlj katalog fіr tillфgg"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1174,13 +1192,16 @@ msgid "~R~eturn to Launcher"
msgstr "Хte~r~vфnd till launcher"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Spara spelet:"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1207,12 +1228,12 @@ msgid ""
msgstr "Spar"
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "A~v~bryt"
@@ -1220,23 +1241,23 @@ msgstr "A~v~bryt"
msgid "~K~eys"
msgstr "~T~angenter"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Kunde inte initialisera fфrgformat."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Kunde inte byta till videolфget: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Kunde inte фndra instфllningen fіr bildfіrhхllanden."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Kunde inte applicera fullskфrmsinstфllning."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1250,7 +1271,7 @@ msgstr ""
"datafilerna till din hхrddisk istфllet.\n"
"Se README-filen fіr detaljer."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1264,7 +1285,7 @@ msgstr ""
"fіr att kunna lyssna pх spelets musik.\n"
"Se README-filen fіr detaljer."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1273,7 +1294,7 @@ msgstr ""
"Kunde inte ladda spardata (%s)! Hфnvisa till README-filen fіr grundlфggande "
"information och instruktioner fіr ytterligare assistans."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1283,28 +1304,51 @@ msgstr ""
"ScummVM. Dфrfіr фr det troligtvis instabilt och om du skapar spardata kan de "
"mіjligtvis vara inkompatibla med framtida versioner av ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Starta фndх"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Anvфnd originalskфrmar fіr spara/ladda"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
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"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Хterstфll spel:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Хterstфll"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 upptфckte att du har gamla spardata fіr Broken Sword 1 som borde "
+"konverteras.\n"
+"Det gamla spardataformatet stіds inte lфngre, sх du kommer inte kunna ladda "
+"dina data om du inte konverterar dem.\n"
+"\n"
+"Tryck \"OK\" fіr att konvertera dem nu, annars kommer du tillfrхgas igen "
+"nфsta gхng du startar spelet.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Anvфnd ljus palett-lфge"
@@ -2016,7 +2060,7 @@ msgstr "Flyg хt hіger"
msgid "Fly to lower right"
msgstr "Flyg хt nedre hіger"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2025,7 +2069,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:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2036,7 +2080,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2047,7 +2091,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2058,7 +2102,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2069,7 +2113,7 @@ msgstr ""
"och vфlj \"Maniac\"-katalogen inuti \"Tentacle\" katalogen."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "~Z~iplфge aktiverat"
@@ -2090,7 +2134,7 @@ msgstr "~V~isa karta"
msgid "~M~ain Menu"
msgstr "Huvud~m~eny"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "~V~atteneffekt aktiverad"
@@ -2112,6 +2156,15 @@ msgstr "Kunde inte skriva spardata till filen."
msgid "Failed to delete file."
msgstr "Kunde inte radera filen."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Snabblфge"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Kunde inte spara spelet."
@@ -2202,11 +2255,11 @@ msgstr "Glid vфnster"
msgid "Slide Right"
msgstr "Glid hіger"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Svфng vфnster"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Svфng hіger"
@@ -2400,6 +2453,47 @@ msgstr ""
"\n"
"Var god rapportera till teamet."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Zooma upp"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL-emulator"
@@ -2469,11 +2563,11 @@ msgstr "Apple II GS-emulator (INTE IMPLEMENTERAD)"
msgid "C64 Audio Emulator"
msgstr "C64 ljudemulator"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Initialiserar MT-32 emulator"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "MT-32 emulator"
@@ -2655,12 +2749,12 @@ msgid "Normal (no scaling)"
msgstr "Normalt (ingen skalning)"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Korrektion av bildfіrhхllande pх"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Korrektion av bildfіrhхllande av"
@@ -2669,7 +2763,7 @@ msgid "Active graphics filter:"
msgstr "Aktivt grafikfilter:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Fіnsterlфge"
@@ -2693,11 +2787,11 @@ msgstr "Nuvarande visningslфge"
msgid "Current scale"
msgstr "Nuvarande skala"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Aktivt filterlфge: Linjфrt"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Aktivt filterlфge: Nфrmast"
@@ -3097,6 +3191,9 @@ msgstr "Klickning aktiverad"
msgid "Clicking Disabled"
msgstr "Klickning deaktiverad"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Aktivera Roland GS-lфge"
+
#~ msgid "Hercules Green"
#~ msgstr "Herkules grіn"
diff --git a/po/uk_UA.po b/po/uk_UA.po
index b6cf7d51fe..1fe0537c19 100644
--- a/po/uk_UA.po
+++ b/po/uk_UA.po
@@ -1,5 +1,5 @@
# Ukrainian translation for ScummVM.
-# Copyright (C) 2010-2012 ScummVM Team
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Lubomyr Lisen, 2010.
#
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-12-01 17:22+0000\n"
+"POT-Creation-Date: 2013-02-07 23:11+0000\n"
"PO-Revision-Date: 2012-06-29 20:19+0200\n"
"Last-Translator: lubomyr <lubomyr31@gmail.com>\n"
"Language-Team: Ukrainian\n"
@@ -18,45 +18,55 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n"
"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-#: gui/about.cpp:91
+#: gui/about.cpp:93
#, c-format
msgid "(built on %s)"
msgstr "(зібраний %s)"
-#: gui/about.cpp:98
+#: gui/about.cpp:100
msgid "Features compiled in:"
msgstr "Включені в білд опції:"
-#: gui/about.cpp:107
+#: gui/about.cpp:109
msgid "Available engines:"
msgstr "Доступні движки:"
-#: gui/browser.cpp:66
+#: gui/browser.cpp:67
+#, fuzzy
+msgid "Show hidden files"
+msgstr "Показати / cховати консоль"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr ""
+
+#: gui/browser.cpp:71
msgid "Go up"
msgstr "Вгору"
-#: gui/browser.cpp:66 gui/browser.cpp:68
+#: gui/browser.cpp:71 gui/browser.cpp:73
msgid "Go to previous directory level"
msgstr "Перейти на папку рівнем вище"
-#: gui/browser.cpp:68
+#: gui/browser.cpp:73
msgctxt "lowres"
msgid "Go up"
msgstr "Вгору"
-#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
-#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228
+#: gui/browser.cpp:74 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1238
#: gui/saveload-dialog.cpp:215 gui/saveload-dialog.cpp:275
#: gui/saveload-dialog.cpp:545 gui/saveload-dialog.cpp:919
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
-#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:867
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: gui/themebrowser.cpp:54 engines/engine.cpp:447
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:190
+#: engines/sword1/control.cpp:867 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:191
#: backends/events/default/default-events.cpp:213
msgid "Cancel"
msgstr "Відміна"
-#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
msgid "Choose"
msgstr "Вибрати"
@@ -92,17 +102,18 @@ msgid "Map"
msgstr "Призначити"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
-#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229
-#: gui/saveload-dialog.cpp:920 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1776
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:867 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439
-#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458
-#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:51 engines/scumm/dialogs.cpp:192
+#: engines/scumm/scumm.cpp:1778 engines/agos/animation.cpp:558
+#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:519
+#: engines/sword1/animation.cpp:540 engines/sword1/animation.cpp:550
+#: engines/sword1/animation.cpp:557 engines/sword1/control.cpp:867
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:54
msgid "OK"
msgstr "OK"
@@ -175,8 +186,8 @@ msgstr ""
"Мова гри. Зміна цього налаштування не перетворить гру англійською на "
"українську"
-#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80
-#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
#: audio/null.cpp:40
msgid "<default>"
msgstr "<за умовчанням>"
@@ -198,11 +209,11 @@ msgstr "Платформа:"
msgid "Engine"
msgstr "Движок"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "Graphics"
msgstr "Графіка"
-#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
msgid "GFX"
msgstr "Грф"
@@ -215,7 +226,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Перекрити глобальні установки графіки"
-#: gui/launcher.cpp:251 gui/options.cpp:1085
+#: gui/launcher.cpp:251 gui/options.cpp:1095
msgid "Audio"
msgstr "Аудіо"
@@ -228,11 +239,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Перекрити глобальні установки аудіо"
-#: gui/launcher.cpp:265 gui/options.cpp:1090
+#: gui/launcher.cpp:265 gui/options.cpp:1100
msgid "Volume"
msgstr "Гучність"
-#: gui/launcher.cpp:267 gui/options.cpp:1092
+#: gui/launcher.cpp:267 gui/options.cpp:1102
msgctxt "lowres"
msgid "Volume"
msgstr "Гучн."
@@ -246,7 +257,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Перекрити глобальні установки гучності"
-#: gui/launcher.cpp:280 gui/options.cpp:1100
+#: gui/launcher.cpp:280 gui/options.cpp:1110
msgid "MIDI"
msgstr "MIDI"
@@ -259,7 +270,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Перекрити глобальні установки MIDI"
-#: gui/launcher.cpp:294 gui/options.cpp:1106
+#: gui/launcher.cpp:294 gui/options.cpp:1116
msgid "MT-32"
msgstr "MT-32"
@@ -272,11 +283,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Перекрити глобальні установки MT-32"
-#: gui/launcher.cpp:308 gui/options.cpp:1113
+#: gui/launcher.cpp:308 gui/options.cpp:1123
msgid "Paths"
msgstr "Шляхи"
-#: gui/launcher.cpp:310 gui/options.cpp:1115
+#: gui/launcher.cpp:310 gui/options.cpp:1125
msgctxt "lowres"
msgid "Paths"
msgstr "Шляхи"
@@ -290,7 +301,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Шлях до гри:"
-#: gui/launcher.cpp:324 gui/options.cpp:1139
+#: gui/launcher.cpp:324 gui/options.cpp:1149
msgid "Extra Path:"
msgstr "Додатк. шлях:"
@@ -298,42 +309,42 @@ msgstr "Додатк. шлях:"
msgid "Specifies path to additional data used the game"
msgstr "Вказує шлях до додаткових файлів даних для гри"
-#: gui/launcher.cpp:326 gui/options.cpp:1141
+#: gui/launcher.cpp:326 gui/options.cpp:1151
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Дод. шлях:"
-#: gui/launcher.cpp:333 gui/options.cpp:1123
+#: gui/launcher.cpp:333 gui/options.cpp:1133
msgid "Save Path:"
msgstr "Шлях збер.:"
#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336
-#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126
+#: gui/options.cpp:1133 gui/options.cpp:1135 gui/options.cpp:1136
msgid "Specifies where your savegames are put"
msgstr "Вказує шлях до збережень гри"
-#: gui/launcher.cpp:335 gui/options.cpp:1125
+#: gui/launcher.cpp:335 gui/options.cpp:1135
msgctxt "lowres"
msgid "Save Path:"
msgstr "Шлях збер.:"
#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511
-#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142
-#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264
-#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308
-#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411
-#: gui/options.cpp:1423
+#: gui/launcher.cpp:565 gui/options.cpp:1144 gui/options.cpp:1152
+#: gui/options.cpp:1161 gui/options.cpp:1276 gui/options.cpp:1282
+#: gui/options.cpp:1290 gui/options.cpp:1320 gui/options.cpp:1326
+#: gui/options.cpp:1333 gui/options.cpp:1426 gui/options.cpp:1429
+#: gui/options.cpp:1441
msgctxt "path"
msgid "None"
msgstr "Не завданий"
#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569
-#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414
+#: gui/options.cpp:1270 gui/options.cpp:1314 gui/options.cpp:1432
#: backends/platform/wii/options.cpp:56
msgid "Default"
msgstr "За умовчанням"
-#: gui/launcher.cpp:504 gui/options.cpp:1417
+#: gui/launcher.cpp:504 gui/options.cpp:1435
msgid "Select SoundFont"
msgstr "Виберіть SoundFont"
@@ -442,12 +453,14 @@ msgstr "Пошук:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:345
msgid "Load game:"
msgstr "Завантажити гру:"
#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716
-#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267
+#: engines/cruise/menu.cpp:214 engines/pegasus/pegasus.cpp:345
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Завантажити"
@@ -532,133 +545,133 @@ msgstr "Проглянуто %d папок ..."
msgid "Discovered %d new games, ignored %d previously added games ..."
msgstr "Знайдено %d нових ігор, пропущено %d попередньо доданих ігор ..."
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "Never"
msgstr "Ніколи"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 5 mins"
msgstr "кожні 5 хв"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 10 mins"
msgstr "кожні 10 хв"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 15 mins"
msgstr "кожні 15 хв"
-#: gui/options.cpp:78
+#: gui/options.cpp:84
msgid "every 30 mins"
msgstr "кожні 30 хв"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "8 kHz"
msgstr "8 кГц"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "11kHz"
msgstr "11 кГц"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "22 kHz"
msgstr "22 кГц"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "44 kHz"
msgstr "44 кГц"
-#: gui/options.cpp:80
+#: gui/options.cpp:86
msgid "48 kHz"
msgstr "48 кГц"
-#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575
-#: gui/options.cpp:644 gui/options.cpp:852
+#: gui/options.cpp:254 gui/options.cpp:480 gui/options.cpp:581
+#: gui/options.cpp:650 gui/options.cpp:858
msgctxt "soundfont"
msgid "None"
msgstr "Не заданий"
-#: gui/options.cpp:382
+#: gui/options.cpp:388
msgid "Failed to apply some of the graphic options changes:"
msgstr "Не вдалося застосувати деякі зі змін графічних налаштувань:"
-#: gui/options.cpp:394
+#: gui/options.cpp:400
msgid "the video mode could not be changed."
msgstr "не вдалося змінити графічний режим."
-#: gui/options.cpp:400
+#: gui/options.cpp:406
msgid "the fullscreen setting could not be changed"
msgstr "не вдалося змінити режим повного екрану"
-#: gui/options.cpp:406
+#: gui/options.cpp:412
msgid "the aspect ratio setting could not be changed"
msgstr "не вдалося змінити режим корекції співвідношення сторін"
-#: gui/options.cpp:727
+#: gui/options.cpp:733
msgid "Graphics mode:"
msgstr "Графічн. режим:"
-#: gui/options.cpp:741
+#: gui/options.cpp:747
msgid "Render mode:"
msgstr "Режим раструв.:"
-#: gui/options.cpp:741 gui/options.cpp:742
+#: gui/options.cpp:747 gui/options.cpp:748
msgid "Special dithering modes supported by some games"
msgstr "Спеціальні режими растрування, які підтримують деякі ігри"
-#: gui/options.cpp:753
+#: gui/options.cpp:759
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
msgid "Fullscreen mode"
msgstr "Повноекранний режим"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Aspect ratio correction"
msgstr "Корекція співвідношення сторін"
-#: gui/options.cpp:756
+#: gui/options.cpp:762
msgid "Correct aspect ratio for 320x200 games"
msgstr "Коригувати співвідношення сторін для ігор з графікою 320x200"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Preferred Device:"
msgstr "Уподобаний пристрій:"
-#: gui/options.cpp:764
+#: gui/options.cpp:770
msgid "Music Device:"
msgstr "Музич. пристрій:"
-#: gui/options.cpp:764 gui/options.cpp:766
+#: gui/options.cpp:770 gui/options.cpp:772
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Вказує уподобаний звуковий пристрій або емулятор звукової карти"
-#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767
+#: gui/options.cpp:770 gui/options.cpp:772 gui/options.cpp:773
msgid "Specifies output sound device or sound card emulator"
msgstr "Вказує вихідний звуковий пристрій або емулятор звукової карти"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Уподоб. пристрій:"
-#: gui/options.cpp:766
+#: gui/options.cpp:772
msgctxt "lowres"
msgid "Music Device:"
msgstr "Музичний пристрій:"
-#: gui/options.cpp:793
+#: gui/options.cpp:799
msgid "AdLib emulator:"
msgstr "Емулятор AdLib:"
-#: gui/options.cpp:793 gui/options.cpp:794
+#: gui/options.cpp:799 gui/options.cpp:800
msgid "AdLib is used for music in many games"
msgstr "Звукова карта AdLib використовується багатьма іграми"
-#: gui/options.cpp:804
+#: gui/options.cpp:810
msgid "Output rate:"
msgstr "Вихідна частота:"
-#: gui/options.cpp:804 gui/options.cpp:805
+#: gui/options.cpp:810 gui/options.cpp:811
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -666,63 +679,67 @@ msgstr ""
"Великі значення задають кращу якість звуку, проте вони можуть не "
"підтримуватися вашою звуковою картою"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "GM Device:"
msgstr "Пристрій GM:"
-#: gui/options.cpp:815
+#: gui/options.cpp:821
msgid "Specifies default sound device for General MIDI output"
msgstr "Вказує вихідний звуковий пристрій для General MIDI"
-#: gui/options.cpp:826
+#: gui/options.cpp:832
msgid "Don't use General MIDI music"
msgstr "Не використовувати музику General MIDI"
-#: gui/options.cpp:837 gui/options.cpp:899
+#: gui/options.cpp:843 gui/options.cpp:909
msgid "Use first available device"
msgstr "Використовувати перший наявний пристрій"
-#: gui/options.cpp:849
+#: gui/options.cpp:855
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852
+#: gui/options.cpp:855 gui/options.cpp:857 gui/options.cpp:858
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"SoundFont підтримується деякими звуковими картами, Fluidsynth та Timidity"
-#: gui/options.cpp:851
+#: gui/options.cpp:857
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Mixed AdLib/MIDI mode"
msgstr "Змішаний режим AdLib/MIDI"
-#: gui/options.cpp:857
+#: gui/options.cpp:863
msgid "Use both MIDI and AdLib sound generation"
msgstr "Використовувати і MIDI і AdLib для генерації звуку"
-#: gui/options.cpp:860
+#: gui/options.cpp:866
msgid "MIDI gain:"
msgstr "Посилення MIDI:"
-#: gui/options.cpp:870
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
msgid "MT-32 Device:"
msgstr "Пристрій MT-32:"
-#: gui/options.cpp:870
+#: gui/options.cpp:880
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Вказує звуковий пристрій за умовчанням для виводу на Roland MT-32/LAPC1/"
"CM32l/CM64"
-#: gui/options.cpp:875
+#: gui/options.cpp:885
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Справжній Roland MT-32 (вимкнути емуляцию GM)"
-#: gui/options.cpp:875 gui/options.cpp:877
+#: gui/options.cpp:885 gui/options.cpp:887
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -730,193 +747,194 @@ msgstr ""
"Відмітьте, якщо у вас підключено Roland-сумісний звуковий пристрій і ви "
"хочете його використовувати"
-#: gui/options.cpp:877
+#: gui/options.cpp:887
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Справжній Roland MT-32 (вимкнути емуляцию GM)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "Увімкнути режим Roland GS"
+#: gui/options.cpp:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Справжній Roland MT-32 (вимкнути емуляцию GM)"
-#: gui/options.cpp:880
+#: gui/options.cpp:890
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Вимикає мапінг General MIDI для ігор зі звуковою доріжкою для Roland MT-32"
-#: gui/options.cpp:889
+#: gui/options.cpp:899
msgid "Don't use Roland MT-32 music"
msgstr "Не використовувати Roland MT-32"
-#: gui/options.cpp:916
+#: gui/options.cpp:926
msgid "Text and Speech:"
msgstr "Текст і озвучка:"
-#: gui/options.cpp:920 gui/options.cpp:930
+#: gui/options.cpp:930 gui/options.cpp:940
msgid "Speech"
msgstr "Озвучка"
-#: gui/options.cpp:921 gui/options.cpp:931
+#: gui/options.cpp:931 gui/options.cpp:941
msgid "Subtitles"
msgstr "Субтитри"
-#: gui/options.cpp:922
+#: gui/options.cpp:932
msgid "Both"
msgstr "Все"
-#: gui/options.cpp:924
+#: gui/options.cpp:934
msgid "Subtitle speed:"
msgstr "Швид. субтитрів:"
-#: gui/options.cpp:926
+#: gui/options.cpp:936
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Текст і озвучка:"
-#: gui/options.cpp:930
+#: gui/options.cpp:940
msgid "Spch"
msgstr "Озв"
-#: gui/options.cpp:931
+#: gui/options.cpp:941
msgid "Subs"
msgstr "Суб"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgctxt "lowres"
msgid "Both"
msgstr "Все"
-#: gui/options.cpp:932
+#: gui/options.cpp:942
msgid "Show subtitles and play speech"
msgstr "Показувати субтитри і відтворювати мову"
-#: gui/options.cpp:934
+#: gui/options.cpp:944
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Швид. субтитрів:"
-#: gui/options.cpp:950
+#: gui/options.cpp:960
msgid "Music volume:"
msgstr "Гучність музики:"
-#: gui/options.cpp:952
+#: gui/options.cpp:962
msgctxt "lowres"
msgid "Music volume:"
msgstr "Гучність музики:"
-#: gui/options.cpp:959
+#: gui/options.cpp:969
msgid "Mute All"
msgstr "Вимкнути все"
-#: gui/options.cpp:962
+#: gui/options.cpp:972
msgid "SFX volume:"
msgstr "Гучність ефектів:"
-#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
msgid "Special sound effects volume"
msgstr "Гучність спеціальних звукових ефектів"
-#: gui/options.cpp:964
+#: gui/options.cpp:974
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Гучн. ефектів:"
-#: gui/options.cpp:972
+#: gui/options.cpp:982
msgid "Speech volume:"
msgstr "Гучність озвучки:"
-#: gui/options.cpp:974
+#: gui/options.cpp:984
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Гучн. озвучки:"
-#: gui/options.cpp:1131
+#: gui/options.cpp:1141
msgid "Theme Path:"
msgstr "Шлях до тем:"
-#: gui/options.cpp:1133
+#: gui/options.cpp:1143
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Шлях до тем:"
-#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142
+#: gui/options.cpp:1149 gui/options.cpp:1151 gui/options.cpp:1152
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Вказує шлях до додаткових файлів даних, які використовуються усіма іграми "
"або ScummVM"
-#: gui/options.cpp:1148
+#: gui/options.cpp:1158
msgid "Plugins Path:"
msgstr "Шлях до втулків:"
-#: gui/options.cpp:1150
+#: gui/options.cpp:1160
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Шлях до втулків:"
-#: gui/options.cpp:1159
+#: gui/options.cpp:1169
msgid "Misc"
msgstr "Різне"
-#: gui/options.cpp:1161
+#: gui/options.cpp:1171
msgctxt "lowres"
msgid "Misc"
msgstr "Різне"
-#: gui/options.cpp:1163
+#: gui/options.cpp:1173
msgid "Theme:"
msgstr "Тема:"
-#: gui/options.cpp:1167
+#: gui/options.cpp:1177
msgid "GUI Renderer:"
msgstr "Растер. GUI:"
-#: gui/options.cpp:1179
+#: gui/options.cpp:1189
msgid "Autosave:"
msgstr "Автозбереження:"
-#: gui/options.cpp:1181
+#: gui/options.cpp:1191
msgctxt "lowres"
msgid "Autosave:"
msgstr "Автозбереж.:"
-#: gui/options.cpp:1189
+#: gui/options.cpp:1199
msgid "Keys"
msgstr "Клавіші"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "GUI Language:"
msgstr "Мова інтерф.:"
-#: gui/options.cpp:1196
+#: gui/options.cpp:1206
msgid "Language of ScummVM GUI"
msgstr "Мова графічного інтерфейсу ScummVM"
-#: gui/options.cpp:1347
+#: gui/options.cpp:1365
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Ви повинні перезапустити ScummVM щоб застосувати зміни."
-#: gui/options.cpp:1360
+#: gui/options.cpp:1378
msgid "Select directory for savegames"
msgstr "Виберіть папку для збережень"
-#: gui/options.cpp:1367
+#: gui/options.cpp:1385
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Не можу писати у вибрану папку. Будь ласка, вкажіть іншу."
-#: gui/options.cpp:1376
+#: gui/options.cpp:1394
msgid "Select directory for GUI themes"
msgstr "Виберіть папку для тем GUI"
-#: gui/options.cpp:1386
+#: gui/options.cpp:1404
msgid "Select directory for extra files"
msgstr "Виберіть папку з додатковими файлами"
-#: gui/options.cpp:1397
+#: gui/options.cpp:1415
msgid "Select directory for plugins"
msgstr "Виберіть папку зі втулками"
-#: gui/options.cpp:1450
+#: gui/options.cpp:1468
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."
@@ -1169,13 +1187,16 @@ msgid "~R~eturn to Launcher"
msgstr "~П~овер.в головне меню"
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:369
msgid "Save game:"
msgstr "Зберегти гру: "
#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
-#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212
-#: engines/sci/engine/kfile.cpp:742
+#: engines/drascula/saveload.cpp:338 engines/scumm/dialogs.cpp:187
+#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742
+#: engines/toltecs/menu.cpp:284 engines/pegasus/pegasus.cpp:369
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1204,12 +1225,12 @@ msgstr ""
"основної інормації, а також інструкцій, як отримати подальшу допомогу."
#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:174
+#: engines/mohawk/dialogs.cpp:170
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:175
+#: engines/mohawk/dialogs.cpp:171
msgid "~C~ancel"
msgstr "Ві~д~міна"
@@ -1217,23 +1238,23 @@ msgstr "Ві~д~міна"
msgid "~K~eys"
msgstr "~К~лавіші"
-#: engines/engine.cpp:235
+#: engines/engine.cpp:240
msgid "Could not initialize color format."
msgstr "Не можу налаштувати формат кольору."
-#: engines/engine.cpp:243
+#: engines/engine.cpp:248
msgid "Could not switch to video mode: '"
msgstr "Не вдалося переключити відеорежим: '"
-#: engines/engine.cpp:252
+#: engines/engine.cpp:257
msgid "Could not apply aspect ratio setting."
msgstr "Не вдалося застосувати корекцію співвідношення сторін."
-#: engines/engine.cpp:257
+#: engines/engine.cpp:262
msgid "Could not apply fullscreen setting."
msgstr "Не вдалося застосувати повноекранний режим."
-#: engines/engine.cpp:357
+#: engines/engine.cpp:362
msgid ""
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
@@ -1247,7 +1268,7 @@ msgstr ""
"гри на жорсткий диск.\n"
"Дивіться файл README для подальших інструкцій."
-#: engines/engine.cpp:368
+#: engines/engine.cpp:373
msgid ""
"This game has audio tracks in its disk. These\n"
"tracks need to be ripped from the disk using\n"
@@ -1261,7 +1282,7 @@ msgstr ""
"того, щоб можна було слухати музику у грі.\n"
"Дивіться файл README для подальших інструкцій."
-#: engines/engine.cpp:426
+#: engines/engine.cpp:431
#, c-format
msgid ""
"Gamestate load failed (%s)! Please consult the README for basic information, "
@@ -1270,7 +1291,7 @@ msgstr ""
"Завантаження стану гри не вдалося (%s)! . Будь-ласка, дивіться файл README "
"для основної інормації, а також інструкцій, як отримати подальшу допомогу."
-#: engines/engine.cpp:439
+#: engines/engine.cpp:444
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 "
@@ -1280,29 +1301,51 @@ msgstr ""
"ScummVM. Скорше за все вона не буде працювати стабільно, і збереження ігор, "
"які ви зробите, можуть не працювати у подальших версіях ScummVM."
-#: engines/engine.cpp:442
+#: engines/engine.cpp:447
msgid "Start anyway"
msgstr "Все одно запустити"
-#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47
-#: engines/sci/detection.cpp:393
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:270
+#: engines/dreamweb/detection.cpp:47 engines/sci/detection.cpp:393
+#: engines/toltecs/detection.cpp:173
msgid "Use original save/load screens"
msgstr "Використовувати ориг. збереження/завантаження екрани"
-#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:394
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:271
+#: engines/dreamweb/detection.cpp:48 engines/sci/detection.cpp:394
+#: engines/toltecs/detection.cpp:174
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Використовувати оригінальні збереження/завантаження екрани, замість ScummVM"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore game:"
msgstr "Відновити гру:"
-#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:838 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Відновити"
+#: engines/drascula/saveload.cpp:49
+#, fuzzy
+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 знайшов, що Ви маєте старі збереження ігор для Broken Sword 1.\n"
+"Збереження у старому форматі не підтримуються, і Ви не зможете їх "
+"завантажити, якщо не переведете у новий формат.\n"
+"\n"
+"Натисніть ОК, щоб перевести їх зараз, інакше уе повідомлення з'явиться при "
+"наступному запуску гри.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Використовувати яскравий режим палітри"
@@ -2014,7 +2057,7 @@ msgstr "Летіти направо"
msgid "Fly to lower right"
msgstr "Летіти донизу направо"
-#: engines/scumm/scumm.cpp:1774
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2023,7 +2066,7 @@ msgstr ""
"Режим \"рідного\" MIDI потребує поновлення Roland Upgrade від\n"
"LucasArts, проте %s відсутній. Перемикаюсь на AdLib."
-#: engines/scumm/scumm.cpp:2295 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2034,7 +2077,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2302 engines/agos/saveload.cpp:185
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2045,7 +2088,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2314 engines/agos/saveload.cpp:228
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2056,7 +2099,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2529
+#: engines/scumm/scumm.cpp:2537
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' "
@@ -2067,7 +2110,7 @@ msgstr ""
"виберіть папку Maniac всередені пвпки з грою Tentacle."
#. I18N: Option for fast scene switching
-#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
msgstr "Режим швидкого переходу активовано"
@@ -2088,7 +2131,7 @@ msgstr "Показати мапу"
msgid "~M~ain Menu"
msgstr "Головне меню"
-#: engines/mohawk/dialogs.cpp:172
+#: engines/mohawk/dialogs.cpp:168
msgid "~W~ater Effect Enabled"
msgstr "Ефекти води увімкнено"
@@ -2110,6 +2153,15 @@ msgstr "Не вдалося зберегти стан гри у файл."
msgid "Failed to delete file."
msgstr "Не вдалося видалити файл."
+#: engines/groovie/detection.cpp:312
+#, fuzzy
+msgid "Fast movie speed"
+msgstr "Швидкий режим"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr ""
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Не вдалося записати гру"
@@ -2200,11 +2252,11 @@ msgstr "Ковзати наліво"
msgid "Slide Right"
msgstr "Ковзати направо"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2412
msgid "Turn Left"
msgstr "Повернутися наліво"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2413
msgid "Turn Right"
msgstr "Повернутися направо"
@@ -2398,6 +2450,47 @@ msgstr ""
"\n"
"Будь ласка, повідомте про це команді."
+#: engines/pegasus/pegasus.cpp:675
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2410
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2411
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Збіл. масштаб"
+
+#: engines/pegasus/pegasus.cpp:2414
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2415
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2416
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2417
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2418
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2419
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2420
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Емулятор MAME OPL:"
@@ -2467,11 +2560,11 @@ msgstr "Apple II GS Емулятор (НЕ РЕАЛІЗОВАНО)"
msgid "C64 Audio Emulator"
msgstr "C64 Аудіо Емулятор"
-#: audio/softsynth/mt32.cpp:293
+#: audio/softsynth/mt32.cpp:205
msgid "Initializing MT-32 Emulator"
msgstr "Налаштовую емулятор MT-32"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:431
msgid "MT-32 Emulator"
msgstr "Емулятор MT-32"
@@ -2653,12 +2746,12 @@ msgid "Normal (no scaling)"
msgstr "Без збільшення"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
msgid "Enabled aspect ratio correction"
msgstr "Корекцію співвідношення сторін увімкнено"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
msgid "Disabled aspect ratio correction"
msgstr "Корекцію співвідношення сторін вимкнено"
@@ -2667,7 +2760,7 @@ msgid "Active graphics filter:"
msgstr "Поточний графічний фільтр:"
#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
msgid "Windowed mode"
msgstr "Віконний режим"
@@ -2691,11 +2784,11 @@ msgstr "Поточний відеорежим"
msgid "Current scale"
msgstr "Поточний масштаб"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
msgid "Active filter mode: Linear"
msgstr "Активний режим фільтрації: Лінійний"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
msgid "Active filter mode: Nearest"
msgstr "Активний режим фільтрації: Найближче"
@@ -3094,6 +3187,9 @@ msgstr "Кліки увімкнено"
msgid "Clicking Disabled"
msgstr "Кліки вимкнено"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Увімкнути режим Roland GS"
+
#~ msgid "Hercules Green"
#~ msgstr "Hercules Зелений"
diff --git a/ports.mk b/ports.mk
index bdedffde52..7a3bf0fabd 100644
--- a/ports.mk
+++ b/ports.mk
@@ -86,6 +86,12 @@ endif
cp $(srcdir)/dists/iphone/icon.png $(bundle_name)/
cp $(srcdir)/dists/iphone/icon-72.png $(bundle_name)/
cp $(srcdir)/dists/iphone/Default.png $(bundle_name)/
+ # Binary patch workaround for Iphone 5/IPad 4 "Illegal instruction: 4" toolchain issue (http://code.google.com/p/iphone-gcc-full/issues/detail?id=6)
+ cp scummvm scummvm-iph5
+ sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' scummvm-iph5
+ ldid -S scummvm-iph5
+ chmod 755 scummvm-iph5
+ cp scummvm-iph5 $(bundle_name)/ScummVM-iph5
# Location of static libs for the iPhone
ifneq ($(BACKEND), iphone)
@@ -356,7 +362,6 @@ endif
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
- package_finalize scummvm-ps3.pkg
ps3run: $(EXECUTABLE)
$(STRIP) $(EXECUTABLE)
@@ -365,4 +370,4 @@ ps3run: $(EXECUTABLE)
ps3load $(EXECUTABLE).self
# Mark special targets as phony
-.PHONY: deb bundle osxsnap win32dist install uninstall ps3pkg
+.PHONY: deb bundle osxsnap win32dist install uninstall ps3pkg ps3run
diff --git a/test/common/bufferedseekablereadstream.h b/test/common/bufferedseekablereadstream.h
index 11eb58f3d0..bf21f22f77 100644
--- a/test/common/bufferedseekablereadstream.h
+++ b/test/common/bufferedseekablereadstream.h
@@ -72,6 +72,13 @@ class BufferedSeekableReadStreamTestSuite : public CxxTest::TestSuite {
b = ssrs.readByte();
TS_ASSERT_EQUALS(b, 2);
+ ssrs.seek(5, SEEK_CUR);
+ TS_ASSERT_EQUALS(ssrs.pos(), 8);
+ ssrs.seek(-1, SEEK_CUR);
+ TS_ASSERT_EQUALS(ssrs.pos(), 7);
+ b = ssrs.readByte();
+ TS_ASSERT_EQUALS(b, 7);
+
delete &ssrs;
}
};
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index 6062049b72..6fe9c773b8 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -457,6 +457,10 @@ void AVIDecoder::AVIAudioTrack::queueSound(Common::SeekableReadStream *stream) {
flags |= Audio::FLAG_STEREO;
_audStream->queueAudioStream(Audio::makeRawStream(stream, _wvInfo.samplesPerSec, flags, DisposeAfterUse::YES), DisposeAfterUse::YES);
+ } else if (_wvInfo.tag == kWaveFormatMSADPCM) {
+ _audStream->queueAudioStream(Audio::makeADPCMStream(stream, DisposeAfterUse::YES, stream->size(), Audio::kADPCMMS, _wvInfo.samplesPerSec, _wvInfo.channels, _wvInfo.blockAlign), DisposeAfterUse::YES);
+ } else if (_wvInfo.tag == kWaveFormatMSIMAADPCM) {
+ _audStream->queueAudioStream(Audio::makeADPCMStream(stream, DisposeAfterUse::YES, stream->size(), Audio::kADPCMMSIma, _wvInfo.samplesPerSec, _wvInfo.channels, _wvInfo.blockAlign), DisposeAfterUse::YES);
} else if (_wvInfo.tag == kWaveFormatDK3) {
_audStream->queueAudioStream(Audio::makeADPCMStream(stream, DisposeAfterUse::YES, stream->size(), Audio::kADPCMDK3, _wvInfo.samplesPerSec, _wvInfo.channels, _wvInfo.blockAlign), DisposeAfterUse::YES);
}
@@ -470,7 +474,7 @@ Audio::AudioStream *AVIDecoder::AVIAudioTrack::getAudioStream() const {
}
Audio::QueuingAudioStream *AVIDecoder::AVIAudioTrack::createAudioStream() {
- if (_wvInfo.tag == kWaveFormatPCM || _wvInfo.tag == kWaveFormatDK3)
+ if (_wvInfo.tag == kWaveFormatPCM || _wvInfo.tag == kWaveFormatMSADPCM || _wvInfo.tag == kWaveFormatMSIMAADPCM || _wvInfo.tag == kWaveFormatDK3)
return Audio::makeQueuingAudioStream(_wvInfo.samplesPerSec, _wvInfo.channels == 2);
else if (_wvInfo.tag != kWaveFormatNone) // No sound
warning("Unsupported AVI audio format %d", _wvInfo.tag);
diff --git a/video/avi_decoder.h b/video/avi_decoder.h
index 3bdc0561d1..34a67f4c28 100644
--- a/video/avi_decoder.h
+++ b/video/avi_decoder.h
@@ -203,7 +203,9 @@ private:
enum {
kWaveFormatNone = 0,
kWaveFormatPCM = 1,
- kWaveFormatDK3 = 98
+ kWaveFormatMSADPCM = 2,
+ kWaveFormatMSIMAADPCM = 17,
+ kWaveFormatDK3 = 98 // rogue format number
};
AVIStreamHeader _audsHeader;
diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp
index 1ece22c963..45dec0887b 100644
--- a/video/bink_decoder.cpp
+++ b/video/bink_decoder.cpp
@@ -557,8 +557,8 @@ void BinkDecoder::BinkVideoTrack::initBundles() {
_bundles[i].dataEnd = _bundles[i].data + blocks * 64;
}
- uint32 cbw[2] = { (_surface.w + 7) >> 3, (_surface.w + 15) >> 4 };
- uint32 cw [2] = { _surface.w , _surface.w >> 1 };
+ uint32 cbw[2] = { (uint32)((_surface.w + 7) >> 3), (uint32)((_surface.w + 15) >> 4) };
+ uint32 cw [2] = { (uint32)( _surface.w ), (uint32)( _surface.w >> 1) };
// Calculate the lengths of an element count in bits
for (int i = 0; i < 2; i++) {
diff --git a/video/codecs/rpza.cpp b/video/codecs/rpza.cpp
index acc1b7f358..0a9f87747e 100644
--- a/video/codecs/rpza.cpp
+++ b/video/codecs/rpza.cpp
@@ -163,7 +163,7 @@ const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *st
blockPtr = rowPtr + pixelPtr;
for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {
byte index = stream->readByte();
- for (byte pixel_x = 0; pixel_x < 4; pixel_x++){
+ for (byte pixel_x = 0; pixel_x < 4; pixel_x++) {
byte idx = (index >> (2 * (3 - pixel_x))) & 0x03;
PUT_PIXEL(color4[idx]);
}
@@ -177,7 +177,7 @@ const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *st
case 0x00:
blockPtr = rowPtr + pixelPtr;
for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {
- for (byte pixel_x = 0; pixel_x < 4; pixel_x++){
+ for (byte pixel_x = 0; pixel_x < 4; pixel_x++) {
// We already have color of upper left pixel
if (pixel_y != 0 || pixel_x != 0)
colorA = stream->readUint16BE();
diff --git a/video/flic_decoder.cpp b/video/flic_decoder.cpp
index 1a0627615b..de545366b1 100644
--- a/video/flic_decoder.cpp
+++ b/video/flic_decoder.cpp
@@ -152,6 +152,7 @@ Graphics::PixelFormat FlicDecoder::FlicVideoTrack::getPixelFormat() const {
#define FLI_SETPAL 4
#define FLI_SS2 7
#define FLI_BRUN 15
+#define FLI_COPY 16
#define PSTAMP 18
#define FRAME_TYPE 0xF1FA
@@ -212,6 +213,9 @@ const Graphics::Surface *FlicDecoder::FlicVideoTrack::decodeNextFrame() {
case FLI_BRUN:
decodeByteRun(data);
break;
+ case FLI_COPY:
+ copyFrame(data);
+ break;
case PSTAMP:
/* PSTAMP - skip for now */
break;
@@ -247,6 +251,14 @@ void FlicDecoder::FlicVideoTrack::copyDirtyRectsToBuffer(uint8 *dst, uint pitch)
clearDirtyRects();
}
+void FlicDecoder::FlicVideoTrack::copyFrame(uint8 *data) {
+ memcpy((byte *)_surface->pixels, data, getWidth() * getHeight());
+
+ // Redraw
+ _dirtyRects.clear();
+ _dirtyRects.push_back(Common::Rect(0, 0, getWidth(), getHeight()));
+}
+
void FlicDecoder::FlicVideoTrack::decodeByteRun(uint8 *data) {
byte *ptr = (byte *)_surface->pixels;
while ((int32)(ptr - (byte *)_surface->pixels) < (getWidth() * getHeight())) {
diff --git a/video/flic_decoder.h b/video/flic_decoder.h
index 9037af05d6..c20a092a32 100644
--- a/video/flic_decoder.h
+++ b/video/flic_decoder.h
@@ -97,6 +97,7 @@ private:
Common::List<Common::Rect> _dirtyRects;
+ void copyFrame(uint8 *data);
void decodeByteRun(uint8 *data);
void decodeDeltaFLC(uint8 *data);
void unpackPalette(uint8 *mem);
diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp
index c49791100d..4e18268e72 100644
--- a/video/smk_decoder.cpp
+++ b/video/smk_decoder.cpp
@@ -119,7 +119,7 @@ uint16 SmallHuffmanTree::decodeTree(uint32 prefix, int length) {
}
uint16 SmallHuffmanTree::getCode(Common::BitStream &bs) {
- byte peek = bs.peekBits(8);
+ byte peek = bs.peekBits(MIN<uint32>(bs.size() - bs.pos(), 8));
uint16 *p = &_tree[_prefixtree[peek]];
bs.skip(_prefixlength[peek]);
@@ -257,7 +257,7 @@ uint32 BigHuffmanTree::decodeTree(uint32 prefix, int length) {
}
uint32 BigHuffmanTree::getCode(Common::BitStream &bs) {
- byte peek = bs.peekBits(8);
+ byte peek = bs.peekBits(MIN<uint32>(bs.size() - bs.pos(), 8));
uint32 *p = &_tree[_prefixtree[peek]];
bs.skip(_prefixlength[peek]);